@visa/cli 1.13.2 → 1.14.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +39 -39
- package/dist/mcp-server/index.js +14 -14
- package/package.json +1 -1
package/dist/mcp-server/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var cz=Object.create;var Tl=Object.defineProperty;var uz=Object.getOwnPropertyDescriptor;var lz=Object.getOwnPropertyNames;var pz=Object.getPrototypeOf,_z=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qf=(t,e)=>{for(var r in e)Tl(t,r,{get:e[r],enumerable:!0})},TO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lz(e))!_z.call(t,o)&&o!==r&&Tl(t,o,{get:()=>e[o],enumerable:!(n=uz(e,o))||n.enumerable});return t};var C=(t,e,r)=>(r=t!=null?cz(pz(t)):{},TO(e||!t||!t.__esModule?Tl(r,"default",{value:t,enumerable:!0}):r,t)),P=t=>TO(Tl({},"__esModule",{value:!0}),t);var _N=E((t0e,F8)=>{F8.exports={name:"@visa/cli",version:"1.13.2",description:"AI-powered payments for Claude Code",bin:{"visa-cli":"./bin/visa-cli.js"},scripts:{build:"tsc --noEmit && node esbuild.config.js",dev:"tsc --watch",pretest:"pnpm build",start:"node dist/mcp-server/index.js",test:"jest --config jest.config.js","test:unit":"jest --config jest.config.js","test:unit:watch":"jest --config jest.config.js --watch","test:unit:coverage":"jest --config jest.config.js --coverage","test:smoke":"VISA_AUTH_URL=https://auth.visacli.sh jest --config jest.smoke.config.js","test:integration":"jest --config jest.integration.config.js","test:e2e":"jest --config jest.e2e.config.js","test:catalog-e2e":"jest --config jest.catalog-e2e.config.js","test:all":"npm run test:unit && npm run test:integration && npm run test:e2e",prepublishOnly:"npm run build && npm test",lint:"eslint src/**/*.ts",format:'prettier --write "src/**/*.ts"',"format:check":'prettier --check "src/**/*.ts"'},keywords:["visa","checkout","mcp","ai-agent","payments","click-to-pay","usdc","stablecoin"],author:"Visa Crypto Labs",license:"SEE LICENSE IN LICENSE",dependencies:{"@modelcontextprotocol/sdk":"^1.0.0",commander:"^12.1.0",zod:"^3.23.0"},devDependencies:{"@visa/observability":"workspace:*","@visa-cli/tools":"workspace:*","@changesets/changelog-git":"^0.2.1","@changesets/cli":"^2.31.0","@types/jest":"^30.0.0","@types/node":"^25.6.0","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@types/express":"^5.0.0",esbuild:"^0.27.4",express:"^4.21.0",eslint:"^10.0.2","eslint-config-prettier":"^10.1.8",jest:"^29.7.0",prettier:"^3.8.3","ts-jest":"^29.2.0",typescript:"^5.7.0"},engines:{node:">=18.0.0"},mcpName:"io.github.visa-crypto-labs/visa-cli",files:["bin/visa-cli.js","dist/","install.ps1","native/visa-keychain.m","server.json","README.md","LICENSE"]}});var Dn,mS=w(()=>{Dn="1.9.1"});function K8(t){let e=new Set([t]),r=new Set,n=t.match(fN);if(!n)return()=>!1;let o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return function(c){return c===t};function s(a){return r.add(a),!1}function i(a){return e.add(a),!0}return function(c){if(e.has(c))return!0;if(r.has(c))return!1;let u=c.match(fN);if(!u)return s(c);let l={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return l.prerelease!=null||o.major!==l.major?s(c):o.major===0?o.minor===l.minor&&o.patch<=l.patch?i(c):s(c):o.minor<=l.minor?i(c):s(c)}}var fN,SN,TN=w(()=>{mS();fN=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;SN=K8(Dn)});function Zr(t,e,r,n=!1){var o;let s=fc[Ec]=(o=fc[Ec])!==null&&o!==void 0?o:{version:Dn};if(!n&&s[t]){let i=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return r.error(i.stack||i.message),!1}if(s.version!==Dn){let i=new Error(`@opentelemetry/api: Registration of version v${s.version} for ${t} does not match previously registered API v${Dn}`);return r.error(i.stack||i.message),!1}return s[t]=e,r.debug(`@opentelemetry/api: Registered a global for ${t} v${Dn}.`),!0}function er(t){var e,r;let n=(e=fc[Ec])===null||e===void 0?void 0:e.version;if(!(!n||!SN(n)))return(r=fc[Ec])===null||r===void 0?void 0:r[t]}function en(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v${Dn}.`);let r=fc[Ec];r&&delete r[t]}var W8,Ec,fc,ms=w(()=>{mS();TN();W8=Dn.split(".")[0],Ec=Symbol.for(`opentelemetry.js.api.${W8}`),fc=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Sc(t,e,r){let n=er("diag");if(n)return n[t](e,...r)}var kl,mN=w(()=>{ms();kl=class{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return Sc("debug",this._namespace,e)}error(...e){return Sc("error",this._namespace,e)}info(...e){return Sc("info",this._namespace,e)}warn(...e){return Sc("warn",this._namespace,e)}verbose(...e){return Sc("verbose",this._namespace,e)}}});var $e,Fl=w(()=>{(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})($e||($e={}))});function hN(t,e){t<$e.NONE?t=$e.NONE:t>$e.ALL&&(t=$e.ALL),e=e||{};function r(n,o){let s=e[n];return typeof s=="function"&&t>=o?s.bind(e):function(){}}return{error:r("error",$e.ERROR),warn:r("warn",$e.WARN),info:r("info",$e.INFO),debug:r("debug",$e.DEBUG),verbose:r("verbose",$e.VERBOSE)}}var gN=w(()=>{Fl()});var X8,Ze,hs=w(()=>{mN();gN();Fl();ms();X8="diag",Ze=class t{static instance(){return this._instance||(this._instance=new t),this._instance}constructor(){function e(o){return function(...s){let i=er("diag");if(i)return i[o](...s)}}let r=this,n=(o,s={logLevel:$e.INFO})=>{var i,a,c;if(o===r){let p=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((i=p.stack)!==null&&i!==void 0?i:p.message),!1}typeof s=="number"&&(s={logLevel:s});let u=er("diag"),l=hN((a=s.logLevel)!==null&&a!==void 0?a:$e.INFO,o);if(u&&!s.suppressOverrideMessage){let p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn(`Current logger will be overwritten from ${p}`),l.warn(`Current logger will overwrite one already registered from ${p}`)}return Zr("diag",l,r,!0)};r.setLogger=n,r.disable=()=>{en(X8,r)},r.createComponentLogger=o=>new kl(o),r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}}});var ql,AN=w(()=>{ql=class t{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let r=this._entries.get(e);if(r)return Object.assign({},r)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,r){let n=new t(this._entries);return n._entries.set(e,r),n}removeEntry(e){let r=new t(this._entries);return r._entries.delete(e),r}removeEntries(...e){let r=new t(this._entries);for(let n of e)r._entries.delete(n);return r}clear(){return new t}}});var RN,ON=w(()=>{RN=Symbol("BaggageEntryMetadata")});function NN(t={}){return new ql(new Map(Object.entries(t)))}function IN(t){return typeof t!="string"&&(z8.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:RN,toString(){return t}}}var z8,hS=w(()=>{hs();AN();ON();z8=Ze.instance()});function Lr(t){return Symbol.for(t)}var gS,_i,Tc=w(()=>{gS=class t{constructor(e){let r=this;r._currentContext=e?new Map(e):new Map,r.getValue=n=>r._currentContext.get(n),r.setValue=(n,o)=>{let s=new t(r._currentContext);return s._currentContext.set(n,o),s},r.deleteValue=n=>{let o=new t(r._currentContext);return o._currentContext.delete(n),o}}},_i=new gS});var AS,RS,jl,PN=w(()=>{AS=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],RS={};if(typeof console<"u"){let t=["error","warn","info","debug","trace","log"];for(let e of t)typeof console[e]=="function"&&(RS[e]=console[e])}jl=class{constructor(){function e(r){return function(...n){let o=RS[r];if(typeof o!="function"&&(o=RS.log),typeof o!="function"&&console&&(o=console[r],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,n)}}for(let r=0;r<AS.length;r++)this[AS[r].n]=e(AS[r].c)}}});function CN(){return bS}var OS,di,NS,IS,PS,CS,mc,yS,MS,vS,bS,Q8,J8,Z8,e6,t6,r6,n6,LS=w(()=>{OS=class{constructor(){}createGauge(e,r){return J8}createHistogram(e,r){return Z8}createCounter(e,r){return Q8}createUpDownCounter(e,r){return e6}createObservableGauge(e,r){return r6}createObservableCounter(e,r){return t6}createObservableUpDownCounter(e,r){return n6}addBatchObservableCallback(e,r){}removeBatchObservableCallback(e){}},di=class{},NS=class extends di{add(e,r){}},IS=class extends di{add(e,r){}},PS=class extends di{record(e,r){}},CS=class extends di{record(e,r){}},mc=class{addCallback(e){}removeCallback(e){}},yS=class extends mc{},MS=class extends mc{},vS=class extends mc{},bS=new OS,Q8=new NS,J8=new PS,Z8=new CS,e6=new IS,t6=new yS,r6=new MS,n6=new vS});var Yl,yN=w(()=>{(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Yl||(Yl={}))});var $l,Kl,DS=w(()=>{$l={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},Kl={set(t,e,r){t!=null&&(t[e]=r)}}});var Wl,MN=w(()=>{Tc();Wl=class{active(){return _i}with(e,r,n,...o){return r.call(n,...o)}bind(e,r){return r}enable(){return this}disable(){return this}}});var xS,o6,tn,hc=w(()=>{MN();ms();hs();xS="context",o6=new Wl,tn=class t{constructor(){}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalContextManager(e){return Zr(xS,e,Ze.instance())}active(){return this._getContextManager().active()}with(e,r,n,...o){return this._getContextManager().with(e,r,n,...o)}bind(e,r){return this._getContextManager().bind(e,r)}_getContextManager(){return er(xS)||o6}disable(){this._getContextManager().disable(),en(xS,Ze.instance())}}});var lr,US=w(()=>{(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(lr||(lr={}))});var gc,gs,Xl,zl=w(()=>{US();gc="0000000000000000",gs="00000000000000000000000000000000",Xl={traceId:gs,spanId:gc,traceFlags:lr.NONE}});var rn,Ql=w(()=>{zl();rn=class{constructor(e=Xl){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,r){return this}setAttributes(e){return this}addEvent(e,r){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,r){}}});function Jl(t){return t.getValue(wS)||void 0}function vN(){return Jl(tn.getInstance().active())}function Ac(t,e){return t.setValue(wS,e)}function bN(t){return t.deleteValue(wS)}function LN(t,e){return Ac(t,new rn(e))}function Zl(t){var e;return(e=Jl(t))===null||e===void 0?void 0:e.spanContext()}var wS,VS=w(()=>{Tc();Ql();hc();wS=Lr("OpenTelemetry Context Key SPAN")});function DN(t,e){if(typeof t!="string"||t.length!==e)return!1;let r=0;for(let n=0;n<t.length;n+=4)r+=(ep[t.charCodeAt(n)]|0)+(ep[t.charCodeAt(n+1)]|0)+(ep[t.charCodeAt(n+2)]|0)+(ep[t.charCodeAt(n+3)]|0);return r===e}function BS(t){return DN(t,32)&&t!==gs}function GS(t){return DN(t,16)&&t!==gc}function xn(t){return BS(t.traceId)&&GS(t.spanId)}function xN(t){return new rn(t)}var ep,tp=w(()=>{zl();Ql();ep=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function s6(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}var HS,Ei,kS=w(()=>{hc();VS();Ql();tp();HS=tn.getInstance(),Ei=class{startSpan(e,r,n=HS.active()){if(!!r?.root)return new rn;let s=n&&Zl(n);return s6(s)&&xn(s)?new rn(s):new rn}startActiveSpan(e,r,n,o){let s,i,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);let c=i??HS.active(),u=this.startSpan(e,s,c),l=Ac(c,u);return HS.with(l,a,void 0,u)}}});var i6,fi,FS=w(()=>{kS();i6=new Ei,fi=class{constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}startSpan(e,r,n){return this._getTracer().startSpan(e,r,n)}startActiveSpan(e,r,n,o){let s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):i6}}});var rp,UN=w(()=>{kS();rp=class{getTracer(e,r,n){return new Ei}}});var a6,As,qS=w(()=>{FS();UN();a6=new rp,As=class{getTracer(e,r,n){var o;return(o=this.getDelegateTracer(e,r,n))!==null&&o!==void 0?o:new fi(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:a6}setDelegate(e){this._delegate=e}getDelegateTracer(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,r,n)}}});var np,wN=w(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(np||(np={}))});var ct,VN=w(()=>{(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(ct||(ct={}))});var fe,BN=w(()=>{(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(fe||(fe={}))});function GN(t){return l6.test(t)}function HN(t){return p6.test(t)&&!_6.test(t)}var jS,c6,u6,l6,p6,_6,kN=w(()=>{jS="[_0-9a-z-*/]",c6=`[a-z]${jS}{0,255}`,u6=`[a-z0-9]${jS}{0,240}@[a-z]${jS}{0,13}`,l6=new RegExp(`^(?:${c6}|${u6})$`),p6=/^[ -~]{0,255}[!-~]$/,_6=/,|=/});var FN,d6,qN,jN,op,YN=w(()=>{kN();FN=32,d6=512,qN=",",jN="=",op=class t{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return Array.from(this._internalState.keys()).reduceRight((e,r)=>(e.push(r+jN+this.get(r)),e),[]).join(qN)}_parse(e){e.length>d6||(this._internalState=e.split(qN).reduceRight((r,n)=>{let o=n.trim(),s=o.indexOf(jN);if(s!==-1){let i=o.slice(0,s),a=o.slice(s+1,n.length);GN(i)&&HN(a)&&r.set(i,a)}return r},new Map),this._internalState.size>FN&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,FN))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}}});function $N(t){return new op(t)}var KN=w(()=>{YN()});var F,WN=w(()=>{hc();F=tn.getInstance()});var tr,XN=w(()=>{hs();tr=Ze.instance()});var YS,zN,QN=w(()=>{LS();YS=class{getMeter(e,r,n){return bS}},zN=new YS});var $S,sp,JN=w(()=>{QN();ms();hs();$S="metrics",sp=class t{constructor(){}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalMeterProvider(e){return Zr($S,e,Ze.instance())}getMeterProvider(){return er($S)||zN}getMeter(e,r,n){return this.getMeterProvider().getMeter(e,r,n)}disable(){en($S,Ze.instance())}}});var KS,ZN=w(()=>{JN();KS=sp.getInstance()});var ip,eI=w(()=>{ip=class{inject(e,r){}extract(e,r){return e}fields(){return[]}}});function XS(t){return t.getValue(WS)||void 0}function tI(){return XS(tn.getInstance().active())}function rI(t,e){return t.setValue(WS,e)}function nI(t){return t.deleteValue(WS)}var WS,oI=w(()=>{hc();Tc();WS=Lr("OpenTelemetry Baggage Key")});var zS,E6,ap,sI=w(()=>{ms();eI();DS();oI();hS();hs();zS="propagation",E6=new ip,ap=class t{constructor(){this.createBaggage=NN,this.getBaggage=XS,this.getActiveBaggage=tI,this.setBaggage=rI,this.deleteBaggage=nI}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalPropagator(e){return Zr(zS,e,Ze.instance())}inject(e,r,n=Kl){return this._getGlobalPropagator().inject(e,r,n)}extract(e,r,n=$l){return this._getGlobalPropagator().extract(e,r,n)}fields(){return this._getGlobalPropagator().fields()}disable(){en(zS,Ze.instance())}_getGlobalPropagator(){return er(zS)||E6}}});var yt,iI=w(()=>{sI();yt=ap.getInstance()});var QS,cp,aI=w(()=>{ms();qS();tp();VS();hs();QS="trace",cp=class t{constructor(){this._proxyTracerProvider=new As,this.wrapSpanContext=xN,this.isSpanContextValid=xn,this.deleteSpan=bN,this.getSpan=Jl,this.getActiveSpan=vN,this.getSpanContext=Zl,this.setSpan=Ac,this.setSpanContext=LN}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalTracerProvider(e){let r=Zr(QS,this._proxyTracerProvider,Ze.instance());return r&&this._proxyTracerProvider.setDelegate(e),r}getTracerProvider(){return er(QS)||this._proxyTracerProvider}getTracer(e,r){return this.getTracerProvider().getTracer(e,r)}disable(){en(QS,Ze.instance()),this._proxyTracerProvider=new As}}});var K,cI=w(()=>{aI();K=cp.getInstance()});var U={};Qf(U,{DiagConsoleLogger:()=>jl,DiagLogLevel:()=>$e,INVALID_SPANID:()=>gc,INVALID_SPAN_CONTEXT:()=>Xl,INVALID_TRACEID:()=>gs,ProxyTracer:()=>fi,ProxyTracerProvider:()=>As,ROOT_CONTEXT:()=>_i,SamplingDecision:()=>np,SpanKind:()=>ct,SpanStatusCode:()=>fe,TraceFlags:()=>lr,ValueType:()=>Yl,baggageEntryMetadataFromString:()=>IN,context:()=>F,createContextKey:()=>Lr,createNoopMeter:()=>CN,createTraceState:()=>$N,default:()=>f6,defaultTextMapGetter:()=>$l,defaultTextMapSetter:()=>Kl,diag:()=>tr,isSpanContextValid:()=>xn,isValidSpanId:()=>GS,isValidTraceId:()=>BS,metrics:()=>KS,propagation:()=>yt,trace:()=>K});var f6,M=w(()=>{hS();Tc();PN();Fl();LS();yN();DS();FS();qS();wN();VN();BN();US();KN();tp();zl();WN();XN();ZN();iI();cI();f6={context:F,diag:tr,metrics:KS,propagation:yt,trace:K}});var Rc=E(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.isTracingSuppressed=uo.unsuppressTracing=uo.suppressTracing=void 0;var S6=(M(),P(U)),JS=(0,S6.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function T6(t){return t.setValue(JS,!0)}uo.suppressTracing=T6;function m6(t){return t.deleteValue(JS)}uo.unsuppressTracing=m6;function h6(t){return t.getValue(JS)===!0}uo.isTracingSuppressed=h6});var ZS=E(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.BAGGAGE_MAX_TOTAL_LENGTH=Et.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Et.BAGGAGE_MAX_NAME_VALUE_PAIRS=Et.BAGGAGE_HEADER=Et.BAGGAGE_ITEMS_SEPARATOR=Et.BAGGAGE_PROPERTIES_SEPARATOR=Et.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Et.BAGGAGE_KEY_PAIR_SEPARATOR="=";Et.BAGGAGE_PROPERTIES_SEPARATOR=";";Et.BAGGAGE_ITEMS_SEPARATOR=",";Et.BAGGAGE_HEADER="baggage";Et.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Et.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Et.BAGGAGE_MAX_TOTAL_LENGTH=8192});var eT=E(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.parseKeyPairsIntoRecord=nn.parsePairKeyValue=nn.getKeyPairs=nn.serializeKeyPairs=void 0;var g6=(M(),P(U)),Rs=ZS();function A6(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?Rs.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return n.length>Rs.BAGGAGE_MAX_TOTAL_LENGTH?e:n},"")}nn.serializeKeyPairs=A6;function R6(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=Rs.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),n})}nn.getKeyPairs=R6;function uI(t){let e=t.split(Rs.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf(Rs.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),i;return e.length>0&&(i=(0,g6.baggageEntryMetadataFromString)(e.join(Rs.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:s,metadata:i}}nn.parsePairKeyValue=uI;function O6(t){return typeof t!="string"||t.length===0?{}:t.split(Rs.BAGGAGE_ITEMS_SEPARATOR).map(e=>uI(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,r)=>(e[r.key]=r.value,e),{})}nn.parseKeyPairsIntoRecord=O6});var lI=E(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.W3CBaggagePropagator=void 0;var tT=(M(),P(U)),N6=Rc(),Os=ZS(),rT=eT(),nT=class{inject(e,r,n){let o=tT.propagation.getBaggage(e);if(!o||(0,N6.isTracingSuppressed)(e))return;let s=(0,rT.getKeyPairs)(o).filter(a=>a.length<=Os.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Os.BAGGAGE_MAX_NAME_VALUE_PAIRS),i=(0,rT.serializeKeyPairs)(s);i.length>0&&n.set(r,Os.BAGGAGE_HEADER,i)}extract(e,r,n){let o=n.get(r,Os.BAGGAGE_HEADER),s=Array.isArray(o)?o.join(Os.BAGGAGE_ITEMS_SEPARATOR):o;if(!s)return e;let i={};return s.length===0||(s.split(Os.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let u=(0,rT.parsePairKeyValue)(c);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),i[u.key]=l}}),Object.entries(i).length===0)?e:tT.propagation.setBaggage(e,tT.propagation.createBaggage(i))}fields(){return[Os.BAGGAGE_HEADER]}};up.W3CBaggagePropagator=nT});var pI=E(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.AnchoredClock=void 0;var oT=class{constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};lp.AnchoredClock=oT});var SI=E(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.isAttributeValue=lo.isAttributeKey=lo.sanitizeAttributes=void 0;var _I=(M(),P(U));function I6(t){let e={};if(typeof t!="object"||t==null)return e;for(let[r,n]of Object.entries(t)){if(!dI(r)){_I.diag.warn(`Invalid attribute key: ${r}`);continue}if(!EI(n)){_I.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}lo.sanitizeAttributes=I6;function dI(t){return typeof t=="string"&&t.length>0}lo.isAttributeKey=dI;function EI(t){return t==null?!0:Array.isArray(t)?P6(t):fI(t)}lo.isAttributeValue=EI;function P6(t){let e;for(let r of t)if(r!=null){if(!e){if(fI(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function fI(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}});var sT=E(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.loggingErrorHandler=void 0;var C6=(M(),P(U));function y6(){return t=>{C6.diag.error(M6(t))}}pp.loggingErrorHandler=y6;function M6(t){return typeof t=="string"?t:JSON.stringify(v6(t))}function v6(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}});var iT=E(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.globalErrorHandler=Si.setGlobalErrorHandler=void 0;var b6=sT(),TI=(0,b6.loggingErrorHandler)();function L6(t){TI=t}Si.setGlobalErrorHandler=L6;function D6(t){try{TI(t)}catch{}}Si.globalErrorHandler=D6});var aT=E(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.TracesSamplerValues=void 0;var x6;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(x6=Oc.TracesSamplerValues||(Oc.TracesSamplerValues={}))});var cT=E(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.parseEnvironment=Re.DEFAULT_ENVIRONMENT=Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT=Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var po=(M(),P(U)),U6=aT(),w6=",",V6=["OTEL_SDK_DISABLED"];function B6(t){return V6.indexOf(t)>-1}var G6=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function H6(t){return G6.indexOf(t)>-1}var k6=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function F6(t){return k6.indexOf(t)>-1}Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;Re.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:po.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:U6.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function q6(t,e,r){if(typeof r[t]>"u")return;let n=String(r[t]);e[t]=n.toLowerCase()==="true"}function j6(t,e,r,n=-1/0,o=1/0){if(typeof r[t]<"u"){let s=Number(r[t]);isNaN(s)||(s<n?e[t]=n:s>o?e[t]=o:e[t]=s)}}function Y6(t,e,r,n=w6){let o=r[t];typeof o=="string"&&(e[t]=o.split(n).map(s=>s.trim()))}var $6={ALL:po.DiagLogLevel.ALL,VERBOSE:po.DiagLogLevel.VERBOSE,DEBUG:po.DiagLogLevel.DEBUG,INFO:po.DiagLogLevel.INFO,WARN:po.DiagLogLevel.WARN,ERROR:po.DiagLogLevel.ERROR,NONE:po.DiagLogLevel.NONE};function K6(t,e,r){let n=r[t];if(typeof n=="string"){let o=$6[n.toUpperCase()];o!=null&&(e[t]=o)}}function W6(t){let e={};for(let r in Re.DEFAULT_ENVIRONMENT){let n=r;switch(n){case"OTEL_LOG_LEVEL":K6(n,e,t);break;default:if(B6(n))q6(n,e,t);else if(H6(n))j6(n,e,t);else if(F6(n))Y6(n,e,t);else{let o=t[n];typeof o<"u"&&o!==null&&(e[n]=String(o))}}}return e}Re.parseEnvironment=W6});var mI=E(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.getEnvWithoutDefaults=Ti.getEnv=void 0;var uT=cT();function X6(){let t=(0,uT.parseEnvironment)(process.env);return Object.assign({},uT.DEFAULT_ENVIRONMENT,t)}Ti.getEnv=X6;function z6(){return(0,uT.parseEnvironment)(process.env)}Ti.getEnvWithoutDefaults=z6});var hI=E(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p._globalThis=void 0;_p._globalThis=typeof globalThis=="object"?globalThis:global});var lT=E(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.hexToBinary=void 0;function gI(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Q6(t){let e=new Uint8Array(t.length/2),r=0;for(let n=0;n<t.length;n+=2){let o=gI(t.charCodeAt(n)),s=gI(t.charCodeAt(n+1));e[r++]=o<<4|s}return e}dp.hexToBinary=Q6});var AI=E(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.hexToBase64=void 0;var J6=lT();function Z6(t){return Buffer.from((0,J6.hexToBinary)(t)).toString("base64")}Ep.hexToBase64=Z6});var NI=E(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.RandomIdGenerator=void 0;var eQ=8,OI=16,pT=class{constructor(){this.generateTraceId=RI(OI),this.generateSpanId=RI(eQ)}};Sp.RandomIdGenerator=pT;var fp=Buffer.allocUnsafe(OI);function RI(t){return function(){for(let r=0;r<t/4;r++)fp.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(fp[r]>0);r++)r===t-1&&(fp[t-1]=1);return fp.toString("hex",0,t)}}});var II=E(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.otperformance=void 0;var tQ=require("perf_hooks");Tp.otperformance=tQ.performance});var _T=E(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.VERSION=void 0;mp.VERSION="1.30.1"});function Ue(t){for(var e={},r=t.length,n=0;n<r;n++){var o=t[n];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var dT=w(()=>{});var PI,CI,yI,MI,vI,bI,LI,DI,xI,UI,wI,VI,BI,GI,HI,kI,FI,qI,jI,YI,$I,KI,WI,XI,zI,QI,JI,ZI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,lP,pP,_P,dP,EP,fP,SP,TP,mP,hP,gP,AP,RP,OP,NP,IP,PP,CP,yP,MP,vP,bP,LP,DP,xP,UP,wP,VP,BP,GP,HP,kP,FP,qP,jP,YP,$P,KP,WP,XP,zP,QP,JP,ZP,eC,tC,rC,nC,oC,sC,iC,aC,cC,uC,lC,pC,_C,dC,EC,fC,SC,TC,mC,hC,gC,AC,RC,OC,NC,IC,PC,CC,yC,MC,vC,bC,LC,DC,xC,UC,wC,VC,BC,GC,HC,kC,FC,qC,jC,YC,rQ,nQ,oQ,sQ,iQ,aQ,cQ,uQ,lQ,pQ,_Q,dQ,EQ,fQ,SQ,TQ,mQ,hQ,gQ,AQ,RQ,OQ,NQ,IQ,PQ,CQ,yQ,MQ,vQ,bQ,LQ,DQ,xQ,UQ,wQ,VQ,BQ,GQ,HQ,kQ,FQ,qQ,jQ,YQ,$Q,KQ,WQ,XQ,zQ,QQ,JQ,ZQ,e9,t9,r9,n9,o9,s9,i9,a9,c9,u9,l9,p9,_9,d9,E9,f9,S9,T9,m9,h9,g9,A9,R9,O9,N9,I9,P9,C9,y9,M9,v9,b9,L9,D9,x9,U9,w9,V9,B9,G9,H9,k9,F9,q9,j9,Y9,$9,K9,W9,X9,z9,Q9,J9,Z9,eJ,tJ,rJ,nJ,oJ,sJ,iJ,aJ,cJ,uJ,lJ,pJ,_J,dJ,EJ,fJ,SJ,TJ,mJ,hJ,gJ,AJ,RJ,$C,KC,WC,XC,zC,QC,JC,ZC,ey,ty,ry,ny,oy,sy,iy,ay,cy,uy,ly,py,_y,dy,Ey,fy,Sy,Ty,my,hy,gy,Ay,Ry,Oy,Ny,Iy,Py,Cy,yy,My,vy,by,Ly,Dy,xy,Uy,wy,Vy,By,OJ,NJ,IJ,PJ,CJ,yJ,MJ,vJ,bJ,LJ,DJ,xJ,UJ,wJ,VJ,BJ,GJ,HJ,kJ,FJ,qJ,jJ,YJ,$J,KJ,WJ,XJ,zJ,QJ,JJ,ZJ,eZ,tZ,rZ,nZ,oZ,sZ,iZ,aZ,cZ,uZ,lZ,pZ,_Z,dZ,EZ,fZ,SZ,Gy,Hy,ky,Fy,qy,jy,Yy,$y,Ky,Wy,Xy,TZ,mZ,hZ,gZ,AZ,RZ,OZ,NZ,IZ,PZ,CZ,yZ,zy,Qy,Jy,Zy,eM,MZ,vZ,bZ,LZ,DZ,xZ,tM,rM,nM,UZ,wZ,VZ,BZ,oM,sM,iM,aM,GZ,HZ,kZ,FZ,qZ,cM,uM,lM,pM,_M,dM,EM,jZ,YZ,$Z,KZ,WZ,XZ,zZ,QZ,fM,SM,TM,mM,hM,JZ,ZZ,e7,t7,r7,n7,gM,AM,RM,OM,NM,IM,PM,CM,yM,MM,vM,bM,LM,DM,xM,UM,wM,VM,BM,GM,HM,o7,s7,i7,a7,c7,u7,l7,p7,_7,d7,E7,f7,S7,T7,m7,h7,g7,A7,R7,O7,N7,I7,kM,FM,qM,jM,YM,P7,C7,y7,M7,v7,b7,$M,KM,L7,D7,x7,WM,XM,U7,w7,V7,zM,QM,JM,ZM,ev,tv,rv,nv,ov,sv,iv,av,cv,uv,lv,pv,_v,B7,G7,H7,k7,F7,q7,j7,Y7,$7,K7,W7,X7,z7,Q7,J7,Z7,eee,tee,dv,Ev,ree,nee,oee,fv=w(()=>{dT();PI="aws.lambda.invoked_arn",CI="db.system",yI="db.connection_string",MI="db.user",vI="db.jdbc.driver_classname",bI="db.name",LI="db.statement",DI="db.operation",xI="db.mssql.instance_name",UI="db.cassandra.keyspace",wI="db.cassandra.page_size",VI="db.cassandra.consistency_level",BI="db.cassandra.table",GI="db.cassandra.idempotence",HI="db.cassandra.speculative_execution_count",kI="db.cassandra.coordinator.id",FI="db.cassandra.coordinator.dc",qI="db.hbase.namespace",jI="db.redis.database_index",YI="db.mongodb.collection",$I="db.sql.table",KI="exception.type",WI="exception.message",XI="exception.stacktrace",zI="exception.escaped",QI="faas.trigger",JI="faas.execution",ZI="faas.document.collection",eP="faas.document.operation",tP="faas.document.time",rP="faas.document.name",nP="faas.time",oP="faas.cron",sP="faas.coldstart",iP="faas.invoked_name",aP="faas.invoked_provider",cP="faas.invoked_region",uP="net.transport",lP="net.peer.ip",pP="net.peer.port",_P="net.peer.name",dP="net.host.ip",EP="net.host.port",fP="net.host.name",SP="net.host.connection.type",TP="net.host.connection.subtype",mP="net.host.carrier.name",hP="net.host.carrier.mcc",gP="net.host.carrier.mnc",AP="net.host.carrier.icc",RP="peer.service",OP="enduser.id",NP="enduser.role",IP="enduser.scope",PP="thread.id",CP="thread.name",yP="code.function",MP="code.namespace",vP="code.filepath",bP="code.lineno",LP="http.method",DP="http.url",xP="http.target",UP="http.host",wP="http.scheme",VP="http.status_code",BP="http.flavor",GP="http.user_agent",HP="http.request_content_length",kP="http.request_content_length_uncompressed",FP="http.response_content_length",qP="http.response_content_length_uncompressed",jP="http.server_name",YP="http.route",$P="http.client_ip",KP="aws.dynamodb.table_names",WP="aws.dynamodb.consumed_capacity",XP="aws.dynamodb.item_collection_metrics",zP="aws.dynamodb.provisioned_read_capacity",QP="aws.dynamodb.provisioned_write_capacity",JP="aws.dynamodb.consistent_read",ZP="aws.dynamodb.projection",eC="aws.dynamodb.limit",tC="aws.dynamodb.attributes_to_get",rC="aws.dynamodb.index_name",nC="aws.dynamodb.select",oC="aws.dynamodb.global_secondary_indexes",sC="aws.dynamodb.local_secondary_indexes",iC="aws.dynamodb.exclusive_start_table",aC="aws.dynamodb.table_count",cC="aws.dynamodb.scan_forward",uC="aws.dynamodb.segment",lC="aws.dynamodb.total_segments",pC="aws.dynamodb.count",_C="aws.dynamodb.scanned_count",dC="aws.dynamodb.attribute_definitions",EC="aws.dynamodb.global_secondary_index_updates",fC="messaging.system",SC="messaging.destination",TC="messaging.destination_kind",mC="messaging.temp_destination",hC="messaging.protocol",gC="messaging.protocol_version",AC="messaging.url",RC="messaging.message_id",OC="messaging.conversation_id",NC="messaging.message_payload_size_bytes",IC="messaging.message_payload_compressed_size_bytes",PC="messaging.operation",CC="messaging.consumer_id",yC="messaging.rabbitmq.routing_key",MC="messaging.kafka.message_key",vC="messaging.kafka.consumer_group",bC="messaging.kafka.client_id",LC="messaging.kafka.partition",DC="messaging.kafka.tombstone",xC="rpc.system",UC="rpc.service",wC="rpc.method",VC="rpc.grpc.status_code",BC="rpc.jsonrpc.version",GC="rpc.jsonrpc.request_id",HC="rpc.jsonrpc.error_code",kC="rpc.jsonrpc.error_message",FC="message.type",qC="message.id",jC="message.compressed_size",YC="message.uncompressed_size",rQ=PI,nQ=CI,oQ=yI,sQ=MI,iQ=vI,aQ=bI,cQ=LI,uQ=DI,lQ=xI,pQ=UI,_Q=wI,dQ=VI,EQ=BI,fQ=GI,SQ=HI,TQ=kI,mQ=FI,hQ=qI,gQ=jI,AQ=YI,RQ=$I,OQ=KI,NQ=WI,IQ=XI,PQ=zI,CQ=QI,yQ=JI,MQ=ZI,vQ=eP,bQ=tP,LQ=rP,DQ=nP,xQ=oP,UQ=sP,wQ=iP,VQ=aP,BQ=cP,GQ=uP,HQ=lP,kQ=pP,FQ=_P,qQ=dP,jQ=EP,YQ=fP,$Q=SP,KQ=TP,WQ=mP,XQ=hP,zQ=gP,QQ=AP,JQ=RP,ZQ=OP,e9=NP,t9=IP,r9=PP,n9=CP,o9=yP,s9=MP,i9=vP,a9=bP,c9=LP,u9=DP,l9=xP,p9=UP,_9=wP,d9=VP,E9=BP,f9=GP,S9=HP,T9=kP,m9=FP,h9=qP,g9=jP,A9=YP,R9=$P,O9=KP,N9=WP,I9=XP,P9=zP,C9=QP,y9=JP,M9=ZP,v9=eC,b9=tC,L9=rC,D9=nC,x9=oC,U9=sC,w9=iC,V9=aC,B9=cC,G9=uC,H9=lC,k9=pC,F9=_C,q9=dC,j9=EC,Y9=fC,$9=SC,K9=TC,W9=mC,X9=hC,z9=gC,Q9=AC,J9=RC,Z9=OC,eJ=NC,tJ=IC,rJ=PC,nJ=CC,oJ=yC,sJ=MC,iJ=vC,aJ=bC,cJ=LC,uJ=DC,lJ=xC,pJ=UC,_J=wC,dJ=VC,EJ=BC,fJ=GC,SJ=HC,TJ=kC,mJ=FC,hJ=qC,gJ=jC,AJ=YC,RJ=Ue([PI,CI,yI,MI,vI,bI,LI,DI,xI,UI,wI,VI,BI,GI,HI,kI,FI,qI,jI,YI,$I,KI,WI,XI,zI,QI,JI,ZI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,lP,pP,_P,dP,EP,fP,SP,TP,mP,hP,gP,AP,RP,OP,NP,IP,PP,CP,yP,MP,vP,bP,LP,DP,xP,UP,wP,VP,BP,GP,HP,kP,FP,qP,jP,YP,$P,KP,WP,XP,zP,QP,JP,ZP,eC,tC,rC,nC,oC,sC,iC,aC,cC,uC,lC,pC,_C,dC,EC,fC,SC,TC,mC,hC,gC,AC,RC,OC,NC,IC,PC,CC,yC,MC,vC,bC,LC,DC,xC,UC,wC,VC,BC,GC,HC,kC,FC,qC,jC,YC]),$C="other_sql",KC="mssql",WC="mysql",XC="oracle",zC="db2",QC="postgresql",JC="redshift",ZC="hive",ey="cloudscape",ty="hsqldb",ry="progress",ny="maxdb",oy="hanadb",sy="ingres",iy="firstsql",ay="edb",cy="cache",uy="adabas",ly="firebird",py="derby",_y="filemaker",dy="informix",Ey="instantdb",fy="interbase",Sy="mariadb",Ty="netezza",my="pervasive",hy="pointbase",gy="sqlite",Ay="sybase",Ry="teradata",Oy="vertica",Ny="h2",Iy="coldfusion",Py="cassandra",Cy="hbase",yy="mongodb",My="redis",vy="couchbase",by="couchdb",Ly="cosmosdb",Dy="dynamodb",xy="neo4j",Uy="geode",wy="elasticsearch",Vy="memcached",By="cockroachdb",OJ=$C,NJ=KC,IJ=WC,PJ=XC,CJ=zC,yJ=QC,MJ=JC,vJ=ZC,bJ=ey,LJ=ty,DJ=ry,xJ=ny,UJ=oy,wJ=sy,VJ=iy,BJ=ay,GJ=cy,HJ=uy,kJ=ly,FJ=py,qJ=_y,jJ=dy,YJ=Ey,$J=fy,KJ=Sy,WJ=Ty,XJ=my,zJ=hy,QJ=gy,JJ=Ay,ZJ=Ry,eZ=Oy,tZ=Ny,rZ=Iy,nZ=Py,oZ=Cy,sZ=yy,iZ=My,aZ=vy,cZ=by,uZ=Ly,lZ=Dy,pZ=xy,_Z=Uy,dZ=wy,EZ=Vy,fZ=By,SZ=Ue([$C,KC,WC,XC,zC,QC,JC,ZC,ey,ty,ry,ny,oy,sy,iy,ay,cy,uy,ly,py,_y,dy,Ey,fy,Sy,Ty,my,hy,gy,Ay,Ry,Oy,Ny,Iy,Py,Cy,yy,My,vy,by,Ly,Dy,xy,Uy,wy,Vy,By]),Gy="all",Hy="each_quorum",ky="quorum",Fy="local_quorum",qy="one",jy="two",Yy="three",$y="local_one",Ky="any",Wy="serial",Xy="local_serial",TZ=Gy,mZ=Hy,hZ=ky,gZ=Fy,AZ=qy,RZ=jy,OZ=Yy,NZ=$y,IZ=Ky,PZ=Wy,CZ=Xy,yZ=Ue([Gy,Hy,ky,Fy,qy,jy,Yy,$y,Ky,Wy,Xy]),zy="datasource",Qy="http",Jy="pubsub",Zy="timer",eM="other",MZ=zy,vZ=Qy,bZ=Jy,LZ=Zy,DZ=eM,xZ=Ue([zy,Qy,Jy,Zy,eM]),tM="insert",rM="edit",nM="delete",UZ=tM,wZ=rM,VZ=nM,BZ=Ue([tM,rM,nM]),oM="alibaba_cloud",sM="aws",iM="azure",aM="gcp",GZ=oM,HZ=sM,kZ=iM,FZ=aM,qZ=Ue([oM,sM,iM,aM]),cM="ip_tcp",uM="ip_udp",lM="ip",pM="unix",_M="pipe",dM="inproc",EM="other",jZ=cM,YZ=uM,$Z=lM,KZ=pM,WZ=_M,XZ=dM,zZ=EM,QZ=Ue([cM,uM,lM,pM,_M,dM,EM]),fM="wifi",SM="wired",TM="cell",mM="unavailable",hM="unknown",JZ=fM,ZZ=SM,e7=TM,t7=mM,r7=hM,n7=Ue([fM,SM,TM,mM,hM]),gM="gprs",AM="edge",RM="umts",OM="cdma",NM="evdo_0",IM="evdo_a",PM="cdma2000_1xrtt",CM="hsdpa",yM="hsupa",MM="hspa",vM="iden",bM="evdo_b",LM="lte",DM="ehrpd",xM="hspap",UM="gsm",wM="td_scdma",VM="iwlan",BM="nr",GM="nrnsa",HM="lte_ca",o7=gM,s7=AM,i7=RM,a7=OM,c7=NM,u7=IM,l7=PM,p7=CM,_7=yM,d7=MM,E7=vM,f7=bM,S7=LM,T7=DM,m7=xM,h7=UM,g7=wM,A7=VM,R7=BM,O7=GM,N7=HM,I7=Ue([gM,AM,RM,OM,NM,IM,PM,CM,yM,MM,vM,bM,LM,DM,xM,UM,wM,VM,BM,GM,HM]),kM="1.0",FM="1.1",qM="2.0",jM="SPDY",YM="QUIC",P7=kM,C7=FM,y7=qM,M7=jM,v7=YM,b7={HTTP_1_0:kM,HTTP_1_1:FM,HTTP_2_0:qM,SPDY:jM,QUIC:YM},$M="queue",KM="topic",L7=$M,D7=KM,x7=Ue([$M,KM]),WM="receive",XM="process",U7=WM,w7=XM,V7=Ue([WM,XM]),zM=0,QM=1,JM=2,ZM=3,ev=4,tv=5,rv=6,nv=7,ov=8,sv=9,iv=10,av=11,cv=12,uv=13,lv=14,pv=15,_v=16,B7=zM,G7=QM,H7=JM,k7=ZM,F7=ev,q7=tv,j7=rv,Y7=nv,$7=ov,K7=sv,W7=iv,X7=av,z7=cv,Q7=uv,J7=lv,Z7=pv,eee=_v,tee={OK:zM,CANCELLED:QM,UNKNOWN:JM,INVALID_ARGUMENT:ZM,DEADLINE_EXCEEDED:ev,NOT_FOUND:tv,ALREADY_EXISTS:rv,PERMISSION_DENIED:nv,RESOURCE_EXHAUSTED:ov,FAILED_PRECONDITION:sv,ABORTED:iv,OUT_OF_RANGE:av,UNIMPLEMENTED:cv,INTERNAL:uv,UNAVAILABLE:lv,DATA_LOSS:pv,UNAUTHENTICATED:_v},dv="SENT",Ev="RECEIVED",ree=dv,nee=Ev,oee=Ue([dv,Ev])});var Sv=w(()=>{fv()});var Tv,mv,hv,gv,Av,Rv,Ov,Nv,Iv,Pv,Cv,yv,Mv,vv,bv,Lv,Dv,xv,Uv,wv,Vv,Bv,Gv,Hv,kv,Fv,qv,jv,Yv,$v,Kv,Wv,Xv,zv,Qv,Jv,Zv,eb,tb,rb,nb,ob,sb,ib,ab,cb,ub,lb,pb,_b,db,Eb,fb,Sb,Tb,mb,hb,gb,Ab,Rb,Ob,Nb,Ib,Pb,Cb,yb,Mb,vb,bb,Lb,Db,xb,Ub,wb,Vb,Bb,Gb,Hb,kb,Fb,qb,see,iee,aee,cee,uee,lee,pee,_ee,dee,Eee,fee,See,Tee,mee,hee,gee,Aee,Ree,Oee,Nee,Iee,Pee,Cee,yee,Mee,vee,bee,Lee,Dee,xee,Uee,wee,Vee,Bee,Gee,Hee,kee,Fee,qee,jee,Yee,$ee,Kee,Wee,Xee,zee,Qee,Jee,Zee,ete,tte,rte,nte,ote,ste,ite,ate,cte,ute,lte,pte,_te,dte,Ete,fte,Ste,Tte,mte,hte,gte,Ate,Rte,Ote,Nte,Ite,Pte,Cte,yte,Mte,vte,bte,Lte,jb,Yb,$b,Kb,Dte,xte,Ute,wte,Vte,Wb,Xb,zb,Qb,Jb,Zb,eL,tL,rL,nL,oL,sL,iL,aL,cL,uL,lL,Bte,Gte,Hte,kte,Fte,qte,jte,Yte,$te,Kte,Wte,Xte,zte,Qte,Jte,Zte,ere,tre,pL,_L,rre,nre,ore,dL,EL,fL,SL,TL,mL,hL,sre,ire,are,cre,ure,lre,pre,_re,gL,AL,RL,OL,NL,IL,PL,CL,yL,ML,vL,dre,Ere,fre,Sre,Tre,mre,hre,gre,Are,Rre,Ore,Nre,bL,LL,DL,xL,UL,wL,VL,BL,GL,HL,Ire,Pre,Cre,yre,Mre,vre,bre,Lre,Dre,xre,Ure,kL=w(()=>{dT();Tv="cloud.provider",mv="cloud.account.id",hv="cloud.region",gv="cloud.availability_zone",Av="cloud.platform",Rv="aws.ecs.container.arn",Ov="aws.ecs.cluster.arn",Nv="aws.ecs.launchtype",Iv="aws.ecs.task.arn",Pv="aws.ecs.task.family",Cv="aws.ecs.task.revision",yv="aws.eks.cluster.arn",Mv="aws.log.group.names",vv="aws.log.group.arns",bv="aws.log.stream.names",Lv="aws.log.stream.arns",Dv="container.name",xv="container.id",Uv="container.runtime",wv="container.image.name",Vv="container.image.tag",Bv="deployment.environment",Gv="device.id",Hv="device.model.identifier",kv="device.model.name",Fv="faas.name",qv="faas.id",jv="faas.version",Yv="faas.instance",$v="faas.max_memory",Kv="host.id",Wv="host.name",Xv="host.type",zv="host.arch",Qv="host.image.name",Jv="host.image.id",Zv="host.image.version",eb="k8s.cluster.name",tb="k8s.node.name",rb="k8s.node.uid",nb="k8s.namespace.name",ob="k8s.pod.uid",sb="k8s.pod.name",ib="k8s.container.name",ab="k8s.replicaset.uid",cb="k8s.replicaset.name",ub="k8s.deployment.uid",lb="k8s.deployment.name",pb="k8s.statefulset.uid",_b="k8s.statefulset.name",db="k8s.daemonset.uid",Eb="k8s.daemonset.name",fb="k8s.job.uid",Sb="k8s.job.name",Tb="k8s.cronjob.uid",mb="k8s.cronjob.name",hb="os.type",gb="os.description",Ab="os.name",Rb="os.version",Ob="process.pid",Nb="process.executable.name",Ib="process.executable.path",Pb="process.command",Cb="process.command_line",yb="process.command_args",Mb="process.owner",vb="process.runtime.name",bb="process.runtime.version",Lb="process.runtime.description",Db="service.name",xb="service.namespace",Ub="service.instance.id",wb="service.version",Vb="telemetry.sdk.name",Bb="telemetry.sdk.language",Gb="telemetry.sdk.version",Hb="telemetry.auto.version",kb="webengine.name",Fb="webengine.version",qb="webengine.description",see=Tv,iee=mv,aee=hv,cee=gv,uee=Av,lee=Rv,pee=Ov,_ee=Nv,dee=Iv,Eee=Pv,fee=Cv,See=yv,Tee=Mv,mee=vv,hee=bv,gee=Lv,Aee=Dv,Ree=xv,Oee=Uv,Nee=wv,Iee=Vv,Pee=Bv,Cee=Gv,yee=Hv,Mee=kv,vee=Fv,bee=qv,Lee=jv,Dee=Yv,xee=$v,Uee=Kv,wee=Wv,Vee=Xv,Bee=zv,Gee=Qv,Hee=Jv,kee=Zv,Fee=eb,qee=tb,jee=rb,Yee=nb,$ee=ob,Kee=sb,Wee=ib,Xee=ab,zee=cb,Qee=ub,Jee=lb,Zee=pb,ete=_b,tte=db,rte=Eb,nte=fb,ote=Sb,ste=Tb,ite=mb,ate=hb,cte=gb,ute=Ab,lte=Rb,pte=Ob,_te=Nb,dte=Ib,Ete=Pb,fte=Cb,Ste=yb,Tte=Mb,mte=vb,hte=bb,gte=Lb,Ate=Db,Rte=xb,Ote=Ub,Nte=wb,Ite=Vb,Pte=Bb,Cte=Gb,yte=Hb,Mte=kb,vte=Fb,bte=qb,Lte=Ue([Tv,mv,hv,gv,Av,Rv,Ov,Nv,Iv,Pv,Cv,yv,Mv,vv,bv,Lv,Dv,xv,Uv,wv,Vv,Bv,Gv,Hv,kv,Fv,qv,jv,Yv,$v,Kv,Wv,Xv,zv,Qv,Jv,Zv,eb,tb,rb,nb,ob,sb,ib,ab,cb,ub,lb,pb,_b,db,Eb,fb,Sb,Tb,mb,hb,gb,Ab,Rb,Ob,Nb,Ib,Pb,Cb,yb,Mb,vb,bb,Lb,Db,xb,Ub,wb,Vb,Bb,Gb,Hb,kb,Fb,qb]),jb="alibaba_cloud",Yb="aws",$b="azure",Kb="gcp",Dte=jb,xte=Yb,Ute=$b,wte=Kb,Vte=Ue([jb,Yb,$b,Kb]),Wb="alibaba_cloud_ecs",Xb="alibaba_cloud_fc",zb="aws_ec2",Qb="aws_ecs",Jb="aws_eks",Zb="aws_lambda",eL="aws_elastic_beanstalk",tL="azure_vm",rL="azure_container_instances",nL="azure_aks",oL="azure_functions",sL="azure_app_service",iL="gcp_compute_engine",aL="gcp_cloud_run",cL="gcp_kubernetes_engine",uL="gcp_cloud_functions",lL="gcp_app_engine",Bte=Wb,Gte=Xb,Hte=zb,kte=Qb,Fte=Jb,qte=Zb,jte=eL,Yte=tL,$te=rL,Kte=nL,Wte=oL,Xte=sL,zte=iL,Qte=aL,Jte=cL,Zte=uL,ere=lL,tre=Ue([Wb,Xb,zb,Qb,Jb,Zb,eL,tL,rL,nL,oL,sL,iL,aL,cL,uL,lL]),pL="ec2",_L="fargate",rre=pL,nre=_L,ore=Ue([pL,_L]),dL="amd64",EL="arm32",fL="arm64",SL="ia64",TL="ppc32",mL="ppc64",hL="x86",sre=dL,ire=EL,are=fL,cre=SL,ure=TL,lre=mL,pre=hL,_re=Ue([dL,EL,fL,SL,TL,mL,hL]),gL="windows",AL="linux",RL="darwin",OL="freebsd",NL="netbsd",IL="openbsd",PL="dragonflybsd",CL="hpux",yL="aix",ML="solaris",vL="z_os",dre=gL,Ere=AL,fre=RL,Sre=OL,Tre=NL,mre=IL,hre=PL,gre=CL,Are=yL,Rre=ML,Ore=vL,Nre=Ue([gL,AL,RL,OL,NL,IL,PL,CL,yL,ML,vL]),bL="cpp",LL="dotnet",DL="erlang",xL="go",UL="java",wL="nodejs",VL="php",BL="python",GL="ruby",HL="webjs",Ire=bL,Pre=LL,Cre=DL,yre=xL,Mre=UL,vre=wL,bre=VL,Lre=BL,Dre=GL,xre=HL,Ure=Ue([bL,LL,DL,xL,UL,wL,VL,BL,GL,HL])});var FL=w(()=>{kL()});var wre,Vre,Bre,Gre,Hre,kre,Fre,qre,jre,Yre,$re,Kre,Wre,Xre,zre,Qre,Jre,Zre,ene,tne,rne,nne,one,sne,ine,ane,cne,une,lne,pne,_ne,dne,Ene,fne,Sne,Tne,mne,hne,gne,Ane,Rne,One,Nne,Ine,Pne,Cne,yne,Mne,vne,bne,Lne,Dne,xne,Une,wne,Vne,Bne,Gne,Hne,kne,Fne,qne,jne,Yne,$ne,Kne,Wne,Xne,zne,Qne,Jne,Zne,eoe,toe,roe,noe,ooe,soe,ioe,aoe,coe,uoe,loe,poe,_oe,doe,Eoe,foe,Soe,Toe,moe,hoe,goe,Aoe,Roe,Ooe,Noe,Ioe,Poe,Coe,yoe,Moe,voe,boe,Loe,Doe,xoe,Uoe,woe,Voe,qL=w(()=>{wre="aspnetcore.rate_limiting.result",Vre="acquired",Bre="endpoint_limiter",Gre="global_limiter",Hre="request_canceled",kre="telemetry.sdk.language",Fre="cpp",qre="dotnet",jre="erlang",Yre="go",$re="java",Kre="nodejs",Wre="php",Xre="python",zre="ruby",Qre="rust",Jre="swift",Zre="webjs",ene="telemetry.sdk.name",tne="telemetry.sdk.version",rne="aspnetcore.diagnostics.handler.type",nne="aspnetcore.diagnostics.exception.result",one="aborted",sne="handled",ine="skipped",ane="unhandled",cne="aspnetcore.rate_limiting.policy",une="aspnetcore.request.is_unhandled",lne="aspnetcore.routing.is_fallback",pne="aspnetcore.routing.match_status",_ne="failure",dne="success",Ene="client.address",fne="client.port",Sne="error.type",Tne="_OTHER",mne="exception.escaped",hne="exception.message",gne="exception.stacktrace",Ane="exception.type",Rne=function(t){return"http.request.header."+t},One="http.request.method",Nne="_OTHER",Ine="CONNECT",Pne="DELETE",Cne="GET",yne="HEAD",Mne="OPTIONS",vne="PATCH",bne="POST",Lne="PUT",Dne="TRACE",xne="http.request.method_original",Une="http.request.resend_count",wne=function(t){return"http.response.header."+t},Vne="http.response.status_code",Bne="http.route",Gne="jvm.gc.action",Hne="jvm.gc.name",kne="jvm.memory.pool.name",Fne="jvm.memory.type",qne="heap",jne="non_heap",Yne="jvm.thread.daemon",$ne="jvm.thread.state",Kne="blocked",Wne="new",Xne="runnable",zne="terminated",Qne="timed_waiting",Jne="waiting",Zne="network.local.address",eoe="network.local.port",toe="network.peer.address",roe="network.peer.port",noe="network.protocol.name",ooe="network.protocol.version",soe="network.transport",ioe="pipe",aoe="quic",coe="tcp",uoe="udp",loe="unix",poe="network.type",_oe="ipv4",doe="ipv6",Eoe="otel.scope.name",foe="otel.scope.version",Soe="otel.status_code",Toe="ERROR",moe="OK",hoe="otel.status_description",goe="server.address",Aoe="server.port",Roe="service.name",Ooe="service.version",Noe="signalr.connection.status",Ioe="app_shutdown",Poe="normal_closure",Coe="timeout",yoe="signalr.transport",Moe="long_polling",voe="server_sent_events",boe="web_sockets",Loe="url.fragment",Doe="url.full",xoe="url.path",Uoe="url.query",woe="url.scheme",Voe="user_agent.original"});var Boe,Goe,Hoe,koe,Foe,qoe,joe,Yoe,$oe,Koe,Woe,Xoe,zoe,Qoe,Joe,Zoe,ese,tse,rse,nse,ose,sse,ise,ase,cse,use,lse,pse,_se,dse,Ese,jL=w(()=>{Boe="aspnetcore.diagnostics.exceptions",Goe="aspnetcore.rate_limiting.active_request_leases",Hoe="aspnetcore.rate_limiting.queued_requests",koe="aspnetcore.rate_limiting.request.time_in_queue",Foe="aspnetcore.rate_limiting.request_lease.duration",qoe="aspnetcore.rate_limiting.requests",joe="aspnetcore.routing.match_attempts",Yoe="http.client.request.duration",$oe="http.server.request.duration",Koe="jvm.class.count",Woe="jvm.class.loaded",Xoe="jvm.class.unloaded",zoe="jvm.cpu.count",Qoe="jvm.cpu.recent_utilization",Joe="jvm.cpu.time",Zoe="jvm.gc.duration",ese="jvm.memory.committed",tse="jvm.memory.limit",rse="jvm.memory.used",nse="jvm.memory.used_after_last_gc",ose="jvm.thread.count",sse="kestrel.active_connections",ise="kestrel.active_tls_handshakes",ase="kestrel.connection.duration",cse="kestrel.queued_connections",use="kestrel.queued_requests",lse="kestrel.rejected_connections",pse="kestrel.tls_handshake.duration",_se="kestrel.upgraded_connections",dse="signalr.server.active_connections",Ese="signalr.server.connection.duration"});var pr={};Qf(pr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>one,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>sne,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>ine,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>ane,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Vre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Bre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Gre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Hre,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>_ne,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>dne,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>nne,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>rne,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>cne,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>wre,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>une,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>lne,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>pne,ATTR_CLIENT_ADDRESS:()=>Ene,ATTR_CLIENT_PORT:()=>fne,ATTR_ERROR_TYPE:()=>Sne,ATTR_EXCEPTION_ESCAPED:()=>mne,ATTR_EXCEPTION_MESSAGE:()=>hne,ATTR_EXCEPTION_STACKTRACE:()=>gne,ATTR_EXCEPTION_TYPE:()=>Ane,ATTR_HTTP_REQUEST_HEADER:()=>Rne,ATTR_HTTP_REQUEST_METHOD:()=>One,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>xne,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Une,ATTR_HTTP_RESPONSE_HEADER:()=>wne,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Vne,ATTR_HTTP_ROUTE:()=>Bne,ATTR_JVM_GC_ACTION:()=>Gne,ATTR_JVM_GC_NAME:()=>Hne,ATTR_JVM_MEMORY_POOL_NAME:()=>kne,ATTR_JVM_MEMORY_TYPE:()=>Fne,ATTR_JVM_THREAD_DAEMON:()=>Yne,ATTR_JVM_THREAD_STATE:()=>$ne,ATTR_NETWORK_LOCAL_ADDRESS:()=>Zne,ATTR_NETWORK_LOCAL_PORT:()=>eoe,ATTR_NETWORK_PEER_ADDRESS:()=>toe,ATTR_NETWORK_PEER_PORT:()=>roe,ATTR_NETWORK_PROTOCOL_NAME:()=>noe,ATTR_NETWORK_PROTOCOL_VERSION:()=>ooe,ATTR_NETWORK_TRANSPORT:()=>soe,ATTR_NETWORK_TYPE:()=>poe,ATTR_OTEL_SCOPE_NAME:()=>Eoe,ATTR_OTEL_SCOPE_VERSION:()=>foe,ATTR_OTEL_STATUS_CODE:()=>Soe,ATTR_OTEL_STATUS_DESCRIPTION:()=>hoe,ATTR_SERVER_ADDRESS:()=>goe,ATTR_SERVER_PORT:()=>Aoe,ATTR_SERVICE_NAME:()=>Roe,ATTR_SERVICE_VERSION:()=>Ooe,ATTR_SIGNALR_CONNECTION_STATUS:()=>Noe,ATTR_SIGNALR_TRANSPORT:()=>yoe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>kre,ATTR_TELEMETRY_SDK_NAME:()=>ene,ATTR_TELEMETRY_SDK_VERSION:()=>tne,ATTR_URL_FRAGMENT:()=>Loe,ATTR_URL_FULL:()=>Doe,ATTR_URL_PATH:()=>xoe,ATTR_URL_QUERY:()=>Uoe,ATTR_URL_SCHEME:()=>woe,ATTR_USER_AGENT_ORIGINAL:()=>Voe,AWSECSLAUNCHTYPEVALUES_EC2:()=>rre,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>nre,AwsEcsLaunchtypeValues:()=>ore,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Bte,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Gte,CLOUDPLATFORMVALUES_AWS_EC2:()=>Hte,CLOUDPLATFORMVALUES_AWS_ECS:()=>kte,CLOUDPLATFORMVALUES_AWS_EKS:()=>Fte,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>jte,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>qte,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Kte,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Xte,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>$te,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Wte,CLOUDPLATFORMVALUES_AZURE_VM:()=>Yte,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>ere,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Zte,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Qte,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>zte,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Jte,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Dte,CLOUDPROVIDERVALUES_AWS:()=>xte,CLOUDPROVIDERVALUES_AZURE:()=>Ute,CLOUDPROVIDERVALUES_GCP:()=>wte,CloudPlatformValues:()=>tre,CloudProviderValues:()=>Vte,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>TZ,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>IZ,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>mZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>NZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>gZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>CZ,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>AZ,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>hZ,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>PZ,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>OZ,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>RZ,DBSYSTEMVALUES_ADABAS:()=>HJ,DBSYSTEMVALUES_CACHE:()=>GJ,DBSYSTEMVALUES_CASSANDRA:()=>nZ,DBSYSTEMVALUES_CLOUDSCAPE:()=>bJ,DBSYSTEMVALUES_COCKROACHDB:()=>fZ,DBSYSTEMVALUES_COLDFUSION:()=>rZ,DBSYSTEMVALUES_COSMOSDB:()=>uZ,DBSYSTEMVALUES_COUCHBASE:()=>aZ,DBSYSTEMVALUES_COUCHDB:()=>cZ,DBSYSTEMVALUES_DB2:()=>CJ,DBSYSTEMVALUES_DERBY:()=>FJ,DBSYSTEMVALUES_DYNAMODB:()=>lZ,DBSYSTEMVALUES_EDB:()=>BJ,DBSYSTEMVALUES_ELASTICSEARCH:()=>dZ,DBSYSTEMVALUES_FILEMAKER:()=>qJ,DBSYSTEMVALUES_FIREBIRD:()=>kJ,DBSYSTEMVALUES_FIRSTSQL:()=>VJ,DBSYSTEMVALUES_GEODE:()=>_Z,DBSYSTEMVALUES_H2:()=>tZ,DBSYSTEMVALUES_HANADB:()=>UJ,DBSYSTEMVALUES_HBASE:()=>oZ,DBSYSTEMVALUES_HIVE:()=>vJ,DBSYSTEMVALUES_HSQLDB:()=>LJ,DBSYSTEMVALUES_INFORMIX:()=>jJ,DBSYSTEMVALUES_INGRES:()=>wJ,DBSYSTEMVALUES_INSTANTDB:()=>YJ,DBSYSTEMVALUES_INTERBASE:()=>$J,DBSYSTEMVALUES_MARIADB:()=>KJ,DBSYSTEMVALUES_MAXDB:()=>xJ,DBSYSTEMVALUES_MEMCACHED:()=>EZ,DBSYSTEMVALUES_MONGODB:()=>sZ,DBSYSTEMVALUES_MSSQL:()=>NJ,DBSYSTEMVALUES_MYSQL:()=>IJ,DBSYSTEMVALUES_NEO4J:()=>pZ,DBSYSTEMVALUES_NETEZZA:()=>WJ,DBSYSTEMVALUES_ORACLE:()=>PJ,DBSYSTEMVALUES_OTHER_SQL:()=>OJ,DBSYSTEMVALUES_PERVASIVE:()=>XJ,DBSYSTEMVALUES_POINTBASE:()=>zJ,DBSYSTEMVALUES_POSTGRESQL:()=>yJ,DBSYSTEMVALUES_PROGRESS:()=>DJ,DBSYSTEMVALUES_REDIS:()=>iZ,DBSYSTEMVALUES_REDSHIFT:()=>MJ,DBSYSTEMVALUES_SQLITE:()=>QJ,DBSYSTEMVALUES_SYBASE:()=>JJ,DBSYSTEMVALUES_TERADATA:()=>ZJ,DBSYSTEMVALUES_VERTICA:()=>eZ,DbCassandraConsistencyLevelValues:()=>yZ,DbSystemValues:()=>SZ,ERROR_TYPE_VALUE_OTHER:()=>Tne,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>VZ,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>wZ,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>UZ,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>GZ,FAASINVOKEDPROVIDERVALUES_AWS:()=>HZ,FAASINVOKEDPROVIDERVALUES_AZURE:()=>kZ,FAASINVOKEDPROVIDERVALUES_GCP:()=>FZ,FAASTRIGGERVALUES_DATASOURCE:()=>MZ,FAASTRIGGERVALUES_HTTP:()=>vZ,FAASTRIGGERVALUES_OTHER:()=>DZ,FAASTRIGGERVALUES_PUBSUB:()=>bZ,FAASTRIGGERVALUES_TIMER:()=>LZ,FaasDocumentOperationValues:()=>BZ,FaasInvokedProviderValues:()=>qZ,FaasTriggerValues:()=>xZ,HOSTARCHVALUES_AMD64:()=>sre,HOSTARCHVALUES_ARM32:()=>ire,HOSTARCHVALUES_ARM64:()=>are,HOSTARCHVALUES_IA64:()=>cre,HOSTARCHVALUES_PPC32:()=>ure,HOSTARCHVALUES_PPC64:()=>lre,HOSTARCHVALUES_X86:()=>pre,HTTPFLAVORVALUES_HTTP_1_0:()=>P7,HTTPFLAVORVALUES_HTTP_1_1:()=>C7,HTTPFLAVORVALUES_HTTP_2_0:()=>y7,HTTPFLAVORVALUES_QUIC:()=>v7,HTTPFLAVORVALUES_SPDY:()=>M7,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Ine,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Pne,HTTP_REQUEST_METHOD_VALUE_GET:()=>Cne,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>yne,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Mne,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Nne,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>vne,HTTP_REQUEST_METHOD_VALUE_POST:()=>bne,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Lne,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Dne,HostArchValues:()=>_re,HttpFlavorValues:()=>b7,JVM_MEMORY_TYPE_VALUE_HEAP:()=>qne,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>jne,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Kne,JVM_THREAD_STATE_VALUE_NEW:()=>Wne,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Xne,JVM_THREAD_STATE_VALUE_TERMINATED:()=>zne,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Qne,JVM_THREAD_STATE_VALUE_WAITING:()=>Jne,MESSAGETYPEVALUES_RECEIVED:()=>nee,MESSAGETYPEVALUES_SENT:()=>ree,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>L7,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>D7,MESSAGINGOPERATIONVALUES_PROCESS:()=>w7,MESSAGINGOPERATIONVALUES_RECEIVE:()=>U7,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Boe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Goe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Hoe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>qoe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Foe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>koe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>joe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Yoe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>$oe,METRIC_JVM_CLASS_COUNT:()=>Koe,METRIC_JVM_CLASS_LOADED:()=>Woe,METRIC_JVM_CLASS_UNLOADED:()=>Xoe,METRIC_JVM_CPU_COUNT:()=>zoe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Qoe,METRIC_JVM_CPU_TIME:()=>Joe,METRIC_JVM_GC_DURATION:()=>Zoe,METRIC_JVM_MEMORY_COMMITTED:()=>ese,METRIC_JVM_MEMORY_LIMIT:()=>tse,METRIC_JVM_MEMORY_USED:()=>rse,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>nse,METRIC_JVM_THREAD_COUNT:()=>ose,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>sse,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>ise,METRIC_KESTREL_CONNECTION_DURATION:()=>ase,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>cse,METRIC_KESTREL_QUEUED_REQUESTS:()=>use,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>lse,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>pse,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>_se,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>dse,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ese,MessageTypeValues:()=>oee,MessagingDestinationKindValues:()=>x7,MessagingOperationValues:()=>V7,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>a7,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>l7,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>s7,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>T7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>c7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>u7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>f7,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>o7,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>h7,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>p7,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>d7,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>m7,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>_7,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>E7,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>A7,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>S7,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>N7,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>R7,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>O7,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>g7,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>i7,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>e7,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>t7,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>r7,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>JZ,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>ZZ,NETTRANSPORTVALUES_INPROC:()=>XZ,NETTRANSPORTVALUES_IP:()=>$Z,NETTRANSPORTVALUES_IP_TCP:()=>jZ,NETTRANSPORTVALUES_IP_UDP:()=>YZ,NETTRANSPORTVALUES_OTHER:()=>zZ,NETTRANSPORTVALUES_PIPE:()=>WZ,NETTRANSPORTVALUES_UNIX:()=>KZ,NETWORK_TRANSPORT_VALUE_PIPE:()=>ioe,NETWORK_TRANSPORT_VALUE_QUIC:()=>aoe,NETWORK_TRANSPORT_VALUE_TCP:()=>coe,NETWORK_TRANSPORT_VALUE_UDP:()=>uoe,NETWORK_TRANSPORT_VALUE_UNIX:()=>loe,NETWORK_TYPE_VALUE_IPV4:()=>_oe,NETWORK_TYPE_VALUE_IPV6:()=>doe,NetHostConnectionSubtypeValues:()=>I7,NetHostConnectionTypeValues:()=>n7,NetTransportValues:()=>QZ,OSTYPEVALUES_AIX:()=>Are,OSTYPEVALUES_DARWIN:()=>fre,OSTYPEVALUES_DRAGONFLYBSD:()=>hre,OSTYPEVALUES_FREEBSD:()=>Sre,OSTYPEVALUES_HPUX:()=>gre,OSTYPEVALUES_LINUX:()=>Ere,OSTYPEVALUES_NETBSD:()=>Tre,OSTYPEVALUES_OPENBSD:()=>mre,OSTYPEVALUES_SOLARIS:()=>Rre,OSTYPEVALUES_WINDOWS:()=>dre,OSTYPEVALUES_Z_OS:()=>Ore,OTEL_STATUS_CODE_VALUE_ERROR:()=>Toe,OTEL_STATUS_CODE_VALUE_OK:()=>moe,OsTypeValues:()=>Nre,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>W7,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>j7,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>G7,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Z7,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>F7,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>K7,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Q7,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>k7,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>q7,RPCGRPCSTATUSCODEVALUES_OK:()=>B7,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>X7,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Y7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>$7,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>eee,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>J7,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>z7,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>H7,RpcGrpcStatusCodeValues:()=>tee,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>b9,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>q9,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>y9,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>N9,SEMATTRS_AWS_DYNAMODB_COUNT:()=>k9,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>w9,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>x9,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>j9,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>L9,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>I9,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>v9,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>U9,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>M9,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>P9,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>C9,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>F9,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>B9,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>G9,SEMATTRS_AWS_DYNAMODB_SELECT:()=>D9,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>V9,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>O9,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>H9,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>rQ,SEMATTRS_CODE_FILEPATH:()=>i9,SEMATTRS_CODE_FUNCTION:()=>o9,SEMATTRS_CODE_LINENO:()=>a9,SEMATTRS_CODE_NAMESPACE:()=>s9,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>dQ,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>mQ,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>TQ,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>fQ,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>pQ,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>_Q,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>SQ,SEMATTRS_DB_CASSANDRA_TABLE:()=>EQ,SEMATTRS_DB_CONNECTION_STRING:()=>oQ,SEMATTRS_DB_HBASE_NAMESPACE:()=>hQ,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>iQ,SEMATTRS_DB_MONGODB_COLLECTION:()=>AQ,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>lQ,SEMATTRS_DB_NAME:()=>aQ,SEMATTRS_DB_OPERATION:()=>uQ,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>gQ,SEMATTRS_DB_SQL_TABLE:()=>RQ,SEMATTRS_DB_STATEMENT:()=>cQ,SEMATTRS_DB_SYSTEM:()=>nQ,SEMATTRS_DB_USER:()=>sQ,SEMATTRS_ENDUSER_ID:()=>ZQ,SEMATTRS_ENDUSER_ROLE:()=>e9,SEMATTRS_ENDUSER_SCOPE:()=>t9,SEMATTRS_EXCEPTION_ESCAPED:()=>PQ,SEMATTRS_EXCEPTION_MESSAGE:()=>NQ,SEMATTRS_EXCEPTION_STACKTRACE:()=>IQ,SEMATTRS_EXCEPTION_TYPE:()=>OQ,SEMATTRS_FAAS_COLDSTART:()=>UQ,SEMATTRS_FAAS_CRON:()=>xQ,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>MQ,SEMATTRS_FAAS_DOCUMENT_NAME:()=>LQ,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>vQ,SEMATTRS_FAAS_DOCUMENT_TIME:()=>bQ,SEMATTRS_FAAS_EXECUTION:()=>yQ,SEMATTRS_FAAS_INVOKED_NAME:()=>wQ,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>VQ,SEMATTRS_FAAS_INVOKED_REGION:()=>BQ,SEMATTRS_FAAS_TIME:()=>DQ,SEMATTRS_FAAS_TRIGGER:()=>CQ,SEMATTRS_HTTP_CLIENT_IP:()=>R9,SEMATTRS_HTTP_FLAVOR:()=>E9,SEMATTRS_HTTP_HOST:()=>p9,SEMATTRS_HTTP_METHOD:()=>c9,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>S9,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>T9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>m9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>h9,SEMATTRS_HTTP_ROUTE:()=>A9,SEMATTRS_HTTP_SCHEME:()=>_9,SEMATTRS_HTTP_SERVER_NAME:()=>g9,SEMATTRS_HTTP_STATUS_CODE:()=>d9,SEMATTRS_HTTP_TARGET:()=>l9,SEMATTRS_HTTP_URL:()=>u9,SEMATTRS_HTTP_USER_AGENT:()=>f9,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>gJ,SEMATTRS_MESSAGE_ID:()=>hJ,SEMATTRS_MESSAGE_TYPE:()=>mJ,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>AJ,SEMATTRS_MESSAGING_CONSUMER_ID:()=>nJ,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Z9,SEMATTRS_MESSAGING_DESTINATION:()=>$9,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>K9,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>aJ,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>iJ,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>sJ,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>cJ,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>uJ,SEMATTRS_MESSAGING_MESSAGE_ID:()=>J9,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>tJ,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>eJ,SEMATTRS_MESSAGING_OPERATION:()=>rJ,SEMATTRS_MESSAGING_PROTOCOL:()=>X9,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>z9,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>oJ,SEMATTRS_MESSAGING_SYSTEM:()=>Y9,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>W9,SEMATTRS_MESSAGING_URL:()=>Q9,SEMATTRS_NET_HOST_CARRIER_ICC:()=>QQ,SEMATTRS_NET_HOST_CARRIER_MCC:()=>XQ,SEMATTRS_NET_HOST_CARRIER_MNC:()=>zQ,SEMATTRS_NET_HOST_CARRIER_NAME:()=>WQ,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>KQ,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>$Q,SEMATTRS_NET_HOST_IP:()=>qQ,SEMATTRS_NET_HOST_NAME:()=>YQ,SEMATTRS_NET_HOST_PORT:()=>jQ,SEMATTRS_NET_PEER_IP:()=>HQ,SEMATTRS_NET_PEER_NAME:()=>FQ,SEMATTRS_NET_PEER_PORT:()=>kQ,SEMATTRS_NET_TRANSPORT:()=>GQ,SEMATTRS_PEER_SERVICE:()=>JQ,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dJ,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>SJ,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>TJ,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>fJ,SEMATTRS_RPC_JSONRPC_VERSION:()=>EJ,SEMATTRS_RPC_METHOD:()=>_J,SEMATTRS_RPC_SERVICE:()=>pJ,SEMATTRS_RPC_SYSTEM:()=>lJ,SEMATTRS_THREAD_ID:()=>r9,SEMATTRS_THREAD_NAME:()=>n9,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>pee,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>lee,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>_ee,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>dee,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Eee,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>fee,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>See,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>mee,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Tee,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>gee,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>hee,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>iee,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>cee,SEMRESATTRS_CLOUD_PLATFORM:()=>uee,SEMRESATTRS_CLOUD_PROVIDER:()=>see,SEMRESATTRS_CLOUD_REGION:()=>aee,SEMRESATTRS_CONTAINER_ID:()=>Ree,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Nee,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Iee,SEMRESATTRS_CONTAINER_NAME:()=>Aee,SEMRESATTRS_CONTAINER_RUNTIME:()=>Oee,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Pee,SEMRESATTRS_DEVICE_ID:()=>Cee,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>yee,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Mee,SEMRESATTRS_FAAS_ID:()=>bee,SEMRESATTRS_FAAS_INSTANCE:()=>Dee,SEMRESATTRS_FAAS_MAX_MEMORY:()=>xee,SEMRESATTRS_FAAS_NAME:()=>vee,SEMRESATTRS_FAAS_VERSION:()=>Lee,SEMRESATTRS_HOST_ARCH:()=>Bee,SEMRESATTRS_HOST_ID:()=>Uee,SEMRESATTRS_HOST_IMAGE_ID:()=>Hee,SEMRESATTRS_HOST_IMAGE_NAME:()=>Gee,SEMRESATTRS_HOST_IMAGE_VERSION:()=>kee,SEMRESATTRS_HOST_NAME:()=>wee,SEMRESATTRS_HOST_TYPE:()=>Vee,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Fee,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Wee,SEMRESATTRS_K8S_CRONJOB_NAME:()=>ite,SEMRESATTRS_K8S_CRONJOB_UID:()=>ste,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>rte,SEMRESATTRS_K8S_DAEMONSET_UID:()=>tte,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Jee,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Qee,SEMRESATTRS_K8S_JOB_NAME:()=>ote,SEMRESATTRS_K8S_JOB_UID:()=>nte,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Yee,SEMRESATTRS_K8S_NODE_NAME:()=>qee,SEMRESATTRS_K8S_NODE_UID:()=>jee,SEMRESATTRS_K8S_POD_NAME:()=>Kee,SEMRESATTRS_K8S_POD_UID:()=>$ee,SEMRESATTRS_K8S_REPLICASET_NAME:()=>zee,SEMRESATTRS_K8S_REPLICASET_UID:()=>Xee,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>ete,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Zee,SEMRESATTRS_OS_DESCRIPTION:()=>cte,SEMRESATTRS_OS_NAME:()=>ute,SEMRESATTRS_OS_TYPE:()=>ate,SEMRESATTRS_OS_VERSION:()=>lte,SEMRESATTRS_PROCESS_COMMAND:()=>Ete,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Ste,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>fte,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>_te,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>dte,SEMRESATTRS_PROCESS_OWNER:()=>Tte,SEMRESATTRS_PROCESS_PID:()=>pte,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>gte,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>mte,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>hte,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Ote,SEMRESATTRS_SERVICE_NAME:()=>Ate,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rte,SEMRESATTRS_SERVICE_VERSION:()=>Nte,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>yte,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Pte,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Ite,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Cte,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>bte,SEMRESATTRS_WEBENGINE_NAME:()=>Mte,SEMRESATTRS_WEBENGINE_VERSION:()=>vte,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Ioe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Poe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Coe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Moe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>voe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>boe,SemanticAttributes:()=>RJ,SemanticResourceAttributes:()=>Lte,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Ire,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Pre,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Cre,TELEMETRYSDKLANGUAGEVALUES_GO:()=>yre,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Mre,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>vre,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>bre,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Lre,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Dre,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xre,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Fre,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>qre,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>jre,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Yre,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>$re,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Kre,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Wre,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Xre,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>zre,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Qre,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Jre,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Zre,TelemetrySdkLanguageValues:()=>Ure});var _r=w(()=>{Sv();FL();qL();jL()});var YL=E(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.SDK_INFO=void 0;var fse=_T(),Nc=(_r(),P(pr));hp.SDK_INFO={[Nc.SEMRESATTRS_TELEMETRY_SDK_NAME]:"opentelemetry",[Nc.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"node",[Nc.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]:Nc.TELEMETRYSDKLANGUAGEVALUES_NODEJS,[Nc.SEMRESATTRS_TELEMETRY_SDK_VERSION]:fse.VERSION}});var $L=E(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.unrefTimer=void 0;function Sse(t){t.unref()}gp.unrefTimer=Sse});var WL=E(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.unrefTimer=et.SDK_INFO=et.otperformance=et.RandomIdGenerator=et.hexToBase64=et._globalThis=et.getEnv=et.getEnvWithoutDefaults=void 0;var KL=mI();Object.defineProperty(et,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return KL.getEnvWithoutDefaults}});Object.defineProperty(et,"getEnv",{enumerable:!0,get:function(){return KL.getEnv}});var Tse=hI();Object.defineProperty(et,"_globalThis",{enumerable:!0,get:function(){return Tse._globalThis}});var mse=AI();Object.defineProperty(et,"hexToBase64",{enumerable:!0,get:function(){return mse.hexToBase64}});var hse=NI();Object.defineProperty(et,"RandomIdGenerator",{enumerable:!0,get:function(){return hse.RandomIdGenerator}});var gse=II();Object.defineProperty(et,"otperformance",{enumerable:!0,get:function(){return gse.otperformance}});var Ase=YL();Object.defineProperty(et,"SDK_INFO",{enumerable:!0,get:function(){return Ase.SDK_INFO}});var Rse=$L();Object.defineProperty(et,"unrefTimer",{enumerable:!0,get:function(){return Rse.unrefTimer}})});var ET=E(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.unrefTimer=tt.otperformance=tt.hexToBase64=tt.getEnvWithoutDefaults=tt.getEnv=tt._globalThis=tt.SDK_INFO=tt.RandomIdGenerator=void 0;var _o=WL();Object.defineProperty(tt,"RandomIdGenerator",{enumerable:!0,get:function(){return _o.RandomIdGenerator}});Object.defineProperty(tt,"SDK_INFO",{enumerable:!0,get:function(){return _o.SDK_INFO}});Object.defineProperty(tt,"_globalThis",{enumerable:!0,get:function(){return _o._globalThis}});Object.defineProperty(tt,"getEnv",{enumerable:!0,get:function(){return _o.getEnv}});Object.defineProperty(tt,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return _o.getEnvWithoutDefaults}});Object.defineProperty(tt,"hexToBase64",{enumerable:!0,get:function(){return _o.hexToBase64}});Object.defineProperty(tt,"otperformance",{enumerable:!0,get:function(){return _o.otperformance}});Object.defineProperty(tt,"unrefTimer",{enumerable:!0,get:function(){return _o.unrefTimer}})});var JL=E(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.addHrTimes=Ee.isTimeInput=Ee.isTimeInputHrTime=Ee.hrTimeToMicroseconds=Ee.hrTimeToMilliseconds=Ee.hrTimeToNanoseconds=Ee.hrTimeToTimeStamp=Ee.hrTimeDuration=Ee.timeInputToHrTime=Ee.hrTime=Ee.getTimeOrigin=Ee.millisToHrTime=void 0;var fT=ET(),XL=9,Ose=6,Nse=Math.pow(10,Ose),Ap=Math.pow(10,XL);function Ic(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Nse);return[r,n]}Ee.millisToHrTime=Ic;function ST(){let t=fT.otperformance.timeOrigin;if(typeof t!="number"){let e=fT.otperformance;t=e.timing&&e.timing.fetchStart}return t}Ee.getTimeOrigin=ST;function zL(t){let e=Ic(ST()),r=Ic(typeof t=="number"?t:fT.otperformance.now());return QL(e,r)}Ee.hrTime=zL;function Ise(t){if(TT(t))return t;if(typeof t=="number")return t<ST()?zL(t):Ic(t);if(t instanceof Date)return Ic(t.getTime());throw TypeError("Invalid input type")}Ee.timeInputToHrTime=Ise;function Pse(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=Ap),[r,n]}Ee.hrTimeDuration=Pse;function Cse(t){let e=XL,r=`${"0".repeat(e)}${t[1]}Z`,n=r.substring(r.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",n)}Ee.hrTimeToTimeStamp=Cse;function yse(t){return t[0]*Ap+t[1]}Ee.hrTimeToNanoseconds=yse;function Mse(t){return t[0]*1e3+t[1]/1e6}Ee.hrTimeToMilliseconds=Mse;function vse(t){return t[0]*1e6+t[1]/1e3}Ee.hrTimeToMicroseconds=vse;function TT(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}Ee.isTimeInputHrTime=TT;function bse(t){return TT(t)||typeof t=="number"||t instanceof Date}Ee.isTimeInput=bse;function QL(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Ap&&(r[1]-=Ap,r[0]+=1),r}Ee.addHrTimes=QL});var ZL=E(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.ExportResultCode=void 0;var Lse;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Lse=Pc.ExportResultCode||(Pc.ExportResultCode={}))});var tD=E(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.CompositePropagator=void 0;var eD=(M(),P(U)),mT=class{constructor(e={}){var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,o)=>n.concat(o),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(s){eD.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${s.message}`)}}extract(e,r,n){return this._propagators.reduce((o,s)=>{try{return s.extract(o,r,n)}catch(i){eD.diag.warn(`Failed to extract with ${s.constructor.name}. Err: ${i.message}`)}return o},e)}fields(){return this._fields.slice()}};Rp.CompositePropagator=mT});var rD=E(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.validateValue=mi.validateKey=void 0;var hT="[_0-9a-z-*/]",Dse=`[a-z]${hT}{0,255}`,xse=`[a-z0-9]${hT}{0,240}@[a-z]${hT}{0,13}`,Use=new RegExp(`^(?:${Dse}|${xse})$`),wse=/^[ -~]{0,255}[!-~]$/,Vse=/,|=/;function Bse(t){return Use.test(t)}mi.validateKey=Bse;function Gse(t){return wse.test(t)&&!Vse.test(t)}mi.validateValue=Gse});var AT=E(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.TraceState=void 0;var nD=rD(),oD=32,Hse=512,sD=",",iD="=",gT=class t{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+iD+this.get(r)),e),[]).join(sD)}_parse(e){e.length>Hse||(this._internalState=e.split(sD).reverse().reduce((r,n)=>{let o=n.trim(),s=o.indexOf(iD);if(s!==-1){let i=o.slice(0,s),a=o.slice(s+1,n.length);(0,nD.validateKey)(i)&&(0,nD.validateValue)(a)&&r.set(i,a)}return r},new Map),this._internalState.size>oD&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,oD))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}};Op.TraceState=gT});var cD=E(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.W3CTraceContextPropagator=ft.parseTraceParent=ft.TRACE_STATE_HEADER=ft.TRACE_PARENT_HEADER=void 0;var Np=(M(),P(U)),kse=Rc(),Fse=AT();ft.TRACE_PARENT_HEADER="traceparent";ft.TRACE_STATE_HEADER="tracestate";var qse="00",jse="(?!ff)[\\da-f]{2}",Yse="(?![0]{32})[\\da-f]{32}",$se="(?![0]{16})[\\da-f]{16}",Kse="[\\da-f]{2}",Wse=new RegExp(`^\\s?(${jse})-(${Yse})-(${$se})-(${Kse})(-.*)?\\s?$`);function aD(t){let e=Wse.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}ft.parseTraceParent=aD;var RT=class{inject(e,r,n){let o=Np.trace.getSpanContext(e);if(!o||(0,kse.isTracingSuppressed)(e)||!(0,Np.isSpanContextValid)(o))return;let s=`${qse}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Np.TraceFlags.NONE).toString(16)}`;n.set(r,ft.TRACE_PARENT_HEADER,s),o.traceState&&n.set(r,ft.TRACE_STATE_HEADER,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,ft.TRACE_PARENT_HEADER);if(!o)return e;let s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;let i=aD(s);if(!i)return e;i.isRemote=!0;let a=n.get(r,ft.TRACE_STATE_HEADER);if(a){let c=Array.isArray(a)?a.join(","):a;i.traceState=new Fse.TraceState(typeof c=="string"?c:void 0)}return Np.trace.setSpanContext(e,i)}fields(){return[ft.TRACE_PARENT_HEADER,ft.TRACE_STATE_HEADER]}};ft.W3CTraceContextPropagator=RT});var uD=E(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getRPCMetadata=Dr.deleteRPCMetadata=Dr.setRPCMetadata=Dr.RPCType=void 0;var Xse=(M(),P(U)),OT=(0,Xse.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),zse;(function(t){t.HTTP="http"})(zse=Dr.RPCType||(Dr.RPCType={}));function Qse(t,e){return t.setValue(OT,e)}Dr.setRPCMetadata=Qse;function Jse(t){return t.deleteValue(OT)}Dr.deleteRPCMetadata=Jse;function Zse(t){return t.getValue(OT)}Dr.getRPCMetadata=Zse});var IT=E(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.AlwaysOffSampler=void 0;var eie=(M(),P(U)),NT=class{shouldSample(){return{decision:eie.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ip.AlwaysOffSampler=NT});var CT=E(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.AlwaysOnSampler=void 0;var tie=(M(),P(U)),PT=class{shouldSample(){return{decision:tie.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Pp.AlwaysOnSampler=PT});var pD=E(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.ParentBasedSampler=void 0;var Cp=(M(),P(U)),rie=iT(),lD=IT(),yT=CT(),MT=class{constructor(e){var r,n,o,s;this._root=e.root,this._root||((0,rie.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yT.AlwaysOnSampler),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new yT.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new lD.AlwaysOffSampler,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new yT.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new lD.AlwaysOffSampler}shouldSample(e,r,n,o,s,i){let a=Cp.trace.getSpanContext(e);return!a||!(0,Cp.isSpanContextValid)(a)?this._root.shouldSample(e,r,n,o,s,i):a.isRemote?a.traceFlags&Cp.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,i):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,i):a.traceFlags&Cp.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,i):this._localParentNotSampled.shouldSample(e,r,n,o,s,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};yp.ParentBasedSampler=MT});var _D=E(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.TraceIdRatioBasedSampler=void 0;var vT=(M(),P(U)),bT=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,vT.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?vT.SamplingDecision.RECORD_AND_SAMPLED:vT.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,s=parseInt(e.slice(o,o+8),16);r=(r^s)>>>0}return r}};Mp.TraceIdRatioBasedSampler=bT});var TD=E(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.isPlainObject=void 0;var nie="[object Object]",oie="[object Null]",sie="[object Undefined]",iie=Function.prototype,dD=iie.toString,aie=dD.call(Object),cie=uie(Object.getPrototypeOf,Object),ED=Object.prototype,fD=ED.hasOwnProperty,Ns=Symbol?Symbol.toStringTag:void 0,SD=ED.toString;function uie(t,e){return function(r){return t(e(r))}}function lie(t){if(!pie(t)||_ie(t)!==nie)return!1;let e=cie(t);if(e===null)return!0;let r=fD.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&dD.call(r)===aie}vp.isPlainObject=lie;function pie(t){return t!=null&&typeof t=="object"}function _ie(t){return t==null?t===void 0?sie:oie:Ns&&Ns in Object(t)?die(t):Eie(t)}function die(t){let e=fD.call(t,Ns),r=t[Ns],n=!1;try{t[Ns]=void 0,n=!0}catch{}let o=SD.call(t);return n&&(e?t[Ns]=r:delete t[Ns]),o}function Eie(t){return SD.call(t)}});var RD=E(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.merge=void 0;var mD=TD(),fie=20;function Sie(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=gD(e,t.shift(),0,r);return e}Dp.merge=Sie;function LT(t){return Lp(t)?t.slice():t}function gD(t,e,r=0,n){let o;if(!(r>fie)){if(r++,bp(t)||bp(e)||AD(e))o=LT(e);else if(Lp(t)){if(o=t.slice(),Lp(e))for(let s=0,i=e.length;s<i;s++)o.push(LT(e[s]));else if(Cc(e)){let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let c=s[i];o[c]=LT(e[c])}}}else if(Cc(t))if(Cc(e)){if(!Tie(t,e))return e;o=Object.assign({},t);let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let c=s[i],u=e[c];if(bp(u))typeof u>"u"?delete o[c]:o[c]=u;else{let l=o[c],p=u;if(hD(t,c,n)||hD(e,c,n))delete o[c];else{if(Cc(l)&&Cc(p)){let _=n.get(l)||[],d=n.get(p)||[];_.push({obj:t,key:c}),d.push({obj:e,key:c}),n.set(l,_),n.set(p,d)}o[c]=gD(o[c],u,r,n)}}}}else o=e;return o}}function hD(t,e,r){let n=r.get(t[e])||[];for(let o=0,s=n.length;o<s;o++){let i=n[o];if(i.key===e&&i.obj===t)return!0}return!1}function Lp(t){return Array.isArray(t)}function AD(t){return typeof t=="function"}function Cc(t){return!bp(t)&&!Lp(t)&&!AD(t)&&typeof t=="object"}function bp(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Tie(t,e){return!(!(0,mD.isPlainObject)(t)||!(0,mD.isPlainObject)(e))}});var OD=E(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.callWithTimeout=hi.TimeoutError=void 0;var xp=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};hi.TimeoutError=xp;function mie(t,e){let r,n=new Promise(function(s,i){r=setTimeout(function(){i(new xp("Operation timed out."))},e)});return Promise.race([t,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}hi.callWithTimeout=mie});var ID=E(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.isUrlIgnored=gi.urlMatches=void 0;function ND(t,e){return typeof e=="string"?t===e:!!t.match(e)}gi.urlMatches=ND;function hie(t,e){if(!e)return!1;for(let r of e)if(ND(t,r))return!0;return!1}gi.isUrlIgnored=hie});var PD=E(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.isWrapped=void 0;function gie(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}Up.isWrapped=gie});var CD=E(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.Deferred=void 0;var DT=class{constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};wp.Deferred=DT});var yD=E(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.BindOnceFuture=void 0;var Aie=CD(),xT=class{constructor(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new Aie.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Vp.BindOnceFuture=xT});var vD=E(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp._export=void 0;var MD=(M(),P(U)),Rie=Rc();function Oie(t,e){return new Promise(r=>{MD.context.with((0,Rie.suppressTracing)(MD.context.active()),()=>{t.export(e,n=>{r(n)})})})}Bp._export=Oie});var re=E(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=g.DEFAULT_ATTRIBUTE_COUNT_LIMIT=g.TraceState=g.unsuppressTracing=g.suppressTracing=g.isTracingSuppressed=g.TraceIdRatioBasedSampler=g.ParentBasedSampler=g.AlwaysOnSampler=g.AlwaysOffSampler=g.setRPCMetadata=g.getRPCMetadata=g.deleteRPCMetadata=g.RPCType=g.parseTraceParent=g.W3CTraceContextPropagator=g.TRACE_STATE_HEADER=g.TRACE_PARENT_HEADER=g.CompositePropagator=g.unrefTimer=g.otperformance=g.hexToBase64=g.getEnvWithoutDefaults=g.getEnv=g._globalThis=g.SDK_INFO=g.RandomIdGenerator=g.baggageUtils=g.ExportResultCode=g.hexToBinary=g.timeInputToHrTime=g.millisToHrTime=g.isTimeInputHrTime=g.isTimeInput=g.hrTimeToTimeStamp=g.hrTimeToNanoseconds=g.hrTimeToMilliseconds=g.hrTimeToMicroseconds=g.hrTimeDuration=g.hrTime=g.getTimeOrigin=g.addHrTimes=g.loggingErrorHandler=g.setGlobalErrorHandler=g.globalErrorHandler=g.sanitizeAttributes=g.isAttributeValue=g.isAttributeKey=g.AnchoredClock=g.W3CBaggagePropagator=void 0;g.internal=g.VERSION=g.BindOnceFuture=g.isWrapped=g.urlMatches=g.isUrlIgnored=g.callWithTimeout=g.TimeoutError=g.TracesSamplerValues=g.merge=g.parseEnvironment=g.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=g.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=g.DEFAULT_ENVIRONMENT=void 0;var Nie=lI();Object.defineProperty(g,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Nie.W3CBaggagePropagator}});var Iie=pI();Object.defineProperty(g,"AnchoredClock",{enumerable:!0,get:function(){return Iie.AnchoredClock}});var UT=SI();Object.defineProperty(g,"isAttributeKey",{enumerable:!0,get:function(){return UT.isAttributeKey}});Object.defineProperty(g,"isAttributeValue",{enumerable:!0,get:function(){return UT.isAttributeValue}});Object.defineProperty(g,"sanitizeAttributes",{enumerable:!0,get:function(){return UT.sanitizeAttributes}});var bD=iT();Object.defineProperty(g,"globalErrorHandler",{enumerable:!0,get:function(){return bD.globalErrorHandler}});Object.defineProperty(g,"setGlobalErrorHandler",{enumerable:!0,get:function(){return bD.setGlobalErrorHandler}});var Pie=sT();Object.defineProperty(g,"loggingErrorHandler",{enumerable:!0,get:function(){return Pie.loggingErrorHandler}});var dr=JL();Object.defineProperty(g,"addHrTimes",{enumerable:!0,get:function(){return dr.addHrTimes}});Object.defineProperty(g,"getTimeOrigin",{enumerable:!0,get:function(){return dr.getTimeOrigin}});Object.defineProperty(g,"hrTime",{enumerable:!0,get:function(){return dr.hrTime}});Object.defineProperty(g,"hrTimeDuration",{enumerable:!0,get:function(){return dr.hrTimeDuration}});Object.defineProperty(g,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return dr.hrTimeToMicroseconds}});Object.defineProperty(g,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return dr.hrTimeToMilliseconds}});Object.defineProperty(g,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return dr.hrTimeToNanoseconds}});Object.defineProperty(g,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return dr.hrTimeToTimeStamp}});Object.defineProperty(g,"isTimeInput",{enumerable:!0,get:function(){return dr.isTimeInput}});Object.defineProperty(g,"isTimeInputHrTime",{enumerable:!0,get:function(){return dr.isTimeInputHrTime}});Object.defineProperty(g,"millisToHrTime",{enumerable:!0,get:function(){return dr.millisToHrTime}});Object.defineProperty(g,"timeInputToHrTime",{enumerable:!0,get:function(){return dr.timeInputToHrTime}});var Cie=lT();Object.defineProperty(g,"hexToBinary",{enumerable:!0,get:function(){return Cie.hexToBinary}});var yie=ZL();Object.defineProperty(g,"ExportResultCode",{enumerable:!0,get:function(){return yie.ExportResultCode}});var Gp=eT();g.baggageUtils={getKeyPairs:Gp.getKeyPairs,serializeKeyPairs:Gp.serializeKeyPairs,parseKeyPairsIntoRecord:Gp.parseKeyPairsIntoRecord,parsePairKeyValue:Gp.parsePairKeyValue};var Eo=ET();Object.defineProperty(g,"RandomIdGenerator",{enumerable:!0,get:function(){return Eo.RandomIdGenerator}});Object.defineProperty(g,"SDK_INFO",{enumerable:!0,get:function(){return Eo.SDK_INFO}});Object.defineProperty(g,"_globalThis",{enumerable:!0,get:function(){return Eo._globalThis}});Object.defineProperty(g,"getEnv",{enumerable:!0,get:function(){return Eo.getEnv}});Object.defineProperty(g,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return Eo.getEnvWithoutDefaults}});Object.defineProperty(g,"hexToBase64",{enumerable:!0,get:function(){return Eo.hexToBase64}});Object.defineProperty(g,"otperformance",{enumerable:!0,get:function(){return Eo.otperformance}});Object.defineProperty(g,"unrefTimer",{enumerable:!0,get:function(){return Eo.unrefTimer}});var Mie=tD();Object.defineProperty(g,"CompositePropagator",{enumerable:!0,get:function(){return Mie.CompositePropagator}});var Hp=cD();Object.defineProperty(g,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Hp.TRACE_PARENT_HEADER}});Object.defineProperty(g,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Hp.TRACE_STATE_HEADER}});Object.defineProperty(g,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Hp.W3CTraceContextPropagator}});Object.defineProperty(g,"parseTraceParent",{enumerable:!0,get:function(){return Hp.parseTraceParent}});var kp=uD();Object.defineProperty(g,"RPCType",{enumerable:!0,get:function(){return kp.RPCType}});Object.defineProperty(g,"deleteRPCMetadata",{enumerable:!0,get:function(){return kp.deleteRPCMetadata}});Object.defineProperty(g,"getRPCMetadata",{enumerable:!0,get:function(){return kp.getRPCMetadata}});Object.defineProperty(g,"setRPCMetadata",{enumerable:!0,get:function(){return kp.setRPCMetadata}});var vie=IT();Object.defineProperty(g,"AlwaysOffSampler",{enumerable:!0,get:function(){return vie.AlwaysOffSampler}});var bie=CT();Object.defineProperty(g,"AlwaysOnSampler",{enumerable:!0,get:function(){return bie.AlwaysOnSampler}});var Lie=pD();Object.defineProperty(g,"ParentBasedSampler",{enumerable:!0,get:function(){return Lie.ParentBasedSampler}});var Die=_D();Object.defineProperty(g,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Die.TraceIdRatioBasedSampler}});var wT=Rc();Object.defineProperty(g,"isTracingSuppressed",{enumerable:!0,get:function(){return wT.isTracingSuppressed}});Object.defineProperty(g,"suppressTracing",{enumerable:!0,get:function(){return wT.suppressTracing}});Object.defineProperty(g,"unsuppressTracing",{enumerable:!0,get:function(){return wT.unsuppressTracing}});var xie=AT();Object.defineProperty(g,"TraceState",{enumerable:!0,get:function(){return xie.TraceState}});var Ai=cT();Object.defineProperty(g,"DEFAULT_ATTRIBUTE_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_ATTRIBUTE_COUNT_LIMIT}});Object.defineProperty(g,"DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}});Object.defineProperty(g,"DEFAULT_ENVIRONMENT",{enumerable:!0,get:function(){return Ai.DEFAULT_ENVIRONMENT}});Object.defineProperty(g,"DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT}});Object.defineProperty(g,"DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}});Object.defineProperty(g,"parseEnvironment",{enumerable:!0,get:function(){return Ai.parseEnvironment}});var Uie=RD();Object.defineProperty(g,"merge",{enumerable:!0,get:function(){return Uie.merge}});var wie=aT();Object.defineProperty(g,"TracesSamplerValues",{enumerable:!0,get:function(){return wie.TracesSamplerValues}});var LD=OD();Object.defineProperty(g,"TimeoutError",{enumerable:!0,get:function(){return LD.TimeoutError}});Object.defineProperty(g,"callWithTimeout",{enumerable:!0,get:function(){return LD.callWithTimeout}});var DD=ID();Object.defineProperty(g,"isUrlIgnored",{enumerable:!0,get:function(){return DD.isUrlIgnored}});Object.defineProperty(g,"urlMatches",{enumerable:!0,get:function(){return DD.urlMatches}});var Vie=PD();Object.defineProperty(g,"isWrapped",{enumerable:!0,get:function(){return Vie.isWrapped}});var Bie=yD();Object.defineProperty(g,"BindOnceFuture",{enumerable:!0,get:function(){return Bie.BindOnceFuture}});var Gie=_T();Object.defineProperty(g,"VERSION",{enumerable:!0,get:function(){return Gie.VERSION}});var Hie=vD();g.internal={_export:Hie._export}});var yc=E((mVe,xD)=>{"use strict";var kie="2.0.0",Fie=Number.MAX_SAFE_INTEGER||9007199254740991,qie=16,jie=250,Yie=["major","premajor","minor","preminor","patch","prepatch","prerelease"];xD.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:qie,MAX_SAFE_BUILD_LENGTH:jie,MAX_SAFE_INTEGER:Fie,RELEASE_TYPES:Yie,SEMVER_SPEC_VERSION:kie,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Mc=E((hVe,UD)=>{"use strict";var $ie=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};UD.exports=$ie});var Ri=E((on,wD)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:VT,MAX_SAFE_BUILD_LENGTH:Kie,MAX_LENGTH:Wie}=yc(),Xie=Mc();on=wD.exports={};var zie=on.re=[],Qie=on.safeRe=[],L=on.src=[],Jie=on.safeSrc=[],D=on.t={},Zie=0,BT="[a-zA-Z0-9-]",eae=[["\\s",1],["\\d",Wie],[BT,Kie]],tae=t=>{for(let[e,r]of eae)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Y=(t,e,r)=>{let n=tae(e),o=Zie++;Xie(t,o,e),D[t]=o,L[o]=e,Jie[o]=n,zie[o]=new RegExp(e,r?"g":void 0),Qie[o]=new RegExp(n,r?"g":void 0)};Y("NUMERICIDENTIFIER","0|[1-9]\\d*");Y("NUMERICIDENTIFIERLOOSE","\\d+");Y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${BT}*`);Y("MAINVERSION",`(${L[D.NUMERICIDENTIFIER]})\\.(${L[D.NUMERICIDENTIFIER]})\\.(${L[D.NUMERICIDENTIFIER]})`);Y("MAINVERSIONLOOSE",`(${L[D.NUMERICIDENTIFIERLOOSE]})\\.(${L[D.NUMERICIDENTIFIERLOOSE]})\\.(${L[D.NUMERICIDENTIFIERLOOSE]})`);Y("PRERELEASEIDENTIFIER",`(?:${L[D.NONNUMERICIDENTIFIER]}|${L[D.NUMERICIDENTIFIER]})`);Y("PRERELEASEIDENTIFIERLOOSE",`(?:${L[D.NONNUMERICIDENTIFIER]}|${L[D.NUMERICIDENTIFIERLOOSE]})`);Y("PRERELEASE",`(?:-(${L[D.PRERELEASEIDENTIFIER]}(?:\\.${L[D.PRERELEASEIDENTIFIER]})*))`);Y("PRERELEASELOOSE",`(?:-?(${L[D.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${L[D.PRERELEASEIDENTIFIERLOOSE]})*))`);Y("BUILDIDENTIFIER",`${BT}+`);Y("BUILD",`(?:\\+(${L[D.BUILDIDENTIFIER]}(?:\\.${L[D.BUILDIDENTIFIER]})*))`);Y("FULLPLAIN",`v?${L[D.MAINVERSION]}${L[D.PRERELEASE]}?${L[D.BUILD]}?`);Y("FULL",`^${L[D.FULLPLAIN]}$`);Y("LOOSEPLAIN",`[v=\\s]*${L[D.MAINVERSIONLOOSE]}${L[D.PRERELEASELOOSE]}?${L[D.BUILD]}?`);Y("LOOSE",`^${L[D.LOOSEPLAIN]}$`);Y("GTLT","((?:<|>)?=?)");Y("XRANGEIDENTIFIERLOOSE",`${L[D.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Y("XRANGEIDENTIFIER",`${L[D.NUMERICIDENTIFIER]}|x|X|\\*`);Y("XRANGEPLAIN",`[v=\\s]*(${L[D.XRANGEIDENTIFIER]})(?:\\.(${L[D.XRANGEIDENTIFIER]})(?:\\.(${L[D.XRANGEIDENTIFIER]})(?:${L[D.PRERELEASE]})?${L[D.BUILD]}?)?)?`);Y("XRANGEPLAINLOOSE",`[v=\\s]*(${L[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[D.XRANGEIDENTIFIERLOOSE]})(?:${L[D.PRERELEASELOOSE]})?${L[D.BUILD]}?)?)?`);Y("XRANGE",`^${L[D.GTLT]}\\s*${L[D.XRANGEPLAIN]}$`);Y("XRANGELOOSE",`^${L[D.GTLT]}\\s*${L[D.XRANGEPLAINLOOSE]}$`);Y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${VT}})(?:\\.(\\d{1,${VT}}))?(?:\\.(\\d{1,${VT}}))?`);Y("COERCE",`${L[D.COERCEPLAIN]}(?:$|[^\\d])`);Y("COERCEFULL",L[D.COERCEPLAIN]+`(?:${L[D.PRERELEASE]})?(?:${L[D.BUILD]})?(?:$|[^\\d])`);Y("COERCERTL",L[D.COERCE],!0);Y("COERCERTLFULL",L[D.COERCEFULL],!0);Y("LONETILDE","(?:~>?)");Y("TILDETRIM",`(\\s*)${L[D.LONETILDE]}\\s+`,!0);on.tildeTrimReplace="$1~";Y("TILDE",`^${L[D.LONETILDE]}${L[D.XRANGEPLAIN]}$`);Y("TILDELOOSE",`^${L[D.LONETILDE]}${L[D.XRANGEPLAINLOOSE]}$`);Y("LONECARET","(?:\\^)");Y("CARETTRIM",`(\\s*)${L[D.LONECARET]}\\s+`,!0);on.caretTrimReplace="$1^";Y("CARET",`^${L[D.LONECARET]}${L[D.XRANGEPLAIN]}$`);Y("CARETLOOSE",`^${L[D.LONECARET]}${L[D.XRANGEPLAINLOOSE]}$`);Y("COMPARATORLOOSE",`^${L[D.GTLT]}\\s*(${L[D.LOOSEPLAIN]})$|^$`);Y("COMPARATOR",`^${L[D.GTLT]}\\s*(${L[D.FULLPLAIN]})$|^$`);Y("COMPARATORTRIM",`(\\s*)${L[D.GTLT]}\\s*(${L[D.LOOSEPLAIN]}|${L[D.XRANGEPLAIN]})`,!0);on.comparatorTrimReplace="$1$2$3";Y("HYPHENRANGE",`^\\s*(${L[D.XRANGEPLAIN]})\\s+-\\s+(${L[D.XRANGEPLAIN]})\\s*$`);Y("HYPHENRANGELOOSE",`^\\s*(${L[D.XRANGEPLAINLOOSE]})\\s+-\\s+(${L[D.XRANGEPLAINLOOSE]})\\s*$`);Y("STAR","(<|>)?=?\\s*\\*");Y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fp=E((gVe,VD)=>{"use strict";var rae=Object.freeze({loose:!0}),nae=Object.freeze({}),oae=t=>t?typeof t!="object"?rae:t:nae;VD.exports=oae});var GT=E((AVe,HD)=>{"use strict";var BD=/^[0-9]+$/,GD=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=BD.test(t),n=BD.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},sae=(t,e)=>GD(e,t);HD.exports={compareIdentifiers:GD,rcompareIdentifiers:sae}});var St=E((RVe,FD)=>{"use strict";var qp=Mc(),{MAX_LENGTH:kD,MAX_SAFE_INTEGER:jp}=yc(),{safeRe:Yp,t:$p}=Ri(),iae=Fp(),{compareIdentifiers:HT}=GT(),kT=class t{constructor(e,r){if(r=iae(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.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>kD)throw new TypeError(`version is longer than ${kD} characters`);qp("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Yp[$p.LOOSE]:Yp[$p.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>jp||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jp||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jp||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s<jp)return s}return o}):this.prerelease=[],this.build=n[5]?n[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(qp("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)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}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 r=0;do{let n=this.prerelease[r],o=e.prerelease[r];if(qp("prerelease compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return HT(n,o)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],o=e.build[r];if(qp("build compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return HT(n,o)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let o=`-${r}`.match(this.options.loose?Yp[$p.PRERELEASELOOSE]:Yp[$p.PRERELEASE]);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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 o=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(r){let s=[r,o];n===!1&&(s=[r]),HT(this.prerelease[0],r)===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}};FD.exports=kT});var Is=E((OVe,jD)=>{"use strict";var qD=St(),aae=(t,e,r=!1)=>{if(t instanceof qD)return t;try{return new qD(t,e)}catch(n){if(!r)return null;throw n}};jD.exports=aae});var $D=E((NVe,YD)=>{"use strict";var cae=Is(),uae=(t,e)=>{let r=cae(t,e);return r?r.version:null};YD.exports=uae});var WD=E((IVe,KD)=>{"use strict";var lae=Is(),pae=(t,e)=>{let r=lae(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};KD.exports=pae});var QD=E((PVe,zD)=>{"use strict";var XD=St(),_ae=(t,e,r,n,o)=>{typeof r=="string"&&(o=n,n=r,r=void 0);try{return new XD(t instanceof XD?t.version:t,r).inc(e,n,o).version}catch{return null}};zD.exports=_ae});var ex=E((CVe,ZD)=>{"use strict";var JD=Is(),dae=(t,e)=>{let r=JD(t,null,!0),n=JD(e,null,!0),o=r.compare(n);if(o===0)return null;let s=o>0,i=s?r:n,a=s?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};ZD.exports=dae});var rx=E((yVe,tx)=>{"use strict";var Eae=St(),fae=(t,e)=>new Eae(t,e).major;tx.exports=fae});var ox=E((MVe,nx)=>{"use strict";var Sae=St(),Tae=(t,e)=>new Sae(t,e).minor;nx.exports=Tae});var ix=E((vVe,sx)=>{"use strict";var mae=St(),hae=(t,e)=>new mae(t,e).patch;sx.exports=hae});var cx=E((bVe,ax)=>{"use strict";var gae=Is(),Aae=(t,e)=>{let r=gae(t,e);return r&&r.prerelease.length?r.prerelease:null};ax.exports=Aae});var Er=E((LVe,lx)=>{"use strict";var ux=St(),Rae=(t,e,r)=>new ux(t,r).compare(new ux(e,r));lx.exports=Rae});var _x=E((DVe,px)=>{"use strict";var Oae=Er(),Nae=(t,e,r)=>Oae(e,t,r);px.exports=Nae});var Ex=E((xVe,dx)=>{"use strict";var Iae=Er(),Pae=(t,e)=>Iae(t,e,!0);dx.exports=Pae});var Kp=E((UVe,Sx)=>{"use strict";var fx=St(),Cae=(t,e,r)=>{let n=new fx(t,r),o=new fx(e,r);return n.compare(o)||n.compareBuild(o)};Sx.exports=Cae});var mx=E((wVe,Tx)=>{"use strict";var yae=Kp(),Mae=(t,e)=>t.sort((r,n)=>yae(r,n,e));Tx.exports=Mae});var gx=E((VVe,hx)=>{"use strict";var vae=Kp(),bae=(t,e)=>t.sort((r,n)=>vae(n,r,e));hx.exports=bae});var vc=E((BVe,Ax)=>{"use strict";var Lae=Er(),Dae=(t,e,r)=>Lae(t,e,r)>0;Ax.exports=Dae});var Wp=E((GVe,Rx)=>{"use strict";var xae=Er(),Uae=(t,e,r)=>xae(t,e,r)<0;Rx.exports=Uae});var FT=E((HVe,Ox)=>{"use strict";var wae=Er(),Vae=(t,e,r)=>wae(t,e,r)===0;Ox.exports=Vae});var qT=E((kVe,Nx)=>{"use strict";var Bae=Er(),Gae=(t,e,r)=>Bae(t,e,r)!==0;Nx.exports=Gae});var Xp=E((FVe,Ix)=>{"use strict";var Hae=Er(),kae=(t,e,r)=>Hae(t,e,r)>=0;Ix.exports=kae});var zp=E((qVe,Px)=>{"use strict";var Fae=Er(),qae=(t,e,r)=>Fae(t,e,r)<=0;Px.exports=qae});var jT=E((jVe,Cx)=>{"use strict";var jae=FT(),Yae=qT(),$ae=vc(),Kae=Xp(),Wae=Wp(),Xae=zp(),zae=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jae(t,r,n);case"!=":return Yae(t,r,n);case">":return $ae(t,r,n);case">=":return Kae(t,r,n);case"<":return Wae(t,r,n);case"<=":return Xae(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Cx.exports=zae});var Mx=E((YVe,yx)=>{"use strict";var Qae=St(),Jae=Is(),{safeRe:Qp,t:Jp}=Ri(),Zae=(t,e)=>{if(t instanceof Qae)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Qp[Jp.COERCEFULL]:Qp[Jp.COERCE]);else{let c=e.includePrerelease?Qp[Jp.COERCERTLFULL]:Qp[Jp.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],o=r[3]||"0",s=r[4]||"0",i=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Jae(`${n}.${o}.${s}${i}${a}`,e)};yx.exports=Zae});var bx=E(($Ve,vx)=>{"use strict";var YT=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(e,r)}return this}};vx.exports=YT});var fr=E((KVe,Ux)=>{"use strict";var ece=/\s+/g,$T=class t{constructor(e,r){if(r=rce(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof KT)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(ece," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(o=>!Dx(o[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&uce(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&ace)|(this.options.loose&&cce))+":"+e,o=Lx.get(n);if(o)return o;let s=this.options.loose,i=s?Mt[Tt.HYPHENRANGELOOSE]:Mt[Tt.HYPHENRANGE];e=e.replace(i,hce(this.options.includePrerelease)),Se("hyphen replace",e),e=e.replace(Mt[Tt.COMPARATORTRIM],oce),Se("comparator trim",e),e=e.replace(Mt[Tt.TILDETRIM],sce),Se("tilde trim",e),e=e.replace(Mt[Tt.CARETTRIM],ice),Se("caret trim",e);let a=e.split(" ").map(p=>lce(p,this.options)).join(" ").split(/\s+/).map(p=>mce(p,this.options));s&&(a=a.filter(p=>(Se("loose invalid filter",p,this.options),!!p.match(Mt[Tt.COMPARATORLOOSE])))),Se("range list",a);let c=new Map,u=a.map(p=>new KT(p,this.options));for(let p of u){if(Dx(p))return[p];c.set(p.value,p)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Lx.set(n,l),l}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>xx(n,r)&&e.set.some(o=>xx(o,r)&&n.every(s=>o.every(i=>s.intersects(i,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nce(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(gce(this.set[r],e,this.options))return!0;return!1}};Ux.exports=$T;var tce=bx(),Lx=new tce,rce=Fp(),KT=bc(),Se=Mc(),nce=St(),{safeRe:Mt,t:Tt,comparatorTrimReplace:oce,tildeTrimReplace:sce,caretTrimReplace:ice}=Ri(),{FLAG_INCLUDE_PRERELEASE:ace,FLAG_LOOSE:cce}=yc(),Dx=t=>t.value==="<0.0.0-0",uce=t=>t.value==="",xx=(t,e)=>{let r=!0,n=t.slice(),o=n.pop();for(;r&&n.length;)r=n.every(s=>o.intersects(s,e)),o=n.pop();return r},lce=(t,e)=>(t=t.replace(Mt[Tt.BUILD],""),Se("comp",t,e),t=dce(t,e),Se("caret",t),t=pce(t,e),Se("tildes",t),t=fce(t,e),Se("xrange",t),t=Tce(t,e),Se("stars",t),t),vt=t=>!t||t.toLowerCase()==="x"||t==="*",pce=(t,e)=>t.trim().split(/\s+/).map(r=>_ce(r,e)).join(" "),_ce=(t,e)=>{let r=e.loose?Mt[Tt.TILDELOOSE]:Mt[Tt.TILDE];return t.replace(r,(n,o,s,i,a)=>{Se("tilde",t,n,o,s,i,a);let c;return vt(o)?c="":vt(s)?c=`>=${o}.0.0 <${+o+1}.0.0-0`:vt(i)?c=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:a?(Se("replaceTilde pr",a),c=`>=${o}.${s}.${i}-${a} <${o}.${+s+1}.0-0`):c=`>=${o}.${s}.${i} <${o}.${+s+1}.0-0`,Se("tilde return",c),c})},dce=(t,e)=>t.trim().split(/\s+/).map(r=>Ece(r,e)).join(" "),Ece=(t,e)=>{Se("caret",t,e);let r=e.loose?Mt[Tt.CARETLOOSE]:Mt[Tt.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(o,s,i,a,c)=>{Se("caret",t,o,s,i,a,c);let u;return vt(s)?u="":vt(i)?u=`>=${s}.0.0${n} <${+s+1}.0.0-0`:vt(a)?s==="0"?u=`>=${s}.${i}.0${n} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.0${n} <${+s+1}.0.0-0`:c?(Se("replaceCaret pr",c),s==="0"?i==="0"?u=`>=${s}.${i}.${a}-${c} <${s}.${i}.${+a+1}-0`:u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.${a}-${c} <${+s+1}.0.0-0`):(Se("no pr"),s==="0"?i==="0"?u=`>=${s}.${i}.${a}${n} <${s}.${i}.${+a+1}-0`:u=`>=${s}.${i}.${a}${n} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.${a} <${+s+1}.0.0-0`),Se("caret return",u),u})},fce=(t,e)=>(Se("replaceXRanges",t,e),t.split(/\s+/).map(r=>Sce(r,e)).join(" ")),Sce=(t,e)=>{t=t.trim();let r=e.loose?Mt[Tt.XRANGELOOSE]:Mt[Tt.XRANGE];return t.replace(r,(n,o,s,i,a,c)=>{Se("xRange",t,n,o,s,i,a,c);let u=vt(s),l=u||vt(i),p=l||vt(a),_=p;return o==="="&&_&&(o=""),c=e.includePrerelease?"-0":"",u?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&_?(l&&(i=0),a=0,o===">"?(o=">=",l?(s=+s+1,i=0,a=0):(i=+i+1,a=0)):o==="<="&&(o="<",l?s=+s+1:i=+i+1),o==="<"&&(c="-0"),n=`${o+s}.${i}.${a}${c}`):l?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:p&&(n=`>=${s}.${i}.0${c} <${s}.${+i+1}.0-0`),Se("xRange return",n),n})},Tce=(t,e)=>(Se("replaceStars",t,e),t.trim().replace(Mt[Tt.STAR],"")),mce=(t,e)=>(Se("replaceGTE0",t,e),t.trim().replace(Mt[e.includePrerelease?Tt.GTE0PRE:Tt.GTE0],"")),hce=t=>(e,r,n,o,s,i,a,c,u,l,p,_)=>(vt(n)?r="":vt(o)?r=`>=${n}.0.0${t?"-0":""}`:vt(s)?r=`>=${n}.${o}.0${t?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,vt(u)?c="":vt(l)?c=`<${+u+1}.0.0-0`:vt(p)?c=`<${u}.${+l+1}.0-0`:_?c=`<=${u}.${l}.${p}-${_}`:t?c=`<${u}.${l}.${+p+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),gce=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Se(t[n].semver),t[n].semver!==KT.ANY&&t[n].semver.prerelease.length>0){let o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var bc=E((WVe,kx)=>{"use strict";var Lc=Symbol("SemVer ANY"),zT=class t{static get ANY(){return Lc}constructor(e,r){if(r=wx(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),XT("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Lc?this.value="":this.value=this.operator+this.semver.version,XT("comp",this)}parse(e){let r=this.options.loose?Vx[Bx.COMPARATORLOOSE]:Vx[Bx.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Gx(n[2],this.options.loose):this.semver=Lc}toString(){return this.value}test(e){if(XT("Comparator.test",e,this.options.loose),this.semver===Lc||e===Lc)return!0;if(typeof e=="string")try{e=new Gx(e,this.options)}catch{return!1}return WT(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Hx(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Hx(this.value,r).test(e.semver):(r=wx(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.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("=")||WT(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||WT(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};kx.exports=zT;var wx=Fp(),{safeRe:Vx,t:Bx}=Ri(),WT=jT(),XT=Mc(),Gx=St(),Hx=fr()});var Dc=E((XVe,Fx)=>{"use strict";var Ace=fr(),Rce=(t,e,r)=>{try{e=new Ace(e,r)}catch{return!1}return e.test(t)};Fx.exports=Rce});var jx=E((zVe,qx)=>{"use strict";var Oce=fr(),Nce=(t,e)=>new Oce(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));qx.exports=Nce});var $x=E((QVe,Yx)=>{"use strict";var Ice=St(),Pce=fr(),Cce=(t,e,r)=>{let n=null,o=null,s=null;try{s=new Pce(e,r)}catch{return null}return t.forEach(i=>{s.test(i)&&(!n||o.compare(i)===-1)&&(n=i,o=new Ice(n,r))}),n};Yx.exports=Cce});var Wx=E((JVe,Kx)=>{"use strict";var yce=St(),Mce=fr(),vce=(t,e,r)=>{let n=null,o=null,s=null;try{s=new Mce(e,r)}catch{return null}return t.forEach(i=>{s.test(i)&&(!n||o.compare(i)===1)&&(n=i,o=new yce(n,r))}),n};Kx.exports=vce});var Qx=E((ZVe,zx)=>{"use strict";var QT=St(),bce=fr(),Xx=vc(),Lce=(t,e)=>{t=new bce(t,e);let r=new QT("0.0.0");if(t.test(r)||(r=new QT("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let o=t.set[n],s=null;o.forEach(i=>{let a=new QT(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Xx(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),s&&(!r||Xx(r,s))&&(r=s)}return r&&t.test(r)?r:null};zx.exports=Lce});var Zx=E((eBe,Jx)=>{"use strict";var Dce=fr(),xce=(t,e)=>{try{return new Dce(t,e).range||"*"}catch{return null}};Jx.exports=xce});var Zp=E((tBe,nU)=>{"use strict";var Uce=St(),rU=bc(),{ANY:wce}=rU,Vce=fr(),Bce=Dc(),eU=vc(),tU=Wp(),Gce=zp(),Hce=Xp(),kce=(t,e,r,n)=>{t=new Uce(t,n),e=new Vce(e,n);let o,s,i,a,c;switch(r){case">":o=eU,s=Gce,i=tU,a=">",c=">=";break;case"<":o=tU,s=Hce,i=eU,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Bce(t,e,n))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],p=null,_=null;if(l.forEach(d=>{d.semver===wce&&(d=new rU(">=0.0.0")),p=p||d,_=_||d,o(d.semver,p.semver,n)?p=d:i(d.semver,_.semver,n)&&(_=d)}),p.operator===a||p.operator===c||(!_.operator||_.operator===a)&&s(t,_.semver))return!1;if(_.operator===c&&i(t,_.semver))return!1}return!0};nU.exports=kce});var sU=E((rBe,oU)=>{"use strict";var Fce=Zp(),qce=(t,e,r)=>Fce(t,e,">",r);oU.exports=qce});var aU=E((nBe,iU)=>{"use strict";var jce=Zp(),Yce=(t,e,r)=>jce(t,e,"<",r);iU.exports=Yce});var lU=E((oBe,uU)=>{"use strict";var cU=fr(),$ce=(t,e,r)=>(t=new cU(t,r),e=new cU(e,r),t.intersects(e,r));uU.exports=$ce});var _U=E((sBe,pU)=>{"use strict";var Kce=Dc(),Wce=Er();pU.exports=(t,e,r)=>{let n=[],o=null,s=null,i=t.sort((l,p)=>Wce(l,p,r));for(let l of i)Kce(l,e,r)?(s=l,o||(o=l)):(s&&n.push([o,s]),s=null,o=null);o&&n.push([o,null]);let a=[];for(let[l,p]of n)l===p?a.push(l):!p&&l===i[0]?a.push("*"):p?l===i[0]?a.push(`<=${p}`):a.push(`${l} - ${p}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e}});var mU=E((iBe,TU)=>{"use strict";var dU=fr(),ZT=bc(),{ANY:JT}=ZT,xc=Dc(),em=Er(),Xce=(t,e,r={})=>{if(t===e)return!0;t=new dU(t,r),e=new dU(e,r);let n=!1;e:for(let o of t.set){for(let s of e.set){let i=Qce(o,s,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},zce=[new ZT(">=0.0.0-0")],EU=[new ZT(">=0.0.0")],Qce=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===JT){if(e.length===1&&e[0].semver===JT)return!0;r.includePrerelease?t=zce:t=EU}if(e.length===1&&e[0].semver===JT){if(r.includePrerelease)return!0;e=EU}let n=new Set,o,s;for(let d of t)d.operator===">"||d.operator===">="?o=fU(o,d,r):d.operator==="<"||d.operator==="<="?s=SU(s,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(o&&s){if(i=em(o.semver,s.semver,r),i>0)return null;if(i===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let d of n){if(o&&!xc(d,String(o),r)||s&&!xc(d,String(s),r))return null;for(let S of e)if(!xc(d,String(S),r))return!1;return!0}let a,c,u,l,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let d of e){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",o){if(_&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===_.major&&d.semver.minor===_.minor&&d.semver.patch===_.patch&&(_=!1),d.operator===">"||d.operator===">="){if(a=fU(o,d,r),a===d&&a!==o)return!1}else if(o.operator===">="&&!xc(o.semver,String(d),r))return!1}if(s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator==="<"||d.operator==="<="){if(c=SU(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!xc(s.semver,String(d),r))return!1}if(!d.operator&&(s||o)&&i!==0)return!1}return!(o&&u&&!s&&i!==0||s&&l&&!o&&i!==0||_||p)},fU=(t,e,r)=>{if(!t)return e;let n=em(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},SU=(t,e,r)=>{if(!t)return e;let n=em(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};TU.exports=Xce});var rm=E((aBe,AU)=>{"use strict";var tm=Ri(),hU=yc(),Jce=St(),gU=GT(),Zce=Is(),eue=$D(),tue=WD(),rue=QD(),nue=ex(),oue=rx(),sue=ox(),iue=ix(),aue=cx(),cue=Er(),uue=_x(),lue=Ex(),pue=Kp(),_ue=mx(),due=gx(),Eue=vc(),fue=Wp(),Sue=FT(),Tue=qT(),mue=Xp(),hue=zp(),gue=jT(),Aue=Mx(),Rue=bc(),Oue=fr(),Nue=Dc(),Iue=jx(),Pue=$x(),Cue=Wx(),yue=Qx(),Mue=Zx(),vue=Zp(),bue=sU(),Lue=aU(),Due=lU(),xue=_U(),Uue=mU();AU.exports={parse:Zce,valid:eue,clean:tue,inc:rue,diff:nue,major:oue,minor:sue,patch:iue,prerelease:aue,compare:cue,rcompare:uue,compareLoose:lue,compareBuild:pue,sort:_ue,rsort:due,gt:Eue,lt:fue,eq:Sue,neq:Tue,gte:mue,lte:hue,cmp:gue,coerce:Aue,Comparator:Rue,Range:Oue,satisfies:Nue,toComparators:Iue,maxSatisfying:Pue,minSatisfying:Cue,minVersion:yue,validRange:Mue,outside:vue,gtr:bue,ltr:Lue,intersects:Due,simplifyRange:xue,subset:Uue,SemVer:Jce,re:tm.re,src:tm.src,tokens:tm.t,SEMVER_SPEC_VERSION:hU.SEMVER_SPEC_VERSION,RELEASE_TYPES:hU.RELEASE_TYPES,compareIdentifiers:gU.compareIdentifiers,rcompareIdentifiers:gU.rcompareIdentifiers}});var RU=E(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.VERSION=void 0;e_.VERSION="0.57.2"});var OU=E(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.SeverityNumber=void 0;var wue;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(wue=Uc.SeverityNumber||(Uc.SeverityNumber={}))});var r_=E(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.NOOP_LOGGER=Oi.NoopLogger=void 0;var t_=class{emit(e){}};Oi.NoopLogger=t_;Oi.NOOP_LOGGER=new t_});var o_=E(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.NOOP_LOGGER_PROVIDER=Ni.NoopLoggerProvider=void 0;var Vue=r_(),n_=class{getLogger(e,r,n){return new Vue.NoopLogger}};Ni.NoopLoggerProvider=n_;Ni.NOOP_LOGGER_PROVIDER=new n_});var om=E(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.ProxyLogger=void 0;var Bue=r_(),nm=class{constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Bue.NOOP_LOGGER}};s_.ProxyLogger=nm});var im=E(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});i_.ProxyLoggerProvider=void 0;var Gue=o_(),Hue=om(),sm=class{getLogger(e,r,n){var o;return(o=this.getDelegateLogger(e,r,n))!==null&&o!==void 0?o:new Hue.ProxyLogger(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Gue.NOOP_LOGGER_PROVIDER}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(e,r,n)}};i_.ProxyLoggerProvider=sm});var NU=E(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});a_._globalThis=void 0;a_._globalThis=typeof globalThis=="object"?globalThis:global});var IU=E(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});c_._globalThis=void 0;var kue=NU();Object.defineProperty(c_,"_globalThis",{enumerable:!0,get:function(){return kue._globalThis}})});var PU=E(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_._globalThis=void 0;var Fue=IU();Object.defineProperty(u_,"_globalThis",{enumerable:!0,get:function(){return Fue._globalThis}})});var CU=E(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.API_BACKWARDS_COMPATIBILITY_VERSION=sn.makeGetter=sn._global=sn.GLOBAL_LOGS_API_KEY=void 0;var que=PU();sn.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");sn._global=que._globalThis;function jue(t,e,r){return n=>n===t?e:r}sn.makeGetter=jue;sn.API_BACKWARDS_COMPATIBILITY_VERSION=1});var MU=E(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.LogsAPI=void 0;var Sr=CU(),Yue=o_(),yU=im(),am=class t{constructor(){this._proxyLoggerProvider=new yU.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Sr._global[Sr.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Sr._global[Sr.GLOBAL_LOGS_API_KEY]=(0,Sr.makeGetter)(Sr.API_BACKWARDS_COMPATIBILITY_VERSION,e,Yue.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Sr._global[Sr.GLOBAL_LOGS_API_KEY])===null||e===void 0?void 0:e.call(Sr._global,Sr.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Sr._global[Sr.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new yU.ProxyLoggerProvider}};l_.LogsAPI=am});var cm=E(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.logs=rt.ProxyLoggerProvider=rt.ProxyLogger=rt.NoopLoggerProvider=rt.NOOP_LOGGER_PROVIDER=rt.NoopLogger=rt.NOOP_LOGGER=rt.SeverityNumber=void 0;var $ue=OU();Object.defineProperty(rt,"SeverityNumber",{enumerable:!0,get:function(){return $ue.SeverityNumber}});var vU=r_();Object.defineProperty(rt,"NOOP_LOGGER",{enumerable:!0,get:function(){return vU.NOOP_LOGGER}});Object.defineProperty(rt,"NoopLogger",{enumerable:!0,get:function(){return vU.NoopLogger}});var bU=o_();Object.defineProperty(rt,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return bU.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rt,"NoopLoggerProvider",{enumerable:!0,get:function(){return bU.NoopLoggerProvider}});var Kue=om();Object.defineProperty(rt,"ProxyLogger",{enumerable:!0,get:function(){return Kue.ProxyLogger}});var Wue=im();Object.defineProperty(rt,"ProxyLoggerProvider",{enumerable:!0,get:function(){return Wue.ProxyLoggerProvider}});var Xue=MU();rt.logs=Xue.LogsAPI.getInstance()});var LU=E(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.disableInstrumentations=Ii.enableInstrumentations=void 0;function zue(t,e,r,n){for(let o=0,s=t.length;o<s;o++){let i=t[o];e&&i.setTracerProvider(e),r&&i.setMeterProvider(r),n&&i.setLoggerProvider&&i.setLoggerProvider(n),i.getConfig().enabled||i.enable()}}Ii.enableInstrumentations=zue;function Que(t){t.forEach(e=>e.disable())}Ii.disableInstrumentations=Que});var UU=E(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.registerInstrumentations=void 0;var DU=(M(),P(U)),Jue=cm(),xU=LU();function Zue(t){var e,r;let n=t.tracerProvider||DU.trace.getTracerProvider(),o=t.meterProvider||DU.metrics.getMeterProvider(),s=t.loggerProvider||Jue.logs.getLoggerProvider(),i=(r=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&r!==void 0?r:[];return(0,xU.enableInstrumentations)(i,n,o,s),()=>{(0,xU.disableInstrumentations)(i)}}p_.registerInstrumentations=Zue});var lm=E((RBe,BU)=>{"use strict";function um(t){return typeof t=="function"}var bt=console.error.bind(console);function wc(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}function Vc(t){t&&t.logger&&(um(t.logger)?bt=t.logger:bt("new logger isn't a function, not replacing"))}function wU(t,e,r){if(!t||!t[e]){bt("no original function "+e+" to wrap");return}if(!r){bt("no wrapper function"),bt(new Error().stack);return}if(!um(t[e])||!um(r)){bt("original object and wrapper must be functions");return}var n=t[e],o=r(n,e);return wc(o,"__original",n),wc(o,"__unwrap",function(){t[e]===o&&wc(t,e,n)}),wc(o,"__wrapped",!0),wc(t,e,o),o}function ele(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{bt("must provide one or more modules to patch"),bt(new Error().stack);return}if(!(e&&Array.isArray(e))){bt("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(o){wU(n,o,r)})})}function VU(t,e){if(!t||!t[e]){bt("no function to unwrap."),bt(new Error().stack);return}if(!t[e].__unwrap)bt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function tle(t,e){if(t)Array.isArray(t)||(t=[t]);else{bt("must provide one or more modules to patch"),bt(new Error().stack);return}if(!(e&&Array.isArray(e))){bt("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){VU(r,n)})})}Vc.wrap=wU;Vc.massWrap=ele;Vc.unwrap=VU;Vc.massUnwrap=tle;BU.exports=Vc});var GU=E(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.InstrumentationAbstract=void 0;var pm=(M(),P(U)),rle=cm(),__=lm(),_m=class{constructor(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=__.wrap,this._unwrap=__.unwrap,this._massWrap=__.massWrap,this._massUnwrap=__.massUnwrap,this.setConfig(n),this._diag=pm.diag.createComponentLogger({namespace:e}),this._tracer=pm.trace.getTracer(e,r),this._meter=pm.metrics.getMeter(e,r),this._logger=rle.logs.getLogger(e,r),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){var e;let r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config=Object.assign({enabled:!0},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,n,o){if(e)try{e(n,o)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}}};d_.InstrumentationAbstract=_m});var kU=E((NBe,HU)=>{var Pi=1e3,Ci=Pi*60,yi=Ci*60,Ps=yi*24,nle=Ps*7,ole=Ps*365.25;HU.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return sle(t);if(r==="number"&&isFinite(t))return e.long?ale(t):ile(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function sle(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ole;case"weeks":case"week":case"w":return r*nle;case"days":case"day":case"d":return r*Ps;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yi;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ci;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ile(t){var e=Math.abs(t);return e>=Ps?Math.round(t/Ps)+"d":e>=yi?Math.round(t/yi)+"h":e>=Ci?Math.round(t/Ci)+"m":e>=Pi?Math.round(t/Pi)+"s":t+"ms"}function ale(t){var e=Math.abs(t);return e>=Ps?E_(t,e,Ps,"day"):e>=yi?E_(t,e,yi,"hour"):e>=Ci?E_(t,e,Ci,"minute"):e>=Pi?E_(t,e,Pi,"second"):t+" ms"}function E_(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var dm=E((IBe,FU)=>{function cle(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=kU(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let p=0;for(let _=0;_<l.length;_++)p=(p<<5)-p+l.charCodeAt(_),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(l){let p,_=null,d,S;function f(...T){if(!f.enabled)return;let h=f,A=Number(new Date),N=A-(p||A);h.diff=N,h.prev=p,h.curr=A,p=A,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let I=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(b,v)=>{if(b==="%%")return"%";I++;let X=r.formatters[v];if(typeof X=="function"){let $=T[I];b=X.call(h,$),T.splice(I,1),I--}return b}),r.formatArgs.call(h,T),(h.log||r.log).apply(h,T)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(d!==r.namespaces&&(d=r.namespaces,S=r.enabled(l)),S),set:T=>{_=T}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let _=r(this.namespace+(typeof p>"u"?":":p)+l);return _.log=this.log,_}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let _ of p)_[0]==="-"?r.skips.push(_.slice(1)):r.names.push(_)}function s(l,p){let _=0,d=0,S=-1,f=0;for(;_<l.length;)if(d<p.length&&(p[d]===l[_]||p[d]==="*"))p[d]==="*"?(S=d,f=_,d++):(_++,d++);else if(S!==-1)d=S+1,f++,_=f;else return!1;for(;d<p.length&&p[d]==="*";)d++;return d===p.length}function i(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}FU.exports=cle});var qU=E((Ht,f_)=>{Ht.formatArgs=lle;Ht.save=ple;Ht.load=_le;Ht.useColors=ule;Ht.storage=dle();Ht.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ht.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ule(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lle(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+f_.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}Ht.log=console.debug||console.log||(()=>{});function ple(t){try{t?Ht.storage.setItem("debug",t):Ht.storage.removeItem("debug")}catch{}}function _le(){let t;try{t=Ht.storage.getItem("debug")||Ht.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function dle(){try{return localStorage}catch{}}f_.exports=dm()(Ht);var{formatters:Ele}=f_.exports;Ele.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var YU=E((PBe,jU)=>{"use strict";jU.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return n!==-1&&(o===-1||n<o)}});var WU=E((CBe,KU)=>{"use strict";var fle=require("os"),$U=require("tty"),Tr=YU(),{env:nt}=process,fo;Tr("no-color")||Tr("no-colors")||Tr("color=false")||Tr("color=never")?fo=0:(Tr("color")||Tr("colors")||Tr("color=true")||Tr("color=always"))&&(fo=1);"FORCE_COLOR"in nt&&(nt.FORCE_COLOR==="true"?fo=1:nt.FORCE_COLOR==="false"?fo=0:fo=nt.FORCE_COLOR.length===0?1:Math.min(parseInt(nt.FORCE_COLOR,10),3));function Em(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function fm(t,e){if(fo===0)return 0;if(Tr("color=16m")||Tr("color=full")||Tr("color=truecolor"))return 3;if(Tr("color=256"))return 2;if(t&&!e&&fo===void 0)return 0;let r=fo||0;if(nt.TERM==="dumb")return r;if(process.platform==="win32"){let n=fle.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in nt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in nt)||nt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(nt.TEAMCITY_VERSION)?1:0;if(nt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in nt){let n=parseInt((nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(nt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(nt.TERM)||"COLORTERM"in nt?1:r}function Sle(t){let e=fm(t,t&&t.isTTY);return Em(e)}KU.exports={supportsColor:Sle,stdout:Em(fm(!0,$U.isatty(1))),stderr:Em(fm(!0,$U.isatty(2)))}});var zU=E((ot,T_)=>{var Tle=require("tty"),S_=require("util");ot.init=Nle;ot.log=Ale;ot.formatArgs=hle;ot.save=Rle;ot.load=Ole;ot.useColors=mle;ot.destroy=S_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ot.colors=[6,2,3,4,5,1];try{let t=WU();t&&(t.stderr||t).level>=2&&(ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ot.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function mle(){return"colors"in ot.inspectOpts?!!ot.inspectOpts.colors:Tle.isatty(process.stderr.fd)}function hle(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
|
|
2
|
+
"use strict";var cz=Object.create;var Tl=Object.defineProperty;var uz=Object.getOwnPropertyDescriptor;var lz=Object.getOwnPropertyNames;var pz=Object.getPrototypeOf,_z=Object.prototype.hasOwnProperty;var w=(t,e)=>()=>(t&&(e=t(t=0)),e);var E=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Qf=(t,e)=>{for(var r in e)Tl(t,r,{get:e[r],enumerable:!0})},TO=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of lz(e))!_z.call(t,o)&&o!==r&&Tl(t,o,{get:()=>e[o],enumerable:!(n=uz(e,o))||n.enumerable});return t};var C=(t,e,r)=>(r=t!=null?cz(pz(t)):{},TO(e||!t||!t.__esModule?Tl(r,"default",{value:t,enumerable:!0}):r,t)),P=t=>TO(Tl({},"__esModule",{value:!0}),t);var _N=E((t0e,F8)=>{F8.exports={name:"@visa/cli",version:"1.14.0-rc.0",description:"AI-powered payments for Claude Code",bin:{"visa-cli":"./bin/visa-cli.js"},scripts:{build:"tsc --noEmit && node esbuild.config.js",dev:"tsc --watch",pretest:"pnpm build",start:"node dist/mcp-server/index.js",test:"jest --config jest.config.js","test:unit":"jest --config jest.config.js","test:unit:watch":"jest --config jest.config.js --watch","test:unit:coverage":"jest --config jest.config.js --coverage","test:smoke":"VISA_AUTH_URL=https://auth.visacli.sh jest --config jest.smoke.config.js","test:integration":"jest --config jest.integration.config.js","test:e2e":"jest --config jest.e2e.config.js","test:catalog-e2e":"jest --config jest.catalog-e2e.config.js","test:all":"npm run test:unit && npm run test:integration && npm run test:e2e",prepublishOnly:"npm run build && npm test",lint:"eslint src/**/*.ts",format:'prettier --write "src/**/*.ts"',"format:check":'prettier --check "src/**/*.ts"'},keywords:["visa","checkout","mcp","ai-agent","payments","click-to-pay","usdc","stablecoin"],author:"Visa Crypto Labs",license:"SEE LICENSE IN LICENSE",dependencies:{"@modelcontextprotocol/sdk":"^1.0.0",commander:"^12.1.0",zod:"^3.23.0"},devDependencies:{"@visa/observability":"workspace:*","@visa-cli/tools":"workspace:*","@changesets/changelog-git":"^0.2.1","@changesets/cli":"^2.31.0","@types/jest":"^30.0.0","@types/node":"^25.6.0","@typescript-eslint/eslint-plugin":"^8.59.1","@typescript-eslint/parser":"^8.59.1","@types/express":"^5.0.0",esbuild:"^0.27.4",express:"^4.21.0",eslint:"^10.0.2","eslint-config-prettier":"^10.1.8",jest:"^29.7.0",prettier:"^3.8.3","ts-jest":"^29.2.0",typescript:"^5.7.0"},engines:{node:">=18.0.0"},mcpName:"io.github.visa-crypto-labs/visa-cli",files:["bin/visa-cli.js","dist/","install.ps1","native/visa-keychain.m","server.json","README.md","LICENSE"]}});var Dn,mS=w(()=>{Dn="1.9.1"});function K8(t){let e=new Set([t]),r=new Set,n=t.match(fN);if(!n)return()=>!1;let o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(o.prerelease!=null)return function(c){return c===t};function s(a){return r.add(a),!1}function i(a){return e.add(a),!0}return function(c){if(e.has(c))return!0;if(r.has(c))return!1;let u=c.match(fN);if(!u)return s(c);let l={major:+u[1],minor:+u[2],patch:+u[3],prerelease:u[4]};return l.prerelease!=null||o.major!==l.major?s(c):o.major===0?o.minor===l.minor&&o.patch<=l.patch?i(c):s(c):o.minor<=l.minor?i(c):s(c)}}var fN,SN,TN=w(()=>{mS();fN=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;SN=K8(Dn)});function Zr(t,e,r,n=!1){var o;let s=fc[Ec]=(o=fc[Ec])!==null&&o!==void 0?o:{version:Dn};if(!n&&s[t]){let i=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return r.error(i.stack||i.message),!1}if(s.version!==Dn){let i=new Error(`@opentelemetry/api: Registration of version v${s.version} for ${t} does not match previously registered API v${Dn}`);return r.error(i.stack||i.message),!1}return s[t]=e,r.debug(`@opentelemetry/api: Registered a global for ${t} v${Dn}.`),!0}function er(t){var e,r;let n=(e=fc[Ec])===null||e===void 0?void 0:e.version;if(!(!n||!SN(n)))return(r=fc[Ec])===null||r===void 0?void 0:r[t]}function en(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v${Dn}.`);let r=fc[Ec];r&&delete r[t]}var W8,Ec,fc,ms=w(()=>{mS();TN();W8=Dn.split(".")[0],Ec=Symbol.for(`opentelemetry.js.api.${W8}`),fc=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Sc(t,e,r){let n=er("diag");if(n)return n[t](e,...r)}var kl,mN=w(()=>{ms();kl=class{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return Sc("debug",this._namespace,e)}error(...e){return Sc("error",this._namespace,e)}info(...e){return Sc("info",this._namespace,e)}warn(...e){return Sc("warn",this._namespace,e)}verbose(...e){return Sc("verbose",this._namespace,e)}}});var $e,Fl=w(()=>{(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})($e||($e={}))});function hN(t,e){t<$e.NONE?t=$e.NONE:t>$e.ALL&&(t=$e.ALL),e=e||{};function r(n,o){let s=e[n];return typeof s=="function"&&t>=o?s.bind(e):function(){}}return{error:r("error",$e.ERROR),warn:r("warn",$e.WARN),info:r("info",$e.INFO),debug:r("debug",$e.DEBUG),verbose:r("verbose",$e.VERBOSE)}}var gN=w(()=>{Fl()});var X8,Ze,hs=w(()=>{mN();gN();Fl();ms();X8="diag",Ze=class t{static instance(){return this._instance||(this._instance=new t),this._instance}constructor(){function e(o){return function(...s){let i=er("diag");if(i)return i[o](...s)}}let r=this,n=(o,s={logLevel:$e.INFO})=>{var i,a,c;if(o===r){let p=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return r.error((i=p.stack)!==null&&i!==void 0?i:p.message),!1}typeof s=="number"&&(s={logLevel:s});let u=er("diag"),l=hN((a=s.logLevel)!==null&&a!==void 0?a:$e.INFO,o);if(u&&!s.suppressOverrideMessage){let p=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn(`Current logger will be overwritten from ${p}`),l.warn(`Current logger will overwrite one already registered from ${p}`)}return Zr("diag",l,r,!0)};r.setLogger=n,r.disable=()=>{en(X8,r)},r.createComponentLogger=o=>new kl(o),r.verbose=e("verbose"),r.debug=e("debug"),r.info=e("info"),r.warn=e("warn"),r.error=e("error")}}});var ql,AN=w(()=>{ql=class t{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let r=this._entries.get(e);if(r)return Object.assign({},r)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,r){let n=new t(this._entries);return n._entries.set(e,r),n}removeEntry(e){let r=new t(this._entries);return r._entries.delete(e),r}removeEntries(...e){let r=new t(this._entries);for(let n of e)r._entries.delete(n);return r}clear(){return new t}}});var RN,ON=w(()=>{RN=Symbol("BaggageEntryMetadata")});function NN(t={}){return new ql(new Map(Object.entries(t)))}function IN(t){return typeof t!="string"&&(z8.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:RN,toString(){return t}}}var z8,hS=w(()=>{hs();AN();ON();z8=Ze.instance()});function Lr(t){return Symbol.for(t)}var gS,_i,Tc=w(()=>{gS=class t{constructor(e){let r=this;r._currentContext=e?new Map(e):new Map,r.getValue=n=>r._currentContext.get(n),r.setValue=(n,o)=>{let s=new t(r._currentContext);return s._currentContext.set(n,o),s},r.deleteValue=n=>{let o=new t(r._currentContext);return o._currentContext.delete(n),o}}},_i=new gS});var AS,RS,jl,PN=w(()=>{AS=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],RS={};if(typeof console<"u"){let t=["error","warn","info","debug","trace","log"];for(let e of t)typeof console[e]=="function"&&(RS[e]=console[e])}jl=class{constructor(){function e(r){return function(...n){let o=RS[r];if(typeof o!="function"&&(o=RS.log),typeof o!="function"&&console&&(o=console[r],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,n)}}for(let r=0;r<AS.length;r++)this[AS[r].n]=e(AS[r].c)}}});function CN(){return bS}var OS,di,NS,IS,PS,CS,mc,yS,MS,vS,bS,Q8,J8,Z8,e6,t6,r6,n6,LS=w(()=>{OS=class{constructor(){}createGauge(e,r){return J8}createHistogram(e,r){return Z8}createCounter(e,r){return Q8}createUpDownCounter(e,r){return e6}createObservableGauge(e,r){return r6}createObservableCounter(e,r){return t6}createObservableUpDownCounter(e,r){return n6}addBatchObservableCallback(e,r){}removeBatchObservableCallback(e){}},di=class{},NS=class extends di{add(e,r){}},IS=class extends di{add(e,r){}},PS=class extends di{record(e,r){}},CS=class extends di{record(e,r){}},mc=class{addCallback(e){}removeCallback(e){}},yS=class extends mc{},MS=class extends mc{},vS=class extends mc{},bS=new OS,Q8=new NS,J8=new PS,Z8=new CS,e6=new IS,t6=new yS,r6=new MS,n6=new vS});var Yl,yN=w(()=>{(function(t){t[t.INT=0]="INT",t[t.DOUBLE=1]="DOUBLE"})(Yl||(Yl={}))});var $l,Kl,DS=w(()=>{$l={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},Kl={set(t,e,r){t!=null&&(t[e]=r)}}});var Wl,MN=w(()=>{Tc();Wl=class{active(){return _i}with(e,r,n,...o){return r.call(n,...o)}bind(e,r){return r}enable(){return this}disable(){return this}}});var xS,o6,tn,hc=w(()=>{MN();ms();hs();xS="context",o6=new Wl,tn=class t{constructor(){}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalContextManager(e){return Zr(xS,e,Ze.instance())}active(){return this._getContextManager().active()}with(e,r,n,...o){return this._getContextManager().with(e,r,n,...o)}bind(e,r){return this._getContextManager().bind(e,r)}_getContextManager(){return er(xS)||o6}disable(){this._getContextManager().disable(),en(xS,Ze.instance())}}});var pr,US=w(()=>{(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(pr||(pr={}))});var gc,gs,Xl,zl=w(()=>{US();gc="0000000000000000",gs="00000000000000000000000000000000",Xl={traceId:gs,spanId:gc,traceFlags:pr.NONE}});var rn,Ql=w(()=>{zl();rn=class{constructor(e=Xl){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,r){return this}setAttributes(e){return this}addEvent(e,r){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,r){}}});function Jl(t){return t.getValue(wS)||void 0}function vN(){return Jl(tn.getInstance().active())}function Ac(t,e){return t.setValue(wS,e)}function bN(t){return t.deleteValue(wS)}function LN(t,e){return Ac(t,new rn(e))}function Zl(t){var e;return(e=Jl(t))===null||e===void 0?void 0:e.spanContext()}var wS,VS=w(()=>{Tc();Ql();hc();wS=Lr("OpenTelemetry Context Key SPAN")});function DN(t,e){if(typeof t!="string"||t.length!==e)return!1;let r=0;for(let n=0;n<t.length;n+=4)r+=(ep[t.charCodeAt(n)]|0)+(ep[t.charCodeAt(n+1)]|0)+(ep[t.charCodeAt(n+2)]|0)+(ep[t.charCodeAt(n+3)]|0);return r===e}function BS(t){return DN(t,32)&&t!==gs}function GS(t){return DN(t,16)&&t!==gc}function xn(t){return BS(t.traceId)&&GS(t.spanId)}function xN(t){return new rn(t)}var ep,tp=w(()=>{zl();Ql();ep=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1])});function s6(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}var HS,Ei,kS=w(()=>{hc();VS();Ql();tp();HS=tn.getInstance(),Ei=class{startSpan(e,r,n=HS.active()){if(!!r?.root)return new rn;let s=n&&Zl(n);return s6(s)&&xn(s)?new rn(s):new rn}startActiveSpan(e,r,n,o){let s,i,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);let c=i??HS.active(),u=this.startSpan(e,s,c),l=Ac(c,u);return HS.with(l,a,void 0,u)}}});var i6,fi,FS=w(()=>{kS();i6=new Ei,fi=class{constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}startSpan(e,r,n){return this._getTracer().startSpan(e,r,n)}startActiveSpan(e,r,n,o){let s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):i6}}});var rp,UN=w(()=>{kS();rp=class{getTracer(e,r,n){return new Ei}}});var a6,As,qS=w(()=>{FS();UN();a6=new rp,As=class{getTracer(e,r,n){var o;return(o=this.getDelegateTracer(e,r,n))!==null&&o!==void 0?o:new fi(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:a6}setDelegate(e){this._delegate=e}getDelegateTracer(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(e,r,n)}}});var np,wN=w(()=>{(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(np||(np={}))});var ct,VN=w(()=>{(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(ct||(ct={}))});var fe,BN=w(()=>{(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(fe||(fe={}))});function GN(t){return l6.test(t)}function HN(t){return p6.test(t)&&!_6.test(t)}var jS,c6,u6,l6,p6,_6,kN=w(()=>{jS="[_0-9a-z-*/]",c6=`[a-z]${jS}{0,255}`,u6=`[a-z0-9]${jS}{0,240}@[a-z]${jS}{0,13}`,l6=new RegExp(`^(?:${c6}|${u6})$`),p6=/^[ -~]{0,255}[!-~]$/,_6=/,|=/});var FN,d6,qN,jN,op,YN=w(()=>{kN();FN=32,d6=512,qN=",",jN="=",op=class t{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return Array.from(this._internalState.keys()).reduceRight((e,r)=>(e.push(r+jN+this.get(r)),e),[]).join(qN)}_parse(e){e.length>d6||(this._internalState=e.split(qN).reduceRight((r,n)=>{let o=n.trim(),s=o.indexOf(jN);if(s!==-1){let i=o.slice(0,s),a=o.slice(s+1,n.length);GN(i)&&HN(a)&&r.set(i,a)}return r},new Map),this._internalState.size>FN&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,FN))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}}});function $N(t){return new op(t)}var KN=w(()=>{YN()});var F,WN=w(()=>{hc();F=tn.getInstance()});var tr,XN=w(()=>{hs();tr=Ze.instance()});var YS,zN,QN=w(()=>{LS();YS=class{getMeter(e,r,n){return bS}},zN=new YS});var $S,sp,JN=w(()=>{QN();ms();hs();$S="metrics",sp=class t{constructor(){}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalMeterProvider(e){return Zr($S,e,Ze.instance())}getMeterProvider(){return er($S)||zN}getMeter(e,r,n){return this.getMeterProvider().getMeter(e,r,n)}disable(){en($S,Ze.instance())}}});var KS,ZN=w(()=>{JN();KS=sp.getInstance()});var ip,eI=w(()=>{ip=class{inject(e,r){}extract(e,r){return e}fields(){return[]}}});function XS(t){return t.getValue(WS)||void 0}function tI(){return XS(tn.getInstance().active())}function rI(t,e){return t.setValue(WS,e)}function nI(t){return t.deleteValue(WS)}var WS,oI=w(()=>{hc();Tc();WS=Lr("OpenTelemetry Baggage Key")});var zS,E6,ap,sI=w(()=>{ms();eI();DS();oI();hS();hs();zS="propagation",E6=new ip,ap=class t{constructor(){this.createBaggage=NN,this.getBaggage=XS,this.getActiveBaggage=tI,this.setBaggage=rI,this.deleteBaggage=nI}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalPropagator(e){return Zr(zS,e,Ze.instance())}inject(e,r,n=Kl){return this._getGlobalPropagator().inject(e,r,n)}extract(e,r,n=$l){return this._getGlobalPropagator().extract(e,r,n)}fields(){return this._getGlobalPropagator().fields()}disable(){en(zS,Ze.instance())}_getGlobalPropagator(){return er(zS)||E6}}});var yt,iI=w(()=>{sI();yt=ap.getInstance()});var QS,cp,aI=w(()=>{ms();qS();tp();VS();hs();QS="trace",cp=class t{constructor(){this._proxyTracerProvider=new As,this.wrapSpanContext=xN,this.isSpanContextValid=xn,this.deleteSpan=bN,this.getSpan=Jl,this.getActiveSpan=vN,this.getSpanContext=Zl,this.setSpan=Ac,this.setSpanContext=LN}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalTracerProvider(e){let r=Zr(QS,this._proxyTracerProvider,Ze.instance());return r&&this._proxyTracerProvider.setDelegate(e),r}getTracerProvider(){return er(QS)||this._proxyTracerProvider}getTracer(e,r){return this.getTracerProvider().getTracer(e,r)}disable(){en(QS,Ze.instance()),this._proxyTracerProvider=new As}}});var K,cI=w(()=>{aI();K=cp.getInstance()});var U={};Qf(U,{DiagConsoleLogger:()=>jl,DiagLogLevel:()=>$e,INVALID_SPANID:()=>gc,INVALID_SPAN_CONTEXT:()=>Xl,INVALID_TRACEID:()=>gs,ProxyTracer:()=>fi,ProxyTracerProvider:()=>As,ROOT_CONTEXT:()=>_i,SamplingDecision:()=>np,SpanKind:()=>ct,SpanStatusCode:()=>fe,TraceFlags:()=>pr,ValueType:()=>Yl,baggageEntryMetadataFromString:()=>IN,context:()=>F,createContextKey:()=>Lr,createNoopMeter:()=>CN,createTraceState:()=>$N,default:()=>f6,defaultTextMapGetter:()=>$l,defaultTextMapSetter:()=>Kl,diag:()=>tr,isSpanContextValid:()=>xn,isValidSpanId:()=>GS,isValidTraceId:()=>BS,metrics:()=>KS,propagation:()=>yt,trace:()=>K});var f6,M=w(()=>{hS();Tc();PN();Fl();LS();yN();DS();FS();qS();wN();VN();BN();US();KN();tp();zl();WN();XN();ZN();iI();cI();f6={context:F,diag:tr,metrics:KS,propagation:yt,trace:K}});var Rc=E(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.isTracingSuppressed=uo.unsuppressTracing=uo.suppressTracing=void 0;var S6=(M(),P(U)),JS=(0,S6.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function T6(t){return t.setValue(JS,!0)}uo.suppressTracing=T6;function m6(t){return t.deleteValue(JS)}uo.unsuppressTracing=m6;function h6(t){return t.getValue(JS)===!0}uo.isTracingSuppressed=h6});var ZS=E(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.BAGGAGE_MAX_TOTAL_LENGTH=Et.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Et.BAGGAGE_MAX_NAME_VALUE_PAIRS=Et.BAGGAGE_HEADER=Et.BAGGAGE_ITEMS_SEPARATOR=Et.BAGGAGE_PROPERTIES_SEPARATOR=Et.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Et.BAGGAGE_KEY_PAIR_SEPARATOR="=";Et.BAGGAGE_PROPERTIES_SEPARATOR=";";Et.BAGGAGE_ITEMS_SEPARATOR=",";Et.BAGGAGE_HEADER="baggage";Et.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Et.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Et.BAGGAGE_MAX_TOTAL_LENGTH=8192});var eT=E(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.parseKeyPairsIntoRecord=nn.parsePairKeyValue=nn.getKeyPairs=nn.serializeKeyPairs=void 0;var g6=(M(),P(U)),Rs=ZS();function A6(t){return t.reduce((e,r)=>{let n=`${e}${e!==""?Rs.BAGGAGE_ITEMS_SEPARATOR:""}${r}`;return n.length>Rs.BAGGAGE_MAX_TOTAL_LENGTH?e:n},"")}nn.serializeKeyPairs=A6;function R6(t){return t.getAllEntries().map(([e,r])=>{let n=`${encodeURIComponent(e)}=${encodeURIComponent(r.value)}`;return r.metadata!==void 0&&(n+=Rs.BAGGAGE_PROPERTIES_SEPARATOR+r.metadata.toString()),n})}nn.getKeyPairs=R6;function uI(t){let e=t.split(Rs.BAGGAGE_PROPERTIES_SEPARATOR);if(e.length<=0)return;let r=e.shift();if(!r)return;let n=r.indexOf(Rs.BAGGAGE_KEY_PAIR_SEPARATOR);if(n<=0)return;let o=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim()),i;return e.length>0&&(i=(0,g6.baggageEntryMetadataFromString)(e.join(Rs.BAGGAGE_PROPERTIES_SEPARATOR))),{key:o,value:s,metadata:i}}nn.parsePairKeyValue=uI;function O6(t){return typeof t!="string"||t.length===0?{}:t.split(Rs.BAGGAGE_ITEMS_SEPARATOR).map(e=>uI(e)).filter(e=>e!==void 0&&e.value.length>0).reduce((e,r)=>(e[r.key]=r.value,e),{})}nn.parseKeyPairsIntoRecord=O6});var lI=E(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.W3CBaggagePropagator=void 0;var tT=(M(),P(U)),N6=Rc(),Os=ZS(),rT=eT(),nT=class{inject(e,r,n){let o=tT.propagation.getBaggage(e);if(!o||(0,N6.isTracingSuppressed)(e))return;let s=(0,rT.getKeyPairs)(o).filter(a=>a.length<=Os.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,Os.BAGGAGE_MAX_NAME_VALUE_PAIRS),i=(0,rT.serializeKeyPairs)(s);i.length>0&&n.set(r,Os.BAGGAGE_HEADER,i)}extract(e,r,n){let o=n.get(r,Os.BAGGAGE_HEADER),s=Array.isArray(o)?o.join(Os.BAGGAGE_ITEMS_SEPARATOR):o;if(!s)return e;let i={};return s.length===0||(s.split(Os.BAGGAGE_ITEMS_SEPARATOR).forEach(c=>{let u=(0,rT.parsePairKeyValue)(c);if(u){let l={value:u.value};u.metadata&&(l.metadata=u.metadata),i[u.key]=l}}),Object.entries(i).length===0)?e:tT.propagation.setBaggage(e,tT.propagation.createBaggage(i))}fields(){return[Os.BAGGAGE_HEADER]}};up.W3CBaggagePropagator=nT});var pI=E(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.AnchoredClock=void 0;var oT=class{constructor(e,r){this._monotonicClock=r,this._epochMillis=e.now(),this._performanceMillis=r.now()}now(){let e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e}};lp.AnchoredClock=oT});var SI=E(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.isAttributeValue=lo.isAttributeKey=lo.sanitizeAttributes=void 0;var _I=(M(),P(U));function I6(t){let e={};if(typeof t!="object"||t==null)return e;for(let[r,n]of Object.entries(t)){if(!dI(r)){_I.diag.warn(`Invalid attribute key: ${r}`);continue}if(!EI(n)){_I.diag.warn(`Invalid attribute value set for key: ${r}`);continue}Array.isArray(n)?e[r]=n.slice():e[r]=n}return e}lo.sanitizeAttributes=I6;function dI(t){return typeof t=="string"&&t.length>0}lo.isAttributeKey=dI;function EI(t){return t==null?!0:Array.isArray(t)?P6(t):fI(t)}lo.isAttributeValue=EI;function P6(t){let e;for(let r of t)if(r!=null){if(!e){if(fI(r)){e=typeof r;continue}return!1}if(typeof r!==e)return!1}return!0}function fI(t){switch(typeof t){case"number":case"boolean":case"string":return!0}return!1}});var sT=E(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.loggingErrorHandler=void 0;var C6=(M(),P(U));function y6(){return t=>{C6.diag.error(M6(t))}}pp.loggingErrorHandler=y6;function M6(t){return typeof t=="string"?t:JSON.stringify(v6(t))}function v6(t){let e={},r=t;for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n=>{if(e[n])return;let o=r[n];o&&(e[n]=String(o))}),r=Object.getPrototypeOf(r);return e}});var iT=E(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.globalErrorHandler=Si.setGlobalErrorHandler=void 0;var b6=sT(),TI=(0,b6.loggingErrorHandler)();function L6(t){TI=t}Si.setGlobalErrorHandler=L6;function D6(t){try{TI(t)}catch{}}Si.globalErrorHandler=D6});var aT=E(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.TracesSamplerValues=void 0;var x6;(function(t){t.AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})(x6=Oc.TracesSamplerValues||(Oc.TracesSamplerValues={}))});var cT=E(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.parseEnvironment=Re.DEFAULT_ENVIRONMENT=Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT=Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=void 0;var po=(M(),P(U)),U6=aT(),w6=",",V6=["OTEL_SDK_DISABLED"];function B6(t){return V6.indexOf(t)>-1}var G6=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function H6(t){return G6.indexOf(t)>-1}var k6=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function F6(t){return k6.indexOf(t)>-1}Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=1/0;Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT=128;Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=128;Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=128;Re.DEFAULT_ENVIRONMENT={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:po.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Re.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Re.DEFAULT_ATTRIBUTE_COUNT_LIMIT,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:Re.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:Re.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:U6.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function q6(t,e,r){if(typeof r[t]>"u")return;let n=String(r[t]);e[t]=n.toLowerCase()==="true"}function j6(t,e,r,n=-1/0,o=1/0){if(typeof r[t]<"u"){let s=Number(r[t]);isNaN(s)||(s<n?e[t]=n:s>o?e[t]=o:e[t]=s)}}function Y6(t,e,r,n=w6){let o=r[t];typeof o=="string"&&(e[t]=o.split(n).map(s=>s.trim()))}var $6={ALL:po.DiagLogLevel.ALL,VERBOSE:po.DiagLogLevel.VERBOSE,DEBUG:po.DiagLogLevel.DEBUG,INFO:po.DiagLogLevel.INFO,WARN:po.DiagLogLevel.WARN,ERROR:po.DiagLogLevel.ERROR,NONE:po.DiagLogLevel.NONE};function K6(t,e,r){let n=r[t];if(typeof n=="string"){let o=$6[n.toUpperCase()];o!=null&&(e[t]=o)}}function W6(t){let e={};for(let r in Re.DEFAULT_ENVIRONMENT){let n=r;switch(n){case"OTEL_LOG_LEVEL":K6(n,e,t);break;default:if(B6(n))q6(n,e,t);else if(H6(n))j6(n,e,t);else if(F6(n))Y6(n,e,t);else{let o=t[n];typeof o<"u"&&o!==null&&(e[n]=String(o))}}}return e}Re.parseEnvironment=W6});var mI=E(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.getEnvWithoutDefaults=Ti.getEnv=void 0;var uT=cT();function X6(){let t=(0,uT.parseEnvironment)(process.env);return Object.assign({},uT.DEFAULT_ENVIRONMENT,t)}Ti.getEnv=X6;function z6(){return(0,uT.parseEnvironment)(process.env)}Ti.getEnvWithoutDefaults=z6});var hI=E(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p._globalThis=void 0;_p._globalThis=typeof globalThis=="object"?globalThis:global});var lT=E(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.hexToBinary=void 0;function gI(t){return t>=48&&t<=57?t-48:t>=97&&t<=102?t-87:t-55}function Q6(t){let e=new Uint8Array(t.length/2),r=0;for(let n=0;n<t.length;n+=2){let o=gI(t.charCodeAt(n)),s=gI(t.charCodeAt(n+1));e[r++]=o<<4|s}return e}dp.hexToBinary=Q6});var AI=E(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.hexToBase64=void 0;var J6=lT();function Z6(t){return Buffer.from((0,J6.hexToBinary)(t)).toString("base64")}Ep.hexToBase64=Z6});var NI=E(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.RandomIdGenerator=void 0;var e9=8,OI=16,pT=class{constructor(){this.generateTraceId=RI(OI),this.generateSpanId=RI(e9)}};Sp.RandomIdGenerator=pT;var fp=Buffer.allocUnsafe(OI);function RI(t){return function(){for(let r=0;r<t/4;r++)fp.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(fp[r]>0);r++)r===t-1&&(fp[t-1]=1);return fp.toString("hex",0,t)}}});var II=E(Tp=>{"use strict";Object.defineProperty(Tp,"__esModule",{value:!0});Tp.otperformance=void 0;var t9=require("perf_hooks");Tp.otperformance=t9.performance});var _T=E(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.VERSION=void 0;mp.VERSION="1.30.1"});function Ue(t){for(var e={},r=t.length,n=0;n<r;n++){var o=t[n];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var dT=w(()=>{});var PI,CI,yI,MI,vI,bI,LI,DI,xI,UI,wI,VI,BI,GI,HI,kI,FI,qI,jI,YI,$I,KI,WI,XI,zI,QI,JI,ZI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,lP,pP,_P,dP,EP,fP,SP,TP,mP,hP,gP,AP,RP,OP,NP,IP,PP,CP,yP,MP,vP,bP,LP,DP,xP,UP,wP,VP,BP,GP,HP,kP,FP,qP,jP,YP,$P,KP,WP,XP,zP,QP,JP,ZP,eC,tC,rC,nC,oC,sC,iC,aC,cC,uC,lC,pC,_C,dC,EC,fC,SC,TC,mC,hC,gC,AC,RC,OC,NC,IC,PC,CC,yC,MC,vC,bC,LC,DC,xC,UC,wC,VC,BC,GC,HC,kC,FC,qC,jC,YC,r9,n9,o9,s9,i9,a9,c9,u9,l9,p9,_9,d9,E9,f9,S9,T9,m9,h9,g9,A9,R9,O9,N9,I9,P9,C9,y9,M9,v9,b9,L9,D9,x9,U9,w9,V9,B9,G9,H9,k9,F9,q9,j9,Y9,$9,K9,W9,X9,z9,Q9,J9,Z9,eQ,tQ,rQ,nQ,oQ,sQ,iQ,aQ,cQ,uQ,lQ,pQ,_Q,dQ,EQ,fQ,SQ,TQ,mQ,hQ,gQ,AQ,RQ,OQ,NQ,IQ,PQ,CQ,yQ,MQ,vQ,bQ,LQ,DQ,xQ,UQ,wQ,VQ,BQ,GQ,HQ,kQ,FQ,qQ,jQ,YQ,$Q,KQ,WQ,XQ,zQ,QQ,JQ,ZQ,eJ,tJ,rJ,nJ,oJ,sJ,iJ,aJ,cJ,uJ,lJ,pJ,_J,dJ,EJ,fJ,SJ,TJ,mJ,hJ,gJ,AJ,RJ,$C,KC,WC,XC,zC,QC,JC,ZC,ey,ty,ry,ny,oy,sy,iy,ay,cy,uy,ly,py,_y,dy,Ey,fy,Sy,Ty,my,hy,gy,Ay,Ry,Oy,Ny,Iy,Py,Cy,yy,My,vy,by,Ly,Dy,xy,Uy,wy,Vy,By,OJ,NJ,IJ,PJ,CJ,yJ,MJ,vJ,bJ,LJ,DJ,xJ,UJ,wJ,VJ,BJ,GJ,HJ,kJ,FJ,qJ,jJ,YJ,$J,KJ,WJ,XJ,zJ,QJ,JJ,ZJ,eZ,tZ,rZ,nZ,oZ,sZ,iZ,aZ,cZ,uZ,lZ,pZ,_Z,dZ,EZ,fZ,SZ,Gy,Hy,ky,Fy,qy,jy,Yy,$y,Ky,Wy,Xy,TZ,mZ,hZ,gZ,AZ,RZ,OZ,NZ,IZ,PZ,CZ,yZ,zy,Qy,Jy,Zy,eM,MZ,vZ,bZ,LZ,DZ,xZ,tM,rM,nM,UZ,wZ,VZ,BZ,oM,sM,iM,aM,GZ,HZ,kZ,FZ,qZ,cM,uM,lM,pM,_M,dM,EM,jZ,YZ,$Z,KZ,WZ,XZ,zZ,QZ,fM,SM,TM,mM,hM,JZ,ZZ,e7,t7,r7,n7,gM,AM,RM,OM,NM,IM,PM,CM,yM,MM,vM,bM,LM,DM,xM,UM,wM,VM,BM,GM,HM,o7,s7,i7,a7,c7,u7,l7,p7,_7,d7,E7,f7,S7,T7,m7,h7,g7,A7,R7,O7,N7,I7,kM,FM,qM,jM,YM,P7,C7,y7,M7,v7,b7,$M,KM,L7,D7,x7,WM,XM,U7,w7,V7,zM,QM,JM,ZM,ev,tv,rv,nv,ov,sv,iv,av,cv,uv,lv,pv,_v,B7,G7,H7,k7,F7,q7,j7,Y7,$7,K7,W7,X7,z7,Q7,J7,Z7,eee,tee,dv,Ev,ree,nee,oee,fv=w(()=>{dT();PI="aws.lambda.invoked_arn",CI="db.system",yI="db.connection_string",MI="db.user",vI="db.jdbc.driver_classname",bI="db.name",LI="db.statement",DI="db.operation",xI="db.mssql.instance_name",UI="db.cassandra.keyspace",wI="db.cassandra.page_size",VI="db.cassandra.consistency_level",BI="db.cassandra.table",GI="db.cassandra.idempotence",HI="db.cassandra.speculative_execution_count",kI="db.cassandra.coordinator.id",FI="db.cassandra.coordinator.dc",qI="db.hbase.namespace",jI="db.redis.database_index",YI="db.mongodb.collection",$I="db.sql.table",KI="exception.type",WI="exception.message",XI="exception.stacktrace",zI="exception.escaped",QI="faas.trigger",JI="faas.execution",ZI="faas.document.collection",eP="faas.document.operation",tP="faas.document.time",rP="faas.document.name",nP="faas.time",oP="faas.cron",sP="faas.coldstart",iP="faas.invoked_name",aP="faas.invoked_provider",cP="faas.invoked_region",uP="net.transport",lP="net.peer.ip",pP="net.peer.port",_P="net.peer.name",dP="net.host.ip",EP="net.host.port",fP="net.host.name",SP="net.host.connection.type",TP="net.host.connection.subtype",mP="net.host.carrier.name",hP="net.host.carrier.mcc",gP="net.host.carrier.mnc",AP="net.host.carrier.icc",RP="peer.service",OP="enduser.id",NP="enduser.role",IP="enduser.scope",PP="thread.id",CP="thread.name",yP="code.function",MP="code.namespace",vP="code.filepath",bP="code.lineno",LP="http.method",DP="http.url",xP="http.target",UP="http.host",wP="http.scheme",VP="http.status_code",BP="http.flavor",GP="http.user_agent",HP="http.request_content_length",kP="http.request_content_length_uncompressed",FP="http.response_content_length",qP="http.response_content_length_uncompressed",jP="http.server_name",YP="http.route",$P="http.client_ip",KP="aws.dynamodb.table_names",WP="aws.dynamodb.consumed_capacity",XP="aws.dynamodb.item_collection_metrics",zP="aws.dynamodb.provisioned_read_capacity",QP="aws.dynamodb.provisioned_write_capacity",JP="aws.dynamodb.consistent_read",ZP="aws.dynamodb.projection",eC="aws.dynamodb.limit",tC="aws.dynamodb.attributes_to_get",rC="aws.dynamodb.index_name",nC="aws.dynamodb.select",oC="aws.dynamodb.global_secondary_indexes",sC="aws.dynamodb.local_secondary_indexes",iC="aws.dynamodb.exclusive_start_table",aC="aws.dynamodb.table_count",cC="aws.dynamodb.scan_forward",uC="aws.dynamodb.segment",lC="aws.dynamodb.total_segments",pC="aws.dynamodb.count",_C="aws.dynamodb.scanned_count",dC="aws.dynamodb.attribute_definitions",EC="aws.dynamodb.global_secondary_index_updates",fC="messaging.system",SC="messaging.destination",TC="messaging.destination_kind",mC="messaging.temp_destination",hC="messaging.protocol",gC="messaging.protocol_version",AC="messaging.url",RC="messaging.message_id",OC="messaging.conversation_id",NC="messaging.message_payload_size_bytes",IC="messaging.message_payload_compressed_size_bytes",PC="messaging.operation",CC="messaging.consumer_id",yC="messaging.rabbitmq.routing_key",MC="messaging.kafka.message_key",vC="messaging.kafka.consumer_group",bC="messaging.kafka.client_id",LC="messaging.kafka.partition",DC="messaging.kafka.tombstone",xC="rpc.system",UC="rpc.service",wC="rpc.method",VC="rpc.grpc.status_code",BC="rpc.jsonrpc.version",GC="rpc.jsonrpc.request_id",HC="rpc.jsonrpc.error_code",kC="rpc.jsonrpc.error_message",FC="message.type",qC="message.id",jC="message.compressed_size",YC="message.uncompressed_size",r9=PI,n9=CI,o9=yI,s9=MI,i9=vI,a9=bI,c9=LI,u9=DI,l9=xI,p9=UI,_9=wI,d9=VI,E9=BI,f9=GI,S9=HI,T9=kI,m9=FI,h9=qI,g9=jI,A9=YI,R9=$I,O9=KI,N9=WI,I9=XI,P9=zI,C9=QI,y9=JI,M9=ZI,v9=eP,b9=tP,L9=rP,D9=nP,x9=oP,U9=sP,w9=iP,V9=aP,B9=cP,G9=uP,H9=lP,k9=pP,F9=_P,q9=dP,j9=EP,Y9=fP,$9=SP,K9=TP,W9=mP,X9=hP,z9=gP,Q9=AP,J9=RP,Z9=OP,eQ=NP,tQ=IP,rQ=PP,nQ=CP,oQ=yP,sQ=MP,iQ=vP,aQ=bP,cQ=LP,uQ=DP,lQ=xP,pQ=UP,_Q=wP,dQ=VP,EQ=BP,fQ=GP,SQ=HP,TQ=kP,mQ=FP,hQ=qP,gQ=jP,AQ=YP,RQ=$P,OQ=KP,NQ=WP,IQ=XP,PQ=zP,CQ=QP,yQ=JP,MQ=ZP,vQ=eC,bQ=tC,LQ=rC,DQ=nC,xQ=oC,UQ=sC,wQ=iC,VQ=aC,BQ=cC,GQ=uC,HQ=lC,kQ=pC,FQ=_C,qQ=dC,jQ=EC,YQ=fC,$Q=SC,KQ=TC,WQ=mC,XQ=hC,zQ=gC,QQ=AC,JQ=RC,ZQ=OC,eJ=NC,tJ=IC,rJ=PC,nJ=CC,oJ=yC,sJ=MC,iJ=vC,aJ=bC,cJ=LC,uJ=DC,lJ=xC,pJ=UC,_J=wC,dJ=VC,EJ=BC,fJ=GC,SJ=HC,TJ=kC,mJ=FC,hJ=qC,gJ=jC,AJ=YC,RJ=Ue([PI,CI,yI,MI,vI,bI,LI,DI,xI,UI,wI,VI,BI,GI,HI,kI,FI,qI,jI,YI,$I,KI,WI,XI,zI,QI,JI,ZI,eP,tP,rP,nP,oP,sP,iP,aP,cP,uP,lP,pP,_P,dP,EP,fP,SP,TP,mP,hP,gP,AP,RP,OP,NP,IP,PP,CP,yP,MP,vP,bP,LP,DP,xP,UP,wP,VP,BP,GP,HP,kP,FP,qP,jP,YP,$P,KP,WP,XP,zP,QP,JP,ZP,eC,tC,rC,nC,oC,sC,iC,aC,cC,uC,lC,pC,_C,dC,EC,fC,SC,TC,mC,hC,gC,AC,RC,OC,NC,IC,PC,CC,yC,MC,vC,bC,LC,DC,xC,UC,wC,VC,BC,GC,HC,kC,FC,qC,jC,YC]),$C="other_sql",KC="mssql",WC="mysql",XC="oracle",zC="db2",QC="postgresql",JC="redshift",ZC="hive",ey="cloudscape",ty="hsqldb",ry="progress",ny="maxdb",oy="hanadb",sy="ingres",iy="firstsql",ay="edb",cy="cache",uy="adabas",ly="firebird",py="derby",_y="filemaker",dy="informix",Ey="instantdb",fy="interbase",Sy="mariadb",Ty="netezza",my="pervasive",hy="pointbase",gy="sqlite",Ay="sybase",Ry="teradata",Oy="vertica",Ny="h2",Iy="coldfusion",Py="cassandra",Cy="hbase",yy="mongodb",My="redis",vy="couchbase",by="couchdb",Ly="cosmosdb",Dy="dynamodb",xy="neo4j",Uy="geode",wy="elasticsearch",Vy="memcached",By="cockroachdb",OJ=$C,NJ=KC,IJ=WC,PJ=XC,CJ=zC,yJ=QC,MJ=JC,vJ=ZC,bJ=ey,LJ=ty,DJ=ry,xJ=ny,UJ=oy,wJ=sy,VJ=iy,BJ=ay,GJ=cy,HJ=uy,kJ=ly,FJ=py,qJ=_y,jJ=dy,YJ=Ey,$J=fy,KJ=Sy,WJ=Ty,XJ=my,zJ=hy,QJ=gy,JJ=Ay,ZJ=Ry,eZ=Oy,tZ=Ny,rZ=Iy,nZ=Py,oZ=Cy,sZ=yy,iZ=My,aZ=vy,cZ=by,uZ=Ly,lZ=Dy,pZ=xy,_Z=Uy,dZ=wy,EZ=Vy,fZ=By,SZ=Ue([$C,KC,WC,XC,zC,QC,JC,ZC,ey,ty,ry,ny,oy,sy,iy,ay,cy,uy,ly,py,_y,dy,Ey,fy,Sy,Ty,my,hy,gy,Ay,Ry,Oy,Ny,Iy,Py,Cy,yy,My,vy,by,Ly,Dy,xy,Uy,wy,Vy,By]),Gy="all",Hy="each_quorum",ky="quorum",Fy="local_quorum",qy="one",jy="two",Yy="three",$y="local_one",Ky="any",Wy="serial",Xy="local_serial",TZ=Gy,mZ=Hy,hZ=ky,gZ=Fy,AZ=qy,RZ=jy,OZ=Yy,NZ=$y,IZ=Ky,PZ=Wy,CZ=Xy,yZ=Ue([Gy,Hy,ky,Fy,qy,jy,Yy,$y,Ky,Wy,Xy]),zy="datasource",Qy="http",Jy="pubsub",Zy="timer",eM="other",MZ=zy,vZ=Qy,bZ=Jy,LZ=Zy,DZ=eM,xZ=Ue([zy,Qy,Jy,Zy,eM]),tM="insert",rM="edit",nM="delete",UZ=tM,wZ=rM,VZ=nM,BZ=Ue([tM,rM,nM]),oM="alibaba_cloud",sM="aws",iM="azure",aM="gcp",GZ=oM,HZ=sM,kZ=iM,FZ=aM,qZ=Ue([oM,sM,iM,aM]),cM="ip_tcp",uM="ip_udp",lM="ip",pM="unix",_M="pipe",dM="inproc",EM="other",jZ=cM,YZ=uM,$Z=lM,KZ=pM,WZ=_M,XZ=dM,zZ=EM,QZ=Ue([cM,uM,lM,pM,_M,dM,EM]),fM="wifi",SM="wired",TM="cell",mM="unavailable",hM="unknown",JZ=fM,ZZ=SM,e7=TM,t7=mM,r7=hM,n7=Ue([fM,SM,TM,mM,hM]),gM="gprs",AM="edge",RM="umts",OM="cdma",NM="evdo_0",IM="evdo_a",PM="cdma2000_1xrtt",CM="hsdpa",yM="hsupa",MM="hspa",vM="iden",bM="evdo_b",LM="lte",DM="ehrpd",xM="hspap",UM="gsm",wM="td_scdma",VM="iwlan",BM="nr",GM="nrnsa",HM="lte_ca",o7=gM,s7=AM,i7=RM,a7=OM,c7=NM,u7=IM,l7=PM,p7=CM,_7=yM,d7=MM,E7=vM,f7=bM,S7=LM,T7=DM,m7=xM,h7=UM,g7=wM,A7=VM,R7=BM,O7=GM,N7=HM,I7=Ue([gM,AM,RM,OM,NM,IM,PM,CM,yM,MM,vM,bM,LM,DM,xM,UM,wM,VM,BM,GM,HM]),kM="1.0",FM="1.1",qM="2.0",jM="SPDY",YM="QUIC",P7=kM,C7=FM,y7=qM,M7=jM,v7=YM,b7={HTTP_1_0:kM,HTTP_1_1:FM,HTTP_2_0:qM,SPDY:jM,QUIC:YM},$M="queue",KM="topic",L7=$M,D7=KM,x7=Ue([$M,KM]),WM="receive",XM="process",U7=WM,w7=XM,V7=Ue([WM,XM]),zM=0,QM=1,JM=2,ZM=3,ev=4,tv=5,rv=6,nv=7,ov=8,sv=9,iv=10,av=11,cv=12,uv=13,lv=14,pv=15,_v=16,B7=zM,G7=QM,H7=JM,k7=ZM,F7=ev,q7=tv,j7=rv,Y7=nv,$7=ov,K7=sv,W7=iv,X7=av,z7=cv,Q7=uv,J7=lv,Z7=pv,eee=_v,tee={OK:zM,CANCELLED:QM,UNKNOWN:JM,INVALID_ARGUMENT:ZM,DEADLINE_EXCEEDED:ev,NOT_FOUND:tv,ALREADY_EXISTS:rv,PERMISSION_DENIED:nv,RESOURCE_EXHAUSTED:ov,FAILED_PRECONDITION:sv,ABORTED:iv,OUT_OF_RANGE:av,UNIMPLEMENTED:cv,INTERNAL:uv,UNAVAILABLE:lv,DATA_LOSS:pv,UNAUTHENTICATED:_v},dv="SENT",Ev="RECEIVED",ree=dv,nee=Ev,oee=Ue([dv,Ev])});var Sv=w(()=>{fv()});var Tv,mv,hv,gv,Av,Rv,Ov,Nv,Iv,Pv,Cv,yv,Mv,vv,bv,Lv,Dv,xv,Uv,wv,Vv,Bv,Gv,Hv,kv,Fv,qv,jv,Yv,$v,Kv,Wv,Xv,zv,Qv,Jv,Zv,eb,tb,rb,nb,ob,sb,ib,ab,cb,ub,lb,pb,_b,db,Eb,fb,Sb,Tb,mb,hb,gb,Ab,Rb,Ob,Nb,Ib,Pb,Cb,yb,Mb,vb,bb,Lb,Db,xb,Ub,wb,Vb,Bb,Gb,Hb,kb,Fb,qb,see,iee,aee,cee,uee,lee,pee,_ee,dee,Eee,fee,See,Tee,mee,hee,gee,Aee,Ree,Oee,Nee,Iee,Pee,Cee,yee,Mee,vee,bee,Lee,Dee,xee,Uee,wee,Vee,Bee,Gee,Hee,kee,Fee,qee,jee,Yee,$ee,Kee,Wee,Xee,zee,Qee,Jee,Zee,ete,tte,rte,nte,ote,ste,ite,ate,cte,ute,lte,pte,_te,dte,Ete,fte,Ste,Tte,mte,hte,gte,Ate,Rte,Ote,Nte,Ite,Pte,Cte,yte,Mte,vte,bte,Lte,jb,Yb,$b,Kb,Dte,xte,Ute,wte,Vte,Wb,Xb,zb,Qb,Jb,Zb,eL,tL,rL,nL,oL,sL,iL,aL,cL,uL,lL,Bte,Gte,Hte,kte,Fte,qte,jte,Yte,$te,Kte,Wte,Xte,zte,Qte,Jte,Zte,ere,tre,pL,_L,rre,nre,ore,dL,EL,fL,SL,TL,mL,hL,sre,ire,are,cre,ure,lre,pre,_re,gL,AL,RL,OL,NL,IL,PL,CL,yL,ML,vL,dre,Ere,fre,Sre,Tre,mre,hre,gre,Are,Rre,Ore,Nre,bL,LL,DL,xL,UL,wL,VL,BL,GL,HL,Ire,Pre,Cre,yre,Mre,vre,bre,Lre,Dre,xre,Ure,kL=w(()=>{dT();Tv="cloud.provider",mv="cloud.account.id",hv="cloud.region",gv="cloud.availability_zone",Av="cloud.platform",Rv="aws.ecs.container.arn",Ov="aws.ecs.cluster.arn",Nv="aws.ecs.launchtype",Iv="aws.ecs.task.arn",Pv="aws.ecs.task.family",Cv="aws.ecs.task.revision",yv="aws.eks.cluster.arn",Mv="aws.log.group.names",vv="aws.log.group.arns",bv="aws.log.stream.names",Lv="aws.log.stream.arns",Dv="container.name",xv="container.id",Uv="container.runtime",wv="container.image.name",Vv="container.image.tag",Bv="deployment.environment",Gv="device.id",Hv="device.model.identifier",kv="device.model.name",Fv="faas.name",qv="faas.id",jv="faas.version",Yv="faas.instance",$v="faas.max_memory",Kv="host.id",Wv="host.name",Xv="host.type",zv="host.arch",Qv="host.image.name",Jv="host.image.id",Zv="host.image.version",eb="k8s.cluster.name",tb="k8s.node.name",rb="k8s.node.uid",nb="k8s.namespace.name",ob="k8s.pod.uid",sb="k8s.pod.name",ib="k8s.container.name",ab="k8s.replicaset.uid",cb="k8s.replicaset.name",ub="k8s.deployment.uid",lb="k8s.deployment.name",pb="k8s.statefulset.uid",_b="k8s.statefulset.name",db="k8s.daemonset.uid",Eb="k8s.daemonset.name",fb="k8s.job.uid",Sb="k8s.job.name",Tb="k8s.cronjob.uid",mb="k8s.cronjob.name",hb="os.type",gb="os.description",Ab="os.name",Rb="os.version",Ob="process.pid",Nb="process.executable.name",Ib="process.executable.path",Pb="process.command",Cb="process.command_line",yb="process.command_args",Mb="process.owner",vb="process.runtime.name",bb="process.runtime.version",Lb="process.runtime.description",Db="service.name",xb="service.namespace",Ub="service.instance.id",wb="service.version",Vb="telemetry.sdk.name",Bb="telemetry.sdk.language",Gb="telemetry.sdk.version",Hb="telemetry.auto.version",kb="webengine.name",Fb="webengine.version",qb="webengine.description",see=Tv,iee=mv,aee=hv,cee=gv,uee=Av,lee=Rv,pee=Ov,_ee=Nv,dee=Iv,Eee=Pv,fee=Cv,See=yv,Tee=Mv,mee=vv,hee=bv,gee=Lv,Aee=Dv,Ree=xv,Oee=Uv,Nee=wv,Iee=Vv,Pee=Bv,Cee=Gv,yee=Hv,Mee=kv,vee=Fv,bee=qv,Lee=jv,Dee=Yv,xee=$v,Uee=Kv,wee=Wv,Vee=Xv,Bee=zv,Gee=Qv,Hee=Jv,kee=Zv,Fee=eb,qee=tb,jee=rb,Yee=nb,$ee=ob,Kee=sb,Wee=ib,Xee=ab,zee=cb,Qee=ub,Jee=lb,Zee=pb,ete=_b,tte=db,rte=Eb,nte=fb,ote=Sb,ste=Tb,ite=mb,ate=hb,cte=gb,ute=Ab,lte=Rb,pte=Ob,_te=Nb,dte=Ib,Ete=Pb,fte=Cb,Ste=yb,Tte=Mb,mte=vb,hte=bb,gte=Lb,Ate=Db,Rte=xb,Ote=Ub,Nte=wb,Ite=Vb,Pte=Bb,Cte=Gb,yte=Hb,Mte=kb,vte=Fb,bte=qb,Lte=Ue([Tv,mv,hv,gv,Av,Rv,Ov,Nv,Iv,Pv,Cv,yv,Mv,vv,bv,Lv,Dv,xv,Uv,wv,Vv,Bv,Gv,Hv,kv,Fv,qv,jv,Yv,$v,Kv,Wv,Xv,zv,Qv,Jv,Zv,eb,tb,rb,nb,ob,sb,ib,ab,cb,ub,lb,pb,_b,db,Eb,fb,Sb,Tb,mb,hb,gb,Ab,Rb,Ob,Nb,Ib,Pb,Cb,yb,Mb,vb,bb,Lb,Db,xb,Ub,wb,Vb,Bb,Gb,Hb,kb,Fb,qb]),jb="alibaba_cloud",Yb="aws",$b="azure",Kb="gcp",Dte=jb,xte=Yb,Ute=$b,wte=Kb,Vte=Ue([jb,Yb,$b,Kb]),Wb="alibaba_cloud_ecs",Xb="alibaba_cloud_fc",zb="aws_ec2",Qb="aws_ecs",Jb="aws_eks",Zb="aws_lambda",eL="aws_elastic_beanstalk",tL="azure_vm",rL="azure_container_instances",nL="azure_aks",oL="azure_functions",sL="azure_app_service",iL="gcp_compute_engine",aL="gcp_cloud_run",cL="gcp_kubernetes_engine",uL="gcp_cloud_functions",lL="gcp_app_engine",Bte=Wb,Gte=Xb,Hte=zb,kte=Qb,Fte=Jb,qte=Zb,jte=eL,Yte=tL,$te=rL,Kte=nL,Wte=oL,Xte=sL,zte=iL,Qte=aL,Jte=cL,Zte=uL,ere=lL,tre=Ue([Wb,Xb,zb,Qb,Jb,Zb,eL,tL,rL,nL,oL,sL,iL,aL,cL,uL,lL]),pL="ec2",_L="fargate",rre=pL,nre=_L,ore=Ue([pL,_L]),dL="amd64",EL="arm32",fL="arm64",SL="ia64",TL="ppc32",mL="ppc64",hL="x86",sre=dL,ire=EL,are=fL,cre=SL,ure=TL,lre=mL,pre=hL,_re=Ue([dL,EL,fL,SL,TL,mL,hL]),gL="windows",AL="linux",RL="darwin",OL="freebsd",NL="netbsd",IL="openbsd",PL="dragonflybsd",CL="hpux",yL="aix",ML="solaris",vL="z_os",dre=gL,Ere=AL,fre=RL,Sre=OL,Tre=NL,mre=IL,hre=PL,gre=CL,Are=yL,Rre=ML,Ore=vL,Nre=Ue([gL,AL,RL,OL,NL,IL,PL,CL,yL,ML,vL]),bL="cpp",LL="dotnet",DL="erlang",xL="go",UL="java",wL="nodejs",VL="php",BL="python",GL="ruby",HL="webjs",Ire=bL,Pre=LL,Cre=DL,yre=xL,Mre=UL,vre=wL,bre=VL,Lre=BL,Dre=GL,xre=HL,Ure=Ue([bL,LL,DL,xL,UL,wL,VL,BL,GL,HL])});var FL=w(()=>{kL()});var wre,Vre,Bre,Gre,Hre,kre,Fre,qre,jre,Yre,$re,Kre,Wre,Xre,zre,Qre,Jre,Zre,ene,tne,rne,nne,one,sne,ine,ane,cne,une,lne,pne,_ne,dne,Ene,fne,Sne,Tne,mne,hne,gne,Ane,Rne,One,Nne,Ine,Pne,Cne,yne,Mne,vne,bne,Lne,Dne,xne,Une,wne,Vne,Bne,Gne,Hne,kne,Fne,qne,jne,Yne,$ne,Kne,Wne,Xne,zne,Qne,Jne,Zne,eoe,toe,roe,noe,ooe,soe,ioe,aoe,coe,uoe,loe,poe,_oe,doe,Eoe,foe,Soe,Toe,moe,hoe,goe,Aoe,Roe,Ooe,Noe,Ioe,Poe,Coe,yoe,Moe,voe,boe,Loe,Doe,xoe,Uoe,woe,Voe,qL=w(()=>{wre="aspnetcore.rate_limiting.result",Vre="acquired",Bre="endpoint_limiter",Gre="global_limiter",Hre="request_canceled",kre="telemetry.sdk.language",Fre="cpp",qre="dotnet",jre="erlang",Yre="go",$re="java",Kre="nodejs",Wre="php",Xre="python",zre="ruby",Qre="rust",Jre="swift",Zre="webjs",ene="telemetry.sdk.name",tne="telemetry.sdk.version",rne="aspnetcore.diagnostics.handler.type",nne="aspnetcore.diagnostics.exception.result",one="aborted",sne="handled",ine="skipped",ane="unhandled",cne="aspnetcore.rate_limiting.policy",une="aspnetcore.request.is_unhandled",lne="aspnetcore.routing.is_fallback",pne="aspnetcore.routing.match_status",_ne="failure",dne="success",Ene="client.address",fne="client.port",Sne="error.type",Tne="_OTHER",mne="exception.escaped",hne="exception.message",gne="exception.stacktrace",Ane="exception.type",Rne=function(t){return"http.request.header."+t},One="http.request.method",Nne="_OTHER",Ine="CONNECT",Pne="DELETE",Cne="GET",yne="HEAD",Mne="OPTIONS",vne="PATCH",bne="POST",Lne="PUT",Dne="TRACE",xne="http.request.method_original",Une="http.request.resend_count",wne=function(t){return"http.response.header."+t},Vne="http.response.status_code",Bne="http.route",Gne="jvm.gc.action",Hne="jvm.gc.name",kne="jvm.memory.pool.name",Fne="jvm.memory.type",qne="heap",jne="non_heap",Yne="jvm.thread.daemon",$ne="jvm.thread.state",Kne="blocked",Wne="new",Xne="runnable",zne="terminated",Qne="timed_waiting",Jne="waiting",Zne="network.local.address",eoe="network.local.port",toe="network.peer.address",roe="network.peer.port",noe="network.protocol.name",ooe="network.protocol.version",soe="network.transport",ioe="pipe",aoe="quic",coe="tcp",uoe="udp",loe="unix",poe="network.type",_oe="ipv4",doe="ipv6",Eoe="otel.scope.name",foe="otel.scope.version",Soe="otel.status_code",Toe="ERROR",moe="OK",hoe="otel.status_description",goe="server.address",Aoe="server.port",Roe="service.name",Ooe="service.version",Noe="signalr.connection.status",Ioe="app_shutdown",Poe="normal_closure",Coe="timeout",yoe="signalr.transport",Moe="long_polling",voe="server_sent_events",boe="web_sockets",Loe="url.fragment",Doe="url.full",xoe="url.path",Uoe="url.query",woe="url.scheme",Voe="user_agent.original"});var Boe,Goe,Hoe,koe,Foe,qoe,joe,Yoe,$oe,Koe,Woe,Xoe,zoe,Qoe,Joe,Zoe,ese,tse,rse,nse,ose,sse,ise,ase,cse,use,lse,pse,_se,dse,Ese,jL=w(()=>{Boe="aspnetcore.diagnostics.exceptions",Goe="aspnetcore.rate_limiting.active_request_leases",Hoe="aspnetcore.rate_limiting.queued_requests",koe="aspnetcore.rate_limiting.request.time_in_queue",Foe="aspnetcore.rate_limiting.request_lease.duration",qoe="aspnetcore.rate_limiting.requests",joe="aspnetcore.routing.match_attempts",Yoe="http.client.request.duration",$oe="http.server.request.duration",Koe="jvm.class.count",Woe="jvm.class.loaded",Xoe="jvm.class.unloaded",zoe="jvm.cpu.count",Qoe="jvm.cpu.recent_utilization",Joe="jvm.cpu.time",Zoe="jvm.gc.duration",ese="jvm.memory.committed",tse="jvm.memory.limit",rse="jvm.memory.used",nse="jvm.memory.used_after_last_gc",ose="jvm.thread.count",sse="kestrel.active_connections",ise="kestrel.active_tls_handshakes",ase="kestrel.connection.duration",cse="kestrel.queued_connections",use="kestrel.queued_requests",lse="kestrel.rejected_connections",pse="kestrel.tls_handshake.duration",_se="kestrel.upgraded_connections",dse="signalr.server.active_connections",Ese="signalr.server.connection.duration"});var _r={};Qf(_r,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>one,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>sne,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>ine,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>ane,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Vre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Bre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Gre,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Hre,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>_ne,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>dne,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>nne,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>rne,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>cne,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>wre,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>une,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>lne,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>pne,ATTR_CLIENT_ADDRESS:()=>Ene,ATTR_CLIENT_PORT:()=>fne,ATTR_ERROR_TYPE:()=>Sne,ATTR_EXCEPTION_ESCAPED:()=>mne,ATTR_EXCEPTION_MESSAGE:()=>hne,ATTR_EXCEPTION_STACKTRACE:()=>gne,ATTR_EXCEPTION_TYPE:()=>Ane,ATTR_HTTP_REQUEST_HEADER:()=>Rne,ATTR_HTTP_REQUEST_METHOD:()=>One,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>xne,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Une,ATTR_HTTP_RESPONSE_HEADER:()=>wne,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Vne,ATTR_HTTP_ROUTE:()=>Bne,ATTR_JVM_GC_ACTION:()=>Gne,ATTR_JVM_GC_NAME:()=>Hne,ATTR_JVM_MEMORY_POOL_NAME:()=>kne,ATTR_JVM_MEMORY_TYPE:()=>Fne,ATTR_JVM_THREAD_DAEMON:()=>Yne,ATTR_JVM_THREAD_STATE:()=>$ne,ATTR_NETWORK_LOCAL_ADDRESS:()=>Zne,ATTR_NETWORK_LOCAL_PORT:()=>eoe,ATTR_NETWORK_PEER_ADDRESS:()=>toe,ATTR_NETWORK_PEER_PORT:()=>roe,ATTR_NETWORK_PROTOCOL_NAME:()=>noe,ATTR_NETWORK_PROTOCOL_VERSION:()=>ooe,ATTR_NETWORK_TRANSPORT:()=>soe,ATTR_NETWORK_TYPE:()=>poe,ATTR_OTEL_SCOPE_NAME:()=>Eoe,ATTR_OTEL_SCOPE_VERSION:()=>foe,ATTR_OTEL_STATUS_CODE:()=>Soe,ATTR_OTEL_STATUS_DESCRIPTION:()=>hoe,ATTR_SERVER_ADDRESS:()=>goe,ATTR_SERVER_PORT:()=>Aoe,ATTR_SERVICE_NAME:()=>Roe,ATTR_SERVICE_VERSION:()=>Ooe,ATTR_SIGNALR_CONNECTION_STATUS:()=>Noe,ATTR_SIGNALR_TRANSPORT:()=>yoe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>kre,ATTR_TELEMETRY_SDK_NAME:()=>ene,ATTR_TELEMETRY_SDK_VERSION:()=>tne,ATTR_URL_FRAGMENT:()=>Loe,ATTR_URL_FULL:()=>Doe,ATTR_URL_PATH:()=>xoe,ATTR_URL_QUERY:()=>Uoe,ATTR_URL_SCHEME:()=>woe,ATTR_USER_AGENT_ORIGINAL:()=>Voe,AWSECSLAUNCHTYPEVALUES_EC2:()=>rre,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>nre,AwsEcsLaunchtypeValues:()=>ore,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Bte,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Gte,CLOUDPLATFORMVALUES_AWS_EC2:()=>Hte,CLOUDPLATFORMVALUES_AWS_ECS:()=>kte,CLOUDPLATFORMVALUES_AWS_EKS:()=>Fte,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>jte,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>qte,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Kte,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Xte,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>$te,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Wte,CLOUDPLATFORMVALUES_AZURE_VM:()=>Yte,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>ere,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Zte,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Qte,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>zte,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Jte,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Dte,CLOUDPROVIDERVALUES_AWS:()=>xte,CLOUDPROVIDERVALUES_AZURE:()=>Ute,CLOUDPROVIDERVALUES_GCP:()=>wte,CloudPlatformValues:()=>tre,CloudProviderValues:()=>Vte,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>TZ,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>IZ,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>mZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>NZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>gZ,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>CZ,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>AZ,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>hZ,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>PZ,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>OZ,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>RZ,DBSYSTEMVALUES_ADABAS:()=>HJ,DBSYSTEMVALUES_CACHE:()=>GJ,DBSYSTEMVALUES_CASSANDRA:()=>nZ,DBSYSTEMVALUES_CLOUDSCAPE:()=>bJ,DBSYSTEMVALUES_COCKROACHDB:()=>fZ,DBSYSTEMVALUES_COLDFUSION:()=>rZ,DBSYSTEMVALUES_COSMOSDB:()=>uZ,DBSYSTEMVALUES_COUCHBASE:()=>aZ,DBSYSTEMVALUES_COUCHDB:()=>cZ,DBSYSTEMVALUES_DB2:()=>CJ,DBSYSTEMVALUES_DERBY:()=>FJ,DBSYSTEMVALUES_DYNAMODB:()=>lZ,DBSYSTEMVALUES_EDB:()=>BJ,DBSYSTEMVALUES_ELASTICSEARCH:()=>dZ,DBSYSTEMVALUES_FILEMAKER:()=>qJ,DBSYSTEMVALUES_FIREBIRD:()=>kJ,DBSYSTEMVALUES_FIRSTSQL:()=>VJ,DBSYSTEMVALUES_GEODE:()=>_Z,DBSYSTEMVALUES_H2:()=>tZ,DBSYSTEMVALUES_HANADB:()=>UJ,DBSYSTEMVALUES_HBASE:()=>oZ,DBSYSTEMVALUES_HIVE:()=>vJ,DBSYSTEMVALUES_HSQLDB:()=>LJ,DBSYSTEMVALUES_INFORMIX:()=>jJ,DBSYSTEMVALUES_INGRES:()=>wJ,DBSYSTEMVALUES_INSTANTDB:()=>YJ,DBSYSTEMVALUES_INTERBASE:()=>$J,DBSYSTEMVALUES_MARIADB:()=>KJ,DBSYSTEMVALUES_MAXDB:()=>xJ,DBSYSTEMVALUES_MEMCACHED:()=>EZ,DBSYSTEMVALUES_MONGODB:()=>sZ,DBSYSTEMVALUES_MSSQL:()=>NJ,DBSYSTEMVALUES_MYSQL:()=>IJ,DBSYSTEMVALUES_NEO4J:()=>pZ,DBSYSTEMVALUES_NETEZZA:()=>WJ,DBSYSTEMVALUES_ORACLE:()=>PJ,DBSYSTEMVALUES_OTHER_SQL:()=>OJ,DBSYSTEMVALUES_PERVASIVE:()=>XJ,DBSYSTEMVALUES_POINTBASE:()=>zJ,DBSYSTEMVALUES_POSTGRESQL:()=>yJ,DBSYSTEMVALUES_PROGRESS:()=>DJ,DBSYSTEMVALUES_REDIS:()=>iZ,DBSYSTEMVALUES_REDSHIFT:()=>MJ,DBSYSTEMVALUES_SQLITE:()=>QJ,DBSYSTEMVALUES_SYBASE:()=>JJ,DBSYSTEMVALUES_TERADATA:()=>ZJ,DBSYSTEMVALUES_VERTICA:()=>eZ,DbCassandraConsistencyLevelValues:()=>yZ,DbSystemValues:()=>SZ,ERROR_TYPE_VALUE_OTHER:()=>Tne,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>VZ,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>wZ,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>UZ,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>GZ,FAASINVOKEDPROVIDERVALUES_AWS:()=>HZ,FAASINVOKEDPROVIDERVALUES_AZURE:()=>kZ,FAASINVOKEDPROVIDERVALUES_GCP:()=>FZ,FAASTRIGGERVALUES_DATASOURCE:()=>MZ,FAASTRIGGERVALUES_HTTP:()=>vZ,FAASTRIGGERVALUES_OTHER:()=>DZ,FAASTRIGGERVALUES_PUBSUB:()=>bZ,FAASTRIGGERVALUES_TIMER:()=>LZ,FaasDocumentOperationValues:()=>BZ,FaasInvokedProviderValues:()=>qZ,FaasTriggerValues:()=>xZ,HOSTARCHVALUES_AMD64:()=>sre,HOSTARCHVALUES_ARM32:()=>ire,HOSTARCHVALUES_ARM64:()=>are,HOSTARCHVALUES_IA64:()=>cre,HOSTARCHVALUES_PPC32:()=>ure,HOSTARCHVALUES_PPC64:()=>lre,HOSTARCHVALUES_X86:()=>pre,HTTPFLAVORVALUES_HTTP_1_0:()=>P7,HTTPFLAVORVALUES_HTTP_1_1:()=>C7,HTTPFLAVORVALUES_HTTP_2_0:()=>y7,HTTPFLAVORVALUES_QUIC:()=>v7,HTTPFLAVORVALUES_SPDY:()=>M7,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Ine,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Pne,HTTP_REQUEST_METHOD_VALUE_GET:()=>Cne,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>yne,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Mne,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Nne,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>vne,HTTP_REQUEST_METHOD_VALUE_POST:()=>bne,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Lne,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Dne,HostArchValues:()=>_re,HttpFlavorValues:()=>b7,JVM_MEMORY_TYPE_VALUE_HEAP:()=>qne,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>jne,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Kne,JVM_THREAD_STATE_VALUE_NEW:()=>Wne,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Xne,JVM_THREAD_STATE_VALUE_TERMINATED:()=>zne,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Qne,JVM_THREAD_STATE_VALUE_WAITING:()=>Jne,MESSAGETYPEVALUES_RECEIVED:()=>nee,MESSAGETYPEVALUES_SENT:()=>ree,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>L7,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>D7,MESSAGINGOPERATIONVALUES_PROCESS:()=>w7,MESSAGINGOPERATIONVALUES_RECEIVE:()=>U7,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Boe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Goe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Hoe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>qoe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Foe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>koe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>joe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Yoe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>$oe,METRIC_JVM_CLASS_COUNT:()=>Koe,METRIC_JVM_CLASS_LOADED:()=>Woe,METRIC_JVM_CLASS_UNLOADED:()=>Xoe,METRIC_JVM_CPU_COUNT:()=>zoe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Qoe,METRIC_JVM_CPU_TIME:()=>Joe,METRIC_JVM_GC_DURATION:()=>Zoe,METRIC_JVM_MEMORY_COMMITTED:()=>ese,METRIC_JVM_MEMORY_LIMIT:()=>tse,METRIC_JVM_MEMORY_USED:()=>rse,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>nse,METRIC_JVM_THREAD_COUNT:()=>ose,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>sse,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>ise,METRIC_KESTREL_CONNECTION_DURATION:()=>ase,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>cse,METRIC_KESTREL_QUEUED_REQUESTS:()=>use,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>lse,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>pse,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>_se,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>dse,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ese,MessageTypeValues:()=>oee,MessagingDestinationKindValues:()=>x7,MessagingOperationValues:()=>V7,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>a7,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>l7,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>s7,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>T7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>c7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>u7,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>f7,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>o7,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>h7,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>p7,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>d7,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>m7,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>_7,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>E7,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>A7,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>S7,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>N7,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>R7,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>O7,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>g7,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>i7,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>e7,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>t7,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>r7,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>JZ,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>ZZ,NETTRANSPORTVALUES_INPROC:()=>XZ,NETTRANSPORTVALUES_IP:()=>$Z,NETTRANSPORTVALUES_IP_TCP:()=>jZ,NETTRANSPORTVALUES_IP_UDP:()=>YZ,NETTRANSPORTVALUES_OTHER:()=>zZ,NETTRANSPORTVALUES_PIPE:()=>WZ,NETTRANSPORTVALUES_UNIX:()=>KZ,NETWORK_TRANSPORT_VALUE_PIPE:()=>ioe,NETWORK_TRANSPORT_VALUE_QUIC:()=>aoe,NETWORK_TRANSPORT_VALUE_TCP:()=>coe,NETWORK_TRANSPORT_VALUE_UDP:()=>uoe,NETWORK_TRANSPORT_VALUE_UNIX:()=>loe,NETWORK_TYPE_VALUE_IPV4:()=>_oe,NETWORK_TYPE_VALUE_IPV6:()=>doe,NetHostConnectionSubtypeValues:()=>I7,NetHostConnectionTypeValues:()=>n7,NetTransportValues:()=>QZ,OSTYPEVALUES_AIX:()=>Are,OSTYPEVALUES_DARWIN:()=>fre,OSTYPEVALUES_DRAGONFLYBSD:()=>hre,OSTYPEVALUES_FREEBSD:()=>Sre,OSTYPEVALUES_HPUX:()=>gre,OSTYPEVALUES_LINUX:()=>Ere,OSTYPEVALUES_NETBSD:()=>Tre,OSTYPEVALUES_OPENBSD:()=>mre,OSTYPEVALUES_SOLARIS:()=>Rre,OSTYPEVALUES_WINDOWS:()=>dre,OSTYPEVALUES_Z_OS:()=>Ore,OTEL_STATUS_CODE_VALUE_ERROR:()=>Toe,OTEL_STATUS_CODE_VALUE_OK:()=>moe,OsTypeValues:()=>Nre,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>W7,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>j7,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>G7,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Z7,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>F7,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>K7,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Q7,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>k7,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>q7,RPCGRPCSTATUSCODEVALUES_OK:()=>B7,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>X7,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Y7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>$7,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>eee,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>J7,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>z7,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>H7,RpcGrpcStatusCodeValues:()=>tee,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>bQ,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>qQ,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>yQ,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>NQ,SEMATTRS_AWS_DYNAMODB_COUNT:()=>kQ,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>wQ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>xQ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>jQ,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>LQ,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>IQ,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>vQ,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>UQ,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>MQ,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>PQ,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>CQ,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>FQ,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>BQ,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>GQ,SEMATTRS_AWS_DYNAMODB_SELECT:()=>DQ,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>VQ,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>OQ,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>HQ,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>r9,SEMATTRS_CODE_FILEPATH:()=>iQ,SEMATTRS_CODE_FUNCTION:()=>oQ,SEMATTRS_CODE_LINENO:()=>aQ,SEMATTRS_CODE_NAMESPACE:()=>sQ,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>d9,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>m9,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>T9,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>f9,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>p9,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>_9,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>S9,SEMATTRS_DB_CASSANDRA_TABLE:()=>E9,SEMATTRS_DB_CONNECTION_STRING:()=>o9,SEMATTRS_DB_HBASE_NAMESPACE:()=>h9,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>i9,SEMATTRS_DB_MONGODB_COLLECTION:()=>A9,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>l9,SEMATTRS_DB_NAME:()=>a9,SEMATTRS_DB_OPERATION:()=>u9,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>g9,SEMATTRS_DB_SQL_TABLE:()=>R9,SEMATTRS_DB_STATEMENT:()=>c9,SEMATTRS_DB_SYSTEM:()=>n9,SEMATTRS_DB_USER:()=>s9,SEMATTRS_ENDUSER_ID:()=>Z9,SEMATTRS_ENDUSER_ROLE:()=>eQ,SEMATTRS_ENDUSER_SCOPE:()=>tQ,SEMATTRS_EXCEPTION_ESCAPED:()=>P9,SEMATTRS_EXCEPTION_MESSAGE:()=>N9,SEMATTRS_EXCEPTION_STACKTRACE:()=>I9,SEMATTRS_EXCEPTION_TYPE:()=>O9,SEMATTRS_FAAS_COLDSTART:()=>U9,SEMATTRS_FAAS_CRON:()=>x9,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>M9,SEMATTRS_FAAS_DOCUMENT_NAME:()=>L9,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>v9,SEMATTRS_FAAS_DOCUMENT_TIME:()=>b9,SEMATTRS_FAAS_EXECUTION:()=>y9,SEMATTRS_FAAS_INVOKED_NAME:()=>w9,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>V9,SEMATTRS_FAAS_INVOKED_REGION:()=>B9,SEMATTRS_FAAS_TIME:()=>D9,SEMATTRS_FAAS_TRIGGER:()=>C9,SEMATTRS_HTTP_CLIENT_IP:()=>RQ,SEMATTRS_HTTP_FLAVOR:()=>EQ,SEMATTRS_HTTP_HOST:()=>pQ,SEMATTRS_HTTP_METHOD:()=>cQ,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>SQ,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>TQ,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>mQ,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>hQ,SEMATTRS_HTTP_ROUTE:()=>AQ,SEMATTRS_HTTP_SCHEME:()=>_Q,SEMATTRS_HTTP_SERVER_NAME:()=>gQ,SEMATTRS_HTTP_STATUS_CODE:()=>dQ,SEMATTRS_HTTP_TARGET:()=>lQ,SEMATTRS_HTTP_URL:()=>uQ,SEMATTRS_HTTP_USER_AGENT:()=>fQ,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>gJ,SEMATTRS_MESSAGE_ID:()=>hJ,SEMATTRS_MESSAGE_TYPE:()=>mJ,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>AJ,SEMATTRS_MESSAGING_CONSUMER_ID:()=>nJ,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>ZQ,SEMATTRS_MESSAGING_DESTINATION:()=>$Q,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>KQ,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>aJ,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>iJ,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>sJ,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>cJ,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>uJ,SEMATTRS_MESSAGING_MESSAGE_ID:()=>JQ,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>tJ,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>eJ,SEMATTRS_MESSAGING_OPERATION:()=>rJ,SEMATTRS_MESSAGING_PROTOCOL:()=>XQ,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>zQ,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>oJ,SEMATTRS_MESSAGING_SYSTEM:()=>YQ,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>WQ,SEMATTRS_MESSAGING_URL:()=>QQ,SEMATTRS_NET_HOST_CARRIER_ICC:()=>Q9,SEMATTRS_NET_HOST_CARRIER_MCC:()=>X9,SEMATTRS_NET_HOST_CARRIER_MNC:()=>z9,SEMATTRS_NET_HOST_CARRIER_NAME:()=>W9,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>K9,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>$9,SEMATTRS_NET_HOST_IP:()=>q9,SEMATTRS_NET_HOST_NAME:()=>Y9,SEMATTRS_NET_HOST_PORT:()=>j9,SEMATTRS_NET_PEER_IP:()=>H9,SEMATTRS_NET_PEER_NAME:()=>F9,SEMATTRS_NET_PEER_PORT:()=>k9,SEMATTRS_NET_TRANSPORT:()=>G9,SEMATTRS_PEER_SERVICE:()=>J9,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dJ,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>SJ,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>TJ,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>fJ,SEMATTRS_RPC_JSONRPC_VERSION:()=>EJ,SEMATTRS_RPC_METHOD:()=>_J,SEMATTRS_RPC_SERVICE:()=>pJ,SEMATTRS_RPC_SYSTEM:()=>lJ,SEMATTRS_THREAD_ID:()=>rQ,SEMATTRS_THREAD_NAME:()=>nQ,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>pee,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>lee,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>_ee,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>dee,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Eee,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>fee,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>See,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>mee,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Tee,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>gee,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>hee,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>iee,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>cee,SEMRESATTRS_CLOUD_PLATFORM:()=>uee,SEMRESATTRS_CLOUD_PROVIDER:()=>see,SEMRESATTRS_CLOUD_REGION:()=>aee,SEMRESATTRS_CONTAINER_ID:()=>Ree,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Nee,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Iee,SEMRESATTRS_CONTAINER_NAME:()=>Aee,SEMRESATTRS_CONTAINER_RUNTIME:()=>Oee,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Pee,SEMRESATTRS_DEVICE_ID:()=>Cee,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>yee,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Mee,SEMRESATTRS_FAAS_ID:()=>bee,SEMRESATTRS_FAAS_INSTANCE:()=>Dee,SEMRESATTRS_FAAS_MAX_MEMORY:()=>xee,SEMRESATTRS_FAAS_NAME:()=>vee,SEMRESATTRS_FAAS_VERSION:()=>Lee,SEMRESATTRS_HOST_ARCH:()=>Bee,SEMRESATTRS_HOST_ID:()=>Uee,SEMRESATTRS_HOST_IMAGE_ID:()=>Hee,SEMRESATTRS_HOST_IMAGE_NAME:()=>Gee,SEMRESATTRS_HOST_IMAGE_VERSION:()=>kee,SEMRESATTRS_HOST_NAME:()=>wee,SEMRESATTRS_HOST_TYPE:()=>Vee,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Fee,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Wee,SEMRESATTRS_K8S_CRONJOB_NAME:()=>ite,SEMRESATTRS_K8S_CRONJOB_UID:()=>ste,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>rte,SEMRESATTRS_K8S_DAEMONSET_UID:()=>tte,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Jee,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>Qee,SEMRESATTRS_K8S_JOB_NAME:()=>ote,SEMRESATTRS_K8S_JOB_UID:()=>nte,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Yee,SEMRESATTRS_K8S_NODE_NAME:()=>qee,SEMRESATTRS_K8S_NODE_UID:()=>jee,SEMRESATTRS_K8S_POD_NAME:()=>Kee,SEMRESATTRS_K8S_POD_UID:()=>$ee,SEMRESATTRS_K8S_REPLICASET_NAME:()=>zee,SEMRESATTRS_K8S_REPLICASET_UID:()=>Xee,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>ete,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Zee,SEMRESATTRS_OS_DESCRIPTION:()=>cte,SEMRESATTRS_OS_NAME:()=>ute,SEMRESATTRS_OS_TYPE:()=>ate,SEMRESATTRS_OS_VERSION:()=>lte,SEMRESATTRS_PROCESS_COMMAND:()=>Ete,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Ste,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>fte,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>_te,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>dte,SEMRESATTRS_PROCESS_OWNER:()=>Tte,SEMRESATTRS_PROCESS_PID:()=>pte,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>gte,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>mte,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>hte,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Ote,SEMRESATTRS_SERVICE_NAME:()=>Ate,SEMRESATTRS_SERVICE_NAMESPACE:()=>Rte,SEMRESATTRS_SERVICE_VERSION:()=>Nte,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>yte,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Pte,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Ite,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Cte,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>bte,SEMRESATTRS_WEBENGINE_NAME:()=>Mte,SEMRESATTRS_WEBENGINE_VERSION:()=>vte,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Ioe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Poe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Coe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Moe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>voe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>boe,SemanticAttributes:()=>RJ,SemanticResourceAttributes:()=>Lte,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Ire,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Pre,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Cre,TELEMETRYSDKLANGUAGEVALUES_GO:()=>yre,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Mre,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>vre,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>bre,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Lre,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Dre,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xre,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Fre,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>qre,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>jre,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Yre,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>$re,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Kre,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Wre,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Xre,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>zre,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Qre,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Jre,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Zre,TelemetrySdkLanguageValues:()=>Ure});var dr=w(()=>{Sv();FL();qL();jL()});var YL=E(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.SDK_INFO=void 0;var fse=_T(),Nc=(dr(),P(_r));hp.SDK_INFO={[Nc.SEMRESATTRS_TELEMETRY_SDK_NAME]:"opentelemetry",[Nc.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"node",[Nc.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]:Nc.TELEMETRYSDKLANGUAGEVALUES_NODEJS,[Nc.SEMRESATTRS_TELEMETRY_SDK_VERSION]:fse.VERSION}});var $L=E(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.unrefTimer=void 0;function Sse(t){t.unref()}gp.unrefTimer=Sse});var WL=E(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});et.unrefTimer=et.SDK_INFO=et.otperformance=et.RandomIdGenerator=et.hexToBase64=et._globalThis=et.getEnv=et.getEnvWithoutDefaults=void 0;var KL=mI();Object.defineProperty(et,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return KL.getEnvWithoutDefaults}});Object.defineProperty(et,"getEnv",{enumerable:!0,get:function(){return KL.getEnv}});var Tse=hI();Object.defineProperty(et,"_globalThis",{enumerable:!0,get:function(){return Tse._globalThis}});var mse=AI();Object.defineProperty(et,"hexToBase64",{enumerable:!0,get:function(){return mse.hexToBase64}});var hse=NI();Object.defineProperty(et,"RandomIdGenerator",{enumerable:!0,get:function(){return hse.RandomIdGenerator}});var gse=II();Object.defineProperty(et,"otperformance",{enumerable:!0,get:function(){return gse.otperformance}});var Ase=YL();Object.defineProperty(et,"SDK_INFO",{enumerable:!0,get:function(){return Ase.SDK_INFO}});var Rse=$L();Object.defineProperty(et,"unrefTimer",{enumerable:!0,get:function(){return Rse.unrefTimer}})});var ET=E(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.unrefTimer=tt.otperformance=tt.hexToBase64=tt.getEnvWithoutDefaults=tt.getEnv=tt._globalThis=tt.SDK_INFO=tt.RandomIdGenerator=void 0;var _o=WL();Object.defineProperty(tt,"RandomIdGenerator",{enumerable:!0,get:function(){return _o.RandomIdGenerator}});Object.defineProperty(tt,"SDK_INFO",{enumerable:!0,get:function(){return _o.SDK_INFO}});Object.defineProperty(tt,"_globalThis",{enumerable:!0,get:function(){return _o._globalThis}});Object.defineProperty(tt,"getEnv",{enumerable:!0,get:function(){return _o.getEnv}});Object.defineProperty(tt,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return _o.getEnvWithoutDefaults}});Object.defineProperty(tt,"hexToBase64",{enumerable:!0,get:function(){return _o.hexToBase64}});Object.defineProperty(tt,"otperformance",{enumerable:!0,get:function(){return _o.otperformance}});Object.defineProperty(tt,"unrefTimer",{enumerable:!0,get:function(){return _o.unrefTimer}})});var JL=E(Ee=>{"use strict";Object.defineProperty(Ee,"__esModule",{value:!0});Ee.addHrTimes=Ee.isTimeInput=Ee.isTimeInputHrTime=Ee.hrTimeToMicroseconds=Ee.hrTimeToMilliseconds=Ee.hrTimeToNanoseconds=Ee.hrTimeToTimeStamp=Ee.hrTimeDuration=Ee.timeInputToHrTime=Ee.hrTime=Ee.getTimeOrigin=Ee.millisToHrTime=void 0;var fT=ET(),XL=9,Ose=6,Nse=Math.pow(10,Ose),Ap=Math.pow(10,XL);function Ic(t){let e=t/1e3,r=Math.trunc(e),n=Math.round(t%1e3*Nse);return[r,n]}Ee.millisToHrTime=Ic;function ST(){let t=fT.otperformance.timeOrigin;if(typeof t!="number"){let e=fT.otperformance;t=e.timing&&e.timing.fetchStart}return t}Ee.getTimeOrigin=ST;function zL(t){let e=Ic(ST()),r=Ic(typeof t=="number"?t:fT.otperformance.now());return QL(e,r)}Ee.hrTime=zL;function Ise(t){if(TT(t))return t;if(typeof t=="number")return t<ST()?zL(t):Ic(t);if(t instanceof Date)return Ic(t.getTime());throw TypeError("Invalid input type")}Ee.timeInputToHrTime=Ise;function Pse(t,e){let r=e[0]-t[0],n=e[1]-t[1];return n<0&&(r-=1,n+=Ap),[r,n]}Ee.hrTimeDuration=Pse;function Cse(t){let e=XL,r=`${"0".repeat(e)}${t[1]}Z`,n=r.substring(r.length-e-1);return new Date(t[0]*1e3).toISOString().replace("000Z",n)}Ee.hrTimeToTimeStamp=Cse;function yse(t){return t[0]*Ap+t[1]}Ee.hrTimeToNanoseconds=yse;function Mse(t){return t[0]*1e3+t[1]/1e6}Ee.hrTimeToMilliseconds=Mse;function vse(t){return t[0]*1e6+t[1]/1e3}Ee.hrTimeToMicroseconds=vse;function TT(t){return Array.isArray(t)&&t.length===2&&typeof t[0]=="number"&&typeof t[1]=="number"}Ee.isTimeInputHrTime=TT;function bse(t){return TT(t)||typeof t=="number"||t instanceof Date}Ee.isTimeInput=bse;function QL(t,e){let r=[t[0]+e[0],t[1]+e[1]];return r[1]>=Ap&&(r[1]-=Ap,r[0]+=1),r}Ee.addHrTimes=QL});var ZL=E(Pc=>{"use strict";Object.defineProperty(Pc,"__esModule",{value:!0});Pc.ExportResultCode=void 0;var Lse;(function(t){t[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})(Lse=Pc.ExportResultCode||(Pc.ExportResultCode={}))});var tD=E(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.CompositePropagator=void 0;var eD=(M(),P(U)),mT=class{constructor(e={}){var r;this._propagators=(r=e.propagators)!==null&&r!==void 0?r:[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,o)=>n.concat(o),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(s){eD.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${s.message}`)}}extract(e,r,n){return this._propagators.reduce((o,s)=>{try{return s.extract(o,r,n)}catch(i){eD.diag.warn(`Failed to extract with ${s.constructor.name}. Err: ${i.message}`)}return o},e)}fields(){return this._fields.slice()}};Rp.CompositePropagator=mT});var rD=E(mi=>{"use strict";Object.defineProperty(mi,"__esModule",{value:!0});mi.validateValue=mi.validateKey=void 0;var hT="[_0-9a-z-*/]",Dse=`[a-z]${hT}{0,255}`,xse=`[a-z0-9]${hT}{0,240}@[a-z]${hT}{0,13}`,Use=new RegExp(`^(?:${Dse}|${xse})$`),wse=/^[ -~]{0,255}[!-~]$/,Vse=/,|=/;function Bse(t){return Use.test(t)}mi.validateKey=Bse;function Gse(t){return wse.test(t)&&!Vse.test(t)}mi.validateValue=Gse});var AT=E(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});Op.TraceState=void 0;var nD=rD(),oD=32,Hse=512,sD=",",iD="=",gT=class t{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,r){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,r),n}unset(e){let r=this._clone();return r._internalState.delete(e),r}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,r)=>(e.push(r+iD+this.get(r)),e),[]).join(sD)}_parse(e){e.length>Hse||(this._internalState=e.split(sD).reverse().reduce((r,n)=>{let o=n.trim(),s=o.indexOf(iD);if(s!==-1){let i=o.slice(0,s),a=o.slice(s+1,n.length);(0,nD.validateKey)(i)&&(0,nD.validateValue)(a)&&r.set(i,a)}return r},new Map),this._internalState.size>oD&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,oD))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new t;return e._internalState=new Map(this._internalState),e}};Op.TraceState=gT});var cD=E(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.W3CTraceContextPropagator=ft.parseTraceParent=ft.TRACE_STATE_HEADER=ft.TRACE_PARENT_HEADER=void 0;var Np=(M(),P(U)),kse=Rc(),Fse=AT();ft.TRACE_PARENT_HEADER="traceparent";ft.TRACE_STATE_HEADER="tracestate";var qse="00",jse="(?!ff)[\\da-f]{2}",Yse="(?![0]{32})[\\da-f]{32}",$se="(?![0]{16})[\\da-f]{16}",Kse="[\\da-f]{2}",Wse=new RegExp(`^\\s?(${jse})-(${Yse})-(${$se})-(${Kse})(-.*)?\\s?$`);function aD(t){let e=Wse.exec(t);return!e||e[1]==="00"&&e[5]?null:{traceId:e[2],spanId:e[3],traceFlags:parseInt(e[4],16)}}ft.parseTraceParent=aD;var RT=class{inject(e,r,n){let o=Np.trace.getSpanContext(e);if(!o||(0,kse.isTracingSuppressed)(e)||!(0,Np.isSpanContextValid)(o))return;let s=`${qse}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||Np.TraceFlags.NONE).toString(16)}`;n.set(r,ft.TRACE_PARENT_HEADER,s),o.traceState&&n.set(r,ft.TRACE_STATE_HEADER,o.traceState.serialize())}extract(e,r,n){let o=n.get(r,ft.TRACE_PARENT_HEADER);if(!o)return e;let s=Array.isArray(o)?o[0]:o;if(typeof s!="string")return e;let i=aD(s);if(!i)return e;i.isRemote=!0;let a=n.get(r,ft.TRACE_STATE_HEADER);if(a){let c=Array.isArray(a)?a.join(","):a;i.traceState=new Fse.TraceState(typeof c=="string"?c:void 0)}return Np.trace.setSpanContext(e,i)}fields(){return[ft.TRACE_PARENT_HEADER,ft.TRACE_STATE_HEADER]}};ft.W3CTraceContextPropagator=RT});var uD=E(Dr=>{"use strict";Object.defineProperty(Dr,"__esModule",{value:!0});Dr.getRPCMetadata=Dr.deleteRPCMetadata=Dr.setRPCMetadata=Dr.RPCType=void 0;var Xse=(M(),P(U)),OT=(0,Xse.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),zse;(function(t){t.HTTP="http"})(zse=Dr.RPCType||(Dr.RPCType={}));function Qse(t,e){return t.setValue(OT,e)}Dr.setRPCMetadata=Qse;function Jse(t){return t.deleteValue(OT)}Dr.deleteRPCMetadata=Jse;function Zse(t){return t.getValue(OT)}Dr.getRPCMetadata=Zse});var IT=E(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.AlwaysOffSampler=void 0;var eie=(M(),P(U)),NT=class{shouldSample(){return{decision:eie.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Ip.AlwaysOffSampler=NT});var CT=E(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.AlwaysOnSampler=void 0;var tie=(M(),P(U)),PT=class{shouldSample(){return{decision:tie.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};Pp.AlwaysOnSampler=PT});var pD=E(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});yp.ParentBasedSampler=void 0;var Cp=(M(),P(U)),rie=iT(),lD=IT(),yT=CT(),MT=class{constructor(e){var r,n,o,s;this._root=e.root,this._root||((0,rie.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yT.AlwaysOnSampler),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new yT.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new lD.AlwaysOffSampler,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new yT.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new lD.AlwaysOffSampler}shouldSample(e,r,n,o,s,i){let a=Cp.trace.getSpanContext(e);return!a||!(0,Cp.isSpanContextValid)(a)?this._root.shouldSample(e,r,n,o,s,i):a.isRemote?a.traceFlags&Cp.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,i):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,i):a.traceFlags&Cp.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,i):this._localParentNotSampled.shouldSample(e,r,n,o,s,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};yp.ParentBasedSampler=MT});var _D=E(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.TraceIdRatioBasedSampler=void 0;var vT=(M(),P(U)),bT=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,vT.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?vT.SamplingDecision.RECORD_AND_SAMPLED:vT.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,s=parseInt(e.slice(o,o+8),16);r=(r^s)>>>0}return r}};Mp.TraceIdRatioBasedSampler=bT});var TD=E(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.isPlainObject=void 0;var nie="[object Object]",oie="[object Null]",sie="[object Undefined]",iie=Function.prototype,dD=iie.toString,aie=dD.call(Object),cie=uie(Object.getPrototypeOf,Object),ED=Object.prototype,fD=ED.hasOwnProperty,Ns=Symbol?Symbol.toStringTag:void 0,SD=ED.toString;function uie(t,e){return function(r){return t(e(r))}}function lie(t){if(!pie(t)||_ie(t)!==nie)return!1;let e=cie(t);if(e===null)return!0;let r=fD.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&dD.call(r)===aie}vp.isPlainObject=lie;function pie(t){return t!=null&&typeof t=="object"}function _ie(t){return t==null?t===void 0?sie:oie:Ns&&Ns in Object(t)?die(t):Eie(t)}function die(t){let e=fD.call(t,Ns),r=t[Ns],n=!1;try{t[Ns]=void 0,n=!0}catch{}let o=SD.call(t);return n&&(e?t[Ns]=r:delete t[Ns]),o}function Eie(t){return SD.call(t)}});var RD=E(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.merge=void 0;var mD=TD(),fie=20;function Sie(...t){let e=t.shift(),r=new WeakMap;for(;t.length>0;)e=gD(e,t.shift(),0,r);return e}Dp.merge=Sie;function LT(t){return Lp(t)?t.slice():t}function gD(t,e,r=0,n){let o;if(!(r>fie)){if(r++,bp(t)||bp(e)||AD(e))o=LT(e);else if(Lp(t)){if(o=t.slice(),Lp(e))for(let s=0,i=e.length;s<i;s++)o.push(LT(e[s]));else if(Cc(e)){let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let c=s[i];o[c]=LT(e[c])}}}else if(Cc(t))if(Cc(e)){if(!Tie(t,e))return e;o=Object.assign({},t);let s=Object.keys(e);for(let i=0,a=s.length;i<a;i++){let c=s[i],u=e[c];if(bp(u))typeof u>"u"?delete o[c]:o[c]=u;else{let l=o[c],p=u;if(hD(t,c,n)||hD(e,c,n))delete o[c];else{if(Cc(l)&&Cc(p)){let _=n.get(l)||[],d=n.get(p)||[];_.push({obj:t,key:c}),d.push({obj:e,key:c}),n.set(l,_),n.set(p,d)}o[c]=gD(o[c],u,r,n)}}}}else o=e;return o}}function hD(t,e,r){let n=r.get(t[e])||[];for(let o=0,s=n.length;o<s;o++){let i=n[o];if(i.key===e&&i.obj===t)return!0}return!1}function Lp(t){return Array.isArray(t)}function AD(t){return typeof t=="function"}function Cc(t){return!bp(t)&&!Lp(t)&&!AD(t)&&typeof t=="object"}function bp(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Date||t instanceof RegExp||t===null}function Tie(t,e){return!(!(0,mD.isPlainObject)(t)||!(0,mD.isPlainObject)(e))}});var OD=E(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});hi.callWithTimeout=hi.TimeoutError=void 0;var xp=class t extends Error{constructor(e){super(e),Object.setPrototypeOf(this,t.prototype)}};hi.TimeoutError=xp;function mie(t,e){let r,n=new Promise(function(s,i){r=setTimeout(function(){i(new xp("Operation timed out."))},e)});return Promise.race([t,n]).then(o=>(clearTimeout(r),o),o=>{throw clearTimeout(r),o})}hi.callWithTimeout=mie});var ID=E(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.isUrlIgnored=gi.urlMatches=void 0;function ND(t,e){return typeof e=="string"?t===e:!!t.match(e)}gi.urlMatches=ND;function hie(t,e){if(!e)return!1;for(let r of e)if(ND(t,r))return!0;return!1}gi.isUrlIgnored=hie});var PD=E(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.isWrapped=void 0;function gie(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}Up.isWrapped=gie});var CD=E(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.Deferred=void 0;var DT=class{constructor(){this._promise=new Promise((e,r)=>{this._resolve=e,this._reject=r})}get promise(){return this._promise}resolve(e){this._resolve(e)}reject(e){this._reject(e)}};wp.Deferred=DT});var yD=E(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.BindOnceFuture=void 0;var Aie=CD(),xT=class{constructor(e,r){this._callback=e,this._that=r,this._isCalled=!1,this._deferred=new Aie.Deferred}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...e){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...e)).then(r=>this._deferred.resolve(r),r=>this._deferred.reject(r))}catch(r){this._deferred.reject(r)}}return this._deferred.promise}};Vp.BindOnceFuture=xT});var vD=E(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});Bp._export=void 0;var MD=(M(),P(U)),Rie=Rc();function Oie(t,e){return new Promise(r=>{MD.context.with((0,Rie.suppressTracing)(MD.context.active()),()=>{t.export(e,n=>{r(n)})})})}Bp._export=Oie});var re=E(g=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});g.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT=g.DEFAULT_ATTRIBUTE_COUNT_LIMIT=g.TraceState=g.unsuppressTracing=g.suppressTracing=g.isTracingSuppressed=g.TraceIdRatioBasedSampler=g.ParentBasedSampler=g.AlwaysOnSampler=g.AlwaysOffSampler=g.setRPCMetadata=g.getRPCMetadata=g.deleteRPCMetadata=g.RPCType=g.parseTraceParent=g.W3CTraceContextPropagator=g.TRACE_STATE_HEADER=g.TRACE_PARENT_HEADER=g.CompositePropagator=g.unrefTimer=g.otperformance=g.hexToBase64=g.getEnvWithoutDefaults=g.getEnv=g._globalThis=g.SDK_INFO=g.RandomIdGenerator=g.baggageUtils=g.ExportResultCode=g.hexToBinary=g.timeInputToHrTime=g.millisToHrTime=g.isTimeInputHrTime=g.isTimeInput=g.hrTimeToTimeStamp=g.hrTimeToNanoseconds=g.hrTimeToMilliseconds=g.hrTimeToMicroseconds=g.hrTimeDuration=g.hrTime=g.getTimeOrigin=g.addHrTimes=g.loggingErrorHandler=g.setGlobalErrorHandler=g.globalErrorHandler=g.sanitizeAttributes=g.isAttributeValue=g.isAttributeKey=g.AnchoredClock=g.W3CBaggagePropagator=void 0;g.internal=g.VERSION=g.BindOnceFuture=g.isWrapped=g.urlMatches=g.isUrlIgnored=g.callWithTimeout=g.TimeoutError=g.TracesSamplerValues=g.merge=g.parseEnvironment=g.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT=g.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT=g.DEFAULT_ENVIRONMENT=void 0;var Nie=lI();Object.defineProperty(g,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Nie.W3CBaggagePropagator}});var Iie=pI();Object.defineProperty(g,"AnchoredClock",{enumerable:!0,get:function(){return Iie.AnchoredClock}});var UT=SI();Object.defineProperty(g,"isAttributeKey",{enumerable:!0,get:function(){return UT.isAttributeKey}});Object.defineProperty(g,"isAttributeValue",{enumerable:!0,get:function(){return UT.isAttributeValue}});Object.defineProperty(g,"sanitizeAttributes",{enumerable:!0,get:function(){return UT.sanitizeAttributes}});var bD=iT();Object.defineProperty(g,"globalErrorHandler",{enumerable:!0,get:function(){return bD.globalErrorHandler}});Object.defineProperty(g,"setGlobalErrorHandler",{enumerable:!0,get:function(){return bD.setGlobalErrorHandler}});var Pie=sT();Object.defineProperty(g,"loggingErrorHandler",{enumerable:!0,get:function(){return Pie.loggingErrorHandler}});var Er=JL();Object.defineProperty(g,"addHrTimes",{enumerable:!0,get:function(){return Er.addHrTimes}});Object.defineProperty(g,"getTimeOrigin",{enumerable:!0,get:function(){return Er.getTimeOrigin}});Object.defineProperty(g,"hrTime",{enumerable:!0,get:function(){return Er.hrTime}});Object.defineProperty(g,"hrTimeDuration",{enumerable:!0,get:function(){return Er.hrTimeDuration}});Object.defineProperty(g,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Er.hrTimeToMicroseconds}});Object.defineProperty(g,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Er.hrTimeToMilliseconds}});Object.defineProperty(g,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Er.hrTimeToNanoseconds}});Object.defineProperty(g,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Er.hrTimeToTimeStamp}});Object.defineProperty(g,"isTimeInput",{enumerable:!0,get:function(){return Er.isTimeInput}});Object.defineProperty(g,"isTimeInputHrTime",{enumerable:!0,get:function(){return Er.isTimeInputHrTime}});Object.defineProperty(g,"millisToHrTime",{enumerable:!0,get:function(){return Er.millisToHrTime}});Object.defineProperty(g,"timeInputToHrTime",{enumerable:!0,get:function(){return Er.timeInputToHrTime}});var Cie=lT();Object.defineProperty(g,"hexToBinary",{enumerable:!0,get:function(){return Cie.hexToBinary}});var yie=ZL();Object.defineProperty(g,"ExportResultCode",{enumerable:!0,get:function(){return yie.ExportResultCode}});var Gp=eT();g.baggageUtils={getKeyPairs:Gp.getKeyPairs,serializeKeyPairs:Gp.serializeKeyPairs,parseKeyPairsIntoRecord:Gp.parseKeyPairsIntoRecord,parsePairKeyValue:Gp.parsePairKeyValue};var Eo=ET();Object.defineProperty(g,"RandomIdGenerator",{enumerable:!0,get:function(){return Eo.RandomIdGenerator}});Object.defineProperty(g,"SDK_INFO",{enumerable:!0,get:function(){return Eo.SDK_INFO}});Object.defineProperty(g,"_globalThis",{enumerable:!0,get:function(){return Eo._globalThis}});Object.defineProperty(g,"getEnv",{enumerable:!0,get:function(){return Eo.getEnv}});Object.defineProperty(g,"getEnvWithoutDefaults",{enumerable:!0,get:function(){return Eo.getEnvWithoutDefaults}});Object.defineProperty(g,"hexToBase64",{enumerable:!0,get:function(){return Eo.hexToBase64}});Object.defineProperty(g,"otperformance",{enumerable:!0,get:function(){return Eo.otperformance}});Object.defineProperty(g,"unrefTimer",{enumerable:!0,get:function(){return Eo.unrefTimer}});var Mie=tD();Object.defineProperty(g,"CompositePropagator",{enumerable:!0,get:function(){return Mie.CompositePropagator}});var Hp=cD();Object.defineProperty(g,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Hp.TRACE_PARENT_HEADER}});Object.defineProperty(g,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Hp.TRACE_STATE_HEADER}});Object.defineProperty(g,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Hp.W3CTraceContextPropagator}});Object.defineProperty(g,"parseTraceParent",{enumerable:!0,get:function(){return Hp.parseTraceParent}});var kp=uD();Object.defineProperty(g,"RPCType",{enumerable:!0,get:function(){return kp.RPCType}});Object.defineProperty(g,"deleteRPCMetadata",{enumerable:!0,get:function(){return kp.deleteRPCMetadata}});Object.defineProperty(g,"getRPCMetadata",{enumerable:!0,get:function(){return kp.getRPCMetadata}});Object.defineProperty(g,"setRPCMetadata",{enumerable:!0,get:function(){return kp.setRPCMetadata}});var vie=IT();Object.defineProperty(g,"AlwaysOffSampler",{enumerable:!0,get:function(){return vie.AlwaysOffSampler}});var bie=CT();Object.defineProperty(g,"AlwaysOnSampler",{enumerable:!0,get:function(){return bie.AlwaysOnSampler}});var Lie=pD();Object.defineProperty(g,"ParentBasedSampler",{enumerable:!0,get:function(){return Lie.ParentBasedSampler}});var Die=_D();Object.defineProperty(g,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return Die.TraceIdRatioBasedSampler}});var wT=Rc();Object.defineProperty(g,"isTracingSuppressed",{enumerable:!0,get:function(){return wT.isTracingSuppressed}});Object.defineProperty(g,"suppressTracing",{enumerable:!0,get:function(){return wT.suppressTracing}});Object.defineProperty(g,"unsuppressTracing",{enumerable:!0,get:function(){return wT.unsuppressTracing}});var xie=AT();Object.defineProperty(g,"TraceState",{enumerable:!0,get:function(){return xie.TraceState}});var Ai=cT();Object.defineProperty(g,"DEFAULT_ATTRIBUTE_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_ATTRIBUTE_COUNT_LIMIT}});Object.defineProperty(g,"DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}});Object.defineProperty(g,"DEFAULT_ENVIRONMENT",{enumerable:!0,get:function(){return Ai.DEFAULT_ENVIRONMENT}});Object.defineProperty(g,"DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT}});Object.defineProperty(g,"DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT",{enumerable:!0,get:function(){return Ai.DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}});Object.defineProperty(g,"parseEnvironment",{enumerable:!0,get:function(){return Ai.parseEnvironment}});var Uie=RD();Object.defineProperty(g,"merge",{enumerable:!0,get:function(){return Uie.merge}});var wie=aT();Object.defineProperty(g,"TracesSamplerValues",{enumerable:!0,get:function(){return wie.TracesSamplerValues}});var LD=OD();Object.defineProperty(g,"TimeoutError",{enumerable:!0,get:function(){return LD.TimeoutError}});Object.defineProperty(g,"callWithTimeout",{enumerable:!0,get:function(){return LD.callWithTimeout}});var DD=ID();Object.defineProperty(g,"isUrlIgnored",{enumerable:!0,get:function(){return DD.isUrlIgnored}});Object.defineProperty(g,"urlMatches",{enumerable:!0,get:function(){return DD.urlMatches}});var Vie=PD();Object.defineProperty(g,"isWrapped",{enumerable:!0,get:function(){return Vie.isWrapped}});var Bie=yD();Object.defineProperty(g,"BindOnceFuture",{enumerable:!0,get:function(){return Bie.BindOnceFuture}});var Gie=_T();Object.defineProperty(g,"VERSION",{enumerable:!0,get:function(){return Gie.VERSION}});var Hie=vD();g.internal={_export:Hie._export}});var yc=E((mVe,xD)=>{"use strict";var kie="2.0.0",Fie=Number.MAX_SAFE_INTEGER||9007199254740991,qie=16,jie=250,Yie=["major","premajor","minor","preminor","patch","prepatch","prerelease"];xD.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:qie,MAX_SAFE_BUILD_LENGTH:jie,MAX_SAFE_INTEGER:Fie,RELEASE_TYPES:Yie,SEMVER_SPEC_VERSION:kie,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var Mc=E((hVe,UD)=>{"use strict";var $ie=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};UD.exports=$ie});var Ri=E((on,wD)=>{"use strict";var{MAX_SAFE_COMPONENT_LENGTH:VT,MAX_SAFE_BUILD_LENGTH:Kie,MAX_LENGTH:Wie}=yc(),Xie=Mc();on=wD.exports={};var zie=on.re=[],Qie=on.safeRe=[],L=on.src=[],Jie=on.safeSrc=[],D=on.t={},Zie=0,BT="[a-zA-Z0-9-]",eae=[["\\s",1],["\\d",Wie],[BT,Kie]],tae=t=>{for(let[e,r]of eae)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Y=(t,e,r)=>{let n=tae(e),o=Zie++;Xie(t,o,e),D[t]=o,L[o]=e,Jie[o]=n,zie[o]=new RegExp(e,r?"g":void 0),Qie[o]=new RegExp(n,r?"g":void 0)};Y("NUMERICIDENTIFIER","0|[1-9]\\d*");Y("NUMERICIDENTIFIERLOOSE","\\d+");Y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${BT}*`);Y("MAINVERSION",`(${L[D.NUMERICIDENTIFIER]})\\.(${L[D.NUMERICIDENTIFIER]})\\.(${L[D.NUMERICIDENTIFIER]})`);Y("MAINVERSIONLOOSE",`(${L[D.NUMERICIDENTIFIERLOOSE]})\\.(${L[D.NUMERICIDENTIFIERLOOSE]})\\.(${L[D.NUMERICIDENTIFIERLOOSE]})`);Y("PRERELEASEIDENTIFIER",`(?:${L[D.NONNUMERICIDENTIFIER]}|${L[D.NUMERICIDENTIFIER]})`);Y("PRERELEASEIDENTIFIERLOOSE",`(?:${L[D.NONNUMERICIDENTIFIER]}|${L[D.NUMERICIDENTIFIERLOOSE]})`);Y("PRERELEASE",`(?:-(${L[D.PRERELEASEIDENTIFIER]}(?:\\.${L[D.PRERELEASEIDENTIFIER]})*))`);Y("PRERELEASELOOSE",`(?:-?(${L[D.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${L[D.PRERELEASEIDENTIFIERLOOSE]})*))`);Y("BUILDIDENTIFIER",`${BT}+`);Y("BUILD",`(?:\\+(${L[D.BUILDIDENTIFIER]}(?:\\.${L[D.BUILDIDENTIFIER]})*))`);Y("FULLPLAIN",`v?${L[D.MAINVERSION]}${L[D.PRERELEASE]}?${L[D.BUILD]}?`);Y("FULL",`^${L[D.FULLPLAIN]}$`);Y("LOOSEPLAIN",`[v=\\s]*${L[D.MAINVERSIONLOOSE]}${L[D.PRERELEASELOOSE]}?${L[D.BUILD]}?`);Y("LOOSE",`^${L[D.LOOSEPLAIN]}$`);Y("GTLT","((?:<|>)?=?)");Y("XRANGEIDENTIFIERLOOSE",`${L[D.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Y("XRANGEIDENTIFIER",`${L[D.NUMERICIDENTIFIER]}|x|X|\\*`);Y("XRANGEPLAIN",`[v=\\s]*(${L[D.XRANGEIDENTIFIER]})(?:\\.(${L[D.XRANGEIDENTIFIER]})(?:\\.(${L[D.XRANGEIDENTIFIER]})(?:${L[D.PRERELEASE]})?${L[D.BUILD]}?)?)?`);Y("XRANGEPLAINLOOSE",`[v=\\s]*(${L[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[D.XRANGEIDENTIFIERLOOSE]})(?:\\.(${L[D.XRANGEIDENTIFIERLOOSE]})(?:${L[D.PRERELEASELOOSE]})?${L[D.BUILD]}?)?)?`);Y("XRANGE",`^${L[D.GTLT]}\\s*${L[D.XRANGEPLAIN]}$`);Y("XRANGELOOSE",`^${L[D.GTLT]}\\s*${L[D.XRANGEPLAINLOOSE]}$`);Y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${VT}})(?:\\.(\\d{1,${VT}}))?(?:\\.(\\d{1,${VT}}))?`);Y("COERCE",`${L[D.COERCEPLAIN]}(?:$|[^\\d])`);Y("COERCEFULL",L[D.COERCEPLAIN]+`(?:${L[D.PRERELEASE]})?(?:${L[D.BUILD]})?(?:$|[^\\d])`);Y("COERCERTL",L[D.COERCE],!0);Y("COERCERTLFULL",L[D.COERCEFULL],!0);Y("LONETILDE","(?:~>?)");Y("TILDETRIM",`(\\s*)${L[D.LONETILDE]}\\s+`,!0);on.tildeTrimReplace="$1~";Y("TILDE",`^${L[D.LONETILDE]}${L[D.XRANGEPLAIN]}$`);Y("TILDELOOSE",`^${L[D.LONETILDE]}${L[D.XRANGEPLAINLOOSE]}$`);Y("LONECARET","(?:\\^)");Y("CARETTRIM",`(\\s*)${L[D.LONECARET]}\\s+`,!0);on.caretTrimReplace="$1^";Y("CARET",`^${L[D.LONECARET]}${L[D.XRANGEPLAIN]}$`);Y("CARETLOOSE",`^${L[D.LONECARET]}${L[D.XRANGEPLAINLOOSE]}$`);Y("COMPARATORLOOSE",`^${L[D.GTLT]}\\s*(${L[D.LOOSEPLAIN]})$|^$`);Y("COMPARATOR",`^${L[D.GTLT]}\\s*(${L[D.FULLPLAIN]})$|^$`);Y("COMPARATORTRIM",`(\\s*)${L[D.GTLT]}\\s*(${L[D.LOOSEPLAIN]}|${L[D.XRANGEPLAIN]})`,!0);on.comparatorTrimReplace="$1$2$3";Y("HYPHENRANGE",`^\\s*(${L[D.XRANGEPLAIN]})\\s+-\\s+(${L[D.XRANGEPLAIN]})\\s*$`);Y("HYPHENRANGELOOSE",`^\\s*(${L[D.XRANGEPLAINLOOSE]})\\s+-\\s+(${L[D.XRANGEPLAINLOOSE]})\\s*$`);Y("STAR","(<|>)?=?\\s*\\*");Y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var Fp=E((gVe,VD)=>{"use strict";var rae=Object.freeze({loose:!0}),nae=Object.freeze({}),oae=t=>t?typeof t!="object"?rae:t:nae;VD.exports=oae});var GT=E((AVe,HD)=>{"use strict";var BD=/^[0-9]+$/,GD=(t,e)=>{if(typeof t=="number"&&typeof e=="number")return t===e?0:t<e?-1:1;let r=BD.test(t),n=BD.test(e);return r&&n&&(t=+t,e=+e),t===e?0:r&&!n?-1:n&&!r?1:t<e?-1:1},sae=(t,e)=>GD(e,t);HD.exports={compareIdentifiers:GD,rcompareIdentifiers:sae}});var St=E((RVe,FD)=>{"use strict";var qp=Mc(),{MAX_LENGTH:kD,MAX_SAFE_INTEGER:jp}=yc(),{safeRe:Yp,t:$p}=Ri(),iae=Fp(),{compareIdentifiers:HT}=GT(),kT=class t{constructor(e,r){if(r=iae(r),e instanceof t){if(e.loose===!!r.loose&&e.includePrerelease===!!r.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>kD)throw new TypeError(`version is longer than ${kD} characters`);qp("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let n=e.trim().match(r.loose?Yp[$p.LOOSE]:Yp[$p.FULL]);if(!n)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>jp||this.major<0)throw new TypeError("Invalid major version");if(this.minor>jp||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>jp||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(o=>{if(/^[0-9]+$/.test(o)){let s=+o;if(s>=0&&s<jp)return s}return o}):this.prerelease=[],this.build=n[5]?n[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(qp("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)),this.major<e.major?-1:this.major>e.major?1:this.minor<e.minor?-1:this.minor>e.minor?1:this.patch<e.patch?-1:this.patch>e.patch?1:0}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 r=0;do{let n=this.prerelease[r],o=e.prerelease[r];if(qp("prerelease compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return HT(n,o)}while(++r)}compareBuild(e){e instanceof t||(e=new t(e,this.options));let r=0;do{let n=this.build[r],o=e.build[r];if(qp("build compare",r,n,o),n===void 0&&o===void 0)return 0;if(o===void 0)return 1;if(n===void 0)return-1;if(n===o)continue;return HT(n,o)}while(++r)}inc(e,r,n){if(e.startsWith("pre")){if(!r&&n===!1)throw new Error("invalid increment argument: identifier is empty");if(r){let o=`-${r}`.match(this.options.loose?Yp[$p.PRERELEASELOOSE]:Yp[$p.PRERELEASE]);if(!o||o[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,n),this.inc("pre",r,n);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,n),this.inc("pre",r,n);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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 o=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[o];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(o)}}if(r){let s=[r,o];n===!1&&(s=[r]),HT(this.prerelease[0],r)===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}};FD.exports=kT});var Is=E((OVe,jD)=>{"use strict";var qD=St(),aae=(t,e,r=!1)=>{if(t instanceof qD)return t;try{return new qD(t,e)}catch(n){if(!r)return null;throw n}};jD.exports=aae});var $D=E((NVe,YD)=>{"use strict";var cae=Is(),uae=(t,e)=>{let r=cae(t,e);return r?r.version:null};YD.exports=uae});var WD=E((IVe,KD)=>{"use strict";var lae=Is(),pae=(t,e)=>{let r=lae(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};KD.exports=pae});var QD=E((PVe,zD)=>{"use strict";var XD=St(),_ae=(t,e,r,n,o)=>{typeof r=="string"&&(o=n,n=r,r=void 0);try{return new XD(t instanceof XD?t.version:t,r).inc(e,n,o).version}catch{return null}};zD.exports=_ae});var ex=E((CVe,ZD)=>{"use strict";var JD=Is(),dae=(t,e)=>{let r=JD(t,null,!0),n=JD(e,null,!0),o=r.compare(n);if(o===0)return null;let s=o>0,i=s?r:n,a=s?n:r,c=!!i.prerelease.length;if(!!a.prerelease.length&&!c){if(!a.patch&&!a.minor)return"major";if(a.compareMain(i)===0)return a.minor&&!a.patch?"minor":"patch"}let l=c?"pre":"";return r.major!==n.major?l+"major":r.minor!==n.minor?l+"minor":r.patch!==n.patch?l+"patch":"prerelease"};ZD.exports=dae});var rx=E((yVe,tx)=>{"use strict";var Eae=St(),fae=(t,e)=>new Eae(t,e).major;tx.exports=fae});var ox=E((MVe,nx)=>{"use strict";var Sae=St(),Tae=(t,e)=>new Sae(t,e).minor;nx.exports=Tae});var ix=E((vVe,sx)=>{"use strict";var mae=St(),hae=(t,e)=>new mae(t,e).patch;sx.exports=hae});var cx=E((bVe,ax)=>{"use strict";var gae=Is(),Aae=(t,e)=>{let r=gae(t,e);return r&&r.prerelease.length?r.prerelease:null};ax.exports=Aae});var fr=E((LVe,lx)=>{"use strict";var ux=St(),Rae=(t,e,r)=>new ux(t,r).compare(new ux(e,r));lx.exports=Rae});var _x=E((DVe,px)=>{"use strict";var Oae=fr(),Nae=(t,e,r)=>Oae(e,t,r);px.exports=Nae});var Ex=E((xVe,dx)=>{"use strict";var Iae=fr(),Pae=(t,e)=>Iae(t,e,!0);dx.exports=Pae});var Kp=E((UVe,Sx)=>{"use strict";var fx=St(),Cae=(t,e,r)=>{let n=new fx(t,r),o=new fx(e,r);return n.compare(o)||n.compareBuild(o)};Sx.exports=Cae});var mx=E((wVe,Tx)=>{"use strict";var yae=Kp(),Mae=(t,e)=>t.sort((r,n)=>yae(r,n,e));Tx.exports=Mae});var gx=E((VVe,hx)=>{"use strict";var vae=Kp(),bae=(t,e)=>t.sort((r,n)=>vae(n,r,e));hx.exports=bae});var vc=E((BVe,Ax)=>{"use strict";var Lae=fr(),Dae=(t,e,r)=>Lae(t,e,r)>0;Ax.exports=Dae});var Wp=E((GVe,Rx)=>{"use strict";var xae=fr(),Uae=(t,e,r)=>xae(t,e,r)<0;Rx.exports=Uae});var FT=E((HVe,Ox)=>{"use strict";var wae=fr(),Vae=(t,e,r)=>wae(t,e,r)===0;Ox.exports=Vae});var qT=E((kVe,Nx)=>{"use strict";var Bae=fr(),Gae=(t,e,r)=>Bae(t,e,r)!==0;Nx.exports=Gae});var Xp=E((FVe,Ix)=>{"use strict";var Hae=fr(),kae=(t,e,r)=>Hae(t,e,r)>=0;Ix.exports=kae});var zp=E((qVe,Px)=>{"use strict";var Fae=fr(),qae=(t,e,r)=>Fae(t,e,r)<=0;Px.exports=qae});var jT=E((jVe,Cx)=>{"use strict";var jae=FT(),Yae=qT(),$ae=vc(),Kae=Xp(),Wae=Wp(),Xae=zp(),zae=(t,e,r,n)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return jae(t,r,n);case"!=":return Yae(t,r,n);case">":return $ae(t,r,n);case">=":return Kae(t,r,n);case"<":return Wae(t,r,n);case"<=":return Xae(t,r,n);default:throw new TypeError(`Invalid operator: ${e}`)}};Cx.exports=zae});var Mx=E((YVe,yx)=>{"use strict";var Qae=St(),Jae=Is(),{safeRe:Qp,t:Jp}=Ri(),Zae=(t,e)=>{if(t instanceof Qae)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(e.includePrerelease?Qp[Jp.COERCEFULL]:Qp[Jp.COERCE]);else{let c=e.includePrerelease?Qp[Jp.COERCERTLFULL]:Qp[Jp.COERCERTL],u;for(;(u=c.exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||u.index+u[0].length!==r.index+r[0].length)&&(r=u),c.lastIndex=u.index+u[1].length+u[2].length;c.lastIndex=-1}if(r===null)return null;let n=r[2],o=r[3]||"0",s=r[4]||"0",i=e.includePrerelease&&r[5]?`-${r[5]}`:"",a=e.includePrerelease&&r[6]?`+${r[6]}`:"";return Jae(`${n}.${o}.${s}${i}${a}`,e)};yx.exports=Zae});var bx=E(($Ve,vx)=>{"use strict";var YT=class{constructor(){this.max=1e3,this.map=new Map}get(e){let r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){let o=this.map.keys().next().value;this.delete(o)}this.map.set(e,r)}return this}};vx.exports=YT});var Sr=E((KVe,Ux)=>{"use strict";var ece=/\s+/g,$T=class t{constructor(e,r){if(r=rce(r),e instanceof t)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new t(e.raw,r);if(e instanceof KT)return this.raw=e.value,this.set=[[e]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().replace(ece," "),this.set=this.raw.split("||").map(n=>this.parseRange(n.trim())).filter(n=>n.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let n=this.set[0];if(this.set=this.set.filter(o=>!Dx(o[0])),this.set.length===0)this.set=[n];else if(this.set.length>1){for(let o of this.set)if(o.length===1&&uce(o[0])){this.set=[o];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+="||");let r=this.set[e];for(let n=0;n<r.length;n++)n>0&&(this.formatted+=" "),this.formatted+=r[n].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let n=((this.options.includePrerelease&&ace)|(this.options.loose&&cce))+":"+e,o=Lx.get(n);if(o)return o;let s=this.options.loose,i=s?Mt[Tt.HYPHENRANGELOOSE]:Mt[Tt.HYPHENRANGE];e=e.replace(i,hce(this.options.includePrerelease)),Se("hyphen replace",e),e=e.replace(Mt[Tt.COMPARATORTRIM],oce),Se("comparator trim",e),e=e.replace(Mt[Tt.TILDETRIM],sce),Se("tilde trim",e),e=e.replace(Mt[Tt.CARETTRIM],ice),Se("caret trim",e);let a=e.split(" ").map(p=>lce(p,this.options)).join(" ").split(/\s+/).map(p=>mce(p,this.options));s&&(a=a.filter(p=>(Se("loose invalid filter",p,this.options),!!p.match(Mt[Tt.COMPARATORLOOSE])))),Se("range list",a);let c=new Map,u=a.map(p=>new KT(p,this.options));for(let p of u){if(Dx(p))return[p];c.set(p.value,p)}c.size>1&&c.has("")&&c.delete("");let l=[...c.values()];return Lx.set(n,l),l}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Range is required");return this.set.some(n=>xx(n,r)&&e.set.some(o=>xx(o,r)&&n.every(s=>o.every(i=>s.intersects(i,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new nce(e,this.options)}catch{return!1}for(let r=0;r<this.set.length;r++)if(gce(this.set[r],e,this.options))return!0;return!1}};Ux.exports=$T;var tce=bx(),Lx=new tce,rce=Fp(),KT=bc(),Se=Mc(),nce=St(),{safeRe:Mt,t:Tt,comparatorTrimReplace:oce,tildeTrimReplace:sce,caretTrimReplace:ice}=Ri(),{FLAG_INCLUDE_PRERELEASE:ace,FLAG_LOOSE:cce}=yc(),Dx=t=>t.value==="<0.0.0-0",uce=t=>t.value==="",xx=(t,e)=>{let r=!0,n=t.slice(),o=n.pop();for(;r&&n.length;)r=n.every(s=>o.intersects(s,e)),o=n.pop();return r},lce=(t,e)=>(t=t.replace(Mt[Tt.BUILD],""),Se("comp",t,e),t=dce(t,e),Se("caret",t),t=pce(t,e),Se("tildes",t),t=fce(t,e),Se("xrange",t),t=Tce(t,e),Se("stars",t),t),vt=t=>!t||t.toLowerCase()==="x"||t==="*",pce=(t,e)=>t.trim().split(/\s+/).map(r=>_ce(r,e)).join(" "),_ce=(t,e)=>{let r=e.loose?Mt[Tt.TILDELOOSE]:Mt[Tt.TILDE];return t.replace(r,(n,o,s,i,a)=>{Se("tilde",t,n,o,s,i,a);let c;return vt(o)?c="":vt(s)?c=`>=${o}.0.0 <${+o+1}.0.0-0`:vt(i)?c=`>=${o}.${s}.0 <${o}.${+s+1}.0-0`:a?(Se("replaceTilde pr",a),c=`>=${o}.${s}.${i}-${a} <${o}.${+s+1}.0-0`):c=`>=${o}.${s}.${i} <${o}.${+s+1}.0-0`,Se("tilde return",c),c})},dce=(t,e)=>t.trim().split(/\s+/).map(r=>Ece(r,e)).join(" "),Ece=(t,e)=>{Se("caret",t,e);let r=e.loose?Mt[Tt.CARETLOOSE]:Mt[Tt.CARET],n=e.includePrerelease?"-0":"";return t.replace(r,(o,s,i,a,c)=>{Se("caret",t,o,s,i,a,c);let u;return vt(s)?u="":vt(i)?u=`>=${s}.0.0${n} <${+s+1}.0.0-0`:vt(a)?s==="0"?u=`>=${s}.${i}.0${n} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.0${n} <${+s+1}.0.0-0`:c?(Se("replaceCaret pr",c),s==="0"?i==="0"?u=`>=${s}.${i}.${a}-${c} <${s}.${i}.${+a+1}-0`:u=`>=${s}.${i}.${a}-${c} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.${a}-${c} <${+s+1}.0.0-0`):(Se("no pr"),s==="0"?i==="0"?u=`>=${s}.${i}.${a}${n} <${s}.${i}.${+a+1}-0`:u=`>=${s}.${i}.${a}${n} <${s}.${+i+1}.0-0`:u=`>=${s}.${i}.${a} <${+s+1}.0.0-0`),Se("caret return",u),u})},fce=(t,e)=>(Se("replaceXRanges",t,e),t.split(/\s+/).map(r=>Sce(r,e)).join(" ")),Sce=(t,e)=>{t=t.trim();let r=e.loose?Mt[Tt.XRANGELOOSE]:Mt[Tt.XRANGE];return t.replace(r,(n,o,s,i,a,c)=>{Se("xRange",t,n,o,s,i,a,c);let u=vt(s),l=u||vt(i),p=l||vt(a),_=p;return o==="="&&_&&(o=""),c=e.includePrerelease?"-0":"",u?o===">"||o==="<"?n="<0.0.0-0":n="*":o&&_?(l&&(i=0),a=0,o===">"?(o=">=",l?(s=+s+1,i=0,a=0):(i=+i+1,a=0)):o==="<="&&(o="<",l?s=+s+1:i=+i+1),o==="<"&&(c="-0"),n=`${o+s}.${i}.${a}${c}`):l?n=`>=${s}.0.0${c} <${+s+1}.0.0-0`:p&&(n=`>=${s}.${i}.0${c} <${s}.${+i+1}.0-0`),Se("xRange return",n),n})},Tce=(t,e)=>(Se("replaceStars",t,e),t.trim().replace(Mt[Tt.STAR],"")),mce=(t,e)=>(Se("replaceGTE0",t,e),t.trim().replace(Mt[e.includePrerelease?Tt.GTE0PRE:Tt.GTE0],"")),hce=t=>(e,r,n,o,s,i,a,c,u,l,p,_)=>(vt(n)?r="":vt(o)?r=`>=${n}.0.0${t?"-0":""}`:vt(s)?r=`>=${n}.${o}.0${t?"-0":""}`:i?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,vt(u)?c="":vt(l)?c=`<${+u+1}.0.0-0`:vt(p)?c=`<${u}.${+l+1}.0-0`:_?c=`<=${u}.${l}.${p}-${_}`:t?c=`<${u}.${l}.${+p+1}-0`:c=`<=${c}`,`${r} ${c}`.trim()),gce=(t,e,r)=>{for(let n=0;n<t.length;n++)if(!t[n].test(e))return!1;if(e.prerelease.length&&!r.includePrerelease){for(let n=0;n<t.length;n++)if(Se(t[n].semver),t[n].semver!==KT.ANY&&t[n].semver.prerelease.length>0){let o=t[n].semver;if(o.major===e.major&&o.minor===e.minor&&o.patch===e.patch)return!0}return!1}return!0}});var bc=E((WVe,kx)=>{"use strict";var Lc=Symbol("SemVer ANY"),zT=class t{static get ANY(){return Lc}constructor(e,r){if(r=wx(r),e instanceof t){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),XT("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===Lc?this.value="":this.value=this.operator+this.semver.version,XT("comp",this)}parse(e){let r=this.options.loose?Vx[Bx.COMPARATORLOOSE]:Vx[Bx.COMPARATOR],n=e.match(r);if(!n)throw new TypeError(`Invalid comparator: ${e}`);this.operator=n[1]!==void 0?n[1]:"",this.operator==="="&&(this.operator=""),n[2]?this.semver=new Gx(n[2],this.options.loose):this.semver=Lc}toString(){return this.value}test(e){if(XT("Comparator.test",e,this.options.loose),this.semver===Lc||e===Lc)return!0;if(typeof e=="string")try{e=new Gx(e,this.options)}catch{return!1}return WT(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new Hx(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new Hx(this.value,r).test(e.semver):(r=wx(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.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("=")||WT(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||WT(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};kx.exports=zT;var wx=Fp(),{safeRe:Vx,t:Bx}=Ri(),WT=jT(),XT=Mc(),Gx=St(),Hx=Sr()});var Dc=E((XVe,Fx)=>{"use strict";var Ace=Sr(),Rce=(t,e,r)=>{try{e=new Ace(e,r)}catch{return!1}return e.test(t)};Fx.exports=Rce});var jx=E((zVe,qx)=>{"use strict";var Oce=Sr(),Nce=(t,e)=>new Oce(t,e).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));qx.exports=Nce});var $x=E((QVe,Yx)=>{"use strict";var Ice=St(),Pce=Sr(),Cce=(t,e,r)=>{let n=null,o=null,s=null;try{s=new Pce(e,r)}catch{return null}return t.forEach(i=>{s.test(i)&&(!n||o.compare(i)===-1)&&(n=i,o=new Ice(n,r))}),n};Yx.exports=Cce});var Wx=E((JVe,Kx)=>{"use strict";var yce=St(),Mce=Sr(),vce=(t,e,r)=>{let n=null,o=null,s=null;try{s=new Mce(e,r)}catch{return null}return t.forEach(i=>{s.test(i)&&(!n||o.compare(i)===1)&&(n=i,o=new yce(n,r))}),n};Kx.exports=vce});var Qx=E((ZVe,zx)=>{"use strict";var QT=St(),bce=Sr(),Xx=vc(),Lce=(t,e)=>{t=new bce(t,e);let r=new QT("0.0.0");if(t.test(r)||(r=new QT("0.0.0-0"),t.test(r)))return r;r=null;for(let n=0;n<t.set.length;++n){let o=t.set[n],s=null;o.forEach(i=>{let a=new QT(i.semver.version);switch(i.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||Xx(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${i.operator}`)}}),s&&(!r||Xx(r,s))&&(r=s)}return r&&t.test(r)?r:null};zx.exports=Lce});var Zx=E((eBe,Jx)=>{"use strict";var Dce=Sr(),xce=(t,e)=>{try{return new Dce(t,e).range||"*"}catch{return null}};Jx.exports=xce});var Zp=E((tBe,nU)=>{"use strict";var Uce=St(),rU=bc(),{ANY:wce}=rU,Vce=Sr(),Bce=Dc(),eU=vc(),tU=Wp(),Gce=zp(),Hce=Xp(),kce=(t,e,r,n)=>{t=new Uce(t,n),e=new Vce(e,n);let o,s,i,a,c;switch(r){case">":o=eU,s=Gce,i=tU,a=">",c=">=";break;case"<":o=tU,s=Hce,i=eU,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(Bce(t,e,n))return!1;for(let u=0;u<e.set.length;++u){let l=e.set[u],p=null,_=null;if(l.forEach(d=>{d.semver===wce&&(d=new rU(">=0.0.0")),p=p||d,_=_||d,o(d.semver,p.semver,n)?p=d:i(d.semver,_.semver,n)&&(_=d)}),p.operator===a||p.operator===c||(!_.operator||_.operator===a)&&s(t,_.semver))return!1;if(_.operator===c&&i(t,_.semver))return!1}return!0};nU.exports=kce});var sU=E((rBe,oU)=>{"use strict";var Fce=Zp(),qce=(t,e,r)=>Fce(t,e,">",r);oU.exports=qce});var aU=E((nBe,iU)=>{"use strict";var jce=Zp(),Yce=(t,e,r)=>jce(t,e,"<",r);iU.exports=Yce});var lU=E((oBe,uU)=>{"use strict";var cU=Sr(),$ce=(t,e,r)=>(t=new cU(t,r),e=new cU(e,r),t.intersects(e,r));uU.exports=$ce});var _U=E((sBe,pU)=>{"use strict";var Kce=Dc(),Wce=fr();pU.exports=(t,e,r)=>{let n=[],o=null,s=null,i=t.sort((l,p)=>Wce(l,p,r));for(let l of i)Kce(l,e,r)?(s=l,o||(o=l)):(s&&n.push([o,s]),s=null,o=null);o&&n.push([o,null]);let a=[];for(let[l,p]of n)l===p?a.push(l):!p&&l===i[0]?a.push("*"):p?l===i[0]?a.push(`<=${p}`):a.push(`${l} - ${p}`):a.push(`>=${l}`);let c=a.join(" || "),u=typeof e.raw=="string"?e.raw:String(e);return c.length<u.length?c:e}});var mU=E((iBe,TU)=>{"use strict";var dU=Sr(),ZT=bc(),{ANY:JT}=ZT,xc=Dc(),em=fr(),Xce=(t,e,r={})=>{if(t===e)return!0;t=new dU(t,r),e=new dU(e,r);let n=!1;e:for(let o of t.set){for(let s of e.set){let i=Qce(o,s,r);if(n=n||i!==null,i)continue e}if(n)return!1}return!0},zce=[new ZT(">=0.0.0-0")],EU=[new ZT(">=0.0.0")],Qce=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===JT){if(e.length===1&&e[0].semver===JT)return!0;r.includePrerelease?t=zce:t=EU}if(e.length===1&&e[0].semver===JT){if(r.includePrerelease)return!0;e=EU}let n=new Set,o,s;for(let d of t)d.operator===">"||d.operator===">="?o=fU(o,d,r):d.operator==="<"||d.operator==="<="?s=SU(s,d,r):n.add(d.semver);if(n.size>1)return null;let i;if(o&&s){if(i=em(o.semver,s.semver,r),i>0)return null;if(i===0&&(o.operator!==">="||s.operator!=="<="))return null}for(let d of n){if(o&&!xc(d,String(o),r)||s&&!xc(d,String(s),r))return null;for(let S of e)if(!xc(d,String(S),r))return!1;return!0}let a,c,u,l,p=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,_=o&&!r.includePrerelease&&o.semver.prerelease.length?o.semver:!1;p&&p.prerelease.length===1&&s.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(let d of e){if(l=l||d.operator===">"||d.operator===">=",u=u||d.operator==="<"||d.operator==="<=",o){if(_&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===_.major&&d.semver.minor===_.minor&&d.semver.patch===_.patch&&(_=!1),d.operator===">"||d.operator===">="){if(a=fU(o,d,r),a===d&&a!==o)return!1}else if(o.operator===">="&&!xc(o.semver,String(d),r))return!1}if(s){if(p&&d.semver.prerelease&&d.semver.prerelease.length&&d.semver.major===p.major&&d.semver.minor===p.minor&&d.semver.patch===p.patch&&(p=!1),d.operator==="<"||d.operator==="<="){if(c=SU(s,d,r),c===d&&c!==s)return!1}else if(s.operator==="<="&&!xc(s.semver,String(d),r))return!1}if(!d.operator&&(s||o)&&i!==0)return!1}return!(o&&u&&!s&&i!==0||s&&l&&!o&&i!==0||_||p)},fU=(t,e,r)=>{if(!t)return e;let n=em(t.semver,e.semver,r);return n>0?t:n<0||e.operator===">"&&t.operator===">="?e:t},SU=(t,e,r)=>{if(!t)return e;let n=em(t.semver,e.semver,r);return n<0?t:n>0||e.operator==="<"&&t.operator==="<="?e:t};TU.exports=Xce});var rm=E((aBe,AU)=>{"use strict";var tm=Ri(),hU=yc(),Jce=St(),gU=GT(),Zce=Is(),eue=$D(),tue=WD(),rue=QD(),nue=ex(),oue=rx(),sue=ox(),iue=ix(),aue=cx(),cue=fr(),uue=_x(),lue=Ex(),pue=Kp(),_ue=mx(),due=gx(),Eue=vc(),fue=Wp(),Sue=FT(),Tue=qT(),mue=Xp(),hue=zp(),gue=jT(),Aue=Mx(),Rue=bc(),Oue=Sr(),Nue=Dc(),Iue=jx(),Pue=$x(),Cue=Wx(),yue=Qx(),Mue=Zx(),vue=Zp(),bue=sU(),Lue=aU(),Due=lU(),xue=_U(),Uue=mU();AU.exports={parse:Zce,valid:eue,clean:tue,inc:rue,diff:nue,major:oue,minor:sue,patch:iue,prerelease:aue,compare:cue,rcompare:uue,compareLoose:lue,compareBuild:pue,sort:_ue,rsort:due,gt:Eue,lt:fue,eq:Sue,neq:Tue,gte:mue,lte:hue,cmp:gue,coerce:Aue,Comparator:Rue,Range:Oue,satisfies:Nue,toComparators:Iue,maxSatisfying:Pue,minSatisfying:Cue,minVersion:yue,validRange:Mue,outside:vue,gtr:bue,ltr:Lue,intersects:Due,simplifyRange:xue,subset:Uue,SemVer:Jce,re:tm.re,src:tm.src,tokens:tm.t,SEMVER_SPEC_VERSION:hU.SEMVER_SPEC_VERSION,RELEASE_TYPES:hU.RELEASE_TYPES,compareIdentifiers:gU.compareIdentifiers,rcompareIdentifiers:gU.rcompareIdentifiers}});var RU=E(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});e_.VERSION=void 0;e_.VERSION="0.57.2"});var OU=E(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.SeverityNumber=void 0;var wue;(function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.TRACE=1]="TRACE",t[t.TRACE2=2]="TRACE2",t[t.TRACE3=3]="TRACE3",t[t.TRACE4=4]="TRACE4",t[t.DEBUG=5]="DEBUG",t[t.DEBUG2=6]="DEBUG2",t[t.DEBUG3=7]="DEBUG3",t[t.DEBUG4=8]="DEBUG4",t[t.INFO=9]="INFO",t[t.INFO2=10]="INFO2",t[t.INFO3=11]="INFO3",t[t.INFO4=12]="INFO4",t[t.WARN=13]="WARN",t[t.WARN2=14]="WARN2",t[t.WARN3=15]="WARN3",t[t.WARN4=16]="WARN4",t[t.ERROR=17]="ERROR",t[t.ERROR2=18]="ERROR2",t[t.ERROR3=19]="ERROR3",t[t.ERROR4=20]="ERROR4",t[t.FATAL=21]="FATAL",t[t.FATAL2=22]="FATAL2",t[t.FATAL3=23]="FATAL3",t[t.FATAL4=24]="FATAL4"})(wue=Uc.SeverityNumber||(Uc.SeverityNumber={}))});var r_=E(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.NOOP_LOGGER=Oi.NoopLogger=void 0;var t_=class{emit(e){}};Oi.NoopLogger=t_;Oi.NOOP_LOGGER=new t_});var o_=E(Ni=>{"use strict";Object.defineProperty(Ni,"__esModule",{value:!0});Ni.NOOP_LOGGER_PROVIDER=Ni.NoopLoggerProvider=void 0;var Vue=r_(),n_=class{getLogger(e,r,n){return new Vue.NoopLogger}};Ni.NoopLoggerProvider=n_;Ni.NOOP_LOGGER_PROVIDER=new n_});var om=E(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.ProxyLogger=void 0;var Bue=r_(),nm=class{constructor(e,r,n,o){this._provider=e,this.name=r,this.version=n,this.options=o}emit(e){this._getLogger().emit(e)}_getLogger(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Bue.NOOP_LOGGER}};s_.ProxyLogger=nm});var im=E(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});i_.ProxyLoggerProvider=void 0;var Gue=o_(),Hue=om(),sm=class{getLogger(e,r,n){var o;return(o=this.getDelegateLogger(e,r,n))!==null&&o!==void 0?o:new Hue.ProxyLogger(this,e,r,n)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:Gue.NOOP_LOGGER_PROVIDER}setDelegate(e){this._delegate=e}getDelegateLogger(e,r,n){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(e,r,n)}};i_.ProxyLoggerProvider=sm});var NU=E(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});a_._globalThis=void 0;a_._globalThis=typeof globalThis=="object"?globalThis:global});var IU=E(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});c_._globalThis=void 0;var kue=NU();Object.defineProperty(c_,"_globalThis",{enumerable:!0,get:function(){return kue._globalThis}})});var PU=E(u_=>{"use strict";Object.defineProperty(u_,"__esModule",{value:!0});u_._globalThis=void 0;var Fue=IU();Object.defineProperty(u_,"_globalThis",{enumerable:!0,get:function(){return Fue._globalThis}})});var CU=E(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.API_BACKWARDS_COMPATIBILITY_VERSION=sn.makeGetter=sn._global=sn.GLOBAL_LOGS_API_KEY=void 0;var que=PU();sn.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");sn._global=que._globalThis;function jue(t,e,r){return n=>n===t?e:r}sn.makeGetter=jue;sn.API_BACKWARDS_COMPATIBILITY_VERSION=1});var MU=E(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});l_.LogsAPI=void 0;var Tr=CU(),Yue=o_(),yU=im(),am=class t{constructor(){this._proxyLoggerProvider=new yU.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new t),this._instance}setGlobalLoggerProvider(e){return Tr._global[Tr.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Tr._global[Tr.GLOBAL_LOGS_API_KEY]=(0,Tr.makeGetter)(Tr.API_BACKWARDS_COMPATIBILITY_VERSION,e,Yue.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider.setDelegate(e),e)}getLoggerProvider(){var e,r;return(r=(e=Tr._global[Tr.GLOBAL_LOGS_API_KEY])===null||e===void 0?void 0:e.call(Tr._global,Tr.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&r!==void 0?r:this._proxyLoggerProvider}getLogger(e,r,n){return this.getLoggerProvider().getLogger(e,r,n)}disable(){delete Tr._global[Tr.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new yU.ProxyLoggerProvider}};l_.LogsAPI=am});var cm=E(rt=>{"use strict";Object.defineProperty(rt,"__esModule",{value:!0});rt.logs=rt.ProxyLoggerProvider=rt.ProxyLogger=rt.NoopLoggerProvider=rt.NOOP_LOGGER_PROVIDER=rt.NoopLogger=rt.NOOP_LOGGER=rt.SeverityNumber=void 0;var $ue=OU();Object.defineProperty(rt,"SeverityNumber",{enumerable:!0,get:function(){return $ue.SeverityNumber}});var vU=r_();Object.defineProperty(rt,"NOOP_LOGGER",{enumerable:!0,get:function(){return vU.NOOP_LOGGER}});Object.defineProperty(rt,"NoopLogger",{enumerable:!0,get:function(){return vU.NoopLogger}});var bU=o_();Object.defineProperty(rt,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return bU.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rt,"NoopLoggerProvider",{enumerable:!0,get:function(){return bU.NoopLoggerProvider}});var Kue=om();Object.defineProperty(rt,"ProxyLogger",{enumerable:!0,get:function(){return Kue.ProxyLogger}});var Wue=im();Object.defineProperty(rt,"ProxyLoggerProvider",{enumerable:!0,get:function(){return Wue.ProxyLoggerProvider}});var Xue=MU();rt.logs=Xue.LogsAPI.getInstance()});var LU=E(Ii=>{"use strict";Object.defineProperty(Ii,"__esModule",{value:!0});Ii.disableInstrumentations=Ii.enableInstrumentations=void 0;function zue(t,e,r,n){for(let o=0,s=t.length;o<s;o++){let i=t[o];e&&i.setTracerProvider(e),r&&i.setMeterProvider(r),n&&i.setLoggerProvider&&i.setLoggerProvider(n),i.getConfig().enabled||i.enable()}}Ii.enableInstrumentations=zue;function Que(t){t.forEach(e=>e.disable())}Ii.disableInstrumentations=Que});var UU=E(p_=>{"use strict";Object.defineProperty(p_,"__esModule",{value:!0});p_.registerInstrumentations=void 0;var DU=(M(),P(U)),Jue=cm(),xU=LU();function Zue(t){var e,r;let n=t.tracerProvider||DU.trace.getTracerProvider(),o=t.meterProvider||DU.metrics.getMeterProvider(),s=t.loggerProvider||Jue.logs.getLoggerProvider(),i=(r=(e=t.instrumentations)===null||e===void 0?void 0:e.flat())!==null&&r!==void 0?r:[];return(0,xU.enableInstrumentations)(i,n,o,s),()=>{(0,xU.disableInstrumentations)(i)}}p_.registerInstrumentations=Zue});var lm=E((RBe,BU)=>{"use strict";function um(t){return typeof t=="function"}var bt=console.error.bind(console);function wc(t,e,r){var n=!!t[e]&&t.propertyIsEnumerable(e);Object.defineProperty(t,e,{configurable:!0,enumerable:n,writable:!0,value:r})}function Vc(t){t&&t.logger&&(um(t.logger)?bt=t.logger:bt("new logger isn't a function, not replacing"))}function wU(t,e,r){if(!t||!t[e]){bt("no original function "+e+" to wrap");return}if(!r){bt("no wrapper function"),bt(new Error().stack);return}if(!um(t[e])||!um(r)){bt("original object and wrapper must be functions");return}var n=t[e],o=r(n,e);return wc(o,"__original",n),wc(o,"__unwrap",function(){t[e]===o&&wc(t,e,n)}),wc(o,"__wrapped",!0),wc(t,e,o),o}function ele(t,e,r){if(t)Array.isArray(t)||(t=[t]);else{bt("must provide one or more modules to patch"),bt(new Error().stack);return}if(!(e&&Array.isArray(e))){bt("must provide one or more functions to wrap on modules");return}t.forEach(function(n){e.forEach(function(o){wU(n,o,r)})})}function VU(t,e){if(!t||!t[e]){bt("no function to unwrap."),bt(new Error().stack);return}if(!t[e].__unwrap)bt("no original to unwrap to -- has "+e+" already been unwrapped?");else return t[e].__unwrap()}function tle(t,e){if(t)Array.isArray(t)||(t=[t]);else{bt("must provide one or more modules to patch"),bt(new Error().stack);return}if(!(e&&Array.isArray(e))){bt("must provide one or more functions to unwrap on modules");return}t.forEach(function(r){e.forEach(function(n){VU(r,n)})})}Vc.wrap=wU;Vc.massWrap=ele;Vc.unwrap=VU;Vc.massUnwrap=tle;BU.exports=Vc});var GU=E(d_=>{"use strict";Object.defineProperty(d_,"__esModule",{value:!0});d_.InstrumentationAbstract=void 0;var pm=(M(),P(U)),rle=cm(),__=lm(),_m=class{constructor(e,r,n){this.instrumentationName=e,this.instrumentationVersion=r,this._config={},this._wrap=__.wrap,this._unwrap=__.unwrap,this._massWrap=__.massWrap,this._massUnwrap=__.massUnwrap,this.setConfig(n),this._diag=pm.diag.createComponentLogger({namespace:e}),this._tracer=pm.trace.getTracer(e,r),this._meter=pm.metrics.getMeter(e,r),this._logger=rle.logs.getLogger(e,r),this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){var e;let r=(e=this.init())!==null&&e!==void 0?e:[];return Array.isArray(r)?r:[r]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(e){this._config=Object.assign({enabled:!0},e)}setTracerProvider(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(e,r,n,o){if(e)try{e(n,o)}catch(s){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:r},s)}}};d_.InstrumentationAbstract=_m});var kU=E((NBe,HU)=>{var Pi=1e3,Ci=Pi*60,yi=Ci*60,Ps=yi*24,nle=Ps*7,ole=Ps*365.25;HU.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return sle(t);if(r==="number"&&isFinite(t))return e.long?ale(t):ile(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function sle(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*ole;case"weeks":case"week":case"w":return r*nle;case"days":case"day":case"d":return r*Ps;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yi;case"minutes":case"minute":case"mins":case"min":case"m":return r*Ci;case"seconds":case"second":case"secs":case"sec":case"s":return r*Pi;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ile(t){var e=Math.abs(t);return e>=Ps?Math.round(t/Ps)+"d":e>=yi?Math.round(t/yi)+"h":e>=Ci?Math.round(t/Ci)+"m":e>=Pi?Math.round(t/Pi)+"s":t+"ms"}function ale(t){var e=Math.abs(t);return e>=Ps?E_(t,e,Ps,"day"):e>=yi?E_(t,e,yi,"hour"):e>=Ci?E_(t,e,Ci,"minute"):e>=Pi?E_(t,e,Pi,"second"):t+" ms"}function E_(t,e,r,n){var o=e>=r*1.5;return Math.round(t/r)+" "+n+(o?"s":"")}});var dm=E((IBe,FU)=>{function cle(t){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=kU(),r.destroy=u,Object.keys(t).forEach(l=>{r[l]=t[l]}),r.names=[],r.skips=[],r.formatters={};function e(l){let p=0;for(let _=0;_<l.length;_++)p=(p<<5)-p+l.charCodeAt(_),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=e;function r(l){let p,_=null,d,S;function f(...T){if(!f.enabled)return;let h=f,A=Number(new Date),N=A-(p||A);h.diff=N,h.prev=p,h.curr=A,p=A,T[0]=r.coerce(T[0]),typeof T[0]!="string"&&T.unshift("%O");let I=0;T[0]=T[0].replace(/%([a-zA-Z%])/g,(b,v)=>{if(b==="%%")return"%";I++;let X=r.formatters[v];if(typeof X=="function"){let $=T[I];b=X.call(h,$),T.splice(I,1),I--}return b}),r.formatArgs.call(h,T),(h.log||r.log).apply(h,T)}return f.namespace=l,f.useColors=r.useColors(),f.color=r.selectColor(l),f.extend=n,f.destroy=r.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>_!==null?_:(d!==r.namespaces&&(d=r.namespaces,S=r.enabled(l)),S),set:T=>{_=T}}),typeof r.init=="function"&&r.init(f),f}function n(l,p){let _=r(this.namespace+(typeof p>"u"?":":p)+l);return _.log=this.log,_}function o(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let _ of p)_[0]==="-"?r.skips.push(_.slice(1)):r.names.push(_)}function s(l,p){let _=0,d=0,S=-1,f=0;for(;_<l.length;)if(d<p.length&&(p[d]===l[_]||p[d]==="*"))p[d]==="*"?(S=d,f=_,d++):(_++,d++);else if(S!==-1)d=S+1,f++,_=f;else return!1;for(;d<p.length&&p[d]==="*";)d++;return d===p.length}function i(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function a(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}FU.exports=cle});var qU=E((Ht,f_)=>{Ht.formatArgs=lle;Ht.save=ple;Ht.load=_le;Ht.useColors=ule;Ht.storage=dle();Ht.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();Ht.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ule(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(t[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function lle(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+f_.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(r++,o==="%c"&&(n=r))}),t.splice(n,0,e)}Ht.log=console.debug||console.log||(()=>{});function ple(t){try{t?Ht.storage.setItem("debug",t):Ht.storage.removeItem("debug")}catch{}}function _le(){let t;try{t=Ht.storage.getItem("debug")||Ht.storage.getItem("DEBUG")}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}function dle(){try{return localStorage}catch{}}f_.exports=dm()(Ht);var{formatters:Ele}=f_.exports;Ele.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var YU=E((PBe,jU)=>{"use strict";jU.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),o=e.indexOf("--");return n!==-1&&(o===-1||n<o)}});var WU=E((CBe,KU)=>{"use strict";var fle=require("os"),$U=require("tty"),mr=YU(),{env:nt}=process,fo;mr("no-color")||mr("no-colors")||mr("color=false")||mr("color=never")?fo=0:(mr("color")||mr("colors")||mr("color=true")||mr("color=always"))&&(fo=1);"FORCE_COLOR"in nt&&(nt.FORCE_COLOR==="true"?fo=1:nt.FORCE_COLOR==="false"?fo=0:fo=nt.FORCE_COLOR.length===0?1:Math.min(parseInt(nt.FORCE_COLOR,10),3));function Em(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function fm(t,e){if(fo===0)return 0;if(mr("color=16m")||mr("color=full")||mr("color=truecolor"))return 3;if(mr("color=256"))return 2;if(t&&!e&&fo===void 0)return 0;let r=fo||0;if(nt.TERM==="dumb")return r;if(process.platform==="win32"){let n=fle.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in nt)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in nt)||nt.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in nt)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(nt.TEAMCITY_VERSION)?1:0;if(nt.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in nt){let n=parseInt((nt.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(nt.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(nt.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(nt.TERM)||"COLORTERM"in nt?1:r}function Sle(t){let e=fm(t,t&&t.isTTY);return Em(e)}KU.exports={supportsColor:Sle,stdout:Em(fm(!0,$U.isatty(1))),stderr:Em(fm(!0,$U.isatty(2)))}});var zU=E((ot,T_)=>{var Tle=require("tty"),S_=require("util");ot.init=Nle;ot.log=Ale;ot.formatArgs=hle;ot.save=Rle;ot.load=Ole;ot.useColors=mle;ot.destroy=S_.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ot.colors=[6,2,3,4,5,1];try{let t=WU();t&&(t.stderr||t).level>=2&&(ot.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}ot.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(o,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function mle(){return"colors"in ot.inspectOpts?!!ot.inspectOpts.colors:Tle.isatty(process.stderr.fd)}function hle(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,o="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${o};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
|
|
3
3
|
`).join(`
|
|
4
4
|
`+s),t.push(o+"m+"+T_.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=gle()+e+" "+t[0]}function gle(){return ot.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ale(...t){return process.stderr.write(S_.formatWithOptions(ot.inspectOpts,...t)+`
|
|
5
5
|
`)}function Rle(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function Ole(){return process.env.DEBUG}function Nle(t){t.inspectOpts={};let e=Object.keys(ot.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=ot.inspectOpts[e[r]]}T_.exports=dm()(ot);var{formatters:XU}=T_.exports;XU.o=function(t){return this.inspectOpts.colors=this.useColors,S_.inspect(t,this.inspectOpts).split(`
|
|
6
|
-
`).map(e=>e.trim()).join(" ")};XU.O=function(t){return this.inspectOpts.colors=this.useColors,S_.inspect(t,this.inspectOpts)}});var QU=E((yBe,Sm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Sm.exports=qU():Sm.exports=zU()});var mm=E((MBe,JU)=>{"use strict";var Tm=require("path").sep;JU.exports=function(t){var e=t.split(Tm),r=e.lastIndexOf("node_modules");if(r!==-1&&e[r+1]){for(var n=e[r+1][0]==="@",o=n?e[r+1]+"/"+e[r+2]:e[r+1],s=n?3:2,i="",a=r+s-1,c=0;c<=a;c++)c===a?i+=e[c]:i+=e[c]+Tm;for(var u="",l=e.length-1,p=r+s;p<=l;p++)p===l?u+=e[p]:u+=e[p]+Tm;return{name:o,basedir:i,path:u}}}});var hm=E((vBe,ZU)=>{"use strict";var Ile=require("os");ZU.exports=Ile.homedir||function(){var e=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE&&process.env.HOMEPATH&&process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null}});var m_=E((bBe,e0)=>{"use strict";e0.exports=Error});var gm=E((LBe,t0)=>{"use strict";var h_=m_();t0.exports=function(){var t=h_.prepareStackTrace;h_.prepareStackTrace=function(r,n){return n};var e=new h_().stack;return h_.prepareStackTrace=t,e[2].getFileName()}});var r0=E((DBe,Bc)=>{"use strict";var Ple=process.platform==="win32",Cle=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Am={};function yle(t){return Cle.exec(t).slice(1)}Am.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=yle(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var Mle=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Rm={};function vle(t){return Mle.exec(t).slice(1)}Rm.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=vle(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};Ple?Bc.exports=Am.parse:Bc.exports=Rm.parse;Bc.exports.posix=Rm.parse;Bc.exports.win32=Am.parse});var Om=E((xBe,i0)=>{var s0=require("path"),n0=s0.parse||r0(),ble=/^([A-Za-z]:)/,Lle=/^\\\\/;function o0(t,e){var r="/";ble.test(t)?r="":Lle.test(t)&&(r="\\\\");for(var n=[t],o=n0(t);o.dir!==n[n.length-1];)n.push(o.dir),o=n0(o.dir);return n.reduce(function(s,i){return s.concat(e.map(function(a){return s0.resolve(r,i,a)}))},[])}i0.exports=function(e,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,e,function(){return o0(e,o)},r);var s=o0(e,o);return r&&r.paths?s.concat(r.paths):s}});var Nm=E((UBe,a0)=>{a0.exports=function(t,e){return e||{}}});var l0=E((wBe,u0)=>{"use strict";var Dle="Function.prototype.bind called on incompatible ",xle=Object.prototype.toString,Ule=Math.max,wle="[object Function]",c0=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},Vle=function(e,r){for(var n=[],o=r||0,s=0;o<e.length;o+=1,s+=1)n[s]=e[o];return n},Ble=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};u0.exports=function(e){var r=this;if(typeof r!="function"||xle.apply(r)!==wle)throw new TypeError(Dle+r);for(var n=Vle(arguments,1),o,s=function(){if(this instanceof o){var l=r.apply(this,c0(n,arguments));return Object(l)===l?l:this}return r.apply(e,c0(n,arguments))},i=Ule(0,r.length-n.length),a=[],c=0;c<i;c++)a[c]="$"+c;if(o=Function("binder","return function ("+Ble(a,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var u=function(){};u.prototype=r.prototype,o.prototype=new u,u.prototype=null}return o}});var _0=E((VBe,p0)=>{"use strict";var Gle=l0();p0.exports=Function.prototype.bind||Gle});var E0=E((BBe,d0)=>{"use strict";var Hle=Function.prototype.call,kle=Object.prototype.hasOwnProperty,Fle=_0();d0.exports=Fle.call(Hle,kle)});var f0=E((GBe,qle)=>{qle.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Gc=E((HBe,m0)=>{"use strict";var jle=E0();function Yle(t,e){for(var r=t.split("."),n=e.split(" "),o=n.length>1?n[0]:"=",s=(n.length>1?n[1]:n[0]).split("."),i=0;i<3;++i){var a=parseInt(r[i]||0,10),c=parseInt(s[i]||0,10);if(a!==c)return o==="<"?a<c:o===">="?a>=c:!1}return o===">="}function S0(t,e){var r=e.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Yle(t,r[n]))return!1;return!0}function $le(t,e){if(typeof e=="boolean")return e;var r=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof r!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var n=0;n<e.length;++n)if(S0(r,e[n]))return!0;return!1}return S0(r,e)}var T0=f0();m0.exports=function(e,r){return jle(T0,e)&&$le(r,T0[e])}});var Im=E((kBe,h0)=>{"use strict";h0.exports=TypeError});var R0=E((FBe,A0)=>{var Cs=require("fs"),Kle=hm(),ke=require("path"),Wle=gm(),Xle=Om(),zle=Nm(),Qle=Gc(),g0=m_(),Pm=Im(),Jle=process.platform!=="win32"&&Cs.realpath&&typeof Cs.realpath.native=="function"?Cs.realpath.native:Cs.realpath,Zle=/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/,epe=/^\w:[/\\]*$/,tpe=/[/\\]node_modules[/\\]*$/,Cm=Kle();function rpe(){return Cm?[ke.join(Cm,".node_modules"),ke.join(Cm,".node_libraries")]:[]}var npe=function(e,r){Cs.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ope=function(e,r){Cs.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},spe=function(e,r){Jle(e,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?e:o)})};function Hc(t,e,r,n){r&&r.preserveSymlinks===!1?t(e,n):n(null,e)}function ipe(t,e,r){t(e,function(n,o){if(n)r(n);else try{var s=JSON.parse(o);r(null,s)}catch{r(null)}})}function ape(t,e,r){for(var n=Xle(e,r,t),o=0;o<n.length;o++)n[o]=ke.join(n[o],t);return n}A0.exports=function(e,r,n){var o=n,s=r;if(typeof r=="function"&&(o=s,s={}),typeof e!="string"){var i=new Pm("Path must be a string.");return process.nextTick(function(){o(i)})}s=zle(e,s);var a=s.isFile||npe,c=s.isDirectory||ope,u=s.readFile||Cs.readFile,l=s.realpath||spe,p=s.readPackage||ipe;if(s.readFile&&s.readPackage){var _=new Pm("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(_)})}var d=s.packageIterator,S=s.extensions||[".js"],f=s.includeCoreModules!==!1,T=s.basedir||ke.dirname(Wle()),h=s.filename||T;s.paths=s.paths||rpe();var A=ke.resolve(T);Hc(l,A,s,function(V,z){V?o(V):I(z)});var N;function I(V){if(Zle.test(e))N=ke.resolve(V,e),(e==="."||e===".."||e.slice(-1)==="/")&&(N+="/"),e.slice(-1)==="/"&&N===V?X(N,s.package,O):b(N,s.package,O);else{if(f&&Qle(e))return o(null,e);De(e,V,function(z,Ae,te){if(z)o(z);else{if(Ae)return Hc(l,Ae,s,function(cr,xe){cr?o(cr):o(null,xe,te)});var Pe=new g0("Cannot find module '"+e+"' from '"+h+"'");Pe.code="MODULE_NOT_FOUND",o(Pe)}})}}function O(V,z,Ae){V?o(V):z?o(null,z,Ae):X(N,function(te,Pe,cr){if(te)o(te);else if(Pe)Hc(l,Pe,s,function(Ce,Bt){Ce?o(Ce):o(null,Bt,cr)});else{var xe=new g0("Cannot find module '"+e+"' from '"+h+"'");xe.code="MODULE_NOT_FOUND",o(xe)}})}function b(V,z,Ae){var te=z,Pe=Ae;typeof te=="function"&&(Pe=te,te=void 0);var cr=[""].concat(S);xe(cr,V,te);function xe(Ce,Bt,Mn){if(Ce.length===0)return Pe(null,void 0,Mn);var ls=Bt+Ce[0],Xr=Mn;Xr?_t(null,Xr):v(ke.dirname(ls),_t);function _t(so,ii,vn){if(Xr=ii,so)return Pe(so);if(vn&&Xr&&s.pathFilter){var fl=ke.relative(vn,ls),Sl=fl.slice(0,fl.length-Ce[0].length),nc=s.pathFilter(Xr,Bt,Sl);if(nc)return xe([""].concat(S),ke.resolve(vn,nc),Xr)}a(ls,El)}function El(so,ii){if(so)return Pe(so);if(ii)return Pe(null,ls,Xr);xe(Ce.slice(1),Bt,Xr)}}}function v(V,z){if(V===""||V==="/"||process.platform==="win32"&&epe.test(V)||tpe.test(V))return z(null);Hc(l,V,s,function(Ae,te){if(Ae)return v(ke.dirname(V),z);var Pe=ke.join(te,"package.json");a(Pe,function(cr,xe){if(!xe)return v(ke.dirname(V),z);p(u,Pe,function(Ce,Bt){if(Ce)return z(Ce);var Mn=Bt;Mn&&s.packageFilter&&(Mn=s.packageFilter(Mn,Pe)),z(null,Mn,V)})})})}function X(V,z,Ae){var te=Ae,Pe=z;typeof Pe=="function"&&(te=Pe,Pe=s.package),Hc(l,V,s,function(cr,xe){if(cr)return te(cr);var Ce=ke.join(xe,"package.json");a(Ce,function(Bt,Mn){if(Bt)return te(Bt);if(!Mn)return b(ke.join(V,"index"),Pe,te);p(u,Ce,function(ls,Xr){if(ls)return te(ls);var _t=Xr;if(_t&&s.packageFilter&&(_t=s.packageFilter(_t,Ce)),_t&&_t.main){if(typeof _t.main!="string"){var El=new Pm("package \u201C"+_t.name+"\u201D `main` must be a string");return El.code="INVALID_PACKAGE_MAIN",te(El)}(_t.main==="."||_t.main==="./")&&(_t.main="index"),b(ke.resolve(V,_t.main),_t,function(so,ii,vn){if(so)return te(so);if(ii)return te(null,ii,vn);if(!vn)return b(ke.join(V,"index"),vn,te);var fl=ke.resolve(V,vn.main);X(fl,vn,function(Sl,nc,SO){if(Sl)return te(Sl);if(nc)return te(null,nc,SO);b(ke.join(V,"index"),SO,te)})});return}b(ke.join(V,"/index"),_t,te)})})})}function $(V,z){if(z.length===0)return V(null,void 0);var Ae=z[0];c(ke.dirname(Ae),te);function te(xe,Ce){if(xe)return V(xe);if(!Ce)return $(V,z.slice(1));b(Ae,s.package,Pe)}function Pe(xe,Ce,Bt){if(xe)return V(xe);if(Ce)return V(null,Ce,Bt);X(Ae,s.package,cr)}function cr(xe,Ce,Bt){if(xe)return V(xe);if(Ce)return V(null,Ce,Bt);$(V,z.slice(1))}}function De(V,z,Ae){var te=function(){return ape(V,z,s)};$(Ae,d?d(V,z,te,s):te())}}});var O0=E((qBe,cpe)=>{cpe.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var C0=E((jBe,P0)=>{"use strict";var upe=Gc(),N0=O0(),I0={};for(g_ in N0)Object.prototype.hasOwnProperty.call(N0,g_)&&(I0[g_]=upe(g_));var g_;P0.exports=I0});var M0=E((YBe,y0)=>{var lpe=Gc();y0.exports=function(e){return lpe(e)}});var b0=E(($Be,v0)=>{var ppe=Gc(),ys=require("fs"),mt=require("path"),_pe=m_(),ym=Im(),dpe=hm(),Epe=gm(),fpe=Om(),Spe=Nm(),Tpe=process.platform!=="win32"&&ys.realpathSync&&typeof ys.realpathSync.native=="function"?ys.realpathSync.native:ys.realpathSync,mpe=/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/,hpe=/^\w:[/\\]*$/,gpe=/[/\\]node_modules[/\\]*$/,Mm=dpe();function Ape(){return Mm?[mt.join(Mm,".node_modules"),mt.join(Mm,".node_libraries")]:[]}var Rpe=function(e){try{var r=ys.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},Ope=function(e){try{var r=ys.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},Npe=function(e){try{return Tpe(e)}catch(r){if(r.code!=="ENOENT")throw r}return e};function kc(t,e,r){return r&&r.preserveSymlinks===!1?t(e):e}function Ipe(t,e){var r=t(e);try{var n=JSON.parse(r);return n}catch{}}function Ppe(t,e,r){for(var n=fpe(e,r,t),o=0;o<n.length;o++)n[o]=mt.join(n[o],t);return n}v0.exports=function(e,r){if(typeof e!="string")throw new ym("Path must be a string.");var n=Spe(e,r),o=n.isFile||Rpe,s=n.readFileSync||ys.readFileSync,i=n.isDirectory||Ope,a=n.realpathSync||Npe,c=n.readPackageSync||Ipe;if(n.readFileSync&&n.readPackageSync)throw new ym("`readFileSync` and `readPackageSync` are mutually exclusive.");var u=n.packageIterator,l=n.extensions||[".js"],p=n.includeCoreModules!==!1,_=n.basedir||mt.dirname(Epe()),d=n.filename||_;n.paths=n.paths||Ape();var S=kc(a,mt.resolve(_),n);if(mpe.test(e)){var f=mt.resolve(S,e);(e==="."||e===".."||e.slice(-1)==="/")&&(f+="/");var T=N(f)||O(f);if(T)return kc(a,T,n)}else{if(p&&ppe(e))return e;var h=b(e,S);if(h)return kc(a,h,n)}var A=new _pe("Cannot find module '"+e+"' from '"+d+"'");throw A.code="MODULE_NOT_FOUND",A;function N(v){var X=I(mt.dirname(v));if(X&&X.dir&&X.pkg&&n.pathFilter){var $=mt.relative(X.dir,v),De=n.pathFilter(X.pkg,v,$);De&&(v=mt.resolve(X.dir,De))}if(o(v))return v;for(var V=0;V<l.length;V++){var z=v+l[V];if(o(z))return z}}function I(v){if(!(v===""||v==="/")&&!(process.platform==="win32"&&hpe.test(v))&&!gpe.test(v)){var X=mt.join(kc(a,v,n),"package.json");if(!o(X))return I(mt.dirname(v));var $=c(s,X);return $&&n.packageFilter&&($=n.packageFilter($,v)),{pkg:$,dir:v}}}function O(v){var X=mt.join(kc(a,v,n),"/package.json");if(o(X)){try{var $=c(s,X)}catch{}if($&&n.packageFilter&&($=n.packageFilter($,v)),$&&$.main){if(typeof $.main!="string"){var De=new ym("package \u201C"+$.name+"\u201D `main` must be a string");throw De.code="INVALID_PACKAGE_MAIN",De}($.main==="."||$.main==="./")&&($.main="index");try{var V=N(mt.resolve(v,$.main));if(V)return V;var z=O(mt.resolve(v,$.main));if(z)return z}catch{}}}return N(mt.join(v,"/index"))}function b(v,X){for(var $=function(){return Ppe(v,X,n)},De=u?u(v,X,$,n):$(),V=0;V<De.length;V++){var z=De[V];if(i(mt.dirname(z))){var Ae=N(z);if(Ae)return Ae;var te=O(z);if(te)return te}}}}});var vm=E((KBe,L0)=>{var A_=R0();A_.core=C0();A_.isCore=M0();A_.sync=b0();L0.exports=A_});var D0=E((WBe,Cpe)=>{Cpe.exports={name:"require-in-the-middle",version:"7.5.2",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/nodejs/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/nodejs/require-in-the-middle/issues"},homepage:"https://github.com/nodejs/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var xm=E((XBe,Dm)=>{"use strict";var vi=require("path"),xr=require("module"),we=QU()("require-in-the-middle"),ype=mm();Dm.exports=Fc;Dm.exports.Hook=Fc;var bm,Mi;if(xr.isBuiltin)Mi=xr.isBuiltin;else if(xr.builtinModules)Mi=t=>t.startsWith("node:")?!0:(bm===void 0&&(bm=new Set(xr.builtinModules)),bm.has(t));else{let t=vm(),[e,r]=process.versions.node.split(".").map(Number);e===8&&r<8?Mi=n=>n==="http2"?!0:!!t.core[n]:Mi=n=>!!t.core[n]}var R_;function Mpe(t,e){if(!R_)if(require.resolve&&require.resolve.paths)R_=function(r,n){return require.resolve(r,{paths:[n]})};else{let r=vm();R_=function(n,o){return r.sync(n,{basedir:o})}}return R_(t,e)}var vpe=/([/\\]index)?(\.js)?$/,Lm=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,r){if(this._localCache.has(e))return!0;if(r)return!1;{let n=require.cache[e];return!!(n&&this._kRitmExports in n)}}get(e,r){let n=this._localCache.get(e);if(n!==void 0)return n;if(!r){let o=require.cache[e];return o&&o[this._kRitmExports]}}set(e,r,n){n?this._localCache.set(e,r):e in require.cache?require.cache[e][this._kRitmExports]=r:(we('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,r))}};function Fc(t,e,r){if(!(this instanceof Fc))return new Fc(t,e,r);if(typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),typeof xr._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof xr._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,D0().bugs.url);return}this._cache=new Lm,this._unhooked=!1,this._origRequire=xr.prototype.require;let n=this,o=new Set,s=e?e.internals===!0:!1,i=Array.isArray(t);we("registering require hook"),this._require=xr.prototype.require=function(c){return n._unhooked===!0?(we("ignoring require call - module is soft-unhooked"),n._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(c){return n._unhooked===!0?(we("ignoring process.getBuiltinModule call - module is soft-unhooked"),n._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(c,u){let l=c[0],p=Mi(l),_;if(p){if(_=l,l.startsWith("node:")){let A=l.slice(5);Mi(A)&&(_=A)}}else{if(u)return we("call to process.getBuiltinModule with unknown built-in id"),n._origGetBuiltinModule.apply(this,c);try{_=xr._resolveFilename(l,this)}catch(A){return we('Module._resolveFilename("%s") threw %j, calling original Module.require',l,A.message),n._origRequire.apply(this,c)}}let d,S;if(we("processing %s module require('%s'): %s",p===!0?"core":"non-core",l,_),n._cache.has(_,p)===!0)return we("returning already patched cached module: %s",_),n._cache.get(_,p);let f=o.has(_);f===!1&&o.add(_);let T=u?n._origGetBuiltinModule.apply(this,c):n._origRequire.apply(this,c);if(f===!0)return we("module is in the process of being patched already - ignoring: %s",_),T;if(o.delete(_),p===!0){if(i===!0&&t.includes(_)===!1)return we("ignoring core module not on whitelist: %s",_),T;d=_}else if(i===!0&&t.includes(_)){let A=vi.parse(_);d=A.name,S=A.dir}else{let A=ype(_);if(A===void 0)return we("could not parse filename: %s",_),T;d=A.name,S=A.basedir;let N=bpe(A);we("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",d,l,N,S);let I=!1;if(i){if(!l.startsWith(".")&&t.includes(l)&&(d=l,I=!0),!t.includes(d)&&!t.includes(N))return T;t.includes(N)&&N!==d&&(d=N,I=!0)}if(!I){let O;try{O=Mpe(d,S)}catch{return we("could not resolve module: %s",d),n._cache.set(_,T,p),T}if(O!==_)if(s===!0)d=d+vi.sep+vi.relative(S,_),we("preparing to process require of internal file: %s",d);else return we("ignoring require of non-main module file: %s",O),n._cache.set(_,T,p),T}}n._cache.set(_,T,p),we("calling require hook: %s",d);let h=r(T,d,S);return n._cache.set(_,h,p),we("returning module: %s",d),h}}Fc.prototype.unhook=function(){this._unhooked=!0,this._require===xr.prototype.require?(xr.prototype.require=this._origRequire,we("require unhook successful")):we("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,we("process.getBuiltinModule unhook successful")):we("process.getBuiltinModule unhook unsuccessful"))};function bpe(t){let e=vi.sep!=="/"?t.path.split(vi.sep).join("/"):t.path;return vi.posix.join(t.name,e).replace(vpe,"")}});var x0=E(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.ModuleNameTrie=So.ModuleNameSeparator=void 0;So.ModuleNameSeparator="/";var O_=class{constructor(){this.hooks=[],this.children=new Map}},Um=class{constructor(){this._trie=new O_,this._counter=0}insert(e){let r=this._trie;for(let n of e.moduleName.split(So.ModuleNameSeparator)){let o=r.children.get(n);o||(o=new O_,r.children.set(n,o)),r=o}r.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:r,fullOnly:n}={}){let o=this._trie,s=[],i=!0;for(let a of e.split(So.ModuleNameSeparator)){let c=o.children.get(a);if(!c){i=!1;break}n||s.push(...c.hooks),o=c}return n&&i&&s.push(...o.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(r&&s.sort((a,c)=>a.insertedId-c.insertedId),s.map(({hook:a})=>a))}};So.ModuleNameTrie=Um});var w0=E(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.RequireInTheMiddleSingleton=void 0;var Lpe=xm(),U0=require("path"),wm=x0(),Dpe=["afterEach","after","beforeEach","before","describe","it"].every(t=>typeof global[t]=="function"),Vm=class t{constructor(){this._moduleNameTrie=new wm.ModuleNameTrie,this._initialize()}_initialize(){new Lpe.Hook(null,{internals:!0},(e,r,n)=>{let o=xpe(r),s=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:n===void 0});for(let{onRequire:i}of s)e=i(e,r,n);return e})}register(e,r){let n={moduleName:e,onRequire:r};return this._moduleNameTrie.insert(n),n}static getInstance(){var e;return Dpe?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t}};N_.RequireInTheMiddleSingleton=Vm;function xpe(t){return U0.sep!==wm.ModuleNameSeparator?t.split(U0.sep).join(wm.ModuleNameSeparator):t}});var F0=E(Ms=>{var V0=[],Bm=new WeakMap,B0=new WeakMap,G0=new Map,H0=[],Upe={set(t,e,r){return Bm.get(t)[e](r)},get(t,e){if(e===Symbol.toStringTag)return"Module";let r=B0.get(t)[e];if(typeof r=="function")return r()},defineProperty(t,e,r){if(!("value"in r))throw new Error("Getters/setters are not supported for exports property descriptors.");return Bm.get(t)[e](r.value)}};function wpe(t,e,r,n,o){G0.set(t,o),Bm.set(e,r),B0.set(e,n);let s=new Proxy(e,Upe);V0.forEach(i=>i(t,s)),H0.push([t,s])}var k0=!1;function Vpe(){return k0}function Bpe(t){k0=t}Ms.register=wpe;Ms.importHooks=V0;Ms.specifiers=G0;Ms.toHook=H0;Ms.getExperimentalPatchInternals=Vpe;Ms.setExperimentalPatchInternals=Bpe});var I_=E((ZBe,bi)=>{var q0=require("path"),Gpe=mm(),{fileURLToPath:j0}=require("url"),{MessageChannel:Hpe}=require("worker_threads"),{importHooks:Gm,specifiers:kpe,toHook:Fpe,getExperimentalPatchInternals:qpe}=F0();function $0(t){Gm.push(t),Fpe.forEach(([e,r])=>t(e,r))}function K0(t){let e=Gm.indexOf(t);e>-1&&Gm.splice(e,1)}function Y0(t,e,r,n){let o=t(e,r,n);o&&o!==e&&(e.default=o)}var Hm;function jpe(){let{port1:t,port2:e}=new Hpe,r=0,n;Hm=a=>{r++,t.postMessage(a)},t.on("message",()=>{r--,n&&r<=0&&n()}).unref();function o(){let a=setInterval(()=>{},1e3),c=new Promise(u=>{n=u}).then(()=>{clearInterval(a)});return r===0&&n(),c}let s=e;return{registerOptions:{data:{addHookMessagePort:s,include:[]},transferList:[s]},addHookMessagePort:s,waitForAllMessagesAcknowledged:o}}function qc(t,e,r){if(!(this instanceof qc))return new qc(t,e,r);typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let n=e?e.internals===!0:!1;Hm&&Array.isArray(t)&&Hm(t),this._iitmHook=(o,s)=>{let i=o,a=o.startsWith("node:"),c;if(a)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=j0(o)}catch{}let u=Gpe(o);u&&(o=u.name,c=u.basedir)}if(t){for(let u of t)if(u===o){if(c){if(n)o=o+q0.sep+q0.relative(c,j0(i));else if(!qpe()&&!c.endsWith(kpe.get(i)))continue}Y0(r,s,o,c)}}else Y0(r,s,o,c)},$0(this._iitmHook)}qc.prototype.unhook=function(){K0(this._iitmHook)};bi.exports=qc;bi.exports.Hook=qc;bi.exports.addHook=$0;bi.exports.removeHook=K0;bi.exports.createAddHookMessageChannel=jpe});var km=E(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.isWrapped=To.safeExecuteInTheMiddleAsync=To.safeExecuteInTheMiddle=void 0;function Ype(t,e,r){let n,o;try{o=t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}To.safeExecuteInTheMiddle=Ype;async function $pe(t,e,r){let n,o;try{o=await t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}To.safeExecuteInTheMiddleAsync=$pe;function Kpe(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}To.isWrapped=Kpe});var z0=E(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.InstrumentationBase=void 0;var jc=require("path"),W0=require("util"),Wpe=rm(),Fm=lm(),Xpe=GU(),zpe=w0(),Qpe=I_(),Yc=(M(),P(U)),Jpe=xm(),Zpe=require("fs"),e_e=km(),qm=class extends Xpe.InstrumentationAbstract{constructor(e,r,n){super(e,r,n),this._hooks=[],this._requireInTheMiddleSingleton=zpe.RequireInTheMiddleSingleton.getInstance(),this._enabled=!1,this._wrap=(s,i,a)=>{if((0,e_e.isWrapped)(s[i])&&this._unwrap(s,i),W0.types.isProxy(s)){let c=(0,Fm.wrap)(Object.assign({},s),i,a);return Object.defineProperty(s,i,{value:c}),c}else return(0,Fm.wrap)(s,i,a)},this._unwrap=(s,i)=>W0.types.isProxy(s)?Object.defineProperty(s,i,{value:s[i]}):(0,Fm.unwrap)(s,i),this._massWrap=(s,i,a)=>{if(s)Array.isArray(s)||(s=[s]);else{Yc.diag.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){Yc.diag.error("must provide one or more functions to wrap on modules");return}s.forEach(c=>{i.forEach(u=>{this._wrap(c,u,a)})})},this._massUnwrap=(s,i)=>{if(s)Array.isArray(s)||(s=[s]);else{Yc.diag.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){Yc.diag.error("must provide one or more functions to wrap on modules");return}s.forEach(a=>{i.forEach(c=>{this._unwrap(a,c)})})};let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:r}=e;try{let n=require.resolve(r);require.cache[n]&&this._diag.warn(`Module ${r} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${r}`)}catch{}})}_extractPackageVersion(e){try{let r=(0,Zpe.readFileSync)(jc.join(e,"package.json"),{encoding:"utf8"}),n=JSON.parse(r).version;return typeof n=="string"?n:void 0}catch{Yc.diag.warn("Failed extracting version",e)}}_onRequire(e,r,n,o){var s;if(!o)return typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(r)):r;let i=this._extractPackageVersion(o);if(e.moduleVersion=i,e.name===n)return X0(e.supportedVersions,i,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:o}),e.patch(r,e.moduleVersion)):r;let a=(s=e.files)!==null&&s!==void 0?s:[],c=jc.normalize(n);return a.filter(l=>l.name===c).filter(l=>X0(l.supportedVersions,i,e.includePrerelease)).reduce((l,p)=>(p.moduleExports=l,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:p.name,baseDir:o}),p.patch(l,e.moduleVersion)):l),r)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.patch(r.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let r=(i,a,c)=>{if(!c&&jc.isAbsolute(a)){let u=jc.parse(a);a=u.name,c=u.dir}return this._onRequire(e,i,a,c)},n=(i,a,c)=>this._onRequire(e,i,a,c),o=jc.isAbsolute(e.name)?new Jpe.Hook([e.name],{internals:!0},n):this._requireInTheMiddleSingleton.register(e.name,n);this._hooks.push(o);let s=new Qpe.Hook([e.name],{internals:!1},r);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.unpatch(r.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}};P_.InstrumentationBase=qm;function X0(t,e,r){return typeof e>"u"?t.includes("*"):t.some(n=>(0,Wpe.satisfies)(e,n,{includePrerelease:r}))}});var Q0=E(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.normalize=void 0;var t_e=require("path");Object.defineProperty(C_,"normalize",{enumerable:!0,get:function(){return t_e.normalize}})});var J0=E(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.normalize=Li.InstrumentationBase=void 0;var r_e=z0();Object.defineProperty(Li,"InstrumentationBase",{enumerable:!0,get:function(){return r_e.InstrumentationBase}});var n_e=Q0();Object.defineProperty(Li,"normalize",{enumerable:!0,get:function(){return n_e.normalize}})});var jm=E(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.normalize=Di.InstrumentationBase=void 0;var Z0=J0();Object.defineProperty(Di,"InstrumentationBase",{enumerable:!0,get:function(){return Z0.InstrumentationBase}});Object.defineProperty(Di,"normalize",{enumerable:!0,get:function(){return Z0.normalize}})});var ew=E(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.InstrumentationNodeModuleDefinition=void 0;var Ym=class{constructor(e,r,n,o,s){this.name=e,this.supportedVersions=r,this.patch=n,this.unpatch=o,this.files=s||[]}};y_.InstrumentationNodeModuleDefinition=Ym});var tw=E(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.InstrumentationNodeModuleFile=void 0;var o_e=jm(),$m=class{constructor(e,r,n,o){this.supportedVersions=r,this.patch=n,this.unpatch=o,this.name=(0,o_e.normalize)(e)}};M_.InstrumentationNodeModuleFile=$m});var ee=E(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.safeExecuteInTheMiddleAsync=ht.safeExecuteInTheMiddle=ht.isWrapped=ht.InstrumentationNodeModuleFile=ht.InstrumentationNodeModuleDefinition=ht.InstrumentationBase=ht.registerInstrumentations=void 0;var s_e=UU();Object.defineProperty(ht,"registerInstrumentations",{enumerable:!0,get:function(){return s_e.registerInstrumentations}});var i_e=jm();Object.defineProperty(ht,"InstrumentationBase",{enumerable:!0,get:function(){return i_e.InstrumentationBase}});var a_e=ew();Object.defineProperty(ht,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return a_e.InstrumentationNodeModuleDefinition}});var c_e=tw();Object.defineProperty(ht,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return c_e.InstrumentationNodeModuleFile}});var Km=km();Object.defineProperty(ht,"isWrapped",{enumerable:!0,get:function(){return Km.isWrapped}});Object.defineProperty(ht,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Km.safeExecuteInTheMiddle}});Object.defineProperty(ht,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Km.safeExecuteInTheMiddleAsync}})});var rw=E($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.AttributeNames=void 0;var u_e;(function(t){t.HTTP_ERROR_NAME="http.error_name",t.HTTP_ERROR_MESSAGE="http.error_message",t.HTTP_STATUS_TEXT="http.status_text"})(u_e=$c.AttributeNames||($c.AttributeNames={}))});var ow=E((uGe,nw)=>{"use strict";var l_e=require("util");function Wm(t,e){Error.captureStackTrace(this,Wm),this.name=this.constructor.name,this.message=t,this.input=e}l_e.inherits(Wm,Error);nw.exports=Wm});var iw=E((lGe,sw)=>{"use strict";function p_e(t){return t===34||t===40||t===41||t===44||t===47||t>=58&&t<=64||t>=91&&t<=93||t===123||t===125}function __e(t){return t===33||t>=35&&t<=39||t===42||t===43||t===45||t===46||t>=48&&t<=57||t>=65&&t<=90||t>=94&&t<=122||t===124||t===126}function d_e(t){return t>=32&&t<=126}function E_e(t){return t>=128&&t<=255}sw.exports={isDelimiter:p_e,isTokenChar:__e,isExtended:E_e,isPrint:d_e}});var pw=E((pGe,lw)=>{"use strict";var f_e=require("util"),xi=ow(),v_=iw(),S_e=v_.isDelimiter,aw=v_.isTokenChar,cw=v_.isExtended,T_e=v_.isPrint;function uw(t){return t.replace(/\\(.)/g,"$1")}function Kc(t,e){return f_e.format("Unexpected character '%s' at index %d",t.charAt(e),e)}function m_e(t){for(var e=!1,r=!1,n=!1,o={},s=[],i=-1,a=-1,c,u,l=0;l<t.length;l++)if(u=t.charCodeAt(l),c===void 0){if(l!==0&&i===-1&&(u===32||u===9))continue;if(aw(u))i===-1&&(i=l);else if(u===61&&i!==-1)c=t.slice(i,l).toLowerCase(),i=-1;else throw new xi(Kc(t,l),t)}else if(r&&(u===9||T_e(u)||cw(u)))r=!1;else if(aw(u)){if(a!==-1)throw new xi(Kc(t,l),t);i===-1&&(i=l)}else if(S_e(u)||cw(u))if(n)u===34?(n=!1,a=l):u===92?(i===-1&&(i=l),r=e=!0):i===-1&&(i=l);else if(u===34&&t.charCodeAt(l-1)===61)n=!0;else if((u===44||u===59)&&(i!==-1||a!==-1))i!==-1?(a===-1&&(a=l),o[c]=e?uw(t.slice(i,a)):t.slice(i,a)):o[c]="",u===44&&(s.push(o),o={}),c=void 0,i=a=-1;else throw new xi(Kc(t,l),t);else if(u===32||u===9){if(a!==-1)continue;if(n)i===-1&&(i=l);else if(i!==-1)a=l;else throw new xi(Kc(t,l),t)}else throw new xi(Kc(t,l),t);if(c===void 0||n||i===-1&&a===-1||u===32||u===9)throw new xi("Unexpected end of input",t);return i!==-1?(a===-1&&(a=l),o[c]=e?uw(t.slice(i,a)):t.slice(i,a)):o[c]="",s.push(o),s}lw.exports=m_e});var Tw=E(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.headerCapture=G.getIncomingStableRequestMetricAttributesOnResponse=G.getIncomingRequestMetricAttributesOnResponse=G.getIncomingRequestAttributesOnResponse=G.getIncomingRequestMetricAttributes=G.getIncomingRequestAttributes=G.getRemoteClientAddress=G.getOutgoingRequestMetricAttributesOnResponse=G.getOutgoingRequestAttributesOnResponse=G.setAttributesFromHttpKind=G.getOutgoingRequestMetricAttributes=G.getOutgoingRequestAttributes=G.extractHostnameAndPort=G.isValidOptionsType=G.getRequestInfo=G.isCompressed=G.setResponseContentLengthAttribute=G.setRequestContentLengthAttribute=G.setSpanWithError=G.satisfiesPattern=G.parseResponseStatus=G.getAbsoluteUrl=void 0;var Wc=(M(),P(U)),y=(_r(),P(pr)),_w=re(),h_e=require("url"),b_=rw(),g_e=pw(),A_e=(t,e,r="http:")=>{let n=t||{},o=n.protocol||r,s=(n.port||"").toString(),i=n.path||"/",a=n.host||n.hostname||e.host||"localhost";return a.indexOf(":")===-1&&s&&s!=="80"&&s!=="443"&&(a+=`:${s}`),`${o}//${a}${i}`};G.getAbsoluteUrl=A_e;var R_e=(t,e)=>{let r=t===Wc.SpanKind.CLIENT?400:500;return e&&e>=100&&e<r?Wc.SpanStatusCode.UNSET:Wc.SpanStatusCode.ERROR};G.parseResponseStatus=R_e;var O_e=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")};G.satisfiesPattern=O_e;var N_e=(t,e,r)=>{let n=e.message;(r&2)===2&&(t.setAttribute(b_.AttributeNames.HTTP_ERROR_NAME,e.name),t.setAttribute(b_.AttributeNames.HTTP_ERROR_MESSAGE,n)),(r&1)===1&&t.setAttribute(y.ATTR_ERROR_TYPE,e.name),t.setStatus({code:Wc.SpanStatusCode.ERROR,message:n}),t.recordException(e)};G.setSpanWithError=N_e;var I_e=(t,e)=>{let r=dw(t.headers);r!==null&&((0,G.isCompressed)(t.headers)?e[y.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH]=r:e[y.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED]=r)};G.setRequestContentLengthAttribute=I_e;var P_e=(t,e)=>{let r=dw(t.headers);r!==null&&((0,G.isCompressed)(t.headers)?e[y.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]=r:e[y.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]=r)};G.setResponseContentLengthAttribute=P_e;function dw(t){let e=t["content-length"];if(e===void 0)return null;let r=parseInt(e,10);return isNaN(r)?null:r}var C_e=t=>{let e=t["content-encoding"];return!!e&&e!=="identity"};G.isCompressed=C_e;function y_e(t){let{hostname:e,pathname:r,port:n,username:o,password:s,search:i,protocol:a,hash:c,href:u,origin:l,host:p}=new URL(t),_={protocol:a,hostname:e&&e[0]==="["?e.slice(1,-1):e,hash:c,search:i,pathname:r,path:`${r||""}${i||""}`,href:u,origin:l,host:p};return n!==""&&(_.port=Number(n)),(o||s)&&(_.auth=`${decodeURIComponent(o)}:${decodeURIComponent(s)}`),_}var M_e=(t,e,r)=>{let n,o,s,i=!1;if(typeof e=="string"){try{let c=y_e(e);s=c,n=c.pathname||"/"}catch(c){i=!0,t.verbose("Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:",c),s={path:e},n=s.path||"/"}o=`${s.protocol||"http:"}//${s.host}`,r!==void 0&&Object.assign(s,r)}else if(e instanceof h_e.URL)s={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,path:`${e.pathname||""}${e.search||""}`},e.port!==""&&(s.port=Number(e.port)),(e.username||e.password)&&(s.auth=`${e.username}:${e.password}`),n=e.pathname,o=e.origin,r!==void 0&&Object.assign(s,r);else{s=Object.assign({protocol:e.host?"http:":void 0},e);let c=s.host||(s.port!=null?`${s.hostname}${s.port}`:s.hostname);if(o=`${s.protocol||"http:"}//${c}`,n=e.pathname,!n&&s.path)try{n=new URL(s.path,o).pathname||"/"}catch{n="/"}}let a=s.method?s.method.toUpperCase():"GET";return{origin:o,pathname:n,method:a,optionsParsed:s,invalidUrl:i}};G.getRequestInfo=M_e;var v_e=t=>{if(!t)return!1;let e=typeof t;return e==="string"||e==="object"&&!Array.isArray(t)};G.isValidOptionsType=v_e;var b_e=t=>{var e;if(t.hostname&&t.port)return{hostname:t.hostname,port:t.port};let r=((e=t.host)===null||e===void 0?void 0:e.match(/^([^:/ ]+)(:\d{1,5})?/))||null,n=t.hostname||(r===null?"localhost":r[1]),o=t.port;return o||(r&&r[2]?o=r[2].substring(1):o=t.protocol==="https:"?"443":"80"),{hostname:n,port:o}};G.extractHostnameAndPort=b_e;var L_e=(t,e,r)=>{var n,o;let s=e.hostname,i=e.port,a=(n=t.method)!==null&&n!==void 0?n:"GET",c=fw(a),u=t.headers||{},l=u["user-agent"],p=(0,G.getAbsoluteUrl)(t,u,`${e.component}:`),_={[y.SEMATTRS_HTTP_URL]:p,[y.SEMATTRS_HTTP_METHOD]:a,[y.SEMATTRS_HTTP_TARGET]:t.path||"/",[y.SEMATTRS_NET_PEER_NAME]:s,[y.SEMATTRS_HTTP_HOST]:(o=u.host)!==null&&o!==void 0?o:`${s}:${i}`},d={[y.ATTR_HTTP_REQUEST_METHOD]:c,[y.ATTR_SERVER_ADDRESS]:s,[y.ATTR_SERVER_PORT]:Number(i),[y.ATTR_URL_FULL]:p};switch(a!==c&&(d[y.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=a),l!==void 0&&(_[y.SEMATTRS_HTTP_USER_AGENT]=l),r){case 1:return Object.assign(d,e.hookAttributes);case 2:return Object.assign(_,e.hookAttributes)}return Object.assign(_,d,e.hookAttributes)};G.getOutgoingRequestAttributes=L_e;var D_e=t=>{let e={};return e[y.SEMATTRS_HTTP_METHOD]=t[y.SEMATTRS_HTTP_METHOD],e[y.SEMATTRS_NET_PEER_NAME]=t[y.SEMATTRS_NET_PEER_NAME],e};G.getOutgoingRequestMetricAttributes=D_e;var x_e=(t,e)=>{t&&(e[y.SEMATTRS_HTTP_FLAVOR]=t,t.toUpperCase()!=="QUIC"?e[y.SEMATTRS_NET_TRANSPORT]=y.NETTRANSPORTVALUES_IP_TCP:e[y.SEMATTRS_NET_TRANSPORT]=y.NETTRANSPORTVALUES_IP_UDP)};G.setAttributesFromHttpKind=x_e;var U_e=(t,e)=>{let{statusCode:r,statusMessage:n,httpVersion:o,socket:s}=t,i={},a={};if(r!=null&&(a[y.ATTR_HTTP_RESPONSE_STATUS_CODE]=r),s){let{remoteAddress:c,remotePort:u}=s;i[y.SEMATTRS_NET_PEER_IP]=c,i[y.SEMATTRS_NET_PEER_PORT]=u,a[y.ATTR_NETWORK_PEER_ADDRESS]=c,a[y.ATTR_NETWORK_PEER_PORT]=u,a[y.ATTR_NETWORK_PROTOCOL_VERSION]=t.httpVersion}switch((0,G.setResponseContentLengthAttribute)(t,i),r&&(i[y.SEMATTRS_HTTP_STATUS_CODE]=r,i[b_.AttributeNames.HTTP_STATUS_TEXT]=(n||"").toUpperCase()),(0,G.setAttributesFromHttpKind)(o,i),e){case 1:return a;case 2:return i}return Object.assign(i,a)};G.getOutgoingRequestAttributesOnResponse=U_e;var w_e=t=>{let e={};return e[y.SEMATTRS_NET_PEER_PORT]=t[y.SEMATTRS_NET_PEER_PORT],e[y.SEMATTRS_HTTP_STATUS_CODE]=t[y.SEMATTRS_HTTP_STATUS_CODE],e[y.SEMATTRS_HTTP_FLAVOR]=t[y.SEMATTRS_HTTP_FLAVOR],e};G.getOutgoingRequestMetricAttributesOnResponse=w_e;function mo(t,e){let r=t.split(":");if(r.length===1)return e==="http"?{host:r[0],port:"80"}:e==="https"?{host:r[0],port:"443"}:{host:r[0]};if(r.length===2)return{host:r[0],port:r[1]};if(r[0].startsWith("[")){if(r[r.length-1].endsWith("]")){if(e==="http")return{host:t,port:"80"};if(e==="https")return{host:t,port:"443"}}else if(r[r.length-2].endsWith("]"))return{host:r.slice(0,-1).join(":"),port:r[r.length-1]}}return{host:t}}function V_e(t,e){let r=t.headers.forwarded;if(r){for(let s of Sw(r))if(s.host)return mo(s.host,s.proto)}let n=t.headers["x-forwarded-host"];if(typeof n=="string")return typeof t.headers["x-forwarded-proto"]=="string"?mo(n,t.headers["x-forwarded-proto"]):Array.isArray(t.headers["x-forwarded-proto"])?mo(n,t.headers["x-forwarded-proto"][0]):mo(n);if(Array.isArray(n)&&typeof n[0]=="string"&&n[0].length>0)return typeof t.headers["x-forwarded-proto"]=="string"?mo(n[0],t.headers["x-forwarded-proto"]):Array.isArray(t.headers["x-forwarded-proto"])?mo(n[0],t.headers["x-forwarded-proto"][0]):mo(n[0]);let o=t.headers.host;return typeof o=="string"&&o.length>0?mo(o,e):null}function Ew(t){let e=t.headers.forwarded;if(e){for(let o of Sw(e))if(o.for)return o.for}let r=t.headers["x-forwarded-for"];if(typeof r=="string")return r;if(Array.isArray(r))return r[0];let n=t.socket.remoteAddress;return n||null}G.getRemoteClientAddress=Ew;function B_e(t,e,r){var n,o;try{if(e.headers.host)return new URL((n=e.url)!==null&&n!==void 0?n:"/",`${t}://${e.headers.host}`);{let s=new URL((o=e.url)!==null&&o!==void 0?o:"/",`${t}://localhost`);return{pathname:s.pathname,search:s.search,toString:function(){return s.pathname+s.search}}}}catch(s){return r.verbose("Unable to get URL from request",s),{}}}var G_e=(t,e,r)=>{let n=t.headers,o=n["user-agent"],s=n["x-forwarded-for"],i=t.httpVersion,a=n.host,c=a?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",u=t.method,l=fw(u),p=V_e(t,e.component),_=e.serverName,d=Ew(t),S={[y.ATTR_HTTP_REQUEST_METHOD]:l,[y.ATTR_URL_SCHEME]:e.component,[y.ATTR_SERVER_ADDRESS]:p?.host,[y.ATTR_NETWORK_PEER_ADDRESS]:t.socket.remoteAddress,[y.ATTR_NETWORK_PEER_PORT]:t.socket.remotePort,[y.ATTR_NETWORK_PROTOCOL_VERSION]:t.httpVersion,[y.ATTR_USER_AGENT_ORIGINAL]:o},f=B_e(e.component,t,r);f?.pathname!=null&&(S[y.ATTR_URL_PATH]=f.pathname),d!=null&&(S[y.ATTR_CLIENT_ADDRESS]=d),p?.port!=null&&(S[y.ATTR_SERVER_PORT]=Number(p.port)),u!==l&&(S[y.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=u);let T={[y.SEMATTRS_HTTP_URL]:f.toString(),[y.SEMATTRS_HTTP_HOST]:a,[y.SEMATTRS_NET_HOST_NAME]:c,[y.SEMATTRS_HTTP_METHOD]:u,[y.SEMATTRS_HTTP_SCHEME]:e.component};switch(typeof s=="string"&&(T[y.SEMATTRS_HTTP_CLIENT_IP]=s.split(",")[0]),typeof _=="string"&&(T[y.SEMATTRS_HTTP_SERVER_NAME]=_),f?.pathname&&(T[y.SEMATTRS_HTTP_TARGET]=f?.pathname+f?.search||"/"),o!==void 0&&(T[y.SEMATTRS_HTTP_USER_AGENT]=o),(0,G.setRequestContentLengthAttribute)(t,T),(0,G.setAttributesFromHttpKind)(i,T),e.semconvStability){case 1:return Object.assign(S,e.hookAttributes);case 2:return Object.assign(T,e.hookAttributes)}return Object.assign(T,S,e.hookAttributes)};G.getIncomingRequestAttributes=G_e;var H_e=t=>{let e={};return e[y.SEMATTRS_HTTP_SCHEME]=t[y.SEMATTRS_HTTP_SCHEME],e[y.SEMATTRS_HTTP_METHOD]=t[y.SEMATTRS_HTTP_METHOD],e[y.SEMATTRS_NET_HOST_NAME]=t[y.SEMATTRS_NET_HOST_NAME],e[y.SEMATTRS_HTTP_FLAVOR]=t[y.SEMATTRS_HTTP_FLAVOR],e};G.getIncomingRequestMetricAttributes=H_e;var k_e=(t,e,r)=>{let{socket:n}=t,{statusCode:o,statusMessage:s}=e,i={[y.ATTR_HTTP_RESPONSE_STATUS_CODE]:o},a=(0,_w.getRPCMetadata)(Wc.context.active()),c={};if(n){let{localAddress:u,localPort:l,remoteAddress:p,remotePort:_}=n;c[y.SEMATTRS_NET_HOST_IP]=u,c[y.SEMATTRS_NET_HOST_PORT]=l,c[y.SEMATTRS_NET_PEER_IP]=p,c[y.SEMATTRS_NET_PEER_PORT]=_}switch(c[y.SEMATTRS_HTTP_STATUS_CODE]=o,c[b_.AttributeNames.HTTP_STATUS_TEXT]=(s||"").toUpperCase(),a?.type===_w.RPCType.HTTP&&a.route!==void 0&&(c[y.SEMATTRS_HTTP_ROUTE]=a.route,i[y.ATTR_HTTP_ROUTE]=a.route),r){case 1:return i;case 2:return c}return Object.assign(c,i)};G.getIncomingRequestAttributesOnResponse=k_e;var F_e=t=>{let e={};return e[y.SEMATTRS_HTTP_STATUS_CODE]=t[y.SEMATTRS_HTTP_STATUS_CODE],e[y.SEMATTRS_NET_HOST_PORT]=t[y.SEMATTRS_NET_HOST_PORT],t[y.SEMATTRS_HTTP_ROUTE]!==void 0&&(e[y.SEMATTRS_HTTP_ROUTE]=t[y.SEMATTRS_HTTP_ROUTE]),e};G.getIncomingRequestMetricAttributesOnResponse=F_e;var q_e=t=>{let e={};return t[y.ATTR_HTTP_ROUTE]!==void 0&&(e[y.ATTR_HTTP_ROUTE]=t[y.SEMATTRS_HTTP_ROUTE]),t[y.ATTR_HTTP_RESPONSE_STATUS_CODE]&&(e[y.ATTR_HTTP_RESPONSE_STATUS_CODE]=t[y.ATTR_HTTP_RESPONSE_STATUS_CODE]),e};G.getIncomingStableRequestMetricAttributesOnResponse=q_e;function j_e(t,e){let r=new Map;for(let n=0,o=e.length;n<o;n++){let s=e[n].toLowerCase();r.set(s,s.replace(/-/g,"_"))}return(n,o)=>{for(let s of r.keys()){let i=o(s);if(i===void 0)continue;let a=r.get(s),c=`http.${t}.header.${a}`;typeof i=="string"?n.setAttribute(c,[i]):Array.isArray(i)?n.setAttribute(c,i):n.setAttribute(c,[i])}}}G.headerCapture=j_e;var Y_e=new Set(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]);function fw(t){if(t==null)return"GET";let e=t.toUpperCase();return Y_e.has(e)?e:"_OTHER"}function Sw(t){try{return g_e(t)}catch{return[]}}});var hw=E(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.HttpInstrumentation=void 0;var q=(M(),P(U)),Ui=re(),mw=rm(),$_e=require("url"),K_e=RU(),mr=ee(),Xm=re(),zm=require("events"),ye=(_r(),P(pr)),Oe=Tw(),Qm=class extends mr.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-http",K_e.VERSION,e),this._spanNotEnded=new WeakSet,this._semconvStability=2,this._headerCapture=this._createHeaderCapture();for(let r of(0,Xm.getEnv)().OTEL_SEMCONV_STABILITY_OPT_IN)if(r.toLowerCase()==="http/dup"){this._semconvStability=3;break}else r.toLowerCase()==="http"&&(this._semconvStability=1)}_updateMetricInstruments(){this._oldHttpServerDurationHistogram=this.meter.createHistogram("http.server.duration",{description:"Measures the duration of inbound HTTP requests.",unit:"ms",valueType:q.ValueType.DOUBLE}),this._oldHttpClientDurationHistogram=this.meter.createHistogram("http.client.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"ms",valueType:q.ValueType.DOUBLE}),this._stableHttpServerDurationHistogram=this.meter.createHistogram(ye.METRIC_HTTP_SERVER_REQUEST_DURATION,{description:"Duration of HTTP server requests.",unit:"s",valueType:q.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}}),this._stableHttpClientDurationHistogram=this.meter.createHistogram(ye.METRIC_HTTP_CLIENT_REQUEST_DURATION,{description:"Duration of HTTP client requests.",unit:"s",valueType:q.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}})}_recordServerDuration(e,r,n){(this._semconvStability&2)===2&&this._oldHttpServerDurationHistogram.record(e,r),(this._semconvStability&1)===1&&this._stableHttpServerDurationHistogram.record(e/1e3,n)}_recordClientDuration(e,r,n){(this._semconvStability&2)===2&&this._oldHttpClientDurationHistogram.record(e,r),(this._semconvStability&1)===1&&this._stableHttpClientDurationHistogram.record(e/1e3,n)}setConfig(e={}){super.setConfig(e),this._headerCapture=this._createHeaderCapture()}init(){return[this._getHttpsInstrumentation(),this._getHttpInstrumentation()]}_getHttpInstrumentation(){return new mr.InstrumentationNodeModuleDefinition("http",["*"],e=>{let r=e[Symbol.toStringTag]==="Module";if(!this.getConfig().disableOutgoingRequestInstrumentation){let n=this._wrap(e,"request",this._getPatchOutgoingRequestFunction("http")),o=this._wrap(e,"get",this._getPatchOutgoingGetFunction(n));r&&(e.default.request=n,e.default.get=o)}return this.getConfig().disableIncomingRequestInstrumentation||this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("http")),e},e=>{e!==void 0&&(this.getConfig().disableOutgoingRequestInstrumentation||(this._unwrap(e,"request"),this._unwrap(e,"get")),this.getConfig().disableIncomingRequestInstrumentation||this._unwrap(e.Server.prototype,"emit"))})}_getHttpsInstrumentation(){return new mr.InstrumentationNodeModuleDefinition("https",["*"],e=>{let r=e[Symbol.toStringTag]==="Module";if(!this.getConfig().disableOutgoingRequestInstrumentation){let n=this._wrap(e,"request",this._getPatchHttpsOutgoingRequestFunction("https")),o=this._wrap(e,"get",this._getPatchHttpsOutgoingGetFunction(n));r&&(e.default.request=n,e.default.get=o)}return this.getConfig().disableIncomingRequestInstrumentation||this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("https")),e},e=>{e!==void 0&&(this.getConfig().disableOutgoingRequestInstrumentation||(this._unwrap(e,"request"),this._unwrap(e,"get")),this.getConfig().disableIncomingRequestInstrumentation||this._unwrap(e.Server.prototype,"emit"))})}_getPatchIncomingRequestFunction(e){return r=>this._incomingRequestFunction(e,r)}_getPatchOutgoingRequestFunction(e){return r=>this._outgoingRequestFunction(e,r)}_getPatchOutgoingGetFunction(e){return r=>function(o,...s){let i=e(o,...s);return i.end(),i}}_getPatchHttpsOutgoingRequestFunction(e){return r=>{let n=this;return function(s,...i){var a;return e==="https"&&typeof s=="object"&&((a=s?.constructor)===null||a===void 0?void 0:a.name)!=="URL"&&(s=Object.assign({},s),n._setDefaultOptions(s)),n._getPatchOutgoingRequestFunction(e)(r)(s,...i)}}}_setDefaultOptions(e){e.protocol=e.protocol||"https:",e.port=e.port||443}_getPatchHttpsOutgoingGetFunction(e){return r=>{let n=this;return function(s,...i){return n._getPatchOutgoingGetFunction(e)(r)(s,...i)}}}_traceClientRequest(e,r,n,o,s){this.getConfig().requestHook&&this._callRequestHook(r,e);let i=!1;return e.prependListener("response",a=>{this._diag.debug("outgoingRequest on response()"),e.listenerCount("response")<=1&&a.resume();let c=(0,Oe.getOutgoingRequestAttributesOnResponse)(a,this._semconvStability);r.setAttributes(c),o=Object.assign(o,(0,Oe.getOutgoingRequestMetricAttributesOnResponse)(c)),this.getConfig().responseHook&&this._callResponseHook(r,a),this._headerCapture.client.captureRequestHeaders(r,l=>e.getHeader(l)),this._headerCapture.client.captureResponseHeaders(r,l=>a.headers[l]),q.context.bind(q.context.active(),a);let u=()=>{if(this._diag.debug("outgoingRequest on end()"),i)return;i=!0;let l;a.aborted&&!a.complete?l={code:q.SpanStatusCode.ERROR}:l={code:(0,Oe.parseResponseStatus)(q.SpanKind.CLIENT,a.statusCode)},r.setStatus(l),this.getConfig().applyCustomAttributesOnSpan&&(0,mr.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(r,e,a),()=>{},!0),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s)};a.on("end",u),mw.lt(process.version,"16.0.0")&&a.on("close",u),a.on(zm.errorMonitor,l=>{this._diag.debug("outgoingRequest on error()",l),!i&&(i=!0,(0,Oe.setSpanWithError)(r,l,this._semconvStability),r.setStatus({code:q.SpanStatusCode.ERROR,message:l.message}),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))})}),e.on("close",()=>{this._diag.debug("outgoingRequest on request close()"),!(e.aborted||i)&&(i=!0,this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))}),e.on(zm.errorMonitor,a=>{this._diag.debug("outgoingRequest on request error()",a),!i&&(i=!0,(0,Oe.setSpanWithError)(r,a,this._semconvStability),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))}),this._diag.debug("http.ClientRequest return request"),e}_incomingRequestFunction(e,r){let n=this;return function(s,...i){if(s!=="request")return r.apply(this,[s,...i]);let a=i[0],c=i[1],u=a.method||"GET";if(n._diag.debug(`${e} instrumentation incomingRequest`),(0,mr.safeExecuteInTheMiddle)(()=>{var N,I;return(I=(N=n.getConfig()).ignoreIncomingRequestHook)===null||I===void 0?void 0:I.call(N,a)},N=>{N!=null&&n._diag.error("caught ignoreIncomingRequestHook error: ",N)},!0))return q.context.with((0,Ui.suppressTracing)(q.context.active()),()=>(q.context.bind(q.context.active(),a),q.context.bind(q.context.active(),c),r.apply(this,[s,...i])));let l=a.headers,p=(0,Oe.getIncomingRequestAttributes)(a,{component:e,serverName:n.getConfig().serverName,hookAttributes:n._callStartSpanHook(a,n.getConfig().startIncomingSpanHook),semconvStability:n._semconvStability},n._diag),_={kind:q.SpanKind.SERVER,attributes:p},d=(0,Ui.hrTime)(),S=(0,Oe.getIncomingRequestMetricAttributes)(p),f={[ye.ATTR_HTTP_REQUEST_METHOD]:p[ye.ATTR_HTTP_REQUEST_METHOD],[ye.ATTR_URL_SCHEME]:p[ye.ATTR_URL_SCHEME]};p[ye.ATTR_NETWORK_PROTOCOL_VERSION]&&(f[ye.ATTR_NETWORK_PROTOCOL_VERSION]=p[ye.ATTR_NETWORK_PROTOCOL_VERSION]);let T=q.propagation.extract(q.ROOT_CONTEXT,l),h=n._startHttpSpan(u,_,T),A={type:Xm.RPCType.HTTP,span:h};return q.context.with((0,Xm.setRPCMetadata)(q.trace.setSpan(T,h),A),()=>{q.context.bind(q.context.active(),a),q.context.bind(q.context.active(),c),n.getConfig().requestHook&&n._callRequestHook(h,a),n.getConfig().responseHook&&n._callResponseHook(h,c),n._headerCapture.server.captureRequestHeaders(h,I=>a.headers[I]);let N=!1;return c.on("close",()=>{N||n._onServerResponseFinish(a,c,h,S,f,d)}),c.on(zm.errorMonitor,I=>{N=!0,n._onServerResponseError(h,S,f,d,I)}),(0,mr.safeExecuteInTheMiddle)(()=>r.apply(this,[s,...i]),I=>{if(I)throw(0,Oe.setSpanWithError)(h,I,n._semconvStability),n._closeHttpSpan(h,q.SpanKind.SERVER,d,S,f),I})})}}_outgoingRequestFunction(e,r){let n=this;return function(s,...i){if(!(0,Oe.isValidOptionsType)(s))return r.apply(this,[s,...i]);let a=typeof i[0]=="object"&&(typeof s=="string"||s instanceof $_e.URL)?i.shift():void 0,{method:c,invalidUrl:u,optionsParsed:l}=(0,Oe.getRequestInfo)(n._diag,s,a);if(e==="http"&&mw.lt(process.version,"9.0.0")&&l.protocol==="https:")return r.apply(this,[l,...i]);if((0,mr.safeExecuteInTheMiddle)(()=>{var O,b;return(b=(O=n.getConfig()).ignoreOutgoingRequestHook)===null||b===void 0?void 0:b.call(O,l)},O=>{O!=null&&n._diag.error("caught ignoreOutgoingRequestHook error: ",O)},!0))return r.apply(this,[l,...i]);let{hostname:p,port:_}=(0,Oe.extractHostnameAndPort)(l),d=(0,Oe.getOutgoingRequestAttributes)(l,{component:e,port:_,hostname:p,hookAttributes:n._callStartSpanHook(l,n.getConfig().startOutgoingSpanHook)},n._semconvStability),S=(0,Ui.hrTime)(),f=(0,Oe.getOutgoingRequestMetricAttributes)(d),T={[ye.ATTR_HTTP_REQUEST_METHOD]:d[ye.ATTR_HTTP_REQUEST_METHOD],[ye.ATTR_SERVER_ADDRESS]:d[ye.ATTR_SERVER_ADDRESS],[ye.ATTR_SERVER_PORT]:d[ye.ATTR_SERVER_PORT]};d[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]&&(T[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]=d[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]),d[ye.ATTR_NETWORK_PROTOCOL_VERSION]&&(T[ye.ATTR_NETWORK_PROTOCOL_VERSION]=d[ye.ATTR_NETWORK_PROTOCOL_VERSION]);let h={kind:q.SpanKind.CLIENT,attributes:d},A=n._startHttpSpan(c,h),N=q.context.active(),I=q.trace.setSpan(N,A);return l.headers?l.headers=Object.assign({},l.headers):l.headers={},q.propagation.inject(I,l.headers),q.context.with(I,()=>{let O=i[i.length-1];typeof O=="function"&&(i[i.length-1]=q.context.bind(N,O));let b=(0,mr.safeExecuteInTheMiddle)(()=>u?r.apply(this,[s,...i]):r.apply(this,[l,...i]),v=>{if(v)throw(0,Oe.setSpanWithError)(A,v,n._semconvStability),n._closeHttpSpan(A,q.SpanKind.CLIENT,S,f,T),v});return n._diag.debug(`${e} instrumentation outgoingRequest`),q.context.bind(N,b),n._traceClientRequest(b,A,S,f,T)})}}_onServerResponseFinish(e,r,n,o,s,i){let a=(0,Oe.getIncomingRequestAttributesOnResponse)(e,r,this._semconvStability);o=Object.assign(o,(0,Oe.getIncomingRequestMetricAttributesOnResponse)(a)),s=Object.assign(s,(0,Oe.getIncomingStableRequestMetricAttributesOnResponse)(a)),this._headerCapture.server.captureResponseHeaders(n,u=>r.getHeader(u)),n.setAttributes(a).setStatus({code:(0,Oe.parseResponseStatus)(q.SpanKind.SERVER,r.statusCode)});let c=a[ye.SEMATTRS_HTTP_ROUTE];c&&n.updateName(`${e.method||"GET"} ${c}`),this.getConfig().applyCustomAttributesOnSpan&&(0,mr.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(n,e,r),()=>{},!0),this._closeHttpSpan(n,q.SpanKind.SERVER,i,o,s)}_onServerResponseError(e,r,n,o,s){(0,Oe.setSpanWithError)(e,s,this._semconvStability),this._closeHttpSpan(e,q.SpanKind.SERVER,o,r,n)}_startHttpSpan(e,r,n=q.context.active()){let o=r.kind===q.SpanKind.CLIENT?this.getConfig().requireParentforOutgoingSpans:this.getConfig().requireParentforIncomingSpans,s,i=q.trace.getSpan(n);return o===!0&&i===void 0?s=q.trace.wrapSpanContext(q.INVALID_SPAN_CONTEXT):o===!0&&i?.spanContext().isRemote?s=i:s=this.tracer.startSpan(e,r,n),this._spanNotEnded.add(s),s}_closeHttpSpan(e,r,n,o,s){if(!this._spanNotEnded.has(e))return;e.end(),this._spanNotEnded.delete(e);let i=(0,Ui.hrTimeToMilliseconds)((0,Ui.hrTimeDuration)(n,(0,Ui.hrTime)()));r===q.SpanKind.SERVER?this._recordServerDuration(i,o,s):r===q.SpanKind.CLIENT&&this._recordClientDuration(i,o,s)}_callResponseHook(e,r){(0,mr.safeExecuteInTheMiddle)(()=>this.getConfig().responseHook(e,r),()=>{},!0)}_callRequestHook(e,r){(0,mr.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(e,r),()=>{},!0)}_callStartSpanHook(e,r){if(typeof r=="function")return(0,mr.safeExecuteInTheMiddle)(()=>r(e),()=>{},!0)}_createHeaderCapture(){var e,r,n,o,s,i,a,c,u,l,p,_;let d=this.getConfig();return{client:{captureRequestHeaders:(0,Oe.headerCapture)("request",(n=(r=(e=d.headersToSpanAttributes)===null||e===void 0?void 0:e.client)===null||r===void 0?void 0:r.requestHeaders)!==null&&n!==void 0?n:[]),captureResponseHeaders:(0,Oe.headerCapture)("response",(i=(s=(o=d.headersToSpanAttributes)===null||o===void 0?void 0:o.client)===null||s===void 0?void 0:s.responseHeaders)!==null&&i!==void 0?i:[])},server:{captureRequestHeaders:(0,Oe.headerCapture)("request",(u=(c=(a=d.headersToSpanAttributes)===null||a===void 0?void 0:a.server)===null||c===void 0?void 0:c.requestHeaders)!==null&&u!==void 0?u:[]),captureResponseHeaders:(0,Oe.headerCapture)("response",(_=(p=(l=d.headersToSpanAttributes)===null||l===void 0?void 0:l.server)===null||p===void 0?void 0:p.responseHeaders)!==null&&_!==void 0?_:[])}}}};L_.HttpInstrumentation=Qm});var gw=E(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.HttpInstrumentation=void 0;var W_e=hw();Object.defineProperty(D_,"HttpInstrumentation",{enumerable:!0,get:function(){return W_e.HttpInstrumentation}})});function Ge(t){let e={},r=t.length;for(let n=0;n<r;n++){let o=t[n];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var ig=w(()=>{});var YV,$V,KV,WV,XV,zV,QV,JV,ZV,eB,tB,rB,nB,oB,sB,iB,aB,cB,uB,lB,pB,_B,dB,EB,fB,SB,TB,mB,hB,gB,AB,RB,OB,NB,IB,PB,CB,yB,MB,vB,bB,LB,DB,xB,UB,wB,VB,BB,GB,HB,kB,FB,qB,jB,YB,$B,KB,WB,XB,zB,QB,JB,ZB,eG,tG,rG,nG,oG,sG,iG,aG,cG,uG,lG,pG,_G,dG,EG,fG,SG,TG,mG,hG,gG,AG,RG,OG,NG,IG,PG,CG,yG,MG,vG,bG,LG,DG,xG,UG,wG,VG,BG,GG,HG,kG,FG,qG,jG,YG,$G,KG,WG,XG,zG,QG,JG,ZG,eH,tH,rH,nH,oH,sH,iH,aH,cH,uH,lH,vfe,ag,bfe,Lfe,Dfe,xfe,cg,Ufe,wfe,Vfe,Bfe,Gfe,Hfe,kfe,Ffe,qfe,jfe,Yfe,$fe,Kfe,Wfe,Xfe,zfe,Qfe,Jfe,ug,Zfe,eSe,tSe,rSe,nSe,oSe,sSe,iSe,aSe,cSe,uSe,lSe,pSe,_Se,dSe,ESe,fSe,SSe,TSe,mSe,hSe,gSe,ASe,RSe,OSe,NSe,ISe,PSe,CSe,ySe,MSe,vSe,bSe,LSe,Su,ea,lg,DSe,xSe,Pd,USe,wSe,VSe,BSe,GSe,HSe,kSe,Tu,FSe,qSe,jSe,YSe,$Se,KSe,WSe,XSe,zSe,QSe,JSe,ZSe,eTe,tTe,rTe,nTe,oTe,sTe,iTe,aTe,cTe,uTe,lTe,pg,pTe,_Te,dTe,ETe,fTe,STe,TTe,mTe,hTe,gTe,ATe,RTe,OTe,NTe,ITe,PTe,CTe,yTe,MTe,_g,vTe,dg,bTe,LTe,DTe,xTe,UTe,wTe,VTe,BTe,GTe,pH,_H,dH,EH,fH,SH,TH,mH,hH,gH,AH,RH,OH,NH,IH,PH,CH,yH,MH,vH,bH,LH,DH,xH,UH,wH,VH,BH,GH,HH,kH,FH,qH,jH,YH,$H,KH,WH,XH,zH,QH,JH,ZH,ek,tk,rk,nk,HTe,kTe,FTe,qTe,jTe,YTe,$Te,KTe,WTe,XTe,zTe,QTe,JTe,ZTe,eme,tme,rme,nme,ome,sme,ime,ame,cme,ume,lme,pme,_me,dme,Eme,fme,Sme,Tme,mme,hme,gme,Ame,Rme,Ome,Nme,Ime,Pme,Cme,yme,Mme,vme,bme,Lme,Dme,ok,sk,ik,ak,ck,uk,lk,pk,_k,dk,Ek,xme,Ume,wme,Vme,Bme,Gme,Hme,kme,Fme,qme,jme,Yme,fk,Sk,Tk,mk,hk,$me,Kme,Wme,Xme,zme,Qme,gk,Ak,Rk,Jme,Zme,ehe,the,Ok,Nk,Ik,Pk,rhe,nhe,ohe,she,ihe,Ck,yk,Mk,vk,bk,Lk,Dk,ahe,che,uhe,lhe,phe,_he,dhe,Ehe,xk,Uk,wk,Vk,Bk,fhe,She,The,mhe,hhe,ghe,Gk,Hk,kk,Fk,qk,jk,Yk,$k,Kk,Wk,Xk,zk,Qk,Jk,Zk,eF,tF,rF,nF,oF,sF,Ahe,Rhe,Ohe,Nhe,Ihe,Phe,Che,yhe,Mhe,vhe,bhe,Lhe,Dhe,xhe,Uhe,whe,Vhe,Bhe,Ghe,Hhe,khe,Fhe,iF,aF,cF,uF,lF,qhe,jhe,Yhe,$he,Khe,Whe,pF,_F,Xhe,zhe,Qhe,dF,EF,Jhe,Zhe,ege,fF,SF,TF,mF,hF,gF,AF,RF,OF,NF,IF,PF,CF,yF,MF,vF,bF,tge,rge,nge,oge,sge,ige,age,cge,uge,lge,pge,_ge,dge,Ege,fge,Sge,Tge,mge,LF,DF,hge,gge,Age,xF=w(()=>{ig();YV="aws.lambda.invoked_arn",$V="db.system",KV="db.connection_string",WV="db.user",XV="db.jdbc.driver_classname",zV="db.name",QV="db.statement",JV="db.operation",ZV="db.mssql.instance_name",eB="db.cassandra.keyspace",tB="db.cassandra.page_size",rB="db.cassandra.consistency_level",nB="db.cassandra.table",oB="db.cassandra.idempotence",sB="db.cassandra.speculative_execution_count",iB="db.cassandra.coordinator.id",aB="db.cassandra.coordinator.dc",cB="db.hbase.namespace",uB="db.redis.database_index",lB="db.mongodb.collection",pB="db.sql.table",_B="exception.type",dB="exception.message",EB="exception.stacktrace",fB="exception.escaped",SB="faas.trigger",TB="faas.execution",mB="faas.document.collection",hB="faas.document.operation",gB="faas.document.time",AB="faas.document.name",RB="faas.time",OB="faas.cron",NB="faas.coldstart",IB="faas.invoked_name",PB="faas.invoked_provider",CB="faas.invoked_region",yB="net.transport",MB="net.peer.ip",vB="net.peer.port",bB="net.peer.name",LB="net.host.ip",DB="net.host.port",xB="net.host.name",UB="net.host.connection.type",wB="net.host.connection.subtype",VB="net.host.carrier.name",BB="net.host.carrier.mcc",GB="net.host.carrier.mnc",HB="net.host.carrier.icc",kB="peer.service",FB="enduser.id",qB="enduser.role",jB="enduser.scope",YB="thread.id",$B="thread.name",KB="code.function",WB="code.namespace",XB="code.filepath",zB="code.lineno",QB="http.method",JB="http.url",ZB="http.target",eG="http.host",tG="http.scheme",rG="http.status_code",nG="http.flavor",oG="http.user_agent",sG="http.request_content_length",iG="http.request_content_length_uncompressed",aG="http.response_content_length",cG="http.response_content_length_uncompressed",uG="http.server_name",lG="http.route",pG="http.client_ip",_G="aws.dynamodb.table_names",dG="aws.dynamodb.consumed_capacity",EG="aws.dynamodb.item_collection_metrics",fG="aws.dynamodb.provisioned_read_capacity",SG="aws.dynamodb.provisioned_write_capacity",TG="aws.dynamodb.consistent_read",mG="aws.dynamodb.projection",hG="aws.dynamodb.limit",gG="aws.dynamodb.attributes_to_get",AG="aws.dynamodb.index_name",RG="aws.dynamodb.select",OG="aws.dynamodb.global_secondary_indexes",NG="aws.dynamodb.local_secondary_indexes",IG="aws.dynamodb.exclusive_start_table",PG="aws.dynamodb.table_count",CG="aws.dynamodb.scan_forward",yG="aws.dynamodb.segment",MG="aws.dynamodb.total_segments",vG="aws.dynamodb.count",bG="aws.dynamodb.scanned_count",LG="aws.dynamodb.attribute_definitions",DG="aws.dynamodb.global_secondary_index_updates",xG="messaging.system",UG="messaging.destination",wG="messaging.destination_kind",VG="messaging.temp_destination",BG="messaging.protocol",GG="messaging.protocol_version",HG="messaging.url",kG="messaging.message_id",FG="messaging.conversation_id",qG="messaging.message_payload_size_bytes",jG="messaging.message_payload_compressed_size_bytes",YG="messaging.operation",$G="messaging.consumer_id",KG="messaging.rabbitmq.routing_key",WG="messaging.kafka.message_key",XG="messaging.kafka.consumer_group",zG="messaging.kafka.client_id",QG="messaging.kafka.partition",JG="messaging.kafka.tombstone",ZG="rpc.system",eH="rpc.service",tH="rpc.method",rH="rpc.grpc.status_code",nH="rpc.jsonrpc.version",oH="rpc.jsonrpc.request_id",sH="rpc.jsonrpc.error_code",iH="rpc.jsonrpc.error_message",aH="message.type",cH="message.id",uH="message.compressed_size",lH="message.uncompressed_size",vfe=YV,ag=$V,bfe=KV,Lfe=WV,Dfe=XV,xfe=zV,cg=QV,Ufe=JV,wfe=ZV,Vfe=eB,Bfe=tB,Gfe=rB,Hfe=nB,kfe=oB,Ffe=sB,qfe=iB,jfe=aB,Yfe=cB,$fe=uB,Kfe=lB,Wfe=pB,Xfe=_B,zfe=dB,Qfe=EB,Jfe=fB,ug=SB,Zfe=TB,eSe=mB,tSe=hB,rSe=gB,nSe=AB,oSe=RB,sSe=OB,iSe=NB,aSe=IB,cSe=PB,uSe=CB,lSe=yB,pSe=MB,_Se=vB,dSe=bB,ESe=LB,fSe=DB,SSe=xB,TSe=UB,mSe=wB,hSe=VB,gSe=BB,ASe=GB,RSe=HB,OSe=kB,NSe=FB,ISe=qB,PSe=jB,CSe=YB,ySe=$B,MSe=KB,vSe=WB,bSe=XB,LSe=zB,Su=QB,ea=JB,lg=ZB,DSe=eG,xSe=tG,Pd=rG,USe=nG,wSe=oG,VSe=sG,BSe=iG,GSe=aG,HSe=cG,kSe=uG,Tu=lG,FSe=pG,qSe=_G,jSe=dG,YSe=EG,$Se=fG,KSe=SG,WSe=TG,XSe=mG,zSe=hG,QSe=gG,JSe=AG,ZSe=RG,eTe=OG,tTe=NG,rTe=IG,nTe=PG,oTe=CG,sTe=yG,iTe=MG,aTe=vG,cTe=bG,uTe=LG,lTe=DG,pg=xG,pTe=UG,_Te=wG,dTe=VG,ETe=BG,fTe=GG,STe=HG,TTe=kG,mTe=FG,hTe=qG,gTe=jG,ATe=YG,RTe=$G,OTe=KG,NTe=WG,ITe=XG,PTe=zG,CTe=QG,yTe=JG,MTe=ZG,_g=eH,vTe=tH,dg=rH,bTe=nH,LTe=oH,DTe=sH,xTe=iH,UTe=aH,wTe=cH,VTe=uH,BTe=lH,GTe=Ge([YV,$V,KV,WV,XV,zV,QV,JV,ZV,eB,tB,rB,nB,oB,sB,iB,aB,cB,uB,lB,pB,_B,dB,EB,fB,SB,TB,mB,hB,gB,AB,RB,OB,NB,IB,PB,CB,yB,MB,vB,bB,LB,DB,xB,UB,wB,VB,BB,GB,HB,kB,FB,qB,jB,YB,$B,KB,WB,XB,zB,QB,JB,ZB,eG,tG,rG,nG,oG,sG,iG,aG,cG,uG,lG,pG,_G,dG,EG,fG,SG,TG,mG,hG,gG,AG,RG,OG,NG,IG,PG,CG,yG,MG,vG,bG,LG,DG,xG,UG,wG,VG,BG,GG,HG,kG,FG,qG,jG,YG,$G,KG,WG,XG,zG,QG,JG,ZG,eH,tH,rH,nH,oH,sH,iH,aH,cH,uH,lH]),pH="other_sql",_H="mssql",dH="mysql",EH="oracle",fH="db2",SH="postgresql",TH="redshift",mH="hive",hH="cloudscape",gH="hsqldb",AH="progress",RH="maxdb",OH="hanadb",NH="ingres",IH="firstsql",PH="edb",CH="cache",yH="adabas",MH="firebird",vH="derby",bH="filemaker",LH="informix",DH="instantdb",xH="interbase",UH="mariadb",wH="netezza",VH="pervasive",BH="pointbase",GH="sqlite",HH="sybase",kH="teradata",FH="vertica",qH="h2",jH="coldfusion",YH="cassandra",$H="hbase",KH="mongodb",WH="redis",XH="couchbase",zH="couchdb",QH="cosmosdb",JH="dynamodb",ZH="neo4j",ek="geode",tk="elasticsearch",rk="memcached",nk="cockroachdb",HTe=pH,kTe=_H,FTe=dH,qTe=EH,jTe=fH,YTe=SH,$Te=TH,KTe=mH,WTe=hH,XTe=gH,zTe=AH,QTe=RH,JTe=OH,ZTe=NH,eme=IH,tme=PH,rme=CH,nme=yH,ome=MH,sme=vH,ime=bH,ame=LH,cme=DH,ume=xH,lme=UH,pme=wH,_me=VH,dme=BH,Eme=GH,fme=HH,Sme=kH,Tme=FH,mme=qH,hme=jH,gme=YH,Ame=$H,Rme=KH,Ome=WH,Nme=XH,Ime=zH,Pme=QH,Cme=JH,yme=ZH,Mme=ek,vme=tk,bme=rk,Lme=nk,Dme=Ge([pH,_H,dH,EH,fH,SH,TH,mH,hH,gH,AH,RH,OH,NH,IH,PH,CH,yH,MH,vH,bH,LH,DH,xH,UH,wH,VH,BH,GH,HH,kH,FH,qH,jH,YH,$H,KH,WH,XH,zH,QH,JH,ZH,ek,tk,rk,nk]),ok="all",sk="each_quorum",ik="quorum",ak="local_quorum",ck="one",uk="two",lk="three",pk="local_one",_k="any",dk="serial",Ek="local_serial",xme=ok,Ume=sk,wme=ik,Vme=ak,Bme=ck,Gme=uk,Hme=lk,kme=pk,Fme=_k,qme=dk,jme=Ek,Yme=Ge([ok,sk,ik,ak,ck,uk,lk,pk,_k,dk,Ek]),fk="datasource",Sk="http",Tk="pubsub",mk="timer",hk="other",$me=fk,Kme=Sk,Wme=Tk,Xme=mk,zme=hk,Qme=Ge([fk,Sk,Tk,mk,hk]),gk="insert",Ak="edit",Rk="delete",Jme=gk,Zme=Ak,ehe=Rk,the=Ge([gk,Ak,Rk]),Ok="alibaba_cloud",Nk="aws",Ik="azure",Pk="gcp",rhe=Ok,nhe=Nk,ohe=Ik,she=Pk,ihe=Ge([Ok,Nk,Ik,Pk]),Ck="ip_tcp",yk="ip_udp",Mk="ip",vk="unix",bk="pipe",Lk="inproc",Dk="other",ahe=Ck,che=yk,uhe=Mk,lhe=vk,phe=bk,_he=Lk,dhe=Dk,Ehe=Ge([Ck,yk,Mk,vk,bk,Lk,Dk]),xk="wifi",Uk="wired",wk="cell",Vk="unavailable",Bk="unknown",fhe=xk,She=Uk,The=wk,mhe=Vk,hhe=Bk,ghe=Ge([xk,Uk,wk,Vk,Bk]),Gk="gprs",Hk="edge",kk="umts",Fk="cdma",qk="evdo_0",jk="evdo_a",Yk="cdma2000_1xrtt",$k="hsdpa",Kk="hsupa",Wk="hspa",Xk="iden",zk="evdo_b",Qk="lte",Jk="ehrpd",Zk="hspap",eF="gsm",tF="td_scdma",rF="iwlan",nF="nr",oF="nrnsa",sF="lte_ca",Ahe=Gk,Rhe=Hk,Ohe=kk,Nhe=Fk,Ihe=qk,Phe=jk,Che=Yk,yhe=$k,Mhe=Kk,vhe=Wk,bhe=Xk,Lhe=zk,Dhe=Qk,xhe=Jk,Uhe=Zk,whe=eF,Vhe=tF,Bhe=rF,Ghe=nF,Hhe=oF,khe=sF,Fhe=Ge([Gk,Hk,kk,Fk,qk,jk,Yk,$k,Kk,Wk,Xk,zk,Qk,Jk,Zk,eF,tF,rF,nF,oF,sF]),iF="1.0",aF="1.1",cF="2.0",uF="SPDY",lF="QUIC",qhe=iF,jhe=aF,Yhe=cF,$he=uF,Khe=lF,Whe={HTTP_1_0:iF,HTTP_1_1:aF,HTTP_2_0:cF,SPDY:uF,QUIC:lF},pF="queue",_F="topic",Xhe=pF,zhe=_F,Qhe=Ge([pF,_F]),dF="receive",EF="process",Jhe=dF,Zhe=EF,ege=Ge([dF,EF]),fF=0,SF=1,TF=2,mF=3,hF=4,gF=5,AF=6,RF=7,OF=8,NF=9,IF=10,PF=11,CF=12,yF=13,MF=14,vF=15,bF=16,tge=fF,rge=SF,nge=TF,oge=mF,sge=hF,ige=gF,age=AF,cge=RF,uge=OF,lge=NF,pge=IF,_ge=PF,dge=CF,Ege=yF,fge=MF,Sge=vF,Tge=bF,mge={OK:fF,CANCELLED:SF,UNKNOWN:TF,INVALID_ARGUMENT:mF,DEADLINE_EXCEEDED:hF,NOT_FOUND:gF,ALREADY_EXISTS:AF,PERMISSION_DENIED:RF,RESOURCE_EXHAUSTED:OF,FAILED_PRECONDITION:NF,ABORTED:IF,OUT_OF_RANGE:PF,UNIMPLEMENTED:CF,INTERNAL:yF,UNAVAILABLE:MF,DATA_LOSS:vF,UNAUTHENTICATED:bF},LF="SENT",DF="RECEIVED",hge=LF,gge=DF,Age=Ge([LF,DF])});var UF=w(()=>{xF()});var wF,VF,BF,GF,HF,kF,FF,qF,jF,YF,$F,KF,WF,XF,zF,QF,JF,ZF,eq,tq,rq,nq,oq,sq,iq,aq,cq,uq,lq,pq,_q,dq,Eq,fq,Sq,Tq,mq,hq,gq,Aq,Rq,Oq,Nq,Iq,Pq,Cq,yq,Mq,vq,bq,Lq,Dq,xq,Uq,wq,Vq,Bq,Gq,Hq,kq,Fq,qq,jq,Yq,$q,Kq,Wq,Xq,zq,Qq,Jq,Zq,ej,tj,rj,nj,oj,sj,ij,aj,cj,Rge,Oge,Nge,Ige,Pge,Cge,yge,Mge,vge,bge,Lge,Dge,xge,Uge,wge,Vge,Bge,Gge,Hge,kge,Fge,qge,jge,Yge,$ge,Kge,Wge,Xge,zge,Qge,Jge,Zge,eAe,tAe,rAe,nAe,oAe,sAe,iAe,aAe,cAe,uAe,lAe,pAe,_Ae,dAe,EAe,fAe,SAe,TAe,mAe,hAe,gAe,AAe,RAe,OAe,NAe,IAe,PAe,CAe,yAe,MAe,vAe,bAe,LAe,DAe,xAe,UAe,wAe,VAe,BAe,Eg,GAe,HAe,kAe,FAe,qAe,jAe,YAe,$Ae,KAe,WAe,uj,lj,pj,_j,XAe,zAe,QAe,JAe,ZAe,dj,Ej,fj,Sj,Tj,mj,hj,gj,Aj,Rj,Oj,Nj,Ij,Pj,Cj,yj,Mj,eRe,tRe,rRe,nRe,oRe,sRe,iRe,aRe,cRe,uRe,lRe,pRe,_Re,dRe,ERe,fRe,SRe,TRe,vj,bj,mRe,hRe,gRe,Lj,Dj,xj,Uj,wj,Vj,Bj,ARe,RRe,ORe,NRe,IRe,PRe,CRe,yRe,Gj,Hj,kj,Fj,qj,jj,Yj,$j,Kj,Wj,Xj,MRe,vRe,bRe,LRe,DRe,xRe,URe,wRe,VRe,BRe,GRe,HRe,zj,Qj,Jj,Zj,eY,tY,rY,nY,oY,sY,kRe,FRe,qRe,jRe,YRe,$Re,KRe,WRe,XRe,zRe,QRe,iY=w(()=>{ig();wF="cloud.provider",VF="cloud.account.id",BF="cloud.region",GF="cloud.availability_zone",HF="cloud.platform",kF="aws.ecs.container.arn",FF="aws.ecs.cluster.arn",qF="aws.ecs.launchtype",jF="aws.ecs.task.arn",YF="aws.ecs.task.family",$F="aws.ecs.task.revision",KF="aws.eks.cluster.arn",WF="aws.log.group.names",XF="aws.log.group.arns",zF="aws.log.stream.names",QF="aws.log.stream.arns",JF="container.name",ZF="container.id",eq="container.runtime",tq="container.image.name",rq="container.image.tag",nq="deployment.environment",oq="device.id",sq="device.model.identifier",iq="device.model.name",aq="faas.name",cq="faas.id",uq="faas.version",lq="faas.instance",pq="faas.max_memory",_q="host.id",dq="host.name",Eq="host.type",fq="host.arch",Sq="host.image.name",Tq="host.image.id",mq="host.image.version",hq="k8s.cluster.name",gq="k8s.node.name",Aq="k8s.node.uid",Rq="k8s.namespace.name",Oq="k8s.pod.uid",Nq="k8s.pod.name",Iq="k8s.container.name",Pq="k8s.replicaset.uid",Cq="k8s.replicaset.name",yq="k8s.deployment.uid",Mq="k8s.deployment.name",vq="k8s.statefulset.uid",bq="k8s.statefulset.name",Lq="k8s.daemonset.uid",Dq="k8s.daemonset.name",xq="k8s.job.uid",Uq="k8s.job.name",wq="k8s.cronjob.uid",Vq="k8s.cronjob.name",Bq="os.type",Gq="os.description",Hq="os.name",kq="os.version",Fq="process.pid",qq="process.executable.name",jq="process.executable.path",Yq="process.command",$q="process.command_line",Kq="process.command_args",Wq="process.owner",Xq="process.runtime.name",zq="process.runtime.version",Qq="process.runtime.description",Jq="service.name",Zq="service.namespace",ej="service.instance.id",tj="service.version",rj="telemetry.sdk.name",nj="telemetry.sdk.language",oj="telemetry.sdk.version",sj="telemetry.auto.version",ij="webengine.name",aj="webengine.version",cj="webengine.description",Rge=wF,Oge=VF,Nge=BF,Ige=GF,Pge=HF,Cge=kF,yge=FF,Mge=qF,vge=jF,bge=YF,Lge=$F,Dge=KF,xge=WF,Uge=XF,wge=zF,Vge=QF,Bge=JF,Gge=ZF,Hge=eq,kge=tq,Fge=rq,qge=nq,jge=oq,Yge=sq,$ge=iq,Kge=aq,Wge=cq,Xge=uq,zge=lq,Qge=pq,Jge=_q,Zge=dq,eAe=Eq,tAe=fq,rAe=Sq,nAe=Tq,oAe=mq,sAe=hq,iAe=gq,aAe=Aq,cAe=Rq,uAe=Oq,lAe=Nq,pAe=Iq,_Ae=Pq,dAe=Cq,EAe=yq,fAe=Mq,SAe=vq,TAe=bq,mAe=Lq,hAe=Dq,gAe=xq,AAe=Uq,RAe=wq,OAe=Vq,NAe=Bq,IAe=Gq,PAe=Hq,CAe=kq,yAe=Fq,MAe=qq,vAe=jq,bAe=Yq,LAe=$q,DAe=Kq,xAe=Wq,UAe=Xq,wAe=zq,VAe=Qq,BAe=Jq,Eg=Zq,GAe=ej,HAe=tj,kAe=rj,FAe=nj,qAe=oj,jAe=sj,YAe=ij,$Ae=aj,KAe=cj,WAe=Ge([wF,VF,BF,GF,HF,kF,FF,qF,jF,YF,$F,KF,WF,XF,zF,QF,JF,ZF,eq,tq,rq,nq,oq,sq,iq,aq,cq,uq,lq,pq,_q,dq,Eq,fq,Sq,Tq,mq,hq,gq,Aq,Rq,Oq,Nq,Iq,Pq,Cq,yq,Mq,vq,bq,Lq,Dq,xq,Uq,wq,Vq,Bq,Gq,Hq,kq,Fq,qq,jq,Yq,$q,Kq,Wq,Xq,zq,Qq,Jq,Zq,ej,tj,rj,nj,oj,sj,ij,aj,cj]),uj="alibaba_cloud",lj="aws",pj="azure",_j="gcp",XAe=uj,zAe=lj,QAe=pj,JAe=_j,ZAe=Ge([uj,lj,pj,_j]),dj="alibaba_cloud_ecs",Ej="alibaba_cloud_fc",fj="aws_ec2",Sj="aws_ecs",Tj="aws_eks",mj="aws_lambda",hj="aws_elastic_beanstalk",gj="azure_vm",Aj="azure_container_instances",Rj="azure_aks",Oj="azure_functions",Nj="azure_app_service",Ij="gcp_compute_engine",Pj="gcp_cloud_run",Cj="gcp_kubernetes_engine",yj="gcp_cloud_functions",Mj="gcp_app_engine",eRe=dj,tRe=Ej,rRe=fj,nRe=Sj,oRe=Tj,sRe=mj,iRe=hj,aRe=gj,cRe=Aj,uRe=Rj,lRe=Oj,pRe=Nj,_Re=Ij,dRe=Pj,ERe=Cj,fRe=yj,SRe=Mj,TRe=Ge([dj,Ej,fj,Sj,Tj,mj,hj,gj,Aj,Rj,Oj,Nj,Ij,Pj,Cj,yj,Mj]),vj="ec2",bj="fargate",mRe=vj,hRe=bj,gRe=Ge([vj,bj]),Lj="amd64",Dj="arm32",xj="arm64",Uj="ia64",wj="ppc32",Vj="ppc64",Bj="x86",ARe=Lj,RRe=Dj,ORe=xj,NRe=Uj,IRe=wj,PRe=Vj,CRe=Bj,yRe=Ge([Lj,Dj,xj,Uj,wj,Vj,Bj]),Gj="windows",Hj="linux",kj="darwin",Fj="freebsd",qj="netbsd",jj="openbsd",Yj="dragonflybsd",$j="hpux",Kj="aix",Wj="solaris",Xj="z_os",MRe=Gj,vRe=Hj,bRe=kj,LRe=Fj,DRe=qj,xRe=jj,URe=Yj,wRe=$j,VRe=Kj,BRe=Wj,GRe=Xj,HRe=Ge([Gj,Hj,kj,Fj,qj,jj,Yj,$j,Kj,Wj,Xj]),zj="cpp",Qj="dotnet",Jj="erlang",Zj="go",eY="java",tY="nodejs",rY="php",nY="python",oY="ruby",sY="webjs",kRe=zj,FRe=Qj,qRe=Jj,jRe=Zj,YRe=eY,$Re=tY,KRe=rY,WRe=nY,XRe=oY,zRe=sY,QRe=Ge([zj,Qj,Jj,Zj,eY,tY,rY,nY,oY,sY])});var aY=w(()=>{iY()});var JRe,ZRe,eOe,tOe,rOe,nOe,oOe,sOe,iOe,aOe,cOe,uOe,lOe,pOe,_Oe,dOe,EOe,fOe,SOe,TOe,mOe,hOe,gOe,AOe,ROe,OOe,fg,NOe,Sg,IOe,Tg,mg,POe,hg,COe,yOe,MOe,vOe,bOe,LOe,DOe,xOe,OKe,NKe,gg,UOe,wOe,VOe,BOe,GOe,HOe,Hs,kOe,FOe,qOe,IKe,jOe,YOe,$Oe,KOe,PKe,WOe,XOe,zOe,QOe,Lo,Sn,JOe,ZOe,eNe,tNe,rNe,nNe,oNe,sNe,iNe,CKe,aNe,cNe,uNe,lNe,pNe,_Ne,dNe,ENe,fNe,SNe,TNe,mNe,hNe,yKe,MKe,gNe,ANe,RNe,ONe,NNe,INe,PNe,CNe,vKe,yNe,Ag,Rg,MNe,sr,vNe,Og,bNe,LNe,DNe,xNe,UNe,wNe,VNe,BNe,GNe,bKe,HNe,kNe,LKe,FNe,qNe,DKe,jNe,YNe,$Ne,KNe,WNe,XNe,zNe,QNe,ta,JNe,ZNe,eIe,tIe,cY=w(()=>{JRe="aspnetcore.diagnostics.exception.result",ZRe="aborted",eOe="handled",tOe="skipped",rOe="unhandled",nOe="aspnetcore.diagnostics.handler.type",oOe="aspnetcore.rate_limiting.policy",sOe="aspnetcore.rate_limiting.result",iOe="acquired",aOe="endpoint_limiter",cOe="global_limiter",uOe="request_canceled",lOe="aspnetcore.request.is_unhandled",pOe="aspnetcore.routing.is_fallback",_Oe="aspnetcore.routing.match_status",dOe="failure",EOe="success",fOe="aspnetcore.user.is_authenticated",SOe="client.address",TOe="client.port",mOe="code.column.number",hOe="code.file.path",gOe="code.function.name",AOe="code.line.number",ROe="code.stacktrace",OOe="db.collection.name",fg="db.namespace",NOe="db.operation.batch.size",Sg="db.operation.name",IOe="db.query.summary",Tg="db.query.text",mg="db.response.status_code",POe="db.stored_procedure.name",hg="db.system.name",COe="mariadb",yOe="microsoft.sql_server",MOe="mysql",vOe="postgresql",bOe="dotnet.gc.heap.generation",LOe="gen0",DOe="gen1",xOe="gen2",OKe="loh",NKe="poh",gg="error.type",UOe="_OTHER",wOe="exception.escaped",VOe="exception.message",BOe="exception.stacktrace",GOe="exception.type",HOe=t=>`http.request.header.${t}`,Hs="http.request.method",kOe="_OTHER",FOe="CONNECT",qOe="DELETE",IKe="GET",jOe="HEAD",YOe="OPTIONS",$Oe="PATCH",KOe="POST",PKe="PUT",WOe="TRACE",XOe="http.request.method_original",zOe="http.request.resend_count",QOe=t=>`http.response.header.${t}`,Lo="http.response.status_code",Sn="http.route",JOe="jvm.gc.action",ZOe="jvm.gc.name",eNe="jvm.memory.pool.name",tNe="jvm.memory.type",rNe="heap",nNe="non_heap",oNe="jvm.thread.daemon",sNe="jvm.thread.state",iNe="blocked",CKe="new",aNe="runnable",cNe="terminated",uNe="timed_waiting",lNe="waiting",pNe="network.local.address",_Ne="network.local.port",dNe="network.peer.address",ENe="network.peer.port",fNe="network.protocol.name",SNe="network.protocol.version",TNe="network.transport",mNe="pipe",hNe="quic",yKe="tcp",MKe="udp",gNe="unix",ANe="network.type",RNe="ipv4",ONe="ipv6",NNe="otel.scope.name",INe="otel.scope.version",PNe="otel.status_code",CNe="ERROR",vKe="OK",yNe="otel.status_description",Ag="server.address",Rg="server.port",MNe="service.instance.id",sr="service.name",vNe="service.namespace",Og="service.version",bNe="signalr.connection.status",LNe="app_shutdown",DNe="normal_closure",xNe="timeout",UNe="signalr.transport",wNe="long_polling",VNe="server_sent_events",BNe="web_sockets",GNe="telemetry.sdk.language",bKe="cpp",HNe="dotnet",kNe="erlang",LKe="go",FNe="java",qNe="nodejs",DKe="php",jNe="python",YNe="ruby",$Ne="rust",KNe="swift",WNe="webjs",XNe="telemetry.sdk.name",zNe="telemetry.sdk.version",QNe="url.fragment",ta="url.full",JNe="url.path",ZNe="url.query",eIe="url.scheme",tIe="user_agent.original"});var rIe,nIe,oIe,sIe,iIe,aIe,cIe,uIe,lIe,pIe,_Ie,dIe,EIe,fIe,SIe,TIe,mIe,hIe,gIe,AIe,RIe,OIe,NIe,IIe,PIe,CIe,yIe,MIe,vIe,bIe,LIe,DIe,xIe,UIe,wIe,VIe,BIe,GIe,HIe,kIe,FIe,qIe,jIe,YIe,$Ie,KIe,WIe,XIe,zIe,QIe,JIe,uY=w(()=>{rIe="aspnetcore.diagnostics.exceptions",nIe="aspnetcore.rate_limiting.active_request_leases",oIe="aspnetcore.rate_limiting.queued_requests",sIe="aspnetcore.rate_limiting.request.time_in_queue",iIe="aspnetcore.rate_limiting.request_lease.duration",aIe="aspnetcore.rate_limiting.requests",cIe="aspnetcore.routing.match_attempts",uIe="db.client.operation.duration",lIe="dotnet.assembly.count",pIe="dotnet.exceptions",_Ie="dotnet.gc.collections",dIe="dotnet.gc.heap.total_allocated",EIe="dotnet.gc.last_collection.heap.fragmentation.size",fIe="dotnet.gc.last_collection.heap.size",SIe="dotnet.gc.last_collection.memory.committed_size",TIe="dotnet.gc.pause.time",mIe="dotnet.jit.compilation.time",hIe="dotnet.jit.compiled_il.size",gIe="dotnet.jit.compiled_methods",AIe="dotnet.monitor.lock_contentions",RIe="dotnet.process.cpu.count",OIe="dotnet.process.cpu.time",NIe="dotnet.process.memory.working_set",IIe="dotnet.thread_pool.queue.length",PIe="dotnet.thread_pool.thread.count",CIe="dotnet.thread_pool.work_item.count",yIe="dotnet.timer.count",MIe="http.client.request.duration",vIe="http.server.request.duration",bIe="jvm.class.count",LIe="jvm.class.loaded",DIe="jvm.class.unloaded",xIe="jvm.cpu.count",UIe="jvm.cpu.recent_utilization",wIe="jvm.cpu.time",VIe="jvm.gc.duration",BIe="jvm.memory.committed",GIe="jvm.memory.limit",HIe="jvm.memory.used",kIe="jvm.memory.used_after_last_gc",FIe="jvm.thread.count",qIe="kestrel.active_connections",jIe="kestrel.active_tls_handshakes",YIe="kestrel.connection.duration",$Ie="kestrel.queued_connections",KIe="kestrel.queued_requests",WIe="kestrel.rejected_connections",XIe="kestrel.tls_handshake.duration",zIe="kestrel.upgraded_connections",QIe="signalr.server.active_connections",JIe="signalr.server.connection.duration"});var ZIe,lY=w(()=>{ZIe="exception"});var He={};Qf(He,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>ZRe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>eOe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>tOe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>rOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>iOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>aOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>cOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>uOe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>dOe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>EOe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>JRe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>nOe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>oOe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>sOe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>lOe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>pOe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>_Oe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>fOe,ATTR_CLIENT_ADDRESS:()=>SOe,ATTR_CLIENT_PORT:()=>TOe,ATTR_CODE_COLUMN_NUMBER:()=>mOe,ATTR_CODE_FILE_PATH:()=>hOe,ATTR_CODE_FUNCTION_NAME:()=>gOe,ATTR_CODE_LINE_NUMBER:()=>AOe,ATTR_CODE_STACKTRACE:()=>ROe,ATTR_DB_COLLECTION_NAME:()=>OOe,ATTR_DB_NAMESPACE:()=>fg,ATTR_DB_OPERATION_BATCH_SIZE:()=>NOe,ATTR_DB_OPERATION_NAME:()=>Sg,ATTR_DB_QUERY_SUMMARY:()=>IOe,ATTR_DB_QUERY_TEXT:()=>Tg,ATTR_DB_RESPONSE_STATUS_CODE:()=>mg,ATTR_DB_STORED_PROCEDURE_NAME:()=>POe,ATTR_DB_SYSTEM_NAME:()=>hg,ATTR_DOTNET_GC_HEAP_GENERATION:()=>bOe,ATTR_ERROR_TYPE:()=>gg,ATTR_EXCEPTION_ESCAPED:()=>wOe,ATTR_EXCEPTION_MESSAGE:()=>VOe,ATTR_EXCEPTION_STACKTRACE:()=>BOe,ATTR_EXCEPTION_TYPE:()=>GOe,ATTR_HTTP_REQUEST_HEADER:()=>HOe,ATTR_HTTP_REQUEST_METHOD:()=>Hs,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>XOe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>zOe,ATTR_HTTP_RESPONSE_HEADER:()=>QOe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Lo,ATTR_HTTP_ROUTE:()=>Sn,ATTR_JVM_GC_ACTION:()=>JOe,ATTR_JVM_GC_NAME:()=>ZOe,ATTR_JVM_MEMORY_POOL_NAME:()=>eNe,ATTR_JVM_MEMORY_TYPE:()=>tNe,ATTR_JVM_THREAD_DAEMON:()=>oNe,ATTR_JVM_THREAD_STATE:()=>sNe,ATTR_NETWORK_LOCAL_ADDRESS:()=>pNe,ATTR_NETWORK_LOCAL_PORT:()=>_Ne,ATTR_NETWORK_PEER_ADDRESS:()=>dNe,ATTR_NETWORK_PEER_PORT:()=>ENe,ATTR_NETWORK_PROTOCOL_NAME:()=>fNe,ATTR_NETWORK_PROTOCOL_VERSION:()=>SNe,ATTR_NETWORK_TRANSPORT:()=>TNe,ATTR_NETWORK_TYPE:()=>ANe,ATTR_OTEL_SCOPE_NAME:()=>NNe,ATTR_OTEL_SCOPE_VERSION:()=>INe,ATTR_OTEL_STATUS_CODE:()=>PNe,ATTR_OTEL_STATUS_DESCRIPTION:()=>yNe,ATTR_SERVER_ADDRESS:()=>Ag,ATTR_SERVER_PORT:()=>Rg,ATTR_SERVICE_INSTANCE_ID:()=>MNe,ATTR_SERVICE_NAME:()=>sr,ATTR_SERVICE_NAMESPACE:()=>vNe,ATTR_SERVICE_VERSION:()=>Og,ATTR_SIGNALR_CONNECTION_STATUS:()=>bNe,ATTR_SIGNALR_TRANSPORT:()=>UNe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>GNe,ATTR_TELEMETRY_SDK_NAME:()=>XNe,ATTR_TELEMETRY_SDK_VERSION:()=>zNe,ATTR_URL_FRAGMENT:()=>QNe,ATTR_URL_FULL:()=>ta,ATTR_URL_PATH:()=>JNe,ATTR_URL_QUERY:()=>ZNe,ATTR_URL_SCHEME:()=>eIe,ATTR_USER_AGENT_ORIGINAL:()=>tIe,AWSECSLAUNCHTYPEVALUES_EC2:()=>mRe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>hRe,AwsEcsLaunchtypeValues:()=>gRe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>eRe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>tRe,CLOUDPLATFORMVALUES_AWS_EC2:()=>rRe,CLOUDPLATFORMVALUES_AWS_ECS:()=>nRe,CLOUDPLATFORMVALUES_AWS_EKS:()=>oRe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>iRe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>sRe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>uRe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>pRe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>cRe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>lRe,CLOUDPLATFORMVALUES_AZURE_VM:()=>aRe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>SRe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>fRe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>dRe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>_Re,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ERe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>XAe,CLOUDPROVIDERVALUES_AWS:()=>zAe,CLOUDPROVIDERVALUES_AZURE:()=>QAe,CLOUDPROVIDERVALUES_GCP:()=>JAe,CloudPlatformValues:()=>TRe,CloudProviderValues:()=>ZAe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>xme,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Fme,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Ume,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>kme,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Vme,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>jme,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bme,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>wme,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>qme,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Hme,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>Gme,DBSYSTEMVALUES_ADABAS:()=>nme,DBSYSTEMVALUES_CACHE:()=>rme,DBSYSTEMVALUES_CASSANDRA:()=>gme,DBSYSTEMVALUES_CLOUDSCAPE:()=>WTe,DBSYSTEMVALUES_COCKROACHDB:()=>Lme,DBSYSTEMVALUES_COLDFUSION:()=>hme,DBSYSTEMVALUES_COSMOSDB:()=>Pme,DBSYSTEMVALUES_COUCHBASE:()=>Nme,DBSYSTEMVALUES_COUCHDB:()=>Ime,DBSYSTEMVALUES_DB2:()=>jTe,DBSYSTEMVALUES_DERBY:()=>sme,DBSYSTEMVALUES_DYNAMODB:()=>Cme,DBSYSTEMVALUES_EDB:()=>tme,DBSYSTEMVALUES_ELASTICSEARCH:()=>vme,DBSYSTEMVALUES_FILEMAKER:()=>ime,DBSYSTEMVALUES_FIREBIRD:()=>ome,DBSYSTEMVALUES_FIRSTSQL:()=>eme,DBSYSTEMVALUES_GEODE:()=>Mme,DBSYSTEMVALUES_H2:()=>mme,DBSYSTEMVALUES_HANADB:()=>JTe,DBSYSTEMVALUES_HBASE:()=>Ame,DBSYSTEMVALUES_HIVE:()=>KTe,DBSYSTEMVALUES_HSQLDB:()=>XTe,DBSYSTEMVALUES_INFORMIX:()=>ame,DBSYSTEMVALUES_INGRES:()=>ZTe,DBSYSTEMVALUES_INSTANTDB:()=>cme,DBSYSTEMVALUES_INTERBASE:()=>ume,DBSYSTEMVALUES_MARIADB:()=>lme,DBSYSTEMVALUES_MAXDB:()=>QTe,DBSYSTEMVALUES_MEMCACHED:()=>bme,DBSYSTEMVALUES_MONGODB:()=>Rme,DBSYSTEMVALUES_MSSQL:()=>kTe,DBSYSTEMVALUES_MYSQL:()=>FTe,DBSYSTEMVALUES_NEO4J:()=>yme,DBSYSTEMVALUES_NETEZZA:()=>pme,DBSYSTEMVALUES_ORACLE:()=>qTe,DBSYSTEMVALUES_OTHER_SQL:()=>HTe,DBSYSTEMVALUES_PERVASIVE:()=>_me,DBSYSTEMVALUES_POINTBASE:()=>dme,DBSYSTEMVALUES_POSTGRESQL:()=>YTe,DBSYSTEMVALUES_PROGRESS:()=>zTe,DBSYSTEMVALUES_REDIS:()=>Ome,DBSYSTEMVALUES_REDSHIFT:()=>$Te,DBSYSTEMVALUES_SQLITE:()=>Eme,DBSYSTEMVALUES_SYBASE:()=>fme,DBSYSTEMVALUES_TERADATA:()=>Sme,DBSYSTEMVALUES_VERTICA:()=>Tme,DB_SYSTEM_NAME_VALUE_MARIADB:()=>COe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>yOe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>MOe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>vOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>LOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>DOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>xOe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>OKe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>NKe,DbCassandraConsistencyLevelValues:()=>Yme,DbSystemValues:()=>Dme,ERROR_TYPE_VALUE_OTHER:()=>UOe,EVENT_EXCEPTION:()=>ZIe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>ehe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Zme,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Jme,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>rhe,FAASINVOKEDPROVIDERVALUES_AWS:()=>nhe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>ohe,FAASINVOKEDPROVIDERVALUES_GCP:()=>she,FAASTRIGGERVALUES_DATASOURCE:()=>$me,FAASTRIGGERVALUES_HTTP:()=>Kme,FAASTRIGGERVALUES_OTHER:()=>zme,FAASTRIGGERVALUES_PUBSUB:()=>Wme,FAASTRIGGERVALUES_TIMER:()=>Xme,FaasDocumentOperationValues:()=>the,FaasInvokedProviderValues:()=>ihe,FaasTriggerValues:()=>Qme,HOSTARCHVALUES_AMD64:()=>ARe,HOSTARCHVALUES_ARM32:()=>RRe,HOSTARCHVALUES_ARM64:()=>ORe,HOSTARCHVALUES_IA64:()=>NRe,HOSTARCHVALUES_PPC32:()=>IRe,HOSTARCHVALUES_PPC64:()=>PRe,HOSTARCHVALUES_X86:()=>CRe,HTTPFLAVORVALUES_HTTP_1_0:()=>qhe,HTTPFLAVORVALUES_HTTP_1_1:()=>jhe,HTTPFLAVORVALUES_HTTP_2_0:()=>Yhe,HTTPFLAVORVALUES_QUIC:()=>Khe,HTTPFLAVORVALUES_SPDY:()=>$he,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>FOe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>qOe,HTTP_REQUEST_METHOD_VALUE_GET:()=>IKe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>jOe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>YOe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>kOe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>$Oe,HTTP_REQUEST_METHOD_VALUE_POST:()=>KOe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>PKe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>WOe,HostArchValues:()=>yRe,HttpFlavorValues:()=>Whe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>rNe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>nNe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>iNe,JVM_THREAD_STATE_VALUE_NEW:()=>CKe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>aNe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>cNe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>uNe,JVM_THREAD_STATE_VALUE_WAITING:()=>lNe,MESSAGETYPEVALUES_RECEIVED:()=>gge,MESSAGETYPEVALUES_SENT:()=>hge,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Xhe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>zhe,MESSAGINGOPERATIONVALUES_PROCESS:()=>Zhe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Jhe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>rIe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>nIe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>oIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>aIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>iIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>sIe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>cIe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>uIe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>lIe,METRIC_DOTNET_EXCEPTIONS:()=>pIe,METRIC_DOTNET_GC_COLLECTIONS:()=>_Ie,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>dIe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>EIe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>fIe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>SIe,METRIC_DOTNET_GC_PAUSE_TIME:()=>TIe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>mIe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>hIe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>gIe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>AIe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>RIe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>OIe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>NIe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>IIe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>PIe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>CIe,METRIC_DOTNET_TIMER_COUNT:()=>yIe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>MIe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>vIe,METRIC_JVM_CLASS_COUNT:()=>bIe,METRIC_JVM_CLASS_LOADED:()=>LIe,METRIC_JVM_CLASS_UNLOADED:()=>DIe,METRIC_JVM_CPU_COUNT:()=>xIe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>UIe,METRIC_JVM_CPU_TIME:()=>wIe,METRIC_JVM_GC_DURATION:()=>VIe,METRIC_JVM_MEMORY_COMMITTED:()=>BIe,METRIC_JVM_MEMORY_LIMIT:()=>GIe,METRIC_JVM_MEMORY_USED:()=>HIe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>kIe,METRIC_JVM_THREAD_COUNT:()=>FIe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>qIe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>jIe,METRIC_KESTREL_CONNECTION_DURATION:()=>YIe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>$Ie,METRIC_KESTREL_QUEUED_REQUESTS:()=>KIe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>WIe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>XIe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>zIe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>QIe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>JIe,MessageTypeValues:()=>Age,MessagingDestinationKindValues:()=>Qhe,MessagingOperationValues:()=>ege,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Nhe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Che,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Rhe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>xhe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Ihe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Phe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Lhe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Ahe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>whe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>yhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>vhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Uhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Mhe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>bhe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bhe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Dhe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>khe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>Ghe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Hhe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Vhe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Ohe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>The,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>mhe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>hhe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>fhe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>She,NETTRANSPORTVALUES_INPROC:()=>_he,NETTRANSPORTVALUES_IP:()=>uhe,NETTRANSPORTVALUES_IP_TCP:()=>ahe,NETTRANSPORTVALUES_IP_UDP:()=>che,NETTRANSPORTVALUES_OTHER:()=>dhe,NETTRANSPORTVALUES_PIPE:()=>phe,NETTRANSPORTVALUES_UNIX:()=>lhe,NETWORK_TRANSPORT_VALUE_PIPE:()=>mNe,NETWORK_TRANSPORT_VALUE_QUIC:()=>hNe,NETWORK_TRANSPORT_VALUE_TCP:()=>yKe,NETWORK_TRANSPORT_VALUE_UDP:()=>MKe,NETWORK_TRANSPORT_VALUE_UNIX:()=>gNe,NETWORK_TYPE_VALUE_IPV4:()=>RNe,NETWORK_TYPE_VALUE_IPV6:()=>ONe,NetHostConnectionSubtypeValues:()=>Fhe,NetHostConnectionTypeValues:()=>ghe,NetTransportValues:()=>Ehe,OSTYPEVALUES_AIX:()=>VRe,OSTYPEVALUES_DARWIN:()=>bRe,OSTYPEVALUES_DRAGONFLYBSD:()=>URe,OSTYPEVALUES_FREEBSD:()=>LRe,OSTYPEVALUES_HPUX:()=>wRe,OSTYPEVALUES_LINUX:()=>vRe,OSTYPEVALUES_NETBSD:()=>DRe,OSTYPEVALUES_OPENBSD:()=>xRe,OSTYPEVALUES_SOLARIS:()=>BRe,OSTYPEVALUES_WINDOWS:()=>MRe,OSTYPEVALUES_Z_OS:()=>GRe,OTEL_STATUS_CODE_VALUE_ERROR:()=>CNe,OTEL_STATUS_CODE_VALUE_OK:()=>vKe,OsTypeValues:()=>HRe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>pge,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>age,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>rge,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Sge,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>sge,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>lge,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Ege,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>oge,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>ige,RPCGRPCSTATUSCODEVALUES_OK:()=>tge,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>_ge,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>cge,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>uge,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Tge,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>fge,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>dge,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>nge,RpcGrpcStatusCodeValues:()=>mge,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>QSe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>uTe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>WSe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>jSe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>aTe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>rTe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>eTe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>lTe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>JSe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>YSe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>zSe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>tTe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>XSe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>$Se,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>KSe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>cTe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>oTe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>sTe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>ZSe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>nTe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>qSe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>iTe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>vfe,SEMATTRS_CODE_FILEPATH:()=>bSe,SEMATTRS_CODE_FUNCTION:()=>MSe,SEMATTRS_CODE_LINENO:()=>LSe,SEMATTRS_CODE_NAMESPACE:()=>vSe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Gfe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>jfe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>qfe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>kfe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Vfe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Bfe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Ffe,SEMATTRS_DB_CASSANDRA_TABLE:()=>Hfe,SEMATTRS_DB_CONNECTION_STRING:()=>bfe,SEMATTRS_DB_HBASE_NAMESPACE:()=>Yfe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Dfe,SEMATTRS_DB_MONGODB_COLLECTION:()=>Kfe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>wfe,SEMATTRS_DB_NAME:()=>xfe,SEMATTRS_DB_OPERATION:()=>Ufe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$fe,SEMATTRS_DB_SQL_TABLE:()=>Wfe,SEMATTRS_DB_STATEMENT:()=>cg,SEMATTRS_DB_SYSTEM:()=>ag,SEMATTRS_DB_USER:()=>Lfe,SEMATTRS_ENDUSER_ID:()=>NSe,SEMATTRS_ENDUSER_ROLE:()=>ISe,SEMATTRS_ENDUSER_SCOPE:()=>PSe,SEMATTRS_EXCEPTION_ESCAPED:()=>Jfe,SEMATTRS_EXCEPTION_MESSAGE:()=>zfe,SEMATTRS_EXCEPTION_STACKTRACE:()=>Qfe,SEMATTRS_EXCEPTION_TYPE:()=>Xfe,SEMATTRS_FAAS_COLDSTART:()=>iSe,SEMATTRS_FAAS_CRON:()=>sSe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>eSe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>nSe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>tSe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>rSe,SEMATTRS_FAAS_EXECUTION:()=>Zfe,SEMATTRS_FAAS_INVOKED_NAME:()=>aSe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>cSe,SEMATTRS_FAAS_INVOKED_REGION:()=>uSe,SEMATTRS_FAAS_TIME:()=>oSe,SEMATTRS_FAAS_TRIGGER:()=>ug,SEMATTRS_HTTP_CLIENT_IP:()=>FSe,SEMATTRS_HTTP_FLAVOR:()=>USe,SEMATTRS_HTTP_HOST:()=>DSe,SEMATTRS_HTTP_METHOD:()=>Su,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>VSe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>BSe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>GSe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>HSe,SEMATTRS_HTTP_ROUTE:()=>Tu,SEMATTRS_HTTP_SCHEME:()=>xSe,SEMATTRS_HTTP_SERVER_NAME:()=>kSe,SEMATTRS_HTTP_STATUS_CODE:()=>Pd,SEMATTRS_HTTP_TARGET:()=>lg,SEMATTRS_HTTP_URL:()=>ea,SEMATTRS_HTTP_USER_AGENT:()=>wSe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>VTe,SEMATTRS_MESSAGE_ID:()=>wTe,SEMATTRS_MESSAGE_TYPE:()=>UTe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>BTe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>RTe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>mTe,SEMATTRS_MESSAGING_DESTINATION:()=>pTe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>_Te,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>PTe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>ITe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>NTe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>CTe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>yTe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>TTe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>gTe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>hTe,SEMATTRS_MESSAGING_OPERATION:()=>ATe,SEMATTRS_MESSAGING_PROTOCOL:()=>ETe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>fTe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>OTe,SEMATTRS_MESSAGING_SYSTEM:()=>pg,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>dTe,SEMATTRS_MESSAGING_URL:()=>STe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>RSe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>gSe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>ASe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>hSe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>mSe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>TSe,SEMATTRS_NET_HOST_IP:()=>ESe,SEMATTRS_NET_HOST_NAME:()=>SSe,SEMATTRS_NET_HOST_PORT:()=>fSe,SEMATTRS_NET_PEER_IP:()=>pSe,SEMATTRS_NET_PEER_NAME:()=>dSe,SEMATTRS_NET_PEER_PORT:()=>_Se,SEMATTRS_NET_TRANSPORT:()=>lSe,SEMATTRS_PEER_SERVICE:()=>OSe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dg,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>DTe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>xTe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>LTe,SEMATTRS_RPC_JSONRPC_VERSION:()=>bTe,SEMATTRS_RPC_METHOD:()=>vTe,SEMATTRS_RPC_SERVICE:()=>_g,SEMATTRS_RPC_SYSTEM:()=>MTe,SEMATTRS_THREAD_ID:()=>CSe,SEMATTRS_THREAD_NAME:()=>ySe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>yge,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Cge,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Mge,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>vge,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>bge,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Lge,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Dge,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Uge,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>xge,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Vge,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>wge,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Oge,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Ige,SEMRESATTRS_CLOUD_PLATFORM:()=>Pge,SEMRESATTRS_CLOUD_PROVIDER:()=>Rge,SEMRESATTRS_CLOUD_REGION:()=>Nge,SEMRESATTRS_CONTAINER_ID:()=>Gge,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>kge,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Fge,SEMRESATTRS_CONTAINER_NAME:()=>Bge,SEMRESATTRS_CONTAINER_RUNTIME:()=>Hge,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>qge,SEMRESATTRS_DEVICE_ID:()=>jge,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Yge,SEMRESATTRS_DEVICE_MODEL_NAME:()=>$ge,SEMRESATTRS_FAAS_ID:()=>Wge,SEMRESATTRS_FAAS_INSTANCE:()=>zge,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Qge,SEMRESATTRS_FAAS_NAME:()=>Kge,SEMRESATTRS_FAAS_VERSION:()=>Xge,SEMRESATTRS_HOST_ARCH:()=>tAe,SEMRESATTRS_HOST_ID:()=>Jge,SEMRESATTRS_HOST_IMAGE_ID:()=>nAe,SEMRESATTRS_HOST_IMAGE_NAME:()=>rAe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>oAe,SEMRESATTRS_HOST_NAME:()=>Zge,SEMRESATTRS_HOST_TYPE:()=>eAe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>sAe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>pAe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>OAe,SEMRESATTRS_K8S_CRONJOB_UID:()=>RAe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>hAe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>mAe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>fAe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>EAe,SEMRESATTRS_K8S_JOB_NAME:()=>AAe,SEMRESATTRS_K8S_JOB_UID:()=>gAe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>cAe,SEMRESATTRS_K8S_NODE_NAME:()=>iAe,SEMRESATTRS_K8S_NODE_UID:()=>aAe,SEMRESATTRS_K8S_POD_NAME:()=>lAe,SEMRESATTRS_K8S_POD_UID:()=>uAe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>dAe,SEMRESATTRS_K8S_REPLICASET_UID:()=>_Ae,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>TAe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>SAe,SEMRESATTRS_OS_DESCRIPTION:()=>IAe,SEMRESATTRS_OS_NAME:()=>PAe,SEMRESATTRS_OS_TYPE:()=>NAe,SEMRESATTRS_OS_VERSION:()=>CAe,SEMRESATTRS_PROCESS_COMMAND:()=>bAe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>DAe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>LAe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>MAe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>vAe,SEMRESATTRS_PROCESS_OWNER:()=>xAe,SEMRESATTRS_PROCESS_PID:()=>yAe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>VAe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>UAe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>wAe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>GAe,SEMRESATTRS_SERVICE_NAME:()=>BAe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Eg,SEMRESATTRS_SERVICE_VERSION:()=>HAe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>jAe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>FAe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>kAe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>qAe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>KAe,SEMRESATTRS_WEBENGINE_NAME:()=>YAe,SEMRESATTRS_WEBENGINE_VERSION:()=>$Ae,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>LNe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>DNe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>xNe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>wNe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>VNe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>BNe,SemanticAttributes:()=>GTe,SemanticResourceAttributes:()=>WAe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>kRe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>FRe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>qRe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>jRe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>YRe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>$Re,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>KRe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>WRe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>XRe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zRe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>bKe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>HNe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>kNe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>LKe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>FNe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>qNe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>DKe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>jNe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>YNe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>$Ne,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>KNe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>WNe,TelemetrySdkLanguageValues:()=>QRe});var ue=w(()=>{UF();aY();cY();uY();lY()});var pY=E(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.ExceptionEventName=void 0;Cd.ExceptionEventName="exception"});var Ig=E(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.Span=void 0;var Ar=(M(),P(U)),gt=re(),ks=(_r(),P(pr)),ePe=pY(),Ng=class{constructor(e,r,n,o,s,i,a=[],c,u,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ar.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=o,this.parentSpanId=i,this.kind=s,this.links=a;let p=Date.now();this._performanceStartTime=gt.otperformance.now(),this._performanceOffset=p-(this._performanceStartTime+(0,gt.getTimeOrigin)()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(Ar.diag.warn(`Invalid attribute key: ${e}`),this):(0,gt.isAttributeValue)(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(Ar.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Ar.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&Ar.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,gt.isTimeInput)(r)&&((0,gt.isTimeInput)(n)||(n=r),r=void 0);let o=(0,gt.sanitizeAttributes)(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status=Object.assign({},e),this.status.message!=null&&typeof e.message!="string"&&(Ar.diag.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){Ar.diag.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=(0,gt.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Ar.diag.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&&Ar.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=gt.otperformance.now())return(0,gt.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,gt.millisToHrTime)(e);if(e instanceof Date)return(0,gt.millisToHrTime)(e.getTime());if((0,gt.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,gt.millisToHrTime)(Date.now());let r=gt.otperformance.now()-this._performanceStartTime;return(0,gt.addHrTimes)(this.startTime,(0,gt.millisToHrTime)(r))}isRecording(){return this._ended===!1}recordException(e,r){let n={};typeof e=="string"?n[ks.SEMATTRS_EXCEPTION_MESSAGE]=e:e&&(e.code?n[ks.SEMATTRS_EXCEPTION_TYPE]=e.code.toString():e.name&&(n[ks.SEMATTRS_EXCEPTION_TYPE]=e.name),e.message&&(n[ks.SEMATTRS_EXCEPTION_MESSAGE]=e.message),e.stack&&(n[ks.SEMATTRS_EXCEPTION_STACKTRACE]=e.stack)),n[ks.SEMATTRS_EXCEPTION_TYPE]||n[ks.SEMATTRS_EXCEPTION_MESSAGE]?this.addEvent(ePe.ExceptionEventName,n,r):Ar.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&Ar.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){let r=this._attributeValueLengthLimit;return r<=0?(Ar.diag.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):e}};yd.Span=Ng});var hu=E(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.SamplingDecision=void 0;var tPe;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(tPe=mu.SamplingDecision||(mu.SamplingDecision={}))});var vd=E(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.AlwaysOffSampler=void 0;var rPe=hu(),Pg=class{shouldSample(){return{decision:rPe.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Md.AlwaysOffSampler=Pg});var Ld=E(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.AlwaysOnSampler=void 0;var nPe=hu(),Cg=class{shouldSample(){return{decision:nPe.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};bd.AlwaysOnSampler=Cg});var vg=E(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.ParentBasedSampler=void 0;var Dd=(M(),P(U)),oPe=re(),_Y=vd(),yg=Ld(),Mg=class{constructor(e){var r,n,o,s;this._root=e.root,this._root||((0,oPe.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yg.AlwaysOnSampler),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new yg.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new _Y.AlwaysOffSampler,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new yg.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _Y.AlwaysOffSampler}shouldSample(e,r,n,o,s,i){let a=Dd.trace.getSpanContext(e);return!a||!(0,Dd.isSpanContextValid)(a)?this._root.shouldSample(e,r,n,o,s,i):a.isRemote?a.traceFlags&Dd.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,i):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,i):a.traceFlags&Dd.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,i):this._localParentNotSampled.shouldSample(e,r,n,o,s,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};xd.ParentBasedSampler=Mg});var Lg=E(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.TraceIdRatioBasedSampler=void 0;var sPe=(M(),P(U)),dY=hu(),bg=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,sPe.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?dY.SamplingDecision.RECORD_AND_SAMPLED:dY.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,s=parseInt(e.slice(o,o+8),16);r=(r^s)>>>0}return r}};Ud.TraceIdRatioBasedSampler=bg});var Ug=E(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.buildSamplerFromEnv=na.loadDefaultConfig=void 0;var wd=(M(),P(U)),kn=re(),EY=vd(),Dg=Ld(),xg=vg(),fY=Lg(),iPe=kn.TracesSamplerValues.AlwaysOn,ra=1;function aPe(){let t=(0,kn.getEnv)();return{sampler:TY(t),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},mergeResourceWithDefaults:!0}}na.loadDefaultConfig=aPe;function TY(t=(0,kn.getEnv)()){switch(t.OTEL_TRACES_SAMPLER){case kn.TracesSamplerValues.AlwaysOn:return new Dg.AlwaysOnSampler;case kn.TracesSamplerValues.AlwaysOff:return new EY.AlwaysOffSampler;case kn.TracesSamplerValues.ParentBasedAlwaysOn:return new xg.ParentBasedSampler({root:new Dg.AlwaysOnSampler});case kn.TracesSamplerValues.ParentBasedAlwaysOff:return new xg.ParentBasedSampler({root:new EY.AlwaysOffSampler});case kn.TracesSamplerValues.TraceIdRatio:return new fY.TraceIdRatioBasedSampler(SY(t));case kn.TracesSamplerValues.ParentBasedTraceIdRatio:return new xg.ParentBasedSampler({root:new fY.TraceIdRatioBasedSampler(SY(t))});default:return wd.diag.error(`OTEL_TRACES_SAMPLER value "${t.OTEL_TRACES_SAMPLER} invalid, defaulting to ${iPe}".`),new Dg.AlwaysOnSampler}}na.buildSamplerFromEnv=TY;function SY(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return wd.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ra}.`),ra;let e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(wd.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ra}.`),ra):e<0||e>1?(wd.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${ra}.`),ra):e}});var Vg=E(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.reconfigureLimits=oa.mergeConfig=void 0;var mY=Ug(),wg=re();function cPe(t){let e={sampler:(0,mY.buildSamplerFromEnv)()},r=(0,mY.loadDefaultConfig)(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}oa.mergeConfig=cPe;function uPe(t){var e,r,n,o,s,i,a,c,u,l,p,_;let d=Object.assign({},t.spanLimits),S=(0,wg.getEnvWithoutDefaults)();return d.attributeCountLimit=(i=(s=(o=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:wg.DEFAULT_ATTRIBUTE_COUNT_LIMIT,d.attributeValueLengthLimit=(_=(p=(l=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(u=t.generalLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&l!==void 0?l:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wg.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},t,{spanLimits:d})}oa.reconfigureLimits=uPe});var hY=E(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.BatchSpanProcessorBase=void 0;var sa=(M(),P(U)),Fs=re(),Bg=class{constructor(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let n=(0,Fs.getEnv)();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Fs.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(sa.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&sa.TraceFlags.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&sa.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(sa.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{let n=[],o=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,i=o;s<i;s++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{let n=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);sa.context.with((0,Fs.suppressTracing)(sa.context.active()),()=>{let o;this._finishedSpans.length<=this._maxExportBatchSize?(o=this._finishedSpans,this._finishedSpans=[]):o=this._finishedSpans.splice(0,this._maxExportBatchSize);let s=()=>this._exporter.export(o,a=>{var c;clearTimeout(n),a.code===Fs.ExportResultCode.SUCCESS?e():r((c=a.error)!==null&&c!==void 0?c:new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let a=0,c=o.length;a<c;a++){let u=o[a];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(i??(i=[]),i.push(u.resource.waitForAsyncAttributes()))}i===null?s():Promise.all(i).then(s,a=>{(0,Fs.globalErrorHandler)(a),r(a)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{this._isExporting=!1,(0,Fs.globalErrorHandler)(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),(0,Fs.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Vd.BatchSpanProcessorBase=Bg});var gY=E(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.BatchSpanProcessor=void 0;var lPe=hY(),Gg=class extends lPe.BatchSpanProcessorBase{onShutdown(){}};Bd.BatchSpanProcessor=Gg});var OY=E(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.RandomIdGenerator=void 0;var pPe=8,RY=16,Hg=class{constructor(){this.generateTraceId=AY(RY),this.generateSpanId=AY(pPe)}};Hd.RandomIdGenerator=Hg;var Gd=Buffer.allocUnsafe(RY);function AY(t){return function(){for(let r=0;r<t/4;r++)Gd.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(Gd[r]>0);r++)r===t-1&&(Gd[t-1]=1);return Gd.toString("hex",0,t)}}});var NY=E(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.RandomIdGenerator=ia.BatchSpanProcessor=void 0;var _Pe=gY();Object.defineProperty(ia,"BatchSpanProcessor",{enumerable:!0,get:function(){return _Pe.BatchSpanProcessor}});var dPe=OY();Object.defineProperty(ia,"RandomIdGenerator",{enumerable:!0,get:function(){return dPe.RandomIdGenerator}})});var kd=E(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.RandomIdGenerator=aa.BatchSpanProcessor=void 0;var IY=NY();Object.defineProperty(aa,"BatchSpanProcessor",{enumerable:!0,get:function(){return IY.BatchSpanProcessor}});Object.defineProperty(aa,"RandomIdGenerator",{enumerable:!0,get:function(){return IY.RandomIdGenerator}})});var Fg=E(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.Tracer=void 0;var ut=(M(),P(U)),Fd=re(),EPe=Ig(),fPe=Vg(),SPe=kd(),kg=class{constructor(e,r,n){this._tracerProvider=n;let o=(0,fPe.mergeConfig)(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new SPe.RandomIdGenerator,this.resource=n.resource,this.instrumentationLibrary=e}startSpan(e,r={},n=ut.context.active()){var o,s,i;r.root&&(n=ut.trace.deleteSpan(n));let a=ut.trace.getSpan(n);if((0,Fd.isTracingSuppressed)(n))return ut.diag.debug("Instrumentation suppressed, returning Noop Span"),ut.trace.wrapSpanContext(ut.INVALID_SPAN_CONTEXT);let c=a?.spanContext(),u=this._idGenerator.generateSpanId(),l,p,_;!c||!ut.trace.isSpanContextValid(c)?l=this._idGenerator.generateTraceId():(l=c.traceId,p=c.traceState,_=c.spanId);let d=(o=r.kind)!==null&&o!==void 0?o:ut.SpanKind.INTERNAL,S=((s=r.links)!==null&&s!==void 0?s:[]).map(O=>({context:O.context,attributes:(0,Fd.sanitizeAttributes)(O.attributes)})),f=(0,Fd.sanitizeAttributes)(r.attributes),T=this._sampler.shouldSample(n,l,e,d,f,S);p=(i=T.traceState)!==null&&i!==void 0?i:p;let h=T.decision===ut.SamplingDecision.RECORD_AND_SAMPLED?ut.TraceFlags.SAMPLED:ut.TraceFlags.NONE,A={traceId:l,spanId:u,traceFlags:h,traceState:p};if(T.decision===ut.SamplingDecision.NOT_RECORD)return ut.diag.debug("Recording is off, propagating context in a non-recording span"),ut.trace.wrapSpanContext(A);let N=(0,Fd.sanitizeAttributes)(Object.assign(f,T.attributes));return new EPe.Span(this,n,e,A,d,_,S,r.startTime,void 0,N)}startActiveSpan(e,r,n,o){let s,i,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);let c=i??ut.context.active(),u=this.startSpan(e,s,c),l=ut.trace.setSpan(c,u);return ut.context.with(l,a,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};qd.Tracer=kg});var PY=E(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.defaultServiceName=void 0;function TPe(){return`unknown_service:${process.argv0}`}jd.defaultServiceName=TPe});var CY=E(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.defaultServiceName=void 0;var mPe=PY();Object.defineProperty(Yd,"defaultServiceName",{enumerable:!0,get:function(){return mPe.defaultServiceName}})});var qg=E($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.defaultServiceName=void 0;var hPe=CY();Object.defineProperty($d,"defaultServiceName",{enumerable:!0,get:function(){return hPe.defaultServiceName}})});var Fn=E(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.Resource=void 0;var yY=(M(),P(U)),qs=(_r(),P(pr)),jg=re(),gPe=qg(),gu=class t{constructor(e,r){var n;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(n=this._attributes)!==null&&n!==void 0?n:{},this._asyncAttributesPromise=r?.then(o=>(this._attributes=Object.assign({},this._attributes,o),this.asyncAttributesPending=!1,o),o=>(yY.diag.debug("a resource's async attributes promise rejected: %s",o),this.asyncAttributesPending=!1,{}))}static empty(){return t.EMPTY}static default(){return new t({[qs.SEMRESATTRS_SERVICE_NAME]:(0,gPe.defaultServiceName)(),[qs.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE],[qs.SEMRESATTRS_TELEMETRY_SDK_NAME]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_NAME],[qs.SEMRESATTRS_TELEMETRY_SDK_VERSION]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_VERSION]})}get attributes(){var e;return this.asyncAttributesPending&&yY.diag.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(e){var r;if(!e)return this;let n=Object.assign(Object.assign({},this._syncAttributes),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(n);let o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([s,i])=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),s),(a=e._syncAttributes)!==null&&a!==void 0?a:e.attributes),i)});return new t(n,o)}};Kd.Resource=gu;gu.EMPTY=new gu({})});var Yg=E(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.normalizeType=ca.normalizeArch=void 0;var APe=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};ca.normalizeArch=APe;var RPe=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};ca.normalizeType=RPe});var Xd=E(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.execAsync=void 0;var OPe=require("child_process"),NPe=require("util");Wd.execAsync=NPe.promisify(OPe.exec)});var MY=E(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.getMachineId=void 0;var IPe=Xd(),PPe=(M(),P(U));async function CPe(){try{let e=(await(0,IPe.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
7
|
-
`).find(n=>n.includes("IOPlatformUUID"));if(!e)return"";let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){PPe.diag.debug(`error reading machine id: ${t}`)}return""}zd.getMachineId=CPe});var vY=E(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.getMachineId=void 0;var yPe=require("fs"),MPe=(M(),P(U));async function vPe(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await yPe.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){MPe.diag.debug(`error reading machine id: ${r}`)}return""}Qd.getMachineId=vPe});var LY=E(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.getMachineId=void 0;var bPe=require("fs"),LPe=Xd(),bY=(M(),P(U));async function DPe(){try{return(await bPe.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){bY.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,LPe.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){bY.diag.debug(`error reading machine id: ${t}`)}return""}Jd.getMachineId=DPe});var xY=E(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.getMachineId=void 0;var DY=require("process"),xPe=Xd(),UPe=(M(),P(U));async function wPe(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";DY.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in DY.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let n=(await(0,xPe.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(n.length===2)return n[1].trim()}catch(r){UPe.diag.debug(`error reading machine id: ${r}`)}return""}Zd.getMachineId=wPe});var UY=E(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.getMachineId=void 0;var VPe=(M(),P(U));async function BPe(){return VPe.diag.debug("could not read machine-id: unsupported platform"),""}eE.getMachineId=BPe});var wY=E(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.getMachineId=void 0;var GPe=require("process"),ua;qn.getMachineId=ua;switch(GPe.platform){case"darwin":qn.getMachineId=ua=MY().getMachineId;break;case"linux":qn.getMachineId=ua=vY().getMachineId;break;case"freebsd":qn.getMachineId=ua=LY().getMachineId;break;case"win32":qn.getMachineId=ua=xY().getMachineId;break;default:qn.getMachineId=ua=UY().getMachineId}});var Wg=E(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.hostDetectorSync=void 0;var $g=(_r(),P(pr)),HPe=Fn(),VY=require("os"),kPe=Yg(),FPe=wY(),Kg=class{detect(e){let r={[$g.SEMRESATTRS_HOST_NAME]:(0,VY.hostname)(),[$g.SEMRESATTRS_HOST_ARCH]:(0,kPe.normalizeArch)((0,VY.arch)())};return new HPe.Resource(r,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,FPe.getMachineId)().then(e=>{let r={};return e&&(r[$g.SEMRESATTRS_HOST_ID]=e),r})}};tE.hostDetectorSync=new Kg});var BY=E(rE=>{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.hostDetector=void 0;var qPe=Wg(),Xg=class{detect(e){return Promise.resolve(qPe.hostDetectorSync.detect(e))}};rE.hostDetector=new Xg});var Qg=E(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.osDetectorSync=void 0;var GY=(_r(),P(pr)),jPe=Fn(),HY=require("os"),YPe=Yg(),zg=class{detect(e){let r={[GY.SEMRESATTRS_OS_TYPE]:(0,YPe.normalizeType)((0,HY.platform)()),[GY.SEMRESATTRS_OS_VERSION]:(0,HY.release)()};return new jPe.Resource(r)}};nE.osDetectorSync=new zg});var kY=E(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.osDetector=void 0;var $Pe=Qg(),Jg=class{detect(e){return Promise.resolve($Pe.osDetectorSync.detect(e))}};oE.osDetector=new Jg});var eA=E(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.processDetectorSync=void 0;var KPe=(M(),P(U)),jn=(_r(),P(pr)),WPe=Fn(),XPe=require("os"),Zg=class{detect(e){let r={[jn.SEMRESATTRS_PROCESS_PID]:process.pid,[jn.SEMRESATTRS_PROCESS_EXECUTABLE_NAME]:process.title,[jn.SEMRESATTRS_PROCESS_EXECUTABLE_PATH]:process.execPath,[jn.SEMRESATTRS_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[jn.SEMRESATTRS_PROCESS_RUNTIME_VERSION]:process.versions.node,[jn.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"nodejs",[jn.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[jn.SEMRESATTRS_PROCESS_COMMAND]=process.argv[1]);try{let n=XPe.userInfo();r[jn.SEMRESATTRS_PROCESS_OWNER]=n.username}catch(n){KPe.diag.debug(`error obtaining process owner: ${n}`)}return new WPe.Resource(r)}};sE.processDetectorSync=new Zg});var FY=E(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.processDetector=void 0;var zPe=eA(),tA=class{detect(e){return Promise.resolve(zPe.processDetectorSync.detect(e))}};iE.processDetector=new tA});var qY=E(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.serviceInstanceIdDetectorSync=void 0;var QPe=(_r(),P(pr)),JPe=Fn(),ZPe=require("crypto"),rA=class{detect(e){let r={[QPe.SEMRESATTRS_SERVICE_INSTANCE_ID]:(0,ZPe.randomUUID)()};return new JPe.Resource(r)}};aE.serviceInstanceIdDetectorSync=new rA});var jY=E(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.serviceInstanceIdDetectorSync=At.processDetectorSync=At.processDetector=At.osDetectorSync=At.osDetector=At.hostDetectorSync=At.hostDetector=void 0;var eCe=BY();Object.defineProperty(At,"hostDetector",{enumerable:!0,get:function(){return eCe.hostDetector}});var tCe=Wg();Object.defineProperty(At,"hostDetectorSync",{enumerable:!0,get:function(){return tCe.hostDetectorSync}});var rCe=kY();Object.defineProperty(At,"osDetector",{enumerable:!0,get:function(){return rCe.osDetector}});var nCe=Qg();Object.defineProperty(At,"osDetectorSync",{enumerable:!0,get:function(){return nCe.osDetectorSync}});var oCe=FY();Object.defineProperty(At,"processDetector",{enumerable:!0,get:function(){return oCe.processDetector}});var sCe=eA();Object.defineProperty(At,"processDetectorSync",{enumerable:!0,get:function(){return sCe.processDetectorSync}});var iCe=qY();Object.defineProperty(At,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return iCe.serviceInstanceIdDetectorSync}})});var YY=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.serviceInstanceIdDetectorSync=Rt.processDetectorSync=Rt.processDetector=Rt.osDetectorSync=Rt.osDetector=Rt.hostDetectorSync=Rt.hostDetector=void 0;var js=jY();Object.defineProperty(Rt,"hostDetector",{enumerable:!0,get:function(){return js.hostDetector}});Object.defineProperty(Rt,"hostDetectorSync",{enumerable:!0,get:function(){return js.hostDetectorSync}});Object.defineProperty(Rt,"osDetector",{enumerable:!0,get:function(){return js.osDetector}});Object.defineProperty(Rt,"osDetectorSync",{enumerable:!0,get:function(){return js.osDetectorSync}});Object.defineProperty(Rt,"processDetector",{enumerable:!0,get:function(){return js.processDetector}});Object.defineProperty(Rt,"processDetectorSync",{enumerable:!0,get:function(){return js.processDetectorSync}});Object.defineProperty(Rt,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return js.serviceInstanceIdDetectorSync}})});var sA=E(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.browserDetectorSync=void 0;var cE=(_r(),P(pr)),aCe=(M(),P(U)),nA=Fn(),oA=class{detect(e){var r,n,o;if(!(typeof navigator<"u"&&((n=(r=global.process)===null||r===void 0?void 0:r.versions)===null||n===void 0?void 0:n.node)===void 0&&((o=global.Bun)===null||o===void 0?void 0:o.version)===void 0))return nA.Resource.empty();let i={[cE.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"browser",[cE.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[cE.SEMRESATTRS_PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(i,e)}_getResourceAttributes(e,r){return e[cE.SEMRESATTRS_PROCESS_RUNTIME_VERSION]===""?(aCe.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),nA.Resource.empty()):new nA.Resource(Object.assign({},e))}};uE.browserDetectorSync=new oA});var $Y=E(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.browserDetector=void 0;var cCe=sA(),iA=class{detect(e){return Promise.resolve(cCe.browserDetectorSync.detect(e))}};lE.browserDetector=new iA});var cA=E(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.envDetectorSync=void 0;var uCe=(M(),P(U)),lCe=re(),pCe=(_r(),P(pr)),_Ce=Fn(),aA=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(e){let r={},n=(0,lCe.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,s=n.OTEL_SERVICE_NAME;if(o)try{let i=this._parseResourceAttributes(o);Object.assign(r,i)}catch(i){uCe.diag.debug(`EnvDetector failed: ${i.message}`)}return s&&(r[pCe.SEMRESATTRS_SERVICE_NAME]=s),new _Ce.Resource(r)}_parseResourceAttributes(e){if(!e)return{};let r={},n=e.split(this._COMMA_SEPARATOR,-1);for(let o of n){let s=o.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length!==2)continue;let[i,a]=s;if(i=i.trim(),a=a.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(i))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(a))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);r[i]=decodeURIComponent(a)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};pE.envDetectorSync=new aA});var KY=E(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.envDetector=void 0;var dCe=cA(),uA=class{detect(e){return Promise.resolve(dCe.envDetectorSync.detect(e))}};_E.envDetector=new uA});var WY=E(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.envDetectorSync=ge.browserDetectorSync=ge.envDetector=ge.browserDetector=ge.serviceInstanceIdDetectorSync=ge.processDetectorSync=ge.processDetector=ge.osDetectorSync=ge.osDetector=ge.hostDetectorSync=ge.hostDetector=void 0;var Ys=YY();Object.defineProperty(ge,"hostDetector",{enumerable:!0,get:function(){return Ys.hostDetector}});Object.defineProperty(ge,"hostDetectorSync",{enumerable:!0,get:function(){return Ys.hostDetectorSync}});Object.defineProperty(ge,"osDetector",{enumerable:!0,get:function(){return Ys.osDetector}});Object.defineProperty(ge,"osDetectorSync",{enumerable:!0,get:function(){return Ys.osDetectorSync}});Object.defineProperty(ge,"processDetector",{enumerable:!0,get:function(){return Ys.processDetector}});Object.defineProperty(ge,"processDetectorSync",{enumerable:!0,get:function(){return Ys.processDetectorSync}});Object.defineProperty(ge,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return Ys.serviceInstanceIdDetectorSync}});var ECe=$Y();Object.defineProperty(ge,"browserDetector",{enumerable:!0,get:function(){return ECe.browserDetector}});var fCe=KY();Object.defineProperty(ge,"envDetector",{enumerable:!0,get:function(){return fCe.envDetector}});var SCe=sA();Object.defineProperty(ge,"browserDetectorSync",{enumerable:!0,get:function(){return SCe.browserDetectorSync}});var TCe=cA();Object.defineProperty(ge,"envDetectorSync",{enumerable:!0,get:function(){return TCe.envDetectorSync}})});var XY=E(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.isPromiseLike=void 0;var mCe=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";dE.isPromiseLike=mCe});var QY=E(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.detectResourcesSync=pa.detectResources=void 0;var Au=Fn(),la=(M(),P(U)),hCe=XY(),gCe=async(t={})=>{let e=await Promise.all((t.detectors||[]).map(async r=>{try{let n=await r.detect(t);return la.diag.debug(`${r.constructor.name} found resource.`,n),n}catch(n){return la.diag.debug(`${r.constructor.name} failed: ${n.message}`),Au.Resource.empty()}}));return zY(e),e.reduce((r,n)=>r.merge(n),Au.Resource.empty())};pa.detectResources=gCe;var ACe=(t={})=>{var e;let r=((e=t.detectors)!==null&&e!==void 0?e:[]).map(o=>{try{let s=o.detect(t),i;if((0,hCe.isPromiseLike)(s)){let a=async()=>{var c;let u=await s;return await((c=u.waitForAsyncAttributes)===null||c===void 0?void 0:c.call(u)),u.attributes};i=new Au.Resource({},a())}else i=s;return i.waitForAsyncAttributes?i.waitForAsyncAttributes().then(()=>la.diag.debug(`${o.constructor.name} found resource.`,i)):la.diag.debug(`${o.constructor.name} found resource.`,i),i}catch(s){return la.diag.error(`${o.constructor.name} failed: ${s.message}`),Au.Resource.empty()}}),n=r.reduce((o,s)=>o.merge(s),Au.Resource.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(()=>{zY(r)}),n};pa.detectResourcesSync=ACe;var zY=t=>{t.forEach(e=>{if(Object.keys(e.attributes).length>0){let r=JSON.stringify(e.attributes,null,4);la.diag.verbose(r)}})}});var lA=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.detectResources=ne.detectResourcesSync=ne.serviceInstanceIdDetectorSync=ne.processDetectorSync=ne.processDetector=ne.osDetectorSync=ne.osDetector=ne.hostDetectorSync=ne.hostDetector=ne.envDetectorSync=ne.envDetector=ne.browserDetectorSync=ne.browserDetector=ne.defaultServiceName=ne.Resource=void 0;var RCe=Fn();Object.defineProperty(ne,"Resource",{enumerable:!0,get:function(){return RCe.Resource}});var OCe=qg();Object.defineProperty(ne,"defaultServiceName",{enumerable:!0,get:function(){return OCe.defaultServiceName}});var Yr=WY();Object.defineProperty(ne,"browserDetector",{enumerable:!0,get:function(){return Yr.browserDetector}});Object.defineProperty(ne,"browserDetectorSync",{enumerable:!0,get:function(){return Yr.browserDetectorSync}});Object.defineProperty(ne,"envDetector",{enumerable:!0,get:function(){return Yr.envDetector}});Object.defineProperty(ne,"envDetectorSync",{enumerable:!0,get:function(){return Yr.envDetectorSync}});Object.defineProperty(ne,"hostDetector",{enumerable:!0,get:function(){return Yr.hostDetector}});Object.defineProperty(ne,"hostDetectorSync",{enumerable:!0,get:function(){return Yr.hostDetectorSync}});Object.defineProperty(ne,"osDetector",{enumerable:!0,get:function(){return Yr.osDetector}});Object.defineProperty(ne,"osDetectorSync",{enumerable:!0,get:function(){return Yr.osDetectorSync}});Object.defineProperty(ne,"processDetector",{enumerable:!0,get:function(){return Yr.processDetector}});Object.defineProperty(ne,"processDetectorSync",{enumerable:!0,get:function(){return Yr.processDetectorSync}});Object.defineProperty(ne,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return Yr.serviceInstanceIdDetectorSync}});var JY=QY();Object.defineProperty(ne,"detectResourcesSync",{enumerable:!0,get:function(){return JY.detectResourcesSync}});Object.defineProperty(ne,"detectResources",{enumerable:!0,get:function(){return JY.detectResources}})});var ZY=E(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});EE.MultiSpanProcessor=void 0;var NCe=re(),pA=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(n=>{(0,NCe.globalErrorHandler)(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(let n of this._spanProcessors)n.onStart(e,r)}onEnd(e){for(let r of this._spanProcessors)r.onEnd(e)}shutdown(){let e=[];for(let r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,n)=>{Promise.all(e).then(()=>{r()},n)})}};EE.MultiSpanProcessor=pA});var dA=E(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.NoopSpanProcessor=void 0;var _A=class{onStart(e,r){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};fE.NoopSpanProcessor=_A});var r$=E($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.BasicTracerProvider=$s.ForceFlushState=void 0;var _a=(M(),P(U)),Ea=re(),e$=lA(),ICe=Fg(),PCe=Ug(),t$=ZY(),CCe=dA(),yCe=kd(),MCe=Vg(),da;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(da=$s.ForceFlushState||($s.ForceFlushState={}));var Ru=class{constructor(e={}){var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;let o=(0,Ea.merge)({},(0,PCe.loadDefaultConfig)(),(0,MCe.reconfigureLimits)(e));if(this.resource=(r=o.resource)!==null&&r!==void 0?r:e$.Resource.empty(),o.mergeResourceWithDefaults&&(this.resource=e$.Resource.default().merge(this.resource)),this._config=Object.assign({},o,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=[...e.spanProcessors],this.activeSpanProcessor=new t$.MultiSpanProcessor(this._registeredSpanProcessors);else{let s=this._buildExporterFromEnv();if(s!==void 0){let i=new yCe.BatchSpanProcessor(s);this.activeSpanProcessor=i}else this.activeSpanProcessor=new CCe.NoopSpanProcessor}}getTracer(e,r,n){let o=`${e}@${r||""}:${n?.schemaUrl||""}`;return this._tracers.has(o)||this._tracers.set(o,new ICe.Tracer({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(o)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(r=>_a.diag.error("Error while trying to shutdown current span processor",r)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new t$.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){_a.trace.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&_a.context.setGlobalContextManager(e.contextManager),e.propagator&&_a.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(n=>new Promise(o=>{let s,i=setTimeout(()=>{o(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=da.timeout},e);n.forceFlush().then(()=>{clearTimeout(i),s!==da.timeout&&(s=da.resolved,o(s))}).catch(a=>{clearTimeout(i),s=da.error,o(a)})}));return new Promise((n,o)=>{Promise.all(r).then(s=>{let i=s.filter(a=>a!==da.resolved);i.length>0?o(i):n()}).catch(s=>o([s]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()}_getSpanExporter(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()}_buildPropagatorFromEnv(){let e=Array.from(new Set((0,Ea.getEnv)().OTEL_PROPAGATORS)),n=e.map(o=>{let s=this._getPropagator(o);return s||_a.diag.warn(`Propagator "${o}" requested through environment variable is unavailable.`),s}).reduce((o,s)=>(s&&o.push(s),o),[]);if(n.length!==0)return e.length===1?n[0]:new Ea.CompositePropagator({propagators:n})}_buildExporterFromEnv(){let e=(0,Ea.getEnv)().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let r=this._getSpanExporter(e);return r||_a.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),r}};$s.BasicTracerProvider=Ru;Ru._registeredPropagators=new Map([["tracecontext",()=>new Ea.W3CTraceContextPropagator],["baggage",()=>new Ea.W3CBaggagePropagator]]);Ru._registeredExporters=new Map});var n$=E(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.ConsoleSpanExporter=void 0;var EA=re(),fA=class{export(e,r){return this._sendSpans(e,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){var r;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(r=e.spanContext().traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,EA.hrTimeToMicroseconds)(e.startTime),duration:(0,EA.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,r){for(let n of e)console.dir(this._exportInfo(n),{depth:3});if(r)return r({code:EA.ExportResultCode.SUCCESS})}};SE.ConsoleSpanExporter=fA});var s$=E(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.InMemorySpanExporter=void 0;var o$=re(),SA=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,r){if(this._stopped)return r({code:o$.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>r({code:o$.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};TE.InMemorySpanExporter=SA});var i$=E(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.SimpleSpanProcessor=void 0;var vCe=(M(),P(U)),fa=re(),TA=class{constructor(e){this._exporter=e,this._shutdownOnce=new fa.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,r){}onEnd(e){var r,n;if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&vCe.TraceFlags.SAMPLED)===0)return;let o=()=>fa.internal._export(this._exporter,[e]).then(s=>{var i;s.code!==fa.ExportResultCode.SUCCESS&&(0,fa.globalErrorHandler)((i=s.error)!==null&&i!==void 0?i:new Error(`SimpleSpanProcessor: span export failed (status ${s})`))}).catch(s=>{(0,fa.globalErrorHandler)(s)});if(e.resource.asyncAttributesPending){let s=(n=(r=e.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r).then(()=>(s!=null&&this._unresolvedExports.delete(s),o()),i=>(0,fa.globalErrorHandler)(i));s!=null&&this._unresolvedExports.add(s)}else o()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};mE.SimpleSpanProcessor=TA});var mA=E(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Span=oe.SamplingDecision=oe.TraceIdRatioBasedSampler=oe.ParentBasedSampler=oe.AlwaysOnSampler=oe.AlwaysOffSampler=oe.NoopSpanProcessor=oe.SimpleSpanProcessor=oe.InMemorySpanExporter=oe.ConsoleSpanExporter=oe.RandomIdGenerator=oe.BatchSpanProcessor=oe.ForceFlushState=oe.BasicTracerProvider=oe.Tracer=void 0;var bCe=Fg();Object.defineProperty(oe,"Tracer",{enumerable:!0,get:function(){return bCe.Tracer}});var a$=r$();Object.defineProperty(oe,"BasicTracerProvider",{enumerable:!0,get:function(){return a$.BasicTracerProvider}});Object.defineProperty(oe,"ForceFlushState",{enumerable:!0,get:function(){return a$.ForceFlushState}});var c$=kd();Object.defineProperty(oe,"BatchSpanProcessor",{enumerable:!0,get:function(){return c$.BatchSpanProcessor}});Object.defineProperty(oe,"RandomIdGenerator",{enumerable:!0,get:function(){return c$.RandomIdGenerator}});var LCe=n$();Object.defineProperty(oe,"ConsoleSpanExporter",{enumerable:!0,get:function(){return LCe.ConsoleSpanExporter}});var DCe=s$();Object.defineProperty(oe,"InMemorySpanExporter",{enumerable:!0,get:function(){return DCe.InMemorySpanExporter}});var xCe=i$();Object.defineProperty(oe,"SimpleSpanProcessor",{enumerable:!0,get:function(){return xCe.SimpleSpanProcessor}});var UCe=dA();Object.defineProperty(oe,"NoopSpanProcessor",{enumerable:!0,get:function(){return UCe.NoopSpanProcessor}});var wCe=vd();Object.defineProperty(oe,"AlwaysOffSampler",{enumerable:!0,get:function(){return wCe.AlwaysOffSampler}});var VCe=Ld();Object.defineProperty(oe,"AlwaysOnSampler",{enumerable:!0,get:function(){return VCe.AlwaysOnSampler}});var BCe=vg();Object.defineProperty(oe,"ParentBasedSampler",{enumerable:!0,get:function(){return BCe.ParentBasedSampler}});var GCe=Lg();Object.defineProperty(oe,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return GCe.TraceIdRatioBasedSampler}});var HCe=hu();Object.defineProperty(oe,"SamplingDecision",{enumerable:!0,get:function(){return HCe.SamplingDecision}});var kCe=Ig();Object.defineProperty(oe,"Span",{enumerable:!0,get:function(){return kCe.Span}})});var $A=E(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.AbstractAsyncHooksContextManager=void 0;var VMe=require("events"),BMe=["addListener","on","once","prependListener","prependOnceListener"],YA=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,r){return r instanceof VMe.EventEmitter?this._bindEventEmitter(e,r):typeof r=="function"?this._bindFunction(e,r):r}_bindFunction(e,r){let n=this,o=function(...s){return n.with(e,()=>r.apply(this,s))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}_bindEventEmitter(e,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),BMe.forEach(o=>{r[o]!==void 0&&(r[o]=this._patchAddListener(r,r[o],e))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(e,r){let n=this;return function(o,s){var i;let a=(i=n._getPatchMap(e))===null||i===void 0?void 0:i[o];if(a===void 0)return r.call(this,o,s);let c=a.get(s);return r.call(this,o,c||s)}}_patchRemoveAllListeners(e,r){let n=this;return function(o){let s=n._getPatchMap(e);return s!==void 0&&(arguments.length===0?n._createPatchMap(e):s[o]!==void 0&&delete s[o]),r.apply(this,arguments)}}_patchAddListener(e,r,n){let o=this;return function(s,i){if(o._wrapped)return r.call(this,s,i);let a=o._getPatchMap(e);a===void 0&&(a=o._createPatchMap(e));let c=a[s];c===void 0&&(c=new WeakMap,a[s]=c);let u=o.bind(n,i);c.set(i,u),o._wrapped=!0;try{return r.call(this,s,u)}finally{o._wrapped=!1}}}_createPatchMap(e){let r=Object.create(null);return e[this._kOtListeners]=r,r}_getPatchMap(e){return e[this._kOtListeners]}};yE.AbstractAsyncHooksContextManager=YA});var RK=E(ME=>{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.AsyncHooksContextManager=void 0;var GMe=(M(),P(U)),HMe=require("async_hooks"),kMe=$A(),KA=class extends kMe.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=HMe.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:GMe.ROOT_CONTEXT}with(e,r,n,...o){this._enterContext(e);try{return r.call(n,...o)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,r){if(r==="TIMERWRAP")return;let n=this._stack[this._stack.length-1];n!==void 0&&this._contexts.set(e,n)}_destroy(e){this._contexts.delete(e)}_before(e){let r=this._contexts.get(e);r!==void 0&&this._enterContext(r)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};ME.AsyncHooksContextManager=KA});var OK=E(vE=>{"use strict";Object.defineProperty(vE,"__esModule",{value:!0});vE.AsyncLocalStorageContextManager=void 0;var FMe=(M(),P(U)),qMe=require("async_hooks"),jMe=$A(),WA=class extends jMe.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new qMe.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:FMe.ROOT_CONTEXT}with(e,r,n,...o){let s=n==null?r:r.bind(n);return this._asyncLocalStorage.run(e,s,...o)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};vE.AsyncLocalStorageContextManager=WA});var NK=E(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.AsyncLocalStorageContextManager=Oa.AsyncHooksContextManager=void 0;var YMe=RK();Object.defineProperty(Oa,"AsyncHooksContextManager",{enumerable:!0,get:function(){return YMe.AsyncHooksContextManager}});var $Me=OK();Object.defineProperty(Oa,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return $Me.AsyncLocalStorageContextManager}})});var jK=E(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.PACKAGE_NAME=Na.PACKAGE_VERSION=void 0;Na.PACKAGE_VERSION="0.10.1";Na.PACKAGE_NAME="@opentelemetry/instrumentation-undici"});var YK=E(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});BE.SemanticAttributes=void 0;BE.SemanticAttributes={HTTP_CONNECTION_STATE:"http.connection.state",ERROR_TYPE:"error.type",HTTP_REQUEST_BODY_SIZE:"http.request.body.size",HTTP_REQUEST_METHOD:"http.request.method",HTTP_REQUEST_METHOD_ORIGINAL:"http.request.method_original",HTTP_REQUEST_RESEND_COUNT:"http.request.resend_count",HTTP_RESPONSE_BODY_SIZE:"http.response.body.size",HTTP_RESPONSE_STATUS_CODE:"http.response.status_code",HTTP_ROUTE:"http.route",NETWORK_PEER_ADDRESS:"network.peer.address",NETWORK_PEER_PORT:"network.peer.port",NETWORK_PROTOCOL_NAME:"network.protocol.name",NETWORK_PROTOCOL_VERSION:"network.protocol.version",SERVER_ADDRESS:"server.address",SERVER_PORT:"server.port",URL_FULL:"url.full",URL_PATH:"url.path",URL_QUERY:"url.query",URL_SCHEME:"url.scheme",USER_AGENT_ORIGINAL:"user_agent.original"}});var KK=E(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.UndiciInstrumentation=void 0;var Uu=require("diagnostics_channel"),Sve=require("url"),wu=ee(),ir=(M(),P(U)),$K=jK(),Xe=YK(),GE=re(),rR=class extends wu.InstrumentationBase{constructor(e={}){super($K.PACKAGE_NAME,$K.PACKAGE_VERSION,e),this._recordFromReq=new WeakMap}init(){}disable(){super.disable(),this._channelSubs.forEach(e=>e.unsubscribe()),this._channelSubs.length=0}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this.subscribeToChannel("undici:request:create",this.onRequestCreated.bind(this)),this.subscribeToChannel("undici:client:sendHeaders",this.onRequestHeaders.bind(this)),this.subscribeToChannel("undici:request:headers",this.onResponseHeaders.bind(this)),this.subscribeToChannel("undici:request:trailers",this.onDone.bind(this)),this.subscribeToChannel("undici:request:error",this.onError.bind(this)))}_updateMetricInstruments(){this._httpClientDurationHistogram=this.meter.createHistogram("http.client.request.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"s",valueType:ir.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}})}subscribeToChannel(e,r){var n;let[o,s]=process.version.replace("v","").split(".").map(c=>Number(c)),i=o>18||o===18&&s>=19,a;if(i)(n=Uu.subscribe)===null||n===void 0||n.call(Uu,e,r),a=()=>{var c;return(c=Uu.unsubscribe)===null||c===void 0?void 0:c.call(Uu,e,r)};else{let c=Uu.channel(e);c.subscribe(r),a=()=>c.unsubscribe(r)}this._channelSubs.push({name:e,unsubscribe:a})}onRequestCreated({request:e}){let r=this.getConfig(),n=r.enabled!==!1;if((0,wu.safeExecuteInTheMiddle)(()=>{var O;return!n||e.method==="CONNECT"||((O=r.ignoreRequestHook)===null||O===void 0?void 0:O.call(r,e))},O=>O&&this._diag.error("caught ignoreRequestHook error: ",O),!0))return;let s=(0,GE.hrTime)(),i;try{i=new Sve.URL(e.path,e.origin)}catch(O){this._diag.warn("could not determine url.full:",O);return}let a=i.protocol.replace(":",""),c=this.getRequestMethod(e.method),u={[Xe.SemanticAttributes.HTTP_REQUEST_METHOD]:c,[Xe.SemanticAttributes.HTTP_REQUEST_METHOD_ORIGINAL]:e.method,[Xe.SemanticAttributes.URL_FULL]:i.toString(),[Xe.SemanticAttributes.URL_PATH]:i.pathname,[Xe.SemanticAttributes.URL_QUERY]:i.search,[Xe.SemanticAttributes.URL_SCHEME]:a},l={https:"443",http:"80"},p=i.hostname,_=i.port||l[a];u[Xe.SemanticAttributes.SERVER_ADDRESS]=p,_&&!isNaN(Number(_))&&(u[Xe.SemanticAttributes.SERVER_PORT]=Number(_));let d;if(Array.isArray(e.headers)){let O=e.headers.findIndex(b=>b.toLowerCase()==="user-agent");O>=0&&(d=e.headers[O+1])}else if(typeof e.headers=="string"){let b=e.headers.split(`\r
|
|
8
|
-
`).find(v=>v.toLowerCase().startsWith("user-agent"));d=b&&b.substring(b.indexOf(":")+1).trim()}d&&(u[Xe.SemanticAttributes.USER_AGENT_ORIGINAL]=d);let S=(0,wu.safeExecuteInTheMiddle)(()=>{var O;return(O=r.startSpanHook)===null||O===void 0?void 0:O.call(r,e)},O=>O&&this._diag.error("caught startSpanHook error: ",O),!0);S&&Object.entries(S).forEach(([O,b])=>{u[O]=b});let f=
|
|
6
|
+
`).map(e=>e.trim()).join(" ")};XU.O=function(t){return this.inspectOpts.colors=this.useColors,S_.inspect(t,this.inspectOpts)}});var QU=E((yBe,Sm)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?Sm.exports=qU():Sm.exports=zU()});var mm=E((MBe,JU)=>{"use strict";var Tm=require("path").sep;JU.exports=function(t){var e=t.split(Tm),r=e.lastIndexOf("node_modules");if(r!==-1&&e[r+1]){for(var n=e[r+1][0]==="@",o=n?e[r+1]+"/"+e[r+2]:e[r+1],s=n?3:2,i="",a=r+s-1,c=0;c<=a;c++)c===a?i+=e[c]:i+=e[c]+Tm;for(var u="",l=e.length-1,p=r+s;p<=l;p++)p===l?u+=e[p]:u+=e[p]+Tm;return{name:o,basedir:i,path:u}}}});var hm=E((vBe,ZU)=>{"use strict";var Ile=require("os");ZU.exports=Ile.homedir||function(){var e=process.env.HOME,r=process.env.LOGNAME||process.env.USER||process.env.LNAME||process.env.USERNAME;return process.platform==="win32"?process.env.USERPROFILE||process.env.HOMEDRIVE&&process.env.HOMEPATH&&process.env.HOMEDRIVE+process.env.HOMEPATH||e||null:process.platform==="darwin"?e||(r?"/Users/"+r:null):process.platform==="linux"?e||(process.getuid()===0?"/root":r?"/home/"+r:null):e||null}});var m_=E((bBe,e0)=>{"use strict";e0.exports=Error});var gm=E((LBe,t0)=>{"use strict";var h_=m_();t0.exports=function(){var t=h_.prepareStackTrace;h_.prepareStackTrace=function(r,n){return n};var e=new h_().stack;return h_.prepareStackTrace=t,e[2].getFileName()}});var r0=E((DBe,Bc)=>{"use strict";var Ple=process.platform==="win32",Cle=/^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/,Am={};function yle(t){return Cle.exec(t).slice(1)}Am.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=yle(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0]===e[1]?e[0]:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};var Mle=/^((\/?)(?:[^\/]*\/)*)((\.{1,2}|[^\/]+?|)(\.[^.\/]*|))[\/]*$/,Rm={};function vle(t){return Mle.exec(t).slice(1)}Rm.parse=function(t){if(typeof t!="string")throw new TypeError("Parameter 'pathString' must be a string, not "+typeof t);var e=vle(t);if(!e||e.length!==5)throw new TypeError("Invalid path '"+t+"'");return{root:e[1],dir:e[0].slice(0,-1),base:e[2],ext:e[4],name:e[3]}};Ple?Bc.exports=Am.parse:Bc.exports=Rm.parse;Bc.exports.posix=Rm.parse;Bc.exports.win32=Am.parse});var Om=E((xBe,i0)=>{var s0=require("path"),n0=s0.parse||r0(),ble=/^([A-Za-z]:)/,Lle=/^\\\\/;function o0(t,e){var r="/";ble.test(t)?r="":Lle.test(t)&&(r="\\\\");for(var n=[t],o=n0(t);o.dir!==n[n.length-1];)n.push(o.dir),o=n0(o.dir);return n.reduce(function(s,i){return s.concat(e.map(function(a){return s0.resolve(r,i,a)}))},[])}i0.exports=function(e,r,n){var o=r&&r.moduleDirectory?[].concat(r.moduleDirectory):["node_modules"];if(r&&typeof r.paths=="function")return r.paths(n,e,function(){return o0(e,o)},r);var s=o0(e,o);return r&&r.paths?s.concat(r.paths):s}});var Nm=E((UBe,a0)=>{a0.exports=function(t,e){return e||{}}});var l0=E((wBe,u0)=>{"use strict";var Dle="Function.prototype.bind called on incompatible ",xle=Object.prototype.toString,Ule=Math.max,wle="[object Function]",c0=function(e,r){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var s=0;s<r.length;s+=1)n[s+e.length]=r[s];return n},Vle=function(e,r){for(var n=[],o=r||0,s=0;o<e.length;o+=1,s+=1)n[s]=e[o];return n},Ble=function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r};u0.exports=function(e){var r=this;if(typeof r!="function"||xle.apply(r)!==wle)throw new TypeError(Dle+r);for(var n=Vle(arguments,1),o,s=function(){if(this instanceof o){var l=r.apply(this,c0(n,arguments));return Object(l)===l?l:this}return r.apply(e,c0(n,arguments))},i=Ule(0,r.length-n.length),a=[],c=0;c<i;c++)a[c]="$"+c;if(o=Function("binder","return function ("+Ble(a,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var u=function(){};u.prototype=r.prototype,o.prototype=new u,u.prototype=null}return o}});var _0=E((VBe,p0)=>{"use strict";var Gle=l0();p0.exports=Function.prototype.bind||Gle});var E0=E((BBe,d0)=>{"use strict";var Hle=Function.prototype.call,kle=Object.prototype.hasOwnProperty,Fle=_0();d0.exports=Fle.call(Hle,kle)});var f0=E((GBe,qle)=>{qle.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var Gc=E((HBe,m0)=>{"use strict";var jle=E0();function Yle(t,e){for(var r=t.split("."),n=e.split(" "),o=n.length>1?n[0]:"=",s=(n.length>1?n[1]:n[0]).split("."),i=0;i<3;++i){var a=parseInt(r[i]||0,10),c=parseInt(s[i]||0,10);if(a!==c)return o==="<"?a<c:o===">="?a>=c:!1}return o===">="}function S0(t,e){var r=e.split(/ ?&& ?/);if(r.length===0)return!1;for(var n=0;n<r.length;++n)if(!Yle(t,r[n]))return!1;return!0}function $le(t,e){if(typeof e=="boolean")return e;var r=typeof t>"u"?process.versions&&process.versions.node:t;if(typeof r!="string")throw new TypeError(typeof t>"u"?"Unable to determine current node version":"If provided, a valid node version is required");if(e&&typeof e=="object"){for(var n=0;n<e.length;++n)if(S0(r,e[n]))return!0;return!1}return S0(r,e)}var T0=f0();m0.exports=function(e,r){return jle(T0,e)&&$le(r,T0[e])}});var Im=E((kBe,h0)=>{"use strict";h0.exports=TypeError});var R0=E((FBe,A0)=>{var Cs=require("fs"),Kle=hm(),ke=require("path"),Wle=gm(),Xle=Om(),zle=Nm(),Qle=Gc(),g0=m_(),Pm=Im(),Jle=process.platform!=="win32"&&Cs.realpath&&typeof Cs.realpath.native=="function"?Cs.realpath.native:Cs.realpath,Zle=/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/,epe=/^\w:[/\\]*$/,tpe=/[/\\]node_modules[/\\]*$/,Cm=Kle();function rpe(){return Cm?[ke.join(Cm,".node_modules"),ke.join(Cm,".node_libraries")]:[]}var npe=function(e,r){Cs.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isFile()||o.isFIFO())})},ope=function(e,r){Cs.stat(e,function(n,o){return n?n.code==="ENOENT"||n.code==="ENOTDIR"?r(null,!1):r(n):r(null,o.isDirectory())})},spe=function(e,r){Jle(e,function(n,o){n&&n.code!=="ENOENT"?r(n):r(null,n?e:o)})};function Hc(t,e,r,n){r&&r.preserveSymlinks===!1?t(e,n):n(null,e)}function ipe(t,e,r){t(e,function(n,o){if(n)r(n);else try{var s=JSON.parse(o);r(null,s)}catch{r(null)}})}function ape(t,e,r){for(var n=Xle(e,r,t),o=0;o<n.length;o++)n[o]=ke.join(n[o],t);return n}A0.exports=function(e,r,n){var o=n,s=r;if(typeof r=="function"&&(o=s,s={}),typeof e!="string"){var i=new Pm("Path must be a string.");return process.nextTick(function(){o(i)})}s=zle(e,s);var a=s.isFile||npe,c=s.isDirectory||ope,u=s.readFile||Cs.readFile,l=s.realpath||spe,p=s.readPackage||ipe;if(s.readFile&&s.readPackage){var _=new Pm("`readFile` and `readPackage` are mutually exclusive.");return process.nextTick(function(){o(_)})}var d=s.packageIterator,S=s.extensions||[".js"],f=s.includeCoreModules!==!1,T=s.basedir||ke.dirname(Wle()),h=s.filename||T;s.paths=s.paths||rpe();var A=ke.resolve(T);Hc(l,A,s,function(V,z){V?o(V):I(z)});var N;function I(V){if(Zle.test(e))N=ke.resolve(V,e),(e==="."||e===".."||e.slice(-1)==="/")&&(N+="/"),e.slice(-1)==="/"&&N===V?X(N,s.package,O):b(N,s.package,O);else{if(f&&Qle(e))return o(null,e);De(e,V,function(z,Ae,te){if(z)o(z);else{if(Ae)return Hc(l,Ae,s,function(ur,xe){ur?o(ur):o(null,xe,te)});var Pe=new g0("Cannot find module '"+e+"' from '"+h+"'");Pe.code="MODULE_NOT_FOUND",o(Pe)}})}}function O(V,z,Ae){V?o(V):z?o(null,z,Ae):X(N,function(te,Pe,ur){if(te)o(te);else if(Pe)Hc(l,Pe,s,function(Ce,Bt){Ce?o(Ce):o(null,Bt,ur)});else{var xe=new g0("Cannot find module '"+e+"' from '"+h+"'");xe.code="MODULE_NOT_FOUND",o(xe)}})}function b(V,z,Ae){var te=z,Pe=Ae;typeof te=="function"&&(Pe=te,te=void 0);var ur=[""].concat(S);xe(ur,V,te);function xe(Ce,Bt,Mn){if(Ce.length===0)return Pe(null,void 0,Mn);var ls=Bt+Ce[0],Xr=Mn;Xr?_t(null,Xr):v(ke.dirname(ls),_t);function _t(so,ii,vn){if(Xr=ii,so)return Pe(so);if(vn&&Xr&&s.pathFilter){var fl=ke.relative(vn,ls),Sl=fl.slice(0,fl.length-Ce[0].length),nc=s.pathFilter(Xr,Bt,Sl);if(nc)return xe([""].concat(S),ke.resolve(vn,nc),Xr)}a(ls,El)}function El(so,ii){if(so)return Pe(so);if(ii)return Pe(null,ls,Xr);xe(Ce.slice(1),Bt,Xr)}}}function v(V,z){if(V===""||V==="/"||process.platform==="win32"&&epe.test(V)||tpe.test(V))return z(null);Hc(l,V,s,function(Ae,te){if(Ae)return v(ke.dirname(V),z);var Pe=ke.join(te,"package.json");a(Pe,function(ur,xe){if(!xe)return v(ke.dirname(V),z);p(u,Pe,function(Ce,Bt){if(Ce)return z(Ce);var Mn=Bt;Mn&&s.packageFilter&&(Mn=s.packageFilter(Mn,Pe)),z(null,Mn,V)})})})}function X(V,z,Ae){var te=Ae,Pe=z;typeof Pe=="function"&&(te=Pe,Pe=s.package),Hc(l,V,s,function(ur,xe){if(ur)return te(ur);var Ce=ke.join(xe,"package.json");a(Ce,function(Bt,Mn){if(Bt)return te(Bt);if(!Mn)return b(ke.join(V,"index"),Pe,te);p(u,Ce,function(ls,Xr){if(ls)return te(ls);var _t=Xr;if(_t&&s.packageFilter&&(_t=s.packageFilter(_t,Ce)),_t&&_t.main){if(typeof _t.main!="string"){var El=new Pm("package \u201C"+_t.name+"\u201D `main` must be a string");return El.code="INVALID_PACKAGE_MAIN",te(El)}(_t.main==="."||_t.main==="./")&&(_t.main="index"),b(ke.resolve(V,_t.main),_t,function(so,ii,vn){if(so)return te(so);if(ii)return te(null,ii,vn);if(!vn)return b(ke.join(V,"index"),vn,te);var fl=ke.resolve(V,vn.main);X(fl,vn,function(Sl,nc,SO){if(Sl)return te(Sl);if(nc)return te(null,nc,SO);b(ke.join(V,"index"),SO,te)})});return}b(ke.join(V,"/index"),_t,te)})})})}function $(V,z){if(z.length===0)return V(null,void 0);var Ae=z[0];c(ke.dirname(Ae),te);function te(xe,Ce){if(xe)return V(xe);if(!Ce)return $(V,z.slice(1));b(Ae,s.package,Pe)}function Pe(xe,Ce,Bt){if(xe)return V(xe);if(Ce)return V(null,Ce,Bt);X(Ae,s.package,ur)}function ur(xe,Ce,Bt){if(xe)return V(xe);if(Ce)return V(null,Ce,Bt);$(V,z.slice(1))}}function De(V,z,Ae){var te=function(){return ape(V,z,s)};$(Ae,d?d(V,z,te,s):te())}}});var O0=E((qBe,cpe)=>{cpe.exports={assert:!0,"node:assert":[">= 14.18 && < 15",">= 16"],"assert/strict":">= 15","node:assert/strict":">= 16",async_hooks:">= 8","node:async_hooks":[">= 14.18 && < 15",">= 16"],buffer_ieee754:">= 0.5 && < 0.9.7",buffer:!0,"node:buffer":[">= 14.18 && < 15",">= 16"],child_process:!0,"node:child_process":[">= 14.18 && < 15",">= 16"],cluster:">= 0.5","node:cluster":[">= 14.18 && < 15",">= 16"],console:!0,"node:console":[">= 14.18 && < 15",">= 16"],constants:!0,"node:constants":[">= 14.18 && < 15",">= 16"],crypto:!0,"node:crypto":[">= 14.18 && < 15",">= 16"],_debug_agent:">= 1 && < 8",_debugger:"< 8",dgram:!0,"node:dgram":[">= 14.18 && < 15",">= 16"],diagnostics_channel:[">= 14.17 && < 15",">= 15.1"],"node:diagnostics_channel":[">= 14.18 && < 15",">= 16"],dns:!0,"node:dns":[">= 14.18 && < 15",">= 16"],"dns/promises":">= 15","node:dns/promises":">= 16",domain:">= 0.7.12","node:domain":[">= 14.18 && < 15",">= 16"],events:!0,"node:events":[">= 14.18 && < 15",">= 16"],freelist:"< 6",fs:!0,"node:fs":[">= 14.18 && < 15",">= 16"],"fs/promises":[">= 10 && < 10.1",">= 14"],"node:fs/promises":[">= 14.18 && < 15",">= 16"],_http_agent:">= 0.11.1","node:_http_agent":[">= 14.18 && < 15",">= 16"],_http_client:">= 0.11.1","node:_http_client":[">= 14.18 && < 15",">= 16"],_http_common:">= 0.11.1","node:_http_common":[">= 14.18 && < 15",">= 16"],_http_incoming:">= 0.11.1","node:_http_incoming":[">= 14.18 && < 15",">= 16"],_http_outgoing:">= 0.11.1","node:_http_outgoing":[">= 14.18 && < 15",">= 16"],_http_server:">= 0.11.1","node:_http_server":[">= 14.18 && < 15",">= 16"],http:!0,"node:http":[">= 14.18 && < 15",">= 16"],http2:">= 8.8","node:http2":[">= 14.18 && < 15",">= 16"],https:!0,"node:https":[">= 14.18 && < 15",">= 16"],inspector:">= 8","node:inspector":[">= 14.18 && < 15",">= 16"],"inspector/promises":[">= 19"],"node:inspector/promises":[">= 19"],_linklist:"< 8",module:!0,"node:module":[">= 14.18 && < 15",">= 16"],net:!0,"node:net":[">= 14.18 && < 15",">= 16"],"node-inspect/lib/_inspect":">= 7.6 && < 12","node-inspect/lib/internal/inspect_client":">= 7.6 && < 12","node-inspect/lib/internal/inspect_repl":">= 7.6 && < 12",os:!0,"node:os":[">= 14.18 && < 15",">= 16"],path:!0,"node:path":[">= 14.18 && < 15",">= 16"],"path/posix":">= 15.3","node:path/posix":">= 16","path/win32":">= 15.3","node:path/win32":">= 16",perf_hooks:">= 8.5","node:perf_hooks":[">= 14.18 && < 15",">= 16"],process:">= 1","node:process":[">= 14.18 && < 15",">= 16"],punycode:">= 0.5","node:punycode":[">= 14.18 && < 15",">= 16"],querystring:!0,"node:querystring":[">= 14.18 && < 15",">= 16"],readline:!0,"node:readline":[">= 14.18 && < 15",">= 16"],"readline/promises":">= 17","node:readline/promises":">= 17",repl:!0,"node:repl":[">= 14.18 && < 15",">= 16"],"node:sea":[">= 20.12 && < 21",">= 21.7"],smalloc:">= 0.11.5 && < 3","node:sqlite":[">= 22.13 && < 23",">= 23.4"],_stream_duplex:">= 0.9.4","node:_stream_duplex":[">= 14.18 && < 15",">= 16"],_stream_transform:">= 0.9.4","node:_stream_transform":[">= 14.18 && < 15",">= 16"],_stream_wrap:">= 1.4.1","node:_stream_wrap":[">= 14.18 && < 15",">= 16"],_stream_passthrough:">= 0.9.4","node:_stream_passthrough":[">= 14.18 && < 15",">= 16"],_stream_readable:">= 0.9.4","node:_stream_readable":[">= 14.18 && < 15",">= 16"],_stream_writable:">= 0.9.4","node:_stream_writable":[">= 14.18 && < 15",">= 16"],stream:!0,"node:stream":[">= 14.18 && < 15",">= 16"],"stream/consumers":">= 16.7","node:stream/consumers":">= 16.7","stream/promises":">= 15","node:stream/promises":">= 16","stream/web":">= 16.5","node:stream/web":">= 16.5",string_decoder:!0,"node:string_decoder":[">= 14.18 && < 15",">= 16"],sys:[">= 0.4 && < 0.7",">= 0.8"],"node:sys":[">= 14.18 && < 15",">= 16"],"test/reporters":">= 19.9 && < 20.2","node:test/reporters":[">= 18.17 && < 19",">= 19.9",">= 20"],"test/mock_loader":">= 22.3 && < 22.7","node:test/mock_loader":">= 22.3 && < 22.7","node:test":[">= 16.17 && < 17",">= 18"],timers:!0,"node:timers":[">= 14.18 && < 15",">= 16"],"timers/promises":">= 15","node:timers/promises":">= 16",_tls_common:">= 0.11.13","node:_tls_common":[">= 14.18 && < 15",">= 16"],_tls_legacy:">= 0.11.3 && < 10",_tls_wrap:">= 0.11.3","node:_tls_wrap":[">= 14.18 && < 15",">= 16"],tls:!0,"node:tls":[">= 14.18 && < 15",">= 16"],trace_events:">= 10","node:trace_events":[">= 14.18 && < 15",">= 16"],tty:!0,"node:tty":[">= 14.18 && < 15",">= 16"],url:!0,"node:url":[">= 14.18 && < 15",">= 16"],util:!0,"node:util":[">= 14.18 && < 15",">= 16"],"util/types":">= 15.3","node:util/types":">= 16","v8/tools/arguments":">= 10 && < 12","v8/tools/codemap":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/consarray":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/csvparser":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/logreader":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/profile_view":[">= 4.4 && < 5",">= 5.2 && < 12"],"v8/tools/splaytree":[">= 4.4 && < 5",">= 5.2 && < 12"],v8:">= 1","node:v8":[">= 14.18 && < 15",">= 16"],vm:!0,"node:vm":[">= 14.18 && < 15",">= 16"],wasi:[">= 13.4 && < 13.5",">= 18.17 && < 19",">= 20"],"node:wasi":[">= 18.17 && < 19",">= 20"],worker_threads:">= 11.7","node:worker_threads":[">= 14.18 && < 15",">= 16"],zlib:">= 0.5","node:zlib":[">= 14.18 && < 15",">= 16"]}});var C0=E((jBe,P0)=>{"use strict";var upe=Gc(),N0=O0(),I0={};for(g_ in N0)Object.prototype.hasOwnProperty.call(N0,g_)&&(I0[g_]=upe(g_));var g_;P0.exports=I0});var M0=E((YBe,y0)=>{var lpe=Gc();y0.exports=function(e){return lpe(e)}});var b0=E(($Be,v0)=>{var ppe=Gc(),ys=require("fs"),mt=require("path"),_pe=m_(),ym=Im(),dpe=hm(),Epe=gm(),fpe=Om(),Spe=Nm(),Tpe=process.platform!=="win32"&&ys.realpathSync&&typeof ys.realpathSync.native=="function"?ys.realpathSync.native:ys.realpathSync,mpe=/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/,hpe=/^\w:[/\\]*$/,gpe=/[/\\]node_modules[/\\]*$/,Mm=dpe();function Ape(){return Mm?[mt.join(Mm,".node_modules"),mt.join(Mm,".node_libraries")]:[]}var Rpe=function(e){try{var r=ys.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&(r.isFile()||r.isFIFO())},Ope=function(e){try{var r=ys.statSync(e,{throwIfNoEntry:!1})}catch(n){if(n&&(n.code==="ENOENT"||n.code==="ENOTDIR"))return!1;throw n}return!!r&&r.isDirectory()},Npe=function(e){try{return Tpe(e)}catch(r){if(r.code!=="ENOENT")throw r}return e};function kc(t,e,r){return r&&r.preserveSymlinks===!1?t(e):e}function Ipe(t,e){var r=t(e);try{var n=JSON.parse(r);return n}catch{}}function Ppe(t,e,r){for(var n=fpe(e,r,t),o=0;o<n.length;o++)n[o]=mt.join(n[o],t);return n}v0.exports=function(e,r){if(typeof e!="string")throw new ym("Path must be a string.");var n=Spe(e,r),o=n.isFile||Rpe,s=n.readFileSync||ys.readFileSync,i=n.isDirectory||Ope,a=n.realpathSync||Npe,c=n.readPackageSync||Ipe;if(n.readFileSync&&n.readPackageSync)throw new ym("`readFileSync` and `readPackageSync` are mutually exclusive.");var u=n.packageIterator,l=n.extensions||[".js"],p=n.includeCoreModules!==!1,_=n.basedir||mt.dirname(Epe()),d=n.filename||_;n.paths=n.paths||Ape();var S=kc(a,mt.resolve(_),n);if(mpe.test(e)){var f=mt.resolve(S,e);(e==="."||e===".."||e.slice(-1)==="/")&&(f+="/");var T=N(f)||O(f);if(T)return kc(a,T,n)}else{if(p&&ppe(e))return e;var h=b(e,S);if(h)return kc(a,h,n)}var A=new _pe("Cannot find module '"+e+"' from '"+d+"'");throw A.code="MODULE_NOT_FOUND",A;function N(v){var X=I(mt.dirname(v));if(X&&X.dir&&X.pkg&&n.pathFilter){var $=mt.relative(X.dir,v),De=n.pathFilter(X.pkg,v,$);De&&(v=mt.resolve(X.dir,De))}if(o(v))return v;for(var V=0;V<l.length;V++){var z=v+l[V];if(o(z))return z}}function I(v){if(!(v===""||v==="/")&&!(process.platform==="win32"&&hpe.test(v))&&!gpe.test(v)){var X=mt.join(kc(a,v,n),"package.json");if(!o(X))return I(mt.dirname(v));var $=c(s,X);return $&&n.packageFilter&&($=n.packageFilter($,v)),{pkg:$,dir:v}}}function O(v){var X=mt.join(kc(a,v,n),"/package.json");if(o(X)){try{var $=c(s,X)}catch{}if($&&n.packageFilter&&($=n.packageFilter($,v)),$&&$.main){if(typeof $.main!="string"){var De=new ym("package \u201C"+$.name+"\u201D `main` must be a string");throw De.code="INVALID_PACKAGE_MAIN",De}($.main==="."||$.main==="./")&&($.main="index");try{var V=N(mt.resolve(v,$.main));if(V)return V;var z=O(mt.resolve(v,$.main));if(z)return z}catch{}}}return N(mt.join(v,"/index"))}function b(v,X){for(var $=function(){return Ppe(v,X,n)},De=u?u(v,X,$,n):$(),V=0;V<De.length;V++){var z=De[V];if(i(mt.dirname(z))){var Ae=N(z);if(Ae)return Ae;var te=O(z);if(te)return te}}}}});var vm=E((KBe,L0)=>{var A_=R0();A_.core=C0();A_.isCore=M0();A_.sync=b0();L0.exports=A_});var D0=E((WBe,Cpe)=>{Cpe.exports={name:"require-in-the-middle",version:"7.5.2",description:"Module to hook into the Node.js require function",main:"index.js",types:"types/index.d.ts",dependencies:{debug:"^4.3.5","module-details-from-path":"^1.0.3",resolve:"^1.22.8"},devDependencies:{"@babel/core":"^7.9.0","@babel/preset-env":"^7.9.5","@babel/preset-typescript":"^7.9.0","@babel/register":"^7.9.0","ipp-printer":"^1.0.0",patterns:"^1.0.3",roundround:"^0.2.0",semver:"^6.3.0",standard:"^14.3.1",tape:"^4.11.0"},scripts:{test:"npm run test:lint && npm run test:tape && npm run test:babel","test:lint":"standard","test:tape":"tape test/*.js","test:babel":"node test/babel/babel-register.js"},repository:{type:"git",url:"git+https://github.com/nodejs/require-in-the-middle.git"},keywords:["require","hook","shim","shimmer","shimming","patch","monkey","monkeypatch","module","load"],files:["types"],author:"Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",license:"MIT",bugs:{url:"https://github.com/nodejs/require-in-the-middle/issues"},homepage:"https://github.com/nodejs/require-in-the-middle#readme",engines:{node:">=8.6.0"}}});var xm=E((XBe,Dm)=>{"use strict";var vi=require("path"),xr=require("module"),we=QU()("require-in-the-middle"),ype=mm();Dm.exports=Fc;Dm.exports.Hook=Fc;var bm,Mi;if(xr.isBuiltin)Mi=xr.isBuiltin;else if(xr.builtinModules)Mi=t=>t.startsWith("node:")?!0:(bm===void 0&&(bm=new Set(xr.builtinModules)),bm.has(t));else{let t=vm(),[e,r]=process.versions.node.split(".").map(Number);e===8&&r<8?Mi=n=>n==="http2"?!0:!!t.core[n]:Mi=n=>!!t.core[n]}var R_;function Mpe(t,e){if(!R_)if(require.resolve&&require.resolve.paths)R_=function(r,n){return require.resolve(r,{paths:[n]})};else{let r=vm();R_=function(n,o){return r.sync(n,{basedir:o})}}return R_(t,e)}var vpe=/([/\\]index)?(\.js)?$/,Lm=class{constructor(){this._localCache=new Map,this._kRitmExports=Symbol("RitmExports")}has(e,r){if(this._localCache.has(e))return!0;if(r)return!1;{let n=require.cache[e];return!!(n&&this._kRitmExports in n)}}get(e,r){let n=this._localCache.get(e);if(n!==void 0)return n;if(!r){let o=require.cache[e];return o&&o[this._kRitmExports]}}set(e,r,n){n?this._localCache.set(e,r):e in require.cache?require.cache[e][this._kRitmExports]=r:(we('non-core module is unexpectedly not in require.cache: "%s"',e),this._localCache.set(e,r))}};function Fc(t,e,r){if(!(this instanceof Fc))return new Fc(t,e,r);if(typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),typeof xr._resolveFilename!="function"){console.error("Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!",typeof xr._resolveFilename),console.error("Please report this error as an issue related to Node.js %s at %s",process.version,D0().bugs.url);return}this._cache=new Lm,this._unhooked=!1,this._origRequire=xr.prototype.require;let n=this,o=new Set,s=e?e.internals===!0:!1,i=Array.isArray(t);we("registering require hook"),this._require=xr.prototype.require=function(c){return n._unhooked===!0?(we("ignoring require call - module is soft-unhooked"),n._origRequire.apply(this,arguments)):a.call(this,arguments,!1)},typeof process.getBuiltinModule=="function"&&(this._origGetBuiltinModule=process.getBuiltinModule,this._getBuiltinModule=process.getBuiltinModule=function(c){return n._unhooked===!0?(we("ignoring process.getBuiltinModule call - module is soft-unhooked"),n._origGetBuiltinModule.apply(this,arguments)):a.call(this,arguments,!0)});function a(c,u){let l=c[0],p=Mi(l),_;if(p){if(_=l,l.startsWith("node:")){let A=l.slice(5);Mi(A)&&(_=A)}}else{if(u)return we("call to process.getBuiltinModule with unknown built-in id"),n._origGetBuiltinModule.apply(this,c);try{_=xr._resolveFilename(l,this)}catch(A){return we('Module._resolveFilename("%s") threw %j, calling original Module.require',l,A.message),n._origRequire.apply(this,c)}}let d,S;if(we("processing %s module require('%s'): %s",p===!0?"core":"non-core",l,_),n._cache.has(_,p)===!0)return we("returning already patched cached module: %s",_),n._cache.get(_,p);let f=o.has(_);f===!1&&o.add(_);let T=u?n._origGetBuiltinModule.apply(this,c):n._origRequire.apply(this,c);if(f===!0)return we("module is in the process of being patched already - ignoring: %s",_),T;if(o.delete(_),p===!0){if(i===!0&&t.includes(_)===!1)return we("ignoring core module not on whitelist: %s",_),T;d=_}else if(i===!0&&t.includes(_)){let A=vi.parse(_);d=A.name,S=A.dir}else{let A=ype(_);if(A===void 0)return we("could not parse filename: %s",_),T;d=A.name,S=A.basedir;let N=bpe(A);we("resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)",d,l,N,S);let I=!1;if(i){if(!l.startsWith(".")&&t.includes(l)&&(d=l,I=!0),!t.includes(d)&&!t.includes(N))return T;t.includes(N)&&N!==d&&(d=N,I=!0)}if(!I){let O;try{O=Mpe(d,S)}catch{return we("could not resolve module: %s",d),n._cache.set(_,T,p),T}if(O!==_)if(s===!0)d=d+vi.sep+vi.relative(S,_),we("preparing to process require of internal file: %s",d);else return we("ignoring require of non-main module file: %s",O),n._cache.set(_,T,p),T}}n._cache.set(_,T,p),we("calling require hook: %s",d);let h=r(T,d,S);return n._cache.set(_,h,p),we("returning module: %s",d),h}}Fc.prototype.unhook=function(){this._unhooked=!0,this._require===xr.prototype.require?(xr.prototype.require=this._origRequire,we("require unhook successful")):we("require unhook unsuccessful"),process.getBuiltinModule!==void 0&&(this._getBuiltinModule===process.getBuiltinModule?(process.getBuiltinModule=this._origGetBuiltinModule,we("process.getBuiltinModule unhook successful")):we("process.getBuiltinModule unhook unsuccessful"))};function bpe(t){let e=vi.sep!=="/"?t.path.split(vi.sep).join("/"):t.path;return vi.posix.join(t.name,e).replace(vpe,"")}});var x0=E(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.ModuleNameTrie=So.ModuleNameSeparator=void 0;So.ModuleNameSeparator="/";var O_=class{constructor(){this.hooks=[],this.children=new Map}},Um=class{constructor(){this._trie=new O_,this._counter=0}insert(e){let r=this._trie;for(let n of e.moduleName.split(So.ModuleNameSeparator)){let o=r.children.get(n);o||(o=new O_,r.children.set(n,o)),r=o}r.hooks.push({hook:e,insertedId:this._counter++})}search(e,{maintainInsertionOrder:r,fullOnly:n}={}){let o=this._trie,s=[],i=!0;for(let a of e.split(So.ModuleNameSeparator)){let c=o.children.get(a);if(!c){i=!1;break}n||s.push(...c.hooks),o=c}return n&&i&&s.push(...o.hooks),s.length===0?[]:s.length===1?[s[0].hook]:(r&&s.sort((a,c)=>a.insertedId-c.insertedId),s.map(({hook:a})=>a))}};So.ModuleNameTrie=Um});var w0=E(N_=>{"use strict";Object.defineProperty(N_,"__esModule",{value:!0});N_.RequireInTheMiddleSingleton=void 0;var Lpe=xm(),U0=require("path"),wm=x0(),Dpe=["afterEach","after","beforeEach","before","describe","it"].every(t=>typeof global[t]=="function"),Vm=class t{constructor(){this._moduleNameTrie=new wm.ModuleNameTrie,this._initialize()}_initialize(){new Lpe.Hook(null,{internals:!0},(e,r,n)=>{let o=xpe(r),s=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:n===void 0});for(let{onRequire:i}of s)e=i(e,r,n);return e})}register(e,r){let n={moduleName:e,onRequire:r};return this._moduleNameTrie.insert(n),n}static getInstance(){var e;return Dpe?new t:this._instance=(e=this._instance)!==null&&e!==void 0?e:new t}};N_.RequireInTheMiddleSingleton=Vm;function xpe(t){return U0.sep!==wm.ModuleNameSeparator?t.split(U0.sep).join(wm.ModuleNameSeparator):t}});var F0=E(Ms=>{var V0=[],Bm=new WeakMap,B0=new WeakMap,G0=new Map,H0=[],Upe={set(t,e,r){return Bm.get(t)[e](r)},get(t,e){if(e===Symbol.toStringTag)return"Module";let r=B0.get(t)[e];if(typeof r=="function")return r()},defineProperty(t,e,r){if(!("value"in r))throw new Error("Getters/setters are not supported for exports property descriptors.");return Bm.get(t)[e](r.value)}};function wpe(t,e,r,n,o){G0.set(t,o),Bm.set(e,r),B0.set(e,n);let s=new Proxy(e,Upe);V0.forEach(i=>i(t,s)),H0.push([t,s])}var k0=!1;function Vpe(){return k0}function Bpe(t){k0=t}Ms.register=wpe;Ms.importHooks=V0;Ms.specifiers=G0;Ms.toHook=H0;Ms.getExperimentalPatchInternals=Vpe;Ms.setExperimentalPatchInternals=Bpe});var I_=E((ZBe,bi)=>{var q0=require("path"),Gpe=mm(),{fileURLToPath:j0}=require("url"),{MessageChannel:Hpe}=require("worker_threads"),{importHooks:Gm,specifiers:kpe,toHook:Fpe,getExperimentalPatchInternals:qpe}=F0();function $0(t){Gm.push(t),Fpe.forEach(([e,r])=>t(e,r))}function K0(t){let e=Gm.indexOf(t);e>-1&&Gm.splice(e,1)}function Y0(t,e,r,n){let o=t(e,r,n);o&&o!==e&&(e.default=o)}var Hm;function jpe(){let{port1:t,port2:e}=new Hpe,r=0,n;Hm=a=>{r++,t.postMessage(a)},t.on("message",()=>{r--,n&&r<=0&&n()}).unref();function o(){let a=setInterval(()=>{},1e3),c=new Promise(u=>{n=u}).then(()=>{clearInterval(a)});return r===0&&n(),c}let s=e;return{registerOptions:{data:{addHookMessagePort:s,include:[]},transferList:[s]},addHookMessagePort:s,waitForAllMessagesAcknowledged:o}}function qc(t,e,r){if(!(this instanceof qc))return new qc(t,e,r);typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null);let n=e?e.internals===!0:!1;Hm&&Array.isArray(t)&&Hm(t),this._iitmHook=(o,s)=>{let i=o,a=o.startsWith("node:"),c;if(a)o=o.replace(/^node:/,"");else{if(o.startsWith("file://"))try{o=j0(o)}catch{}let u=Gpe(o);u&&(o=u.name,c=u.basedir)}if(t){for(let u of t)if(u===o){if(c){if(n)o=o+q0.sep+q0.relative(c,j0(i));else if(!qpe()&&!c.endsWith(kpe.get(i)))continue}Y0(r,s,o,c)}}else Y0(r,s,o,c)},$0(this._iitmHook)}qc.prototype.unhook=function(){K0(this._iitmHook)};bi.exports=qc;bi.exports.Hook=qc;bi.exports.addHook=$0;bi.exports.removeHook=K0;bi.exports.createAddHookMessageChannel=jpe});var km=E(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.isWrapped=To.safeExecuteInTheMiddleAsync=To.safeExecuteInTheMiddle=void 0;function Ype(t,e,r){let n,o;try{o=t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}To.safeExecuteInTheMiddle=Ype;async function $pe(t,e,r){let n,o;try{o=await t()}catch(s){n=s}finally{if(e(n,o),n&&!r)throw n;return o}}To.safeExecuteInTheMiddleAsync=$pe;function Kpe(t){return typeof t=="function"&&typeof t.__original=="function"&&typeof t.__unwrap=="function"&&t.__wrapped===!0}To.isWrapped=Kpe});var z0=E(P_=>{"use strict";Object.defineProperty(P_,"__esModule",{value:!0});P_.InstrumentationBase=void 0;var jc=require("path"),W0=require("util"),Wpe=rm(),Fm=lm(),Xpe=GU(),zpe=w0(),Qpe=I_(),Yc=(M(),P(U)),Jpe=xm(),Zpe=require("fs"),e_e=km(),qm=class extends Xpe.InstrumentationAbstract{constructor(e,r,n){super(e,r,n),this._hooks=[],this._requireInTheMiddleSingleton=zpe.RequireInTheMiddleSingleton.getInstance(),this._enabled=!1,this._wrap=(s,i,a)=>{if((0,e_e.isWrapped)(s[i])&&this._unwrap(s,i),W0.types.isProxy(s)){let c=(0,Fm.wrap)(Object.assign({},s),i,a);return Object.defineProperty(s,i,{value:c}),c}else return(0,Fm.wrap)(s,i,a)},this._unwrap=(s,i)=>W0.types.isProxy(s)?Object.defineProperty(s,i,{value:s[i]}):(0,Fm.unwrap)(s,i),this._massWrap=(s,i,a)=>{if(s)Array.isArray(s)||(s=[s]);else{Yc.diag.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){Yc.diag.error("must provide one or more functions to wrap on modules");return}s.forEach(c=>{i.forEach(u=>{this._wrap(c,u,a)})})},this._massUnwrap=(s,i)=>{if(s)Array.isArray(s)||(s=[s]);else{Yc.diag.error("must provide one or more modules to patch");return}if(!(i&&Array.isArray(i))){Yc.diag.error("must provide one or more functions to wrap on modules");return}s.forEach(a=>{i.forEach(c=>{this._unwrap(a,c)})})};let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_warnOnPreloadedModules(){this._modules.forEach(e=>{let{name:r}=e;try{let n=require.resolve(r);require.cache[n]&&this._diag.warn(`Module ${r} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${r}`)}catch{}})}_extractPackageVersion(e){try{let r=(0,Zpe.readFileSync)(jc.join(e,"package.json"),{encoding:"utf8"}),n=JSON.parse(r).version;return typeof n=="string"?n:void 0}catch{Yc.diag.warn("Failed extracting version",e)}}_onRequire(e,r,n,o){var s;if(!o)return typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:e.name}),e.patch(r)):r;let i=this._extractPackageVersion(o);if(e.moduleVersion=i,e.name===n)return X0(e.supportedVersions,i,e.includePrerelease)&&typeof e.patch=="function"&&(e.moduleExports=r,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:e.name,version:e.moduleVersion,baseDir:o}),e.patch(r,e.moduleVersion)):r;let a=(s=e.files)!==null&&s!==void 0?s:[],c=jc.normalize(n);return a.filter(l=>l.name===c).filter(l=>X0(l.supportedVersions,i,e.includePrerelease)).reduce((l,p)=>(p.moduleExports=l,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:e.name,version:e.moduleVersion,fileName:p.name,baseDir:o}),p.patch(l,e.moduleVersion)):l),r)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let e of this._modules){typeof e.patch=="function"&&e.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:e.name,version:e.moduleVersion}),e.patch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.patch(r.moduleExports,e.moduleVersion))}return}this._warnOnPreloadedModules();for(let e of this._modules){let r=(i,a,c)=>{if(!c&&jc.isAbsolute(a)){let u=jc.parse(a);a=u.name,c=u.dir}return this._onRequire(e,i,a,c)},n=(i,a,c)=>this._onRequire(e,i,a,c),o=jc.isAbsolute(e.name)?new Jpe.Hook([e.name],{internals:!0},n):this._requireInTheMiddleSingleton.register(e.name,n);this._hooks.push(o);let s=new Qpe.Hook([e.name],{internals:!1},r);this._hooks.push(s)}}}disable(){if(this._enabled){this._enabled=!1;for(let e of this._modules){typeof e.unpatch=="function"&&e.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:e.name,version:e.moduleVersion}),e.unpatch(e.moduleExports,e.moduleVersion));for(let r of e.files)r.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:e.name,version:e.moduleVersion,fileName:r.name}),r.unpatch(r.moduleExports,e.moduleVersion))}}}isEnabled(){return this._enabled}};P_.InstrumentationBase=qm;function X0(t,e,r){return typeof e>"u"?t.includes("*"):t.some(n=>(0,Wpe.satisfies)(e,n,{includePrerelease:r}))}});var Q0=E(C_=>{"use strict";Object.defineProperty(C_,"__esModule",{value:!0});C_.normalize=void 0;var t_e=require("path");Object.defineProperty(C_,"normalize",{enumerable:!0,get:function(){return t_e.normalize}})});var J0=E(Li=>{"use strict";Object.defineProperty(Li,"__esModule",{value:!0});Li.normalize=Li.InstrumentationBase=void 0;var r_e=z0();Object.defineProperty(Li,"InstrumentationBase",{enumerable:!0,get:function(){return r_e.InstrumentationBase}});var n_e=Q0();Object.defineProperty(Li,"normalize",{enumerable:!0,get:function(){return n_e.normalize}})});var jm=E(Di=>{"use strict";Object.defineProperty(Di,"__esModule",{value:!0});Di.normalize=Di.InstrumentationBase=void 0;var Z0=J0();Object.defineProperty(Di,"InstrumentationBase",{enumerable:!0,get:function(){return Z0.InstrumentationBase}});Object.defineProperty(Di,"normalize",{enumerable:!0,get:function(){return Z0.normalize}})});var ew=E(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});y_.InstrumentationNodeModuleDefinition=void 0;var Ym=class{constructor(e,r,n,o,s){this.name=e,this.supportedVersions=r,this.patch=n,this.unpatch=o,this.files=s||[]}};y_.InstrumentationNodeModuleDefinition=Ym});var tw=E(M_=>{"use strict";Object.defineProperty(M_,"__esModule",{value:!0});M_.InstrumentationNodeModuleFile=void 0;var o_e=jm(),$m=class{constructor(e,r,n,o){this.supportedVersions=r,this.patch=n,this.unpatch=o,this.name=(0,o_e.normalize)(e)}};M_.InstrumentationNodeModuleFile=$m});var ee=E(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.safeExecuteInTheMiddleAsync=ht.safeExecuteInTheMiddle=ht.isWrapped=ht.InstrumentationNodeModuleFile=ht.InstrumentationNodeModuleDefinition=ht.InstrumentationBase=ht.registerInstrumentations=void 0;var s_e=UU();Object.defineProperty(ht,"registerInstrumentations",{enumerable:!0,get:function(){return s_e.registerInstrumentations}});var i_e=jm();Object.defineProperty(ht,"InstrumentationBase",{enumerable:!0,get:function(){return i_e.InstrumentationBase}});var a_e=ew();Object.defineProperty(ht,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return a_e.InstrumentationNodeModuleDefinition}});var c_e=tw();Object.defineProperty(ht,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return c_e.InstrumentationNodeModuleFile}});var Km=km();Object.defineProperty(ht,"isWrapped",{enumerable:!0,get:function(){return Km.isWrapped}});Object.defineProperty(ht,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return Km.safeExecuteInTheMiddle}});Object.defineProperty(ht,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return Km.safeExecuteInTheMiddleAsync}})});var rw=E($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.AttributeNames=void 0;var u_e;(function(t){t.HTTP_ERROR_NAME="http.error_name",t.HTTP_ERROR_MESSAGE="http.error_message",t.HTTP_STATUS_TEXT="http.status_text"})(u_e=$c.AttributeNames||($c.AttributeNames={}))});var ow=E((uGe,nw)=>{"use strict";var l_e=require("util");function Wm(t,e){Error.captureStackTrace(this,Wm),this.name=this.constructor.name,this.message=t,this.input=e}l_e.inherits(Wm,Error);nw.exports=Wm});var iw=E((lGe,sw)=>{"use strict";function p_e(t){return t===34||t===40||t===41||t===44||t===47||t>=58&&t<=64||t>=91&&t<=93||t===123||t===125}function __e(t){return t===33||t>=35&&t<=39||t===42||t===43||t===45||t===46||t>=48&&t<=57||t>=65&&t<=90||t>=94&&t<=122||t===124||t===126}function d_e(t){return t>=32&&t<=126}function E_e(t){return t>=128&&t<=255}sw.exports={isDelimiter:p_e,isTokenChar:__e,isExtended:E_e,isPrint:d_e}});var pw=E((pGe,lw)=>{"use strict";var f_e=require("util"),xi=ow(),v_=iw(),S_e=v_.isDelimiter,aw=v_.isTokenChar,cw=v_.isExtended,T_e=v_.isPrint;function uw(t){return t.replace(/\\(.)/g,"$1")}function Kc(t,e){return f_e.format("Unexpected character '%s' at index %d",t.charAt(e),e)}function m_e(t){for(var e=!1,r=!1,n=!1,o={},s=[],i=-1,a=-1,c,u,l=0;l<t.length;l++)if(u=t.charCodeAt(l),c===void 0){if(l!==0&&i===-1&&(u===32||u===9))continue;if(aw(u))i===-1&&(i=l);else if(u===61&&i!==-1)c=t.slice(i,l).toLowerCase(),i=-1;else throw new xi(Kc(t,l),t)}else if(r&&(u===9||T_e(u)||cw(u)))r=!1;else if(aw(u)){if(a!==-1)throw new xi(Kc(t,l),t);i===-1&&(i=l)}else if(S_e(u)||cw(u))if(n)u===34?(n=!1,a=l):u===92?(i===-1&&(i=l),r=e=!0):i===-1&&(i=l);else if(u===34&&t.charCodeAt(l-1)===61)n=!0;else if((u===44||u===59)&&(i!==-1||a!==-1))i!==-1?(a===-1&&(a=l),o[c]=e?uw(t.slice(i,a)):t.slice(i,a)):o[c]="",u===44&&(s.push(o),o={}),c=void 0,i=a=-1;else throw new xi(Kc(t,l),t);else if(u===32||u===9){if(a!==-1)continue;if(n)i===-1&&(i=l);else if(i!==-1)a=l;else throw new xi(Kc(t,l),t)}else throw new xi(Kc(t,l),t);if(c===void 0||n||i===-1&&a===-1||u===32||u===9)throw new xi("Unexpected end of input",t);return i!==-1?(a===-1&&(a=l),o[c]=e?uw(t.slice(i,a)):t.slice(i,a)):o[c]="",s.push(o),s}lw.exports=m_e});var Tw=E(G=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});G.headerCapture=G.getIncomingStableRequestMetricAttributesOnResponse=G.getIncomingRequestMetricAttributesOnResponse=G.getIncomingRequestAttributesOnResponse=G.getIncomingRequestMetricAttributes=G.getIncomingRequestAttributes=G.getRemoteClientAddress=G.getOutgoingRequestMetricAttributesOnResponse=G.getOutgoingRequestAttributesOnResponse=G.setAttributesFromHttpKind=G.getOutgoingRequestMetricAttributes=G.getOutgoingRequestAttributes=G.extractHostnameAndPort=G.isValidOptionsType=G.getRequestInfo=G.isCompressed=G.setResponseContentLengthAttribute=G.setRequestContentLengthAttribute=G.setSpanWithError=G.satisfiesPattern=G.parseResponseStatus=G.getAbsoluteUrl=void 0;var Wc=(M(),P(U)),y=(dr(),P(_r)),_w=re(),h_e=require("url"),b_=rw(),g_e=pw(),A_e=(t,e,r="http:")=>{let n=t||{},o=n.protocol||r,s=(n.port||"").toString(),i=n.path||"/",a=n.host||n.hostname||e.host||"localhost";return a.indexOf(":")===-1&&s&&s!=="80"&&s!=="443"&&(a+=`:${s}`),`${o}//${a}${i}`};G.getAbsoluteUrl=A_e;var R_e=(t,e)=>{let r=t===Wc.SpanKind.CLIENT?400:500;return e&&e>=100&&e<r?Wc.SpanStatusCode.UNSET:Wc.SpanStatusCode.ERROR};G.parseResponseStatus=R_e;var O_e=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")};G.satisfiesPattern=O_e;var N_e=(t,e,r)=>{let n=e.message;(r&2)===2&&(t.setAttribute(b_.AttributeNames.HTTP_ERROR_NAME,e.name),t.setAttribute(b_.AttributeNames.HTTP_ERROR_MESSAGE,n)),(r&1)===1&&t.setAttribute(y.ATTR_ERROR_TYPE,e.name),t.setStatus({code:Wc.SpanStatusCode.ERROR,message:n}),t.recordException(e)};G.setSpanWithError=N_e;var I_e=(t,e)=>{let r=dw(t.headers);r!==null&&((0,G.isCompressed)(t.headers)?e[y.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH]=r:e[y.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED]=r)};G.setRequestContentLengthAttribute=I_e;var P_e=(t,e)=>{let r=dw(t.headers);r!==null&&((0,G.isCompressed)(t.headers)?e[y.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]=r:e[y.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED]=r)};G.setResponseContentLengthAttribute=P_e;function dw(t){let e=t["content-length"];if(e===void 0)return null;let r=parseInt(e,10);return isNaN(r)?null:r}var C_e=t=>{let e=t["content-encoding"];return!!e&&e!=="identity"};G.isCompressed=C_e;function y_e(t){let{hostname:e,pathname:r,port:n,username:o,password:s,search:i,protocol:a,hash:c,href:u,origin:l,host:p}=new URL(t),_={protocol:a,hostname:e&&e[0]==="["?e.slice(1,-1):e,hash:c,search:i,pathname:r,path:`${r||""}${i||""}`,href:u,origin:l,host:p};return n!==""&&(_.port=Number(n)),(o||s)&&(_.auth=`${decodeURIComponent(o)}:${decodeURIComponent(s)}`),_}var M_e=(t,e,r)=>{let n,o,s,i=!1;if(typeof e=="string"){try{let c=y_e(e);s=c,n=c.pathname||"/"}catch(c){i=!0,t.verbose("Unable to parse URL provided to HTTP request, using fallback to determine path. Original error:",c),s={path:e},n=s.path||"/"}o=`${s.protocol||"http:"}//${s.host}`,r!==void 0&&Object.assign(s,r)}else if(e instanceof h_e.URL)s={protocol:e.protocol,hostname:typeof e.hostname=="string"&&e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,path:`${e.pathname||""}${e.search||""}`},e.port!==""&&(s.port=Number(e.port)),(e.username||e.password)&&(s.auth=`${e.username}:${e.password}`),n=e.pathname,o=e.origin,r!==void 0&&Object.assign(s,r);else{s=Object.assign({protocol:e.host?"http:":void 0},e);let c=s.host||(s.port!=null?`${s.hostname}${s.port}`:s.hostname);if(o=`${s.protocol||"http:"}//${c}`,n=e.pathname,!n&&s.path)try{n=new URL(s.path,o).pathname||"/"}catch{n="/"}}let a=s.method?s.method.toUpperCase():"GET";return{origin:o,pathname:n,method:a,optionsParsed:s,invalidUrl:i}};G.getRequestInfo=M_e;var v_e=t=>{if(!t)return!1;let e=typeof t;return e==="string"||e==="object"&&!Array.isArray(t)};G.isValidOptionsType=v_e;var b_e=t=>{var e;if(t.hostname&&t.port)return{hostname:t.hostname,port:t.port};let r=((e=t.host)===null||e===void 0?void 0:e.match(/^([^:/ ]+)(:\d{1,5})?/))||null,n=t.hostname||(r===null?"localhost":r[1]),o=t.port;return o||(r&&r[2]?o=r[2].substring(1):o=t.protocol==="https:"?"443":"80"),{hostname:n,port:o}};G.extractHostnameAndPort=b_e;var L_e=(t,e,r)=>{var n,o;let s=e.hostname,i=e.port,a=(n=t.method)!==null&&n!==void 0?n:"GET",c=fw(a),u=t.headers||{},l=u["user-agent"],p=(0,G.getAbsoluteUrl)(t,u,`${e.component}:`),_={[y.SEMATTRS_HTTP_URL]:p,[y.SEMATTRS_HTTP_METHOD]:a,[y.SEMATTRS_HTTP_TARGET]:t.path||"/",[y.SEMATTRS_NET_PEER_NAME]:s,[y.SEMATTRS_HTTP_HOST]:(o=u.host)!==null&&o!==void 0?o:`${s}:${i}`},d={[y.ATTR_HTTP_REQUEST_METHOD]:c,[y.ATTR_SERVER_ADDRESS]:s,[y.ATTR_SERVER_PORT]:Number(i),[y.ATTR_URL_FULL]:p};switch(a!==c&&(d[y.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=a),l!==void 0&&(_[y.SEMATTRS_HTTP_USER_AGENT]=l),r){case 1:return Object.assign(d,e.hookAttributes);case 2:return Object.assign(_,e.hookAttributes)}return Object.assign(_,d,e.hookAttributes)};G.getOutgoingRequestAttributes=L_e;var D_e=t=>{let e={};return e[y.SEMATTRS_HTTP_METHOD]=t[y.SEMATTRS_HTTP_METHOD],e[y.SEMATTRS_NET_PEER_NAME]=t[y.SEMATTRS_NET_PEER_NAME],e};G.getOutgoingRequestMetricAttributes=D_e;var x_e=(t,e)=>{t&&(e[y.SEMATTRS_HTTP_FLAVOR]=t,t.toUpperCase()!=="QUIC"?e[y.SEMATTRS_NET_TRANSPORT]=y.NETTRANSPORTVALUES_IP_TCP:e[y.SEMATTRS_NET_TRANSPORT]=y.NETTRANSPORTVALUES_IP_UDP)};G.setAttributesFromHttpKind=x_e;var U_e=(t,e)=>{let{statusCode:r,statusMessage:n,httpVersion:o,socket:s}=t,i={},a={};if(r!=null&&(a[y.ATTR_HTTP_RESPONSE_STATUS_CODE]=r),s){let{remoteAddress:c,remotePort:u}=s;i[y.SEMATTRS_NET_PEER_IP]=c,i[y.SEMATTRS_NET_PEER_PORT]=u,a[y.ATTR_NETWORK_PEER_ADDRESS]=c,a[y.ATTR_NETWORK_PEER_PORT]=u,a[y.ATTR_NETWORK_PROTOCOL_VERSION]=t.httpVersion}switch((0,G.setResponseContentLengthAttribute)(t,i),r&&(i[y.SEMATTRS_HTTP_STATUS_CODE]=r,i[b_.AttributeNames.HTTP_STATUS_TEXT]=(n||"").toUpperCase()),(0,G.setAttributesFromHttpKind)(o,i),e){case 1:return a;case 2:return i}return Object.assign(i,a)};G.getOutgoingRequestAttributesOnResponse=U_e;var w_e=t=>{let e={};return e[y.SEMATTRS_NET_PEER_PORT]=t[y.SEMATTRS_NET_PEER_PORT],e[y.SEMATTRS_HTTP_STATUS_CODE]=t[y.SEMATTRS_HTTP_STATUS_CODE],e[y.SEMATTRS_HTTP_FLAVOR]=t[y.SEMATTRS_HTTP_FLAVOR],e};G.getOutgoingRequestMetricAttributesOnResponse=w_e;function mo(t,e){let r=t.split(":");if(r.length===1)return e==="http"?{host:r[0],port:"80"}:e==="https"?{host:r[0],port:"443"}:{host:r[0]};if(r.length===2)return{host:r[0],port:r[1]};if(r[0].startsWith("[")){if(r[r.length-1].endsWith("]")){if(e==="http")return{host:t,port:"80"};if(e==="https")return{host:t,port:"443"}}else if(r[r.length-2].endsWith("]"))return{host:r.slice(0,-1).join(":"),port:r[r.length-1]}}return{host:t}}function V_e(t,e){let r=t.headers.forwarded;if(r){for(let s of Sw(r))if(s.host)return mo(s.host,s.proto)}let n=t.headers["x-forwarded-host"];if(typeof n=="string")return typeof t.headers["x-forwarded-proto"]=="string"?mo(n,t.headers["x-forwarded-proto"]):Array.isArray(t.headers["x-forwarded-proto"])?mo(n,t.headers["x-forwarded-proto"][0]):mo(n);if(Array.isArray(n)&&typeof n[0]=="string"&&n[0].length>0)return typeof t.headers["x-forwarded-proto"]=="string"?mo(n[0],t.headers["x-forwarded-proto"]):Array.isArray(t.headers["x-forwarded-proto"])?mo(n[0],t.headers["x-forwarded-proto"][0]):mo(n[0]);let o=t.headers.host;return typeof o=="string"&&o.length>0?mo(o,e):null}function Ew(t){let e=t.headers.forwarded;if(e){for(let o of Sw(e))if(o.for)return o.for}let r=t.headers["x-forwarded-for"];if(typeof r=="string")return r;if(Array.isArray(r))return r[0];let n=t.socket.remoteAddress;return n||null}G.getRemoteClientAddress=Ew;function B_e(t,e,r){var n,o;try{if(e.headers.host)return new URL((n=e.url)!==null&&n!==void 0?n:"/",`${t}://${e.headers.host}`);{let s=new URL((o=e.url)!==null&&o!==void 0?o:"/",`${t}://localhost`);return{pathname:s.pathname,search:s.search,toString:function(){return s.pathname+s.search}}}}catch(s){return r.verbose("Unable to get URL from request",s),{}}}var G_e=(t,e,r)=>{let n=t.headers,o=n["user-agent"],s=n["x-forwarded-for"],i=t.httpVersion,a=n.host,c=a?.replace(/^(.*)(:[0-9]{1,5})/,"$1")||"localhost",u=t.method,l=fw(u),p=V_e(t,e.component),_=e.serverName,d=Ew(t),S={[y.ATTR_HTTP_REQUEST_METHOD]:l,[y.ATTR_URL_SCHEME]:e.component,[y.ATTR_SERVER_ADDRESS]:p?.host,[y.ATTR_NETWORK_PEER_ADDRESS]:t.socket.remoteAddress,[y.ATTR_NETWORK_PEER_PORT]:t.socket.remotePort,[y.ATTR_NETWORK_PROTOCOL_VERSION]:t.httpVersion,[y.ATTR_USER_AGENT_ORIGINAL]:o},f=B_e(e.component,t,r);f?.pathname!=null&&(S[y.ATTR_URL_PATH]=f.pathname),d!=null&&(S[y.ATTR_CLIENT_ADDRESS]=d),p?.port!=null&&(S[y.ATTR_SERVER_PORT]=Number(p.port)),u!==l&&(S[y.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]=u);let T={[y.SEMATTRS_HTTP_URL]:f.toString(),[y.SEMATTRS_HTTP_HOST]:a,[y.SEMATTRS_NET_HOST_NAME]:c,[y.SEMATTRS_HTTP_METHOD]:u,[y.SEMATTRS_HTTP_SCHEME]:e.component};switch(typeof s=="string"&&(T[y.SEMATTRS_HTTP_CLIENT_IP]=s.split(",")[0]),typeof _=="string"&&(T[y.SEMATTRS_HTTP_SERVER_NAME]=_),f?.pathname&&(T[y.SEMATTRS_HTTP_TARGET]=f?.pathname+f?.search||"/"),o!==void 0&&(T[y.SEMATTRS_HTTP_USER_AGENT]=o),(0,G.setRequestContentLengthAttribute)(t,T),(0,G.setAttributesFromHttpKind)(i,T),e.semconvStability){case 1:return Object.assign(S,e.hookAttributes);case 2:return Object.assign(T,e.hookAttributes)}return Object.assign(T,S,e.hookAttributes)};G.getIncomingRequestAttributes=G_e;var H_e=t=>{let e={};return e[y.SEMATTRS_HTTP_SCHEME]=t[y.SEMATTRS_HTTP_SCHEME],e[y.SEMATTRS_HTTP_METHOD]=t[y.SEMATTRS_HTTP_METHOD],e[y.SEMATTRS_NET_HOST_NAME]=t[y.SEMATTRS_NET_HOST_NAME],e[y.SEMATTRS_HTTP_FLAVOR]=t[y.SEMATTRS_HTTP_FLAVOR],e};G.getIncomingRequestMetricAttributes=H_e;var k_e=(t,e,r)=>{let{socket:n}=t,{statusCode:o,statusMessage:s}=e,i={[y.ATTR_HTTP_RESPONSE_STATUS_CODE]:o},a=(0,_w.getRPCMetadata)(Wc.context.active()),c={};if(n){let{localAddress:u,localPort:l,remoteAddress:p,remotePort:_}=n;c[y.SEMATTRS_NET_HOST_IP]=u,c[y.SEMATTRS_NET_HOST_PORT]=l,c[y.SEMATTRS_NET_PEER_IP]=p,c[y.SEMATTRS_NET_PEER_PORT]=_}switch(c[y.SEMATTRS_HTTP_STATUS_CODE]=o,c[b_.AttributeNames.HTTP_STATUS_TEXT]=(s||"").toUpperCase(),a?.type===_w.RPCType.HTTP&&a.route!==void 0&&(c[y.SEMATTRS_HTTP_ROUTE]=a.route,i[y.ATTR_HTTP_ROUTE]=a.route),r){case 1:return i;case 2:return c}return Object.assign(c,i)};G.getIncomingRequestAttributesOnResponse=k_e;var F_e=t=>{let e={};return e[y.SEMATTRS_HTTP_STATUS_CODE]=t[y.SEMATTRS_HTTP_STATUS_CODE],e[y.SEMATTRS_NET_HOST_PORT]=t[y.SEMATTRS_NET_HOST_PORT],t[y.SEMATTRS_HTTP_ROUTE]!==void 0&&(e[y.SEMATTRS_HTTP_ROUTE]=t[y.SEMATTRS_HTTP_ROUTE]),e};G.getIncomingRequestMetricAttributesOnResponse=F_e;var q_e=t=>{let e={};return t[y.ATTR_HTTP_ROUTE]!==void 0&&(e[y.ATTR_HTTP_ROUTE]=t[y.SEMATTRS_HTTP_ROUTE]),t[y.ATTR_HTTP_RESPONSE_STATUS_CODE]&&(e[y.ATTR_HTTP_RESPONSE_STATUS_CODE]=t[y.ATTR_HTTP_RESPONSE_STATUS_CODE]),e};G.getIncomingStableRequestMetricAttributesOnResponse=q_e;function j_e(t,e){let r=new Map;for(let n=0,o=e.length;n<o;n++){let s=e[n].toLowerCase();r.set(s,s.replace(/-/g,"_"))}return(n,o)=>{for(let s of r.keys()){let i=o(s);if(i===void 0)continue;let a=r.get(s),c=`http.${t}.header.${a}`;typeof i=="string"?n.setAttribute(c,[i]):Array.isArray(i)?n.setAttribute(c,i):n.setAttribute(c,[i])}}}G.headerCapture=j_e;var Y_e=new Set(["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"]);function fw(t){if(t==null)return"GET";let e=t.toUpperCase();return Y_e.has(e)?e:"_OTHER"}function Sw(t){try{return g_e(t)}catch{return[]}}});var hw=E(L_=>{"use strict";Object.defineProperty(L_,"__esModule",{value:!0});L_.HttpInstrumentation=void 0;var q=(M(),P(U)),Ui=re(),mw=rm(),$_e=require("url"),K_e=RU(),hr=ee(),Xm=re(),zm=require("events"),ye=(dr(),P(_r)),Oe=Tw(),Qm=class extends hr.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-http",K_e.VERSION,e),this._spanNotEnded=new WeakSet,this._semconvStability=2,this._headerCapture=this._createHeaderCapture();for(let r of(0,Xm.getEnv)().OTEL_SEMCONV_STABILITY_OPT_IN)if(r.toLowerCase()==="http/dup"){this._semconvStability=3;break}else r.toLowerCase()==="http"&&(this._semconvStability=1)}_updateMetricInstruments(){this._oldHttpServerDurationHistogram=this.meter.createHistogram("http.server.duration",{description:"Measures the duration of inbound HTTP requests.",unit:"ms",valueType:q.ValueType.DOUBLE}),this._oldHttpClientDurationHistogram=this.meter.createHistogram("http.client.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"ms",valueType:q.ValueType.DOUBLE}),this._stableHttpServerDurationHistogram=this.meter.createHistogram(ye.METRIC_HTTP_SERVER_REQUEST_DURATION,{description:"Duration of HTTP server requests.",unit:"s",valueType:q.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}}),this._stableHttpClientDurationHistogram=this.meter.createHistogram(ye.METRIC_HTTP_CLIENT_REQUEST_DURATION,{description:"Duration of HTTP client requests.",unit:"s",valueType:q.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}})}_recordServerDuration(e,r,n){(this._semconvStability&2)===2&&this._oldHttpServerDurationHistogram.record(e,r),(this._semconvStability&1)===1&&this._stableHttpServerDurationHistogram.record(e/1e3,n)}_recordClientDuration(e,r,n){(this._semconvStability&2)===2&&this._oldHttpClientDurationHistogram.record(e,r),(this._semconvStability&1)===1&&this._stableHttpClientDurationHistogram.record(e/1e3,n)}setConfig(e={}){super.setConfig(e),this._headerCapture=this._createHeaderCapture()}init(){return[this._getHttpsInstrumentation(),this._getHttpInstrumentation()]}_getHttpInstrumentation(){return new hr.InstrumentationNodeModuleDefinition("http",["*"],e=>{let r=e[Symbol.toStringTag]==="Module";if(!this.getConfig().disableOutgoingRequestInstrumentation){let n=this._wrap(e,"request",this._getPatchOutgoingRequestFunction("http")),o=this._wrap(e,"get",this._getPatchOutgoingGetFunction(n));r&&(e.default.request=n,e.default.get=o)}return this.getConfig().disableIncomingRequestInstrumentation||this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("http")),e},e=>{e!==void 0&&(this.getConfig().disableOutgoingRequestInstrumentation||(this._unwrap(e,"request"),this._unwrap(e,"get")),this.getConfig().disableIncomingRequestInstrumentation||this._unwrap(e.Server.prototype,"emit"))})}_getHttpsInstrumentation(){return new hr.InstrumentationNodeModuleDefinition("https",["*"],e=>{let r=e[Symbol.toStringTag]==="Module";if(!this.getConfig().disableOutgoingRequestInstrumentation){let n=this._wrap(e,"request",this._getPatchHttpsOutgoingRequestFunction("https")),o=this._wrap(e,"get",this._getPatchHttpsOutgoingGetFunction(n));r&&(e.default.request=n,e.default.get=o)}return this.getConfig().disableIncomingRequestInstrumentation||this._wrap(e.Server.prototype,"emit",this._getPatchIncomingRequestFunction("https")),e},e=>{e!==void 0&&(this.getConfig().disableOutgoingRequestInstrumentation||(this._unwrap(e,"request"),this._unwrap(e,"get")),this.getConfig().disableIncomingRequestInstrumentation||this._unwrap(e.Server.prototype,"emit"))})}_getPatchIncomingRequestFunction(e){return r=>this._incomingRequestFunction(e,r)}_getPatchOutgoingRequestFunction(e){return r=>this._outgoingRequestFunction(e,r)}_getPatchOutgoingGetFunction(e){return r=>function(o,...s){let i=e(o,...s);return i.end(),i}}_getPatchHttpsOutgoingRequestFunction(e){return r=>{let n=this;return function(s,...i){var a;return e==="https"&&typeof s=="object"&&((a=s?.constructor)===null||a===void 0?void 0:a.name)!=="URL"&&(s=Object.assign({},s),n._setDefaultOptions(s)),n._getPatchOutgoingRequestFunction(e)(r)(s,...i)}}}_setDefaultOptions(e){e.protocol=e.protocol||"https:",e.port=e.port||443}_getPatchHttpsOutgoingGetFunction(e){return r=>{let n=this;return function(s,...i){return n._getPatchOutgoingGetFunction(e)(r)(s,...i)}}}_traceClientRequest(e,r,n,o,s){this.getConfig().requestHook&&this._callRequestHook(r,e);let i=!1;return e.prependListener("response",a=>{this._diag.debug("outgoingRequest on response()"),e.listenerCount("response")<=1&&a.resume();let c=(0,Oe.getOutgoingRequestAttributesOnResponse)(a,this._semconvStability);r.setAttributes(c),o=Object.assign(o,(0,Oe.getOutgoingRequestMetricAttributesOnResponse)(c)),this.getConfig().responseHook&&this._callResponseHook(r,a),this._headerCapture.client.captureRequestHeaders(r,l=>e.getHeader(l)),this._headerCapture.client.captureResponseHeaders(r,l=>a.headers[l]),q.context.bind(q.context.active(),a);let u=()=>{if(this._diag.debug("outgoingRequest on end()"),i)return;i=!0;let l;a.aborted&&!a.complete?l={code:q.SpanStatusCode.ERROR}:l={code:(0,Oe.parseResponseStatus)(q.SpanKind.CLIENT,a.statusCode)},r.setStatus(l),this.getConfig().applyCustomAttributesOnSpan&&(0,hr.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(r,e,a),()=>{},!0),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s)};a.on("end",u),mw.lt(process.version,"16.0.0")&&a.on("close",u),a.on(zm.errorMonitor,l=>{this._diag.debug("outgoingRequest on error()",l),!i&&(i=!0,(0,Oe.setSpanWithError)(r,l,this._semconvStability),r.setStatus({code:q.SpanStatusCode.ERROR,message:l.message}),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))})}),e.on("close",()=>{this._diag.debug("outgoingRequest on request close()"),!(e.aborted||i)&&(i=!0,this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))}),e.on(zm.errorMonitor,a=>{this._diag.debug("outgoingRequest on request error()",a),!i&&(i=!0,(0,Oe.setSpanWithError)(r,a,this._semconvStability),this._closeHttpSpan(r,q.SpanKind.CLIENT,n,o,s))}),this._diag.debug("http.ClientRequest return request"),e}_incomingRequestFunction(e,r){let n=this;return function(s,...i){if(s!=="request")return r.apply(this,[s,...i]);let a=i[0],c=i[1],u=a.method||"GET";if(n._diag.debug(`${e} instrumentation incomingRequest`),(0,hr.safeExecuteInTheMiddle)(()=>{var N,I;return(I=(N=n.getConfig()).ignoreIncomingRequestHook)===null||I===void 0?void 0:I.call(N,a)},N=>{N!=null&&n._diag.error("caught ignoreIncomingRequestHook error: ",N)},!0))return q.context.with((0,Ui.suppressTracing)(q.context.active()),()=>(q.context.bind(q.context.active(),a),q.context.bind(q.context.active(),c),r.apply(this,[s,...i])));let l=a.headers,p=(0,Oe.getIncomingRequestAttributes)(a,{component:e,serverName:n.getConfig().serverName,hookAttributes:n._callStartSpanHook(a,n.getConfig().startIncomingSpanHook),semconvStability:n._semconvStability},n._diag),_={kind:q.SpanKind.SERVER,attributes:p},d=(0,Ui.hrTime)(),S=(0,Oe.getIncomingRequestMetricAttributes)(p),f={[ye.ATTR_HTTP_REQUEST_METHOD]:p[ye.ATTR_HTTP_REQUEST_METHOD],[ye.ATTR_URL_SCHEME]:p[ye.ATTR_URL_SCHEME]};p[ye.ATTR_NETWORK_PROTOCOL_VERSION]&&(f[ye.ATTR_NETWORK_PROTOCOL_VERSION]=p[ye.ATTR_NETWORK_PROTOCOL_VERSION]);let T=q.propagation.extract(q.ROOT_CONTEXT,l),h=n._startHttpSpan(u,_,T),A={type:Xm.RPCType.HTTP,span:h};return q.context.with((0,Xm.setRPCMetadata)(q.trace.setSpan(T,h),A),()=>{q.context.bind(q.context.active(),a),q.context.bind(q.context.active(),c),n.getConfig().requestHook&&n._callRequestHook(h,a),n.getConfig().responseHook&&n._callResponseHook(h,c),n._headerCapture.server.captureRequestHeaders(h,I=>a.headers[I]);let N=!1;return c.on("close",()=>{N||n._onServerResponseFinish(a,c,h,S,f,d)}),c.on(zm.errorMonitor,I=>{N=!0,n._onServerResponseError(h,S,f,d,I)}),(0,hr.safeExecuteInTheMiddle)(()=>r.apply(this,[s,...i]),I=>{if(I)throw(0,Oe.setSpanWithError)(h,I,n._semconvStability),n._closeHttpSpan(h,q.SpanKind.SERVER,d,S,f),I})})}}_outgoingRequestFunction(e,r){let n=this;return function(s,...i){if(!(0,Oe.isValidOptionsType)(s))return r.apply(this,[s,...i]);let a=typeof i[0]=="object"&&(typeof s=="string"||s instanceof $_e.URL)?i.shift():void 0,{method:c,invalidUrl:u,optionsParsed:l}=(0,Oe.getRequestInfo)(n._diag,s,a);if(e==="http"&&mw.lt(process.version,"9.0.0")&&l.protocol==="https:")return r.apply(this,[l,...i]);if((0,hr.safeExecuteInTheMiddle)(()=>{var O,b;return(b=(O=n.getConfig()).ignoreOutgoingRequestHook)===null||b===void 0?void 0:b.call(O,l)},O=>{O!=null&&n._diag.error("caught ignoreOutgoingRequestHook error: ",O)},!0))return r.apply(this,[l,...i]);let{hostname:p,port:_}=(0,Oe.extractHostnameAndPort)(l),d=(0,Oe.getOutgoingRequestAttributes)(l,{component:e,port:_,hostname:p,hookAttributes:n._callStartSpanHook(l,n.getConfig().startOutgoingSpanHook)},n._semconvStability),S=(0,Ui.hrTime)(),f=(0,Oe.getOutgoingRequestMetricAttributes)(d),T={[ye.ATTR_HTTP_REQUEST_METHOD]:d[ye.ATTR_HTTP_REQUEST_METHOD],[ye.ATTR_SERVER_ADDRESS]:d[ye.ATTR_SERVER_ADDRESS],[ye.ATTR_SERVER_PORT]:d[ye.ATTR_SERVER_PORT]};d[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]&&(T[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]=d[ye.ATTR_HTTP_RESPONSE_STATUS_CODE]),d[ye.ATTR_NETWORK_PROTOCOL_VERSION]&&(T[ye.ATTR_NETWORK_PROTOCOL_VERSION]=d[ye.ATTR_NETWORK_PROTOCOL_VERSION]);let h={kind:q.SpanKind.CLIENT,attributes:d},A=n._startHttpSpan(c,h),N=q.context.active(),I=q.trace.setSpan(N,A);return l.headers?l.headers=Object.assign({},l.headers):l.headers={},q.propagation.inject(I,l.headers),q.context.with(I,()=>{let O=i[i.length-1];typeof O=="function"&&(i[i.length-1]=q.context.bind(N,O));let b=(0,hr.safeExecuteInTheMiddle)(()=>u?r.apply(this,[s,...i]):r.apply(this,[l,...i]),v=>{if(v)throw(0,Oe.setSpanWithError)(A,v,n._semconvStability),n._closeHttpSpan(A,q.SpanKind.CLIENT,S,f,T),v});return n._diag.debug(`${e} instrumentation outgoingRequest`),q.context.bind(N,b),n._traceClientRequest(b,A,S,f,T)})}}_onServerResponseFinish(e,r,n,o,s,i){let a=(0,Oe.getIncomingRequestAttributesOnResponse)(e,r,this._semconvStability);o=Object.assign(o,(0,Oe.getIncomingRequestMetricAttributesOnResponse)(a)),s=Object.assign(s,(0,Oe.getIncomingStableRequestMetricAttributesOnResponse)(a)),this._headerCapture.server.captureResponseHeaders(n,u=>r.getHeader(u)),n.setAttributes(a).setStatus({code:(0,Oe.parseResponseStatus)(q.SpanKind.SERVER,r.statusCode)});let c=a[ye.SEMATTRS_HTTP_ROUTE];c&&n.updateName(`${e.method||"GET"} ${c}`),this.getConfig().applyCustomAttributesOnSpan&&(0,hr.safeExecuteInTheMiddle)(()=>this.getConfig().applyCustomAttributesOnSpan(n,e,r),()=>{},!0),this._closeHttpSpan(n,q.SpanKind.SERVER,i,o,s)}_onServerResponseError(e,r,n,o,s){(0,Oe.setSpanWithError)(e,s,this._semconvStability),this._closeHttpSpan(e,q.SpanKind.SERVER,o,r,n)}_startHttpSpan(e,r,n=q.context.active()){let o=r.kind===q.SpanKind.CLIENT?this.getConfig().requireParentforOutgoingSpans:this.getConfig().requireParentforIncomingSpans,s,i=q.trace.getSpan(n);return o===!0&&i===void 0?s=q.trace.wrapSpanContext(q.INVALID_SPAN_CONTEXT):o===!0&&i?.spanContext().isRemote?s=i:s=this.tracer.startSpan(e,r,n),this._spanNotEnded.add(s),s}_closeHttpSpan(e,r,n,o,s){if(!this._spanNotEnded.has(e))return;e.end(),this._spanNotEnded.delete(e);let i=(0,Ui.hrTimeToMilliseconds)((0,Ui.hrTimeDuration)(n,(0,Ui.hrTime)()));r===q.SpanKind.SERVER?this._recordServerDuration(i,o,s):r===q.SpanKind.CLIENT&&this._recordClientDuration(i,o,s)}_callResponseHook(e,r){(0,hr.safeExecuteInTheMiddle)(()=>this.getConfig().responseHook(e,r),()=>{},!0)}_callRequestHook(e,r){(0,hr.safeExecuteInTheMiddle)(()=>this.getConfig().requestHook(e,r),()=>{},!0)}_callStartSpanHook(e,r){if(typeof r=="function")return(0,hr.safeExecuteInTheMiddle)(()=>r(e),()=>{},!0)}_createHeaderCapture(){var e,r,n,o,s,i,a,c,u,l,p,_;let d=this.getConfig();return{client:{captureRequestHeaders:(0,Oe.headerCapture)("request",(n=(r=(e=d.headersToSpanAttributes)===null||e===void 0?void 0:e.client)===null||r===void 0?void 0:r.requestHeaders)!==null&&n!==void 0?n:[]),captureResponseHeaders:(0,Oe.headerCapture)("response",(i=(s=(o=d.headersToSpanAttributes)===null||o===void 0?void 0:o.client)===null||s===void 0?void 0:s.responseHeaders)!==null&&i!==void 0?i:[])},server:{captureRequestHeaders:(0,Oe.headerCapture)("request",(u=(c=(a=d.headersToSpanAttributes)===null||a===void 0?void 0:a.server)===null||c===void 0?void 0:c.requestHeaders)!==null&&u!==void 0?u:[]),captureResponseHeaders:(0,Oe.headerCapture)("response",(_=(p=(l=d.headersToSpanAttributes)===null||l===void 0?void 0:l.server)===null||p===void 0?void 0:p.responseHeaders)!==null&&_!==void 0?_:[])}}}};L_.HttpInstrumentation=Qm});var gw=E(D_=>{"use strict";Object.defineProperty(D_,"__esModule",{value:!0});D_.HttpInstrumentation=void 0;var W_e=hw();Object.defineProperty(D_,"HttpInstrumentation",{enumerable:!0,get:function(){return W_e.HttpInstrumentation}})});function Ge(t){let e={},r=t.length;for(let n=0;n<r;n++){let o=t[n];o&&(e[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return e}var ig=w(()=>{});var YV,$V,KV,WV,XV,zV,QV,JV,ZV,eB,tB,rB,nB,oB,sB,iB,aB,cB,uB,lB,pB,_B,dB,EB,fB,SB,TB,mB,hB,gB,AB,RB,OB,NB,IB,PB,CB,yB,MB,vB,bB,LB,DB,xB,UB,wB,VB,BB,GB,HB,kB,FB,qB,jB,YB,$B,KB,WB,XB,zB,QB,JB,ZB,eG,tG,rG,nG,oG,sG,iG,aG,cG,uG,lG,pG,_G,dG,EG,fG,SG,TG,mG,hG,gG,AG,RG,OG,NG,IG,PG,CG,yG,MG,vG,bG,LG,DG,xG,UG,wG,VG,BG,GG,HG,kG,FG,qG,jG,YG,$G,KG,WG,XG,zG,QG,JG,ZG,eH,tH,rH,nH,oH,sH,iH,aH,cH,uH,lH,vfe,ag,bfe,Lfe,Dfe,xfe,cg,Ufe,wfe,Vfe,Bfe,Gfe,Hfe,kfe,Ffe,qfe,jfe,Yfe,$fe,Kfe,Wfe,Xfe,zfe,Qfe,Jfe,ug,Zfe,eSe,tSe,rSe,nSe,oSe,sSe,iSe,aSe,cSe,uSe,lSe,pSe,_Se,dSe,ESe,fSe,SSe,TSe,mSe,hSe,gSe,ASe,RSe,OSe,NSe,ISe,PSe,CSe,ySe,MSe,vSe,bSe,LSe,Su,ea,lg,DSe,xSe,Pd,USe,wSe,VSe,BSe,GSe,HSe,kSe,Tu,FSe,qSe,jSe,YSe,$Se,KSe,WSe,XSe,zSe,QSe,JSe,ZSe,eTe,tTe,rTe,nTe,oTe,sTe,iTe,aTe,cTe,uTe,lTe,pg,pTe,_Te,dTe,ETe,fTe,STe,TTe,mTe,hTe,gTe,ATe,RTe,OTe,NTe,ITe,PTe,CTe,yTe,MTe,_g,vTe,dg,bTe,LTe,DTe,xTe,UTe,wTe,VTe,BTe,GTe,pH,_H,dH,EH,fH,SH,TH,mH,hH,gH,AH,RH,OH,NH,IH,PH,CH,yH,MH,vH,bH,LH,DH,xH,UH,wH,VH,BH,GH,HH,kH,FH,qH,jH,YH,$H,KH,WH,XH,zH,QH,JH,ZH,ek,tk,rk,nk,HTe,kTe,FTe,qTe,jTe,YTe,$Te,KTe,WTe,XTe,zTe,QTe,JTe,ZTe,eme,tme,rme,nme,ome,sme,ime,ame,cme,ume,lme,pme,_me,dme,Eme,fme,Sme,Tme,mme,hme,gme,Ame,Rme,Ome,Nme,Ime,Pme,Cme,yme,Mme,vme,bme,Lme,Dme,ok,sk,ik,ak,ck,uk,lk,pk,_k,dk,Ek,xme,Ume,wme,Vme,Bme,Gme,Hme,kme,Fme,qme,jme,Yme,fk,Sk,Tk,mk,hk,$me,Kme,Wme,Xme,zme,Qme,gk,Ak,Rk,Jme,Zme,ehe,the,Ok,Nk,Ik,Pk,rhe,nhe,ohe,she,ihe,Ck,yk,Mk,vk,bk,Lk,Dk,ahe,che,uhe,lhe,phe,_he,dhe,Ehe,xk,Uk,wk,Vk,Bk,fhe,She,The,mhe,hhe,ghe,Gk,Hk,kk,Fk,qk,jk,Yk,$k,Kk,Wk,Xk,zk,Qk,Jk,Zk,eF,tF,rF,nF,oF,sF,Ahe,Rhe,Ohe,Nhe,Ihe,Phe,Che,yhe,Mhe,vhe,bhe,Lhe,Dhe,xhe,Uhe,whe,Vhe,Bhe,Ghe,Hhe,khe,Fhe,iF,aF,cF,uF,lF,qhe,jhe,Yhe,$he,Khe,Whe,pF,_F,Xhe,zhe,Qhe,dF,EF,Jhe,Zhe,ege,fF,SF,TF,mF,hF,gF,AF,RF,OF,NF,IF,PF,CF,yF,MF,vF,bF,tge,rge,nge,oge,sge,ige,age,cge,uge,lge,pge,_ge,dge,Ege,fge,Sge,Tge,mge,LF,DF,hge,gge,Age,xF=w(()=>{ig();YV="aws.lambda.invoked_arn",$V="db.system",KV="db.connection_string",WV="db.user",XV="db.jdbc.driver_classname",zV="db.name",QV="db.statement",JV="db.operation",ZV="db.mssql.instance_name",eB="db.cassandra.keyspace",tB="db.cassandra.page_size",rB="db.cassandra.consistency_level",nB="db.cassandra.table",oB="db.cassandra.idempotence",sB="db.cassandra.speculative_execution_count",iB="db.cassandra.coordinator.id",aB="db.cassandra.coordinator.dc",cB="db.hbase.namespace",uB="db.redis.database_index",lB="db.mongodb.collection",pB="db.sql.table",_B="exception.type",dB="exception.message",EB="exception.stacktrace",fB="exception.escaped",SB="faas.trigger",TB="faas.execution",mB="faas.document.collection",hB="faas.document.operation",gB="faas.document.time",AB="faas.document.name",RB="faas.time",OB="faas.cron",NB="faas.coldstart",IB="faas.invoked_name",PB="faas.invoked_provider",CB="faas.invoked_region",yB="net.transport",MB="net.peer.ip",vB="net.peer.port",bB="net.peer.name",LB="net.host.ip",DB="net.host.port",xB="net.host.name",UB="net.host.connection.type",wB="net.host.connection.subtype",VB="net.host.carrier.name",BB="net.host.carrier.mcc",GB="net.host.carrier.mnc",HB="net.host.carrier.icc",kB="peer.service",FB="enduser.id",qB="enduser.role",jB="enduser.scope",YB="thread.id",$B="thread.name",KB="code.function",WB="code.namespace",XB="code.filepath",zB="code.lineno",QB="http.method",JB="http.url",ZB="http.target",eG="http.host",tG="http.scheme",rG="http.status_code",nG="http.flavor",oG="http.user_agent",sG="http.request_content_length",iG="http.request_content_length_uncompressed",aG="http.response_content_length",cG="http.response_content_length_uncompressed",uG="http.server_name",lG="http.route",pG="http.client_ip",_G="aws.dynamodb.table_names",dG="aws.dynamodb.consumed_capacity",EG="aws.dynamodb.item_collection_metrics",fG="aws.dynamodb.provisioned_read_capacity",SG="aws.dynamodb.provisioned_write_capacity",TG="aws.dynamodb.consistent_read",mG="aws.dynamodb.projection",hG="aws.dynamodb.limit",gG="aws.dynamodb.attributes_to_get",AG="aws.dynamodb.index_name",RG="aws.dynamodb.select",OG="aws.dynamodb.global_secondary_indexes",NG="aws.dynamodb.local_secondary_indexes",IG="aws.dynamodb.exclusive_start_table",PG="aws.dynamodb.table_count",CG="aws.dynamodb.scan_forward",yG="aws.dynamodb.segment",MG="aws.dynamodb.total_segments",vG="aws.dynamodb.count",bG="aws.dynamodb.scanned_count",LG="aws.dynamodb.attribute_definitions",DG="aws.dynamodb.global_secondary_index_updates",xG="messaging.system",UG="messaging.destination",wG="messaging.destination_kind",VG="messaging.temp_destination",BG="messaging.protocol",GG="messaging.protocol_version",HG="messaging.url",kG="messaging.message_id",FG="messaging.conversation_id",qG="messaging.message_payload_size_bytes",jG="messaging.message_payload_compressed_size_bytes",YG="messaging.operation",$G="messaging.consumer_id",KG="messaging.rabbitmq.routing_key",WG="messaging.kafka.message_key",XG="messaging.kafka.consumer_group",zG="messaging.kafka.client_id",QG="messaging.kafka.partition",JG="messaging.kafka.tombstone",ZG="rpc.system",eH="rpc.service",tH="rpc.method",rH="rpc.grpc.status_code",nH="rpc.jsonrpc.version",oH="rpc.jsonrpc.request_id",sH="rpc.jsonrpc.error_code",iH="rpc.jsonrpc.error_message",aH="message.type",cH="message.id",uH="message.compressed_size",lH="message.uncompressed_size",vfe=YV,ag=$V,bfe=KV,Lfe=WV,Dfe=XV,xfe=zV,cg=QV,Ufe=JV,wfe=ZV,Vfe=eB,Bfe=tB,Gfe=rB,Hfe=nB,kfe=oB,Ffe=sB,qfe=iB,jfe=aB,Yfe=cB,$fe=uB,Kfe=lB,Wfe=pB,Xfe=_B,zfe=dB,Qfe=EB,Jfe=fB,ug=SB,Zfe=TB,eSe=mB,tSe=hB,rSe=gB,nSe=AB,oSe=RB,sSe=OB,iSe=NB,aSe=IB,cSe=PB,uSe=CB,lSe=yB,pSe=MB,_Se=vB,dSe=bB,ESe=LB,fSe=DB,SSe=xB,TSe=UB,mSe=wB,hSe=VB,gSe=BB,ASe=GB,RSe=HB,OSe=kB,NSe=FB,ISe=qB,PSe=jB,CSe=YB,ySe=$B,MSe=KB,vSe=WB,bSe=XB,LSe=zB,Su=QB,ea=JB,lg=ZB,DSe=eG,xSe=tG,Pd=rG,USe=nG,wSe=oG,VSe=sG,BSe=iG,GSe=aG,HSe=cG,kSe=uG,Tu=lG,FSe=pG,qSe=_G,jSe=dG,YSe=EG,$Se=fG,KSe=SG,WSe=TG,XSe=mG,zSe=hG,QSe=gG,JSe=AG,ZSe=RG,eTe=OG,tTe=NG,rTe=IG,nTe=PG,oTe=CG,sTe=yG,iTe=MG,aTe=vG,cTe=bG,uTe=LG,lTe=DG,pg=xG,pTe=UG,_Te=wG,dTe=VG,ETe=BG,fTe=GG,STe=HG,TTe=kG,mTe=FG,hTe=qG,gTe=jG,ATe=YG,RTe=$G,OTe=KG,NTe=WG,ITe=XG,PTe=zG,CTe=QG,yTe=JG,MTe=ZG,_g=eH,vTe=tH,dg=rH,bTe=nH,LTe=oH,DTe=sH,xTe=iH,UTe=aH,wTe=cH,VTe=uH,BTe=lH,GTe=Ge([YV,$V,KV,WV,XV,zV,QV,JV,ZV,eB,tB,rB,nB,oB,sB,iB,aB,cB,uB,lB,pB,_B,dB,EB,fB,SB,TB,mB,hB,gB,AB,RB,OB,NB,IB,PB,CB,yB,MB,vB,bB,LB,DB,xB,UB,wB,VB,BB,GB,HB,kB,FB,qB,jB,YB,$B,KB,WB,XB,zB,QB,JB,ZB,eG,tG,rG,nG,oG,sG,iG,aG,cG,uG,lG,pG,_G,dG,EG,fG,SG,TG,mG,hG,gG,AG,RG,OG,NG,IG,PG,CG,yG,MG,vG,bG,LG,DG,xG,UG,wG,VG,BG,GG,HG,kG,FG,qG,jG,YG,$G,KG,WG,XG,zG,QG,JG,ZG,eH,tH,rH,nH,oH,sH,iH,aH,cH,uH,lH]),pH="other_sql",_H="mssql",dH="mysql",EH="oracle",fH="db2",SH="postgresql",TH="redshift",mH="hive",hH="cloudscape",gH="hsqldb",AH="progress",RH="maxdb",OH="hanadb",NH="ingres",IH="firstsql",PH="edb",CH="cache",yH="adabas",MH="firebird",vH="derby",bH="filemaker",LH="informix",DH="instantdb",xH="interbase",UH="mariadb",wH="netezza",VH="pervasive",BH="pointbase",GH="sqlite",HH="sybase",kH="teradata",FH="vertica",qH="h2",jH="coldfusion",YH="cassandra",$H="hbase",KH="mongodb",WH="redis",XH="couchbase",zH="couchdb",QH="cosmosdb",JH="dynamodb",ZH="neo4j",ek="geode",tk="elasticsearch",rk="memcached",nk="cockroachdb",HTe=pH,kTe=_H,FTe=dH,qTe=EH,jTe=fH,YTe=SH,$Te=TH,KTe=mH,WTe=hH,XTe=gH,zTe=AH,QTe=RH,JTe=OH,ZTe=NH,eme=IH,tme=PH,rme=CH,nme=yH,ome=MH,sme=vH,ime=bH,ame=LH,cme=DH,ume=xH,lme=UH,pme=wH,_me=VH,dme=BH,Eme=GH,fme=HH,Sme=kH,Tme=FH,mme=qH,hme=jH,gme=YH,Ame=$H,Rme=KH,Ome=WH,Nme=XH,Ime=zH,Pme=QH,Cme=JH,yme=ZH,Mme=ek,vme=tk,bme=rk,Lme=nk,Dme=Ge([pH,_H,dH,EH,fH,SH,TH,mH,hH,gH,AH,RH,OH,NH,IH,PH,CH,yH,MH,vH,bH,LH,DH,xH,UH,wH,VH,BH,GH,HH,kH,FH,qH,jH,YH,$H,KH,WH,XH,zH,QH,JH,ZH,ek,tk,rk,nk]),ok="all",sk="each_quorum",ik="quorum",ak="local_quorum",ck="one",uk="two",lk="three",pk="local_one",_k="any",dk="serial",Ek="local_serial",xme=ok,Ume=sk,wme=ik,Vme=ak,Bme=ck,Gme=uk,Hme=lk,kme=pk,Fme=_k,qme=dk,jme=Ek,Yme=Ge([ok,sk,ik,ak,ck,uk,lk,pk,_k,dk,Ek]),fk="datasource",Sk="http",Tk="pubsub",mk="timer",hk="other",$me=fk,Kme=Sk,Wme=Tk,Xme=mk,zme=hk,Qme=Ge([fk,Sk,Tk,mk,hk]),gk="insert",Ak="edit",Rk="delete",Jme=gk,Zme=Ak,ehe=Rk,the=Ge([gk,Ak,Rk]),Ok="alibaba_cloud",Nk="aws",Ik="azure",Pk="gcp",rhe=Ok,nhe=Nk,ohe=Ik,she=Pk,ihe=Ge([Ok,Nk,Ik,Pk]),Ck="ip_tcp",yk="ip_udp",Mk="ip",vk="unix",bk="pipe",Lk="inproc",Dk="other",ahe=Ck,che=yk,uhe=Mk,lhe=vk,phe=bk,_he=Lk,dhe=Dk,Ehe=Ge([Ck,yk,Mk,vk,bk,Lk,Dk]),xk="wifi",Uk="wired",wk="cell",Vk="unavailable",Bk="unknown",fhe=xk,She=Uk,The=wk,mhe=Vk,hhe=Bk,ghe=Ge([xk,Uk,wk,Vk,Bk]),Gk="gprs",Hk="edge",kk="umts",Fk="cdma",qk="evdo_0",jk="evdo_a",Yk="cdma2000_1xrtt",$k="hsdpa",Kk="hsupa",Wk="hspa",Xk="iden",zk="evdo_b",Qk="lte",Jk="ehrpd",Zk="hspap",eF="gsm",tF="td_scdma",rF="iwlan",nF="nr",oF="nrnsa",sF="lte_ca",Ahe=Gk,Rhe=Hk,Ohe=kk,Nhe=Fk,Ihe=qk,Phe=jk,Che=Yk,yhe=$k,Mhe=Kk,vhe=Wk,bhe=Xk,Lhe=zk,Dhe=Qk,xhe=Jk,Uhe=Zk,whe=eF,Vhe=tF,Bhe=rF,Ghe=nF,Hhe=oF,khe=sF,Fhe=Ge([Gk,Hk,kk,Fk,qk,jk,Yk,$k,Kk,Wk,Xk,zk,Qk,Jk,Zk,eF,tF,rF,nF,oF,sF]),iF="1.0",aF="1.1",cF="2.0",uF="SPDY",lF="QUIC",qhe=iF,jhe=aF,Yhe=cF,$he=uF,Khe=lF,Whe={HTTP_1_0:iF,HTTP_1_1:aF,HTTP_2_0:cF,SPDY:uF,QUIC:lF},pF="queue",_F="topic",Xhe=pF,zhe=_F,Qhe=Ge([pF,_F]),dF="receive",EF="process",Jhe=dF,Zhe=EF,ege=Ge([dF,EF]),fF=0,SF=1,TF=2,mF=3,hF=4,gF=5,AF=6,RF=7,OF=8,NF=9,IF=10,PF=11,CF=12,yF=13,MF=14,vF=15,bF=16,tge=fF,rge=SF,nge=TF,oge=mF,sge=hF,ige=gF,age=AF,cge=RF,uge=OF,lge=NF,pge=IF,_ge=PF,dge=CF,Ege=yF,fge=MF,Sge=vF,Tge=bF,mge={OK:fF,CANCELLED:SF,UNKNOWN:TF,INVALID_ARGUMENT:mF,DEADLINE_EXCEEDED:hF,NOT_FOUND:gF,ALREADY_EXISTS:AF,PERMISSION_DENIED:RF,RESOURCE_EXHAUSTED:OF,FAILED_PRECONDITION:NF,ABORTED:IF,OUT_OF_RANGE:PF,UNIMPLEMENTED:CF,INTERNAL:yF,UNAVAILABLE:MF,DATA_LOSS:vF,UNAUTHENTICATED:bF},LF="SENT",DF="RECEIVED",hge=LF,gge=DF,Age=Ge([LF,DF])});var UF=w(()=>{xF()});var wF,VF,BF,GF,HF,kF,FF,qF,jF,YF,$F,KF,WF,XF,zF,QF,JF,ZF,eq,tq,rq,nq,oq,sq,iq,aq,cq,uq,lq,pq,_q,dq,Eq,fq,Sq,Tq,mq,hq,gq,Aq,Rq,Oq,Nq,Iq,Pq,Cq,yq,Mq,vq,bq,Lq,Dq,xq,Uq,wq,Vq,Bq,Gq,Hq,kq,Fq,qq,jq,Yq,$q,Kq,Wq,Xq,zq,Qq,Jq,Zq,ej,tj,rj,nj,oj,sj,ij,aj,cj,Rge,Oge,Nge,Ige,Pge,Cge,yge,Mge,vge,bge,Lge,Dge,xge,Uge,wge,Vge,Bge,Gge,Hge,kge,Fge,qge,jge,Yge,$ge,Kge,Wge,Xge,zge,Qge,Jge,Zge,eAe,tAe,rAe,nAe,oAe,sAe,iAe,aAe,cAe,uAe,lAe,pAe,_Ae,dAe,EAe,fAe,SAe,TAe,mAe,hAe,gAe,AAe,RAe,OAe,NAe,IAe,PAe,CAe,yAe,MAe,vAe,bAe,LAe,DAe,xAe,UAe,wAe,VAe,BAe,Eg,GAe,HAe,kAe,FAe,qAe,jAe,YAe,$Ae,KAe,WAe,uj,lj,pj,_j,XAe,zAe,QAe,JAe,ZAe,dj,Ej,fj,Sj,Tj,mj,hj,gj,Aj,Rj,Oj,Nj,Ij,Pj,Cj,yj,Mj,eRe,tRe,rRe,nRe,oRe,sRe,iRe,aRe,cRe,uRe,lRe,pRe,_Re,dRe,ERe,fRe,SRe,TRe,vj,bj,mRe,hRe,gRe,Lj,Dj,xj,Uj,wj,Vj,Bj,ARe,RRe,ORe,NRe,IRe,PRe,CRe,yRe,Gj,Hj,kj,Fj,qj,jj,Yj,$j,Kj,Wj,Xj,MRe,vRe,bRe,LRe,DRe,xRe,URe,wRe,VRe,BRe,GRe,HRe,zj,Qj,Jj,Zj,eY,tY,rY,nY,oY,sY,kRe,FRe,qRe,jRe,YRe,$Re,KRe,WRe,XRe,zRe,QRe,iY=w(()=>{ig();wF="cloud.provider",VF="cloud.account.id",BF="cloud.region",GF="cloud.availability_zone",HF="cloud.platform",kF="aws.ecs.container.arn",FF="aws.ecs.cluster.arn",qF="aws.ecs.launchtype",jF="aws.ecs.task.arn",YF="aws.ecs.task.family",$F="aws.ecs.task.revision",KF="aws.eks.cluster.arn",WF="aws.log.group.names",XF="aws.log.group.arns",zF="aws.log.stream.names",QF="aws.log.stream.arns",JF="container.name",ZF="container.id",eq="container.runtime",tq="container.image.name",rq="container.image.tag",nq="deployment.environment",oq="device.id",sq="device.model.identifier",iq="device.model.name",aq="faas.name",cq="faas.id",uq="faas.version",lq="faas.instance",pq="faas.max_memory",_q="host.id",dq="host.name",Eq="host.type",fq="host.arch",Sq="host.image.name",Tq="host.image.id",mq="host.image.version",hq="k8s.cluster.name",gq="k8s.node.name",Aq="k8s.node.uid",Rq="k8s.namespace.name",Oq="k8s.pod.uid",Nq="k8s.pod.name",Iq="k8s.container.name",Pq="k8s.replicaset.uid",Cq="k8s.replicaset.name",yq="k8s.deployment.uid",Mq="k8s.deployment.name",vq="k8s.statefulset.uid",bq="k8s.statefulset.name",Lq="k8s.daemonset.uid",Dq="k8s.daemonset.name",xq="k8s.job.uid",Uq="k8s.job.name",wq="k8s.cronjob.uid",Vq="k8s.cronjob.name",Bq="os.type",Gq="os.description",Hq="os.name",kq="os.version",Fq="process.pid",qq="process.executable.name",jq="process.executable.path",Yq="process.command",$q="process.command_line",Kq="process.command_args",Wq="process.owner",Xq="process.runtime.name",zq="process.runtime.version",Qq="process.runtime.description",Jq="service.name",Zq="service.namespace",ej="service.instance.id",tj="service.version",rj="telemetry.sdk.name",nj="telemetry.sdk.language",oj="telemetry.sdk.version",sj="telemetry.auto.version",ij="webengine.name",aj="webengine.version",cj="webengine.description",Rge=wF,Oge=VF,Nge=BF,Ige=GF,Pge=HF,Cge=kF,yge=FF,Mge=qF,vge=jF,bge=YF,Lge=$F,Dge=KF,xge=WF,Uge=XF,wge=zF,Vge=QF,Bge=JF,Gge=ZF,Hge=eq,kge=tq,Fge=rq,qge=nq,jge=oq,Yge=sq,$ge=iq,Kge=aq,Wge=cq,Xge=uq,zge=lq,Qge=pq,Jge=_q,Zge=dq,eAe=Eq,tAe=fq,rAe=Sq,nAe=Tq,oAe=mq,sAe=hq,iAe=gq,aAe=Aq,cAe=Rq,uAe=Oq,lAe=Nq,pAe=Iq,_Ae=Pq,dAe=Cq,EAe=yq,fAe=Mq,SAe=vq,TAe=bq,mAe=Lq,hAe=Dq,gAe=xq,AAe=Uq,RAe=wq,OAe=Vq,NAe=Bq,IAe=Gq,PAe=Hq,CAe=kq,yAe=Fq,MAe=qq,vAe=jq,bAe=Yq,LAe=$q,DAe=Kq,xAe=Wq,UAe=Xq,wAe=zq,VAe=Qq,BAe=Jq,Eg=Zq,GAe=ej,HAe=tj,kAe=rj,FAe=nj,qAe=oj,jAe=sj,YAe=ij,$Ae=aj,KAe=cj,WAe=Ge([wF,VF,BF,GF,HF,kF,FF,qF,jF,YF,$F,KF,WF,XF,zF,QF,JF,ZF,eq,tq,rq,nq,oq,sq,iq,aq,cq,uq,lq,pq,_q,dq,Eq,fq,Sq,Tq,mq,hq,gq,Aq,Rq,Oq,Nq,Iq,Pq,Cq,yq,Mq,vq,bq,Lq,Dq,xq,Uq,wq,Vq,Bq,Gq,Hq,kq,Fq,qq,jq,Yq,$q,Kq,Wq,Xq,zq,Qq,Jq,Zq,ej,tj,rj,nj,oj,sj,ij,aj,cj]),uj="alibaba_cloud",lj="aws",pj="azure",_j="gcp",XAe=uj,zAe=lj,QAe=pj,JAe=_j,ZAe=Ge([uj,lj,pj,_j]),dj="alibaba_cloud_ecs",Ej="alibaba_cloud_fc",fj="aws_ec2",Sj="aws_ecs",Tj="aws_eks",mj="aws_lambda",hj="aws_elastic_beanstalk",gj="azure_vm",Aj="azure_container_instances",Rj="azure_aks",Oj="azure_functions",Nj="azure_app_service",Ij="gcp_compute_engine",Pj="gcp_cloud_run",Cj="gcp_kubernetes_engine",yj="gcp_cloud_functions",Mj="gcp_app_engine",eRe=dj,tRe=Ej,rRe=fj,nRe=Sj,oRe=Tj,sRe=mj,iRe=hj,aRe=gj,cRe=Aj,uRe=Rj,lRe=Oj,pRe=Nj,_Re=Ij,dRe=Pj,ERe=Cj,fRe=yj,SRe=Mj,TRe=Ge([dj,Ej,fj,Sj,Tj,mj,hj,gj,Aj,Rj,Oj,Nj,Ij,Pj,Cj,yj,Mj]),vj="ec2",bj="fargate",mRe=vj,hRe=bj,gRe=Ge([vj,bj]),Lj="amd64",Dj="arm32",xj="arm64",Uj="ia64",wj="ppc32",Vj="ppc64",Bj="x86",ARe=Lj,RRe=Dj,ORe=xj,NRe=Uj,IRe=wj,PRe=Vj,CRe=Bj,yRe=Ge([Lj,Dj,xj,Uj,wj,Vj,Bj]),Gj="windows",Hj="linux",kj="darwin",Fj="freebsd",qj="netbsd",jj="openbsd",Yj="dragonflybsd",$j="hpux",Kj="aix",Wj="solaris",Xj="z_os",MRe=Gj,vRe=Hj,bRe=kj,LRe=Fj,DRe=qj,xRe=jj,URe=Yj,wRe=$j,VRe=Kj,BRe=Wj,GRe=Xj,HRe=Ge([Gj,Hj,kj,Fj,qj,jj,Yj,$j,Kj,Wj,Xj]),zj="cpp",Qj="dotnet",Jj="erlang",Zj="go",eY="java",tY="nodejs",rY="php",nY="python",oY="ruby",sY="webjs",kRe=zj,FRe=Qj,qRe=Jj,jRe=Zj,YRe=eY,$Re=tY,KRe=rY,WRe=nY,XRe=oY,zRe=sY,QRe=Ge([zj,Qj,Jj,Zj,eY,tY,rY,nY,oY,sY])});var aY=w(()=>{iY()});var JRe,ZRe,eOe,tOe,rOe,nOe,oOe,sOe,iOe,aOe,cOe,uOe,lOe,pOe,_Oe,dOe,EOe,fOe,SOe,TOe,mOe,hOe,gOe,AOe,ROe,OOe,fg,NOe,Sg,IOe,Tg,mg,POe,hg,COe,yOe,MOe,vOe,bOe,LOe,DOe,xOe,OKe,NKe,gg,UOe,wOe,VOe,BOe,GOe,HOe,Hs,kOe,FOe,qOe,IKe,jOe,YOe,$Oe,KOe,PKe,WOe,XOe,zOe,QOe,Lo,Sn,JOe,ZOe,eNe,tNe,rNe,nNe,oNe,sNe,iNe,CKe,aNe,cNe,uNe,lNe,pNe,_Ne,dNe,ENe,fNe,SNe,TNe,mNe,hNe,yKe,MKe,gNe,ANe,RNe,ONe,NNe,INe,PNe,CNe,vKe,yNe,Ag,Rg,MNe,ir,vNe,Og,bNe,LNe,DNe,xNe,UNe,wNe,VNe,BNe,GNe,bKe,HNe,kNe,LKe,FNe,qNe,DKe,jNe,YNe,$Ne,KNe,WNe,XNe,zNe,QNe,ta,JNe,ZNe,eIe,tIe,cY=w(()=>{JRe="aspnetcore.diagnostics.exception.result",ZRe="aborted",eOe="handled",tOe="skipped",rOe="unhandled",nOe="aspnetcore.diagnostics.handler.type",oOe="aspnetcore.rate_limiting.policy",sOe="aspnetcore.rate_limiting.result",iOe="acquired",aOe="endpoint_limiter",cOe="global_limiter",uOe="request_canceled",lOe="aspnetcore.request.is_unhandled",pOe="aspnetcore.routing.is_fallback",_Oe="aspnetcore.routing.match_status",dOe="failure",EOe="success",fOe="aspnetcore.user.is_authenticated",SOe="client.address",TOe="client.port",mOe="code.column.number",hOe="code.file.path",gOe="code.function.name",AOe="code.line.number",ROe="code.stacktrace",OOe="db.collection.name",fg="db.namespace",NOe="db.operation.batch.size",Sg="db.operation.name",IOe="db.query.summary",Tg="db.query.text",mg="db.response.status_code",POe="db.stored_procedure.name",hg="db.system.name",COe="mariadb",yOe="microsoft.sql_server",MOe="mysql",vOe="postgresql",bOe="dotnet.gc.heap.generation",LOe="gen0",DOe="gen1",xOe="gen2",OKe="loh",NKe="poh",gg="error.type",UOe="_OTHER",wOe="exception.escaped",VOe="exception.message",BOe="exception.stacktrace",GOe="exception.type",HOe=t=>`http.request.header.${t}`,Hs="http.request.method",kOe="_OTHER",FOe="CONNECT",qOe="DELETE",IKe="GET",jOe="HEAD",YOe="OPTIONS",$Oe="PATCH",KOe="POST",PKe="PUT",WOe="TRACE",XOe="http.request.method_original",zOe="http.request.resend_count",QOe=t=>`http.response.header.${t}`,Lo="http.response.status_code",Sn="http.route",JOe="jvm.gc.action",ZOe="jvm.gc.name",eNe="jvm.memory.pool.name",tNe="jvm.memory.type",rNe="heap",nNe="non_heap",oNe="jvm.thread.daemon",sNe="jvm.thread.state",iNe="blocked",CKe="new",aNe="runnable",cNe="terminated",uNe="timed_waiting",lNe="waiting",pNe="network.local.address",_Ne="network.local.port",dNe="network.peer.address",ENe="network.peer.port",fNe="network.protocol.name",SNe="network.protocol.version",TNe="network.transport",mNe="pipe",hNe="quic",yKe="tcp",MKe="udp",gNe="unix",ANe="network.type",RNe="ipv4",ONe="ipv6",NNe="otel.scope.name",INe="otel.scope.version",PNe="otel.status_code",CNe="ERROR",vKe="OK",yNe="otel.status_description",Ag="server.address",Rg="server.port",MNe="service.instance.id",ir="service.name",vNe="service.namespace",Og="service.version",bNe="signalr.connection.status",LNe="app_shutdown",DNe="normal_closure",xNe="timeout",UNe="signalr.transport",wNe="long_polling",VNe="server_sent_events",BNe="web_sockets",GNe="telemetry.sdk.language",bKe="cpp",HNe="dotnet",kNe="erlang",LKe="go",FNe="java",qNe="nodejs",DKe="php",jNe="python",YNe="ruby",$Ne="rust",KNe="swift",WNe="webjs",XNe="telemetry.sdk.name",zNe="telemetry.sdk.version",QNe="url.fragment",ta="url.full",JNe="url.path",ZNe="url.query",eIe="url.scheme",tIe="user_agent.original"});var rIe,nIe,oIe,sIe,iIe,aIe,cIe,uIe,lIe,pIe,_Ie,dIe,EIe,fIe,SIe,TIe,mIe,hIe,gIe,AIe,RIe,OIe,NIe,IIe,PIe,CIe,yIe,MIe,vIe,bIe,LIe,DIe,xIe,UIe,wIe,VIe,BIe,GIe,HIe,kIe,FIe,qIe,jIe,YIe,$Ie,KIe,WIe,XIe,zIe,QIe,JIe,uY=w(()=>{rIe="aspnetcore.diagnostics.exceptions",nIe="aspnetcore.rate_limiting.active_request_leases",oIe="aspnetcore.rate_limiting.queued_requests",sIe="aspnetcore.rate_limiting.request.time_in_queue",iIe="aspnetcore.rate_limiting.request_lease.duration",aIe="aspnetcore.rate_limiting.requests",cIe="aspnetcore.routing.match_attempts",uIe="db.client.operation.duration",lIe="dotnet.assembly.count",pIe="dotnet.exceptions",_Ie="dotnet.gc.collections",dIe="dotnet.gc.heap.total_allocated",EIe="dotnet.gc.last_collection.heap.fragmentation.size",fIe="dotnet.gc.last_collection.heap.size",SIe="dotnet.gc.last_collection.memory.committed_size",TIe="dotnet.gc.pause.time",mIe="dotnet.jit.compilation.time",hIe="dotnet.jit.compiled_il.size",gIe="dotnet.jit.compiled_methods",AIe="dotnet.monitor.lock_contentions",RIe="dotnet.process.cpu.count",OIe="dotnet.process.cpu.time",NIe="dotnet.process.memory.working_set",IIe="dotnet.thread_pool.queue.length",PIe="dotnet.thread_pool.thread.count",CIe="dotnet.thread_pool.work_item.count",yIe="dotnet.timer.count",MIe="http.client.request.duration",vIe="http.server.request.duration",bIe="jvm.class.count",LIe="jvm.class.loaded",DIe="jvm.class.unloaded",xIe="jvm.cpu.count",UIe="jvm.cpu.recent_utilization",wIe="jvm.cpu.time",VIe="jvm.gc.duration",BIe="jvm.memory.committed",GIe="jvm.memory.limit",HIe="jvm.memory.used",kIe="jvm.memory.used_after_last_gc",FIe="jvm.thread.count",qIe="kestrel.active_connections",jIe="kestrel.active_tls_handshakes",YIe="kestrel.connection.duration",$Ie="kestrel.queued_connections",KIe="kestrel.queued_requests",WIe="kestrel.rejected_connections",XIe="kestrel.tls_handshake.duration",zIe="kestrel.upgraded_connections",QIe="signalr.server.active_connections",JIe="signalr.server.connection.duration"});var ZIe,lY=w(()=>{ZIe="exception"});var He={};Qf(He,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>ZRe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>eOe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>tOe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>rOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>iOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>aOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>cOe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>uOe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>dOe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>EOe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>JRe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>nOe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>oOe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>sOe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>lOe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>pOe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>_Oe,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>fOe,ATTR_CLIENT_ADDRESS:()=>SOe,ATTR_CLIENT_PORT:()=>TOe,ATTR_CODE_COLUMN_NUMBER:()=>mOe,ATTR_CODE_FILE_PATH:()=>hOe,ATTR_CODE_FUNCTION_NAME:()=>gOe,ATTR_CODE_LINE_NUMBER:()=>AOe,ATTR_CODE_STACKTRACE:()=>ROe,ATTR_DB_COLLECTION_NAME:()=>OOe,ATTR_DB_NAMESPACE:()=>fg,ATTR_DB_OPERATION_BATCH_SIZE:()=>NOe,ATTR_DB_OPERATION_NAME:()=>Sg,ATTR_DB_QUERY_SUMMARY:()=>IOe,ATTR_DB_QUERY_TEXT:()=>Tg,ATTR_DB_RESPONSE_STATUS_CODE:()=>mg,ATTR_DB_STORED_PROCEDURE_NAME:()=>POe,ATTR_DB_SYSTEM_NAME:()=>hg,ATTR_DOTNET_GC_HEAP_GENERATION:()=>bOe,ATTR_ERROR_TYPE:()=>gg,ATTR_EXCEPTION_ESCAPED:()=>wOe,ATTR_EXCEPTION_MESSAGE:()=>VOe,ATTR_EXCEPTION_STACKTRACE:()=>BOe,ATTR_EXCEPTION_TYPE:()=>GOe,ATTR_HTTP_REQUEST_HEADER:()=>HOe,ATTR_HTTP_REQUEST_METHOD:()=>Hs,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>XOe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>zOe,ATTR_HTTP_RESPONSE_HEADER:()=>QOe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Lo,ATTR_HTTP_ROUTE:()=>Sn,ATTR_JVM_GC_ACTION:()=>JOe,ATTR_JVM_GC_NAME:()=>ZOe,ATTR_JVM_MEMORY_POOL_NAME:()=>eNe,ATTR_JVM_MEMORY_TYPE:()=>tNe,ATTR_JVM_THREAD_DAEMON:()=>oNe,ATTR_JVM_THREAD_STATE:()=>sNe,ATTR_NETWORK_LOCAL_ADDRESS:()=>pNe,ATTR_NETWORK_LOCAL_PORT:()=>_Ne,ATTR_NETWORK_PEER_ADDRESS:()=>dNe,ATTR_NETWORK_PEER_PORT:()=>ENe,ATTR_NETWORK_PROTOCOL_NAME:()=>fNe,ATTR_NETWORK_PROTOCOL_VERSION:()=>SNe,ATTR_NETWORK_TRANSPORT:()=>TNe,ATTR_NETWORK_TYPE:()=>ANe,ATTR_OTEL_SCOPE_NAME:()=>NNe,ATTR_OTEL_SCOPE_VERSION:()=>INe,ATTR_OTEL_STATUS_CODE:()=>PNe,ATTR_OTEL_STATUS_DESCRIPTION:()=>yNe,ATTR_SERVER_ADDRESS:()=>Ag,ATTR_SERVER_PORT:()=>Rg,ATTR_SERVICE_INSTANCE_ID:()=>MNe,ATTR_SERVICE_NAME:()=>ir,ATTR_SERVICE_NAMESPACE:()=>vNe,ATTR_SERVICE_VERSION:()=>Og,ATTR_SIGNALR_CONNECTION_STATUS:()=>bNe,ATTR_SIGNALR_TRANSPORT:()=>UNe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>GNe,ATTR_TELEMETRY_SDK_NAME:()=>XNe,ATTR_TELEMETRY_SDK_VERSION:()=>zNe,ATTR_URL_FRAGMENT:()=>QNe,ATTR_URL_FULL:()=>ta,ATTR_URL_PATH:()=>JNe,ATTR_URL_QUERY:()=>ZNe,ATTR_URL_SCHEME:()=>eIe,ATTR_USER_AGENT_ORIGINAL:()=>tIe,AWSECSLAUNCHTYPEVALUES_EC2:()=>mRe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>hRe,AwsEcsLaunchtypeValues:()=>gRe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>eRe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>tRe,CLOUDPLATFORMVALUES_AWS_EC2:()=>rRe,CLOUDPLATFORMVALUES_AWS_ECS:()=>nRe,CLOUDPLATFORMVALUES_AWS_EKS:()=>oRe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>iRe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>sRe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>uRe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>pRe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>cRe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>lRe,CLOUDPLATFORMVALUES_AZURE_VM:()=>aRe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>SRe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>fRe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>dRe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>_Re,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>ERe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>XAe,CLOUDPROVIDERVALUES_AWS:()=>zAe,CLOUDPROVIDERVALUES_AZURE:()=>QAe,CLOUDPROVIDERVALUES_GCP:()=>JAe,CloudPlatformValues:()=>TRe,CloudProviderValues:()=>ZAe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>xme,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>Fme,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Ume,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>kme,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Vme,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>jme,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>Bme,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>wme,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>qme,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Hme,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>Gme,DBSYSTEMVALUES_ADABAS:()=>nme,DBSYSTEMVALUES_CACHE:()=>rme,DBSYSTEMVALUES_CASSANDRA:()=>gme,DBSYSTEMVALUES_CLOUDSCAPE:()=>WTe,DBSYSTEMVALUES_COCKROACHDB:()=>Lme,DBSYSTEMVALUES_COLDFUSION:()=>hme,DBSYSTEMVALUES_COSMOSDB:()=>Pme,DBSYSTEMVALUES_COUCHBASE:()=>Nme,DBSYSTEMVALUES_COUCHDB:()=>Ime,DBSYSTEMVALUES_DB2:()=>jTe,DBSYSTEMVALUES_DERBY:()=>sme,DBSYSTEMVALUES_DYNAMODB:()=>Cme,DBSYSTEMVALUES_EDB:()=>tme,DBSYSTEMVALUES_ELASTICSEARCH:()=>vme,DBSYSTEMVALUES_FILEMAKER:()=>ime,DBSYSTEMVALUES_FIREBIRD:()=>ome,DBSYSTEMVALUES_FIRSTSQL:()=>eme,DBSYSTEMVALUES_GEODE:()=>Mme,DBSYSTEMVALUES_H2:()=>mme,DBSYSTEMVALUES_HANADB:()=>JTe,DBSYSTEMVALUES_HBASE:()=>Ame,DBSYSTEMVALUES_HIVE:()=>KTe,DBSYSTEMVALUES_HSQLDB:()=>XTe,DBSYSTEMVALUES_INFORMIX:()=>ame,DBSYSTEMVALUES_INGRES:()=>ZTe,DBSYSTEMVALUES_INSTANTDB:()=>cme,DBSYSTEMVALUES_INTERBASE:()=>ume,DBSYSTEMVALUES_MARIADB:()=>lme,DBSYSTEMVALUES_MAXDB:()=>QTe,DBSYSTEMVALUES_MEMCACHED:()=>bme,DBSYSTEMVALUES_MONGODB:()=>Rme,DBSYSTEMVALUES_MSSQL:()=>kTe,DBSYSTEMVALUES_MYSQL:()=>FTe,DBSYSTEMVALUES_NEO4J:()=>yme,DBSYSTEMVALUES_NETEZZA:()=>pme,DBSYSTEMVALUES_ORACLE:()=>qTe,DBSYSTEMVALUES_OTHER_SQL:()=>HTe,DBSYSTEMVALUES_PERVASIVE:()=>_me,DBSYSTEMVALUES_POINTBASE:()=>dme,DBSYSTEMVALUES_POSTGRESQL:()=>YTe,DBSYSTEMVALUES_PROGRESS:()=>zTe,DBSYSTEMVALUES_REDIS:()=>Ome,DBSYSTEMVALUES_REDSHIFT:()=>$Te,DBSYSTEMVALUES_SQLITE:()=>Eme,DBSYSTEMVALUES_SYBASE:()=>fme,DBSYSTEMVALUES_TERADATA:()=>Sme,DBSYSTEMVALUES_VERTICA:()=>Tme,DB_SYSTEM_NAME_VALUE_MARIADB:()=>COe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>yOe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>MOe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>vOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>LOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>DOe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>xOe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>OKe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>NKe,DbCassandraConsistencyLevelValues:()=>Yme,DbSystemValues:()=>Dme,ERROR_TYPE_VALUE_OTHER:()=>UOe,EVENT_EXCEPTION:()=>ZIe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>ehe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Zme,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Jme,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>rhe,FAASINVOKEDPROVIDERVALUES_AWS:()=>nhe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>ohe,FAASINVOKEDPROVIDERVALUES_GCP:()=>she,FAASTRIGGERVALUES_DATASOURCE:()=>$me,FAASTRIGGERVALUES_HTTP:()=>Kme,FAASTRIGGERVALUES_OTHER:()=>zme,FAASTRIGGERVALUES_PUBSUB:()=>Wme,FAASTRIGGERVALUES_TIMER:()=>Xme,FaasDocumentOperationValues:()=>the,FaasInvokedProviderValues:()=>ihe,FaasTriggerValues:()=>Qme,HOSTARCHVALUES_AMD64:()=>ARe,HOSTARCHVALUES_ARM32:()=>RRe,HOSTARCHVALUES_ARM64:()=>ORe,HOSTARCHVALUES_IA64:()=>NRe,HOSTARCHVALUES_PPC32:()=>IRe,HOSTARCHVALUES_PPC64:()=>PRe,HOSTARCHVALUES_X86:()=>CRe,HTTPFLAVORVALUES_HTTP_1_0:()=>qhe,HTTPFLAVORVALUES_HTTP_1_1:()=>jhe,HTTPFLAVORVALUES_HTTP_2_0:()=>Yhe,HTTPFLAVORVALUES_QUIC:()=>Khe,HTTPFLAVORVALUES_SPDY:()=>$he,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>FOe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>qOe,HTTP_REQUEST_METHOD_VALUE_GET:()=>IKe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>jOe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>YOe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>kOe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>$Oe,HTTP_REQUEST_METHOD_VALUE_POST:()=>KOe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>PKe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>WOe,HostArchValues:()=>yRe,HttpFlavorValues:()=>Whe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>rNe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>nNe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>iNe,JVM_THREAD_STATE_VALUE_NEW:()=>CKe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>aNe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>cNe,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>uNe,JVM_THREAD_STATE_VALUE_WAITING:()=>lNe,MESSAGETYPEVALUES_RECEIVED:()=>gge,MESSAGETYPEVALUES_SENT:()=>hge,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Xhe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>zhe,MESSAGINGOPERATIONVALUES_PROCESS:()=>Zhe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Jhe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>rIe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>nIe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>oIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>aIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>iIe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>sIe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>cIe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>uIe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>lIe,METRIC_DOTNET_EXCEPTIONS:()=>pIe,METRIC_DOTNET_GC_COLLECTIONS:()=>_Ie,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>dIe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>EIe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>fIe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>SIe,METRIC_DOTNET_GC_PAUSE_TIME:()=>TIe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>mIe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>hIe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>gIe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>AIe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>RIe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>OIe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>NIe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>IIe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>PIe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>CIe,METRIC_DOTNET_TIMER_COUNT:()=>yIe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>MIe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>vIe,METRIC_JVM_CLASS_COUNT:()=>bIe,METRIC_JVM_CLASS_LOADED:()=>LIe,METRIC_JVM_CLASS_UNLOADED:()=>DIe,METRIC_JVM_CPU_COUNT:()=>xIe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>UIe,METRIC_JVM_CPU_TIME:()=>wIe,METRIC_JVM_GC_DURATION:()=>VIe,METRIC_JVM_MEMORY_COMMITTED:()=>BIe,METRIC_JVM_MEMORY_LIMIT:()=>GIe,METRIC_JVM_MEMORY_USED:()=>HIe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>kIe,METRIC_JVM_THREAD_COUNT:()=>FIe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>qIe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>jIe,METRIC_KESTREL_CONNECTION_DURATION:()=>YIe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>$Ie,METRIC_KESTREL_QUEUED_REQUESTS:()=>KIe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>WIe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>XIe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>zIe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>QIe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>JIe,MessageTypeValues:()=>Age,MessagingDestinationKindValues:()=>Qhe,MessagingOperationValues:()=>ege,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>Nhe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>Che,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>Rhe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>xhe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>Ihe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>Phe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>Lhe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Ahe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>whe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>yhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>vhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>Uhe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>Mhe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>bhe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>Bhe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>Dhe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>khe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>Ghe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>Hhe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Vhe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>Ohe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>The,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>mhe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>hhe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>fhe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>She,NETTRANSPORTVALUES_INPROC:()=>_he,NETTRANSPORTVALUES_IP:()=>uhe,NETTRANSPORTVALUES_IP_TCP:()=>ahe,NETTRANSPORTVALUES_IP_UDP:()=>che,NETTRANSPORTVALUES_OTHER:()=>dhe,NETTRANSPORTVALUES_PIPE:()=>phe,NETTRANSPORTVALUES_UNIX:()=>lhe,NETWORK_TRANSPORT_VALUE_PIPE:()=>mNe,NETWORK_TRANSPORT_VALUE_QUIC:()=>hNe,NETWORK_TRANSPORT_VALUE_TCP:()=>yKe,NETWORK_TRANSPORT_VALUE_UDP:()=>MKe,NETWORK_TRANSPORT_VALUE_UNIX:()=>gNe,NETWORK_TYPE_VALUE_IPV4:()=>RNe,NETWORK_TYPE_VALUE_IPV6:()=>ONe,NetHostConnectionSubtypeValues:()=>Fhe,NetHostConnectionTypeValues:()=>ghe,NetTransportValues:()=>Ehe,OSTYPEVALUES_AIX:()=>VRe,OSTYPEVALUES_DARWIN:()=>bRe,OSTYPEVALUES_DRAGONFLYBSD:()=>URe,OSTYPEVALUES_FREEBSD:()=>LRe,OSTYPEVALUES_HPUX:()=>wRe,OSTYPEVALUES_LINUX:()=>vRe,OSTYPEVALUES_NETBSD:()=>DRe,OSTYPEVALUES_OPENBSD:()=>xRe,OSTYPEVALUES_SOLARIS:()=>BRe,OSTYPEVALUES_WINDOWS:()=>MRe,OSTYPEVALUES_Z_OS:()=>GRe,OTEL_STATUS_CODE_VALUE_ERROR:()=>CNe,OTEL_STATUS_CODE_VALUE_OK:()=>vKe,OsTypeValues:()=>HRe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>pge,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>age,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>rge,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Sge,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>sge,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>lge,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>Ege,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>oge,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>ige,RPCGRPCSTATUSCODEVALUES_OK:()=>tge,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>_ge,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>cge,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>uge,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Tge,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>fge,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>dge,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>nge,RpcGrpcStatusCodeValues:()=>mge,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>QSe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>uTe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>WSe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>jSe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>aTe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>rTe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>eTe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>lTe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>JSe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>YSe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>zSe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>tTe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>XSe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>$Se,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>KSe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>cTe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>oTe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>sTe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>ZSe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>nTe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>qSe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>iTe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>vfe,SEMATTRS_CODE_FILEPATH:()=>bSe,SEMATTRS_CODE_FUNCTION:()=>MSe,SEMATTRS_CODE_LINENO:()=>LSe,SEMATTRS_CODE_NAMESPACE:()=>vSe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Gfe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>jfe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>qfe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>kfe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>Vfe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Bfe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Ffe,SEMATTRS_DB_CASSANDRA_TABLE:()=>Hfe,SEMATTRS_DB_CONNECTION_STRING:()=>bfe,SEMATTRS_DB_HBASE_NAMESPACE:()=>Yfe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>Dfe,SEMATTRS_DB_MONGODB_COLLECTION:()=>Kfe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>wfe,SEMATTRS_DB_NAME:()=>xfe,SEMATTRS_DB_OPERATION:()=>Ufe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>$fe,SEMATTRS_DB_SQL_TABLE:()=>Wfe,SEMATTRS_DB_STATEMENT:()=>cg,SEMATTRS_DB_SYSTEM:()=>ag,SEMATTRS_DB_USER:()=>Lfe,SEMATTRS_ENDUSER_ID:()=>NSe,SEMATTRS_ENDUSER_ROLE:()=>ISe,SEMATTRS_ENDUSER_SCOPE:()=>PSe,SEMATTRS_EXCEPTION_ESCAPED:()=>Jfe,SEMATTRS_EXCEPTION_MESSAGE:()=>zfe,SEMATTRS_EXCEPTION_STACKTRACE:()=>Qfe,SEMATTRS_EXCEPTION_TYPE:()=>Xfe,SEMATTRS_FAAS_COLDSTART:()=>iSe,SEMATTRS_FAAS_CRON:()=>sSe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>eSe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>nSe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>tSe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>rSe,SEMATTRS_FAAS_EXECUTION:()=>Zfe,SEMATTRS_FAAS_INVOKED_NAME:()=>aSe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>cSe,SEMATTRS_FAAS_INVOKED_REGION:()=>uSe,SEMATTRS_FAAS_TIME:()=>oSe,SEMATTRS_FAAS_TRIGGER:()=>ug,SEMATTRS_HTTP_CLIENT_IP:()=>FSe,SEMATTRS_HTTP_FLAVOR:()=>USe,SEMATTRS_HTTP_HOST:()=>DSe,SEMATTRS_HTTP_METHOD:()=>Su,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>VSe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>BSe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>GSe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>HSe,SEMATTRS_HTTP_ROUTE:()=>Tu,SEMATTRS_HTTP_SCHEME:()=>xSe,SEMATTRS_HTTP_SERVER_NAME:()=>kSe,SEMATTRS_HTTP_STATUS_CODE:()=>Pd,SEMATTRS_HTTP_TARGET:()=>lg,SEMATTRS_HTTP_URL:()=>ea,SEMATTRS_HTTP_USER_AGENT:()=>wSe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>VTe,SEMATTRS_MESSAGE_ID:()=>wTe,SEMATTRS_MESSAGE_TYPE:()=>UTe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>BTe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>RTe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>mTe,SEMATTRS_MESSAGING_DESTINATION:()=>pTe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>_Te,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>PTe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>ITe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>NTe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>CTe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>yTe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>TTe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>gTe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>hTe,SEMATTRS_MESSAGING_OPERATION:()=>ATe,SEMATTRS_MESSAGING_PROTOCOL:()=>ETe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>fTe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>OTe,SEMATTRS_MESSAGING_SYSTEM:()=>pg,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>dTe,SEMATTRS_MESSAGING_URL:()=>STe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>RSe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>gSe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>ASe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>hSe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>mSe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>TSe,SEMATTRS_NET_HOST_IP:()=>ESe,SEMATTRS_NET_HOST_NAME:()=>SSe,SEMATTRS_NET_HOST_PORT:()=>fSe,SEMATTRS_NET_PEER_IP:()=>pSe,SEMATTRS_NET_PEER_NAME:()=>dSe,SEMATTRS_NET_PEER_PORT:()=>_Se,SEMATTRS_NET_TRANSPORT:()=>lSe,SEMATTRS_PEER_SERVICE:()=>OSe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>dg,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>DTe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>xTe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>LTe,SEMATTRS_RPC_JSONRPC_VERSION:()=>bTe,SEMATTRS_RPC_METHOD:()=>vTe,SEMATTRS_RPC_SERVICE:()=>_g,SEMATTRS_RPC_SYSTEM:()=>MTe,SEMATTRS_THREAD_ID:()=>CSe,SEMATTRS_THREAD_NAME:()=>ySe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>yge,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Cge,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Mge,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>vge,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>bge,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>Lge,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Dge,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Uge,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>xge,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Vge,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>wge,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Oge,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Ige,SEMRESATTRS_CLOUD_PLATFORM:()=>Pge,SEMRESATTRS_CLOUD_PROVIDER:()=>Rge,SEMRESATTRS_CLOUD_REGION:()=>Nge,SEMRESATTRS_CONTAINER_ID:()=>Gge,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>kge,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Fge,SEMRESATTRS_CONTAINER_NAME:()=>Bge,SEMRESATTRS_CONTAINER_RUNTIME:()=>Hge,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>qge,SEMRESATTRS_DEVICE_ID:()=>jge,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>Yge,SEMRESATTRS_DEVICE_MODEL_NAME:()=>$ge,SEMRESATTRS_FAAS_ID:()=>Wge,SEMRESATTRS_FAAS_INSTANCE:()=>zge,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Qge,SEMRESATTRS_FAAS_NAME:()=>Kge,SEMRESATTRS_FAAS_VERSION:()=>Xge,SEMRESATTRS_HOST_ARCH:()=>tAe,SEMRESATTRS_HOST_ID:()=>Jge,SEMRESATTRS_HOST_IMAGE_ID:()=>nAe,SEMRESATTRS_HOST_IMAGE_NAME:()=>rAe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>oAe,SEMRESATTRS_HOST_NAME:()=>Zge,SEMRESATTRS_HOST_TYPE:()=>eAe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>sAe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>pAe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>OAe,SEMRESATTRS_K8S_CRONJOB_UID:()=>RAe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>hAe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>mAe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>fAe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>EAe,SEMRESATTRS_K8S_JOB_NAME:()=>AAe,SEMRESATTRS_K8S_JOB_UID:()=>gAe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>cAe,SEMRESATTRS_K8S_NODE_NAME:()=>iAe,SEMRESATTRS_K8S_NODE_UID:()=>aAe,SEMRESATTRS_K8S_POD_NAME:()=>lAe,SEMRESATTRS_K8S_POD_UID:()=>uAe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>dAe,SEMRESATTRS_K8S_REPLICASET_UID:()=>_Ae,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>TAe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>SAe,SEMRESATTRS_OS_DESCRIPTION:()=>IAe,SEMRESATTRS_OS_NAME:()=>PAe,SEMRESATTRS_OS_TYPE:()=>NAe,SEMRESATTRS_OS_VERSION:()=>CAe,SEMRESATTRS_PROCESS_COMMAND:()=>bAe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>DAe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>LAe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>MAe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>vAe,SEMRESATTRS_PROCESS_OWNER:()=>xAe,SEMRESATTRS_PROCESS_PID:()=>yAe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>VAe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>UAe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>wAe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>GAe,SEMRESATTRS_SERVICE_NAME:()=>BAe,SEMRESATTRS_SERVICE_NAMESPACE:()=>Eg,SEMRESATTRS_SERVICE_VERSION:()=>HAe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>jAe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>FAe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>kAe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>qAe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>KAe,SEMRESATTRS_WEBENGINE_NAME:()=>YAe,SEMRESATTRS_WEBENGINE_VERSION:()=>$Ae,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>LNe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>DNe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>xNe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>wNe,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>VNe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>BNe,SemanticAttributes:()=>GTe,SemanticResourceAttributes:()=>WAe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>kRe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>FRe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>qRe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>jRe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>YRe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>$Re,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>KRe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>WRe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>XRe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>zRe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>bKe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>HNe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>kNe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>LKe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>FNe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>qNe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>DKe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>jNe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>YNe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>$Ne,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>KNe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>WNe,TelemetrySdkLanguageValues:()=>QRe});var ue=w(()=>{UF();aY();cY();uY();lY()});var pY=E(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.ExceptionEventName=void 0;Cd.ExceptionEventName="exception"});var Ig=E(yd=>{"use strict";Object.defineProperty(yd,"__esModule",{value:!0});yd.Span=void 0;var Ar=(M(),P(U)),gt=re(),ks=(dr(),P(_r)),ePe=pY(),Ng=class{constructor(e,r,n,o,s,i,a=[],c,u,l){this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:Ar.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=o,this.parentSpanId=i,this.kind=s,this.links=a;let p=Date.now();this._performanceStartTime=gt.otperformance.now(),this._performanceOffset=p-(this._performanceStartTime+(0,gt.getTimeOrigin)()),this._startTimeProvided=c!=null,this.startTime=this._getTime(c??p),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,l!=null&&this.setAttributes(l),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return r==null||this._isSpanEnded()?this:e.length===0?(Ar.diag.warn(`Invalid attribute key: ${e}`),this):(0,gt.isAttributeValue)(r)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(r),this):(Ar.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[r,n]of Object.entries(e))this.setAttribute(r,n);return this}addEvent(e,r,n){if(this._isSpanEnded())return this;if(this._spanLimits.eventCountLimit===0)return Ar.diag.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(this._droppedEventsCount===0&&Ar.diag.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,gt.isTimeInput)(r)&&((0,gt.isTimeInput)(n)||(n=r),r=void 0);let o=(0,gt.sanitizeAttributes)(r);return this.events.push({name:e,attributes:o,time:this._getTime(n),droppedAttributesCount:0}),this}addLink(e){return this.links.push(e),this}addLinks(e){return this.links.push(...e),this}setStatus(e){return this._isSpanEnded()?this:(this.status=Object.assign({},e),this.status.message!=null&&typeof e.message!="string"&&(Ar.diag.warn(`Dropping invalid status.message of type '${typeof e.message}', expected 'string'`),delete this.status.message),this)}updateName(e){return this._isSpanEnded()?this:(this.name=e,this)}end(e){if(this._isSpanEnded()){Ar.diag.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=(0,gt.hrTimeDuration)(this.startTime,this.endTime),this._duration[0]<0&&(Ar.diag.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&&Ar.diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`),this._spanProcessor.onEnd(this)}_getTime(e){if(typeof e=="number"&&e<=gt.otperformance.now())return(0,gt.hrTime)(e+this._performanceOffset);if(typeof e=="number")return(0,gt.millisToHrTime)(e);if(e instanceof Date)return(0,gt.millisToHrTime)(e.getTime());if((0,gt.isTimeInputHrTime)(e))return e;if(this._startTimeProvided)return(0,gt.millisToHrTime)(Date.now());let r=gt.otperformance.now()-this._performanceStartTime;return(0,gt.addHrTimes)(this.startTime,(0,gt.millisToHrTime)(r))}isRecording(){return this._ended===!1}recordException(e,r){let n={};typeof e=="string"?n[ks.SEMATTRS_EXCEPTION_MESSAGE]=e:e&&(e.code?n[ks.SEMATTRS_EXCEPTION_TYPE]=e.code.toString():e.name&&(n[ks.SEMATTRS_EXCEPTION_TYPE]=e.name),e.message&&(n[ks.SEMATTRS_EXCEPTION_MESSAGE]=e.message),e.stack&&(n[ks.SEMATTRS_EXCEPTION_STACKTRACE]=e.stack)),n[ks.SEMATTRS_EXCEPTION_TYPE]||n[ks.SEMATTRS_EXCEPTION_MESSAGE]?this.addEvent(ePe.ExceptionEventName,n,r):Ar.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){return this._ended&&Ar.diag.warn(`Can not execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`),this._ended}_truncateToLimitUtil(e,r){return e.length<=r?e:e.substring(0,r)}_truncateToSize(e){let r=this._attributeValueLengthLimit;return r<=0?(Ar.diag.warn(`Attribute value limit must be positive, got ${r}`),e):typeof e=="string"?this._truncateToLimitUtil(e,r):Array.isArray(e)?e.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,r):n):e}};yd.Span=Ng});var hu=E(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.SamplingDecision=void 0;var tPe;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(tPe=mu.SamplingDecision||(mu.SamplingDecision={}))});var vd=E(Md=>{"use strict";Object.defineProperty(Md,"__esModule",{value:!0});Md.AlwaysOffSampler=void 0;var rPe=hu(),Pg=class{shouldSample(){return{decision:rPe.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}};Md.AlwaysOffSampler=Pg});var Ld=E(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.AlwaysOnSampler=void 0;var nPe=hu(),Cg=class{shouldSample(){return{decision:nPe.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}};bd.AlwaysOnSampler=Cg});var vg=E(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.ParentBasedSampler=void 0;var Dd=(M(),P(U)),oPe=re(),_Y=vd(),yg=Ld(),Mg=class{constructor(e){var r,n,o,s;this._root=e.root,this._root||((0,oPe.globalErrorHandler)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new yg.AlwaysOnSampler),this._remoteParentSampled=(r=e.remoteParentSampled)!==null&&r!==void 0?r:new yg.AlwaysOnSampler,this._remoteParentNotSampled=(n=e.remoteParentNotSampled)!==null&&n!==void 0?n:new _Y.AlwaysOffSampler,this._localParentSampled=(o=e.localParentSampled)!==null&&o!==void 0?o:new yg.AlwaysOnSampler,this._localParentNotSampled=(s=e.localParentNotSampled)!==null&&s!==void 0?s:new _Y.AlwaysOffSampler}shouldSample(e,r,n,o,s,i){let a=Dd.trace.getSpanContext(e);return!a||!(0,Dd.isSpanContextValid)(a)?this._root.shouldSample(e,r,n,o,s,i):a.isRemote?a.traceFlags&Dd.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,s,i):this._remoteParentNotSampled.shouldSample(e,r,n,o,s,i):a.traceFlags&Dd.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,s,i):this._localParentNotSampled.shouldSample(e,r,n,o,s,i)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}};xd.ParentBasedSampler=Mg});var Lg=E(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.TraceIdRatioBasedSampler=void 0;var sPe=(M(),P(U)),dY=hu(),bg=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(this._ratio*4294967295)}shouldSample(e,r){return{decision:(0,sPe.isValidTraceId)(r)&&this._accumulate(r)<this._upperBound?dY.SamplingDecision.RECORD_AND_SAMPLED:dY.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return typeof e!="number"||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let r=0;for(let n=0;n<e.length/8;n++){let o=n*8,s=parseInt(e.slice(o,o+8),16);r=(r^s)>>>0}return r}};Ud.TraceIdRatioBasedSampler=bg});var Ug=E(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});na.buildSamplerFromEnv=na.loadDefaultConfig=void 0;var wd=(M(),P(U)),kn=re(),EY=vd(),Dg=Ld(),xg=vg(),fY=Lg(),iPe=kn.TracesSamplerValues.AlwaysOn,ra=1;function aPe(){let t=(0,kn.getEnv)();return{sampler:TY(t),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},mergeResourceWithDefaults:!0}}na.loadDefaultConfig=aPe;function TY(t=(0,kn.getEnv)()){switch(t.OTEL_TRACES_SAMPLER){case kn.TracesSamplerValues.AlwaysOn:return new Dg.AlwaysOnSampler;case kn.TracesSamplerValues.AlwaysOff:return new EY.AlwaysOffSampler;case kn.TracesSamplerValues.ParentBasedAlwaysOn:return new xg.ParentBasedSampler({root:new Dg.AlwaysOnSampler});case kn.TracesSamplerValues.ParentBasedAlwaysOff:return new xg.ParentBasedSampler({root:new EY.AlwaysOffSampler});case kn.TracesSamplerValues.TraceIdRatio:return new fY.TraceIdRatioBasedSampler(SY(t));case kn.TracesSamplerValues.ParentBasedTraceIdRatio:return new xg.ParentBasedSampler({root:new fY.TraceIdRatioBasedSampler(SY(t))});default:return wd.diag.error(`OTEL_TRACES_SAMPLER value "${t.OTEL_TRACES_SAMPLER} invalid, defaulting to ${iPe}".`),new Dg.AlwaysOnSampler}}na.buildSamplerFromEnv=TY;function SY(t){if(t.OTEL_TRACES_SAMPLER_ARG===void 0||t.OTEL_TRACES_SAMPLER_ARG==="")return wd.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ra}.`),ra;let e=Number(t.OTEL_TRACES_SAMPLER_ARG);return isNaN(e)?(wd.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${ra}.`),ra):e<0||e>1?(wd.diag.error(`OTEL_TRACES_SAMPLER_ARG=${t.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${ra}.`),ra):e}});var Vg=E(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});oa.reconfigureLimits=oa.mergeConfig=void 0;var mY=Ug(),wg=re();function cPe(t){let e={sampler:(0,mY.buildSamplerFromEnv)()},r=(0,mY.loadDefaultConfig)(),n=Object.assign({},r,e,t);return n.generalLimits=Object.assign({},r.generalLimits,t.generalLimits||{}),n.spanLimits=Object.assign({},r.spanLimits,t.spanLimits||{}),n}oa.mergeConfig=cPe;function uPe(t){var e,r,n,o,s,i,a,c,u,l,p,_;let d=Object.assign({},t.spanLimits),S=(0,wg.getEnvWithoutDefaults)();return d.attributeCountLimit=(i=(s=(o=(r=(e=t.spanLimits)===null||e===void 0?void 0:e.attributeCountLimit)!==null&&r!==void 0?r:(n=t.generalLimits)===null||n===void 0?void 0:n.attributeCountLimit)!==null&&o!==void 0?o:S.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)!==null&&s!==void 0?s:S.OTEL_ATTRIBUTE_COUNT_LIMIT)!==null&&i!==void 0?i:wg.DEFAULT_ATTRIBUTE_COUNT_LIMIT,d.attributeValueLengthLimit=(_=(p=(l=(c=(a=t.spanLimits)===null||a===void 0?void 0:a.attributeValueLengthLimit)!==null&&c!==void 0?c:(u=t.generalLimits)===null||u===void 0?void 0:u.attributeValueLengthLimit)!==null&&l!==void 0?l:S.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&p!==void 0?p:S.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)!==null&&_!==void 0?_:wg.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT,Object.assign({},t,{spanLimits:d})}oa.reconfigureLimits=uPe});var hY=E(Vd=>{"use strict";Object.defineProperty(Vd,"__esModule",{value:!0});Vd.BatchSpanProcessorBase=void 0;var sa=(M(),P(U)),Fs=re(),Bg=class{constructor(e,r){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;let n=(0,Fs.getEnv)();this._maxExportBatchSize=typeof r?.maxExportBatchSize=="number"?r.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=typeof r?.maxQueueSize=="number"?r.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=typeof r?.scheduledDelayMillis=="number"?r.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis=typeof r?.exportTimeoutMillis=="number"?r.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new Fs.BindOnceFuture(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(sa.diag.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}forceFlush(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}onStart(e,r){}onEnd(e){this._shutdownOnce.isCalled||(e.spanContext().traceFlags&sa.TraceFlags.SAMPLED)!==0&&this._addToBuffer(e)}shutdown(){return this._shutdownOnce.call()}_shutdown(){return Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown())}_addToBuffer(e){if(this._finishedSpans.length>=this._maxQueueSize){this._droppedSpansCount===0&&sa.diag.debug("maxQueueSize reached, dropping spans"),this._droppedSpansCount++;return}this._droppedSpansCount>0&&(sa.diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()}_flushAll(){return new Promise((e,r)=>{let n=[],o=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);for(let s=0,i=o;s<i;s++)n.push(this._flushOneBatch());Promise.all(n).then(()=>{e()}).catch(r)})}_flushOneBatch(){return this._clearTimer(),this._finishedSpans.length===0?Promise.resolve():new Promise((e,r)=>{let n=setTimeout(()=>{r(new Error("Timeout"))},this._exportTimeoutMillis);sa.context.with((0,Fs.suppressTracing)(sa.context.active()),()=>{let o;this._finishedSpans.length<=this._maxExportBatchSize?(o=this._finishedSpans,this._finishedSpans=[]):o=this._finishedSpans.splice(0,this._maxExportBatchSize);let s=()=>this._exporter.export(o,a=>{var c;clearTimeout(n),a.code===Fs.ExportResultCode.SUCCESS?e():r((c=a.error)!==null&&c!==void 0?c:new Error("BatchSpanProcessor: span export failed"))}),i=null;for(let a=0,c=o.length;a<c;a++){let u=o[a];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(i??(i=[]),i.push(u.resource.waitForAsyncAttributes()))}i===null?s():Promise.all(i).then(s,a=>{(0,Fs.globalErrorHandler)(a),r(a)})})})}_maybeStartTimer(){if(this._isExporting)return;let e=()=>{this._isExporting=!0,this._flushOneBatch().finally(()=>{this._isExporting=!1,this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(r=>{this._isExporting=!1,(0,Fs.globalErrorHandler)(r)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return e();this._timer===void 0&&(this._timer=setTimeout(()=>e(),this._scheduledDelayMillis),(0,Fs.unrefTimer)(this._timer))}_clearTimer(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}};Vd.BatchSpanProcessorBase=Bg});var gY=E(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});Bd.BatchSpanProcessor=void 0;var lPe=hY(),Gg=class extends lPe.BatchSpanProcessorBase{onShutdown(){}};Bd.BatchSpanProcessor=Gg});var OY=E(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.RandomIdGenerator=void 0;var pPe=8,RY=16,Hg=class{constructor(){this.generateTraceId=AY(RY),this.generateSpanId=AY(pPe)}};Hd.RandomIdGenerator=Hg;var Gd=Buffer.allocUnsafe(RY);function AY(t){return function(){for(let r=0;r<t/4;r++)Gd.writeUInt32BE(Math.random()*2**32>>>0,r*4);for(let r=0;r<t&&!(Gd[r]>0);r++)r===t-1&&(Gd[t-1]=1);return Gd.toString("hex",0,t)}}});var NY=E(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});ia.RandomIdGenerator=ia.BatchSpanProcessor=void 0;var _Pe=gY();Object.defineProperty(ia,"BatchSpanProcessor",{enumerable:!0,get:function(){return _Pe.BatchSpanProcessor}});var dPe=OY();Object.defineProperty(ia,"RandomIdGenerator",{enumerable:!0,get:function(){return dPe.RandomIdGenerator}})});var kd=E(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.RandomIdGenerator=aa.BatchSpanProcessor=void 0;var IY=NY();Object.defineProperty(aa,"BatchSpanProcessor",{enumerable:!0,get:function(){return IY.BatchSpanProcessor}});Object.defineProperty(aa,"RandomIdGenerator",{enumerable:!0,get:function(){return IY.RandomIdGenerator}})});var Fg=E(qd=>{"use strict";Object.defineProperty(qd,"__esModule",{value:!0});qd.Tracer=void 0;var ut=(M(),P(U)),Fd=re(),EPe=Ig(),fPe=Vg(),SPe=kd(),kg=class{constructor(e,r,n){this._tracerProvider=n;let o=(0,fPe.mergeConfig)(r);this._sampler=o.sampler,this._generalLimits=o.generalLimits,this._spanLimits=o.spanLimits,this._idGenerator=r.idGenerator||new SPe.RandomIdGenerator,this.resource=n.resource,this.instrumentationLibrary=e}startSpan(e,r={},n=ut.context.active()){var o,s,i;r.root&&(n=ut.trace.deleteSpan(n));let a=ut.trace.getSpan(n);if((0,Fd.isTracingSuppressed)(n))return ut.diag.debug("Instrumentation suppressed, returning Noop Span"),ut.trace.wrapSpanContext(ut.INVALID_SPAN_CONTEXT);let c=a?.spanContext(),u=this._idGenerator.generateSpanId(),l,p,_;!c||!ut.trace.isSpanContextValid(c)?l=this._idGenerator.generateTraceId():(l=c.traceId,p=c.traceState,_=c.spanId);let d=(o=r.kind)!==null&&o!==void 0?o:ut.SpanKind.INTERNAL,S=((s=r.links)!==null&&s!==void 0?s:[]).map(O=>({context:O.context,attributes:(0,Fd.sanitizeAttributes)(O.attributes)})),f=(0,Fd.sanitizeAttributes)(r.attributes),T=this._sampler.shouldSample(n,l,e,d,f,S);p=(i=T.traceState)!==null&&i!==void 0?i:p;let h=T.decision===ut.SamplingDecision.RECORD_AND_SAMPLED?ut.TraceFlags.SAMPLED:ut.TraceFlags.NONE,A={traceId:l,spanId:u,traceFlags:h,traceState:p};if(T.decision===ut.SamplingDecision.NOT_RECORD)return ut.diag.debug("Recording is off, propagating context in a non-recording span"),ut.trace.wrapSpanContext(A);let N=(0,Fd.sanitizeAttributes)(Object.assign(f,T.attributes));return new EPe.Span(this,n,e,A,d,_,S,r.startTime,void 0,N)}startActiveSpan(e,r,n,o){let s,i,a;if(arguments.length<2)return;arguments.length===2?a=r:arguments.length===3?(s=r,a=n):(s=r,i=n,a=o);let c=i??ut.context.active(),u=this.startSpan(e,s,c),l=ut.trace.setSpan(c,u);return ut.context.with(l,a,void 0,u)}getGeneralLimits(){return this._generalLimits}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}};qd.Tracer=kg});var PY=E(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});jd.defaultServiceName=void 0;function TPe(){return`unknown_service:${process.argv0}`}jd.defaultServiceName=TPe});var CY=E(Yd=>{"use strict";Object.defineProperty(Yd,"__esModule",{value:!0});Yd.defaultServiceName=void 0;var mPe=PY();Object.defineProperty(Yd,"defaultServiceName",{enumerable:!0,get:function(){return mPe.defaultServiceName}})});var qg=E($d=>{"use strict";Object.defineProperty($d,"__esModule",{value:!0});$d.defaultServiceName=void 0;var hPe=CY();Object.defineProperty($d,"defaultServiceName",{enumerable:!0,get:function(){return hPe.defaultServiceName}})});var Fn=E(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.Resource=void 0;var yY=(M(),P(U)),qs=(dr(),P(_r)),jg=re(),gPe=qg(),gu=class t{constructor(e,r){var n;this._attributes=e,this.asyncAttributesPending=r!=null,this._syncAttributes=(n=this._attributes)!==null&&n!==void 0?n:{},this._asyncAttributesPromise=r?.then(o=>(this._attributes=Object.assign({},this._attributes,o),this.asyncAttributesPending=!1,o),o=>(yY.diag.debug("a resource's async attributes promise rejected: %s",o),this.asyncAttributesPending=!1,{}))}static empty(){return t.EMPTY}static default(){return new t({[qs.SEMRESATTRS_SERVICE_NAME]:(0,gPe.defaultServiceName)(),[qs.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_LANGUAGE],[qs.SEMRESATTRS_TELEMETRY_SDK_NAME]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_NAME],[qs.SEMRESATTRS_TELEMETRY_SDK_VERSION]:jg.SDK_INFO[qs.SEMRESATTRS_TELEMETRY_SDK_VERSION]})}get attributes(){var e;return this.asyncAttributesPending&&yY.diag.error("Accessing resource attributes before async attributes settled"),(e=this._attributes)!==null&&e!==void 0?e:{}}async waitForAsyncAttributes(){this.asyncAttributesPending&&await this._asyncAttributesPromise}merge(e){var r;if(!e)return this;let n=Object.assign(Object.assign({},this._syncAttributes),(r=e._syncAttributes)!==null&&r!==void 0?r:e.attributes);if(!this._asyncAttributesPromise&&!e._asyncAttributesPromise)return new t(n);let o=Promise.all([this._asyncAttributesPromise,e._asyncAttributesPromise]).then(([s,i])=>{var a;return Object.assign(Object.assign(Object.assign(Object.assign({},this._syncAttributes),s),(a=e._syncAttributes)!==null&&a!==void 0?a:e.attributes),i)});return new t(n,o)}};Kd.Resource=gu;gu.EMPTY=new gu({})});var Yg=E(ca=>{"use strict";Object.defineProperty(ca,"__esModule",{value:!0});ca.normalizeType=ca.normalizeArch=void 0;var APe=t=>{switch(t){case"arm":return"arm32";case"ppc":return"ppc32";case"x64":return"amd64";default:return t}};ca.normalizeArch=APe;var RPe=t=>{switch(t){case"sunos":return"solaris";case"win32":return"windows";default:return t}};ca.normalizeType=RPe});var Xd=E(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.execAsync=void 0;var OPe=require("child_process"),NPe=require("util");Wd.execAsync=NPe.promisify(OPe.exec)});var MY=E(zd=>{"use strict";Object.defineProperty(zd,"__esModule",{value:!0});zd.getMachineId=void 0;var IPe=Xd(),PPe=(M(),P(U));async function CPe(){try{let e=(await(0,IPe.execAsync)('ioreg -rd1 -c "IOPlatformExpertDevice"')).stdout.split(`
|
|
7
|
+
`).find(n=>n.includes("IOPlatformUUID"));if(!e)return"";let r=e.split('" = "');if(r.length===2)return r[1].slice(0,-1)}catch(t){PPe.diag.debug(`error reading machine id: ${t}`)}return""}zd.getMachineId=CPe});var vY=E(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});Qd.getMachineId=void 0;var yPe=require("fs"),MPe=(M(),P(U));async function vPe(){let t=["/etc/machine-id","/var/lib/dbus/machine-id"];for(let e of t)try{return(await yPe.promises.readFile(e,{encoding:"utf8"})).trim()}catch(r){MPe.diag.debug(`error reading machine id: ${r}`)}return""}Qd.getMachineId=vPe});var LY=E(Jd=>{"use strict";Object.defineProperty(Jd,"__esModule",{value:!0});Jd.getMachineId=void 0;var bPe=require("fs"),LPe=Xd(),bY=(M(),P(U));async function DPe(){try{return(await bPe.promises.readFile("/etc/hostid",{encoding:"utf8"})).trim()}catch(t){bY.diag.debug(`error reading machine id: ${t}`)}try{return(await(0,LPe.execAsync)("kenv -q smbios.system.uuid")).stdout.trim()}catch(t){bY.diag.debug(`error reading machine id: ${t}`)}return""}Jd.getMachineId=DPe});var xY=E(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.getMachineId=void 0;var DY=require("process"),xPe=Xd(),UPe=(M(),P(U));async function wPe(){let t="QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid",e="%windir%\\System32\\REG.exe";DY.arch==="ia32"&&"PROCESSOR_ARCHITEW6432"in DY.env&&(e="%windir%\\sysnative\\cmd.exe /c "+e);try{let n=(await(0,xPe.execAsync)(`${e} ${t}`)).stdout.split("REG_SZ");if(n.length===2)return n[1].trim()}catch(r){UPe.diag.debug(`error reading machine id: ${r}`)}return""}Zd.getMachineId=wPe});var UY=E(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.getMachineId=void 0;var VPe=(M(),P(U));async function BPe(){return VPe.diag.debug("could not read machine-id: unsupported platform"),""}eE.getMachineId=BPe});var wY=E(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.getMachineId=void 0;var GPe=require("process"),ua;qn.getMachineId=ua;switch(GPe.platform){case"darwin":qn.getMachineId=ua=MY().getMachineId;break;case"linux":qn.getMachineId=ua=vY().getMachineId;break;case"freebsd":qn.getMachineId=ua=LY().getMachineId;break;case"win32":qn.getMachineId=ua=xY().getMachineId;break;default:qn.getMachineId=ua=UY().getMachineId}});var Wg=E(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.hostDetectorSync=void 0;var $g=(dr(),P(_r)),HPe=Fn(),VY=require("os"),kPe=Yg(),FPe=wY(),Kg=class{detect(e){let r={[$g.SEMRESATTRS_HOST_NAME]:(0,VY.hostname)(),[$g.SEMRESATTRS_HOST_ARCH]:(0,kPe.normalizeArch)((0,VY.arch)())};return new HPe.Resource(r,this._getAsyncAttributes())}_getAsyncAttributes(){return(0,FPe.getMachineId)().then(e=>{let r={};return e&&(r[$g.SEMRESATTRS_HOST_ID]=e),r})}};tE.hostDetectorSync=new Kg});var BY=E(rE=>{"use strict";Object.defineProperty(rE,"__esModule",{value:!0});rE.hostDetector=void 0;var qPe=Wg(),Xg=class{detect(e){return Promise.resolve(qPe.hostDetectorSync.detect(e))}};rE.hostDetector=new Xg});var Qg=E(nE=>{"use strict";Object.defineProperty(nE,"__esModule",{value:!0});nE.osDetectorSync=void 0;var GY=(dr(),P(_r)),jPe=Fn(),HY=require("os"),YPe=Yg(),zg=class{detect(e){let r={[GY.SEMRESATTRS_OS_TYPE]:(0,YPe.normalizeType)((0,HY.platform)()),[GY.SEMRESATTRS_OS_VERSION]:(0,HY.release)()};return new jPe.Resource(r)}};nE.osDetectorSync=new zg});var kY=E(oE=>{"use strict";Object.defineProperty(oE,"__esModule",{value:!0});oE.osDetector=void 0;var $Pe=Qg(),Jg=class{detect(e){return Promise.resolve($Pe.osDetectorSync.detect(e))}};oE.osDetector=new Jg});var eA=E(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.processDetectorSync=void 0;var KPe=(M(),P(U)),jn=(dr(),P(_r)),WPe=Fn(),XPe=require("os"),Zg=class{detect(e){let r={[jn.SEMRESATTRS_PROCESS_PID]:process.pid,[jn.SEMRESATTRS_PROCESS_EXECUTABLE_NAME]:process.title,[jn.SEMRESATTRS_PROCESS_EXECUTABLE_PATH]:process.execPath,[jn.SEMRESATTRS_PROCESS_COMMAND_ARGS]:[process.argv[0],...process.execArgv,...process.argv.slice(1)],[jn.SEMRESATTRS_PROCESS_RUNTIME_VERSION]:process.versions.node,[jn.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"nodejs",[jn.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]:"Node.js"};process.argv.length>1&&(r[jn.SEMRESATTRS_PROCESS_COMMAND]=process.argv[1]);try{let n=XPe.userInfo();r[jn.SEMRESATTRS_PROCESS_OWNER]=n.username}catch(n){KPe.diag.debug(`error obtaining process owner: ${n}`)}return new WPe.Resource(r)}};sE.processDetectorSync=new Zg});var FY=E(iE=>{"use strict";Object.defineProperty(iE,"__esModule",{value:!0});iE.processDetector=void 0;var zPe=eA(),tA=class{detect(e){return Promise.resolve(zPe.processDetectorSync.detect(e))}};iE.processDetector=new tA});var qY=E(aE=>{"use strict";Object.defineProperty(aE,"__esModule",{value:!0});aE.serviceInstanceIdDetectorSync=void 0;var QPe=(dr(),P(_r)),JPe=Fn(),ZPe=require("crypto"),rA=class{detect(e){let r={[QPe.SEMRESATTRS_SERVICE_INSTANCE_ID]:(0,ZPe.randomUUID)()};return new JPe.Resource(r)}};aE.serviceInstanceIdDetectorSync=new rA});var jY=E(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.serviceInstanceIdDetectorSync=At.processDetectorSync=At.processDetector=At.osDetectorSync=At.osDetector=At.hostDetectorSync=At.hostDetector=void 0;var eCe=BY();Object.defineProperty(At,"hostDetector",{enumerable:!0,get:function(){return eCe.hostDetector}});var tCe=Wg();Object.defineProperty(At,"hostDetectorSync",{enumerable:!0,get:function(){return tCe.hostDetectorSync}});var rCe=kY();Object.defineProperty(At,"osDetector",{enumerable:!0,get:function(){return rCe.osDetector}});var nCe=Qg();Object.defineProperty(At,"osDetectorSync",{enumerable:!0,get:function(){return nCe.osDetectorSync}});var oCe=FY();Object.defineProperty(At,"processDetector",{enumerable:!0,get:function(){return oCe.processDetector}});var sCe=eA();Object.defineProperty(At,"processDetectorSync",{enumerable:!0,get:function(){return sCe.processDetectorSync}});var iCe=qY();Object.defineProperty(At,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return iCe.serviceInstanceIdDetectorSync}})});var YY=E(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.serviceInstanceIdDetectorSync=Rt.processDetectorSync=Rt.processDetector=Rt.osDetectorSync=Rt.osDetector=Rt.hostDetectorSync=Rt.hostDetector=void 0;var js=jY();Object.defineProperty(Rt,"hostDetector",{enumerable:!0,get:function(){return js.hostDetector}});Object.defineProperty(Rt,"hostDetectorSync",{enumerable:!0,get:function(){return js.hostDetectorSync}});Object.defineProperty(Rt,"osDetector",{enumerable:!0,get:function(){return js.osDetector}});Object.defineProperty(Rt,"osDetectorSync",{enumerable:!0,get:function(){return js.osDetectorSync}});Object.defineProperty(Rt,"processDetector",{enumerable:!0,get:function(){return js.processDetector}});Object.defineProperty(Rt,"processDetectorSync",{enumerable:!0,get:function(){return js.processDetectorSync}});Object.defineProperty(Rt,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return js.serviceInstanceIdDetectorSync}})});var sA=E(uE=>{"use strict";Object.defineProperty(uE,"__esModule",{value:!0});uE.browserDetectorSync=void 0;var cE=(dr(),P(_r)),aCe=(M(),P(U)),nA=Fn(),oA=class{detect(e){var r,n,o;if(!(typeof navigator<"u"&&((n=(r=global.process)===null||r===void 0?void 0:r.versions)===null||n===void 0?void 0:n.node)===void 0&&((o=global.Bun)===null||o===void 0?void 0:o.version)===void 0))return nA.Resource.empty();let i={[cE.SEMRESATTRS_PROCESS_RUNTIME_NAME]:"browser",[cE.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]:"Web Browser",[cE.SEMRESATTRS_PROCESS_RUNTIME_VERSION]:navigator.userAgent};return this._getResourceAttributes(i,e)}_getResourceAttributes(e,r){return e[cE.SEMRESATTRS_PROCESS_RUNTIME_VERSION]===""?(aCe.diag.debug("BrowserDetector failed: Unable to find required browser resources. "),nA.Resource.empty()):new nA.Resource(Object.assign({},e))}};uE.browserDetectorSync=new oA});var $Y=E(lE=>{"use strict";Object.defineProperty(lE,"__esModule",{value:!0});lE.browserDetector=void 0;var cCe=sA(),iA=class{detect(e){return Promise.resolve(cCe.browserDetectorSync.detect(e))}};lE.browserDetector=new iA});var cA=E(pE=>{"use strict";Object.defineProperty(pE,"__esModule",{value:!0});pE.envDetectorSync=void 0;var uCe=(M(),P(U)),lCe=re(),pCe=(dr(),P(_r)),_Ce=Fn(),aA=class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}detect(e){let r={},n=(0,lCe.getEnv)(),o=n.OTEL_RESOURCE_ATTRIBUTES,s=n.OTEL_SERVICE_NAME;if(o)try{let i=this._parseResourceAttributes(o);Object.assign(r,i)}catch(i){uCe.diag.debug(`EnvDetector failed: ${i.message}`)}return s&&(r[pCe.SEMRESATTRS_SERVICE_NAME]=s),new _Ce.Resource(r)}_parseResourceAttributes(e){if(!e)return{};let r={},n=e.split(this._COMMA_SEPARATOR,-1);for(let o of n){let s=o.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(s.length!==2)continue;let[i,a]=s;if(i=i.trim(),a=a.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(i))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(a))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);r[i]=decodeURIComponent(a)}return r}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)}_isBaggageOctetString(e){for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);if(n<33||n===44||n===59||n===92||n>126)return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}};pE.envDetectorSync=new aA});var KY=E(_E=>{"use strict";Object.defineProperty(_E,"__esModule",{value:!0});_E.envDetector=void 0;var dCe=cA(),uA=class{detect(e){return Promise.resolve(dCe.envDetectorSync.detect(e))}};_E.envDetector=new uA});var WY=E(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.envDetectorSync=ge.browserDetectorSync=ge.envDetector=ge.browserDetector=ge.serviceInstanceIdDetectorSync=ge.processDetectorSync=ge.processDetector=ge.osDetectorSync=ge.osDetector=ge.hostDetectorSync=ge.hostDetector=void 0;var Ys=YY();Object.defineProperty(ge,"hostDetector",{enumerable:!0,get:function(){return Ys.hostDetector}});Object.defineProperty(ge,"hostDetectorSync",{enumerable:!0,get:function(){return Ys.hostDetectorSync}});Object.defineProperty(ge,"osDetector",{enumerable:!0,get:function(){return Ys.osDetector}});Object.defineProperty(ge,"osDetectorSync",{enumerable:!0,get:function(){return Ys.osDetectorSync}});Object.defineProperty(ge,"processDetector",{enumerable:!0,get:function(){return Ys.processDetector}});Object.defineProperty(ge,"processDetectorSync",{enumerable:!0,get:function(){return Ys.processDetectorSync}});Object.defineProperty(ge,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return Ys.serviceInstanceIdDetectorSync}});var ECe=$Y();Object.defineProperty(ge,"browserDetector",{enumerable:!0,get:function(){return ECe.browserDetector}});var fCe=KY();Object.defineProperty(ge,"envDetector",{enumerable:!0,get:function(){return fCe.envDetector}});var SCe=sA();Object.defineProperty(ge,"browserDetectorSync",{enumerable:!0,get:function(){return SCe.browserDetectorSync}});var TCe=cA();Object.defineProperty(ge,"envDetectorSync",{enumerable:!0,get:function(){return TCe.envDetectorSync}})});var XY=E(dE=>{"use strict";Object.defineProperty(dE,"__esModule",{value:!0});dE.isPromiseLike=void 0;var mCe=t=>t!==null&&typeof t=="object"&&typeof t.then=="function";dE.isPromiseLike=mCe});var QY=E(pa=>{"use strict";Object.defineProperty(pa,"__esModule",{value:!0});pa.detectResourcesSync=pa.detectResources=void 0;var Au=Fn(),la=(M(),P(U)),hCe=XY(),gCe=async(t={})=>{let e=await Promise.all((t.detectors||[]).map(async r=>{try{let n=await r.detect(t);return la.diag.debug(`${r.constructor.name} found resource.`,n),n}catch(n){return la.diag.debug(`${r.constructor.name} failed: ${n.message}`),Au.Resource.empty()}}));return zY(e),e.reduce((r,n)=>r.merge(n),Au.Resource.empty())};pa.detectResources=gCe;var ACe=(t={})=>{var e;let r=((e=t.detectors)!==null&&e!==void 0?e:[]).map(o=>{try{let s=o.detect(t),i;if((0,hCe.isPromiseLike)(s)){let a=async()=>{var c;let u=await s;return await((c=u.waitForAsyncAttributes)===null||c===void 0?void 0:c.call(u)),u.attributes};i=new Au.Resource({},a())}else i=s;return i.waitForAsyncAttributes?i.waitForAsyncAttributes().then(()=>la.diag.debug(`${o.constructor.name} found resource.`,i)):la.diag.debug(`${o.constructor.name} found resource.`,i),i}catch(s){return la.diag.error(`${o.constructor.name} failed: ${s.message}`),Au.Resource.empty()}}),n=r.reduce((o,s)=>o.merge(s),Au.Resource.empty());return n.waitForAsyncAttributes&&n.waitForAsyncAttributes().then(()=>{zY(r)}),n};pa.detectResourcesSync=ACe;var zY=t=>{t.forEach(e=>{if(Object.keys(e.attributes).length>0){let r=JSON.stringify(e.attributes,null,4);la.diag.verbose(r)}})}});var lA=E(ne=>{"use strict";Object.defineProperty(ne,"__esModule",{value:!0});ne.detectResources=ne.detectResourcesSync=ne.serviceInstanceIdDetectorSync=ne.processDetectorSync=ne.processDetector=ne.osDetectorSync=ne.osDetector=ne.hostDetectorSync=ne.hostDetector=ne.envDetectorSync=ne.envDetector=ne.browserDetectorSync=ne.browserDetector=ne.defaultServiceName=ne.Resource=void 0;var RCe=Fn();Object.defineProperty(ne,"Resource",{enumerable:!0,get:function(){return RCe.Resource}});var OCe=qg();Object.defineProperty(ne,"defaultServiceName",{enumerable:!0,get:function(){return OCe.defaultServiceName}});var Yr=WY();Object.defineProperty(ne,"browserDetector",{enumerable:!0,get:function(){return Yr.browserDetector}});Object.defineProperty(ne,"browserDetectorSync",{enumerable:!0,get:function(){return Yr.browserDetectorSync}});Object.defineProperty(ne,"envDetector",{enumerable:!0,get:function(){return Yr.envDetector}});Object.defineProperty(ne,"envDetectorSync",{enumerable:!0,get:function(){return Yr.envDetectorSync}});Object.defineProperty(ne,"hostDetector",{enumerable:!0,get:function(){return Yr.hostDetector}});Object.defineProperty(ne,"hostDetectorSync",{enumerable:!0,get:function(){return Yr.hostDetectorSync}});Object.defineProperty(ne,"osDetector",{enumerable:!0,get:function(){return Yr.osDetector}});Object.defineProperty(ne,"osDetectorSync",{enumerable:!0,get:function(){return Yr.osDetectorSync}});Object.defineProperty(ne,"processDetector",{enumerable:!0,get:function(){return Yr.processDetector}});Object.defineProperty(ne,"processDetectorSync",{enumerable:!0,get:function(){return Yr.processDetectorSync}});Object.defineProperty(ne,"serviceInstanceIdDetectorSync",{enumerable:!0,get:function(){return Yr.serviceInstanceIdDetectorSync}});var JY=QY();Object.defineProperty(ne,"detectResourcesSync",{enumerable:!0,get:function(){return JY.detectResourcesSync}});Object.defineProperty(ne,"detectResources",{enumerable:!0,get:function(){return JY.detectResources}})});var ZY=E(EE=>{"use strict";Object.defineProperty(EE,"__esModule",{value:!0});EE.MultiSpanProcessor=void 0;var NCe=re(),pA=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let r of this._spanProcessors)e.push(r.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(n=>{(0,NCe.globalErrorHandler)(n||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,r){for(let n of this._spanProcessors)n.onStart(e,r)}onEnd(e){for(let r of this._spanProcessors)r.onEnd(e)}shutdown(){let e=[];for(let r of this._spanProcessors)e.push(r.shutdown());return new Promise((r,n)=>{Promise.all(e).then(()=>{r()},n)})}};EE.MultiSpanProcessor=pA});var dA=E(fE=>{"use strict";Object.defineProperty(fE,"__esModule",{value:!0});fE.NoopSpanProcessor=void 0;var _A=class{onStart(e,r){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}};fE.NoopSpanProcessor=_A});var r$=E($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.BasicTracerProvider=$s.ForceFlushState=void 0;var _a=(M(),P(U)),Ea=re(),e$=lA(),ICe=Fg(),PCe=Ug(),t$=ZY(),CCe=dA(),yCe=kd(),MCe=Vg(),da;(function(t){t[t.resolved=0]="resolved",t[t.timeout=1]="timeout",t[t.error=2]="error",t[t.unresolved=3]="unresolved"})(da=$s.ForceFlushState||($s.ForceFlushState={}));var Ru=class{constructor(e={}){var r,n;this._registeredSpanProcessors=[],this._tracers=new Map;let o=(0,Ea.merge)({},(0,PCe.loadDefaultConfig)(),(0,MCe.reconfigureLimits)(e));if(this.resource=(r=o.resource)!==null&&r!==void 0?r:e$.Resource.empty(),o.mergeResourceWithDefaults&&(this.resource=e$.Resource.default().merge(this.resource)),this._config=Object.assign({},o,{resource:this.resource}),!((n=e.spanProcessors)===null||n===void 0)&&n.length)this._registeredSpanProcessors=[...e.spanProcessors],this.activeSpanProcessor=new t$.MultiSpanProcessor(this._registeredSpanProcessors);else{let s=this._buildExporterFromEnv();if(s!==void 0){let i=new yCe.BatchSpanProcessor(s);this.activeSpanProcessor=i}else this.activeSpanProcessor=new CCe.NoopSpanProcessor}}getTracer(e,r,n){let o=`${e}@${r||""}:${n?.schemaUrl||""}`;return this._tracers.has(o)||this._tracers.set(o,new ICe.Tracer({name:e,version:r,schemaUrl:n?.schemaUrl},this._config,this)),this._tracers.get(o)}addSpanProcessor(e){this._registeredSpanProcessors.length===0&&this.activeSpanProcessor.shutdown().catch(r=>_a.diag.error("Error while trying to shutdown current span processor",r)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new t$.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){_a.trace.setGlobalTracerProvider(this),e.propagator===void 0&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&_a.context.setGlobalContextManager(e.contextManager),e.propagator&&_a.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(n=>new Promise(o=>{let s,i=setTimeout(()=>{o(new Error(`Span processor did not completed within timeout period of ${e} ms`)),s=da.timeout},e);n.forceFlush().then(()=>{clearTimeout(i),s!==da.timeout&&(s=da.resolved,o(s))}).catch(a=>{clearTimeout(i),s=da.error,o(a)})}));return new Promise((n,o)=>{Promise.all(r).then(s=>{let i=s.filter(a=>a!==da.resolved);i.length>0?o(i):n()}).catch(s=>o([s]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var r;return(r=this.constructor._registeredPropagators.get(e))===null||r===void 0?void 0:r()}_getSpanExporter(e){var r;return(r=this.constructor._registeredExporters.get(e))===null||r===void 0?void 0:r()}_buildPropagatorFromEnv(){let e=Array.from(new Set((0,Ea.getEnv)().OTEL_PROPAGATORS)),n=e.map(o=>{let s=this._getPropagator(o);return s||_a.diag.warn(`Propagator "${o}" requested through environment variable is unavailable.`),s}).reduce((o,s)=>(s&&o.push(s),o),[]);if(n.length!==0)return e.length===1?n[0]:new Ea.CompositePropagator({propagators:n})}_buildExporterFromEnv(){let e=(0,Ea.getEnv)().OTEL_TRACES_EXPORTER;if(e==="none"||e==="")return;let r=this._getSpanExporter(e);return r||_a.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),r}};$s.BasicTracerProvider=Ru;Ru._registeredPropagators=new Map([["tracecontext",()=>new Ea.W3CTraceContextPropagator],["baggage",()=>new Ea.W3CBaggagePropagator]]);Ru._registeredExporters=new Map});var n$=E(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.ConsoleSpanExporter=void 0;var EA=re(),fA=class{export(e,r){return this._sendSpans(e,r)}shutdown(){return this._sendSpans([]),this.forceFlush()}forceFlush(){return Promise.resolve()}_exportInfo(e){var r;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:(r=e.spanContext().traceState)===null||r===void 0?void 0:r.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:(0,EA.hrTimeToMicroseconds)(e.startTime),duration:(0,EA.hrTimeToMicroseconds)(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}}_sendSpans(e,r){for(let n of e)console.dir(this._exportInfo(n),{depth:3});if(r)return r({code:EA.ExportResultCode.SUCCESS})}};SE.ConsoleSpanExporter=fA});var s$=E(TE=>{"use strict";Object.defineProperty(TE,"__esModule",{value:!0});TE.InMemorySpanExporter=void 0;var o$=re(),SA=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,r){if(this._stopped)return r({code:o$.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>r({code:o$.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()}forceFlush(){return Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}};TE.InMemorySpanExporter=SA});var i$=E(mE=>{"use strict";Object.defineProperty(mE,"__esModule",{value:!0});mE.SimpleSpanProcessor=void 0;var vCe=(M(),P(U)),fa=re(),TA=class{constructor(e){this._exporter=e,this._shutdownOnce=new fa.BindOnceFuture(this._shutdown,this),this._unresolvedExports=new Set}async forceFlush(){await Promise.all(Array.from(this._unresolvedExports)),this._exporter.forceFlush&&await this._exporter.forceFlush()}onStart(e,r){}onEnd(e){var r,n;if(this._shutdownOnce.isCalled||(e.spanContext().traceFlags&vCe.TraceFlags.SAMPLED)===0)return;let o=()=>fa.internal._export(this._exporter,[e]).then(s=>{var i;s.code!==fa.ExportResultCode.SUCCESS&&(0,fa.globalErrorHandler)((i=s.error)!==null&&i!==void 0?i:new Error(`SimpleSpanProcessor: span export failed (status ${s})`))}).catch(s=>{(0,fa.globalErrorHandler)(s)});if(e.resource.asyncAttributesPending){let s=(n=(r=e.resource).waitForAsyncAttributes)===null||n===void 0?void 0:n.call(r).then(()=>(s!=null&&this._unresolvedExports.delete(s),o()),i=>(0,fa.globalErrorHandler)(i));s!=null&&this._unresolvedExports.add(s)}else o()}shutdown(){return this._shutdownOnce.call()}_shutdown(){return this._exporter.shutdown()}};mE.SimpleSpanProcessor=TA});var mA=E(oe=>{"use strict";Object.defineProperty(oe,"__esModule",{value:!0});oe.Span=oe.SamplingDecision=oe.TraceIdRatioBasedSampler=oe.ParentBasedSampler=oe.AlwaysOnSampler=oe.AlwaysOffSampler=oe.NoopSpanProcessor=oe.SimpleSpanProcessor=oe.InMemorySpanExporter=oe.ConsoleSpanExporter=oe.RandomIdGenerator=oe.BatchSpanProcessor=oe.ForceFlushState=oe.BasicTracerProvider=oe.Tracer=void 0;var bCe=Fg();Object.defineProperty(oe,"Tracer",{enumerable:!0,get:function(){return bCe.Tracer}});var a$=r$();Object.defineProperty(oe,"BasicTracerProvider",{enumerable:!0,get:function(){return a$.BasicTracerProvider}});Object.defineProperty(oe,"ForceFlushState",{enumerable:!0,get:function(){return a$.ForceFlushState}});var c$=kd();Object.defineProperty(oe,"BatchSpanProcessor",{enumerable:!0,get:function(){return c$.BatchSpanProcessor}});Object.defineProperty(oe,"RandomIdGenerator",{enumerable:!0,get:function(){return c$.RandomIdGenerator}});var LCe=n$();Object.defineProperty(oe,"ConsoleSpanExporter",{enumerable:!0,get:function(){return LCe.ConsoleSpanExporter}});var DCe=s$();Object.defineProperty(oe,"InMemorySpanExporter",{enumerable:!0,get:function(){return DCe.InMemorySpanExporter}});var xCe=i$();Object.defineProperty(oe,"SimpleSpanProcessor",{enumerable:!0,get:function(){return xCe.SimpleSpanProcessor}});var UCe=dA();Object.defineProperty(oe,"NoopSpanProcessor",{enumerable:!0,get:function(){return UCe.NoopSpanProcessor}});var wCe=vd();Object.defineProperty(oe,"AlwaysOffSampler",{enumerable:!0,get:function(){return wCe.AlwaysOffSampler}});var VCe=Ld();Object.defineProperty(oe,"AlwaysOnSampler",{enumerable:!0,get:function(){return VCe.AlwaysOnSampler}});var BCe=vg();Object.defineProperty(oe,"ParentBasedSampler",{enumerable:!0,get:function(){return BCe.ParentBasedSampler}});var GCe=Lg();Object.defineProperty(oe,"TraceIdRatioBasedSampler",{enumerable:!0,get:function(){return GCe.TraceIdRatioBasedSampler}});var HCe=hu();Object.defineProperty(oe,"SamplingDecision",{enumerable:!0,get:function(){return HCe.SamplingDecision}});var kCe=Ig();Object.defineProperty(oe,"Span",{enumerable:!0,get:function(){return kCe.Span}})});var $A=E(yE=>{"use strict";Object.defineProperty(yE,"__esModule",{value:!0});yE.AbstractAsyncHooksContextManager=void 0;var VMe=require("events"),BMe=["addListener","on","once","prependListener","prependOnceListener"],YA=class{constructor(){this._kOtListeners=Symbol("OtListeners"),this._wrapped=!1}bind(e,r){return r instanceof VMe.EventEmitter?this._bindEventEmitter(e,r):typeof r=="function"?this._bindFunction(e,r):r}_bindFunction(e,r){let n=this,o=function(...s){return n.with(e,()=>r.apply(this,s))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:r.length}),o}_bindEventEmitter(e,r){return this._getPatchMap(r)!==void 0||(this._createPatchMap(r),BMe.forEach(o=>{r[o]!==void 0&&(r[o]=this._patchAddListener(r,r[o],e))}),typeof r.removeListener=="function"&&(r.removeListener=this._patchRemoveListener(r,r.removeListener)),typeof r.off=="function"&&(r.off=this._patchRemoveListener(r,r.off)),typeof r.removeAllListeners=="function"&&(r.removeAllListeners=this._patchRemoveAllListeners(r,r.removeAllListeners))),r}_patchRemoveListener(e,r){let n=this;return function(o,s){var i;let a=(i=n._getPatchMap(e))===null||i===void 0?void 0:i[o];if(a===void 0)return r.call(this,o,s);let c=a.get(s);return r.call(this,o,c||s)}}_patchRemoveAllListeners(e,r){let n=this;return function(o){let s=n._getPatchMap(e);return s!==void 0&&(arguments.length===0?n._createPatchMap(e):s[o]!==void 0&&delete s[o]),r.apply(this,arguments)}}_patchAddListener(e,r,n){let o=this;return function(s,i){if(o._wrapped)return r.call(this,s,i);let a=o._getPatchMap(e);a===void 0&&(a=o._createPatchMap(e));let c=a[s];c===void 0&&(c=new WeakMap,a[s]=c);let u=o.bind(n,i);c.set(i,u),o._wrapped=!0;try{return r.call(this,s,u)}finally{o._wrapped=!1}}}_createPatchMap(e){let r=Object.create(null);return e[this._kOtListeners]=r,r}_getPatchMap(e){return e[this._kOtListeners]}};yE.AbstractAsyncHooksContextManager=YA});var RK=E(ME=>{"use strict";Object.defineProperty(ME,"__esModule",{value:!0});ME.AsyncHooksContextManager=void 0;var GMe=(M(),P(U)),HMe=require("async_hooks"),kMe=$A(),KA=class extends kMe.AbstractAsyncHooksContextManager{constructor(){super(),this._contexts=new Map,this._stack=[],this._asyncHook=HMe.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:GMe.ROOT_CONTEXT}with(e,r,n,...o){this._enterContext(e);try{return r.call(n,...o)}finally{this._exitContext()}}enable(){return this._asyncHook.enable(),this}disable(){return this._asyncHook.disable(),this._contexts.clear(),this._stack=[],this}_init(e,r){if(r==="TIMERWRAP")return;let n=this._stack[this._stack.length-1];n!==void 0&&this._contexts.set(e,n)}_destroy(e){this._contexts.delete(e)}_before(e){let r=this._contexts.get(e);r!==void 0&&this._enterContext(r)}_after(){this._exitContext()}_enterContext(e){this._stack.push(e)}_exitContext(){this._stack.pop()}};ME.AsyncHooksContextManager=KA});var OK=E(vE=>{"use strict";Object.defineProperty(vE,"__esModule",{value:!0});vE.AsyncLocalStorageContextManager=void 0;var FMe=(M(),P(U)),qMe=require("async_hooks"),jMe=$A(),WA=class extends jMe.AbstractAsyncHooksContextManager{constructor(){super(),this._asyncLocalStorage=new qMe.AsyncLocalStorage}active(){var e;return(e=this._asyncLocalStorage.getStore())!==null&&e!==void 0?e:FMe.ROOT_CONTEXT}with(e,r,n,...o){let s=n==null?r:r.bind(n);return this._asyncLocalStorage.run(e,s,...o)}enable(){return this}disable(){return this._asyncLocalStorage.disable(),this}};vE.AsyncLocalStorageContextManager=WA});var NK=E(Oa=>{"use strict";Object.defineProperty(Oa,"__esModule",{value:!0});Oa.AsyncLocalStorageContextManager=Oa.AsyncHooksContextManager=void 0;var YMe=RK();Object.defineProperty(Oa,"AsyncHooksContextManager",{enumerable:!0,get:function(){return YMe.AsyncHooksContextManager}});var $Me=OK();Object.defineProperty(Oa,"AsyncLocalStorageContextManager",{enumerable:!0,get:function(){return $Me.AsyncLocalStorageContextManager}})});var jK=E(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.PACKAGE_NAME=Na.PACKAGE_VERSION=void 0;Na.PACKAGE_VERSION="0.10.1";Na.PACKAGE_NAME="@opentelemetry/instrumentation-undici"});var YK=E(BE=>{"use strict";Object.defineProperty(BE,"__esModule",{value:!0});BE.SemanticAttributes=void 0;BE.SemanticAttributes={HTTP_CONNECTION_STATE:"http.connection.state",ERROR_TYPE:"error.type",HTTP_REQUEST_BODY_SIZE:"http.request.body.size",HTTP_REQUEST_METHOD:"http.request.method",HTTP_REQUEST_METHOD_ORIGINAL:"http.request.method_original",HTTP_REQUEST_RESEND_COUNT:"http.request.resend_count",HTTP_RESPONSE_BODY_SIZE:"http.response.body.size",HTTP_RESPONSE_STATUS_CODE:"http.response.status_code",HTTP_ROUTE:"http.route",NETWORK_PEER_ADDRESS:"network.peer.address",NETWORK_PEER_PORT:"network.peer.port",NETWORK_PROTOCOL_NAME:"network.protocol.name",NETWORK_PROTOCOL_VERSION:"network.protocol.version",SERVER_ADDRESS:"server.address",SERVER_PORT:"server.port",URL_FULL:"url.full",URL_PATH:"url.path",URL_QUERY:"url.query",URL_SCHEME:"url.scheme",USER_AGENT_ORIGINAL:"user_agent.original"}});var KK=E(HE=>{"use strict";Object.defineProperty(HE,"__esModule",{value:!0});HE.UndiciInstrumentation=void 0;var Uu=require("diagnostics_channel"),Sve=require("url"),wu=ee(),ar=(M(),P(U)),$K=jK(),Xe=YK(),GE=re(),rR=class extends wu.InstrumentationBase{constructor(e={}){super($K.PACKAGE_NAME,$K.PACKAGE_VERSION,e),this._recordFromReq=new WeakMap}init(){}disable(){super.disable(),this._channelSubs.forEach(e=>e.unsubscribe()),this._channelSubs.length=0}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this.subscribeToChannel("undici:request:create",this.onRequestCreated.bind(this)),this.subscribeToChannel("undici:client:sendHeaders",this.onRequestHeaders.bind(this)),this.subscribeToChannel("undici:request:headers",this.onResponseHeaders.bind(this)),this.subscribeToChannel("undici:request:trailers",this.onDone.bind(this)),this.subscribeToChannel("undici:request:error",this.onError.bind(this)))}_updateMetricInstruments(){this._httpClientDurationHistogram=this.meter.createHistogram("http.client.request.duration",{description:"Measures the duration of outbound HTTP requests.",unit:"s",valueType:ar.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10]}})}subscribeToChannel(e,r){var n;let[o,s]=process.version.replace("v","").split(".").map(c=>Number(c)),i=o>18||o===18&&s>=19,a;if(i)(n=Uu.subscribe)===null||n===void 0||n.call(Uu,e,r),a=()=>{var c;return(c=Uu.unsubscribe)===null||c===void 0?void 0:c.call(Uu,e,r)};else{let c=Uu.channel(e);c.subscribe(r),a=()=>c.unsubscribe(r)}this._channelSubs.push({name:e,unsubscribe:a})}onRequestCreated({request:e}){let r=this.getConfig(),n=r.enabled!==!1;if((0,wu.safeExecuteInTheMiddle)(()=>{var O;return!n||e.method==="CONNECT"||((O=r.ignoreRequestHook)===null||O===void 0?void 0:O.call(r,e))},O=>O&&this._diag.error("caught ignoreRequestHook error: ",O),!0))return;let s=(0,GE.hrTime)(),i;try{i=new Sve.URL(e.path,e.origin)}catch(O){this._diag.warn("could not determine url.full:",O);return}let a=i.protocol.replace(":",""),c=this.getRequestMethod(e.method),u={[Xe.SemanticAttributes.HTTP_REQUEST_METHOD]:c,[Xe.SemanticAttributes.HTTP_REQUEST_METHOD_ORIGINAL]:e.method,[Xe.SemanticAttributes.URL_FULL]:i.toString(),[Xe.SemanticAttributes.URL_PATH]:i.pathname,[Xe.SemanticAttributes.URL_QUERY]:i.search,[Xe.SemanticAttributes.URL_SCHEME]:a},l={https:"443",http:"80"},p=i.hostname,_=i.port||l[a];u[Xe.SemanticAttributes.SERVER_ADDRESS]=p,_&&!isNaN(Number(_))&&(u[Xe.SemanticAttributes.SERVER_PORT]=Number(_));let d;if(Array.isArray(e.headers)){let O=e.headers.findIndex(b=>b.toLowerCase()==="user-agent");O>=0&&(d=e.headers[O+1])}else if(typeof e.headers=="string"){let b=e.headers.split(`\r
|
|
8
|
+
`).find(v=>v.toLowerCase().startsWith("user-agent"));d=b&&b.substring(b.indexOf(":")+1).trim()}d&&(u[Xe.SemanticAttributes.USER_AGENT_ORIGINAL]=d);let S=(0,wu.safeExecuteInTheMiddle)(()=>{var O;return(O=r.startSpanHook)===null||O===void 0?void 0:O.call(r,e)},O=>O&&this._diag.error("caught startSpanHook error: ",O),!0);S&&Object.entries(S).forEach(([O,b])=>{u[O]=b});let f=ar.context.active(),T=ar.trace.getSpan(f),h;r.requireParentforSpans&&(!T||!ar.trace.isSpanContextValid(T.spanContext()))?h=ar.trace.wrapSpanContext(ar.INVALID_SPAN_CONTEXT):h=this.tracer.startSpan(c==="_OTHER"?"HTTP":c,{kind:ar.SpanKind.CLIENT,attributes:u},f),(0,wu.safeExecuteInTheMiddle)(()=>{var O;return(O=r.requestHook)===null||O===void 0?void 0:O.call(r,h,e)},O=>O&&this._diag.error("caught requestHook error: ",O),!0);let A=ar.trace.setSpan(ar.context.active(),h),N={};ar.propagation.inject(A,N);let I=Object.entries(N);for(let O=0;O<I.length;O++){let[b,v]=I[O];typeof e.addHeader=="function"?e.addHeader(b,v):typeof e.headers=="string"?e.headers+=`${b}: ${v}\r
|
|
9
9
|
`:Array.isArray(e.headers)&&e.headers.push(b,v)}this._recordFromReq.set(e,{span:h,attributes:u,startTime:s})}onRequestHeaders({request:e,socket:r}){var n;let o=this._recordFromReq.get(e);if(!o)return;let s=this.getConfig(),{span:i}=o,{remoteAddress:a,remotePort:c}=r,u={[Xe.SemanticAttributes.NETWORK_PEER_ADDRESS]:a,[Xe.SemanticAttributes.NETWORK_PEER_PORT]:c};if(!((n=s.headersToSpanAttributes)===null||n===void 0)&&n.requestHeaders){let l=new Set(s.headersToSpanAttributes.requestHeaders.map(_=>_.toLowerCase())),p=Array.isArray(e.headers)?e.headers:e.headers.split(`\r
|
|
10
|
-
`);p.forEach((_,d)=>{let S=_.indexOf(":"),f=S!==-1,T=(f?_.substring(0,S):_).toLowerCase(),h=f?_.substring(S+1):p[d+1];l.has(T)&&(u[`http.request.header.${T}`]=h.trim())})}i.setAttributes(u)}onResponseHeaders({request:e,response:r}){var n,o;let s=this._recordFromReq.get(e);if(!s)return;let{span:i,attributes:a}=s,c={[Xe.SemanticAttributes.HTTP_RESPONSE_STATUS_CODE]:r.statusCode},u=this.getConfig();(0,wu.safeExecuteInTheMiddle)(()=>{var p;return(p=u.responseHook)===null||p===void 0?void 0:p.call(u,i,{request:e,response:r})},p=>p&&this._diag.error("caught responseHook error: ",p),!0);let l=new Set;!((n=u.headersToSpanAttributes)===null||n===void 0)&&n.responseHeaders&&((o=u.headersToSpanAttributes)===null||o===void 0||o.responseHeaders.forEach(p=>l.add(p.toLowerCase())));for(let p=0;p<r.headers.length;p=p+2){let _=r.headers[p].toString().toLowerCase(),d=r.headers[p+1];if(l.has(_)&&(c[`http.response.header.${_}`]=d.toString()),_==="content-length"){let S=Number(d.toString());isNaN(S)||(c["http.response.header.content-length"]=S)}}i.setAttributes(c),i.setStatus({code:r.statusCode>=400?ir.SpanStatusCode.ERROR:ir.SpanStatusCode.UNSET}),s.attributes=Object.assign(a,c)}onDone({request:e}){let r=this._recordFromReq.get(e);if(!r)return;let{span:n,attributes:o,startTime:s}=r;n.end(),this._recordFromReq.delete(e),this.recordRequestDuration(o,s)}onError({request:e,error:r}){let n=this._recordFromReq.get(e);if(!n)return;let{span:o,attributes:s,startTime:i}=n;o.recordException(r),o.setStatus({code:ir.SpanStatusCode.ERROR,message:r.message}),o.end(),this._recordFromReq.delete(e),s[Xe.SemanticAttributes.ERROR_TYPE]=r.message,this.recordRequestDuration(s,i)}recordRequestDuration(e,r){let n={};[Xe.SemanticAttributes.HTTP_RESPONSE_STATUS_CODE,Xe.SemanticAttributes.HTTP_REQUEST_METHOD,Xe.SemanticAttributes.SERVER_ADDRESS,Xe.SemanticAttributes.SERVER_PORT,Xe.SemanticAttributes.URL_SCHEME,Xe.SemanticAttributes.ERROR_TYPE].forEach(i=>{i in e&&(n[i]=e[i])});let s=(0,GE.hrTimeToMilliseconds)((0,GE.hrTimeDuration)(r,(0,GE.hrTime)()))/1e3;this._httpClientDurationHistogram.record(s,n)}getRequestMethod(e){let r={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0};return e.toUpperCase()in r?e.toUpperCase():"_OTHER"}};HE.UndiciInstrumentation=rR});var XK=E(WK=>{"use strict";Object.defineProperty(WK,"__esModule",{value:!0})});var QK=E(xo=>{"use strict";var Tve=xo&&xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zK=xo&&xo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tve(e,t,r)};Object.defineProperty(xo,"__esModule",{value:!0});zK(KK(),xo);zK(XK(),xo)});var kE=E(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.ExpressLayerType=void 0;var Nve;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(Nve=Vu.ExpressLayerType||(Vu.ExpressLayerType={}))});var FE=E(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.AttributeNames=void 0;var Ive;(function(t){t.EXPRESS_TYPE="express.type",t.EXPRESS_NAME="express.name"})(Ive=Bu.AttributeNames||(Bu.AttributeNames={}))});var nR=E(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia._LAYERS_STORE_PROPERTY=Ia.kLayerPatched=void 0;Ia.kLayerPatched=Symbol("express-layer-patched");Ia._LAYERS_STORE_PROPERTY="__ot_middlewares"});var rW=E(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getLayerPath=Ot.asErrorAndMessage=Ot.isLayerIgnored=Ot.getLayerMetadata=Ot.getRouterPath=Ot.storeLayerPath=void 0;var oR=kE(),Pa=FE(),sR=nR(),Pve=(t,e)=>{Array.isArray(t[sR._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,sR._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e!==void 0&&t[sR._LAYERS_STORE_PROPERTY].push(e)};Ot.storeLayerPath=Pve;var Cve=(t,e)=>{var r,n,o,s;let i=(n=(r=e.handle)===null||r===void 0?void 0:r.stack)===null||n===void 0?void 0:n[0];return!((o=i?.route)===null||o===void 0)&&o.path?`${t}${i.route.path}`:!((s=i?.handle)===null||s===void 0)&&s.stack?(0,Ot.getRouterPath)(t,i):t};Ot.getRouterPath=Cve;var yve=(t,e,r)=>{var n;if(e.name==="router"){let o=(0,Ot.getRouterPath)("",e),s=o||r||t||"/";return{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:s,[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.ROUTER},name:`router - ${s}`}}else return e.name==="bound dispatch"?{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:(n=t||r)!==null&&n!==void 0?n:"request handler",[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.REQUEST_HANDLER},name:`request handler${e.path?` - ${t||r}`:""}`}:{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:e.name,[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};Ot.getLayerMetadata=yve;var Mve=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},vve=(t,e,r)=>{var n;if(Array.isArray(r?.ignoreLayersType)&&(!((n=r?.ignoreLayersType)===null||n===void 0)&&n.includes(e)))return!0;if(Array.isArray(r?.ignoreLayers)===!1)return!1;try{for(let o of r.ignoreLayers)if(Mve(t,o))return!0}catch{}return!1};Ot.isLayerIgnored=vve;var bve=t=>t instanceof Error?[t,t.message]:[String(t),String(t)];Ot.asErrorAndMessage=bve;var Lve=t=>{let e=t[0];return Array.isArray(e)?e.map(r=>tW(r)||"").join(","):tW(e)};Ot.getLayerPath=Lve;var tW=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()}});var nW=E(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.PACKAGE_NAME=Ca.PACKAGE_VERSION=void 0;Ca.PACKAGE_VERSION="0.47.1";Ca.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var cW=E(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.ExpressInstrumentation=void 0;var oW=re(),zs=(M(),P(U)),sW=kE(),iW=FE(),Uo=rW(),aW=nW(),ya=ee(),Dve=(ue(),P(He)),Gu=nR(),iR=class extends ya.InstrumentationBase{constructor(e={}){super(aW.PACKAGE_NAME,aW.PACKAGE_VERSION,e)}init(){return[new ya.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <5"],e=>{let r=e.Router;return(0,ya.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,ya.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,ya.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e},e=>{if(e===void 0)return;let r=e.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(e.application,"use")})]}_getRoutePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_getRouterUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_getAppUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this._router.stack[this._router.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_applyPatch(e,r){let n=this;e[Gu.kLayerPatched]!==!0&&(e[Gu.kLayerPatched]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let s=function(i,a){(0,Uo.storeLayerPath)(i,r);let c=i[Gu._LAYERS_STORE_PROPERTY].filter(I=>I!=="/"&&I!=="/*").join("").replace(/\/{2,}/g,"/"),u={[Dve.SEMATTRS_HTTP_ROUTE]:c.length>0?c:"/"},l=(0,Uo.getLayerMetadata)(c,e,r),p=l.attributes[iW.AttributeNames.EXPRESS_TYPE],_=(0,oW.getRPCMetadata)(zs.context.active());if(_?.type===oW.RPCType.HTTP&&(_.route=c||"/"),(0,Uo.isLayerIgnored)(l.name,p,n.getConfig()))return p===sW.ExpressLayerType.MIDDLEWARE&&i[Gu._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(zs.trace.getSpan(zs.context.active())===void 0)return o.apply(this,arguments);let d=n._getSpanName({request:i,layerType:p,route:c},l.name),S=n.tracer.startSpan(d,{attributes:Object.assign(u,l.attributes)}),{requestHook:f}=n.getConfig();f&&(0,ya.safeExecuteInTheMiddle)(()=>f(S,{request:i,layerType:p,route:c}),I=>{I&&zs.diag.error("express instrumentation: request hook failed",I)},!0);let T=!1;l.attributes[iW.AttributeNames.EXPRESS_TYPE]!==sW.ExpressLayerType.MIDDLEWARE&&(S.end(),T=!0);let h=()=>{T===!1&&(T=!0,S.end())},A=Array.from(arguments),N=A.findIndex(I=>typeof I=="function");N>=0&&(arguments[N]=function(){var I;let O=arguments[0],b=![void 0,null,"route","router"].includes(O);if(!T&&b){let[X,$]=(0,Uo.asErrorAndMessage)(O);S.recordException(X),S.setStatus({code:zs.SpanStatusCode.ERROR,message:$})}return T===!1&&(T=!0,(I=i.res)===null||I===void 0||I.removeListener("finish",h),S.end()),i.route&&b||i[Gu._LAYERS_STORE_PROPERTY].pop(),A[N].apply(this,arguments)});try{return o.apply(this,arguments)}catch(I){let[O,b]=(0,Uo.asErrorAndMessage)(I);throw S.recordException(O),S.setStatus({code:zs.SpanStatusCode.ERROR,message:b}),I}finally{T||a.once("finish",h)}};for(let i in o)Object.defineProperty(s,i,{get(){return o[i]},set(a){o[i]=a}});return s}))}_getSpanName(e,r){var n;let{spanNameHook:o}=this.getConfig();if(!(o instanceof Function))return r;try{return(n=o(e,r))!==null&&n!==void 0?n:r}catch(s){return zs.diag.error("express instrumentation: error calling span name rewrite hook",s),r}}};qE.ExpressInstrumentation=iR});var lW=E(uW=>{"use strict";Object.defineProperty(uW,"__esModule",{value:!0})});var pW=E(An=>{"use strict";var xve=An&&An.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jE=An&&An.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xve(e,t,r)};Object.defineProperty(An,"__esModule",{value:!0});jE(cW(),An);jE(kE(),An);jE(FE(),An);jE(lW(),An)});var CW=E((Z5e,PW)=>{"use strict";PW.exports=NW;function NW(t,e,r){t instanceof RegExp&&(t=OW(t,r)),e instanceof RegExp&&(e=OW(e,r));var n=IW(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function OW(t,e){var r=e.match(t);return r?r[0]:null}NW.range=IW;function IW(t,e,r){var n,o,s,i,a,c=r.indexOf(t),u=r.indexOf(e,c+1),l=c;if(c>=0&&u>0){if(t===e)return[c,u];for(n=[],s=r.length;l>=0&&!a;)l==c?(n.push(l),c=r.indexOf(t,l+1)):n.length==1?a=[n.pop(),u]:(o=n.pop(),o<s&&(s=o,i=u),u=r.indexOf(e,l+1)),l=c<u&&c>=0?c:u;n.length&&(a=[s,i])}return a}});var UW=E((eXe,xW)=>{var yW=CW();xW.exports=Fve;var MW="\0SLASH"+Math.random()+"\0",vW="\0OPEN"+Math.random()+"\0",_R="\0CLOSE"+Math.random()+"\0",bW="\0COMMA"+Math.random()+"\0",LW="\0PERIOD"+Math.random()+"\0";function pR(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Hve(t){return t.split("\\\\").join(MW).split("\\{").join(vW).split("\\}").join(_R).split("\\,").join(bW).split("\\.").join(LW)}function kve(t){return t.split(MW).join("\\").split(vW).join("{").split(_R).join("}").split(bW).join(",").split(LW).join(".")}function DW(t){if(!t)return[""];var e=[],r=yW("{","}",t);if(!r)return t.split(",");var n=r.pre,o=r.body,s=r.post,i=n.split(",");i[i.length-1]+="{"+o+"}";var a=DW(s);return s.length&&(i[i.length-1]+=a.shift(),i.push.apply(i,a)),e.push.apply(e,i),e}function Fve(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Hu(Hve(t),r,!0).map(kve)}function qve(t){return"{"+t+"}"}function jve(t){return/^-?0\d/.test(t)}function Yve(t,e){return t<=e}function $ve(t,e){return t>=e}function Hu(t,e,r){var n=[],o=yW("{","}",t);if(!o)return[t];var s=o.pre,i=o.post.length?Hu(o.post,e,!1):[""];if(/\$$/.test(o.pre))for(var a=0;a<i.length&&a<e;a++){var c=s+"{"+o.body+"}"+i[a];n.push(c)}else{var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=u||l,_=o.body.indexOf(",")>=0;if(!p&&!_)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+_R+o.post,Hu(t,e,!0)):[t];var d;if(p)d=o.body.split(/\.\./);else if(d=DW(o.body),d.length===1&&(d=Hu(d[0],e,!1).map(qve),d.length===1))return i.map(function(V){return o.pre+d[0]+V});var S;if(p){var f=pR(d[0]),T=pR(d[1]),h=Math.max(d[0].length,d[1].length),A=d.length==3?Math.max(Math.abs(pR(d[2])),1):1,N=Yve,I=T<f;I&&(A*=-1,N=$ve);var O=d.some(jve);S=[];for(var b=f;N(b,T);b+=A){var v;if(l)v=String.fromCharCode(b),v==="\\"&&(v="");else if(v=String(b),O){var X=h-v.length;if(X>0){var $=new Array(X+1).join("0");b<0?v="-"+$+v.slice(1):v=$+v}}S.push(v)}}else{S=[];for(var De=0;De<d.length;De++)S.push.apply(S,Hu(d[De],e,!1))}for(var De=0;De<S.length;De++)for(var a=0;a<i.length&&n.length<e;a++){var c=s+S[De]+i[a];(!r||p||c)&&n.push(c)}}return n}});var hR=E($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.SpanNames=$r.TokenKind=$r.AllowedOperationTypes=void 0;var Ybe;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Ybe=$r.AllowedOperationTypes||($r.AllowedOperationTypes={}));var $be;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})($be=$r.TokenKind||($r.TokenKind={}));var Kbe;(function(t){t.EXECUTE="graphql.execute",t.PARSE="graphql.parse",t.RESOLVE="graphql.resolve",t.VALIDATE="graphql.validate",t.SCHEMA_VALIDATE="graphql.validateSchema",t.SCHEMA_PARSE="graphql.parseSchema"})(Kbe=$r.SpanNames||($r.SpanNames={}))});var gR=E(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AttributeNames=void 0;var Wbe;(function(t){t.SOURCE="graphql.source",t.FIELD_NAME="graphql.field.name",t.FIELD_PATH="graphql.field.path",t.FIELD_TYPE="graphql.field.type",t.OPERATION_TYPE="graphql.operation.type",t.OPERATION_NAME="graphql.operation.name",t.VARIABLES="graphql.variables.",t.ERROR_VALIDATION_NAME="graphql.validation.error"})(Wbe=Ku.AttributeNames||(Ku.AttributeNames={}))});var tf=E(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.OTEL_GRAPHQL_DATA_SYMBOL=va.OTEL_PATCHED_SYMBOL=void 0;va.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");va.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var p2=E(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.OPERATION_NOT_SUPPORTED=void 0;var HXe=tf();rf.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var O2=E(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.wrapFieldResolver=ze.wrapFields=ze.getSourceFromLocation=ze.getOperation=ze.endSpan=ze.addSpanSource=ze.addInputVariableAttributes=ze.isPromise=void 0;var La=(M(),P(U)),Ho=hR(),ba=gR(),Xn=tf(),_2=Object.values(Ho.AllowedOperationTypes),Xbe=t=>typeof t?.then=="function";ze.isPromise=Xbe;var zbe=t=>typeof t=="object"&&t!==null;function AR(t,e,r){Array.isArray(r)?r.forEach((n,o)=>{AR(t,`${e}.${o}`,n)}):r instanceof Object?Object.entries(r).forEach(([n,o])=>{AR(t,`${e}.${n}`,o)}):t.setAttribute(`${ba.AttributeNames.VARIABLES}${String(e)}`,r)}function Qbe(t,e){Object.entries(e).forEach(([r,n])=>{AR(t,r,n)})}ze.addInputVariableAttributes=Qbe;function S2(t,e,r,n,o){let s=g2(e,r,n,o);t.setAttribute(ba.AttributeNames.SOURCE,s)}ze.addSpanSource=S2;function Jbe(t,e,r,n,o){let s=T2(r,o),i=!1;if(!s){i=!0;let a=m2(r,o);s={parent:a,span:Zbe(t,e,r,n,o,a.span),error:null},rLe(r,o,s)}return{spanAdded:i,field:s}}function Zbe(t,e,r,n,o,s){var i,a;let c={[ba.AttributeNames.FIELD_NAME]:n.fieldName,[ba.AttributeNames.FIELD_PATH]:o.join("."),[ba.AttributeNames.FIELD_TYPE]:n.returnType.toString()},u=t.startSpan(`${Ho.SpanNames.RESOLVE} ${c[ba.AttributeNames.FIELD_PATH]}`,{attributes:c},s?La.trace.setSpan(La.context.active(),s):void 0),l=r[Xn.OTEL_GRAPHQL_DATA_SYMBOL].source,p=n.fieldNodes.find(_=>_.kind==="Field");return p&&S2(u,l.loc,e().allowValues,(i=p.loc)===null||i===void 0?void 0:i.start,(a=p.loc)===null||a===void 0?void 0:a.end),u}function eLe(t,e){e&&t.recordException(e),t.end()}ze.endSpan=eLe;function tLe(t,e){if(!(!t||!Array.isArray(t.definitions)))return e?t.definitions.filter(r=>{var n;return _2.indexOf((n=r)===null||n===void 0?void 0:n.operation)!==-1}).find(r=>{var n,o;return e===((o=(n=r)===null||n===void 0?void 0:n.name)===null||o===void 0?void 0:o.value)}):t.definitions.find(r=>{var n;return _2.indexOf((n=r)===null||n===void 0?void 0:n.operation)!==-1})}ze.getOperation=tLe;function rLe(t,e,r){return t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]=r}function T2(t,e){return t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]}function m2(t,e){for(let r=e.length-1;r>0;r--){let n=T2(t,e.slice(0,r));if(n)return n}return{span:t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].span}}function nLe(t,e){let r=[],n=e;for(;n;){let o=n.key;t&&typeof o=="number"&&(o="*"),r.push(String(o)),n=n.prev}return r.reverse()}function oLe(t){return h2(`
|
|
10
|
+
`);p.forEach((_,d)=>{let S=_.indexOf(":"),f=S!==-1,T=(f?_.substring(0,S):_).toLowerCase(),h=f?_.substring(S+1):p[d+1];l.has(T)&&(u[`http.request.header.${T}`]=h.trim())})}i.setAttributes(u)}onResponseHeaders({request:e,response:r}){var n,o;let s=this._recordFromReq.get(e);if(!s)return;let{span:i,attributes:a}=s,c={[Xe.SemanticAttributes.HTTP_RESPONSE_STATUS_CODE]:r.statusCode},u=this.getConfig();(0,wu.safeExecuteInTheMiddle)(()=>{var p;return(p=u.responseHook)===null||p===void 0?void 0:p.call(u,i,{request:e,response:r})},p=>p&&this._diag.error("caught responseHook error: ",p),!0);let l=new Set;!((n=u.headersToSpanAttributes)===null||n===void 0)&&n.responseHeaders&&((o=u.headersToSpanAttributes)===null||o===void 0||o.responseHeaders.forEach(p=>l.add(p.toLowerCase())));for(let p=0;p<r.headers.length;p=p+2){let _=r.headers[p].toString().toLowerCase(),d=r.headers[p+1];if(l.has(_)&&(c[`http.response.header.${_}`]=d.toString()),_==="content-length"){let S=Number(d.toString());isNaN(S)||(c["http.response.header.content-length"]=S)}}i.setAttributes(c),i.setStatus({code:r.statusCode>=400?ar.SpanStatusCode.ERROR:ar.SpanStatusCode.UNSET}),s.attributes=Object.assign(a,c)}onDone({request:e}){let r=this._recordFromReq.get(e);if(!r)return;let{span:n,attributes:o,startTime:s}=r;n.end(),this._recordFromReq.delete(e),this.recordRequestDuration(o,s)}onError({request:e,error:r}){let n=this._recordFromReq.get(e);if(!n)return;let{span:o,attributes:s,startTime:i}=n;o.recordException(r),o.setStatus({code:ar.SpanStatusCode.ERROR,message:r.message}),o.end(),this._recordFromReq.delete(e),s[Xe.SemanticAttributes.ERROR_TYPE]=r.message,this.recordRequestDuration(s,i)}recordRequestDuration(e,r){let n={};[Xe.SemanticAttributes.HTTP_RESPONSE_STATUS_CODE,Xe.SemanticAttributes.HTTP_REQUEST_METHOD,Xe.SemanticAttributes.SERVER_ADDRESS,Xe.SemanticAttributes.SERVER_PORT,Xe.SemanticAttributes.URL_SCHEME,Xe.SemanticAttributes.ERROR_TYPE].forEach(i=>{i in e&&(n[i]=e[i])});let s=(0,GE.hrTimeToMilliseconds)((0,GE.hrTimeDuration)(r,(0,GE.hrTime)()))/1e3;this._httpClientDurationHistogram.record(s,n)}getRequestMethod(e){let r={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0};return e.toUpperCase()in r?e.toUpperCase():"_OTHER"}};HE.UndiciInstrumentation=rR});var XK=E(WK=>{"use strict";Object.defineProperty(WK,"__esModule",{value:!0})});var QK=E(xo=>{"use strict";var Tve=xo&&xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),zK=xo&&xo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Tve(e,t,r)};Object.defineProperty(xo,"__esModule",{value:!0});zK(KK(),xo);zK(XK(),xo)});var kE=E(Vu=>{"use strict";Object.defineProperty(Vu,"__esModule",{value:!0});Vu.ExpressLayerType=void 0;var Nve;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(Nve=Vu.ExpressLayerType||(Vu.ExpressLayerType={}))});var FE=E(Bu=>{"use strict";Object.defineProperty(Bu,"__esModule",{value:!0});Bu.AttributeNames=void 0;var Ive;(function(t){t.EXPRESS_TYPE="express.type",t.EXPRESS_NAME="express.name"})(Ive=Bu.AttributeNames||(Bu.AttributeNames={}))});var nR=E(Ia=>{"use strict";Object.defineProperty(Ia,"__esModule",{value:!0});Ia._LAYERS_STORE_PROPERTY=Ia.kLayerPatched=void 0;Ia.kLayerPatched=Symbol("express-layer-patched");Ia._LAYERS_STORE_PROPERTY="__ot_middlewares"});var rW=E(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getLayerPath=Ot.asErrorAndMessage=Ot.isLayerIgnored=Ot.getLayerMetadata=Ot.getRouterPath=Ot.storeLayerPath=void 0;var oR=kE(),Pa=FE(),sR=nR(),Pve=(t,e)=>{Array.isArray(t[sR._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,sR._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e!==void 0&&t[sR._LAYERS_STORE_PROPERTY].push(e)};Ot.storeLayerPath=Pve;var Cve=(t,e)=>{var r,n,o,s;let i=(n=(r=e.handle)===null||r===void 0?void 0:r.stack)===null||n===void 0?void 0:n[0];return!((o=i?.route)===null||o===void 0)&&o.path?`${t}${i.route.path}`:!((s=i?.handle)===null||s===void 0)&&s.stack?(0,Ot.getRouterPath)(t,i):t};Ot.getRouterPath=Cve;var yve=(t,e,r)=>{var n;if(e.name==="router"){let o=(0,Ot.getRouterPath)("",e),s=o||r||t||"/";return{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:s,[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.ROUTER},name:`router - ${s}`}}else return e.name==="bound dispatch"?{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:(n=t||r)!==null&&n!==void 0?n:"request handler",[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.REQUEST_HANDLER},name:`request handler${e.path?` - ${t||r}`:""}`}:{attributes:{[Pa.AttributeNames.EXPRESS_NAME]:e.name,[Pa.AttributeNames.EXPRESS_TYPE]:oR.ExpressLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};Ot.getLayerMetadata=yve;var Mve=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},vve=(t,e,r)=>{var n;if(Array.isArray(r?.ignoreLayersType)&&(!((n=r?.ignoreLayersType)===null||n===void 0)&&n.includes(e)))return!0;if(Array.isArray(r?.ignoreLayers)===!1)return!1;try{for(let o of r.ignoreLayers)if(Mve(t,o))return!0}catch{}return!1};Ot.isLayerIgnored=vve;var bve=t=>t instanceof Error?[t,t.message]:[String(t),String(t)];Ot.asErrorAndMessage=bve;var Lve=t=>{let e=t[0];return Array.isArray(e)?e.map(r=>tW(r)||"").join(","):tW(e)};Ot.getLayerPath=Lve;var tW=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()}});var nW=E(Ca=>{"use strict";Object.defineProperty(Ca,"__esModule",{value:!0});Ca.PACKAGE_NAME=Ca.PACKAGE_VERSION=void 0;Ca.PACKAGE_VERSION="0.47.1";Ca.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var cW=E(qE=>{"use strict";Object.defineProperty(qE,"__esModule",{value:!0});qE.ExpressInstrumentation=void 0;var oW=re(),zs=(M(),P(U)),sW=kE(),iW=FE(),Uo=rW(),aW=nW(),ya=ee(),Dve=(ue(),P(He)),Gu=nR(),iR=class extends ya.InstrumentationBase{constructor(e={}){super(aW.PACKAGE_NAME,aW.PACKAGE_VERSION,e)}init(){return[new ya.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <5"],e=>{let r=e.Router;return(0,ya.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,ya.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,ya.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e},e=>{if(e===void 0)return;let r=e.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(e.application,"use")})]}_getRoutePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_getRouterUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_getAppUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this._router.stack[this._router.stack.length-1];return e._applyPatch(i,(0,Uo.getLayerPath)(o)),s}}}_applyPatch(e,r){let n=this;e[Gu.kLayerPatched]!==!0&&(e[Gu.kLayerPatched]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let s=function(i,a){(0,Uo.storeLayerPath)(i,r);let c=i[Gu._LAYERS_STORE_PROPERTY].filter(I=>I!=="/"&&I!=="/*").join("").replace(/\/{2,}/g,"/"),u={[Dve.SEMATTRS_HTTP_ROUTE]:c.length>0?c:"/"},l=(0,Uo.getLayerMetadata)(c,e,r),p=l.attributes[iW.AttributeNames.EXPRESS_TYPE],_=(0,oW.getRPCMetadata)(zs.context.active());if(_?.type===oW.RPCType.HTTP&&(_.route=c||"/"),(0,Uo.isLayerIgnored)(l.name,p,n.getConfig()))return p===sW.ExpressLayerType.MIDDLEWARE&&i[Gu._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(zs.trace.getSpan(zs.context.active())===void 0)return o.apply(this,arguments);let d=n._getSpanName({request:i,layerType:p,route:c},l.name),S=n.tracer.startSpan(d,{attributes:Object.assign(u,l.attributes)}),{requestHook:f}=n.getConfig();f&&(0,ya.safeExecuteInTheMiddle)(()=>f(S,{request:i,layerType:p,route:c}),I=>{I&&zs.diag.error("express instrumentation: request hook failed",I)},!0);let T=!1;l.attributes[iW.AttributeNames.EXPRESS_TYPE]!==sW.ExpressLayerType.MIDDLEWARE&&(S.end(),T=!0);let h=()=>{T===!1&&(T=!0,S.end())},A=Array.from(arguments),N=A.findIndex(I=>typeof I=="function");N>=0&&(arguments[N]=function(){var I;let O=arguments[0],b=![void 0,null,"route","router"].includes(O);if(!T&&b){let[X,$]=(0,Uo.asErrorAndMessage)(O);S.recordException(X),S.setStatus({code:zs.SpanStatusCode.ERROR,message:$})}return T===!1&&(T=!0,(I=i.res)===null||I===void 0||I.removeListener("finish",h),S.end()),i.route&&b||i[Gu._LAYERS_STORE_PROPERTY].pop(),A[N].apply(this,arguments)});try{return o.apply(this,arguments)}catch(I){let[O,b]=(0,Uo.asErrorAndMessage)(I);throw S.recordException(O),S.setStatus({code:zs.SpanStatusCode.ERROR,message:b}),I}finally{T||a.once("finish",h)}};for(let i in o)Object.defineProperty(s,i,{get(){return o[i]},set(a){o[i]=a}});return s}))}_getSpanName(e,r){var n;let{spanNameHook:o}=this.getConfig();if(!(o instanceof Function))return r;try{return(n=o(e,r))!==null&&n!==void 0?n:r}catch(s){return zs.diag.error("express instrumentation: error calling span name rewrite hook",s),r}}};qE.ExpressInstrumentation=iR});var lW=E(uW=>{"use strict";Object.defineProperty(uW,"__esModule",{value:!0})});var pW=E(An=>{"use strict";var xve=An&&An.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),jE=An&&An.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&xve(e,t,r)};Object.defineProperty(An,"__esModule",{value:!0});jE(cW(),An);jE(kE(),An);jE(FE(),An);jE(lW(),An)});var CW=E((Z5e,PW)=>{"use strict";PW.exports=NW;function NW(t,e,r){t instanceof RegExp&&(t=OW(t,r)),e instanceof RegExp&&(e=OW(e,r));var n=IW(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function OW(t,e){var r=e.match(t);return r?r[0]:null}NW.range=IW;function IW(t,e,r){var n,o,s,i,a,c=r.indexOf(t),u=r.indexOf(e,c+1),l=c;if(c>=0&&u>0){if(t===e)return[c,u];for(n=[],s=r.length;l>=0&&!a;)l==c?(n.push(l),c=r.indexOf(t,l+1)):n.length==1?a=[n.pop(),u]:(o=n.pop(),o<s&&(s=o,i=u),u=r.indexOf(e,l+1)),l=c<u&&c>=0?c:u;n.length&&(a=[s,i])}return a}});var UW=E((eXe,xW)=>{var yW=CW();xW.exports=Fve;var MW="\0SLASH"+Math.random()+"\0",vW="\0OPEN"+Math.random()+"\0",_R="\0CLOSE"+Math.random()+"\0",bW="\0COMMA"+Math.random()+"\0",LW="\0PERIOD"+Math.random()+"\0";function pR(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function Hve(t){return t.split("\\\\").join(MW).split("\\{").join(vW).split("\\}").join(_R).split("\\,").join(bW).split("\\.").join(LW)}function kve(t){return t.split(MW).join("\\").split(vW).join("{").split(_R).join("}").split(bW).join(",").split(LW).join(".")}function DW(t){if(!t)return[""];var e=[],r=yW("{","}",t);if(!r)return t.split(",");var n=r.pre,o=r.body,s=r.post,i=n.split(",");i[i.length-1]+="{"+o+"}";var a=DW(s);return s.length&&(i[i.length-1]+=a.shift(),i.push.apply(i,a)),e.push.apply(e,i),e}function Fve(t,e){if(!t)return[];e=e||{};var r=e.max==null?1/0:e.max;return t.substr(0,2)==="{}"&&(t="\\{\\}"+t.substr(2)),Hu(Hve(t),r,!0).map(kve)}function qve(t){return"{"+t+"}"}function jve(t){return/^-?0\d/.test(t)}function Yve(t,e){return t<=e}function $ve(t,e){return t>=e}function Hu(t,e,r){var n=[],o=yW("{","}",t);if(!o)return[t];var s=o.pre,i=o.post.length?Hu(o.post,e,!1):[""];if(/\$$/.test(o.pre))for(var a=0;a<i.length&&a<e;a++){var c=s+"{"+o.body+"}"+i[a];n.push(c)}else{var u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=u||l,_=o.body.indexOf(",")>=0;if(!p&&!_)return o.post.match(/,(?!,).*\}/)?(t=o.pre+"{"+o.body+_R+o.post,Hu(t,e,!0)):[t];var d;if(p)d=o.body.split(/\.\./);else if(d=DW(o.body),d.length===1&&(d=Hu(d[0],e,!1).map(qve),d.length===1))return i.map(function(V){return o.pre+d[0]+V});var S;if(p){var f=pR(d[0]),T=pR(d[1]),h=Math.max(d[0].length,d[1].length),A=d.length==3?Math.max(Math.abs(pR(d[2])),1):1,N=Yve,I=T<f;I&&(A*=-1,N=$ve);var O=d.some(jve);S=[];for(var b=f;N(b,T);b+=A){var v;if(l)v=String.fromCharCode(b),v==="\\"&&(v="");else if(v=String(b),O){var X=h-v.length;if(X>0){var $=new Array(X+1).join("0");b<0?v="-"+$+v.slice(1):v=$+v}}S.push(v)}}else{S=[];for(var De=0;De<d.length;De++)S.push.apply(S,Hu(d[De],e,!1))}for(var De=0;De<S.length;De++)for(var a=0;a<i.length&&n.length<e;a++){var c=s+S[De]+i[a];(!r||p||c)&&n.push(c)}}return n}});var hR=E($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.SpanNames=$r.TokenKind=$r.AllowedOperationTypes=void 0;var Ybe;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Ybe=$r.AllowedOperationTypes||($r.AllowedOperationTypes={}));var $be;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})($be=$r.TokenKind||($r.TokenKind={}));var Kbe;(function(t){t.EXECUTE="graphql.execute",t.PARSE="graphql.parse",t.RESOLVE="graphql.resolve",t.VALIDATE="graphql.validate",t.SCHEMA_VALIDATE="graphql.validateSchema",t.SCHEMA_PARSE="graphql.parseSchema"})(Kbe=$r.SpanNames||($r.SpanNames={}))});var gR=E(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.AttributeNames=void 0;var Wbe;(function(t){t.SOURCE="graphql.source",t.FIELD_NAME="graphql.field.name",t.FIELD_PATH="graphql.field.path",t.FIELD_TYPE="graphql.field.type",t.OPERATION_TYPE="graphql.operation.type",t.OPERATION_NAME="graphql.operation.name",t.VARIABLES="graphql.variables.",t.ERROR_VALIDATION_NAME="graphql.validation.error"})(Wbe=Ku.AttributeNames||(Ku.AttributeNames={}))});var tf=E(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.OTEL_GRAPHQL_DATA_SYMBOL=va.OTEL_PATCHED_SYMBOL=void 0;va.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");va.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var p2=E(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.OPERATION_NOT_SUPPORTED=void 0;var HXe=tf();rf.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var O2=E(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.wrapFieldResolver=ze.wrapFields=ze.getSourceFromLocation=ze.getOperation=ze.endSpan=ze.addSpanSource=ze.addInputVariableAttributes=ze.isPromise=void 0;var La=(M(),P(U)),Ho=hR(),ba=gR(),Xn=tf(),_2=Object.values(Ho.AllowedOperationTypes),Xbe=t=>typeof t?.then=="function";ze.isPromise=Xbe;var zbe=t=>typeof t=="object"&&t!==null;function AR(t,e,r){Array.isArray(r)?r.forEach((n,o)=>{AR(t,`${e}.${o}`,n)}):r instanceof Object?Object.entries(r).forEach(([n,o])=>{AR(t,`${e}.${n}`,o)}):t.setAttribute(`${ba.AttributeNames.VARIABLES}${String(e)}`,r)}function Qbe(t,e){Object.entries(e).forEach(([r,n])=>{AR(t,r,n)})}ze.addInputVariableAttributes=Qbe;function S2(t,e,r,n,o){let s=g2(e,r,n,o);t.setAttribute(ba.AttributeNames.SOURCE,s)}ze.addSpanSource=S2;function Jbe(t,e,r,n,o){let s=T2(r,o),i=!1;if(!s){i=!0;let a=m2(r,o);s={parent:a,span:Zbe(t,e,r,n,o,a.span),error:null},rLe(r,o,s)}return{spanAdded:i,field:s}}function Zbe(t,e,r,n,o,s){var i,a;let c={[ba.AttributeNames.FIELD_NAME]:n.fieldName,[ba.AttributeNames.FIELD_PATH]:o.join("."),[ba.AttributeNames.FIELD_TYPE]:n.returnType.toString()},u=t.startSpan(`${Ho.SpanNames.RESOLVE} ${c[ba.AttributeNames.FIELD_PATH]}`,{attributes:c},s?La.trace.setSpan(La.context.active(),s):void 0),l=r[Xn.OTEL_GRAPHQL_DATA_SYMBOL].source,p=n.fieldNodes.find(_=>_.kind==="Field");return p&&S2(u,l.loc,e().allowValues,(i=p.loc)===null||i===void 0?void 0:i.start,(a=p.loc)===null||a===void 0?void 0:a.end),u}function eLe(t,e){e&&t.recordException(e),t.end()}ze.endSpan=eLe;function tLe(t,e){if(!(!t||!Array.isArray(t.definitions)))return e?t.definitions.filter(r=>{var n;return _2.indexOf((n=r)===null||n===void 0?void 0:n.operation)!==-1}).find(r=>{var n,o;return e===((o=(n=r)===null||n===void 0?void 0:n.name)===null||o===void 0?void 0:o.value)}):t.definitions.find(r=>{var n;return _2.indexOf((n=r)===null||n===void 0?void 0:n.operation)!==-1})}ze.getOperation=tLe;function rLe(t,e,r){return t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]=r}function T2(t,e){return t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].fields[e.join(".")]}function m2(t,e){for(let r=e.length-1;r>0;r--){let n=T2(t,e.slice(0,r));if(n)return n}return{span:t[Xn.OTEL_GRAPHQL_DATA_SYMBOL].span}}function nLe(t,e){let r=[],n=e;for(;n;){let o=n.key;t&&typeof o=="number"&&(o="*"),r.push(String(o)),n=n.prev}return r.reverse()}function oLe(t){return h2(`
|
|
11
11
|
`,t)}function d2(t){return h2(" ",t)}function h2(t,e){let r="";for(let n=0;n<e;n++)r+=t;return r}var sLe=[Ho.TokenKind.FLOAT,Ho.TokenKind.STRING,Ho.TokenKind.INT,Ho.TokenKind.BLOCK_STRING];function g2(t,e=!1,r,n){var o,s;let i="";if(t?.startToken){let a=typeof r=="number"?r:t.start,c=typeof n=="number"?n:t.end,u=t.startToken.next,l=1;for(;u;){if(u.start<a){u=u.next,l=u?.line;continue}if(u.end>c){u=u.next,l=u?.line;continue}let p=u.value||u.kind,_="";!e&&sLe.indexOf(u.kind)>=0&&(p="*"),u.kind===Ho.TokenKind.STRING&&(p=`"${p}"`),u.kind===Ho.TokenKind.EOF&&(p=""),u.line>l?(i+=oLe(u.line-l),l=u.line,_=d2(u.column-1)):u.line===((o=u.prev)===null||o===void 0?void 0:o.line)&&(_=d2(u.start-(((s=u.prev)===null||s===void 0?void 0:s.end)||0))),i+=_+p,u&&(u=u.next)}}return i}ze.getSourceFromLocation=g2;function A2(t,e,r){if(!t||typeof t.getFields!="function"||t[Xn.OTEL_PATCHED_SYMBOL])return;let n=t.getFields();t[Xn.OTEL_PATCHED_SYMBOL]=!0,Object.keys(n).forEach(o=>{let s=n[o];if(s&&(s.resolve&&(s.resolve=R2(e,r,s.resolve)),s.type)){let i=s.type;for(;i.ofType;)i=i.ofType;A2(i,e,r)}})}ze.wrapFields=A2;var E2=(t,e,r)=>{r&&(t.recordException(e),t.setStatus({code:La.SpanStatusCode.ERROR,message:e.message}),t.end())},f2=(t,e)=>{e&&t.end()};function R2(t,e,r,n=!1){if(o[Xn.OTEL_PATCHED_SYMBOL]||typeof r!="function")return r;function o(s,i,a,c){if(!r)return;let u=e();if(u.ignoreTrivialResolveSpans&&n&&(zbe(s)||typeof s=="function")&&typeof s[c.fieldName]!="function")return r.call(this,s,i,a,c);if(!a[Xn.OTEL_GRAPHQL_DATA_SYMBOL])return r.call(this,s,i,a,c);let l=nLe(u.mergeItems,c&&c.path),p=l.filter(S=>typeof S=="string").length,_,d=!1;if(u.depth>=0&&u.depth<p)_=m2(a,l);else{let S=Jbe(t,e,a,c,l);_=S.field,d=S.spanAdded}return La.context.with(La.trace.setSpan(La.context.active(),_.span),()=>{try{let S=r.call(this,s,i,a,c);return(0,ze.isPromise)(S)?S.then(f=>(f2(_.span,d),f),f=>{throw E2(_.span,f,d),f}):(f2(_.span,d),S)}catch(S){throw E2(_.span,S,d),S}})}return o[Xn.OTEL_PATCHED_SYMBOL]=!0,o}ze.wrapFieldResolver=R2});var N2=E(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.PACKAGE_NAME=Da.PACKAGE_VERSION=void 0;Da.PACKAGE_VERSION="0.47.1";Da.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var C2=E(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0});sf.GraphQLInstrumentation=void 0;var zn=(M(),P(U)),Ir=ee(),Wu=hR(),nf=gR(),RR=tf(),iLe=p2(),It=O2(),I2=N2(),P2={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},of=[">=14.0.0 <17"],OR=class extends Ir.InstrumentationBase{constructor(e={}){super(I2.PACKAGE_NAME,I2.PACKAGE_VERSION,Object.assign(Object.assign({},P2),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},P2),e))}init(){let e=new Ir.InstrumentationNodeModuleDefinition("graphql",of);return e.files.push(this._addPatchingExecute()),e.files.push(this._addPatchingParser()),e.files.push(this._addPatchingValidate()),e}_addPatchingExecute(){return new Ir.InstrumentationNodeModuleFile("graphql/execution/execute.js",of,e=>((0,Ir.isWrapped)(e.execute)&&this._unwrap(e,"execute"),this._wrap(e,"execute",this._patchExecute(e.defaultFieldResolver)),e),e=>{e&&this._unwrap(e,"execute")})}_addPatchingParser(){return new Ir.InstrumentationNodeModuleFile("graphql/language/parser.js",of,e=>((0,Ir.isWrapped)(e.parse)&&this._unwrap(e,"parse"),this._wrap(e,"parse",this._patchParse()),e),e=>{e&&this._unwrap(e,"parse")})}_addPatchingValidate(){return new Ir.InstrumentationNodeModuleFile("graphql/validation/validate.js",of,e=>((0,Ir.isWrapped)(e.validate)&&this._unwrap(e,"validate"),this._wrap(e,"validate",this._patchValidate()),e),e=>{e&&this._unwrap(e,"validate")})}_patchExecute(e){let r=this;return function(o){return function(){let i;if(arguments.length>=2){let u=arguments;i=r._wrapExecuteArgs(u[0],u[1],u[2],u[3],u[4],u[5],u[6],u[7],e)}else{let u=arguments[0];i=r._wrapExecuteArgs(u.schema,u.document,u.rootValue,u.contextValue,u.variableValues,u.operationName,u.fieldResolver,u.typeResolver,e)}let a=(0,It.getOperation)(i.document,i.operationName),c=r._createExecuteSpan(a,i);return i.contextValue[RR.OTEL_GRAPHQL_DATA_SYMBOL]={source:i.document?i.document||i.document[RR.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:c,fields:{}},zn.context.with(zn.trace.setSpan(zn.context.active(),c),()=>(0,Ir.safeExecuteInTheMiddle)(()=>o.apply(this,[i]),(u,l)=>{r._handleExecutionResult(c,u,l)}))}}}_handleExecutionResult(e,r,n){let o=this.getConfig();if(n===void 0||r){(0,It.endSpan)(e,r);return}if((0,It.isPromise)(n))n.then(s=>{if(typeof o.responseHook!="function"){(0,It.endSpan)(e);return}this._executeResponseHook(e,s)},s=>{(0,It.endSpan)(e,s)});else{if(typeof o.responseHook!="function"){(0,It.endSpan)(e);return}this._executeResponseHook(e,n)}}_executeResponseHook(e,r){let{responseHook:n}=this.getConfig();n&&(0,Ir.safeExecuteInTheMiddle)(()=>{n(e,r)},o=>{o&&this._diag.error("Error running response hook",o),(0,It.endSpan)(e,void 0)},!0)}_patchParse(){let e=this;return function(n){return function(s,i){return e._parse(this,n,s,i)}}}_patchValidate(){let e=this;return function(n){return function(s,i,a,c,u){return e._validate(this,n,s,i,a,u,c)}}}_parse(e,r,n,o){let s=this.getConfig(),i=this.tracer.startSpan(Wu.SpanNames.PARSE);return zn.context.with(zn.trace.setSpan(zn.context.active(),i),()=>(0,Ir.safeExecuteInTheMiddle)(()=>r.call(e,n,o),(a,c)=>{c&&((0,It.getOperation)(c)?c.loc&&(0,It.addSpanSource)(i,c.loc,s.allowValues):i.updateName(Wu.SpanNames.SCHEMA_PARSE)),(0,It.endSpan)(i,a)}))}_validate(e,r,n,o,s,i,a){let c=this.tracer.startSpan(Wu.SpanNames.VALIDATE,{});return zn.context.with(zn.trace.setSpan(zn.context.active(),c),()=>(0,Ir.safeExecuteInTheMiddle)(()=>r.call(e,n,o,s,a,i),(u,l)=>{o.loc||c.updateName(Wu.SpanNames.SCHEMA_VALIDATE),l&&l.length&&c.recordException({name:nf.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(l)}),(0,It.endSpan)(c,u)}))}_createExecuteSpan(e,r){var n;let o=this.getConfig(),s=this.tracer.startSpan(Wu.SpanNames.EXECUTE,{});if(e){let{operation:i,name:a}=e;s.setAttribute(nf.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(s.setAttribute(nf.AttributeNames.OPERATION_NAME,c),s.updateName(`${i} ${c}`)):s.updateName(i)}else{let i=" ";r.operationName&&(i=` "${r.operationName}" `),i=iLe.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),s.setAttribute(nf.AttributeNames.OPERATION_NAME,i)}return!((n=r.document)===null||n===void 0)&&n.loc&&(0,It.addSpanSource)(s,r.document.loc,o.allowValues),r.variableValues&&o.allowValues&&(0,It.addInputVariableAttributes)(s,r.variableValues),s}_wrapExecuteArgs(e,r,n,o,s,i,a,c,u){if(o||(o={}),o[RR.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:e,document:r,rootValue:n,contextValue:o,variableValues:s,operationName:i,fieldResolver:a,typeResolver:c};let l=a==null,p=a??u;return a=(0,It.wrapFieldResolver)(this.tracer,()=>this.getConfig(),p,l),e&&((0,It.wrapFields)(e.getQueryType(),this.tracer,()=>this.getConfig()),(0,It.wrapFields)(e.getMutationType(),this.tracer,()=>this.getConfig())),{schema:e,document:r,rootValue:n,contextValue:o,variableValues:s,operationName:i,fieldResolver:a,typeResolver:c}}};sf.GraphQLInstrumentation=OR});var M2=E(y2=>{"use strict";Object.defineProperty(y2,"__esModule",{value:!0})});var b2=E(ko=>{"use strict";var aLe=ko&&ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),v2=ko&&ko.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&aLe(e,t,r)};Object.defineProperty(ko,"__esModule",{value:!0});v2(C2(),ko);v2(M2(),ko)});var V2=E(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.PACKAGE_NAME=xa.PACKAGE_VERSION=void 0;xa.PACKAGE_VERSION="0.7.1";xa.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var B2=E(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.bufferTextMapGetter=void 0;af.bufferTextMapGetter={get(t,e){var r;if(!t)return;let n=Object.keys(t);for(let o of n)if(o===e||o.toLowerCase()===e)return(r=t[o])===null||r===void 0?void 0:r.toString()},keys(t){return t?Object.keys(t):[]}}});var k2=E(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.KafkaJsInstrumentation=void 0;var pt=(M(),P(U)),Fo=(ue(),P(He)),G2=V2(),H2=B2(),Kr=ee(),NR=class extends Kr.InstrumentationBase{constructor(e={}){super(G2.PACKAGE_NAME,G2.PACKAGE_VERSION,e)}init(){let e=n=>{var o,s;(0,Kr.isWrapped)((o=n?.Kafka)===null||o===void 0?void 0:o.prototype.producer)&&this._unwrap(n.Kafka.prototype,"producer"),(0,Kr.isWrapped)((s=n?.Kafka)===null||s===void 0?void 0:s.prototype.consumer)&&this._unwrap(n.Kafka.prototype,"consumer")};return new Kr.InstrumentationNodeModuleDefinition("kafkajs",[">=0.1.0 <3"],n=>{var o,s;return e(n),this._wrap((o=n?.Kafka)===null||o===void 0?void 0:o.prototype,"producer",this._getProducerPatch()),this._wrap((s=n?.Kafka)===null||s===void 0?void 0:s.prototype,"consumer",this._getConsumerPatch()),n},e)}_getConsumerPatch(){let e=this;return r=>function(...o){let s=r.apply(this,o);return(0,Kr.isWrapped)(s.run)&&e._unwrap(s,"run"),e._wrap(s,"run",e._getConsumerRunPatch()),s}}_getProducerPatch(){let e=this;return r=>function(...o){let s=r.apply(this,o);return(0,Kr.isWrapped)(s.sendBatch)&&e._unwrap(s,"sendBatch"),e._wrap(s,"sendBatch",e._getProducerSendBatchPatch()),(0,Kr.isWrapped)(s.send)&&e._unwrap(s,"send"),e._wrap(s,"send",e._getProducerSendPatch()),s}}_getConsumerRunPatch(){let e=this;return r=>function(...o){let s=o[0];return s?.eachMessage&&((0,Kr.isWrapped)(s.eachMessage)&&e._unwrap(s,"eachMessage"),e._wrap(s,"eachMessage",e._getConsumerEachMessagePatch())),s?.eachBatch&&((0,Kr.isWrapped)(s.eachBatch)&&e._unwrap(s,"eachBatch"),e._wrap(s,"eachBatch",e._getConsumerEachBatchPatch())),r.call(this,s)}}_getConsumerEachMessagePatch(){let e=this;return r=>function(...o){let s=o[0],i=pt.propagation.extract(pt.ROOT_CONTEXT,s.message.headers,H2.bufferTextMapGetter),a=e._startConsumerSpan(s.topic,s.message,Fo.MESSAGINGOPERATIONVALUES_PROCESS,i),c=pt.context.with(pt.trace.setSpan(i,a),()=>r.apply(this,o));return e._endSpansOnPromise([a],c)}}_getConsumerEachBatchPatch(){return e=>{let r=this;return function(...o){let s=o[0],i=r._startConsumerSpan(s.batch.topic,void 0,Fo.MESSAGINGOPERATIONVALUES_RECEIVE,pt.ROOT_CONTEXT);return pt.context.with(pt.trace.setSpan(pt.context.active(),i),()=>{let a=s.batch.messages.map(u=>{var l;let p=pt.propagation.extract(pt.ROOT_CONTEXT,u.headers,H2.bufferTextMapGetter),_=(l=pt.trace.getSpan(p))===null||l===void 0?void 0:l.spanContext(),d;return _&&(d={context:_}),r._startConsumerSpan(s.batch.topic,u,Fo.MESSAGINGOPERATIONVALUES_PROCESS,void 0,d)}),c=e.apply(this,o);return a.unshift(i),r._endSpansOnPromise(a,c)})}}}_getProducerSendBatchPatch(){let e=this;return r=>function(...o){let a=(o[0].topicMessages||[]).map(u=>u.messages.map(l=>e._startProducerSpan(u.topic,l))).reduce((u,l)=>u.concat(l),[]),c=r.apply(this,o);return e._endSpansOnPromise(a,c)}}_getProducerSendPatch(){let e=this;return r=>function(...o){let s=o[0],i=s.messages.map(c=>e._startProducerSpan(s.topic,c)),a=r.apply(this,o);return e._endSpansOnPromise(i,a)}}_endSpansOnPromise(e,r){return Promise.resolve(r).catch(n=>{let o;throw typeof n=="string"?o=n:typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"message")&&(o=n.message),e.forEach(s=>s.setStatus({code:pt.SpanStatusCode.ERROR,message:o})),n}).finally(()=>{e.forEach(n=>n.end())})}_startConsumerSpan(e,r,n,o,s){let i=this.tracer.startSpan(e,{kind:pt.SpanKind.CONSUMER,attributes:{[Fo.SEMATTRS_MESSAGING_SYSTEM]:"kafka",[Fo.SEMATTRS_MESSAGING_DESTINATION]:e,[Fo.SEMATTRS_MESSAGING_OPERATION]:n},links:s?[s]:[]},o),{consumerHook:a}=this.getConfig();return a&&r&&(0,Kr.safeExecuteInTheMiddle)(()=>a(i,{topic:e,message:r}),c=>{c&&this._diag.error("consumerHook error",c)},!0),i}_startProducerSpan(e,r){var n;let o=this.tracer.startSpan(e,{kind:pt.SpanKind.PRODUCER,attributes:{[Fo.SEMATTRS_MESSAGING_SYSTEM]:"kafka",[Fo.SEMATTRS_MESSAGING_DESTINATION]:e}});r.headers=(n=r.headers)!==null&&n!==void 0?n:{},pt.propagation.inject(pt.trace.setSpan(pt.context.active(),o),r.headers);let{producerHook:s}=this.getConfig();return s&&(0,Kr.safeExecuteInTheMiddle)(()=>s(o,{topic:e,message:r}),i=>{i&&this._diag.error("producerHook error",i)},!0),o}};cf.KafkaJsInstrumentation=NR});var q2=E(F2=>{"use strict";Object.defineProperty(F2,"__esModule",{value:!0})});var Y2=E(qo=>{"use strict";var lLe=qo&&qo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),j2=qo&&qo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&lLe(e,t,r)};Object.defineProperty(qo,"__esModule",{value:!0});j2(k2(),qo);j2(q2(),qo)});var z2=E(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.PACKAGE_NAME=Ua.PACKAGE_VERSION=void 0;Ua.PACKAGE_VERSION="0.44.1";Ua.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var e4=E(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.LruMemoizerInstrumentation=void 0;var Q2=(M(),P(U)),J2=ee(),Z2=z2(),IR=class extends J2.InstrumentationBase{constructor(e={}){super(Z2.PACKAGE_NAME,Z2.PACKAGE_VERSION,e)}init(){return[new J2.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <3"],e=>{let r=function(){let n=e.apply(this,arguments);return function(){let o=[...arguments],s=o.pop(),i=typeof s=="function"?Q2.context.bind(Q2.context.active(),s):s;return o.push(i),n.apply(this,o)}};return r.sync=e.sync,r},void 0)]}};uf.LruMemoizerInstrumentation=IR});var t4=E(Zs=>{"use strict";var _Le=Zs&&Zs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),dLe=Zs&&Zs.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&_Le(e,t,r)};Object.defineProperty(Zs,"__esModule",{value:!0});dLe(e4(),Zs)});var i4=E(Xu=>{"use strict";Object.defineProperty(Xu,"__esModule",{value:!0});Xu.MongodbCommandType=void 0;var fLe;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.AGGREGATE="aggregate",t.UNKNOWN="unknown"})(fLe=Xu.MongodbCommandType||(Xu.MongodbCommandType={}))});var a4=E(wa=>{"use strict";Object.defineProperty(wa,"__esModule",{value:!0});wa.PACKAGE_NAME=wa.PACKAGE_VERSION=void 0;wa.PACKAGE_VERSION="0.52.0";wa.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var l4=E(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.MongoDBInstrumentation=void 0;var Ne=(M(),P(U)),he=ee(),Qn=(ue(),P(He)),jo=i4(),c4=a4(),u4={requireParentSpan:!0},PR=class t extends he.InstrumentationBase{constructor(e={}){super(c4.PACKAGE_NAME,c4.PACKAGE_VERSION,Object.assign(Object.assign({},u4),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},u4),e))}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){let{v3PatchConnection:e,v3UnpatchConnection:r}=this._getV3ConnectionPatches(),{v4PatchConnect:n,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:s,v4PatchConnectionPromise:i,v4UnpatchConnection:a}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:c,v4UnpatchConnectionPool:u}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:l,v4UnpatchSessions:p}=this._getV4SessionsPatches();return[new he.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new he.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],e,r)]),new he.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <7"],void 0,void 0,[new he.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],s,a),new he.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <7"],i,a),new he.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],c,u),new he.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <7"],n,o),new he.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <7"],l,p)])]}_getV3ConnectionPatches(){return{v3PatchConnection:e=>((0,he.isWrapped)(e.insert)&&this._unwrap(e,"insert"),this._wrap(e,"insert",this._getV3PatchOperation("insert")),(0,he.isWrapped)(e.remove)&&this._unwrap(e,"remove"),this._wrap(e,"remove",this._getV3PatchOperation("remove")),(0,he.isWrapped)(e.update)&&this._unwrap(e,"update"),this._wrap(e,"update",this._getV3PatchOperation("update")),(0,he.isWrapped)(e.command)&&this._unwrap(e,"command"),this._wrap(e,"command",this._getV3PatchCommand()),(0,he.isWrapped)(e.query)&&this._unwrap(e,"query"),this._wrap(e,"query",this._getV3PatchFind()),(0,he.isWrapped)(e.getMore)&&this._unwrap(e,"getMore"),this._wrap(e,"getMore",this._getV3PatchCursor()),e),v3UnpatchConnection:e=>{e!==void 0&&(this._unwrap(e,"insert"),this._unwrap(e,"remove"),this._unwrap(e,"update"),this._unwrap(e,"command"),this._unwrap(e,"query"),this._unwrap(e,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:e=>((0,he.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),this._wrap(e.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,he.isWrapped)(e.release)&&this._unwrap(e,"release"),this._wrap(e.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),e),v4UnpatchSessions:e=>{e!==void 0&&((0,he.isWrapped)(e.acquire)&&this._unwrap(e,"acquire"),(0,he.isWrapped)(e.release)&&this._unwrap(e,"release"))}}}_getV4AcquireCommand(){let e=this;return r=>function(){let o=this.sessions.length,s=r.call(this),i=this.sessions.length;return o===i?e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName}):o-1===i&&(e._connectionsUsage.add(-1,{state:"idle","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"used","pool.name":e._poolName})),s}}_getV4ReleaseCommand(){let e=this;return r=>function(o){let s=r.call(this,o);return e._connectionsUsage.add(-1,{state:"used","pool.name":e._poolName}),e._connectionsUsage.add(1,{state:"idle","pool.name":e._poolName}),s}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:e=>{let r=e.ConnectionPool.prototype;return(0,he.isWrapped)(r.checkOut)&&this._unwrap(r,"checkOut"),this._wrap(r,"checkOut",this._getV4ConnectionPoolCheckOut()),e},v4UnpatchConnectionPool:e=>{e!==void 0&&this._unwrap(e.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:e=>((0,he.isWrapped)(e.connect)&&this._unwrap(e,"connect"),this._wrap(e,"connect",this._getV4ConnectCommand()),e),v4UnpatchConnect:e=>{e!==void 0&&this._unwrap(e,"connect")}}}_getV4ConnectionPoolCheckOut(){return e=>function(n){let o=Ne.context.bind(Ne.context.active(),n);return e.call(this,o)}}_getV4ConnectCommand(){let e=this;return r=>function(o,s){if(r.length===1){let a=r.call(this,o);return a&&typeof a.then=="function"&&a.then(()=>e.setPoolName(o),()=>{}),a}let i=function(a,c){if(a||!c){s(a,c);return}e.setPoolName(o),s(a,c)};return r.call(this,o,i)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:e=>((0,he.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandCallback()),e),v4PatchConnectionPromise:e=>((0,he.isWrapped)(e.Connection.prototype.command)&&this._unwrap(e.Connection.prototype,"command"),this._wrap(e.Connection.prototype,"command",this._getV4PatchCommandPromise()),e),v4UnpatchConnection:e=>{e!==void 0&&this._unwrap(e.Connection.prototype,"command")}}}_getV3PatchOperation(e){let r=this;return n=>function(s,i,a,c,u){let l=Ne.trace.getSpan(Ne.context.active()),p=r._checkSkipInstrumentation(l),_=typeof c=="function"?c:u;if(p||typeof _!="function"||typeof a!="object")return typeof c=="function"?n.call(this,s,i,a,c):n.call(this,s,i,a,c,u);let d=r.tracer.startSpan(`mongodb.${e}`,{kind:Ne.SpanKind.CLIENT});r._populateV3Attributes(d,i,s,a[0],e);let S=r._patchEnd(d,_);return typeof c=="function"?n.call(this,s,i,a,S):n.call(this,s,i,a,c,S)}}_getV3PatchCommand(){let e=this;return r=>function(o,s,i,a,c){let u=Ne.trace.getSpan(Ne.context.active()),l=e._checkSkipInstrumentation(u),p=typeof a=="function"?a:c;if(l||typeof p!="function"||typeof i!="object")return typeof a=="function"?r.call(this,o,s,i,a):r.call(this,o,s,i,a,c);let _=t._getCommandType(i),d=_===jo.MongodbCommandType.UNKNOWN?"command":_,S=e.tracer.startSpan(`mongodb.${d}`,{kind:Ne.SpanKind.CLIENT}),f=_===jo.MongodbCommandType.UNKNOWN?void 0:_;e._populateV3Attributes(S,s,o,i,f);let T=e._patchEnd(S,p);return typeof a=="function"?r.call(this,o,s,i,T):r.call(this,o,s,i,a,T)}}_getV4PatchCommandCallback(){let e=this;return r=>function(o,s,i,a){let c=Ne.trace.getSpan(Ne.context.active()),u=e._checkSkipInstrumentation(c),l=a,p=Object.keys(s)[0];if(typeof s!="object"||s.ismaster||s.hello)return r.call(this,o,s,i,a);let _;u||(_=e.tracer.startSpan(`mongodb.${p}`,{kind:Ne.SpanKind.CLIENT}),e._populateV4Attributes(_,this,o,s,p));let d=e._patchEnd(_,l,this.id,p);return r.call(this,o,s,i,d)}}_getV4PatchCommandPromise(){let e=this;return r=>function(...o){let[s,i]=o,a=Ne.trace.getSpan(Ne.context.active()),c=e._checkSkipInstrumentation(a),u=Object.keys(i)[0],l=()=>{};if(typeof i!="object"||i.ismaster||i.hello)return r.apply(this,o);let p;c||(p=e.tracer.startSpan(`mongodb.${u}`,{kind:Ne.SpanKind.CLIENT}),e._populateV4Attributes(p,this,s,i,u));let _=e._patchEnd(p,l,this.id,u),d=r.apply(this,o);return d.then(S=>_(null,S),S=>_(S)),d}}_getV3PatchFind(){let e=this;return r=>function(o,s,i,a,c,u){let l=Ne.trace.getSpan(Ne.context.active()),p=e._checkSkipInstrumentation(l),_=typeof c=="function"?c:u;if(p||typeof _!="function"||typeof i!="object")return typeof c=="function"?r.call(this,o,s,i,a,c):r.call(this,o,s,i,a,c,u);let d=e.tracer.startSpan("mongodb.find",{kind:Ne.SpanKind.CLIENT});e._populateV3Attributes(d,s,o,i,"find");let S=e._patchEnd(d,_);return typeof c=="function"?r.call(this,o,s,i,a,S):r.call(this,o,s,i,a,c,S)}}_getV3PatchCursor(){let e=this;return r=>function(o,s,i,a,c,u){let l=Ne.trace.getSpan(Ne.context.active()),p=e._checkSkipInstrumentation(l),_=typeof c=="function"?c:u;if(p||typeof _!="function")return typeof c=="function"?r.call(this,o,s,i,a,c):r.call(this,o,s,i,a,c,u);let d=e.tracer.startSpan("mongodb.getMore",{kind:Ne.SpanKind.CLIENT});e._populateV3Attributes(d,s,o,i.cmd,"getMore");let S=e._patchEnd(d,_);return typeof c=="function"?r.call(this,o,s,i,a,S):r.call(this,o,s,i,a,c,S)}}static _getCommandType(e){return e.createIndexes!==void 0?jo.MongodbCommandType.CREATE_INDEXES:e.findandmodify!==void 0?jo.MongodbCommandType.FIND_AND_MODIFY:e.ismaster!==void 0?jo.MongodbCommandType.IS_MASTER:e.count!==void 0?jo.MongodbCommandType.COUNT:e.aggregate!==void 0?jo.MongodbCommandType.AGGREGATE:jo.MongodbCommandType.UNKNOWN}_populateV4Attributes(e,r,n,o,s){let i,a;if(r){let u=typeof r.address=="string"?r.address.split(":"):"";u.length===2&&(i=u[0],a=u[1])}let c;o?.documents&&o.documents[0]?c=o.documents[0]:o?.cursors?c=o.cursors:c=o,this._addAllSpanAttributes(e,n.db,n.collection,i,a,c,s)}_populateV3Attributes(e,r,n,o,s){var i,a,c,u,l,p,_,d;let S,f;if(n&&n.s&&(S=(a=(i=n.s.options)===null||i===void 0?void 0:i.host)!==null&&a!==void 0?a:n.s.host,f=(l=(u=(c=n.s.options)===null||c===void 0?void 0:c.port)!==null&&u!==void 0?u:n.s.port)===null||l===void 0?void 0:l.toString(),S==null||f==null)){let N=(p=n.description)===null||p===void 0?void 0:p.address;if(N){let I=N.split(":");S=I[0],f=I[1]}}let[T,h]=r.toString().split("."),A=(d=(_=o?.query)!==null&&_!==void 0?_:o?.q)!==null&&d!==void 0?d:o;this._addAllSpanAttributes(e,T,h,S,f,A,s)}_addAllSpanAttributes(e,r,n,o,s,i,a){if(e.setAttributes({[Qn.SEMATTRS_DB_SYSTEM]:Qn.DBSYSTEMVALUES_MONGODB,[Qn.SEMATTRS_DB_NAME]:r,[Qn.SEMATTRS_DB_MONGODB_COLLECTION]:n,[Qn.SEMATTRS_DB_OPERATION]:a,[Qn.SEMATTRS_DB_CONNECTION_STRING]:`mongodb://${o}:${s}/${r}`}),o&&s){e.setAttribute(Qn.SEMATTRS_NET_PEER_NAME,o);let l=parseInt(s,10);isNaN(l)||e.setAttribute(Qn.SEMATTRS_NET_PEER_PORT,l)}if(!i)return;let{dbStatementSerializer:c}=this.getConfig(),u=typeof c=="function"?c:this._defaultDbStatementSerializer.bind(this);(0,he.safeExecuteInTheMiddle)(()=>{let l=u(i);e.setAttribute(Qn.SEMATTRS_DB_STATEMENT,l)},l=>{l&&this._diag.error("Error running dbStatementSerializer hook",l)},!0)}_defaultDbStatementSerializer(e){let{enhancedDatabaseReporting:r}=this.getConfig(),n=r?e:this._scrubStatement(e);return JSON.stringify(n)}_scrubStatement(e){return Array.isArray(e)?e.map(r=>this._scrubStatement(r)):typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e).map(([r,n])=>[r,this._scrubStatement(n)])):"?"}_handleExecutionResult(e,r){let{responseHook:n}=this.getConfig();typeof n=="function"&&(0,he.safeExecuteInTheMiddle)(()=>{n(e,{data:r})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(e,r,n,o){let s=Ne.context.active(),i=this;return function(...c){let u=c[0];if(e){if(u instanceof Error)e?.setStatus({code:Ne.SpanStatusCode.ERROR,message:u.message});else{let l=c[1];i._handleExecutionResult(e,l)}e.end()}return Ne.context.with(s,()=>(o==="endSessions"&&i._connectionsUsage.add(-1,{state:"idle","pool.name":i._poolName}),r.apply(this,c)))}}setPoolName(e){var r,n;let o=(r=e.hostAddress)===null||r===void 0?void 0:r.host,s=(n=e.hostAddress)===null||n===void 0?void 0:n.port,i=e.dbName,a=`mongodb://${o}:${s}/${i}`;this._poolName=a}_checkSkipInstrumentation(e){return this.getConfig().requireParentSpan===!0&&e===void 0}};lf.MongoDBInstrumentation=PR});var p4=E(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});zu.MongodbCommandType=void 0;var SLe;(function(t){t.CREATE_INDEXES="createIndexes",t.FIND_AND_MODIFY="findAndModify",t.IS_MASTER="isMaster",t.COUNT="count",t.UNKNOWN="unknown"})(SLe=zu.MongodbCommandType||(zu.MongodbCommandType={}))});var d4=E(Yo=>{"use strict";var TLe=Yo&&Yo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),_4=Yo&&Yo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&TLe(e,t,r)};Object.defineProperty(Yo,"__esModule",{value:!0});_4(l4(),Yo);_4(p4(),Yo)});var g4=E($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.handleCallbackResponse=$o.handlePromiseResponse=$o.getAttributesFromCollection=void 0;var m4=(M(),P(U)),OLe=ee(),Qu=(ue(),P(He));function NLe(t){return{[Qu.SEMATTRS_DB_MONGODB_COLLECTION]:t.name,[Qu.SEMATTRS_DB_NAME]:t.conn.name,[Qu.SEMATTRS_DB_USER]:t.conn.user,[Qu.SEMATTRS_NET_PEER_NAME]:t.conn.host,[Qu.SEMATTRS_NET_PEER_PORT]:t.conn.port}}$o.getAttributesFromCollection=NLe;function h4(t,e={}){t.recordException(e),t.setStatus({code:m4.SpanStatusCode.ERROR,message:`${e.message} ${e.code?`
|
|
12
|
-
Mongoose Error Code: ${e.code}`:""}`})}function yR(t,e,r,n=void 0){r&&(0,OLe.safeExecuteInTheMiddle)(()=>r(t,{moduleVersion:n,response:e}),o=>{o&&m4.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function ILe(t,e,r,n=void 0){return t instanceof Promise?t.then(o=>(yR(e,o,r,n),o)).catch(o=>{throw h4(e,o),o}).finally(()=>e.end()):(yR(e,t,r,n),e.end(),t)}$o.handlePromiseResponse=ILe;function PLe(t,e,r,n,o,s,i=void 0){let a=0;return o.length===2&&(a=1),o[a]=(c,u)=>(c?h4(n,c):yR(n,u,s,i),n.end(),t(c,u)),e.apply(r,o)}$o.handleCallbackResponse=PLe});var A4=E(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.PACKAGE_NAME=Va.PACKAGE_VERSION=void 0;Va.PACKAGE_VERSION="0.46.1";Va.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var P4=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.MongooseInstrumentation=Nn._STORED_PARENT_SPAN=void 0;var Ut=(M(),P(U)),CLe=re(),MR=g4(),R4=ee(),O4=A4(),Ju=(ue(),P(He)),pf=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],yLe=["remove","count","findOneAndRemove",...pf],MLe=["count","findOneAndRemove",...pf],vLe=[...pf];function N4(t){return t?t.startsWith("6.")||t.startsWith("5.")?yLe:t.startsWith("7.")?MLe:vLe:pf}function I4(t){return t&&(t.startsWith("5.")||t.startsWith("6."))||!1}Nn._STORED_PARENT_SPAN=Symbol("stored-parent-span");var vR=class extends R4.InstrumentationBase{constructor(e={}){super(O4.PACKAGE_NAME,O4.PACKAGE_VERSION,e)}init(){return new R4.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <9"],this.patch.bind(this),this.unpatch.bind(this))}patch(e,r){return this._wrap(e.Model.prototype,"save",this.patchOnModelMethods("save",r)),e.Model.prototype.$save=e.Model.prototype.save,I4(r)&&this._wrap(e.Model.prototype,"remove",this.patchOnModelMethods("remove",r)),this._wrap(e.Query.prototype,"exec",this.patchQueryExec(r)),this._wrap(e.Aggregate.prototype,"exec",this.patchAggregateExec(r)),N4(r).forEach(o=>{this._wrap(e.Query.prototype,o,this.patchAndCaptureSpanContext(o))}),this._wrap(e.Model,"aggregate",this.patchModelAggregate()),e}unpatch(e,r){let n=N4(r);this._unwrap(e.Model.prototype,"save"),e.Model.prototype.$save=e.Model.prototype.save,I4(r)&&this._unwrap(e.Model.prototype,"remove"),this._unwrap(e.Query.prototype,"exec"),this._unwrap(e.Aggregate.prototype,"exec"),n.forEach(o=>{this._unwrap(e.Query.prototype,o)}),this._unwrap(e.Model,"aggregate")}patchAggregateExec(e){let r=this;return n=>function(s){var i;if(r.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return n.apply(this,arguments);let a=this[Nn._STORED_PARENT_SPAN],c={},{dbStatementSerializer:u}=r.getConfig();u&&(c[Ju.SEMATTRS_DB_STATEMENT]=u("aggregate",{options:this.options,aggregatePipeline:this._pipeline}));let l=r._startSpan(this._model.collection,(i=this._model)===null||i===void 0?void 0:i.modelName,"aggregate",c,a);return r._handleResponse(l,n,this,arguments,s,e)}}patchQueryExec(e){let r=this;return n=>function(s){if(r.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return n.apply(this,arguments);let i=this[Nn._STORED_PARENT_SPAN],a={},{dbStatementSerializer:c}=r.getConfig();c&&(a[Ju.SEMATTRS_DB_STATEMENT]=c(this.op,{condition:this._conditions,updates:this._update,options:this.options,fields:this._fields}));let u=r._startSpan(this.mongooseCollection,this.model.modelName,this.op,a,i);return r._handleResponse(u,n,this,arguments,s,e)}}patchOnModelMethods(e,r){let n=this;return o=>function(i,a){if(n.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return o.apply(this,arguments);let c={document:this};i&&!(i instanceof Function)&&(c.options=i);let u={},{dbStatementSerializer:l}=n.getConfig();l&&(u[Ju.SEMATTRS_DB_STATEMENT]=l(e,c));let p=n._startSpan(this.constructor.collection,this.constructor.modelName,e,u);return i instanceof Function&&(a=i,i=void 0),n._handleResponse(p,o,this,arguments,a,r)}}patchModelAggregate(){let e=this;return r=>function(){let o=Ut.trace.getSpan(Ut.context.active()),s=e._callOriginalFunction(()=>r.apply(this,arguments));return s&&(s[Nn._STORED_PARENT_SPAN]=o),s}}patchAndCaptureSpanContext(e){let r=this;return n=>function(){return this[Nn._STORED_PARENT_SPAN]=Ut.trace.getSpan(Ut.context.active()),r._callOriginalFunction(()=>n.apply(this,arguments))}}_startSpan(e,r,n,o,s){return this.tracer.startSpan(`mongoose.${r}.${n}`,{kind:Ut.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},o),(0,MR.getAttributesFromCollection)(e)),{[Ju.SEMATTRS_DB_OPERATION]:n,[Ju.SEMATTRS_DB_SYSTEM]:"mongoose"})},s?Ut.trace.setSpan(Ut.context.active(),s):void 0)}_handleResponse(e,r,n,o,s,i=void 0){let a=this;if(s instanceof Function)return a._callOriginalFunction(()=>(0,MR.handleCallbackResponse)(s,r,n,e,o,a.getConfig().responseHook,i));{let c=a._callOriginalFunction(()=>r.apply(n,o));return(0,MR.handlePromiseResponse)(c,e,a.getConfig().responseHook,i)}}_callOriginalFunction(e){return this.getConfig().suppressInternalInstrumentation?Ut.context.with((0,CLe.suppressTracing)(Ut.context.active()),e):e()}};Nn.MongooseInstrumentation=vR});var y4=E(C4=>{"use strict";Object.defineProperty(C4,"__esModule",{value:!0})});var v4=E(Ko=>{"use strict";var bLe=Ko&&Ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M4=Ko&&Ko.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bLe(e,t,r)};Object.defineProperty(Ko,"__esModule",{value:!0});M4(P4(),Ko);M4(y4(),Ko)});var U4=E(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AttributeNames=void 0;var DLe;(function(t){t.MYSQL_VALUES="db.mysql.values"})(DLe=Zu.AttributeNames||(Zu.AttributeNames={}))});var V4=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getPoolName=$t.arrayStringifyHelper=$t.getSpanName=$t.getDbValues=$t.getDbStatement=$t.getConnectionAttributes=void 0;var Jn=(ue(),P(He));function xLe(t){let{host:e,port:r,database:n,user:o}=ULe(t),s=parseInt(r,10);return isNaN(s)?{[Jn.SEMATTRS_NET_PEER_NAME]:e,[Jn.SEMATTRS_DB_CONNECTION_STRING]:w4(e,r,n),[Jn.SEMATTRS_DB_NAME]:n,[Jn.SEMATTRS_DB_USER]:o}:{[Jn.SEMATTRS_NET_PEER_NAME]:e,[Jn.SEMATTRS_NET_PEER_PORT]:s,[Jn.SEMATTRS_DB_CONNECTION_STRING]:w4(e,r,n),[Jn.SEMATTRS_DB_NAME]:n,[Jn.SEMATTRS_DB_USER]:o}}$t.getConnectionAttributes=xLe;function ULe(t){let{host:e,port:r,database:n,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:r,database:n,user:o}}function w4(t,e,r){let n=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(n+=`:${e}`),typeof r=="string"&&(n+=`/${r}`),n}function wLe(t){return typeof t=="string"?t:t.sql}$t.getDbStatement=wLe;function VLe(t,e){return bR(typeof t=="string"?e:e||t.values)}$t.getDbValues=VLe;function BLe(t){let e=typeof t=="object"?t.sql:t,r=e?.indexOf(" ");return typeof r=="number"&&r!==-1?e?.substring(0,r):e}$t.getSpanName=BLe;function bR(t){return t?`[${t.toString()}]`:""}$t.arrayStringifyHelper=bR;function GLe(t){let e=t.config.connectionConfig,r="";return r+=e.host?`host: '${e.host}', `:"",r+=e.port?`port: ${e.port}, `:"",r+=e.database?`database: '${e.database}', `:"",r+=e.user?`user: '${e.user}'`:"",e.user||(r=r.substring(0,r.length-2)),r.trim()}$t.getPoolName=GLe});var B4=E(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.PACKAGE_NAME=Ba.PACKAGE_VERSION=void 0;Ba.PACKAGE_VERSION="0.45.1";Ba.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var H4=E(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.MySQLInstrumentation=void 0;var Kt=(M(),P(U)),Ga=ee(),LR=(ue(),P(He)),HLe=U4(),Ha=V4(),G4=B4(),_f=class t extends Ga.InstrumentationBase{constructor(e={}){super(G4.PACKAGE_NAME,G4.PACKAGE_VERSION,e),this._setMetricInstruments()}setMeterProvider(e){super.setMeterProvider(e),this._setMetricInstruments()}_setMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){return[new Ga.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],e=>((0,Ga.isWrapped)(e.createConnection)&&this._unwrap(e,"createConnection"),this._wrap(e,"createConnection",this._patchCreateConnection()),(0,Ga.isWrapped)(e.createPool)&&this._unwrap(e,"createPool"),this._wrap(e,"createPool",this._patchCreatePool()),(0,Ga.isWrapped)(e.createPoolCluster)&&this._unwrap(e,"createPoolCluster"),this._wrap(e,"createPoolCluster",this._patchCreatePoolCluster()),e),e=>{e!==void 0&&(this._unwrap(e,"createConnection"),this._unwrap(e,"createPool"),this._unwrap(e,"createPoolCluster"))})]}_patchCreateConnection(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"query",r._patchQuery(s)),s}}}_patchCreatePool(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"query",r._patchQuery(s)),r._wrap(s,"getConnection",r._patchGetConnection(s)),r._wrap(s,"end",r._patchPoolEnd(s)),r._setPoolcallbacks(s,r,""),s}}}_patchPoolEnd(e){return r=>{let n=this;return function(s){let i=e._allConnections.length,a=e._freeConnections.length,c=i-a,u=(0,Ha.getPoolName)(e);n._connectionsUsage.add(-c,{state:"used",name:u}),n._connectionsUsage.add(-a,{state:"idle",name:u}),r.apply(e,arguments)}}}_patchCreatePoolCluster(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"getConnection",r._patchGetConnection(s)),r._wrap(s,"add",r._patchAdd(s)),s}}}_patchAdd(e){return r=>{let n=this;return function(s,i){if(!n._enabled)return n._unwrap(e,"add"),r.apply(e,arguments);r.apply(e,arguments);let a=e._nodes;if(a){let c=typeof s=="object"?"CLUSTER::"+e._lastId:String(s),u=a[c].pool;n._setPoolcallbacks(u,n,s)}}}}_patchGetConnection(e){return r=>{let n=this;return function(s,i,a){if(!n._enabled)return n._unwrap(e,"getConnection"),r.apply(e,arguments);if(arguments.length===1&&typeof s=="function"){let c=n._getConnectionCallbackPatchFn(s);return r.call(e,c)}if(arguments.length===2&&typeof i=="function"){let c=n._getConnectionCallbackPatchFn(i);return r.call(e,s,c)}if(arguments.length===3&&typeof a=="function"){let c=n._getConnectionCallbackPatchFn(a);return r.call(e,s,i,c)}return r.apply(e,arguments)}}}_getConnectionCallbackPatchFn(e){let r=this,n=Kt.context.active();return function(o,s){s&&((0,Ga.isWrapped)(s.query)||r._wrap(s,"query",r._patchQuery(s))),typeof e=="function"&&Kt.context.with(n,e,this,o,s)}}_patchQuery(e){return r=>{let n=this;return function(o,s,i){if(!n._enabled)return n._unwrap(e,"query"),r.apply(e,arguments);let a=n.tracer.startSpan((0,Ha.getSpanName)(o),{kind:Kt.SpanKind.CLIENT,attributes:Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Ha.getConnectionAttributes)(e.config))});if(a.setAttribute(LR.SEMATTRS_DB_STATEMENT,(0,Ha.getDbStatement)(o)),n.getConfig().enhancedDatabaseReporting){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]),a.setAttribute(HLe.AttributeNames.MYSQL_VALUES,(0,Ha.getDbValues)(o,l))}let c=Array.from(arguments).findIndex(l=>typeof l=="function"),u=Kt.context.active();if(c===-1){let l=Kt.context.with(Kt.trace.setSpan(Kt.context.active(),a),()=>r.apply(e,arguments));return Kt.context.bind(u,l),l.on("error",p=>a.setStatus({code:Kt.SpanStatusCode.ERROR,message:p.message})).on("end",()=>{a.end()})}else return n._wrap(arguments,c,n._patchCallbackQuery(a,u)),Kt.context.with(Kt.trace.setSpan(Kt.context.active(),a),()=>r.apply(e,arguments))}}}_patchCallbackQuery(e,r){return n=>function(o,s,i){return o&&e.setStatus({code:Kt.SpanStatusCode.ERROR,message:o.message}),e.end(),Kt.context.with(r,()=>n(...arguments))}}_setPoolcallbacks(e,r,n){let o=n||(0,Ha.getPoolName)(e);e.on("connection",s=>{r._connectionsUsage.add(1,{state:"idle",name:o})}),e.on("acquire",s=>{r._connectionsUsage.add(-1,{state:"idle",name:o}),r._connectionsUsage.add(1,{state:"used",name:o})}),e.on("release",s=>{r._connectionsUsage.add(-1,{state:"used",name:o}),r._connectionsUsage.add(1,{state:"idle",name:o})})}};df.MySQLInstrumentation=_f;_f.COMMON_ATTRIBUTES={[LR.SEMATTRS_DB_SYSTEM]:LR.DBSYSTEMVALUES_MYSQL}});var F4=E(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0})});var j4=E(Wo=>{"use strict";var kLe=Wo&&Wo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q4=Wo&&Wo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kLe(e,t,r)};Object.defineProperty(Wo,"__esModule",{value:!0});q4(H4(),Wo);q4(F4(),Wo)});var xR=E(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.addSqlCommenterComment=void 0;var DR=(M(),P(U)),qLe=re();function jLe(t){let e=t.indexOf("--");if(e>=0)return!0;if(t.indexOf("/*")<0)return!1;let n=t.indexOf("*/");return e<n}function YLe(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function $Le(t,e){if(typeof e!="string"||e.length===0||jLe(e))return e;let r=new qLe.W3CTraceContextPropagator,n={};r.inject(DR.trace.setSpan(DR.ROOT_CONTEXT,t),n,DR.defaultTextMapSetter);let o=Object.keys(n).sort();if(o.length===0)return e;let s=o.map(i=>{let a=YLe(n[i]);return`${i}='${a}'`}).join(",");return`${e} /*${s}*/`}Ef.addSqlCommenterComment=$Le});var z4=E(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.getConnectionPrototypeToInstrument=Pr.once=Pr.getSpanName=Pr.getDbStatement=Pr.getConnectionAttributes=void 0;var Zn=(ue(),P(He));function KLe(t){let{host:e,port:r,database:n,user:o}=WLe(t),s=parseInt(r,10);return isNaN(s)?{[Zn.SEMATTRS_NET_PEER_NAME]:e,[Zn.SEMATTRS_DB_CONNECTION_STRING]:X4(e,r,n),[Zn.SEMATTRS_DB_NAME]:n,[Zn.SEMATTRS_DB_USER]:o}:{[Zn.SEMATTRS_NET_PEER_NAME]:e,[Zn.SEMATTRS_NET_PEER_PORT]:s,[Zn.SEMATTRS_DB_CONNECTION_STRING]:X4(e,r,n),[Zn.SEMATTRS_DB_NAME]:n,[Zn.SEMATTRS_DB_USER]:o}}Pr.getConnectionAttributes=KLe;function WLe(t){let{host:e,port:r,database:n,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:r,database:n,user:o}}function X4(t,e,r){let n=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(n+=`:${e}`),typeof r=="string"&&(n+=`/${r}`),n}function XLe(t,e,r){return e?typeof t=="string"?r?e(t,r):t:r||t.values?e(t.sql,r||t.values):t.sql:typeof t=="string"?t:t.sql}Pr.getDbStatement=XLe;function zLe(t){let e=typeof t=="object"?t.sql:t,r=e?.indexOf(" ");return typeof r=="number"&&r!==-1?e?.substring(0,r):e}Pr.getSpanName=zLe;var QLe=t=>{let e=!1;return(...r)=>{if(!e)return e=!0,t(...r)}};Pr.once=QLe;function JLe(t){let e=t.prototype,r=Object.getPrototypeOf(e);return typeof r?.query=="function"&&typeof r?.execute=="function"?r:e}Pr.getConnectionPrototypeToInstrument=JLe});var Q4=E(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.PACKAGE_NAME=ka.PACKAGE_VERSION=void 0;ka.PACKAGE_VERSION="0.45.2";ka.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var t5=E(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.MySQL2Instrumentation=void 0;var J4=(M(),P(U)),ei=ee(),wR=(ue(),P(He)),Z4=xR(),Fa=z4(),e5=Q4(),UR=[">=1.4.2 <4"],ff=class t extends ei.InstrumentationBase{constructor(e={}){super(e5.PACKAGE_NAME,e5.PACKAGE_VERSION,e)}init(){let e;function r(s){!e&&s.format&&(e=s.format)}let n=s=>{(0,ei.isWrapped)(s.query)&&this._unwrap(s,"query"),this._wrap(s,"query",this._patchQuery(e,!1)),(0,ei.isWrapped)(s.execute)&&this._unwrap(s,"execute"),this._wrap(s,"execute",this._patchQuery(e,!0))},o=s=>{this._unwrap(s,"query"),this._unwrap(s,"execute")};return[new ei.InstrumentationNodeModuleDefinition("mysql2",UR,s=>(r(s),s),()=>{},[new ei.InstrumentationNodeModuleFile("mysql2/promise.js",UR,s=>(r(s),s),()=>{}),new ei.InstrumentationNodeModuleFile("mysql2/lib/connection.js",UR,s=>{let i=(0,Fa.getConnectionPrototypeToInstrument)(s);return n(i),s},s=>{if(s===void 0)return;let i=(0,Fa.getConnectionPrototypeToInstrument)(s);o(i)})])]}_patchQuery(e,r){return n=>{let o=this;return function(s,i,a){let c;Array.isArray(i)?c=i:arguments[2]&&(c=[i]);let u=o.tracer.startSpan((0,Fa.getSpanName)(s),{kind:J4.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Fa.getConnectionAttributes)(this.config)),{[wR.SEMATTRS_DB_STATEMENT]:(0,Fa.getDbStatement)(s,e,c)})});!r&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=s=typeof s=="string"?(0,Z4.addSqlCommenterComment)(u,s):Object.assign(s,{sql:(0,Z4.addSqlCommenterComment)(u,s.sql)}));let l=(0,Fa.once)((p,_)=>{if(p)u.setStatus({code:J4.SpanStatusCode.ERROR,message:p.message});else{let{responseHook:d}=o.getConfig();typeof d=="function"&&(0,ei.safeExecuteInTheMiddle)(()=>{d(u,{queryResults:_})},S=>{S&&o._diag.warn("Failed executing responseHook",S)},!0)}u.end()});if(arguments.length===1){typeof s.onResult=="function"&&o._wrap(s,"onResult",o._patchCallbackQuery(l));let p=n.apply(this,arguments);return p.once("error",_=>{l(_)}).once("result",_=>{l(void 0,_)}),p}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(l)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(l)),n.apply(this,arguments)}}}_patchCallbackQuery(e){return r=>function(n,o,s){return e(n,o),r(...arguments)}}};Sf.MySQL2Instrumentation=ff;ff.COMMON_ATTRIBUTES={[wR.SEMATTRS_DB_SYSTEM]:wR.DBSYSTEMVALUES_MYSQL}});var n5=E(r5=>{"use strict";Object.defineProperty(r5,"__esModule",{value:!0})});var s5=E(Xo=>{"use strict";var ZLe=Xo&&Xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o5=Xo&&Xo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZLe(e,t,r)};Object.defineProperty(Xo,"__esModule",{value:!0});o5(t5(),Xo);o5(n5(),Xo)});var l5=E(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.endSpan=void 0;var tDe=(M(),P(U)),rDe=(t,e)=>{e&&(t.recordException(e),t.setStatus({code:tDe.SpanStatusCode.ERROR,message:e.message})),t.end()};Tf.endSpan=rDe});var VR=E(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.defaultDbStatementSerializer=void 0;var nDe=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],oDe=(t,e)=>{var r,n;if(Array.isArray(e)&&e.length){let o=(n=(r=nDe.find(({regex:i})=>i.test(t)))===null||r===void 0?void 0:r.args)!==null&&n!==void 0?n:0,s=o>=0?e.slice(0,o):e;return e.length>s.length&&s.push(`[${e.length-o} other arguments]`),`${t} ${s.join(" ")}`}return t};mf.defaultDbStatementSerializer=oDe});var p5=E(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.PACKAGE_NAME=qa.PACKAGE_VERSION=void 0;qa.PACKAGE_VERSION="0.47.1";qa.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var f5=E(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.IORedisInstrumentation=void 0;var zo=(M(),P(U)),hf=ee(),Cr=(ue(),P(He)),_5=ee(),el=l5(),sDe=VR(),d5=p5(),E5={requireParentSpan:!0},BR=class extends hf.InstrumentationBase{constructor(e={}){super(d5.PACKAGE_NAME,d5.PACKAGE_VERSION,Object.assign(Object.assign({},E5),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},E5),e))}init(){return[new hf.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(e,r)=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,hf.isWrapped)(n.prototype.sendCommand)&&this._unwrap(n.prototype,"sendCommand"),this._wrap(n.prototype,"sendCommand",this._patchSendCommand(r)),(0,hf.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"connect",this._patchConnection()),e},e=>{if(e===void 0)return;let r=e[Symbol.toStringTag]==="Module"?e.default:e;this._unwrap(r.prototype,"sendCommand"),this._unwrap(r.prototype,"connect")})]}_patchSendCommand(e){return r=>this._traceSendCommand(r,e)}_patchConnection(){return e=>this._traceConnection(e)}_traceSendCommand(e,r){let n=this;return function(o){if(arguments.length<1||typeof o!="object")return e.apply(this,arguments);let s=n.getConfig(),i=s.dbStatementSerializer||sDe.defaultDbStatementSerializer,a=zo.trace.getSpan(zo.context.active())===void 0;if(s.requireParentSpan===!0&&a)return e.apply(this,arguments);let c=n.tracer.startSpan(o.name,{kind:zo.SpanKind.CLIENT,attributes:{[Cr.SEMATTRS_DB_SYSTEM]:Cr.DBSYSTEMVALUES_REDIS,[Cr.SEMATTRS_DB_STATEMENT]:i(o.name,o.args)}}),{requestHook:u}=s;u&&(0,_5.safeExecuteInTheMiddle)(()=>u(c,{moduleVersion:r,cmdName:o.name,cmdArgs:o.args}),_=>{_&&zo.diag.error("ioredis instrumentation: request hook failed",_)},!0);let{host:l,port:p}=this.options;c.setAttributes({[Cr.SEMATTRS_NET_PEER_NAME]:l,[Cr.SEMATTRS_NET_PEER_PORT]:p,[Cr.SEMATTRS_DB_CONNECTION_STRING]:`redis://${l}:${p}`});try{let _=e.apply(this,arguments),d=o.resolve;o.resolve=function(f){(0,_5.safeExecuteInTheMiddle)(()=>{var T;return(T=s.responseHook)===null||T===void 0?void 0:T.call(s,c,o.name,o.args,f)},T=>{T&&zo.diag.error("ioredis instrumentation: response hook failed",T)},!0),(0,el.endSpan)(c,null),d(f)};let S=o.reject;return o.reject=function(f){(0,el.endSpan)(c,f),S(f)},_}catch(_){throw(0,el.endSpan)(c,_),_}}}_traceConnection(e){let r=this;return function(){let n=zo.trace.getSpan(zo.context.active())===void 0;if(r.getConfig().requireParentSpan===!0&&n)return e.apply(this,arguments);let o=r.tracer.startSpan("connect",{kind:zo.SpanKind.CLIENT,attributes:{[Cr.SEMATTRS_DB_SYSTEM]:Cr.DBSYSTEMVALUES_REDIS,[Cr.SEMATTRS_DB_STATEMENT]:"connect"}}),{host:s,port:i}=this.options;o.setAttributes({[Cr.SEMATTRS_NET_PEER_NAME]:s,[Cr.SEMATTRS_NET_PEER_PORT]:i,[Cr.SEMATTRS_DB_CONNECTION_STRING]:`redis://${s}:${i}`});try{let a=e.apply(this,arguments);return(0,el.endSpan)(o,null),a}catch(a){throw(0,el.endSpan)(o,a),a}}}};gf.IORedisInstrumentation=BR});var T5=E(S5=>{"use strict";Object.defineProperty(S5,"__esModule",{value:!0})});var h5=E(Qo=>{"use strict";var iDe=Qo&&Qo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),m5=Qo&&Qo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iDe(e,t,r)};Object.defineProperty(Qo,"__esModule",{value:!0});m5(f5(),Qo);m5(T5(),Qo)});var g5=E(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.getClientAttributes=void 0;var tl=(ue(),P(He));function aDe(t,e){var r,n;return{[tl.SEMATTRS_DB_SYSTEM]:tl.DBSYSTEMVALUES_REDIS,[tl.SEMATTRS_NET_PEER_NAME]:(r=e?.socket)===null||r===void 0?void 0:r.host,[tl.SEMATTRS_NET_PEER_PORT]:(n=e?.socket)===null||n===void 0?void 0:n.port,[tl.SEMATTRS_DB_CONNECTION_STRING]:cDe(t,e?.url)}}Af.getClientAttributes=aDe;function cDe(t,e){if(!(typeof e!="string"||!e))try{let r=new URL(e);return r.searchParams.delete("user_pwd"),r.username="",r.password="",r.href}catch(r){t.error("failed to sanitize redis connection url",r)}}});var A5=E(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.PACKAGE_NAME=ja.PACKAGE_VERSION=void 0;ja.PACKAGE_VERSION="0.46.1";ja.PACKAGE_NAME="@opentelemetry/instrumentation-redis-4"});var P5=E(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.RedisInstrumentation=void 0;var yr=(M(),P(U)),at=ee(),R5=g5(),uDe=VR(),O5=A5(),lDe=(ue(),P(He)),rl=Symbol("opentelemetry.instrumentation.redis.open_spans"),N5=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),I5={requireParentSpan:!1},Rf=class t extends at.InstrumentationBase{constructor(e={}){super(O5.PACKAGE_NAME,O5.PACKAGE_VERSION,Object.assign(Object.assign({},I5),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},I5),e))}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(e){let r=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/commander.js`,["^1.0.0"],(s,i)=>{let a=s.transformCommandArguments;if(!a)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),s;let c=i?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,at.isWrapped)(s?.[c])&&this._unwrap(s,c),this._wrap(s,c,this._getPatchExtendWithCommands(a)),s},s=>{(0,at.isWrapped)(s?.extendWithCommands)&&this._unwrap(s,"extendWithCommands"),(0,at.isWrapped)(s?.attachCommands)&&this._unwrap(s,"attachCommands")}),n=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/client/multi-command.js`,["^1.0.0"],s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;return(0,at.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec()),(0,at.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),s},s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;(0,at.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,at.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/client/index.js`,["^1.0.0"],s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;return a?.multi&&((0,at.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,at.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,at.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),s},s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;(0,at.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,at.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,at.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new at.InstrumentationNodeModuleDefinition(e,["^1.0.0"],s=>s,()=>{},[r,n,o])}_getPatchExtendWithCommands(e){let r=this;return function(o){return function(i){var a;if(((a=i?.BaseClass)===null||a===void 0?void 0:a.name)!=="RedisClient")return o.apply(this,arguments);let c=i.executor;return i.executor=function(u,l){let p=e(u,l).args;return r._traceClientCommand(c,this,arguments,p)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(){let e=this;return function(n){return function(){let s=n.apply(this,arguments);return typeof s?.then!="function"?(e._diag.error("got non promise result when patching RedisClientMultiCommand.exec"),s):s.then(i=>{let a=this[rl];return e._endSpansWithRedisReplies(a,i),i}).catch(i=>{let a=this[rl];if(!a)e._diag.error("cannot find open spans to end for redis multi command");else{let c=i.constructor.name==="MultiErrorReply"?i.replies:new Array(a.length).fill(i);e._endSpansWithRedisReplies(a,c)}return Promise.reject(i)})}}}_getPatchMultiCommandsAddCommand(){let e=this;return function(n){return function(s){return e._traceClientCommand(n,this,arguments,s)}}}_getPatchRedisClientMulti(){return function(r){return function(){let o=r.apply(this,arguments);return o[N5]=this.options,o}}}_getPatchRedisClientSendCommand(){let e=this;return function(n){return function(s){return e._traceClientCommand(n,this,arguments,s)}}}_getPatchedClientConnect(){let e=this;return function(n){return function(){let s=this.options,i=(0,R5.getClientAttributes)(e._diag,s),a=e.tracer.startSpan(`${t.COMPONENT}-connect`,{kind:yr.SpanKind.CLIENT,attributes:i});return yr.context.with(yr.trace.setSpan(yr.context.active(),a),()=>n.apply(this)).then(u=>(a.end(),u)).catch(u=>(a.recordException(u),a.setStatus({code:yr.SpanStatusCode.ERROR,message:u.message}),a.end(),Promise.reject(u)))}}}_traceClientCommand(e,r,n,o){if(yr.trace.getSpan(yr.context.active())===void 0&&this.getConfig().requireParentSpan)return e.apply(r,n);let i=r.options||r[N5],a=o[0],c=o.slice(1),u=this.getConfig().dbStatementSerializer||uDe.defaultDbStatementSerializer,l=(0,R5.getClientAttributes)(this._diag,i);try{let d=u(a,c);d!=null&&(l[lDe.SEMATTRS_DB_STATEMENT]=d)}catch(d){this._diag.error("dbStatementSerializer throw an exception",d,{commandName:a})}let p=this.tracer.startSpan(`${t.COMPONENT}-${a}`,{kind:yr.SpanKind.CLIENT,attributes:l}),_=yr.context.with(yr.trace.setSpan(yr.context.active(),p),()=>e.apply(r,n));if(typeof _?.then=="function")_.then(d=>{this._endSpanWithResponse(p,a,c,d,void 0)},d=>{this._endSpanWithResponse(p,a,c,null,d)});else{let d=_;d[rl]=d[rl]||[],d[rl].push({span:p,commandName:a,commandArgs:c})}return _}_endSpansWithRedisReplies(e,r){if(!e)return this._diag.error("cannot find open spans to end for redis multi command");if(r.length!==e.length)return this._diag.error("number of multi command spans does not match response from redis");for(let n=0;n<e.length;n++){let{span:o,commandName:s,commandArgs:i}=e[n],a=r[n],[c,u]=a instanceof Error?[null,a]:[a,void 0];this._endSpanWithResponse(o,s,i,c,u)}}_endSpanWithResponse(e,r,n,o,s){let{responseHook:i}=this.getConfig();if(!s&&i)try{i(e,r,n,o)}catch(a){this._diag.error("responseHook throw an exception",a)}s&&(e.recordException(s),e.setStatus({code:yr.SpanStatusCode.ERROR,message:s?.message})),e.end()}};Of.RedisInstrumentation=Rf;Rf.COMPONENT="redis"});var y5=E(C5=>{"use strict";Object.defineProperty(C5,"__esModule",{value:!0})});var v5=E(Jo=>{"use strict";var pDe=Jo&&Jo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M5=Jo&&Jo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pDe(e,t,r)};Object.defineProperty(Jo,"__esModule",{value:!0});M5(P5(),Jo);M5(y5(),Jo)});var k5=E(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.EVENT_LISTENERS_SET=void 0;Nf.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var FR=E(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.AttributeNames=void 0;var mDe;(function(t){t.PG_VALUES="db.postgresql.values",t.PG_PLAN="db.postgresql.plan",t.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",t.MAX_CLIENT="db.postgresql.max.client"})(mDe=ol.AttributeNames||(ol.AttributeNames={}))});var qR=E(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.METRIC_DB_CLIENT_OPERATION_DURATION=qe.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=qe.METRIC_DB_CLIENT_CONNECTION_COUNT=qe.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=qe.DB_CLIENT_CONNECTION_STATE_VALUE_USED=qe.ATTR_DB_OPERATION_NAME=qe.ATTR_DB_NAMESPACE=qe.ATTR_DB_CLIENT_CONNECTION_STATE=qe.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;qe.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";qe.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";qe.ATTR_DB_NAMESPACE="db.namespace";qe.ATTR_DB_OPERATION_NAME="db.operation.name";qe.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";qe.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";qe.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";qe.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests";qe.METRIC_DB_CLIENT_OPERATION_DURATION="db.client.operation.duration"});var jR=E(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.SpanNames=void 0;var hDe;(function(t){t.QUERY_PREFIX="pg.query",t.CONNECT="pg.connect",t.POOL_CONNECT="pg-pool.connect"})(hDe=sl.SpanNames||(sl.SpanNames={}))});var W5=E(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.isObjectWithTextString=se.getErrorMessage=se.patchClientConnectCallback=se.patchCallbackPGPool=se.updateCounter=se.getPoolName=se.patchCallback=se.handleExecutionResult=se.handleConfigQuery=se.shouldSkipInstrumentation=se.getSemanticAttributesFromPool=se.getSemanticAttributesFromConnection=se.getConnectionString=se.parseNormalizedOperationName=se.getQuerySpanName=void 0;var Zo=(M(),P(U)),If=FR(),Pt=(ue(),P(He)),ti=qR(),gDe=ee(),F5=jR();function q5(t,e){if(!e)return F5.SpanNames.QUERY_PREFIX;let r=typeof e.name=="string"&&e.name?e.name:j5(e.text);return`${F5.SpanNames.QUERY_PREFIX}:${r}${t?` ${t}`:""}`}se.getQuerySpanName=q5;function j5(t){let e=t.indexOf(" "),r=e===-1?t:t.slice(0,e);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}se.parseNormalizedOperationName=j5;function YR(t){let e=t.host||"localhost",r=t.port||5432,n=t.database||"";return`postgresql://${e}:${r}/${n}`}se.getConnectionString=YR;function Y5(t){if(Number.isInteger(t))return t}function $5(t){return{[Pt.SEMATTRS_DB_SYSTEM]:Pt.DBSYSTEMVALUES_POSTGRESQL,[Pt.SEMATTRS_DB_NAME]:t.database,[Pt.SEMATTRS_DB_CONNECTION_STRING]:YR(t),[Pt.SEMATTRS_NET_PEER_NAME]:t.host,[Pt.SEMATTRS_NET_PEER_PORT]:Y5(t.port),[Pt.SEMATTRS_DB_USER]:t.user}}se.getSemanticAttributesFromConnection=$5;function ADe(t){return{[Pt.SEMATTRS_DB_SYSTEM]:Pt.DBSYSTEMVALUES_POSTGRESQL,[Pt.SEMATTRS_DB_NAME]:t.database,[Pt.SEMATTRS_DB_CONNECTION_STRING]:YR(t),[Pt.SEMATTRS_NET_PEER_NAME]:t.host,[Pt.SEMATTRS_NET_PEER_PORT]:Y5(t.port),[Pt.SEMATTRS_DB_USER]:t.user,[If.AttributeNames.IDLE_TIMEOUT_MILLIS]:t.idleTimeoutMillis,[If.AttributeNames.MAX_CLIENT]:t.maxClient}}se.getSemanticAttributesFromPool=ADe;function RDe(t){return t.requireParentSpan===!0&&Zo.trace.getSpan(Zo.context.active())===void 0}se.shouldSkipInstrumentation=RDe;function ODe(t,e,r){let{connectionParameters:n}=this,o=n.database,s=q5(o,r),i=t.startSpan(s,{kind:Zo.SpanKind.CLIENT,attributes:$5(n)});if(!r)return i;if(r.text&&i.setAttribute(Pt.SEMATTRS_DB_STATEMENT,r.text),e.enhancedDatabaseReporting&&Array.isArray(r.values))try{let a=r.values.map(c=>c==null?"null":c instanceof Buffer?c.toString():typeof c=="object"?typeof c.toPostgres=="function"?c.toPostgres():JSON.stringify(c):c.toString());i.setAttribute(If.AttributeNames.PG_VALUES,a)}catch(a){Zo.diag.error("failed to stringify ",r.values,a)}return typeof r.name=="string"&&i.setAttribute(If.AttributeNames.PG_PLAN,r.name),i}se.handleConfigQuery=ODe;function K5(t,e,r){typeof t.responseHook=="function"&&(0,gDe.safeExecuteInTheMiddle)(()=>{t.responseHook(e,{data:r})},n=>{n&&Zo.diag.error("Error running response hook",n)},!0)}se.handleExecutionResult=K5;function NDe(t,e,r,n,o){return function(i,a){i?(Object.prototype.hasOwnProperty.call(i,"code")&&(n[Pt.ATTR_ERROR_TYPE]=i.code),e.setStatus({code:Zo.SpanStatusCode.ERROR,message:i.message})):K5(t,e,a),o(),e.end(),r.call(this,i,a)}}se.patchCallback=NDe;function IDe(t){let e="";return e+=(t?.host?`${t.host}`:"unknown_host")+":",e+=(t?.port?`${t.port}`:"unknown_port")+"/",e+=t?.database?`${t.database}`:"unknown_database",e.trim()}se.getPoolName=IDe;function PDe(t,e,r,n,o){let s=e.totalCount,i=e.waitingCount,a=e.idleCount,c=s-a;return r.add(c-o.used,{[ti.ATTR_DB_CLIENT_CONNECTION_STATE]:ti.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),r.add(a-o.idle,{[ti.ATTR_DB_CLIENT_CONNECTION_STATE]:ti.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),n.add(i-o.pending,{[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),{used:c,idle:a,pending:i}}se.updateCounter=PDe;function CDe(t,e){return function(n,o,s){n&&t.setStatus({code:Zo.SpanStatusCode.ERROR,message:n.message}),t.end(),e.call(this,n,o,s)}}se.patchCallbackPGPool=CDe;function yDe(t,e){return function(n){n&&t.setStatus({code:Zo.SpanStatusCode.ERROR,message:n.message}),t.end(),e.apply(this,arguments)}}se.patchClientConnectCallback=yDe;function MDe(t){return typeof t=="object"&&t!==null&&"message"in t?String(t.message):void 0}se.getErrorMessage=MDe;function vDe(t){var e;return typeof t=="object"&&typeof((e=t)===null||e===void 0?void 0:e.text)=="string"}se.isObjectWithTextString=vDe});var X5=E(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.PACKAGE_NAME=Ya.PACKAGE_VERSION=void 0;Ya.PACKAGE_VERSION="0.51.1";Ya.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var tX=E(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.PgInstrumentation=void 0;var Mr=ee(),le=(M(),P(U)),z5=k5(),je=W5(),Q5=xR(),J5=X5(),Z5=jR(),Pf=re(),es=(ue(),P(He)),ri=qR();function Cf(t){return t[Symbol.toStringTag]==="Module"?t.default:t}var $R=class extends Mr.InstrumentationBase{constructor(e={}){super(J5.PACKAGE_NAME,J5.PACKAGE_VERSION,e),this._connectionsCounter={used:0,idle:0,pending:0}}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(ri.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:le.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(ri.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(ri.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let e=[">=8.0.3 <9"],r=new Mr.InstrumentationNodeModuleFile("pg/lib/native/client.js",e,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),n=new Mr.InstrumentationNodeModuleFile("pg/lib/client.js",e,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Mr.InstrumentationNodeModuleDefinition("pg",e,i=>{let a=Cf(i);return this._patchPgClient(a.Client),i},i=>{let a=Cf(i);return this._unpatchPgClient(a.Client),i},[n,r]),s=new Mr.InstrumentationNodeModuleDefinition("pg-pool",[">=2.0.0 <4"],i=>((0,Mr.isWrapped)(i.prototype.connect)&&this._unwrap(i.prototype,"connect"),this._wrap(i.prototype,"connect",this._getPoolConnectPatch()),i),i=>{(0,Mr.isWrapped)(i.prototype.connect)&&this._unwrap(i.prototype,"connect")});return[o,s]}_patchPgClient(e){if(!e)return;let r=Cf(e);return(0,Mr.isWrapped)(r.prototype.query)&&this._unwrap(r.prototype,"query"),(0,Mr.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"query",this._getClientQueryPatch()),this._wrap(r.prototype,"connect",this._getClientConnectPatch()),e}_unpatchPgClient(e){let r=Cf(e);return(0,Mr.isWrapped)(r.prototype.query)&&this._unwrap(r.prototype,"query"),(0,Mr.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),e}_getClientConnectPatch(){let e=this;return r=>function(o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.call(this,o);let s=e.tracer.startSpan(Z5.SpanNames.CONNECT,{kind:le.SpanKind.CLIENT,attributes:je.getSemanticAttributesFromConnection(this)});if(o){let a=le.trace.getSpan(le.context.active());o=je.patchClientConnectCallback(s,o),a&&(o=le.context.bind(le.context.active(),o))}let i=le.context.with(le.trace.setSpan(le.context.active(),s),()=>r.call(this,o));return eX(s,i)}}recordOperationDuration(e,r){let n={};[es.SEMATTRS_DB_SYSTEM,ri.ATTR_DB_NAMESPACE,es.ATTR_ERROR_TYPE,es.ATTR_SERVER_PORT,es.ATTR_SERVER_ADDRESS,ri.ATTR_DB_OPERATION_NAME].forEach(i=>{i in e&&(n[i]=e[i])});let s=(0,Pf.hrTimeToMilliseconds)((0,Pf.hrTimeDuration)(r,(0,Pf.hrTime)()))/1e3;this._operationDuration.record(s,n)}_getClientQueryPatch(){let e=this;return r=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.apply(this,o);let s=(0,Pf.hrTime)(),i=o[0],a=typeof i=="string",c=je.isObjectWithTextString(i),u=a?{text:i,values:Array.isArray(o[1])?o[1]:void 0}:c?i:void 0,l={[es.SEMATTRS_DB_SYSTEM]:es.DBSYSTEMVALUES_POSTGRESQL,[ri.ATTR_DB_NAMESPACE]:this.database,[es.ATTR_SERVER_PORT]:this.connectionParameters.port,[es.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};u?.text&&(l[ri.ATTR_DB_OPERATION_NAME]=je.parseNormalizedOperationName(u?.text));let p=()=>{e.recordOperationDuration(l,s)},_=e.getConfig(),d=je.handleConfigQuery.call(this,e.tracer,_,u);if(_.addSqlCommenterCommentToQueries&&(a?o[0]=(0,Q5.addSqlCommenterComment)(d,i):c&&!("name"in i)&&(o[0]=Object.assign(Object.assign({},i),{text:(0,Q5.addSqlCommenterComment)(d,i.text)}))),o.length>0){let T=le.trace.getSpan(le.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=je.patchCallback(_,d,o[o.length-1],l,p),T&&(o[o.length-1]=le.context.bind(le.context.active(),o[o.length-1]));else if(typeof u?.callback=="function"){let h=je.patchCallback(e.getConfig(),d,u.callback,l,p);T&&(h=le.context.bind(le.context.active(),h)),o[0].callback=h}}let{requestHook:S}=_;typeof S=="function"&&u&&(0,Mr.safeExecuteInTheMiddle)(()=>{let{database:T,host:h,port:A,user:N}=this.connectionParameters;S(d,{connection:{database:T,host:h,port:A,user:N},query:{text:u.text,values:u.values,name:u.name}})},T=>{T&&e._diag.error("Error running query hook",T)},!0);let f;try{f=r.apply(this,o)}catch(T){throw d.setStatus({code:le.SpanStatusCode.ERROR,message:je.getErrorMessage(T)}),d.end(),T}return f instanceof Promise?f.then(T=>new Promise(h=>{je.handleExecutionResult(e.getConfig(),d,T),p(),d.end(),h(T)})).catch(T=>new Promise((h,A)=>{d.setStatus({code:le.SpanStatusCode.ERROR,message:T.message}),p(),d.end(),A(T)})):f})}_setPoolConnectEventListeners(e){if(e[z5.EVENT_LISTENERS_SET])return;let r=je.getPoolName(e.options);e.on("connect",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("acquire",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("remove",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("release",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e[z5.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let e=this;return r=>function(o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.call(this,o);let s=e.tracer.startSpan(Z5.SpanNames.POOL_CONNECT,{kind:le.SpanKind.CLIENT,attributes:je.getSemanticAttributesFromPool(this.options)});if(e._setPoolConnectEventListeners(this),o){let a=le.trace.getSpan(le.context.active());o=je.patchCallbackPGPool(s,o),a&&(o=le.context.bind(le.context.active(),o))}let i=le.context.with(le.trace.setSpan(le.context.active(),s),()=>r.call(this,o));return eX(s,i)}}};yf.PgInstrumentation=$R;function eX(t,e){if(!(e instanceof Promise))return e;let r=e;return le.context.bind(le.context.active(),r.then(n=>(t.end(),n)).catch(n=>(t.setStatus({code:le.SpanStatusCode.ERROR,message:je.getErrorMessage(n)}),t.end(),Promise.reject(n))))}});var nX=E(rX=>{"use strict";Object.defineProperty(rX,"__esModule",{value:!0})});var oX=E(eo=>{"use strict";var bDe=eo&&eo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),KR=eo&&eo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bDe(e,t,r)};Object.defineProperty(eo,"__esModule",{value:!0});KR(tX(),eo);KR(nX(),eo);KR(FR(),eo)});var AX=E($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.PACKAGE_NAME=$a.PACKAGE_VERSION=void 0;$a.PACKAGE_VERSION="0.45.2";$a.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var ZR=E(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.HapiLifecycleMethodNames=In.HapiLayerType=In.handlerPatched=In.HapiComponentName=void 0;In.HapiComponentName="@hapi/hapi";In.handlerPatched=Symbol("hapi-handler-patched");In.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};In.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var eO=E(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.AttributeNames=void 0;var jDe;(function(t){t.HAPI_TYPE="hapi.type",t.PLUGIN_NAME="hapi.plugin.name",t.EXT_TYPE="server.ext.type"})(jDe=il.AttributeNames||(il.AttributeNames={}))});var RX=E(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getPluginFromInput=Ye.getExtMetadata=Ye.getRouteMetadata=Ye.isPatchableExtMethod=Ye.isDirectExtInput=Ye.isLifecycleExtEventObj=Ye.isLifecycleExtType=Ye.getPluginName=void 0;var vf=(ue(),P(He)),al=ZR(),ts=eO();function YDe(t){return t.name?t.name:t.pkg.name}Ye.getPluginName=YDe;var $De=t=>typeof t=="string"&&al.HapiLifecycleMethodNames.has(t);Ye.isLifecycleExtType=$De;var KDe=t=>{var e;let r=(e=t)===null||e===void 0?void 0:e.type;return r!==void 0&&(0,Ye.isLifecycleExtType)(r)};Ye.isLifecycleExtEventObj=KDe;var WDe=t=>Array.isArray(t)&&t.length<=3&&(0,Ye.isLifecycleExtType)(t[0])&&typeof t[1]=="function";Ye.isDirectExtInput=WDe;var XDe=t=>!Array.isArray(t);Ye.isPatchableExtMethod=XDe;var zDe=(t,e)=>e?{attributes:{[vf.SEMATTRS_HTTP_ROUTE]:t.path,[vf.SEMATTRS_HTTP_METHOD]:t.method,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.PLUGIN,[ts.AttributeNames.PLUGIN_NAME]:e},name:`${e}: route - ${t.path}`}:{attributes:{[vf.SEMATTRS_HTTP_ROUTE]:t.path,[vf.SEMATTRS_HTTP_METHOD]:t.method,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.ROUTER},name:`route - ${t.path}`};Ye.getRouteMetadata=zDe;var QDe=(t,e)=>e?{attributes:{[ts.AttributeNames.EXT_TYPE]:t,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.EXT,[ts.AttributeNames.PLUGIN_NAME]:e},name:`${e}: ext - ${t}`}:{attributes:{[ts.AttributeNames.EXT_TYPE]:t,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.EXT},name:`ext - ${t}`};Ye.getExtMetadata=QDe;var JDe=t=>"plugin"in t?"plugin"in t.plugin?t.plugin.plugin:t.plugin:t;Ye.getPluginFromInput=JDe});var IX=E(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.HapiInstrumentation=void 0;var ar=(M(),P(U)),OX=re(),bf=ee(),NX=AX(),cl=ZR(),ro=RX(),tO=class extends bf.InstrumentationBase{constructor(e={}){super(NX.PACKAGE_NAME,NX.PACKAGE_VERSION,e)}init(){return new bf.InstrumentationNodeModuleDefinition(cl.HapiComponentName,[">=17.0.0 <22"],e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,bf.isWrapped)(r.server)||this._wrap(r,"server",this._getServerPatch.bind(this)),(0,bf.isWrapped)(r.Server)||this._wrap(r,"Server",this._getServerPatch.bind(this)),r},e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;this._massUnwrap([r],["server","Server"])})}_getServerPatch(e){let r=this,n=this;return function(s){let i=e.apply(this,[s]);return n._wrap(i,"route",a=>r._getServerRoutePatch.bind(r)(a)),n._wrap(i,"ext",a=>r._getServerExtPatch.bind(r)(a)),n._wrap(i,"register",r._getServerRegisterPatch.bind(r)),i}}_getServerRegisterPatch(e){let r=this;return function(o,s){if(Array.isArray(o))for(let i of o){let a=(0,ro.getPluginFromInput)(i);r._wrapRegisterHandler(a)}else{let i=(0,ro.getPluginFromInput)(o);r._wrapRegisterHandler(i)}return e.apply(this,[o,s])}}_getServerExtPatch(e,r){let n=this;return function(...s){if(Array.isArray(s[0])){let i=s[0];for(let a=0;a<i.length;a++){let c=i[a];if((0,ro.isLifecycleExtType)(c.type)){let u=c,l=n._wrapExtMethods(u.method,c.type,r);u.method=l,i[a]=u}}return e.apply(this,s)}else if((0,ro.isDirectExtInput)(s)){let i=s,a=i[1],c=n._wrapExtMethods(a,i[0],r);return e.apply(this,[i[0],c,i[2]])}else if((0,ro.isLifecycleExtEventObj)(s[0])){let i=s[0],a=n._wrapExtMethods(i.method,i.type,r);return i.method=a,e.call(this,i)}return e.apply(this,s)}}_getServerRoutePatch(e,r){let n=this;return function(o){if(Array.isArray(o))for(let s=0;s<o.length;s++){let i=n._wrapRouteHandler.call(n,o[s],r);o[s]=i}else o=n._wrapRouteHandler.call(n,o,r);return e.apply(this,[o])}}_wrapRegisterHandler(e){let r=this,n=(0,ro.getPluginName)(e),o=e.register,s=this,i=function(a,c){return s._wrap(a,"route",u=>r._getServerRoutePatch.bind(r)(u,n)),s._wrap(a,"ext",u=>r._getServerExtPatch.bind(r)(u,n)),o.call(this,a,c)};e.register=i}_wrapExtMethods(e,r,n){let o=this;if(e instanceof Array){for(let s=0;s<e.length;s++)e[s]=o._wrapExtMethods(e[s],r);return e}else if((0,ro.isPatchableExtMethod)(e))return e[cl.handlerPatched]===!0?e:(e[cl.handlerPatched]=!0,async function(...i){if(ar.trace.getSpan(ar.context.active())===void 0)return await e.apply(this,i);let a=(0,ro.getExtMetadata)(r,n),c=o.tracer.startSpan(a.name,{attributes:a.attributes});try{return await ar.context.with(ar.trace.setSpan(ar.context.active(),c),e,void 0,...i)}catch(u){throw c.recordException(u),c.setStatus({code:ar.SpanStatusCode.ERROR,message:u.message}),u}finally{c.end()}});return e}_wrapRouteHandler(e,r){var n;let o=this;if(e[cl.handlerPatched]===!0)return e;e[cl.handlerPatched]=!0;let s=i=>async function(...a){if(ar.trace.getSpan(ar.context.active())===void 0)return await i.call(this,...a);let c=(0,OX.getRPCMetadata)(ar.context.active());c?.type===OX.RPCType.HTTP&&(c.route=e.path);let u=(0,ro.getRouteMetadata)(e,r),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await ar.context.with(ar.trace.setSpan(ar.context.active(),l),()=>i.call(this,...a))}catch(p){throw l.recordException(p),l.setStatus({code:ar.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}};if(typeof e.handler=="function")e.handler=s(e.handler);else if(typeof e.options=="function"){let i=e.options;e.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=s(c.handler)),c}}else typeof((n=e.options)===null||n===void 0?void 0:n.handler)=="function"&&(e.options.handler=s(e.options.handler));return e}};Lf.HapiInstrumentation=tO});var CX=E(rs=>{"use strict";var ZDe=rs&&rs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PX=rs&&rs.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZDe(e,t,r)};Object.defineProperty(rs,"__esModule",{value:!0});PX(IX(),rs);PX(eO(),rs)});var Df=E(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.KoaLayerType=void 0;var txe;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware"})(txe=ul.KoaLayerType||(ul.KoaLayerType={}))});var LX=E(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.PACKAGE_NAME=Ka.PACKAGE_VERSION=void 0;Ka.PACKAGE_VERSION="0.47.1";Ka.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var rO=E(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.AttributeNames=void 0;var rxe;(function(t){t.KOA_TYPE="koa.type",t.KOA_NAME="koa.name"})(rxe=ll.AttributeNames||(ll.AttributeNames={}))});var xX=E(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.isLayerIgnored=Wa.getMiddlewareMetadata=void 0;var DX=Df(),xf=rO(),nxe=(ue(),P(He)),oxe=(t,e,r,n)=>{var o;return r?{attributes:{[xf.AttributeNames.KOA_NAME]:n?.toString(),[xf.AttributeNames.KOA_TYPE]:DX.KoaLayerType.ROUTER,[nxe.SEMATTRS_HTTP_ROUTE]:n?.toString()},name:t._matchedRouteName||`router - ${n}`}:{attributes:{[xf.AttributeNames.KOA_NAME]:(o=e.name)!==null&&o!==void 0?o:"middleware",[xf.AttributeNames.KOA_TYPE]:DX.KoaLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};Wa.getMiddlewareMetadata=oxe;var sxe=(t,e)=>{var r;return!!(Array.isArray(e?.ignoreLayersType)&&(!((r=e?.ignoreLayersType)===null||r===void 0)&&r.includes(t)))};Wa.isLayerIgnored=sxe});var UX=E(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.kLayerPatched=void 0;Uf.kLayerPatched=Symbol("koa-layer-patched")});var kX=E(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.KoaInstrumentation=void 0;var Pn=(M(),P(U)),pl=ee(),wX=Df(),VX=LX(),BX=xX(),GX=re(),HX=UX(),nO=class extends pl.InstrumentationBase{constructor(e={}){super(VX.PACKAGE_NAME,VX.PACKAGE_VERSION,e)}init(){return new pl.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <3"],e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return r==null?r:((0,pl.isWrapped)(r.prototype.use)&&this._unwrap(r.prototype,"use"),this._wrap(r.prototype,"use",this._getKoaUsePatch.bind(this)),e)},e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;(0,pl.isWrapped)(r.prototype.use)&&this._unwrap(r.prototype,"use")})}_getKoaUsePatch(e){let r=this;return function(o){let s;return o.router?s=r._patchRouterDispatch(o):s=r._patchLayer(o,!1),e.apply(this,[s])}}_patchRouterDispatch(e){var r;Pn.diag.debug("Patching @koa/router dispatch");let n=e.router,o=(r=n?.stack)!==null&&r!==void 0?r:[];for(let s of o){let i=s.path,a=s.stack;for(let c=0;c<a.length;c++){let u=a[c];a[c]=this._patchLayer(u,!0,i)}}return e}_patchLayer(e,r,n){let o=r?wX.KoaLayerType.ROUTER:wX.KoaLayerType.MIDDLEWARE;return e[HX.kLayerPatched]===!0||(0,BX.isLayerIgnored)(o,this.getConfig())?e:e.constructor.name==="GeneratorFunction"||e.constructor.name==="AsyncGeneratorFunction"?(Pn.diag.debug("ignoring generator-based Koa middleware layer"),e):(e[HX.kLayerPatched]=!0,Pn.diag.debug("patching Koa middleware layer"),async(s,i)=>{if(Pn.trace.getSpan(Pn.context.active())===void 0)return e(s,i);let c=(0,BX.getMiddlewareMetadata)(s,e,r,n),u=this.tracer.startSpan(c.name,{attributes:c.attributes}),l=(0,GX.getRPCMetadata)(Pn.context.active());l?.type===GX.RPCType.HTTP&&s._matchedRoute&&(l.route=s._matchedRoute.toString());let{requestHook:p}=this.getConfig();p&&(0,pl.safeExecuteInTheMiddle)(()=>p(u,{context:s,middlewareLayer:e,layerType:o}),d=>{d&&Pn.diag.error("koa instrumentation: request hook failed",d)},!0);let _=Pn.trace.setSpan(Pn.context.active(),u);return Pn.context.with(_,async()=>{try{return await e(s,i)}catch(d){throw u.recordException(d),d}finally{u.end()}})})}};wf.KoaInstrumentation=nO});var FX=E(no=>{"use strict";var ixe=no&&no.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oO=no&&no.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ixe(e,t,r)};Object.defineProperty(no,"__esModule",{value:!0});oO(kX(),no);oO(Df(),no);oO(rO(),no)});var sO=E(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ConnectNames=Wr.ConnectTypes=Wr.AttributeNames=void 0;var cxe;(function(t){t.CONNECT_TYPE="connect.type",t.CONNECT_NAME="connect.name"})(cxe=Wr.AttributeNames||(Wr.AttributeNames={}));var uxe;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(uxe=Wr.ConnectTypes||(Wr.ConnectTypes={}));var lxe;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(lxe=Wr.ConnectNames||(Wr.ConnectNames={}))});var KX=E(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.PACKAGE_NAME=Xa.PACKAGE_VERSION=void 0;Xa.PACKAGE_VERSION="0.43.1";Xa.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var WX=E(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf._LAYERS_STORE_PROPERTY=void 0;Vf._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var XX=E(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.generateRoute=os.replaceCurrentStackRoute=os.addNewStackLayer=void 0;var pxe=(M(),P(U)),ns=WX(),_xe=t=>{Array.isArray(t[ns._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,ns._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t[ns._LAYERS_STORE_PROPERTY].push("/");let e=t[ns._LAYERS_STORE_PROPERTY].length;return()=>{e===t[ns._LAYERS_STORE_PROPERTY].length?t[ns._LAYERS_STORE_PROPERTY].pop():pxe.diag.warn("Connect: Trying to pop the stack multiple time")}};os.addNewStackLayer=_xe;var dxe=(t,e)=>{e&&t[ns._LAYERS_STORE_PROPERTY].splice(-1,1,e)};os.replaceCurrentStackRoute=dxe;var Exe=t=>t[ns._LAYERS_STORE_PROPERTY].reduce((e,r)=>e.replace(/\/+$/,"")+r);os.generateRoute=Exe});var JX=E(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.ConnectInstrumentation=ss.ANONYMOUS_NAME=void 0;var fxe=(M(),P(U)),zX=re(),za=sO(),QX=KX(),Bf=ee(),Sxe=(ue(),P(He)),iO=XX();ss.ANONYMOUS_NAME="anonymous";var aO=class extends Bf.InstrumentationBase{constructor(e={}){super(QX.PACKAGE_NAME,QX.PACKAGE_VERSION,e)}init(){return[new Bf.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_patchApp(e){(0,Bf.isWrapped)(e.use)||this._wrap(e,"use",this._patchUse.bind(this)),(0,Bf.isWrapped)(e.handle)||this._wrap(e,"handle",this._patchHandle.bind(this))}_patchConstructor(e){let r=this;return function(...n){let o=e.apply(this,n);return r._patchApp(o),o}}_patchNext(e,r){return function(o){let s=e.apply(this,[o]);return r(),s}}_startSpan(e,r){let n,o,s;e?(n=za.ConnectTypes.REQUEST_HANDLER,s=za.ConnectNames.REQUEST_HANDLER,o=e):(n=za.ConnectTypes.MIDDLEWARE,s=za.ConnectNames.MIDDLEWARE,o=r.name||ss.ANONYMOUS_NAME);let i=`${s} - ${o}`,a={attributes:{[Sxe.SEMATTRS_HTTP_ROUTE]:e.length>0?e:"/",[za.AttributeNames.CONNECT_TYPE]:n,[za.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(i,a)}_patchMiddleware(e,r){let n=this,o=r.length===4;function s(){if(!n.isEnabled())return r.apply(this,arguments);let[i,a,c]=o?[1,2,3]:[0,1,2],u=arguments[i],l=arguments[a],p=arguments[c];(0,iO.replaceCurrentStackRoute)(u,e);let _=(0,zX.getRPCMetadata)(fxe.context.active());e&&_?.type===zX.RPCType.HTTP&&(_.route=(0,iO.generateRoute)(u));let d="";e?d=`request handler - ${e}`:d=`middleware - ${r.name||ss.ANONYMOUS_NAME}`;let S=n._startSpan(e,r);n._diag.debug("start span",d);let f=!1;function T(){f?n._diag.debug(`span ${S.name} - already finished`):(f=!0,n._diag.debug(`finishing span ${S.name}`),S.end()),l.removeListener("close",T)}return l.addListener("close",T),arguments[c]=n._patchNext(p,T),r.apply(this,arguments)}return Object.defineProperty(s,"length",{value:r.length,writable:!1,configurable:!0}),s}_patchUse(e){let r=this;return function(...n){let o=n[n.length-1],s=n[n.length-2]||"";return n[n.length-1]=r._patchMiddleware(s,o),e.apply(this,n)}}_patchHandle(e){let r=this;return function(){let[n,o]=[0,2],s=arguments[n],i=arguments[o],a=(0,iO.addNewStackLayer)(s);return typeof i=="function"&&(arguments[o]=r._patchOut(i,a)),e.apply(this,arguments)}}_patchOut(e,r){return function(...o){return r(),Reflect.apply(e,this,o)}}};ss.ConnectInstrumentation=aO});var e3=E(is=>{"use strict";var Txe=is&&is.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ZX=is&&is.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Txe(e,t,r)};Object.defineProperty(is,"__esModule",{value:!0});ZX(sO(),is);ZX(JX(),is)});var s3=E(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.once=Qa.getSpanName=void 0;function hxe(t,e,r,n){return t==="execBulkLoad"&&n&&e?`${t} ${n} ${e}`:t==="callProcedure"?e?`${t} ${r} ${e}`:`${t} ${r}`:e?`${t} ${e}`:`${t}`}Qa.getSpanName=hxe;var gxe=t=>{let e=!1;return(...r)=>{if(!e)return e=!0,t(...r)}};Qa.once=gxe});var i3=E(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.PACKAGE_NAME=Ja.PACKAGE_VERSION=void 0;Ja.PACKAGE_VERSION="0.18.1";Ja.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var p3=E(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.TediousInstrumentation=void 0;var _l=(M(),P(U)),Axe=require("events"),Gf=ee(),as=(ue(),P(He)),a3=s3(),c3=i3(),l3=Symbol("opentelemetry.instrumentation-tedious.current-database"),u3=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function Hf(t){Object.defineProperty(this,l3,{value:t,writable:!0})}var kf=class t extends Gf.InstrumentationBase{constructor(e={}){super(c3.PACKAGE_NAME,c3.PACKAGE_VERSION,e)}init(){return[new Gf.InstrumentationNodeModuleDefinition(t.COMPONENT,[">=1.11.0 <20"],e=>{let r=e.Connection.prototype;for(let n of u3)(0,Gf.isWrapped)(r[n])&&this._unwrap(r,n),this._wrap(r,n,this._patchQuery(n));return(0,Gf.isWrapped)(r.connect)&&this._unwrap(r,"connect"),this._wrap(r,"connect",this._patchConnect),e},e=>{if(e===void 0)return;let r=e.Connection.prototype;for(let n of u3)this._unwrap(r,n);this._unwrap(r,"connect")})]}_patchConnect(e){return function(){var n,o;return Hf.call(this,(o=(n=this.config)===null||n===void 0?void 0:n.options)===null||o===void 0?void 0:o.database),this.removeListener("databaseChange",Hf),this.on("databaseChange",Hf),this.once("end",()=>{this.removeListener("databaseChange",Hf)}),e.apply(this,arguments)}}_patchQuery(e){return r=>{let n=this;function o(s){var i,a,c,u,l,p,_,d;if(!(s instanceof Axe.EventEmitter))return n._diag.warn(`Unexpected invocation of patched ${e} method. Span not recorded`),r.apply(this,arguments);let S=0,f=0,T=()=>f++,h=()=>S++,A=this[l3],N=(b=>{var v,X;return b.sqlTextOrProcedure==="sp_prepare"&&(!((X=(v=b.parametersByName)===null||v===void 0?void 0:v.stmt)===null||X===void 0)&&X.value)?b.parametersByName.stmt.value:b.sqlTextOrProcedure})(s),I=n.tracer.startSpan((0,a3.getSpanName)(e,A,N,s.table),{kind:_l.SpanKind.CLIENT,attributes:{[as.SEMATTRS_DB_SYSTEM]:as.DBSYSTEMVALUES_MSSQL,[as.SEMATTRS_DB_NAME]:A,[as.SEMATTRS_NET_PEER_PORT]:(a=(i=this.config)===null||i===void 0?void 0:i.options)===null||a===void 0?void 0:a.port,[as.SEMATTRS_NET_PEER_NAME]:(c=this.config)===null||c===void 0?void 0:c.server,[as.SEMATTRS_DB_USER]:(l=(u=this.config)===null||u===void 0?void 0:u.userName)!==null&&l!==void 0?l:(d=(_=(p=this.config)===null||p===void 0?void 0:p.authentication)===null||_===void 0?void 0:_.options)===null||d===void 0?void 0:d.userName,[as.SEMATTRS_DB_STATEMENT]:N,[as.SEMATTRS_DB_SQL_TABLE]:s.table}}),O=(0,a3.once)(b=>{s.removeListener("done",T),s.removeListener("doneInProc",T),s.removeListener("doneProc",h),s.removeListener("error",O),this.removeListener("end",O),I.setAttribute("tedious.procedure_count",S),I.setAttribute("tedious.statement_count",f),b&&I.setStatus({code:_l.SpanStatusCode.ERROR,message:b.message}),I.end()});return s.on("done",T),s.on("doneInProc",T),s.on("doneProc",h),s.once("error",O),this.on("end",O),typeof s.callback=="function"?n._wrap(s,"callback",n._patchCallbackQuery(O)):n._diag.error("Expected request.callback to be a function"),_l.context.with(_l.trace.setSpan(_l.context.active(),I),r,this,...arguments)}return Object.defineProperty(o,"length",{value:r.length,writable:!1}),o}}_patchCallbackQuery(e){return r=>function(n,o,s){return e(n),r.apply(this,arguments)}}};Ff.TediousInstrumentation=kf;kf.COMPONENT="tedious"});var d3=E(_3=>{"use strict";Object.defineProperty(_3,"__esModule",{value:!0})});var f3=E(cs=>{"use strict";var Rxe=cs&&cs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),E3=cs&&cs.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rxe(e,t,r)};Object.defineProperty(cs,"__esModule",{value:!0});E3(p3(),cs);E3(d3(),cs)});var g3=E(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.PACKAGE_NAME=Za.PACKAGE_VERSION=void 0;Za.PACKAGE_VERSION="0.43.1";Za.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var R3=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.GenericPoolInstrumentation=void 0;var ec=(M(),P(U)),ni=ee(),A3=g3(),cO="generic-pool",uO=class extends ni.InstrumentationBase{constructor(e={}){super(A3.PACKAGE_NAME,A3.PACKAGE_VERSION,e),this._isDisabled=!1}init(){return[new ni.InstrumentationNodeModuleDefinition(cO,[">=3.0.0 <4"],e=>{let r=e.Pool;return(0,ni.isWrapped)(r.prototype.acquire)&&this._unwrap(r.prototype,"acquire"),this._wrap(r.prototype,"acquire",this._acquirePatcher.bind(this)),e},e=>{let r=e.Pool;return this._unwrap(r.prototype,"acquire"),e}),new ni.InstrumentationNodeModuleDefinition(cO,[">=2.4.0 <3"],e=>{let r=e.Pool;return(0,ni.isWrapped)(r.prototype.acquire)&&this._unwrap(r.prototype,"acquire"),this._wrap(r.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),e},e=>{let r=e.Pool;return this._unwrap(r.prototype,"acquire"),e}),new ni.InstrumentationNodeModuleDefinition(cO,[">=2.0.0 <2.4"],e=>(this._isDisabled=!1,(0,ni.isWrapped)(e.Pool)&&this._unwrap(e,"Pool"),this._wrap(e,"Pool",this._poolWrapper.bind(this)),e),e=>(this._isDisabled=!0,e))]}_acquirePatcher(e){let r=this;return function(...o){let s=ec.context.active(),i=r.tracer.startSpan("generic-pool.acquire",{},s);return ec.context.with(ec.trace.setSpan(s,i),()=>e.call(this,...o).then(a=>(i.end(),a),a=>{throw i.recordException(a),i.end(),a}))}}_poolWrapper(e){let r=this;return function(){let o=e.apply(this,arguments);return r._wrap(o,"acquire",r._acquireWithCallbacksPatcher.bind(r)),o}}_acquireWithCallbacksPatcher(e){let r=this;return function(o,s){if(r._isDisabled)return e.call(this,o,s);let i=ec.context.active(),a=r.tracer.startSpan("generic-pool.acquire",{},i);return ec.context.with(ec.trace.setSpan(i,a),()=>{e.call(this,(c,u)=>{if(a.end(),o)return o(c,u)},s)})}}};qf.GenericPoolInstrumentation=uO});var O3=E(oi=>{"use strict";var Ixe=oi&&oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Pxe=oi&&oi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ixe(e,t,r)};Object.defineProperty(oi,"__esModule",{value:!0});Pxe(R3(),oi)});var lO=E(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.DEFAULT_CONFIG=si.EndOperation=void 0;var yxe;(function(t){t.AutoAck="auto ack",t.Ack="ack",t.AckAll="ackAll",t.Reject="reject",t.Nack="nack",t.NackAll="nackAll",t.ChannelClosed="channel closed",t.ChannelError="channel error",t.InstrumentationTimeout="instrumentation timeout"})(yxe=si.EndOperation||(si.EndOperation={}));si.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var b3=E(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.isConfirmChannelTracing=be.unmarkConfirmChannelTracing=be.markConfirmChannelTracing=be.getConnectionAttributesFromUrl=be.getConnectionAttributesFromServer=be.normalizeExchange=be.CONNECTION_ATTRIBUTES=be.CHANNEL_CONSUME_TIMEOUT_TIMER=be.CHANNEL_SPANS_NOT_ENDED=be.MESSAGE_STORED_SPAN=void 0;var pO=(M(),P(U)),oo=(ue(),P(He));be.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");be.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");be.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");be.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var _O=(0,pO.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),Mxe=t=>t!==""?t:"<default>";be.normalizeExchange=Mxe;var vxe=t=>t.replace(/:[^:@/]*@/,":***@"),y3=(t,e)=>t||(e==="AMQP"?5672:5671),M3=t=>{let e=t||"amqp";return(e.endsWith(":")?e.substring(0,e.length-1):e).toUpperCase()},v3=t=>t||"localhost",tc=(t,e,r,n)=>r?{[e]:r}:(pO.diag.error(`amqplib instrumentation: could not extract connection attribute ${n} from user supplied url`,{url:t}),{}),bxe=t=>{var e,r;let n=(r=(e=t.serverProperties.product)===null||e===void 0?void 0:e.toLowerCase)===null||r===void 0?void 0:r.call(e);return n?{[oo.SEMATTRS_MESSAGING_SYSTEM]:n}:{}};be.getConnectionAttributesFromServer=bxe;var Lxe=t=>{let e={[oo.SEMATTRS_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(t=t||"amqp://localhost",typeof t=="object"){let r=t,n=M3(r?.protocol);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_MESSAGING_PROTOCOL,n,"protocol")));let o=v3(r?.hostname);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_NET_PEER_NAME,o,"hostname")));let s=y3(r.port,n);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_NET_PEER_PORT,s,"port")))}else{let r=vxe(t);e[oo.SEMATTRS_MESSAGING_URL]=r;try{let n=new URL(r),o=M3(n.protocol);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_MESSAGING_PROTOCOL,o,"protocol")));let s=v3(n.hostname);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_NET_PEER_NAME,s,"hostname")));let i=y3(n.port?parseInt(n.port):void 0,o);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_NET_PEER_PORT,i,"port")))}catch(n){pO.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:n})}}return e};be.getConnectionAttributesFromUrl=Lxe;var Dxe=t=>t.setValue(_O,!0);be.markConfirmChannelTracing=Dxe;var xxe=t=>t.deleteValue(_O);be.unmarkConfirmChannelTracing=xxe;var Uxe=t=>t.getValue(_O)===!0;be.isConfirmChannelTracing=Uxe});var L3=E(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.PACKAGE_NAME=rc.PACKAGE_VERSION=void 0;rc.PACKAGE_VERSION="0.46.1";rc.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var x3=E($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.AmqplibInstrumentation=void 0;var Ie=(M(),P(U)),jf=re(),ce=ee(),Wt=(ue(),P(He)),wt=lO(),Le=b3(),D3=L3(),Yf=[">=0.5.5 <1"],dO=class extends ce.InstrumentationBase{constructor(e={}){super(D3.PACKAGE_NAME,D3.PACKAGE_VERSION,Object.assign(Object.assign({},wt.DEFAULT_CONFIG),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},wt.DEFAULT_CONFIG),e))}init(){let e=new ce.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",Yf,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new ce.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",Yf,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new ce.InstrumentationNodeModuleFile("amqplib/lib/connect.js",Yf,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new ce.InstrumentationNodeModuleDefinition("amqplib",Yf,void 0,void 0,[e,n,r])}patchConnect(e){return e=this.unpatchConnect(e),(0,ce.isWrapped)(e.connect)||this._wrap(e,"connect",this.getConnectPatch.bind(this)),e}unpatchConnect(e){return(0,ce.isWrapped)(e.connect)&&this._unwrap(e,"connect"),e}patchChannelModel(e,r){return(0,ce.isWrapped)(e.Channel.prototype.publish)||this._wrap(e.Channel.prototype,"publish",this.getPublishPatch.bind(this,r)),(0,ce.isWrapped)(e.Channel.prototype.consume)||this._wrap(e.Channel.prototype,"consume",this.getConsumePatch.bind(this,r)),(0,ce.isWrapped)(e.Channel.prototype.ack)||this._wrap(e.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,wt.EndOperation.Ack)),(0,ce.isWrapped)(e.Channel.prototype.nack)||this._wrap(e.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,wt.EndOperation.Nack)),(0,ce.isWrapped)(e.Channel.prototype.reject)||this._wrap(e.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,wt.EndOperation.Reject)),(0,ce.isWrapped)(e.Channel.prototype.ackAll)||this._wrap(e.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,wt.EndOperation.AckAll)),(0,ce.isWrapped)(e.Channel.prototype.nackAll)||this._wrap(e.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,wt.EndOperation.NackAll)),(0,ce.isWrapped)(e.Channel.prototype.emit)||this._wrap(e.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,ce.isWrapped)(e.ConfirmChannel.prototype.publish)||this._wrap(e.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,r)),e}unpatchChannelModel(e){return(0,ce.isWrapped)(e.Channel.prototype.publish)&&this._unwrap(e.Channel.prototype,"publish"),(0,ce.isWrapped)(e.Channel.prototype.consume)&&this._unwrap(e.Channel.prototype,"consume"),(0,ce.isWrapped)(e.Channel.prototype.ack)&&this._unwrap(e.Channel.prototype,"ack"),(0,ce.isWrapped)(e.Channel.prototype.nack)&&this._unwrap(e.Channel.prototype,"nack"),(0,ce.isWrapped)(e.Channel.prototype.reject)&&this._unwrap(e.Channel.prototype,"reject"),(0,ce.isWrapped)(e.Channel.prototype.ackAll)&&this._unwrap(e.Channel.prototype,"ackAll"),(0,ce.isWrapped)(e.Channel.prototype.nackAll)&&this._unwrap(e.Channel.prototype,"nackAll"),(0,ce.isWrapped)(e.Channel.prototype.emit)&&this._unwrap(e.Channel.prototype,"emit"),(0,ce.isWrapped)(e.ConfirmChannel.prototype.publish)&&this._unwrap(e.ConfirmChannel.prototype,"publish"),e}getConnectPatch(e){return function(n,o,s){return e.call(this,n,o,function(i,a){if(i==null){let c=(0,Le.getConnectionAttributesFromUrl)(n),u=(0,Le.getConnectionAttributesFromServer)(a);a[Le.CONNECTION_ATTRIBUTES]=Object.assign(Object.assign({},c),u)}s.apply(this,arguments)})}}getChannelEmitPatch(e){let r=this;return function(o){if(o==="close"){r.endAllSpansOnChannel(this,!0,wt.EndOperation.ChannelClosed,void 0);let s=this[Le.CHANNEL_CONSUME_TIMEOUT_TIMER];s&&clearInterval(s),this[Le.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&r.endAllSpansOnChannel(this,!0,wt.EndOperation.ChannelError,void 0);return e.apply(this,arguments)}}getAckAllPatch(e,r,n){let o=this;return function(i){return o.endAllSpansOnChannel(this,e,r,i),n.apply(this,arguments)}}getAckPatch(e,r,n){let o=this;return function(i,a,c){var u;let l=this,p=r===wt.EndOperation.Reject?a:c,_=(u=l[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&u!==void 0?u:[],d=_.findIndex(S=>S.msg===i);if(d<0)o.endConsumerSpan(i,e,r,p);else if(r!==wt.EndOperation.Reject&&a){for(let S=0;S<=d;S++)o.endConsumerSpan(_[S].msg,e,r,p);_.splice(0,d+1)}else o.endConsumerSpan(i,e,r,p),_.splice(d,1);return n.apply(this,arguments)}}getConsumePatch(e,r){let n=this;return function(s,i,a){let c=this;if(!Object.prototype.hasOwnProperty.call(c,Le.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:l}=n.getConfig();if(l){let p=setInterval(()=>{n.checkConsumeTimeoutOnChannel(c)},l);p.unref(),c[Le.CHANNEL_CONSUME_TIMEOUT_TIMER]=p}c[Le.CHANNEL_SPANS_NOT_ENDED]=[]}let u=function(l){var p,_,d,S,f;if(!l)return i.call(this,l);let T=(p=l.properties.headers)!==null&&p!==void 0?p:{},h=Ie.propagation.extract(Ie.ROOT_CONTEXT,T),A=(_=l.fields)===null||_===void 0?void 0:_.exchange,N;if(n._config.useLinksForConsume){let v=h?(d=Ie.trace.getSpan(h))===null||d===void 0?void 0:d.spanContext():void 0;h=void 0,v&&(N=[{context:v}])}let I=n.tracer.startSpan(`${s} process`,{kind:Ie.SpanKind.CONSUMER,attributes:Object.assign(Object.assign({},(S=c?.connection)===null||S===void 0?void 0:S[Le.CONNECTION_ATTRIBUTES]),{[Wt.SEMATTRS_MESSAGING_DESTINATION]:A,[Wt.SEMATTRS_MESSAGING_DESTINATION_KIND]:Wt.MESSAGINGDESTINATIONKINDVALUES_TOPIC,[Wt.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]:(f=l.fields)===null||f===void 0?void 0:f.routingKey,[Wt.SEMATTRS_MESSAGING_OPERATION]:Wt.MESSAGINGOPERATIONVALUES_PROCESS,[Wt.SEMATTRS_MESSAGING_MESSAGE_ID]:l?.properties.messageId,[Wt.SEMATTRS_MESSAGING_CONVERSATION_ID]:l?.properties.correlationId}),links:N},h),{consumeHook:O}=n.getConfig();O&&(0,ce.safeExecuteInTheMiddle)(()=>O(I,{moduleVersion:e,msg:l}),v=>{v&&Ie.diag.error("amqplib instrumentation: consumerHook error",v)},!0),a?.noAck||(c[Le.CHANNEL_SPANS_NOT_ENDED].push({msg:l,timeOfConsume:(0,jf.hrTime)()}),l[Le.MESSAGE_STORED_SPAN]=I);let b=h||Ie.ROOT_CONTEXT;Ie.context.with(Ie.trace.setSpan(b,I),()=>{i.call(this,l)}),a?.noAck&&(n.callConsumeEndHook(I,l,!1,wt.EndOperation.AutoAck),I.end())};return arguments[1]=u,r.apply(this,arguments)}}getConfirmedPublishPatch(e,r){let n=this;return function(s,i,a,c,u){let l=this,{span:p,modifiedOptions:_}=n.createPublishSpan(n,s,i,l,c),{publishHook:d}=n.getConfig();d&&(0,ce.safeExecuteInTheMiddle)(()=>d(p,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:_,isConfirmChannel:!0}),h=>{h&&Ie.diag.error("amqplib instrumentation: publishHook error",h)},!0);let S=function(h,A){try{u?.call(this,h,A)}finally{let{publishConfirmHook:N}=n.getConfig();N&&(0,ce.safeExecuteInTheMiddle)(()=>N(p,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:c,isConfirmChannel:!0,confirmError:h}),I=>{I&&Ie.diag.error("amqplib instrumentation: publishConfirmHook error",I)},!0),h&&p.setStatus({code:Ie.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),p.end()}},f=(0,Le.markConfirmChannelTracing)(Ie.context.active()),T=[...arguments];return T[3]=_,T[4]=Ie.context.bind((0,Le.unmarkConfirmChannelTracing)(Ie.trace.setSpan(f,p)),S),Ie.context.with(f,r.bind(this,...T))}}getPublishPatch(e,r){let n=this;return function(s,i,a,c){if((0,Le.isConfirmChannelTracing)(Ie.context.active()))return r.apply(this,arguments);{let u=this,{span:l,modifiedOptions:p}=n.createPublishSpan(n,s,i,u,c),{publishHook:_}=n.getConfig();_&&(0,ce.safeExecuteInTheMiddle)(()=>_(l,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:p,isConfirmChannel:!1}),f=>{f&&Ie.diag.error("amqplib instrumentation: publishHook error",f)},!0);let d=[...arguments];d[3]=p;let S=r.apply(this,d);return l.end(),S}}}createPublishSpan(e,r,n,o,s){var i;let a=(0,Le.normalizeExchange)(r),c=e.tracer.startSpan(`publish ${a}`,{kind:Ie.SpanKind.PRODUCER,attributes:Object.assign(Object.assign({},o.connection[Le.CONNECTION_ATTRIBUTES]),{[Wt.SEMATTRS_MESSAGING_DESTINATION]:r,[Wt.SEMATTRS_MESSAGING_DESTINATION_KIND]:Wt.MESSAGINGDESTINATIONKINDVALUES_TOPIC,[Wt.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]:n,[Wt.SEMATTRS_MESSAGING_MESSAGE_ID]:s?.messageId,[Wt.SEMATTRS_MESSAGING_CONVERSATION_ID]:s?.correlationId})}),u=s??{};return u.headers=(i=u.headers)!==null&&i!==void 0?i:{},Ie.propagation.inject(Ie.trace.setSpan(Ie.context.active(),c),u.headers),{span:c,modifiedOptions:u}}endConsumerSpan(e,r,n,o){let s=e[Le.MESSAGE_STORED_SPAN];s&&(r!==!1&&s.setStatus({code:Ie.SpanStatusCode.ERROR,message:n!==wt.EndOperation.ChannelClosed&&n!==wt.EndOperation.ChannelError?`${n} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:n}),this.callConsumeEndHook(s,e,r,n),s.end(),e[Le.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(e,r,n,o){var s;((s=e[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&s!==void 0?s:[]).forEach(a=>{this.endConsumerSpan(a.msg,r,n,o)}),e[Le.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(e,r,n,o){let{consumeEndHook:s}=this.getConfig();s&&(0,ce.safeExecuteInTheMiddle)(()=>s(e,{msg:r,rejected:n,endOperation:o}),i=>{i&&Ie.diag.error("amqplib instrumentation: consumerEndHook error",i)},!0)}checkConsumeTimeoutOnChannel(e){var r;let n=(0,jf.hrTime)(),o=(r=e[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&r!==void 0?r:[],s,{consumeTimeoutMs:i}=this.getConfig();for(s=0;s<o.length;s++){let a=o[s],c=(0,jf.hrTimeDuration)(a.timeOfConsume,n);if((0,jf.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,wt.EndOperation.InstrumentationTimeout,!0)}o.splice(0,s)}};$f.AmqplibInstrumentation=dO});var w3=E(us=>{"use strict";var wxe=us&&us.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),U3=us&&us.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&wxe(e,t,r)};Object.defineProperty(us,"__esModule",{value:!0});U3(x3(),us);U3(lO(),us)});var nz=require("@modelcontextprotocol/sdk/server/index.js"),oz=require("@modelcontextprotocol/sdk/server/stdio.js"),yn=require("@modelcontextprotocol/sdk/types.js");async function mO(t,e){let r=e?.timeoutMs??3e4,n=new AbortController,o=setTimeout(()=>n.abort(),r);try{let{timeoutMs:s,...i}=e??{};return await fetch(t,{...i,signal:n.signal})}finally{clearTimeout(o)}}var Qe=class extends Error{retryable;code;reason;constructor(e,r,n,o){super(e),this.name="CardDeclinedError",this.retryable=r,this.code=n,this.reason=o}};var dz=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;function gO(t,e){let r=hO(t),n=hO(e);if(!r||!n)return!1;for(let o=0;o<3;o++)if(r.main[o]!==n.main[o])return r.main[o]>n.main[o];return r.pre&&!n.pre?!1:!r.pre&&n.pre?!0:!r.pre&&!n.pre?!1:Ez(r.pre,n.pre)>0}function hO(t){if(typeof t!="string")return null;let r=t.trim().replace(/^v/,"").match(dz);return r?{main:[Number(r[1]),Number(r[2]),Number(r[3])],pre:r[4]??null}:null}function Ez(t,e){let r=t.split("."),n=e.split("."),o=Math.max(r.length,n.length);for(let s=0;s<o;s++){if(s>=r.length)return-1;if(s>=n.length)return 1;let i=r[s],a=n[s],c=/^\d+$/.test(i),u=/^\d+$/.test(a);if(c&&u){let l=Number(i)-Number(a);if(l!==0)return l}else{if(c)return-1;if(u)return 1;if(i<a)return-1;if(i>a)return 1}}return 0}function ml(){return!!(AO(process.env.VISA_CLI_NO_UPDATE_CHECK)||AO(process.env.CI)||process.env.NODE_ENV==="test")}function AO(t){if(t===void 0)return!1;let e=t.trim().toLowerCase();return!(e===""||e==="0"||e==="false"||e==="no"||e==="off")}var io=C(require("fs")),NO=C(require("path"));var hl=C(require("fs")),RO=C(require("path")),OO=C(require("os"));var Jf=RO.join(OO.homedir(),".visa-mcp"),vr=class{static ensureConfigDir(){hl.existsSync(Jf)||hl.mkdirSync(Jf,{recursive:!0,mode:448})}static getConfigDir(){return Jf}static TOOL_STATES={login:!0,get_status:!0,get_cards:!0,add_card:!0,pay:!0,transaction_history:!0,update_spending_controls:!0,enroll_device:!1,verify_otp:!1,reset:!0,batch:!0,generate_x402_image:!1,browser_launch:!1,browser_navigate:!1,browser_snapshot:!1,browser_click:!1,browser_type:!1,browser_scroll:!1,generate_music_card:!1,generate_image_card:!0,query_onchain_prices_card:!0,generate_music_tempo_card:!0,check_music_status_tempo_card:!0,generate_image_fast_card:!0,pxlwall_card:!1,generate_video_tempo_card:!0};static loadToolStates(){return{...this.TOOL_STATES}}static getDisabledTools(){let e=new Set;for(let[r,n]of Object.entries(this.TOOL_STATES))n||e.add(r);return e}static isToolDisabled(e){return this.TOOL_STATES[e]===!1}};var fz="settings.json";function gl(){return NO.join(vr.getConfigDir(),fz)}var ai={"auth.serverUrl":{type:"string",description:"Auth server base URL. Override for staging / self-hosted backends.",requiresRestart:!0,validate:t=>{if(typeof t!="string")throw new Error("auth.serverUrl must be a string");let e;try{e=new URL(t)}catch{throw new Error(`auth.serverUrl must be a valid URL (got: ${JSON.stringify(t)})`)}if(e.protocol!=="https:"&&e.protocol!=="http:")throw new Error(`auth.serverUrl must use http or https (got: ${e.protocol})`)}},"ui.suppressBrowser":{type:"boolean",description:"When true, the CLI/MCP server stops auto-opening result URLs in your browser."},"ui.suppressFeed":{type:"boolean",description:"When true, generated images/music are not auto-submitted to the public Made-with-Visa feed."},"tools.meta":{type:"boolean",description:"Show category meta-tools (generate_image, generate_music, ...). Restart required.",requiresRestart:!0},"tools.specific":{type:"boolean",description:"Show hardcoded per-merchant tools (generate_image_card, query_onchain_prices_card, ...). Restart required.",requiresRestart:!0},"tools.discover":{type:"boolean",description:"Show the dynamic-catalog tools (discover_tools, execute_tool). Restart required.",requiresRestart:!0}};function Al(){let t=gl();if(!io.existsSync(t))return{};try{let e=io.readFileSync(t,"utf-8"),r=JSON.parse(e);return!r||typeof r!="object"||Array.isArray(r)?{}:r}catch{return{}}}function IO(t){vr.ensureConfigDir();let e=gl(),r=`${e}.tmp`,n=JSON.stringify(t,null,2)+`
|
|
13
|
-
`;io.writeFileSync(r,n,{mode:384}),io.renameSync(r,e)}function Zf(t){let e=Al()[t];return typeof e=="string"?e:void 0}function ds(t){let e=Al()[t];if(typeof e=="boolean")return e;if(e==="true")return!0;if(e==="false")return!1}var ps=class extends Error{constructor(e){let r=Object.keys(ai).sort().join(", ");super(`Unknown setting "${e}". Settable keys: ${r}. For server-controlled values (biometric.*, spending.*) use the dedicated tools (biometric_on/off, update_spending_controls).`),this.name="UnknownSettingKeyError"}},_s=class extends Error{constructor(e){let r="";e.startsWith("biometric.")?r="biometric_on / biometric_off":e.startsWith("spending.")?r="update_spending_controls":e.startsWith("cards.")?r="add_card / remove_card / set_default_card":e.startsWith("account.")&&(r="login / reset"),super(`"${e}" is a server-controlled value and cannot be set via config set. `+(r?`Use ${r} instead.`:"No client-side override is supported.")),this.name="ServerOnlySettingError"}},PO=["biometric.","spending.","account.","cards.","biometric"];function CO(t,e){if(PO.some(s=>t.startsWith(s)))throw new _s(t);let r=ai[t];if(!r)throw new ps(t);let n;if(r.type==="boolean")if(typeof e=="boolean")n=e;else if(typeof e=="string"){let s=e.toLowerCase();if(s==="true")n=!0;else if(s==="false")n=!1;else throw new Error(`${t} expects true or false (got: ${JSON.stringify(e)})`)}else throw new Error(`${t} expects a boolean (got: ${typeof e})`);else{if(typeof e!="string"||e.length===0)throw new Error(`${t} expects a non-empty string`);n=e}r.validate&&r.validate(n);let o=Al();return o[t]=n,IO(o),{key:t,value:n,requiresRestart:!!r.requiresRestart,path:gl()}}function yO(t){if(PO.some(o=>t.startsWith(o)))throw new _s(t);let e=ai[t];if(!e)throw new ps(t);let r=Al(),n=t in r;return n&&(delete r[t],IO(r)),{key:t,removed:n,requiresRestart:n&&!!e.requiresRestart,path:gl()}}var Sz="https://auth.visacli.sh";function Rl(){let t=process.env.VISA_AUTH_URL;if(t!==void 0&&t!=="")return t;let e=Zf("auth.serverUrl");return e!==void 0?e:Sz}function MO(){let t=process.env.VISA_SUPPRESS_BROWSER;return t!==void 0?t==="true":ds("ui.suppressBrowser")??!1}function vO(){let t=process.env.VISA_SUPPRESS_FEED;return t!==void 0?t==="true":ds("ui.suppressFeed")??!1}function ci(){let t=process.env.VISA_META_TOOLS;return t!==void 0?t!=="false":ds("tools.meta")??!0}function ui(){let t=process.env.VISA_SPECIFIC_TOOLS;return t!==void 0?t!=="false":ds("tools.specific")??!0}function li(){let t=process.env.VISA_DISCOVER_TOOLS;return t!==void 0?t!=="false":ds("tools.discover")??!0}var eS="1.
|
|
14
|
-
`;gz(t)&&process.stderr.write(o),hz().write(o)}var R={debug:(...t)=>Nl("DEBUG",...t),info:(...t)=>Nl("INFO",...t),warn:(...t)=>Nl("WARN",...t),error:(...t)=>Nl("ERROR",...t)};var pi=(0,wO.promisify)(sS.execFile),Cl=zr.join(BO.homedir(),".visa-mcp","bin"),Es=zr.join(Cl,"Visa CLI"),Az=zr.join(__dirname,"..","native"),LO="5",DO=zr.join(Cl,"visa-keychain.version"),xO=zr.join(Cl,"visa-keychain.sha256");function UO(t){let e=dt.readFileSync(t);return VO.createHash("sha256").update(e).digest("hex")}async function GO(){try{if(dt.readFileSync(DO,"utf-8").trim()===LO&&dt.existsSync(Es)){let n=dt.readFileSync(xO,"utf-8").trim();if(UO(Es)!==n)R.warn("binary:hash-mismatch",{message:"Binary hash mismatch \u2014 possible tampering detected. Recompiling from source."}),dt.unlinkSync(Es);else return Es}}catch{}let t=zr.join(Az,"visa-keychain.m");if(dt.existsSync(t)||(t=zr.resolve(__dirname,"..","..","native","visa-keychain.m")),dt.existsSync(t)||(t=zr.resolve(__dirname,"..","native","visa-keychain.m")),!dt.existsSync(t))throw new Error("visa-keychain.m source not found. Reinstall Visa CLI.");dt.mkdirSync(Cl,{recursive:!0,mode:448});try{await pi("clang",["-framework","Security","-framework","LocalAuthentication","-framework","Foundation","-framework","AppKit","-o",Es,t],{timeout:3e4})}catch(r){throw r.code==="ENOENT"?new Error("Xcode Command Line Tools required. Install: xcode-select --install"):r}let e=UO(Es);return dt.writeFileSync(xO,e,{mode:384}),dt.writeFileSync(DO,LO,{mode:384}),Es}async function HO(t){let e=await GO(),r;try{r=(await pi(e,t,{timeout:6e4})).stdout}catch(s){r=s.stdout||"";let i=r.trim();throw i.startsWith("ERROR:")?new Error(i.slice(6)):new Error(s.stderr?.trim()||s.message||"Unknown error")}let n=r.trim();if(n.startsWith("OK:"))return n.slice(3);if(n==="OK")return;let o=n.startsWith("ERROR:")?n.slice(6):"Unknown error";throw new Error(o)}var oS=null;function bn(){return process.env.VISA_MOCK_TOUCHID==="true"?!0:process.platform!=="darwin"?!1:oS!==null?oS:(oS=!0,!0)}var Il="visa-cli",Pl="attestation-key";async function Rz(t){try{await pi("security",["delete-generic-password","-s",Il,"-a",Pl],{timeout:5e3})}catch{}await pi("security",["add-generic-password","-s",Il,"-a",Pl,"-w",t],{timeout:5e3})}async function Oz(){try{let{stdout:t}=await pi("security",["find-generic-password","-s",Il,"-a",Pl,"-w"],{timeout:5e3});return t.trim()||null}catch{return null}}async function kO(){let t=await HO(["generate-key"]);if(!t)throw new Error("Key generation returned no output");let e=t.indexOf(":");if(e<0)throw new Error("Unexpected generate-key output format");let r=t.slice(0,e),n=t.slice(e+1);return await Rz(r),n}async function FO(t,e){if(process.env.VISA_MOCK_TOUCHID==="true")return Promise.resolve("mock-ecdsa-signature-for-testing");let r=await Oz();if(!r)throw new Error("Attestation key not found. Run setup to generate a new key.");let n=await GO(),o=["sign",t];return e&&o.push(e),new Promise((s,i)=>{let a=(0,sS.execFile)(n,o,{timeout:6e4},(c,u)=>{let l=(u||"").trim();if(c){l.startsWith("ERROR:")?i(new Error(l.slice(6))):i(new Error(c.stderr?.trim()||c.message||"Unknown error"));return}l.startsWith("OK:")?s(l.slice(3)):i(new Error(l.startsWith("ERROR:")?l.slice(6):"Unknown error"))});a.stdin.write(r),a.stdin.end()})}async function qO(){try{await pi("security",["delete-generic-password","-s",Il,"-a",Pl],{timeout:5e3})}catch{}try{await HO(["delete-key"])}catch{}}var vl=require("child_process"),jO=require("util"),co=C(require("fs")),bl=C(require("os")),lS=C(require("path"));var Ln="
|
|
15
|
-
`)}function YO(t){let e=t;if(e?.code==="EPERM"||e?.code==="EACCES")return!0;let r=Iz(t).toLowerCase();return r.includes("operation not permitted")||r.includes("permission denied")}async function Pz(){try{let{stdout:t}=await Qr("security",["find-generic-password","-s",ur,"-a",ao,"-w"],{timeout:5e3});return t.trim()||null}catch(t){if(YO(t))throw new Ml("Unable to read Visa CLI credentials from macOS Keychain. In sandboxed agents such as Codex, rerun with keychain access or run this command outside the sandbox.");return null}}async function Cz(t){try{try{await Qr("security",["delete-generic-password","-s",ur,"-a",ao],{timeout:5e3})}catch{}return await Qr("security",["add-generic-password","-s",ur,"-a",ao,"-w",t],{timeout:5e3}),!0}catch{return!1}}async function yz(){try{await Qr("security",["delete-generic-password","-s",ur,"-a",ao],{timeout:5e3})}catch{}}async function Mz(){if(!_S())return null;try{let{stdout:t}=await Qr("secret-tool",["lookup","service",ur,"account",ao],{timeout:5e3});return t.trim()||null}catch{return null}}async function vz(t){if(!_S())return!1;try{let e=(0,vl.execFile)("secret-tool",["store","--label",`${ur} ${ao}`,"service",ur,"account",ao]);return e.stdin?(e.stdin.write(t),e.stdin.end(),await Promise.race([new Promise((r,n)=>{e.on("exit",o=>o===0?r():n(new Error(`secret-tool exited ${o}`))),e.on("error",n)}),new Promise((r,n)=>setTimeout(()=>{e.kill(),n(new Error("secret-tool timed out"))},Nz))]),!0):!1}catch{return!1}}async function bz(){if(_S())try{await Qr("secret-tool",["clear","service",ur,"account",ao],{timeout:5e3})}catch{}}function _S(){return!!process.env.DBUS_SESSION_BUS_ADDRESS}async function Lz(){try{let{stdout:t}=await Qr("security",["find-generic-password","-s",ur,"-a",yl,"-w"],{timeout:5e3});return t.trim()||null}catch{return null}}async function Dz(t){try{try{await Qr("security",["delete-generic-password","-s",ur,"-a",yl],{timeout:5e3})}catch{}await Qr("security",["add-generic-password","-s",ur,"-a",yl,"-w",t],{timeout:5e3})}catch{}}async function xz(){try{await Qr("security",["delete-generic-password","-s",ur,"-a",yl],{timeout:5e3})}catch{}}function cS(){try{return co.readFileSync(sc,"utf-8").trim()||null}catch(t){if(YO(t))throw new Ml(`Unable to read Visa CLI credentials from ${sc}. Check file permissions or rerun with access to the Visa CLI credential directory.`);return null}}function $O(t){co.mkdirSync(pS,{recursive:!0,mode:448}),co.writeFileSync(sc,t,{mode:384}),process.platform==="win32"&&Uz(sc)}function uS(){try{co.unlinkSync(sc)}catch{}}function Uz(t){try{let e=bl.userInfo().username;(0,vl.execFile)("icacls",[t,"/inheritance:r","/grant:r",`${e}:F`],{timeout:5e3},r=>{r&&console.error(`[visa-cli] icacls ACL restriction failed: ${r.message}`)})}catch(e){console.error(`[visa-cli] Failed to invoke icacls: ${e instanceof Error?e.message:String(e)}`)}}function aS(){switch(process.platform){case"darwin":return{get:Pz,store:Cz,delete:yz};case"linux":return{get:Mz,store:vz,delete:bz};default:return{get:async()=>cS(),store:async t=>{try{return $O(t),!0}catch{return!1}},delete:async()=>uS(),storesInSessionFile:!0}}}var Xt=class{static async getSessionToken(){if(process.env.VISA_MOCK_KEYCHAIN==="true")return Promise.resolve("mock-session-token-for-testing");let e=aS(),r=await e.get();if(r)return r;let n=cS();return n?(await e.store(n),n):null}static async saveSessionToken(e){if(process.env.VISA_MOCK_KEYCHAIN==="true")return;let r=aS();if(await r.store(e)){if(await r.get()===e){r.storesInSessionFile||uS();return}await r.delete()}if($O(e),cS()!==e)throw new Error("Failed to persist session token. "+(process.platform==="darwin"?'Check Keychain Access permissions for "visa-cli".':`Ensure ${pS} is writable.`))}static async getRcAccessToken(){return process.env.VISA_MOCK_KEYCHAIN==="true"?Ln:Lz()}static async saveRcAccessToken(e){process.env.VISA_MOCK_KEYCHAIN!=="true"&&await Dz(e)}static async deleteSessionToken(){if(process.env.VISA_MOCK_KEYCHAIN==="true")return;await aS().delete(),uS()}static async clearAll(){await this.deleteSessionToken(),await xz()}};var Ll={generate_image:{intro:"Generate an AI image.",tiers:{balanced:{toolId:"fal-flux-pro",priceCents:4,notes:"FLUX Pro v1.1, 1K, ~10s (DEFAULT \u2014 good quality/speed tradeoff)"},fast:{toolId:"fal-flux-schnell",priceCents:1,notes:"FLUX Schnell, 1K, ~3s (drafts, iteration, cheapest)"},pro:{toolId:"fal-flux-pro-ultra",priceCents:6,notes:"FLUX Pro Ultra, 2K, ~30s (hero images, detail)"},text_heavy:{toolId:"fal-ideogram-v2",priceCents:8,notes:"Ideogram V2 \u2014 best when the image contains rendered text/logos"},vector:{toolId:"fal-recraft-v3",priceCents:5,notes:"Recraft V3 \u2014 vector/flat/illustration styles"}},guidance:"If the user didn't specify a tier, pick 'balanced' unless the prompt clearly signals otherwise (text \u2192 text_heavy, logo/icon \u2192 vector, quick test \u2192 fast, hero/print \u2192 pro).",inputProperties:{prompt:{type:"string",description:"Text description of the image to generate."},aspect_ratio:{type:"string",description:'Aspect ratio, e.g. "16:9", "1:1", "9:16".',default:"16:9"}},required:["prompt"]},generate_video:{intro:"Generate an AI video from a text prompt.",tiers:{balanced:{toolId:"fal-minimax-video",priceCents:15,notes:"MiniMax \u2014 good quality/price balance (DEFAULT)"},fast:{toolId:"fal-wan-video",priceCents:10,notes:"Wan \u2014 cheapest, shorter clips"},pro:{toolId:"fal-kling-video",priceCents:20,notes:"Kling \u2014 highest quality, cinematic"}},guidance:"Show the tier menu with prices unless the user specified one. Videos take 60-180s to generate.",inputProperties:{prompt:{type:"string",description:"Text description of the video scene."},aspect_ratio:{type:"string",description:'Aspect ratio, e.g. "16:9" or "9:16".',default:"16:9"}},required:["prompt"]},generate_music:{intro:"Generate an original music track from a prompt.",tiers:{suno:{toolId:"suno-music",priceCents:10,notes:"Suno v4 \u2014 songs with vocals, lyrics, full arrangement"}},guidance:"Takes ~60-90s. Returns an audio URL the user can play.",inputProperties:{prompt:{type:"string",description:"Musical style / mood / lyrics hint."},instrumental:{type:"boolean",description:"True for instrumental (no vocals), false for vocal track.",default:!1}},required:["prompt"]},generate_audio:{intro:"Generate speech (voice cloning) or sound effects.",tiers:{tts:{toolId:"fal-metavoice",priceCents:3,notes:"MetaVoice \u2014 voice cloning TTS (requires a voice sample URL)"},sfx:{toolId:"fal-stable-audio",priceCents:4,notes:"Stable Audio \u2014 sound effects and ambient from a prompt"}},guidance:"For tts: provide text + audio_url (voice sample to clone). For sfx: provide prompt describing the sound.",inputProperties:{prompt:{type:"string",description:"Description of sound to generate (sfx tier)."},text:{type:"string",description:"Text to speak aloud (tts tier)."},audio_url:{type:"string",description:"URL of a voice sample to clone (tts tier, required for MetaVoice)."}},required:[]},generate_3d:{intro:"Generate a 3D model from an image.",tiers:{trellis:{toolId:"fal-trellis-3d",priceCents:8,notes:"Trellis \u2014 image-to-3D, returns a GLB mesh URL"}},guidance:"Pass an image URL. Takes ~30-60s. Returns a downloadable 3D mesh URL.",inputProperties:{image_url:{type:"string",description:"URL of the image to convert to a 3D model."}},required:["image_url"]},upscale_image:{intro:"Upscale an image to higher resolution.",tiers:{aura:{toolId:"fal-aura-sr",priceCents:3,notes:"Aura SR \u2014 default; preserves detail without hallucination"}},guidance:"Pass the existing image URL. Returns an upscaled version.",inputProperties:{image_url:{type:"string",description:"URL of the image to upscale."}},required:["image_url"]},transcribe_audio:{intro:"Transcribe speech in an audio/video URL to text.",tiers:{whisper:{toolId:"fal-whisper",priceCents:2,notes:"OpenAI Whisper \u2014 fast, multilingual"}},guidance:"Pass the URL. Returns the transcript text.",inputProperties:{audio_url:{type:"string",description:"URL of the audio or video file to transcribe."}},required:["audio_url"]},run_llm:{intro:"Run a text prompt through an LLM (OpenRouter). Token-metered \u2014 prices below are per 1M input/output tokens. Typical 500-in/500-out prompts cost 1\u20139\xA2 depending on model.",tiers:{fast:{toolId:"or-gpt-4o-mini",priceCents:1,notes:"GPT-4o Mini \u2014 $0.15/M in \xB7 $0.60/M out. Fastest, cheapest, good general-purpose (DEFAULT)"},reasoning:{toolId:"or-claude-sonnet",priceCents:9,notes:"Claude 3.5 Sonnet \u2014 $3.00/M in \xB7 $15.00/M out. Strong reasoning, long-context. ~20x pricier than `fast`."},deep_reasoning:{toolId:"or-deepseek-r1",priceCents:2,notes:"DeepSeek R1 \u2014 $0.55/M in \xB7 $2.19/M out. Deep chain-of-thought reasoning, mid-range pricing."},search:{toolId:"or-perplexity-sonar",priceCents:1,notes:"Perplexity Sonar \u2014 $1.00/M in \xB7 $1.00/M out. Search-augmented, web-grounded with citations."},open_source:{toolId:"or-llama-70b",priceCents:1,notes:"Llama 3.3 70B \u2014 $0.30/M in \xB7 $0.40/M out. Open-source large model."},coding:{toolId:"or-deepseek-chat",priceCents:1,notes:"DeepSeek Chat V3 \u2014 $0.30/M in \xB7 $0.88/M out. Strong at code generation."}},guidance:"Pick based on the user's need: fast (most questions, cheapest), reasoning (complex analysis \u2014 WARN user it's ~$0.09/call), search (questions about current events), coding (code generation), deep_reasoning (hard math/logic problems).",inputProperties:{prompt:{type:"string",description:"The user query."},system_prompt:{type:"string",description:"Optional system prompt to set model behavior."},max_tokens:{type:"number",description:"Maximum output tokens.",default:1024,minimum:1,maximum:8192},temperature:{type:"number",description:"Sampling temperature \u2014 0 is deterministic, higher is more creative.",default:.7,minimum:0,maximum:2}},required:["prompt"]}};function KO(t){let e=Ll[t];if(!e)throw new Error(`Unknown meta-tool: ${t}`);let r=[e.intro,"","Tiers:"];for(let[n,o]of Object.entries(e.tiers)){let s=`$${(o.priceCents/100).toFixed(2)}`;r.push(` - ${n.padEnd(15)} ${s.padStart(6)} ${o.notes}`)}return r.push("",e.guidance),r.join(`
|
|
16
|
-
`)}function WO(t){let e=Ll[t];if(!e)throw new Error(`Unknown meta-tool: ${t}`);let r=Object.keys(e.tiers);return{type:"object",properties:{tier:{type:"string",enum:r,default:r[0],description:`Quality/style tier. Default: ${r[0]}.`},...e.inputProperties},required:e.required??[]}}function Dl(t,e){if(!fs.includes(t))return t;let r=Ll[t];if(!r)return t;let n=Object.keys(r.tiers),o=e||n[0],s=r.tiers[o];if(!s)throw new Error(`Unknown tier '${o}' for ${t}. Valid tiers: ${n.join(", ")}`);return s.toolId}async function XO(t,e,r){let n=Dl(t,e.tier),{tier:o,...s}=e;return de.executeTool({tool_id:n,...s},r)}var fs=Object.keys(Ll);function zO(t=process.env,e=process.platform){return t.VISA_CLI_NO_BROWSER==="1"||t.VISA_CLI_NO_BROWSER==="true"?{headless:!0,reason:"VISA_CLI_NO_BROWSER is set"}:t.CI==="true"||t.CI==="1"?{headless:!0,reason:"CI environment detected"}:t.SSH_CONNECTION||t.SSH_TTY?{headless:!0,reason:"SSH session detected"}:e==="linux"&&!t.DISPLAY&&!t.WAYLAND_DISPLAY?{headless:!0,reason:"Linux with no $DISPLAY or $WAYLAND_DISPLAY"}:{headless:!1}}function QO(t,e=process.platform){return e==="darwin"?{cmd:"open",args:[t]}:e==="win32"?{cmd:"cmd",args:["/c","start","",t]}:e==="linux"?{cmd:"xdg-open",args:[t]}:null}var uc=C(require("crypto")),nN=require("child_process"),Jt=C(require("fs")),lc=C(require("os")),pc=C(require("path"));var wz="# visa-cli-hud-v1";function xl(t){return typeof t!="string"?!1:t.includes(wz)?!0:t.includes("visa-cli")&&t.includes("statusline")}async function JO(t,e){try{return await e()}catch(r){if(r.message==="Invalid signature"&&bn()){R.warn("attestation:key-mismatch",{action:"reregistering"});try{let n=await kO();await t.registerAttestationKey(n),R.info("attestation:key-reregistered")}catch(n){throw R.error("attestation:reregister-failure",{error:n.message}),r}return await e()}throw r}}var ZO="1.
|
|
12
|
+
Mongoose Error Code: ${e.code}`:""}`})}function yR(t,e,r,n=void 0){r&&(0,OLe.safeExecuteInTheMiddle)(()=>r(t,{moduleVersion:n,response:e}),o=>{o&&m4.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function ILe(t,e,r,n=void 0){return t instanceof Promise?t.then(o=>(yR(e,o,r,n),o)).catch(o=>{throw h4(e,o),o}).finally(()=>e.end()):(yR(e,t,r,n),e.end(),t)}$o.handlePromiseResponse=ILe;function PLe(t,e,r,n,o,s,i=void 0){let a=0;return o.length===2&&(a=1),o[a]=(c,u)=>(c?h4(n,c):yR(n,u,s,i),n.end(),t(c,u)),e.apply(r,o)}$o.handleCallbackResponse=PLe});var A4=E(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.PACKAGE_NAME=Va.PACKAGE_VERSION=void 0;Va.PACKAGE_VERSION="0.46.1";Va.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var P4=E(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.MongooseInstrumentation=Nn._STORED_PARENT_SPAN=void 0;var Ut=(M(),P(U)),CLe=re(),MR=g4(),R4=ee(),O4=A4(),Ju=(ue(),P(He)),pf=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],yLe=["remove","count","findOneAndRemove",...pf],MLe=["count","findOneAndRemove",...pf],vLe=[...pf];function N4(t){return t?t.startsWith("6.")||t.startsWith("5.")?yLe:t.startsWith("7.")?MLe:vLe:pf}function I4(t){return t&&(t.startsWith("5.")||t.startsWith("6."))||!1}Nn._STORED_PARENT_SPAN=Symbol("stored-parent-span");var vR=class extends R4.InstrumentationBase{constructor(e={}){super(O4.PACKAGE_NAME,O4.PACKAGE_VERSION,e)}init(){return new R4.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <9"],this.patch.bind(this),this.unpatch.bind(this))}patch(e,r){return this._wrap(e.Model.prototype,"save",this.patchOnModelMethods("save",r)),e.Model.prototype.$save=e.Model.prototype.save,I4(r)&&this._wrap(e.Model.prototype,"remove",this.patchOnModelMethods("remove",r)),this._wrap(e.Query.prototype,"exec",this.patchQueryExec(r)),this._wrap(e.Aggregate.prototype,"exec",this.patchAggregateExec(r)),N4(r).forEach(o=>{this._wrap(e.Query.prototype,o,this.patchAndCaptureSpanContext(o))}),this._wrap(e.Model,"aggregate",this.patchModelAggregate()),e}unpatch(e,r){let n=N4(r);this._unwrap(e.Model.prototype,"save"),e.Model.prototype.$save=e.Model.prototype.save,I4(r)&&this._unwrap(e.Model.prototype,"remove"),this._unwrap(e.Query.prototype,"exec"),this._unwrap(e.Aggregate.prototype,"exec"),n.forEach(o=>{this._unwrap(e.Query.prototype,o)}),this._unwrap(e.Model,"aggregate")}patchAggregateExec(e){let r=this;return n=>function(s){var i;if(r.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return n.apply(this,arguments);let a=this[Nn._STORED_PARENT_SPAN],c={},{dbStatementSerializer:u}=r.getConfig();u&&(c[Ju.SEMATTRS_DB_STATEMENT]=u("aggregate",{options:this.options,aggregatePipeline:this._pipeline}));let l=r._startSpan(this._model.collection,(i=this._model)===null||i===void 0?void 0:i.modelName,"aggregate",c,a);return r._handleResponse(l,n,this,arguments,s,e)}}patchQueryExec(e){let r=this;return n=>function(s){if(r.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return n.apply(this,arguments);let i=this[Nn._STORED_PARENT_SPAN],a={},{dbStatementSerializer:c}=r.getConfig();c&&(a[Ju.SEMATTRS_DB_STATEMENT]=c(this.op,{condition:this._conditions,updates:this._update,options:this.options,fields:this._fields}));let u=r._startSpan(this.mongooseCollection,this.model.modelName,this.op,a,i);return r._handleResponse(u,n,this,arguments,s,e)}}patchOnModelMethods(e,r){let n=this;return o=>function(i,a){if(n.getConfig().requireParentSpan&&Ut.trace.getSpan(Ut.context.active())===void 0)return o.apply(this,arguments);let c={document:this};i&&!(i instanceof Function)&&(c.options=i);let u={},{dbStatementSerializer:l}=n.getConfig();l&&(u[Ju.SEMATTRS_DB_STATEMENT]=l(e,c));let p=n._startSpan(this.constructor.collection,this.constructor.modelName,e,u);return i instanceof Function&&(a=i,i=void 0),n._handleResponse(p,o,this,arguments,a,r)}}patchModelAggregate(){let e=this;return r=>function(){let o=Ut.trace.getSpan(Ut.context.active()),s=e._callOriginalFunction(()=>r.apply(this,arguments));return s&&(s[Nn._STORED_PARENT_SPAN]=o),s}}patchAndCaptureSpanContext(e){let r=this;return n=>function(){return this[Nn._STORED_PARENT_SPAN]=Ut.trace.getSpan(Ut.context.active()),r._callOriginalFunction(()=>n.apply(this,arguments))}}_startSpan(e,r,n,o,s){return this.tracer.startSpan(`mongoose.${r}.${n}`,{kind:Ut.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},o),(0,MR.getAttributesFromCollection)(e)),{[Ju.SEMATTRS_DB_OPERATION]:n,[Ju.SEMATTRS_DB_SYSTEM]:"mongoose"})},s?Ut.trace.setSpan(Ut.context.active(),s):void 0)}_handleResponse(e,r,n,o,s,i=void 0){let a=this;if(s instanceof Function)return a._callOriginalFunction(()=>(0,MR.handleCallbackResponse)(s,r,n,e,o,a.getConfig().responseHook,i));{let c=a._callOriginalFunction(()=>r.apply(n,o));return(0,MR.handlePromiseResponse)(c,e,a.getConfig().responseHook,i)}}_callOriginalFunction(e){return this.getConfig().suppressInternalInstrumentation?Ut.context.with((0,CLe.suppressTracing)(Ut.context.active()),e):e()}};Nn.MongooseInstrumentation=vR});var y4=E(C4=>{"use strict";Object.defineProperty(C4,"__esModule",{value:!0})});var v4=E(Ko=>{"use strict";var bLe=Ko&&Ko.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M4=Ko&&Ko.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bLe(e,t,r)};Object.defineProperty(Ko,"__esModule",{value:!0});M4(P4(),Ko);M4(y4(),Ko)});var U4=E(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.AttributeNames=void 0;var DLe;(function(t){t.MYSQL_VALUES="db.mysql.values"})(DLe=Zu.AttributeNames||(Zu.AttributeNames={}))});var V4=E($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.getPoolName=$t.arrayStringifyHelper=$t.getSpanName=$t.getDbValues=$t.getDbStatement=$t.getConnectionAttributes=void 0;var Jn=(ue(),P(He));function xLe(t){let{host:e,port:r,database:n,user:o}=ULe(t),s=parseInt(r,10);return isNaN(s)?{[Jn.SEMATTRS_NET_PEER_NAME]:e,[Jn.SEMATTRS_DB_CONNECTION_STRING]:w4(e,r,n),[Jn.SEMATTRS_DB_NAME]:n,[Jn.SEMATTRS_DB_USER]:o}:{[Jn.SEMATTRS_NET_PEER_NAME]:e,[Jn.SEMATTRS_NET_PEER_PORT]:s,[Jn.SEMATTRS_DB_CONNECTION_STRING]:w4(e,r,n),[Jn.SEMATTRS_DB_NAME]:n,[Jn.SEMATTRS_DB_USER]:o}}$t.getConnectionAttributes=xLe;function ULe(t){let{host:e,port:r,database:n,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:r,database:n,user:o}}function w4(t,e,r){let n=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(n+=`:${e}`),typeof r=="string"&&(n+=`/${r}`),n}function wLe(t){return typeof t=="string"?t:t.sql}$t.getDbStatement=wLe;function VLe(t,e){return bR(typeof t=="string"?e:e||t.values)}$t.getDbValues=VLe;function BLe(t){let e=typeof t=="object"?t.sql:t,r=e?.indexOf(" ");return typeof r=="number"&&r!==-1?e?.substring(0,r):e}$t.getSpanName=BLe;function bR(t){return t?`[${t.toString()}]`:""}$t.arrayStringifyHelper=bR;function GLe(t){let e=t.config.connectionConfig,r="";return r+=e.host?`host: '${e.host}', `:"",r+=e.port?`port: ${e.port}, `:"",r+=e.database?`database: '${e.database}', `:"",r+=e.user?`user: '${e.user}'`:"",e.user||(r=r.substring(0,r.length-2)),r.trim()}$t.getPoolName=GLe});var B4=E(Ba=>{"use strict";Object.defineProperty(Ba,"__esModule",{value:!0});Ba.PACKAGE_NAME=Ba.PACKAGE_VERSION=void 0;Ba.PACKAGE_VERSION="0.45.1";Ba.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var H4=E(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.MySQLInstrumentation=void 0;var Kt=(M(),P(U)),Ga=ee(),LR=(ue(),P(He)),HLe=U4(),Ha=V4(),G4=B4(),_f=class t extends Ga.InstrumentationBase{constructor(e={}){super(G4.PACKAGE_NAME,G4.PACKAGE_VERSION,e),this._setMetricInstruments()}setMeterProvider(e){super.setMeterProvider(e),this._setMetricInstruments()}_setMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter("db.client.connections.usage",{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}init(){return[new Ga.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],e=>((0,Ga.isWrapped)(e.createConnection)&&this._unwrap(e,"createConnection"),this._wrap(e,"createConnection",this._patchCreateConnection()),(0,Ga.isWrapped)(e.createPool)&&this._unwrap(e,"createPool"),this._wrap(e,"createPool",this._patchCreatePool()),(0,Ga.isWrapped)(e.createPoolCluster)&&this._unwrap(e,"createPoolCluster"),this._wrap(e,"createPoolCluster",this._patchCreatePoolCluster()),e),e=>{e!==void 0&&(this._unwrap(e,"createConnection"),this._unwrap(e,"createPool"),this._unwrap(e,"createPoolCluster"))})]}_patchCreateConnection(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"query",r._patchQuery(s)),s}}}_patchCreatePool(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"query",r._patchQuery(s)),r._wrap(s,"getConnection",r._patchGetConnection(s)),r._wrap(s,"end",r._patchPoolEnd(s)),r._setPoolcallbacks(s,r,""),s}}}_patchPoolEnd(e){return r=>{let n=this;return function(s){let i=e._allConnections.length,a=e._freeConnections.length,c=i-a,u=(0,Ha.getPoolName)(e);n._connectionsUsage.add(-c,{state:"used",name:u}),n._connectionsUsage.add(-a,{state:"idle",name:u}),r.apply(e,arguments)}}}_patchCreatePoolCluster(){return e=>{let r=this;return function(o){let s=e(...arguments);return r._wrap(s,"getConnection",r._patchGetConnection(s)),r._wrap(s,"add",r._patchAdd(s)),s}}}_patchAdd(e){return r=>{let n=this;return function(s,i){if(!n._enabled)return n._unwrap(e,"add"),r.apply(e,arguments);r.apply(e,arguments);let a=e._nodes;if(a){let c=typeof s=="object"?"CLUSTER::"+e._lastId:String(s),u=a[c].pool;n._setPoolcallbacks(u,n,s)}}}}_patchGetConnection(e){return r=>{let n=this;return function(s,i,a){if(!n._enabled)return n._unwrap(e,"getConnection"),r.apply(e,arguments);if(arguments.length===1&&typeof s=="function"){let c=n._getConnectionCallbackPatchFn(s);return r.call(e,c)}if(arguments.length===2&&typeof i=="function"){let c=n._getConnectionCallbackPatchFn(i);return r.call(e,s,c)}if(arguments.length===3&&typeof a=="function"){let c=n._getConnectionCallbackPatchFn(a);return r.call(e,s,i,c)}return r.apply(e,arguments)}}}_getConnectionCallbackPatchFn(e){let r=this,n=Kt.context.active();return function(o,s){s&&((0,Ga.isWrapped)(s.query)||r._wrap(s,"query",r._patchQuery(s))),typeof e=="function"&&Kt.context.with(n,e,this,o,s)}}_patchQuery(e){return r=>{let n=this;return function(o,s,i){if(!n._enabled)return n._unwrap(e,"query"),r.apply(e,arguments);let a=n.tracer.startSpan((0,Ha.getSpanName)(o),{kind:Kt.SpanKind.CLIENT,attributes:Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Ha.getConnectionAttributes)(e.config))});if(a.setAttribute(LR.SEMATTRS_DB_STATEMENT,(0,Ha.getDbStatement)(o)),n.getConfig().enhancedDatabaseReporting){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]),a.setAttribute(HLe.AttributeNames.MYSQL_VALUES,(0,Ha.getDbValues)(o,l))}let c=Array.from(arguments).findIndex(l=>typeof l=="function"),u=Kt.context.active();if(c===-1){let l=Kt.context.with(Kt.trace.setSpan(Kt.context.active(),a),()=>r.apply(e,arguments));return Kt.context.bind(u,l),l.on("error",p=>a.setStatus({code:Kt.SpanStatusCode.ERROR,message:p.message})).on("end",()=>{a.end()})}else return n._wrap(arguments,c,n._patchCallbackQuery(a,u)),Kt.context.with(Kt.trace.setSpan(Kt.context.active(),a),()=>r.apply(e,arguments))}}}_patchCallbackQuery(e,r){return n=>function(o,s,i){return o&&e.setStatus({code:Kt.SpanStatusCode.ERROR,message:o.message}),e.end(),Kt.context.with(r,()=>n(...arguments))}}_setPoolcallbacks(e,r,n){let o=n||(0,Ha.getPoolName)(e);e.on("connection",s=>{r._connectionsUsage.add(1,{state:"idle",name:o})}),e.on("acquire",s=>{r._connectionsUsage.add(-1,{state:"idle",name:o}),r._connectionsUsage.add(1,{state:"used",name:o})}),e.on("release",s=>{r._connectionsUsage.add(-1,{state:"used",name:o}),r._connectionsUsage.add(1,{state:"idle",name:o})})}};df.MySQLInstrumentation=_f;_f.COMMON_ATTRIBUTES={[LR.SEMATTRS_DB_SYSTEM]:LR.DBSYSTEMVALUES_MYSQL}});var F4=E(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0})});var j4=E(Wo=>{"use strict";var kLe=Wo&&Wo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),q4=Wo&&Wo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&kLe(e,t,r)};Object.defineProperty(Wo,"__esModule",{value:!0});q4(H4(),Wo);q4(F4(),Wo)});var xR=E(Ef=>{"use strict";Object.defineProperty(Ef,"__esModule",{value:!0});Ef.addSqlCommenterComment=void 0;var DR=(M(),P(U)),qLe=re();function jLe(t){let e=t.indexOf("--");if(e>=0)return!0;if(t.indexOf("/*")<0)return!1;let n=t.indexOf("*/");return e<n}function YLe(t){return encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)}function $Le(t,e){if(typeof e!="string"||e.length===0||jLe(e))return e;let r=new qLe.W3CTraceContextPropagator,n={};r.inject(DR.trace.setSpan(DR.ROOT_CONTEXT,t),n,DR.defaultTextMapSetter);let o=Object.keys(n).sort();if(o.length===0)return e;let s=o.map(i=>{let a=YLe(n[i]);return`${i}='${a}'`}).join(",");return`${e} /*${s}*/`}Ef.addSqlCommenterComment=$Le});var z4=E(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.getConnectionPrototypeToInstrument=Pr.once=Pr.getSpanName=Pr.getDbStatement=Pr.getConnectionAttributes=void 0;var Zn=(ue(),P(He));function KLe(t){let{host:e,port:r,database:n,user:o}=WLe(t),s=parseInt(r,10);return isNaN(s)?{[Zn.SEMATTRS_NET_PEER_NAME]:e,[Zn.SEMATTRS_DB_CONNECTION_STRING]:X4(e,r,n),[Zn.SEMATTRS_DB_NAME]:n,[Zn.SEMATTRS_DB_USER]:o}:{[Zn.SEMATTRS_NET_PEER_NAME]:e,[Zn.SEMATTRS_NET_PEER_PORT]:s,[Zn.SEMATTRS_DB_CONNECTION_STRING]:X4(e,r,n),[Zn.SEMATTRS_DB_NAME]:n,[Zn.SEMATTRS_DB_USER]:o}}Pr.getConnectionAttributes=KLe;function WLe(t){let{host:e,port:r,database:n,user:o}=t&&t.connectionConfig||t||{};return{host:e,port:r,database:n,user:o}}function X4(t,e,r){let n=`jdbc:mysql://${t||"localhost"}`;return typeof e=="number"&&(n+=`:${e}`),typeof r=="string"&&(n+=`/${r}`),n}function XLe(t,e,r){return e?typeof t=="string"?r?e(t,r):t:r||t.values?e(t.sql,r||t.values):t.sql:typeof t=="string"?t:t.sql}Pr.getDbStatement=XLe;function zLe(t){let e=typeof t=="object"?t.sql:t,r=e?.indexOf(" ");return typeof r=="number"&&r!==-1?e?.substring(0,r):e}Pr.getSpanName=zLe;var QLe=t=>{let e=!1;return(...r)=>{if(!e)return e=!0,t(...r)}};Pr.once=QLe;function JLe(t){let e=t.prototype,r=Object.getPrototypeOf(e);return typeof r?.query=="function"&&typeof r?.execute=="function"?r:e}Pr.getConnectionPrototypeToInstrument=JLe});var Q4=E(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.PACKAGE_NAME=ka.PACKAGE_VERSION=void 0;ka.PACKAGE_VERSION="0.45.2";ka.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var t5=E(Sf=>{"use strict";Object.defineProperty(Sf,"__esModule",{value:!0});Sf.MySQL2Instrumentation=void 0;var J4=(M(),P(U)),ei=ee(),wR=(ue(),P(He)),Z4=xR(),Fa=z4(),e5=Q4(),UR=[">=1.4.2 <4"],ff=class t extends ei.InstrumentationBase{constructor(e={}){super(e5.PACKAGE_NAME,e5.PACKAGE_VERSION,e)}init(){let e;function r(s){!e&&s.format&&(e=s.format)}let n=s=>{(0,ei.isWrapped)(s.query)&&this._unwrap(s,"query"),this._wrap(s,"query",this._patchQuery(e,!1)),(0,ei.isWrapped)(s.execute)&&this._unwrap(s,"execute"),this._wrap(s,"execute",this._patchQuery(e,!0))},o=s=>{this._unwrap(s,"query"),this._unwrap(s,"execute")};return[new ei.InstrumentationNodeModuleDefinition("mysql2",UR,s=>(r(s),s),()=>{},[new ei.InstrumentationNodeModuleFile("mysql2/promise.js",UR,s=>(r(s),s),()=>{}),new ei.InstrumentationNodeModuleFile("mysql2/lib/connection.js",UR,s=>{let i=(0,Fa.getConnectionPrototypeToInstrument)(s);return n(i),s},s=>{if(s===void 0)return;let i=(0,Fa.getConnectionPrototypeToInstrument)(s);o(i)})])]}_patchQuery(e,r){return n=>{let o=this;return function(s,i,a){let c;Array.isArray(i)?c=i:arguments[2]&&(c=[i]);let u=o.tracer.startSpan((0,Fa.getSpanName)(s),{kind:J4.SpanKind.CLIENT,attributes:Object.assign(Object.assign(Object.assign({},t.COMMON_ATTRIBUTES),(0,Fa.getConnectionAttributes)(this.config)),{[wR.SEMATTRS_DB_STATEMENT]:(0,Fa.getDbStatement)(s,e,c)})});!r&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=s=typeof s=="string"?(0,Z4.addSqlCommenterComment)(u,s):Object.assign(s,{sql:(0,Z4.addSqlCommenterComment)(u,s.sql)}));let l=(0,Fa.once)((p,_)=>{if(p)u.setStatus({code:J4.SpanStatusCode.ERROR,message:p.message});else{let{responseHook:d}=o.getConfig();typeof d=="function"&&(0,ei.safeExecuteInTheMiddle)(()=>{d(u,{queryResults:_})},S=>{S&&o._diag.warn("Failed executing responseHook",S)},!0)}u.end()});if(arguments.length===1){typeof s.onResult=="function"&&o._wrap(s,"onResult",o._patchCallbackQuery(l));let p=n.apply(this,arguments);return p.once("error",_=>{l(_)}).once("result",_=>{l(void 0,_)}),p}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(l)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(l)),n.apply(this,arguments)}}}_patchCallbackQuery(e){return r=>function(n,o,s){return e(n,o),r(...arguments)}}};Sf.MySQL2Instrumentation=ff;ff.COMMON_ATTRIBUTES={[wR.SEMATTRS_DB_SYSTEM]:wR.DBSYSTEMVALUES_MYSQL}});var n5=E(r5=>{"use strict";Object.defineProperty(r5,"__esModule",{value:!0})});var s5=E(Xo=>{"use strict";var ZLe=Xo&&Xo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),o5=Xo&&Xo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZLe(e,t,r)};Object.defineProperty(Xo,"__esModule",{value:!0});o5(t5(),Xo);o5(n5(),Xo)});var l5=E(Tf=>{"use strict";Object.defineProperty(Tf,"__esModule",{value:!0});Tf.endSpan=void 0;var tDe=(M(),P(U)),rDe=(t,e)=>{e&&(t.recordException(e),t.setStatus({code:tDe.SpanStatusCode.ERROR,message:e.message})),t.end()};Tf.endSpan=rDe});var VR=E(mf=>{"use strict";Object.defineProperty(mf,"__esModule",{value:!0});mf.defaultDbStatementSerializer=void 0;var nDe=[{regex:/^ECHO/i,args:0},{regex:/^(LPUSH|MSET|PFA|PUBLISH|RPUSH|SADD|SET|SPUBLISH|XADD|ZADD)/i,args:1},{regex:/^(HSET|HMSET|LSET|LINSERT)/i,args:2},{regex:/^(ACL|BIT|B[LRZ]|CLIENT|CLUSTER|CONFIG|COMMAND|DECR|DEL|EVAL|EX|FUNCTION|GEO|GET|HINCR|HMGET|HSCAN|INCR|L[TRLM]|MEMORY|P[EFISTU]|RPOP|S[CDIMORSU]|XACK|X[CDGILPRT]|Z[CDILMPRS])/i,args:-1}],oDe=(t,e)=>{var r,n;if(Array.isArray(e)&&e.length){let o=(n=(r=nDe.find(({regex:i})=>i.test(t)))===null||r===void 0?void 0:r.args)!==null&&n!==void 0?n:0,s=o>=0?e.slice(0,o):e;return e.length>s.length&&s.push(`[${e.length-o} other arguments]`),`${t} ${s.join(" ")}`}return t};mf.defaultDbStatementSerializer=oDe});var p5=E(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});qa.PACKAGE_NAME=qa.PACKAGE_VERSION=void 0;qa.PACKAGE_VERSION="0.47.1";qa.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var f5=E(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.IORedisInstrumentation=void 0;var zo=(M(),P(U)),hf=ee(),Cr=(ue(),P(He)),_5=ee(),el=l5(),sDe=VR(),d5=p5(),E5={requireParentSpan:!0},BR=class extends hf.InstrumentationBase{constructor(e={}){super(d5.PACKAGE_NAME,d5.PACKAGE_VERSION,Object.assign(Object.assign({},E5),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},E5),e))}init(){return[new hf.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(e,r)=>{let n=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,hf.isWrapped)(n.prototype.sendCommand)&&this._unwrap(n.prototype,"sendCommand"),this._wrap(n.prototype,"sendCommand",this._patchSendCommand(r)),(0,hf.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"connect",this._patchConnection()),e},e=>{if(e===void 0)return;let r=e[Symbol.toStringTag]==="Module"?e.default:e;this._unwrap(r.prototype,"sendCommand"),this._unwrap(r.prototype,"connect")})]}_patchSendCommand(e){return r=>this._traceSendCommand(r,e)}_patchConnection(){return e=>this._traceConnection(e)}_traceSendCommand(e,r){let n=this;return function(o){if(arguments.length<1||typeof o!="object")return e.apply(this,arguments);let s=n.getConfig(),i=s.dbStatementSerializer||sDe.defaultDbStatementSerializer,a=zo.trace.getSpan(zo.context.active())===void 0;if(s.requireParentSpan===!0&&a)return e.apply(this,arguments);let c=n.tracer.startSpan(o.name,{kind:zo.SpanKind.CLIENT,attributes:{[Cr.SEMATTRS_DB_SYSTEM]:Cr.DBSYSTEMVALUES_REDIS,[Cr.SEMATTRS_DB_STATEMENT]:i(o.name,o.args)}}),{requestHook:u}=s;u&&(0,_5.safeExecuteInTheMiddle)(()=>u(c,{moduleVersion:r,cmdName:o.name,cmdArgs:o.args}),_=>{_&&zo.diag.error("ioredis instrumentation: request hook failed",_)},!0);let{host:l,port:p}=this.options;c.setAttributes({[Cr.SEMATTRS_NET_PEER_NAME]:l,[Cr.SEMATTRS_NET_PEER_PORT]:p,[Cr.SEMATTRS_DB_CONNECTION_STRING]:`redis://${l}:${p}`});try{let _=e.apply(this,arguments),d=o.resolve;o.resolve=function(f){(0,_5.safeExecuteInTheMiddle)(()=>{var T;return(T=s.responseHook)===null||T===void 0?void 0:T.call(s,c,o.name,o.args,f)},T=>{T&&zo.diag.error("ioredis instrumentation: response hook failed",T)},!0),(0,el.endSpan)(c,null),d(f)};let S=o.reject;return o.reject=function(f){(0,el.endSpan)(c,f),S(f)},_}catch(_){throw(0,el.endSpan)(c,_),_}}}_traceConnection(e){let r=this;return function(){let n=zo.trace.getSpan(zo.context.active())===void 0;if(r.getConfig().requireParentSpan===!0&&n)return e.apply(this,arguments);let o=r.tracer.startSpan("connect",{kind:zo.SpanKind.CLIENT,attributes:{[Cr.SEMATTRS_DB_SYSTEM]:Cr.DBSYSTEMVALUES_REDIS,[Cr.SEMATTRS_DB_STATEMENT]:"connect"}}),{host:s,port:i}=this.options;o.setAttributes({[Cr.SEMATTRS_NET_PEER_NAME]:s,[Cr.SEMATTRS_NET_PEER_PORT]:i,[Cr.SEMATTRS_DB_CONNECTION_STRING]:`redis://${s}:${i}`});try{let a=e.apply(this,arguments);return(0,el.endSpan)(o,null),a}catch(a){throw(0,el.endSpan)(o,a),a}}}};gf.IORedisInstrumentation=BR});var T5=E(S5=>{"use strict";Object.defineProperty(S5,"__esModule",{value:!0})});var h5=E(Qo=>{"use strict";var iDe=Qo&&Qo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),m5=Qo&&Qo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&iDe(e,t,r)};Object.defineProperty(Qo,"__esModule",{value:!0});m5(f5(),Qo);m5(T5(),Qo)});var g5=E(Af=>{"use strict";Object.defineProperty(Af,"__esModule",{value:!0});Af.getClientAttributes=void 0;var tl=(ue(),P(He));function aDe(t,e){var r,n;return{[tl.SEMATTRS_DB_SYSTEM]:tl.DBSYSTEMVALUES_REDIS,[tl.SEMATTRS_NET_PEER_NAME]:(r=e?.socket)===null||r===void 0?void 0:r.host,[tl.SEMATTRS_NET_PEER_PORT]:(n=e?.socket)===null||n===void 0?void 0:n.port,[tl.SEMATTRS_DB_CONNECTION_STRING]:cDe(t,e?.url)}}Af.getClientAttributes=aDe;function cDe(t,e){if(!(typeof e!="string"||!e))try{let r=new URL(e);return r.searchParams.delete("user_pwd"),r.username="",r.password="",r.href}catch(r){t.error("failed to sanitize redis connection url",r)}}});var A5=E(ja=>{"use strict";Object.defineProperty(ja,"__esModule",{value:!0});ja.PACKAGE_NAME=ja.PACKAGE_VERSION=void 0;ja.PACKAGE_VERSION="0.46.1";ja.PACKAGE_NAME="@opentelemetry/instrumentation-redis-4"});var P5=E(Of=>{"use strict";Object.defineProperty(Of,"__esModule",{value:!0});Of.RedisInstrumentation=void 0;var yr=(M(),P(U)),at=ee(),R5=g5(),uDe=VR(),O5=A5(),lDe=(ue(),P(He)),rl=Symbol("opentelemetry.instrumentation.redis.open_spans"),N5=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),I5={requireParentSpan:!1},Rf=class t extends at.InstrumentationBase{constructor(e={}){super(O5.PACKAGE_NAME,O5.PACKAGE_VERSION,Object.assign(Object.assign({},I5),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},I5),e))}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(e){let r=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/commander.js`,["^1.0.0"],(s,i)=>{let a=s.transformCommandArguments;if(!a)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),s;let c=i?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,at.isWrapped)(s?.[c])&&this._unwrap(s,c),this._wrap(s,c,this._getPatchExtendWithCommands(a)),s},s=>{(0,at.isWrapped)(s?.extendWithCommands)&&this._unwrap(s,"extendWithCommands"),(0,at.isWrapped)(s?.attachCommands)&&this._unwrap(s,"attachCommands")}),n=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/client/multi-command.js`,["^1.0.0"],s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;return(0,at.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec()),(0,at.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),s},s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;(0,at.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,at.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new at.InstrumentationNodeModuleFile(`${e}/dist/lib/client/index.js`,["^1.0.0"],s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;return a?.multi&&((0,at.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,at.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,at.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),s},s=>{var i;let a=(i=s?.default)===null||i===void 0?void 0:i.prototype;(0,at.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,at.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,at.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new at.InstrumentationNodeModuleDefinition(e,["^1.0.0"],s=>s,()=>{},[r,n,o])}_getPatchExtendWithCommands(e){let r=this;return function(o){return function(i){var a;if(((a=i?.BaseClass)===null||a===void 0?void 0:a.name)!=="RedisClient")return o.apply(this,arguments);let c=i.executor;return i.executor=function(u,l){let p=e(u,l).args;return r._traceClientCommand(c,this,arguments,p)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(){let e=this;return function(n){return function(){let s=n.apply(this,arguments);return typeof s?.then!="function"?(e._diag.error("got non promise result when patching RedisClientMultiCommand.exec"),s):s.then(i=>{let a=this[rl];return e._endSpansWithRedisReplies(a,i),i}).catch(i=>{let a=this[rl];if(!a)e._diag.error("cannot find open spans to end for redis multi command");else{let c=i.constructor.name==="MultiErrorReply"?i.replies:new Array(a.length).fill(i);e._endSpansWithRedisReplies(a,c)}return Promise.reject(i)})}}}_getPatchMultiCommandsAddCommand(){let e=this;return function(n){return function(s){return e._traceClientCommand(n,this,arguments,s)}}}_getPatchRedisClientMulti(){return function(r){return function(){let o=r.apply(this,arguments);return o[N5]=this.options,o}}}_getPatchRedisClientSendCommand(){let e=this;return function(n){return function(s){return e._traceClientCommand(n,this,arguments,s)}}}_getPatchedClientConnect(){let e=this;return function(n){return function(){let s=this.options,i=(0,R5.getClientAttributes)(e._diag,s),a=e.tracer.startSpan(`${t.COMPONENT}-connect`,{kind:yr.SpanKind.CLIENT,attributes:i});return yr.context.with(yr.trace.setSpan(yr.context.active(),a),()=>n.apply(this)).then(u=>(a.end(),u)).catch(u=>(a.recordException(u),a.setStatus({code:yr.SpanStatusCode.ERROR,message:u.message}),a.end(),Promise.reject(u)))}}}_traceClientCommand(e,r,n,o){if(yr.trace.getSpan(yr.context.active())===void 0&&this.getConfig().requireParentSpan)return e.apply(r,n);let i=r.options||r[N5],a=o[0],c=o.slice(1),u=this.getConfig().dbStatementSerializer||uDe.defaultDbStatementSerializer,l=(0,R5.getClientAttributes)(this._diag,i);try{let d=u(a,c);d!=null&&(l[lDe.SEMATTRS_DB_STATEMENT]=d)}catch(d){this._diag.error("dbStatementSerializer throw an exception",d,{commandName:a})}let p=this.tracer.startSpan(`${t.COMPONENT}-${a}`,{kind:yr.SpanKind.CLIENT,attributes:l}),_=yr.context.with(yr.trace.setSpan(yr.context.active(),p),()=>e.apply(r,n));if(typeof _?.then=="function")_.then(d=>{this._endSpanWithResponse(p,a,c,d,void 0)},d=>{this._endSpanWithResponse(p,a,c,null,d)});else{let d=_;d[rl]=d[rl]||[],d[rl].push({span:p,commandName:a,commandArgs:c})}return _}_endSpansWithRedisReplies(e,r){if(!e)return this._diag.error("cannot find open spans to end for redis multi command");if(r.length!==e.length)return this._diag.error("number of multi command spans does not match response from redis");for(let n=0;n<e.length;n++){let{span:o,commandName:s,commandArgs:i}=e[n],a=r[n],[c,u]=a instanceof Error?[null,a]:[a,void 0];this._endSpanWithResponse(o,s,i,c,u)}}_endSpanWithResponse(e,r,n,o,s){let{responseHook:i}=this.getConfig();if(!s&&i)try{i(e,r,n,o)}catch(a){this._diag.error("responseHook throw an exception",a)}s&&(e.recordException(s),e.setStatus({code:yr.SpanStatusCode.ERROR,message:s?.message})),e.end()}};Of.RedisInstrumentation=Rf;Rf.COMPONENT="redis"});var y5=E(C5=>{"use strict";Object.defineProperty(C5,"__esModule",{value:!0})});var v5=E(Jo=>{"use strict";var pDe=Jo&&Jo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),M5=Jo&&Jo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pDe(e,t,r)};Object.defineProperty(Jo,"__esModule",{value:!0});M5(P5(),Jo);M5(y5(),Jo)});var k5=E(Nf=>{"use strict";Object.defineProperty(Nf,"__esModule",{value:!0});Nf.EVENT_LISTENERS_SET=void 0;Nf.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var FR=E(ol=>{"use strict";Object.defineProperty(ol,"__esModule",{value:!0});ol.AttributeNames=void 0;var mDe;(function(t){t.PG_VALUES="db.postgresql.values",t.PG_PLAN="db.postgresql.plan",t.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",t.MAX_CLIENT="db.postgresql.max.client"})(mDe=ol.AttributeNames||(ol.AttributeNames={}))});var qR=E(qe=>{"use strict";Object.defineProperty(qe,"__esModule",{value:!0});qe.METRIC_DB_CLIENT_OPERATION_DURATION=qe.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=qe.METRIC_DB_CLIENT_CONNECTION_COUNT=qe.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=qe.DB_CLIENT_CONNECTION_STATE_VALUE_USED=qe.ATTR_DB_OPERATION_NAME=qe.ATTR_DB_NAMESPACE=qe.ATTR_DB_CLIENT_CONNECTION_STATE=qe.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;qe.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";qe.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";qe.ATTR_DB_NAMESPACE="db.namespace";qe.ATTR_DB_OPERATION_NAME="db.operation.name";qe.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";qe.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";qe.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";qe.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests";qe.METRIC_DB_CLIENT_OPERATION_DURATION="db.client.operation.duration"});var jR=E(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});sl.SpanNames=void 0;var hDe;(function(t){t.QUERY_PREFIX="pg.query",t.CONNECT="pg.connect",t.POOL_CONNECT="pg-pool.connect"})(hDe=sl.SpanNames||(sl.SpanNames={}))});var W5=E(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.isObjectWithTextString=se.getErrorMessage=se.patchClientConnectCallback=se.patchCallbackPGPool=se.updateCounter=se.getPoolName=se.patchCallback=se.handleExecutionResult=se.handleConfigQuery=se.shouldSkipInstrumentation=se.getSemanticAttributesFromPool=se.getSemanticAttributesFromConnection=se.getConnectionString=se.parseNormalizedOperationName=se.getQuerySpanName=void 0;var Zo=(M(),P(U)),If=FR(),Pt=(ue(),P(He)),ti=qR(),gDe=ee(),F5=jR();function q5(t,e){if(!e)return F5.SpanNames.QUERY_PREFIX;let r=typeof e.name=="string"&&e.name?e.name:j5(e.text);return`${F5.SpanNames.QUERY_PREFIX}:${r}${t?` ${t}`:""}`}se.getQuerySpanName=q5;function j5(t){let e=t.indexOf(" "),r=e===-1?t:t.slice(0,e);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}se.parseNormalizedOperationName=j5;function YR(t){let e=t.host||"localhost",r=t.port||5432,n=t.database||"";return`postgresql://${e}:${r}/${n}`}se.getConnectionString=YR;function Y5(t){if(Number.isInteger(t))return t}function $5(t){return{[Pt.SEMATTRS_DB_SYSTEM]:Pt.DBSYSTEMVALUES_POSTGRESQL,[Pt.SEMATTRS_DB_NAME]:t.database,[Pt.SEMATTRS_DB_CONNECTION_STRING]:YR(t),[Pt.SEMATTRS_NET_PEER_NAME]:t.host,[Pt.SEMATTRS_NET_PEER_PORT]:Y5(t.port),[Pt.SEMATTRS_DB_USER]:t.user}}se.getSemanticAttributesFromConnection=$5;function ADe(t){return{[Pt.SEMATTRS_DB_SYSTEM]:Pt.DBSYSTEMVALUES_POSTGRESQL,[Pt.SEMATTRS_DB_NAME]:t.database,[Pt.SEMATTRS_DB_CONNECTION_STRING]:YR(t),[Pt.SEMATTRS_NET_PEER_NAME]:t.host,[Pt.SEMATTRS_NET_PEER_PORT]:Y5(t.port),[Pt.SEMATTRS_DB_USER]:t.user,[If.AttributeNames.IDLE_TIMEOUT_MILLIS]:t.idleTimeoutMillis,[If.AttributeNames.MAX_CLIENT]:t.maxClient}}se.getSemanticAttributesFromPool=ADe;function RDe(t){return t.requireParentSpan===!0&&Zo.trace.getSpan(Zo.context.active())===void 0}se.shouldSkipInstrumentation=RDe;function ODe(t,e,r){let{connectionParameters:n}=this,o=n.database,s=q5(o,r),i=t.startSpan(s,{kind:Zo.SpanKind.CLIENT,attributes:$5(n)});if(!r)return i;if(r.text&&i.setAttribute(Pt.SEMATTRS_DB_STATEMENT,r.text),e.enhancedDatabaseReporting&&Array.isArray(r.values))try{let a=r.values.map(c=>c==null?"null":c instanceof Buffer?c.toString():typeof c=="object"?typeof c.toPostgres=="function"?c.toPostgres():JSON.stringify(c):c.toString());i.setAttribute(If.AttributeNames.PG_VALUES,a)}catch(a){Zo.diag.error("failed to stringify ",r.values,a)}return typeof r.name=="string"&&i.setAttribute(If.AttributeNames.PG_PLAN,r.name),i}se.handleConfigQuery=ODe;function K5(t,e,r){typeof t.responseHook=="function"&&(0,gDe.safeExecuteInTheMiddle)(()=>{t.responseHook(e,{data:r})},n=>{n&&Zo.diag.error("Error running response hook",n)},!0)}se.handleExecutionResult=K5;function NDe(t,e,r,n,o){return function(i,a){i?(Object.prototype.hasOwnProperty.call(i,"code")&&(n[Pt.ATTR_ERROR_TYPE]=i.code),e.setStatus({code:Zo.SpanStatusCode.ERROR,message:i.message})):K5(t,e,a),o(),e.end(),r.call(this,i,a)}}se.patchCallback=NDe;function IDe(t){let e="";return e+=(t?.host?`${t.host}`:"unknown_host")+":",e+=(t?.port?`${t.port}`:"unknown_port")+"/",e+=t?.database?`${t.database}`:"unknown_database",e.trim()}se.getPoolName=IDe;function PDe(t,e,r,n,o){let s=e.totalCount,i=e.waitingCount,a=e.idleCount,c=s-a;return r.add(c-o.used,{[ti.ATTR_DB_CLIENT_CONNECTION_STATE]:ti.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),r.add(a-o.idle,{[ti.ATTR_DB_CLIENT_CONNECTION_STATE]:ti.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),n.add(i-o.pending,{[ti.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:t}),{used:c,idle:a,pending:i}}se.updateCounter=PDe;function CDe(t,e){return function(n,o,s){n&&t.setStatus({code:Zo.SpanStatusCode.ERROR,message:n.message}),t.end(),e.call(this,n,o,s)}}se.patchCallbackPGPool=CDe;function yDe(t,e){return function(n){n&&t.setStatus({code:Zo.SpanStatusCode.ERROR,message:n.message}),t.end(),e.apply(this,arguments)}}se.patchClientConnectCallback=yDe;function MDe(t){return typeof t=="object"&&t!==null&&"message"in t?String(t.message):void 0}se.getErrorMessage=MDe;function vDe(t){var e;return typeof t=="object"&&typeof((e=t)===null||e===void 0?void 0:e.text)=="string"}se.isObjectWithTextString=vDe});var X5=E(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.PACKAGE_NAME=Ya.PACKAGE_VERSION=void 0;Ya.PACKAGE_VERSION="0.51.1";Ya.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var tX=E(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.PgInstrumentation=void 0;var Mr=ee(),le=(M(),P(U)),z5=k5(),je=W5(),Q5=xR(),J5=X5(),Z5=jR(),Pf=re(),es=(ue(),P(He)),ri=qR();function Cf(t){return t[Symbol.toStringTag]==="Module"?t.default:t}var $R=class extends Mr.InstrumentationBase{constructor(e={}){super(J5.PACKAGE_NAME,J5.PACKAGE_VERSION,e),this._connectionsCounter={used:0,idle:0,pending:0}}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(ri.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:le.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(ri.METRIC_DB_CLIENT_CONNECTION_COUNT,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"}),this._connectionPendingRequests=this.meter.createUpDownCounter(ri.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let e=[">=8.0.3 <9"],r=new Mr.InstrumentationNodeModuleFile("pg/lib/native/client.js",e,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),n=new Mr.InstrumentationNodeModuleFile("pg/lib/client.js",e,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Mr.InstrumentationNodeModuleDefinition("pg",e,i=>{let a=Cf(i);return this._patchPgClient(a.Client),i},i=>{let a=Cf(i);return this._unpatchPgClient(a.Client),i},[n,r]),s=new Mr.InstrumentationNodeModuleDefinition("pg-pool",[">=2.0.0 <4"],i=>((0,Mr.isWrapped)(i.prototype.connect)&&this._unwrap(i.prototype,"connect"),this._wrap(i.prototype,"connect",this._getPoolConnectPatch()),i),i=>{(0,Mr.isWrapped)(i.prototype.connect)&&this._unwrap(i.prototype,"connect")});return[o,s]}_patchPgClient(e){if(!e)return;let r=Cf(e);return(0,Mr.isWrapped)(r.prototype.query)&&this._unwrap(r.prototype,"query"),(0,Mr.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"query",this._getClientQueryPatch()),this._wrap(r.prototype,"connect",this._getClientConnectPatch()),e}_unpatchPgClient(e){let r=Cf(e);return(0,Mr.isWrapped)(r.prototype.query)&&this._unwrap(r.prototype,"query"),(0,Mr.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),e}_getClientConnectPatch(){let e=this;return r=>function(o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.call(this,o);let s=e.tracer.startSpan(Z5.SpanNames.CONNECT,{kind:le.SpanKind.CLIENT,attributes:je.getSemanticAttributesFromConnection(this)});if(o){let a=le.trace.getSpan(le.context.active());o=je.patchClientConnectCallback(s,o),a&&(o=le.context.bind(le.context.active(),o))}let i=le.context.with(le.trace.setSpan(le.context.active(),s),()=>r.call(this,o));return eX(s,i)}}recordOperationDuration(e,r){let n={};[es.SEMATTRS_DB_SYSTEM,ri.ATTR_DB_NAMESPACE,es.ATTR_ERROR_TYPE,es.ATTR_SERVER_PORT,es.ATTR_SERVER_ADDRESS,ri.ATTR_DB_OPERATION_NAME].forEach(i=>{i in e&&(n[i]=e[i])});let s=(0,Pf.hrTimeToMilliseconds)((0,Pf.hrTimeDuration)(r,(0,Pf.hrTime)()))/1e3;this._operationDuration.record(s,n)}_getClientQueryPatch(){let e=this;return r=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.apply(this,o);let s=(0,Pf.hrTime)(),i=o[0],a=typeof i=="string",c=je.isObjectWithTextString(i),u=a?{text:i,values:Array.isArray(o[1])?o[1]:void 0}:c?i:void 0,l={[es.SEMATTRS_DB_SYSTEM]:es.DBSYSTEMVALUES_POSTGRESQL,[ri.ATTR_DB_NAMESPACE]:this.database,[es.ATTR_SERVER_PORT]:this.connectionParameters.port,[es.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};u?.text&&(l[ri.ATTR_DB_OPERATION_NAME]=je.parseNormalizedOperationName(u?.text));let p=()=>{e.recordOperationDuration(l,s)},_=e.getConfig(),d=je.handleConfigQuery.call(this,e.tracer,_,u);if(_.addSqlCommenterCommentToQueries&&(a?o[0]=(0,Q5.addSqlCommenterComment)(d,i):c&&!("name"in i)&&(o[0]=Object.assign(Object.assign({},i),{text:(0,Q5.addSqlCommenterComment)(d,i.text)}))),o.length>0){let T=le.trace.getSpan(le.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=je.patchCallback(_,d,o[o.length-1],l,p),T&&(o[o.length-1]=le.context.bind(le.context.active(),o[o.length-1]));else if(typeof u?.callback=="function"){let h=je.patchCallback(e.getConfig(),d,u.callback,l,p);T&&(h=le.context.bind(le.context.active(),h)),o[0].callback=h}}let{requestHook:S}=_;typeof S=="function"&&u&&(0,Mr.safeExecuteInTheMiddle)(()=>{let{database:T,host:h,port:A,user:N}=this.connectionParameters;S(d,{connection:{database:T,host:h,port:A,user:N},query:{text:u.text,values:u.values,name:u.name}})},T=>{T&&e._diag.error("Error running query hook",T)},!0);let f;try{f=r.apply(this,o)}catch(T){throw d.setStatus({code:le.SpanStatusCode.ERROR,message:je.getErrorMessage(T)}),d.end(),T}return f instanceof Promise?f.then(T=>new Promise(h=>{je.handleExecutionResult(e.getConfig(),d,T),p(),d.end(),h(T)})).catch(T=>new Promise((h,A)=>{d.setStatus({code:le.SpanStatusCode.ERROR,message:T.message}),p(),d.end(),A(T)})):f})}_setPoolConnectEventListeners(e){if(e[z5.EVENT_LISTENERS_SET])return;let r=je.getPoolName(e.options);e.on("connect",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("acquire",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("remove",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e.on("release",()=>{this._connectionsCounter=je.updateCounter(r,e,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),e[z5.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let e=this;return r=>function(o){if(je.shouldSkipInstrumentation(e.getConfig()))return r.call(this,o);let s=e.tracer.startSpan(Z5.SpanNames.POOL_CONNECT,{kind:le.SpanKind.CLIENT,attributes:je.getSemanticAttributesFromPool(this.options)});if(e._setPoolConnectEventListeners(this),o){let a=le.trace.getSpan(le.context.active());o=je.patchCallbackPGPool(s,o),a&&(o=le.context.bind(le.context.active(),o))}let i=le.context.with(le.trace.setSpan(le.context.active(),s),()=>r.call(this,o));return eX(s,i)}}};yf.PgInstrumentation=$R;function eX(t,e){if(!(e instanceof Promise))return e;let r=e;return le.context.bind(le.context.active(),r.then(n=>(t.end(),n)).catch(n=>(t.setStatus({code:le.SpanStatusCode.ERROR,message:je.getErrorMessage(n)}),t.end(),Promise.reject(n))))}});var nX=E(rX=>{"use strict";Object.defineProperty(rX,"__esModule",{value:!0})});var oX=E(eo=>{"use strict";var bDe=eo&&eo.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),KR=eo&&eo.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&bDe(e,t,r)};Object.defineProperty(eo,"__esModule",{value:!0});KR(tX(),eo);KR(nX(),eo);KR(FR(),eo)});var AX=E($a=>{"use strict";Object.defineProperty($a,"__esModule",{value:!0});$a.PACKAGE_NAME=$a.PACKAGE_VERSION=void 0;$a.PACKAGE_VERSION="0.45.2";$a.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var ZR=E(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.HapiLifecycleMethodNames=In.HapiLayerType=In.handlerPatched=In.HapiComponentName=void 0;In.HapiComponentName="@hapi/hapi";In.handlerPatched=Symbol("hapi-handler-patched");In.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};In.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var eO=E(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});il.AttributeNames=void 0;var jDe;(function(t){t.HAPI_TYPE="hapi.type",t.PLUGIN_NAME="hapi.plugin.name",t.EXT_TYPE="server.ext.type"})(jDe=il.AttributeNames||(il.AttributeNames={}))});var RX=E(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.getPluginFromInput=Ye.getExtMetadata=Ye.getRouteMetadata=Ye.isPatchableExtMethod=Ye.isDirectExtInput=Ye.isLifecycleExtEventObj=Ye.isLifecycleExtType=Ye.getPluginName=void 0;var vf=(ue(),P(He)),al=ZR(),ts=eO();function YDe(t){return t.name?t.name:t.pkg.name}Ye.getPluginName=YDe;var $De=t=>typeof t=="string"&&al.HapiLifecycleMethodNames.has(t);Ye.isLifecycleExtType=$De;var KDe=t=>{var e;let r=(e=t)===null||e===void 0?void 0:e.type;return r!==void 0&&(0,Ye.isLifecycleExtType)(r)};Ye.isLifecycleExtEventObj=KDe;var WDe=t=>Array.isArray(t)&&t.length<=3&&(0,Ye.isLifecycleExtType)(t[0])&&typeof t[1]=="function";Ye.isDirectExtInput=WDe;var XDe=t=>!Array.isArray(t);Ye.isPatchableExtMethod=XDe;var zDe=(t,e)=>e?{attributes:{[vf.SEMATTRS_HTTP_ROUTE]:t.path,[vf.SEMATTRS_HTTP_METHOD]:t.method,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.PLUGIN,[ts.AttributeNames.PLUGIN_NAME]:e},name:`${e}: route - ${t.path}`}:{attributes:{[vf.SEMATTRS_HTTP_ROUTE]:t.path,[vf.SEMATTRS_HTTP_METHOD]:t.method,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.ROUTER},name:`route - ${t.path}`};Ye.getRouteMetadata=zDe;var QDe=(t,e)=>e?{attributes:{[ts.AttributeNames.EXT_TYPE]:t,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.EXT,[ts.AttributeNames.PLUGIN_NAME]:e},name:`${e}: ext - ${t}`}:{attributes:{[ts.AttributeNames.EXT_TYPE]:t,[ts.AttributeNames.HAPI_TYPE]:al.HapiLayerType.EXT},name:`ext - ${t}`};Ye.getExtMetadata=QDe;var JDe=t=>"plugin"in t?"plugin"in t.plugin?t.plugin.plugin:t.plugin:t;Ye.getPluginFromInput=JDe});var IX=E(Lf=>{"use strict";Object.defineProperty(Lf,"__esModule",{value:!0});Lf.HapiInstrumentation=void 0;var cr=(M(),P(U)),OX=re(),bf=ee(),NX=AX(),cl=ZR(),ro=RX(),tO=class extends bf.InstrumentationBase{constructor(e={}){super(NX.PACKAGE_NAME,NX.PACKAGE_VERSION,e)}init(){return new bf.InstrumentationNodeModuleDefinition(cl.HapiComponentName,[">=17.0.0 <22"],e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return(0,bf.isWrapped)(r.server)||this._wrap(r,"server",this._getServerPatch.bind(this)),(0,bf.isWrapped)(r.Server)||this._wrap(r,"Server",this._getServerPatch.bind(this)),r},e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;this._massUnwrap([r],["server","Server"])})}_getServerPatch(e){let r=this,n=this;return function(s){let i=e.apply(this,[s]);return n._wrap(i,"route",a=>r._getServerRoutePatch.bind(r)(a)),n._wrap(i,"ext",a=>r._getServerExtPatch.bind(r)(a)),n._wrap(i,"register",r._getServerRegisterPatch.bind(r)),i}}_getServerRegisterPatch(e){let r=this;return function(o,s){if(Array.isArray(o))for(let i of o){let a=(0,ro.getPluginFromInput)(i);r._wrapRegisterHandler(a)}else{let i=(0,ro.getPluginFromInput)(o);r._wrapRegisterHandler(i)}return e.apply(this,[o,s])}}_getServerExtPatch(e,r){let n=this;return function(...s){if(Array.isArray(s[0])){let i=s[0];for(let a=0;a<i.length;a++){let c=i[a];if((0,ro.isLifecycleExtType)(c.type)){let u=c,l=n._wrapExtMethods(u.method,c.type,r);u.method=l,i[a]=u}}return e.apply(this,s)}else if((0,ro.isDirectExtInput)(s)){let i=s,a=i[1],c=n._wrapExtMethods(a,i[0],r);return e.apply(this,[i[0],c,i[2]])}else if((0,ro.isLifecycleExtEventObj)(s[0])){let i=s[0],a=n._wrapExtMethods(i.method,i.type,r);return i.method=a,e.call(this,i)}return e.apply(this,s)}}_getServerRoutePatch(e,r){let n=this;return function(o){if(Array.isArray(o))for(let s=0;s<o.length;s++){let i=n._wrapRouteHandler.call(n,o[s],r);o[s]=i}else o=n._wrapRouteHandler.call(n,o,r);return e.apply(this,[o])}}_wrapRegisterHandler(e){let r=this,n=(0,ro.getPluginName)(e),o=e.register,s=this,i=function(a,c){return s._wrap(a,"route",u=>r._getServerRoutePatch.bind(r)(u,n)),s._wrap(a,"ext",u=>r._getServerExtPatch.bind(r)(u,n)),o.call(this,a,c)};e.register=i}_wrapExtMethods(e,r,n){let o=this;if(e instanceof Array){for(let s=0;s<e.length;s++)e[s]=o._wrapExtMethods(e[s],r);return e}else if((0,ro.isPatchableExtMethod)(e))return e[cl.handlerPatched]===!0?e:(e[cl.handlerPatched]=!0,async function(...i){if(cr.trace.getSpan(cr.context.active())===void 0)return await e.apply(this,i);let a=(0,ro.getExtMetadata)(r,n),c=o.tracer.startSpan(a.name,{attributes:a.attributes});try{return await cr.context.with(cr.trace.setSpan(cr.context.active(),c),e,void 0,...i)}catch(u){throw c.recordException(u),c.setStatus({code:cr.SpanStatusCode.ERROR,message:u.message}),u}finally{c.end()}});return e}_wrapRouteHandler(e,r){var n;let o=this;if(e[cl.handlerPatched]===!0)return e;e[cl.handlerPatched]=!0;let s=i=>async function(...a){if(cr.trace.getSpan(cr.context.active())===void 0)return await i.call(this,...a);let c=(0,OX.getRPCMetadata)(cr.context.active());c?.type===OX.RPCType.HTTP&&(c.route=e.path);let u=(0,ro.getRouteMetadata)(e,r),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await cr.context.with(cr.trace.setSpan(cr.context.active(),l),()=>i.call(this,...a))}catch(p){throw l.recordException(p),l.setStatus({code:cr.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}};if(typeof e.handler=="function")e.handler=s(e.handler);else if(typeof e.options=="function"){let i=e.options;e.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=s(c.handler)),c}}else typeof((n=e.options)===null||n===void 0?void 0:n.handler)=="function"&&(e.options.handler=s(e.options.handler));return e}};Lf.HapiInstrumentation=tO});var CX=E(rs=>{"use strict";var ZDe=rs&&rs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),PX=rs&&rs.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ZDe(e,t,r)};Object.defineProperty(rs,"__esModule",{value:!0});PX(IX(),rs);PX(eO(),rs)});var Df=E(ul=>{"use strict";Object.defineProperty(ul,"__esModule",{value:!0});ul.KoaLayerType=void 0;var txe;(function(t){t.ROUTER="router",t.MIDDLEWARE="middleware"})(txe=ul.KoaLayerType||(ul.KoaLayerType={}))});var LX=E(Ka=>{"use strict";Object.defineProperty(Ka,"__esModule",{value:!0});Ka.PACKAGE_NAME=Ka.PACKAGE_VERSION=void 0;Ka.PACKAGE_VERSION="0.47.1";Ka.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var rO=E(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});ll.AttributeNames=void 0;var rxe;(function(t){t.KOA_TYPE="koa.type",t.KOA_NAME="koa.name"})(rxe=ll.AttributeNames||(ll.AttributeNames={}))});var xX=E(Wa=>{"use strict";Object.defineProperty(Wa,"__esModule",{value:!0});Wa.isLayerIgnored=Wa.getMiddlewareMetadata=void 0;var DX=Df(),xf=rO(),nxe=(ue(),P(He)),oxe=(t,e,r,n)=>{var o;return r?{attributes:{[xf.AttributeNames.KOA_NAME]:n?.toString(),[xf.AttributeNames.KOA_TYPE]:DX.KoaLayerType.ROUTER,[nxe.SEMATTRS_HTTP_ROUTE]:n?.toString()},name:t._matchedRouteName||`router - ${n}`}:{attributes:{[xf.AttributeNames.KOA_NAME]:(o=e.name)!==null&&o!==void 0?o:"middleware",[xf.AttributeNames.KOA_TYPE]:DX.KoaLayerType.MIDDLEWARE},name:`middleware - ${e.name}`}};Wa.getMiddlewareMetadata=oxe;var sxe=(t,e)=>{var r;return!!(Array.isArray(e?.ignoreLayersType)&&(!((r=e?.ignoreLayersType)===null||r===void 0)&&r.includes(t)))};Wa.isLayerIgnored=sxe});var UX=E(Uf=>{"use strict";Object.defineProperty(Uf,"__esModule",{value:!0});Uf.kLayerPatched=void 0;Uf.kLayerPatched=Symbol("koa-layer-patched")});var kX=E(wf=>{"use strict";Object.defineProperty(wf,"__esModule",{value:!0});wf.KoaInstrumentation=void 0;var Pn=(M(),P(U)),pl=ee(),wX=Df(),VX=LX(),BX=xX(),GX=re(),HX=UX(),nO=class extends pl.InstrumentationBase{constructor(e={}){super(VX.PACKAGE_NAME,VX.PACKAGE_VERSION,e)}init(){return new pl.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <3"],e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;return r==null?r:((0,pl.isWrapped)(r.prototype.use)&&this._unwrap(r.prototype,"use"),this._wrap(r.prototype,"use",this._getKoaUsePatch.bind(this)),e)},e=>{let r=e[Symbol.toStringTag]==="Module"?e.default:e;(0,pl.isWrapped)(r.prototype.use)&&this._unwrap(r.prototype,"use")})}_getKoaUsePatch(e){let r=this;return function(o){let s;return o.router?s=r._patchRouterDispatch(o):s=r._patchLayer(o,!1),e.apply(this,[s])}}_patchRouterDispatch(e){var r;Pn.diag.debug("Patching @koa/router dispatch");let n=e.router,o=(r=n?.stack)!==null&&r!==void 0?r:[];for(let s of o){let i=s.path,a=s.stack;for(let c=0;c<a.length;c++){let u=a[c];a[c]=this._patchLayer(u,!0,i)}}return e}_patchLayer(e,r,n){let o=r?wX.KoaLayerType.ROUTER:wX.KoaLayerType.MIDDLEWARE;return e[HX.kLayerPatched]===!0||(0,BX.isLayerIgnored)(o,this.getConfig())?e:e.constructor.name==="GeneratorFunction"||e.constructor.name==="AsyncGeneratorFunction"?(Pn.diag.debug("ignoring generator-based Koa middleware layer"),e):(e[HX.kLayerPatched]=!0,Pn.diag.debug("patching Koa middleware layer"),async(s,i)=>{if(Pn.trace.getSpan(Pn.context.active())===void 0)return e(s,i);let c=(0,BX.getMiddlewareMetadata)(s,e,r,n),u=this.tracer.startSpan(c.name,{attributes:c.attributes}),l=(0,GX.getRPCMetadata)(Pn.context.active());l?.type===GX.RPCType.HTTP&&s._matchedRoute&&(l.route=s._matchedRoute.toString());let{requestHook:p}=this.getConfig();p&&(0,pl.safeExecuteInTheMiddle)(()=>p(u,{context:s,middlewareLayer:e,layerType:o}),d=>{d&&Pn.diag.error("koa instrumentation: request hook failed",d)},!0);let _=Pn.trace.setSpan(Pn.context.active(),u);return Pn.context.with(_,async()=>{try{return await e(s,i)}catch(d){throw u.recordException(d),d}finally{u.end()}})})}};wf.KoaInstrumentation=nO});var FX=E(no=>{"use strict";var ixe=no&&no.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),oO=no&&no.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ixe(e,t,r)};Object.defineProperty(no,"__esModule",{value:!0});oO(kX(),no);oO(Df(),no);oO(rO(),no)});var sO=E(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.ConnectNames=Wr.ConnectTypes=Wr.AttributeNames=void 0;var cxe;(function(t){t.CONNECT_TYPE="connect.type",t.CONNECT_NAME="connect.name"})(cxe=Wr.AttributeNames||(Wr.AttributeNames={}));var uxe;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request_handler"})(uxe=Wr.ConnectTypes||(Wr.ConnectTypes={}));var lxe;(function(t){t.MIDDLEWARE="middleware",t.REQUEST_HANDLER="request handler"})(lxe=Wr.ConnectNames||(Wr.ConnectNames={}))});var KX=E(Xa=>{"use strict";Object.defineProperty(Xa,"__esModule",{value:!0});Xa.PACKAGE_NAME=Xa.PACKAGE_VERSION=void 0;Xa.PACKAGE_VERSION="0.43.1";Xa.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var WX=E(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});Vf._LAYERS_STORE_PROPERTY=void 0;Vf._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var XX=E(os=>{"use strict";Object.defineProperty(os,"__esModule",{value:!0});os.generateRoute=os.replaceCurrentStackRoute=os.addNewStackLayer=void 0;var pxe=(M(),P(U)),ns=WX(),_xe=t=>{Array.isArray(t[ns._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(t,ns._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t[ns._LAYERS_STORE_PROPERTY].push("/");let e=t[ns._LAYERS_STORE_PROPERTY].length;return()=>{e===t[ns._LAYERS_STORE_PROPERTY].length?t[ns._LAYERS_STORE_PROPERTY].pop():pxe.diag.warn("Connect: Trying to pop the stack multiple time")}};os.addNewStackLayer=_xe;var dxe=(t,e)=>{e&&t[ns._LAYERS_STORE_PROPERTY].splice(-1,1,e)};os.replaceCurrentStackRoute=dxe;var Exe=t=>t[ns._LAYERS_STORE_PROPERTY].reduce((e,r)=>e.replace(/\/+$/,"")+r);os.generateRoute=Exe});var JX=E(ss=>{"use strict";Object.defineProperty(ss,"__esModule",{value:!0});ss.ConnectInstrumentation=ss.ANONYMOUS_NAME=void 0;var fxe=(M(),P(U)),zX=re(),za=sO(),QX=KX(),Bf=ee(),Sxe=(ue(),P(He)),iO=XX();ss.ANONYMOUS_NAME="anonymous";var aO=class extends Bf.InstrumentationBase{constructor(e={}){super(QX.PACKAGE_NAME,QX.PACKAGE_VERSION,e)}init(){return[new Bf.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_patchApp(e){(0,Bf.isWrapped)(e.use)||this._wrap(e,"use",this._patchUse.bind(this)),(0,Bf.isWrapped)(e.handle)||this._wrap(e,"handle",this._patchHandle.bind(this))}_patchConstructor(e){let r=this;return function(...n){let o=e.apply(this,n);return r._patchApp(o),o}}_patchNext(e,r){return function(o){let s=e.apply(this,[o]);return r(),s}}_startSpan(e,r){let n,o,s;e?(n=za.ConnectTypes.REQUEST_HANDLER,s=za.ConnectNames.REQUEST_HANDLER,o=e):(n=za.ConnectTypes.MIDDLEWARE,s=za.ConnectNames.MIDDLEWARE,o=r.name||ss.ANONYMOUS_NAME);let i=`${s} - ${o}`,a={attributes:{[Sxe.SEMATTRS_HTTP_ROUTE]:e.length>0?e:"/",[za.AttributeNames.CONNECT_TYPE]:n,[za.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(i,a)}_patchMiddleware(e,r){let n=this,o=r.length===4;function s(){if(!n.isEnabled())return r.apply(this,arguments);let[i,a,c]=o?[1,2,3]:[0,1,2],u=arguments[i],l=arguments[a],p=arguments[c];(0,iO.replaceCurrentStackRoute)(u,e);let _=(0,zX.getRPCMetadata)(fxe.context.active());e&&_?.type===zX.RPCType.HTTP&&(_.route=(0,iO.generateRoute)(u));let d="";e?d=`request handler - ${e}`:d=`middleware - ${r.name||ss.ANONYMOUS_NAME}`;let S=n._startSpan(e,r);n._diag.debug("start span",d);let f=!1;function T(){f?n._diag.debug(`span ${S.name} - already finished`):(f=!0,n._diag.debug(`finishing span ${S.name}`),S.end()),l.removeListener("close",T)}return l.addListener("close",T),arguments[c]=n._patchNext(p,T),r.apply(this,arguments)}return Object.defineProperty(s,"length",{value:r.length,writable:!1,configurable:!0}),s}_patchUse(e){let r=this;return function(...n){let o=n[n.length-1],s=n[n.length-2]||"";return n[n.length-1]=r._patchMiddleware(s,o),e.apply(this,n)}}_patchHandle(e){let r=this;return function(){let[n,o]=[0,2],s=arguments[n],i=arguments[o],a=(0,iO.addNewStackLayer)(s);return typeof i=="function"&&(arguments[o]=r._patchOut(i,a)),e.apply(this,arguments)}}_patchOut(e,r){return function(...o){return r(),Reflect.apply(e,this,o)}}};ss.ConnectInstrumentation=aO});var e3=E(is=>{"use strict";var Txe=is&&is.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),ZX=is&&is.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Txe(e,t,r)};Object.defineProperty(is,"__esModule",{value:!0});ZX(sO(),is);ZX(JX(),is)});var s3=E(Qa=>{"use strict";Object.defineProperty(Qa,"__esModule",{value:!0});Qa.once=Qa.getSpanName=void 0;function hxe(t,e,r,n){return t==="execBulkLoad"&&n&&e?`${t} ${n} ${e}`:t==="callProcedure"?e?`${t} ${r} ${e}`:`${t} ${r}`:e?`${t} ${e}`:`${t}`}Qa.getSpanName=hxe;var gxe=t=>{let e=!1;return(...r)=>{if(!e)return e=!0,t(...r)}};Qa.once=gxe});var i3=E(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.PACKAGE_NAME=Ja.PACKAGE_VERSION=void 0;Ja.PACKAGE_VERSION="0.18.1";Ja.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var p3=E(Ff=>{"use strict";Object.defineProperty(Ff,"__esModule",{value:!0});Ff.TediousInstrumentation=void 0;var _l=(M(),P(U)),Axe=require("events"),Gf=ee(),as=(ue(),P(He)),a3=s3(),c3=i3(),l3=Symbol("opentelemetry.instrumentation-tedious.current-database"),u3=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function Hf(t){Object.defineProperty(this,l3,{value:t,writable:!0})}var kf=class t extends Gf.InstrumentationBase{constructor(e={}){super(c3.PACKAGE_NAME,c3.PACKAGE_VERSION,e)}init(){return[new Gf.InstrumentationNodeModuleDefinition(t.COMPONENT,[">=1.11.0 <20"],e=>{let r=e.Connection.prototype;for(let n of u3)(0,Gf.isWrapped)(r[n])&&this._unwrap(r,n),this._wrap(r,n,this._patchQuery(n));return(0,Gf.isWrapped)(r.connect)&&this._unwrap(r,"connect"),this._wrap(r,"connect",this._patchConnect),e},e=>{if(e===void 0)return;let r=e.Connection.prototype;for(let n of u3)this._unwrap(r,n);this._unwrap(r,"connect")})]}_patchConnect(e){return function(){var n,o;return Hf.call(this,(o=(n=this.config)===null||n===void 0?void 0:n.options)===null||o===void 0?void 0:o.database),this.removeListener("databaseChange",Hf),this.on("databaseChange",Hf),this.once("end",()=>{this.removeListener("databaseChange",Hf)}),e.apply(this,arguments)}}_patchQuery(e){return r=>{let n=this;function o(s){var i,a,c,u,l,p,_,d;if(!(s instanceof Axe.EventEmitter))return n._diag.warn(`Unexpected invocation of patched ${e} method. Span not recorded`),r.apply(this,arguments);let S=0,f=0,T=()=>f++,h=()=>S++,A=this[l3],N=(b=>{var v,X;return b.sqlTextOrProcedure==="sp_prepare"&&(!((X=(v=b.parametersByName)===null||v===void 0?void 0:v.stmt)===null||X===void 0)&&X.value)?b.parametersByName.stmt.value:b.sqlTextOrProcedure})(s),I=n.tracer.startSpan((0,a3.getSpanName)(e,A,N,s.table),{kind:_l.SpanKind.CLIENT,attributes:{[as.SEMATTRS_DB_SYSTEM]:as.DBSYSTEMVALUES_MSSQL,[as.SEMATTRS_DB_NAME]:A,[as.SEMATTRS_NET_PEER_PORT]:(a=(i=this.config)===null||i===void 0?void 0:i.options)===null||a===void 0?void 0:a.port,[as.SEMATTRS_NET_PEER_NAME]:(c=this.config)===null||c===void 0?void 0:c.server,[as.SEMATTRS_DB_USER]:(l=(u=this.config)===null||u===void 0?void 0:u.userName)!==null&&l!==void 0?l:(d=(_=(p=this.config)===null||p===void 0?void 0:p.authentication)===null||_===void 0?void 0:_.options)===null||d===void 0?void 0:d.userName,[as.SEMATTRS_DB_STATEMENT]:N,[as.SEMATTRS_DB_SQL_TABLE]:s.table}}),O=(0,a3.once)(b=>{s.removeListener("done",T),s.removeListener("doneInProc",T),s.removeListener("doneProc",h),s.removeListener("error",O),this.removeListener("end",O),I.setAttribute("tedious.procedure_count",S),I.setAttribute("tedious.statement_count",f),b&&I.setStatus({code:_l.SpanStatusCode.ERROR,message:b.message}),I.end()});return s.on("done",T),s.on("doneInProc",T),s.on("doneProc",h),s.once("error",O),this.on("end",O),typeof s.callback=="function"?n._wrap(s,"callback",n._patchCallbackQuery(O)):n._diag.error("Expected request.callback to be a function"),_l.context.with(_l.trace.setSpan(_l.context.active(),I),r,this,...arguments)}return Object.defineProperty(o,"length",{value:r.length,writable:!1}),o}}_patchCallbackQuery(e){return r=>function(n,o,s){return e(n),r.apply(this,arguments)}}};Ff.TediousInstrumentation=kf;kf.COMPONENT="tedious"});var d3=E(_3=>{"use strict";Object.defineProperty(_3,"__esModule",{value:!0})});var f3=E(cs=>{"use strict";var Rxe=cs&&cs.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),E3=cs&&cs.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Rxe(e,t,r)};Object.defineProperty(cs,"__esModule",{value:!0});E3(p3(),cs);E3(d3(),cs)});var g3=E(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.PACKAGE_NAME=Za.PACKAGE_VERSION=void 0;Za.PACKAGE_VERSION="0.43.1";Za.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var R3=E(qf=>{"use strict";Object.defineProperty(qf,"__esModule",{value:!0});qf.GenericPoolInstrumentation=void 0;var ec=(M(),P(U)),ni=ee(),A3=g3(),cO="generic-pool",uO=class extends ni.InstrumentationBase{constructor(e={}){super(A3.PACKAGE_NAME,A3.PACKAGE_VERSION,e),this._isDisabled=!1}init(){return[new ni.InstrumentationNodeModuleDefinition(cO,[">=3.0.0 <4"],e=>{let r=e.Pool;return(0,ni.isWrapped)(r.prototype.acquire)&&this._unwrap(r.prototype,"acquire"),this._wrap(r.prototype,"acquire",this._acquirePatcher.bind(this)),e},e=>{let r=e.Pool;return this._unwrap(r.prototype,"acquire"),e}),new ni.InstrumentationNodeModuleDefinition(cO,[">=2.4.0 <3"],e=>{let r=e.Pool;return(0,ni.isWrapped)(r.prototype.acquire)&&this._unwrap(r.prototype,"acquire"),this._wrap(r.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),e},e=>{let r=e.Pool;return this._unwrap(r.prototype,"acquire"),e}),new ni.InstrumentationNodeModuleDefinition(cO,[">=2.0.0 <2.4"],e=>(this._isDisabled=!1,(0,ni.isWrapped)(e.Pool)&&this._unwrap(e,"Pool"),this._wrap(e,"Pool",this._poolWrapper.bind(this)),e),e=>(this._isDisabled=!0,e))]}_acquirePatcher(e){let r=this;return function(...o){let s=ec.context.active(),i=r.tracer.startSpan("generic-pool.acquire",{},s);return ec.context.with(ec.trace.setSpan(s,i),()=>e.call(this,...o).then(a=>(i.end(),a),a=>{throw i.recordException(a),i.end(),a}))}}_poolWrapper(e){let r=this;return function(){let o=e.apply(this,arguments);return r._wrap(o,"acquire",r._acquireWithCallbacksPatcher.bind(r)),o}}_acquireWithCallbacksPatcher(e){let r=this;return function(o,s){if(r._isDisabled)return e.call(this,o,s);let i=ec.context.active(),a=r.tracer.startSpan("generic-pool.acquire",{},i);return ec.context.with(ec.trace.setSpan(i,a),()=>{e.call(this,(c,u)=>{if(a.end(),o)return o(c,u)},s)})}}};qf.GenericPoolInstrumentation=uO});var O3=E(oi=>{"use strict";var Ixe=oi&&oi.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),Pxe=oi&&oi.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Ixe(e,t,r)};Object.defineProperty(oi,"__esModule",{value:!0});Pxe(R3(),oi)});var lO=E(si=>{"use strict";Object.defineProperty(si,"__esModule",{value:!0});si.DEFAULT_CONFIG=si.EndOperation=void 0;var yxe;(function(t){t.AutoAck="auto ack",t.Ack="ack",t.AckAll="ackAll",t.Reject="reject",t.Nack="nack",t.NackAll="nackAll",t.ChannelClosed="channel closed",t.ChannelError="channel error",t.InstrumentationTimeout="instrumentation timeout"})(yxe=si.EndOperation||(si.EndOperation={}));si.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var b3=E(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.isConfirmChannelTracing=be.unmarkConfirmChannelTracing=be.markConfirmChannelTracing=be.getConnectionAttributesFromUrl=be.getConnectionAttributesFromServer=be.normalizeExchange=be.CONNECTION_ATTRIBUTES=be.CHANNEL_CONSUME_TIMEOUT_TIMER=be.CHANNEL_SPANS_NOT_ENDED=be.MESSAGE_STORED_SPAN=void 0;var pO=(M(),P(U)),oo=(ue(),P(He));be.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");be.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");be.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");be.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var _O=(0,pO.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),Mxe=t=>t!==""?t:"<default>";be.normalizeExchange=Mxe;var vxe=t=>t.replace(/:[^:@/]*@/,":***@"),y3=(t,e)=>t||(e==="AMQP"?5672:5671),M3=t=>{let e=t||"amqp";return(e.endsWith(":")?e.substring(0,e.length-1):e).toUpperCase()},v3=t=>t||"localhost",tc=(t,e,r,n)=>r?{[e]:r}:(pO.diag.error(`amqplib instrumentation: could not extract connection attribute ${n} from user supplied url`,{url:t}),{}),bxe=t=>{var e,r;let n=(r=(e=t.serverProperties.product)===null||e===void 0?void 0:e.toLowerCase)===null||r===void 0?void 0:r.call(e);return n?{[oo.SEMATTRS_MESSAGING_SYSTEM]:n}:{}};be.getConnectionAttributesFromServer=bxe;var Lxe=t=>{let e={[oo.SEMATTRS_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(t=t||"amqp://localhost",typeof t=="object"){let r=t,n=M3(r?.protocol);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_MESSAGING_PROTOCOL,n,"protocol")));let o=v3(r?.hostname);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_NET_PEER_NAME,o,"hostname")));let s=y3(r.port,n);Object.assign(e,Object.assign({},tc(t,oo.SEMATTRS_NET_PEER_PORT,s,"port")))}else{let r=vxe(t);e[oo.SEMATTRS_MESSAGING_URL]=r;try{let n=new URL(r),o=M3(n.protocol);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_MESSAGING_PROTOCOL,o,"protocol")));let s=v3(n.hostname);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_NET_PEER_NAME,s,"hostname")));let i=y3(n.port?parseInt(n.port):void 0,o);Object.assign(e,Object.assign({},tc(r,oo.SEMATTRS_NET_PEER_PORT,i,"port")))}catch(n){pO.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:n})}}return e};be.getConnectionAttributesFromUrl=Lxe;var Dxe=t=>t.setValue(_O,!0);be.markConfirmChannelTracing=Dxe;var xxe=t=>t.deleteValue(_O);be.unmarkConfirmChannelTracing=xxe;var Uxe=t=>t.getValue(_O)===!0;be.isConfirmChannelTracing=Uxe});var L3=E(rc=>{"use strict";Object.defineProperty(rc,"__esModule",{value:!0});rc.PACKAGE_NAME=rc.PACKAGE_VERSION=void 0;rc.PACKAGE_VERSION="0.46.1";rc.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var x3=E($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});$f.AmqplibInstrumentation=void 0;var Ie=(M(),P(U)),jf=re(),ce=ee(),Wt=(ue(),P(He)),wt=lO(),Le=b3(),D3=L3(),Yf=[">=0.5.5 <1"],dO=class extends ce.InstrumentationBase{constructor(e={}){super(D3.PACKAGE_NAME,D3.PACKAGE_VERSION,Object.assign(Object.assign({},wt.DEFAULT_CONFIG),e))}setConfig(e={}){super.setConfig(Object.assign(Object.assign({},wt.DEFAULT_CONFIG),e))}init(){let e=new ce.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",Yf,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new ce.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",Yf,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new ce.InstrumentationNodeModuleFile("amqplib/lib/connect.js",Yf,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new ce.InstrumentationNodeModuleDefinition("amqplib",Yf,void 0,void 0,[e,n,r])}patchConnect(e){return e=this.unpatchConnect(e),(0,ce.isWrapped)(e.connect)||this._wrap(e,"connect",this.getConnectPatch.bind(this)),e}unpatchConnect(e){return(0,ce.isWrapped)(e.connect)&&this._unwrap(e,"connect"),e}patchChannelModel(e,r){return(0,ce.isWrapped)(e.Channel.prototype.publish)||this._wrap(e.Channel.prototype,"publish",this.getPublishPatch.bind(this,r)),(0,ce.isWrapped)(e.Channel.prototype.consume)||this._wrap(e.Channel.prototype,"consume",this.getConsumePatch.bind(this,r)),(0,ce.isWrapped)(e.Channel.prototype.ack)||this._wrap(e.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,wt.EndOperation.Ack)),(0,ce.isWrapped)(e.Channel.prototype.nack)||this._wrap(e.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,wt.EndOperation.Nack)),(0,ce.isWrapped)(e.Channel.prototype.reject)||this._wrap(e.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,wt.EndOperation.Reject)),(0,ce.isWrapped)(e.Channel.prototype.ackAll)||this._wrap(e.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,wt.EndOperation.AckAll)),(0,ce.isWrapped)(e.Channel.prototype.nackAll)||this._wrap(e.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,wt.EndOperation.NackAll)),(0,ce.isWrapped)(e.Channel.prototype.emit)||this._wrap(e.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,ce.isWrapped)(e.ConfirmChannel.prototype.publish)||this._wrap(e.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,r)),e}unpatchChannelModel(e){return(0,ce.isWrapped)(e.Channel.prototype.publish)&&this._unwrap(e.Channel.prototype,"publish"),(0,ce.isWrapped)(e.Channel.prototype.consume)&&this._unwrap(e.Channel.prototype,"consume"),(0,ce.isWrapped)(e.Channel.prototype.ack)&&this._unwrap(e.Channel.prototype,"ack"),(0,ce.isWrapped)(e.Channel.prototype.nack)&&this._unwrap(e.Channel.prototype,"nack"),(0,ce.isWrapped)(e.Channel.prototype.reject)&&this._unwrap(e.Channel.prototype,"reject"),(0,ce.isWrapped)(e.Channel.prototype.ackAll)&&this._unwrap(e.Channel.prototype,"ackAll"),(0,ce.isWrapped)(e.Channel.prototype.nackAll)&&this._unwrap(e.Channel.prototype,"nackAll"),(0,ce.isWrapped)(e.Channel.prototype.emit)&&this._unwrap(e.Channel.prototype,"emit"),(0,ce.isWrapped)(e.ConfirmChannel.prototype.publish)&&this._unwrap(e.ConfirmChannel.prototype,"publish"),e}getConnectPatch(e){return function(n,o,s){return e.call(this,n,o,function(i,a){if(i==null){let c=(0,Le.getConnectionAttributesFromUrl)(n),u=(0,Le.getConnectionAttributesFromServer)(a);a[Le.CONNECTION_ATTRIBUTES]=Object.assign(Object.assign({},c),u)}s.apply(this,arguments)})}}getChannelEmitPatch(e){let r=this;return function(o){if(o==="close"){r.endAllSpansOnChannel(this,!0,wt.EndOperation.ChannelClosed,void 0);let s=this[Le.CHANNEL_CONSUME_TIMEOUT_TIMER];s&&clearInterval(s),this[Le.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&r.endAllSpansOnChannel(this,!0,wt.EndOperation.ChannelError,void 0);return e.apply(this,arguments)}}getAckAllPatch(e,r,n){let o=this;return function(i){return o.endAllSpansOnChannel(this,e,r,i),n.apply(this,arguments)}}getAckPatch(e,r,n){let o=this;return function(i,a,c){var u;let l=this,p=r===wt.EndOperation.Reject?a:c,_=(u=l[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&u!==void 0?u:[],d=_.findIndex(S=>S.msg===i);if(d<0)o.endConsumerSpan(i,e,r,p);else if(r!==wt.EndOperation.Reject&&a){for(let S=0;S<=d;S++)o.endConsumerSpan(_[S].msg,e,r,p);_.splice(0,d+1)}else o.endConsumerSpan(i,e,r,p),_.splice(d,1);return n.apply(this,arguments)}}getConsumePatch(e,r){let n=this;return function(s,i,a){let c=this;if(!Object.prototype.hasOwnProperty.call(c,Le.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:l}=n.getConfig();if(l){let p=setInterval(()=>{n.checkConsumeTimeoutOnChannel(c)},l);p.unref(),c[Le.CHANNEL_CONSUME_TIMEOUT_TIMER]=p}c[Le.CHANNEL_SPANS_NOT_ENDED]=[]}let u=function(l){var p,_,d,S,f;if(!l)return i.call(this,l);let T=(p=l.properties.headers)!==null&&p!==void 0?p:{},h=Ie.propagation.extract(Ie.ROOT_CONTEXT,T),A=(_=l.fields)===null||_===void 0?void 0:_.exchange,N;if(n._config.useLinksForConsume){let v=h?(d=Ie.trace.getSpan(h))===null||d===void 0?void 0:d.spanContext():void 0;h=void 0,v&&(N=[{context:v}])}let I=n.tracer.startSpan(`${s} process`,{kind:Ie.SpanKind.CONSUMER,attributes:Object.assign(Object.assign({},(S=c?.connection)===null||S===void 0?void 0:S[Le.CONNECTION_ATTRIBUTES]),{[Wt.SEMATTRS_MESSAGING_DESTINATION]:A,[Wt.SEMATTRS_MESSAGING_DESTINATION_KIND]:Wt.MESSAGINGDESTINATIONKINDVALUES_TOPIC,[Wt.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]:(f=l.fields)===null||f===void 0?void 0:f.routingKey,[Wt.SEMATTRS_MESSAGING_OPERATION]:Wt.MESSAGINGOPERATIONVALUES_PROCESS,[Wt.SEMATTRS_MESSAGING_MESSAGE_ID]:l?.properties.messageId,[Wt.SEMATTRS_MESSAGING_CONVERSATION_ID]:l?.properties.correlationId}),links:N},h),{consumeHook:O}=n.getConfig();O&&(0,ce.safeExecuteInTheMiddle)(()=>O(I,{moduleVersion:e,msg:l}),v=>{v&&Ie.diag.error("amqplib instrumentation: consumerHook error",v)},!0),a?.noAck||(c[Le.CHANNEL_SPANS_NOT_ENDED].push({msg:l,timeOfConsume:(0,jf.hrTime)()}),l[Le.MESSAGE_STORED_SPAN]=I);let b=h||Ie.ROOT_CONTEXT;Ie.context.with(Ie.trace.setSpan(b,I),()=>{i.call(this,l)}),a?.noAck&&(n.callConsumeEndHook(I,l,!1,wt.EndOperation.AutoAck),I.end())};return arguments[1]=u,r.apply(this,arguments)}}getConfirmedPublishPatch(e,r){let n=this;return function(s,i,a,c,u){let l=this,{span:p,modifiedOptions:_}=n.createPublishSpan(n,s,i,l,c),{publishHook:d}=n.getConfig();d&&(0,ce.safeExecuteInTheMiddle)(()=>d(p,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:_,isConfirmChannel:!0}),h=>{h&&Ie.diag.error("amqplib instrumentation: publishHook error",h)},!0);let S=function(h,A){try{u?.call(this,h,A)}finally{let{publishConfirmHook:N}=n.getConfig();N&&(0,ce.safeExecuteInTheMiddle)(()=>N(p,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:c,isConfirmChannel:!0,confirmError:h}),I=>{I&&Ie.diag.error("amqplib instrumentation: publishConfirmHook error",I)},!0),h&&p.setStatus({code:Ie.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),p.end()}},f=(0,Le.markConfirmChannelTracing)(Ie.context.active()),T=[...arguments];return T[3]=_,T[4]=Ie.context.bind((0,Le.unmarkConfirmChannelTracing)(Ie.trace.setSpan(f,p)),S),Ie.context.with(f,r.bind(this,...T))}}getPublishPatch(e,r){let n=this;return function(s,i,a,c){if((0,Le.isConfirmChannelTracing)(Ie.context.active()))return r.apply(this,arguments);{let u=this,{span:l,modifiedOptions:p}=n.createPublishSpan(n,s,i,u,c),{publishHook:_}=n.getConfig();_&&(0,ce.safeExecuteInTheMiddle)(()=>_(l,{moduleVersion:e,exchange:s,routingKey:i,content:a,options:p,isConfirmChannel:!1}),f=>{f&&Ie.diag.error("amqplib instrumentation: publishHook error",f)},!0);let d=[...arguments];d[3]=p;let S=r.apply(this,d);return l.end(),S}}}createPublishSpan(e,r,n,o,s){var i;let a=(0,Le.normalizeExchange)(r),c=e.tracer.startSpan(`publish ${a}`,{kind:Ie.SpanKind.PRODUCER,attributes:Object.assign(Object.assign({},o.connection[Le.CONNECTION_ATTRIBUTES]),{[Wt.SEMATTRS_MESSAGING_DESTINATION]:r,[Wt.SEMATTRS_MESSAGING_DESTINATION_KIND]:Wt.MESSAGINGDESTINATIONKINDVALUES_TOPIC,[Wt.SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY]:n,[Wt.SEMATTRS_MESSAGING_MESSAGE_ID]:s?.messageId,[Wt.SEMATTRS_MESSAGING_CONVERSATION_ID]:s?.correlationId})}),u=s??{};return u.headers=(i=u.headers)!==null&&i!==void 0?i:{},Ie.propagation.inject(Ie.trace.setSpan(Ie.context.active(),c),u.headers),{span:c,modifiedOptions:u}}endConsumerSpan(e,r,n,o){let s=e[Le.MESSAGE_STORED_SPAN];s&&(r!==!1&&s.setStatus({code:Ie.SpanStatusCode.ERROR,message:n!==wt.EndOperation.ChannelClosed&&n!==wt.EndOperation.ChannelError?`${n} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:n}),this.callConsumeEndHook(s,e,r,n),s.end(),e[Le.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(e,r,n,o){var s;((s=e[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&s!==void 0?s:[]).forEach(a=>{this.endConsumerSpan(a.msg,r,n,o)}),e[Le.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(e,r,n,o){let{consumeEndHook:s}=this.getConfig();s&&(0,ce.safeExecuteInTheMiddle)(()=>s(e,{msg:r,rejected:n,endOperation:o}),i=>{i&&Ie.diag.error("amqplib instrumentation: consumerEndHook error",i)},!0)}checkConsumeTimeoutOnChannel(e){var r;let n=(0,jf.hrTime)(),o=(r=e[Le.CHANNEL_SPANS_NOT_ENDED])!==null&&r!==void 0?r:[],s,{consumeTimeoutMs:i}=this.getConfig();for(s=0;s<o.length;s++){let a=o[s],c=(0,jf.hrTimeDuration)(a.timeOfConsume,n);if((0,jf.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,wt.EndOperation.InstrumentationTimeout,!0)}o.splice(0,s)}};$f.AmqplibInstrumentation=dO});var w3=E(us=>{"use strict";var wxe=us&&us.__createBinding||(Object.create?(function(t,e,r,n){n===void 0&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}):(function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]})),U3=us&&us.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&wxe(e,t,r)};Object.defineProperty(us,"__esModule",{value:!0});U3(x3(),us);U3(lO(),us)});var nz=require("@modelcontextprotocol/sdk/server/index.js"),oz=require("@modelcontextprotocol/sdk/server/stdio.js"),yn=require("@modelcontextprotocol/sdk/types.js");async function mO(t,e){let r=e?.timeoutMs??3e4,n=new AbortController,o=setTimeout(()=>n.abort(),r);try{let{timeoutMs:s,...i}=e??{};return await fetch(t,{...i,signal:n.signal})}finally{clearTimeout(o)}}var Qe=class extends Error{retryable;code;reason;constructor(e,r,n,o){super(e),this.name="CardDeclinedError",this.retryable=r,this.code=n,this.reason=o}};var dz=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;function gO(t,e){let r=hO(t),n=hO(e);if(!r||!n)return!1;for(let o=0;o<3;o++)if(r.main[o]!==n.main[o])return r.main[o]>n.main[o];return r.pre&&!n.pre?!1:!r.pre&&n.pre?!0:!r.pre&&!n.pre?!1:Ez(r.pre,n.pre)>0}function hO(t){if(typeof t!="string")return null;let r=t.trim().replace(/^v/,"").match(dz);return r?{main:[Number(r[1]),Number(r[2]),Number(r[3])],pre:r[4]??null}:null}function Ez(t,e){let r=t.split("."),n=e.split("."),o=Math.max(r.length,n.length);for(let s=0;s<o;s++){if(s>=r.length)return-1;if(s>=n.length)return 1;let i=r[s],a=n[s],c=/^\d+$/.test(i),u=/^\d+$/.test(a);if(c&&u){let l=Number(i)-Number(a);if(l!==0)return l}else{if(c)return-1;if(u)return 1;if(i<a)return-1;if(i>a)return 1}}return 0}function ml(){return!!(AO(process.env.VISA_CLI_NO_UPDATE_CHECK)||AO(process.env.CI)||process.env.NODE_ENV==="test")}function AO(t){if(t===void 0)return!1;let e=t.trim().toLowerCase();return!(e===""||e==="0"||e==="false"||e==="no"||e==="off")}var io=C(require("fs")),NO=C(require("path"));var hl=C(require("fs")),RO=C(require("path")),OO=C(require("os"));var Jf=RO.join(OO.homedir(),".visa-mcp"),vr=class{static ensureConfigDir(){hl.existsSync(Jf)||hl.mkdirSync(Jf,{recursive:!0,mode:448})}static getConfigDir(){return Jf}static TOOL_STATES={login:!0,get_status:!0,get_cards:!0,add_card:!0,pay:!0,transaction_history:!0,update_spending_controls:!0,enroll_device:!1,verify_otp:!1,reset:!0,batch:!0,generate_x402_image:!1,browser_launch:!1,browser_navigate:!1,browser_snapshot:!1,browser_click:!1,browser_type:!1,browser_scroll:!1,generate_music_card:!1,generate_image_card:!0,query_onchain_prices_card:!0,generate_music_tempo_card:!0,check_music_status_tempo_card:!0,generate_image_fast_card:!0,pxlwall_card:!1,generate_video_tempo_card:!0};static loadToolStates(){return{...this.TOOL_STATES}}static getDisabledTools(){let e=new Set;for(let[r,n]of Object.entries(this.TOOL_STATES))n||e.add(r);return e}static isToolDisabled(e){return this.TOOL_STATES[e]===!1}};var fz="settings.json";function gl(){return NO.join(vr.getConfigDir(),fz)}var ai={"auth.serverUrl":{type:"string",description:"Auth server base URL. Override for staging / self-hosted backends.",requiresRestart:!0,validate:t=>{if(typeof t!="string")throw new Error("auth.serverUrl must be a string");let e;try{e=new URL(t)}catch{throw new Error(`auth.serverUrl must be a valid URL (got: ${JSON.stringify(t)})`)}if(e.protocol!=="https:"&&e.protocol!=="http:")throw new Error(`auth.serverUrl must use http or https (got: ${e.protocol})`)}},"ui.suppressBrowser":{type:"boolean",description:"When true, the CLI/MCP server stops auto-opening result URLs in your browser."},"ui.suppressFeed":{type:"boolean",description:"When true, generated images/music are not auto-submitted to the public Made-with-Visa feed."},"tools.meta":{type:"boolean",description:"Show category meta-tools (generate_image, generate_music, ...). Restart required.",requiresRestart:!0},"tools.specific":{type:"boolean",description:"Show hardcoded per-merchant tools (generate_image_card, query_onchain_prices_card, ...). Restart required.",requiresRestart:!0},"tools.discover":{type:"boolean",description:"Show the dynamic-catalog tools (discover_tools, execute_tool). Restart required.",requiresRestart:!0}};function Al(){let t=gl();if(!io.existsSync(t))return{};try{let e=io.readFileSync(t,"utf-8"),r=JSON.parse(e);return!r||typeof r!="object"||Array.isArray(r)?{}:r}catch{return{}}}function IO(t){vr.ensureConfigDir();let e=gl(),r=`${e}.tmp`,n=JSON.stringify(t,null,2)+`
|
|
13
|
+
`;io.writeFileSync(r,n,{mode:384}),io.renameSync(r,e)}function Zf(t){let e=Al()[t];return typeof e=="string"?e:void 0}function ds(t){let e=Al()[t];if(typeof e=="boolean")return e;if(e==="true")return!0;if(e==="false")return!1}var ps=class extends Error{constructor(e){let r=Object.keys(ai).sort().join(", ");super(`Unknown setting "${e}". Settable keys: ${r}. For server-controlled values (biometric.*, spending.*) use the dedicated tools (biometric_on/off, update_spending_controls).`),this.name="UnknownSettingKeyError"}},_s=class extends Error{constructor(e){let r="";e.startsWith("biometric.")?r="biometric_on / biometric_off":e.startsWith("spending.")?r="update_spending_controls":e.startsWith("cards.")?r="add_card / remove_card / set_default_card":e.startsWith("account.")&&(r="login / reset"),super(`"${e}" is a server-controlled value and cannot be set via config set. `+(r?`Use ${r} instead.`:"No client-side override is supported.")),this.name="ServerOnlySettingError"}},PO=["biometric.","spending.","account.","cards.","biometric"];function CO(t,e){if(PO.some(s=>t.startsWith(s)))throw new _s(t);let r=ai[t];if(!r)throw new ps(t);let n;if(r.type==="boolean")if(typeof e=="boolean")n=e;else if(typeof e=="string"){let s=e.toLowerCase();if(s==="true")n=!0;else if(s==="false")n=!1;else throw new Error(`${t} expects true or false (got: ${JSON.stringify(e)})`)}else throw new Error(`${t} expects a boolean (got: ${typeof e})`);else{if(typeof e!="string"||e.length===0)throw new Error(`${t} expects a non-empty string`);n=e}r.validate&&r.validate(n);let o=Al();return o[t]=n,IO(o),{key:t,value:n,requiresRestart:!!r.requiresRestart,path:gl()}}function yO(t){if(PO.some(o=>t.startsWith(o)))throw new _s(t);let e=ai[t];if(!e)throw new ps(t);let r=Al(),n=t in r;return n&&(delete r[t],IO(r)),{key:t,removed:n,requiresRestart:n&&!!e.requiresRestart,path:gl()}}var Sz="https://auth.visacli.sh";function Rl(){let t=process.env.VISA_AUTH_URL;if(t!==void 0&&t!=="")return t;let e=Zf("auth.serverUrl");return e!==void 0?e:Sz}function MO(){let t=process.env.VISA_SUPPRESS_BROWSER;return t!==void 0?t==="true":ds("ui.suppressBrowser")??!1}function vO(){let t=process.env.VISA_SUPPRESS_FEED;return t!==void 0?t==="true":ds("ui.suppressFeed")??!1}function ci(){let t=process.env.VISA_META_TOOLS;return t!==void 0?t!=="false":ds("tools.meta")??!0}function ui(){let t=process.env.VISA_SPECIFIC_TOOLS;return t!==void 0?t!=="false":ds("tools.specific")??!0}function li(){let t=process.env.VISA_DISCOVER_TOOLS;return t!==void 0?t!=="false":ds("tools.discover")??!0}var eS="1.14.0-rc.0",Ol=class{constructor(e){this.getSessionToken=e;this.baseUrl=Rl()}getSessionToken;baseUrl;lastSignals={};parseServerSignals(e){if(this.lastSignals={},!ml()){let n=e.headers.get("X-Latest-Version"),o=e.headers.get("X-Update-Message");n&&gO(n,eS)&&(this.lastSignals.updateAvailable={version:n,message:o||`Update available: v${n}. Run: npm install -g @visa/cli && visa-cli setup`})}let r=e.headers.get("X-Feedback-Prompt");if(r)try{this.lastSignals.feedbackPrompt=JSON.parse(r)}catch{}}getClientVersion(){return eS}async request(e,r,n,o,s){let i=await this.getSessionToken();if(!i)throw new Error("Not logged in. Sign up at https://visacli.sh or run: visa-cli setup");let a={Authorization:`Bearer ${i}`};s&&(e==="GET"?a["X-User-Context"]=s.replace(/[\r\n\0]/g," ").slice(0,1e3):n={...n||{},user_context:s}),n&&(a["Content-Type"]="application/json");let c;try{c=await mO(`${this.baseUrl}${r}`,{method:e,headers:{...a,"X-Visa-CLI-Version":eS},body:n?JSON.stringify(n):void 0,timeoutMs:o})}catch(l){throw l.name==="AbortError"||l.message?.includes("aborted")?new Error("The request timed out. The server may be under heavy load. Please try again."):new Error("Cannot reach the Visa CLI server. Check your internet connection and try again.")}if(this.parseServerSignals(c),c.status===401)throw new Error("Your session has expired. Run: visa-cli setup");if(c.status===429){let l=c.headers.get("Retry-After")||"3";throw new Error(`Rate limited \u2014 wait ${l}s. Tip: use the batch tool to combine multiple requests into one.`)}if(c.status===503)throw new Error("Visa CLI is temporarily unavailable. Check https://visacli.sh for status.");let u;try{u=await c.json()}catch{throw c.status===500?new Error(`Server error on ${r}. Try again or check https://visacli.sh for status.`):new Error(`Unexpected response from ${r}. Try again.`)}if(!c.ok)throw c.status===500?new Error(`Server error on ${r}. Try again or check https://visacli.sh for status.`):u?.declined?new Qe(u.error||"Your card was declined.",!!u.retryable,u.code,u.reason):new Error(u?.error||`Request failed (${c.status}). Try again.`);return u}async pay(e,r){return this.request("POST","/v1/pay",e,void 0,r)}async shortcut(e,r,n,o){return this.request("POST",`/v1/shortcuts/${encodeURIComponent(e)}`,r,n,o)}async batch(e,r,n){return this.request("POST","/v1/batch",e,r,n)}async catalogSearch(e,r){let n=new URLSearchParams;e&&n.set("q",e),r&&n.set("category",r);let o=n.toString();return this.request("GET",`/v1/catalog${o?`?${o}`:""}`)}async catalogTool(e){try{return await this.request("GET",`/v1/catalog/${encodeURIComponent(e)}`)}catch{return null}}async discoverMerchantRoutes(e){try{return await this.request("GET",`/v1/platform/discover/${encodeURIComponent(e)}`)}catch{return null}}async paymentPreview(e,r){return this.request("POST","/v1/payment-preview",e,void 0,r)}async getStatus(e){return this.request("GET","/v1/status",void 0,void 0,e)}async getTransactions(e){return this.request("GET","/v1/transactions",void 0,void 0,e)}async updateSpendingControls(e,r){return this.request("POST","/v1/spending-controls",e,void 0,r)}async removeCard(e,r,n){return this.request("DELETE",`/v1/cards/${encodeURIComponent(String(e))}`,r,void 0,n)}async setDefaultCard(e,r,n){return this.request("POST",`/v1/cards/${encodeURIComponent(String(e))}/default`,r,void 0,n)}async getAttestationChallenge(){return this.request("GET","/v1/attestation-challenge")}async registerAttestationKey(e){return this.request("POST","/v1/attestation-key",{publicKey:e})}async setBiometricPreference(e,r){return this.request("POST","/v1/biometric-preference",{...e,confirm:!0},void 0,r)}async logout(e,r){return this.request("POST","/v1/logout",e,void 0,r)}async feedback(e,r,n){return this.request("POST","/v1/feedback",{message:e,...r&&{transaction_id:r}},void 0,n)}async createAppApiKey(e){return this.request("POST","/v1/api/keys",e)}async listAppApiKeys(){return this.request("GET","/v1/api/keys")}async revokeAppApiKey(e){return this.request("DELETE",`/v1/api/keys/${encodeURIComponent(String(e))}`)}async feedSubmit(e){return this.request("POST","/v1/feed",e)}async feedList(e){let r=new URLSearchParams;e?.tab&&r.set("tab",e.tab),e?.limit&&r.set("limit",String(e.limit)),e?.offset&&r.set("offset",String(e.offset));let n=r.toString();return this.request("GET",`/v1/feed${n?"?"+n:""}`)}async feedVote(e,r){return this.request("POST",`/v1/feed/${encodeURIComponent(e)}/vote`,{direction:r})}async feedApprove(e){return this.request("POST",`/v1/feed/${encodeURIComponent(e)}/approve`)}async feedDelete(e){return this.request("DELETE",`/v1/feed/${encodeURIComponent(e)}`)}async feedPending(){return this.request("GET","/v1/feed/pending")}async submitFeedback(e,r,n){return this.request("POST","/v1/feedback",{message:e,...r&&{transaction_id:r}},void 0,n)}async getFeedback(e,r){let n=new URLSearchParams;e&&n.set("limit",String(e));let o=n.toString();return this.request("GET",`/v1/feedback${o?"?"+o:""}`,void 0,void 0,r)}async submitRatedFeedback(e){return this.request("POST","/v1/feedback",e)}};var sS=require("child_process"),wO=require("util"),VO=C(require("crypto")),dt=C(require("fs")),BO=C(require("os")),zr=C(require("path"));var Gt=C(require("fs")),nS=C(require("path")),bO=C(require("os")),rS=nS.join(bO.homedir(),".visa-mcp"),oc=nS.join(rS,"mcp-server.log"),Tz=5*1024*1024,tS=null;function mz(){Gt.existsSync(rS)||Gt.mkdirSync(rS,{recursive:!0,mode:448})}function hz(){if(!tS){if(mz(),Gt.existsSync(oc)&&Gt.statSync(oc).size>Tz){let e=oc+".1";Gt.existsSync(e)&&Gt.unlinkSync(e),Gt.renameSync(oc,e)}tS=Gt.createWriteStream(oc,{flags:"a"})}return tS}function gz(t){return t==="WARN"||t==="ERROR"?!0:process.env.VISA_CLI_DEBUG==="1"||process.env.VISA_VERBOSE==="1"}function Nl(t,...e){let r=new Date().toISOString(),n=e.map(s=>typeof s=="string"?s:JSON.stringify(s,null,2)).join(" "),o=`[${r}] [${t}] ${n}
|
|
14
|
+
`;gz(t)&&process.stderr.write(o),hz().write(o)}var R={debug:(...t)=>Nl("DEBUG",...t),info:(...t)=>Nl("INFO",...t),warn:(...t)=>Nl("WARN",...t),error:(...t)=>Nl("ERROR",...t)};var pi=(0,wO.promisify)(sS.execFile),Cl=zr.join(BO.homedir(),".visa-mcp","bin"),Es=zr.join(Cl,"Visa CLI"),Az=zr.join(__dirname,"..","native"),LO="5",DO=zr.join(Cl,"visa-keychain.version"),xO=zr.join(Cl,"visa-keychain.sha256");function UO(t){let e=dt.readFileSync(t);return VO.createHash("sha256").update(e).digest("hex")}async function GO(){try{if(dt.readFileSync(DO,"utf-8").trim()===LO&&dt.existsSync(Es)){let n=dt.readFileSync(xO,"utf-8").trim();if(UO(Es)!==n)R.warn("binary:hash-mismatch",{message:"Binary hash mismatch \u2014 possible tampering detected. Recompiling from source."}),dt.unlinkSync(Es);else return Es}}catch{}let t=zr.join(Az,"visa-keychain.m");if(dt.existsSync(t)||(t=zr.resolve(__dirname,"..","..","native","visa-keychain.m")),dt.existsSync(t)||(t=zr.resolve(__dirname,"..","native","visa-keychain.m")),!dt.existsSync(t))throw new Error("visa-keychain.m source not found. Reinstall Visa CLI.");dt.mkdirSync(Cl,{recursive:!0,mode:448});try{await pi("clang",["-framework","Security","-framework","LocalAuthentication","-framework","Foundation","-framework","AppKit","-o",Es,t],{timeout:3e4})}catch(r){throw r.code==="ENOENT"?new Error("Xcode Command Line Tools required. Install: xcode-select --install"):r}let e=UO(Es);return dt.writeFileSync(xO,e,{mode:384}),dt.writeFileSync(DO,LO,{mode:384}),Es}async function HO(t){let e=await GO(),r;try{r=(await pi(e,t,{timeout:6e4})).stdout}catch(s){r=s.stdout||"";let i=r.trim();throw i.startsWith("ERROR:")?new Error(i.slice(6)):new Error(s.stderr?.trim()||s.message||"Unknown error")}let n=r.trim();if(n.startsWith("OK:"))return n.slice(3);if(n==="OK")return;let o=n.startsWith("ERROR:")?n.slice(6):"Unknown error";throw new Error(o)}var oS=null;function bn(){return process.env.VISA_MOCK_TOUCHID==="true"?!0:process.platform!=="darwin"?!1:oS!==null?oS:(oS=!0,!0)}var Il="visa-cli",Pl="attestation-key";async function Rz(t){try{await pi("security",["delete-generic-password","-s",Il,"-a",Pl],{timeout:5e3})}catch{}await pi("security",["add-generic-password","-s",Il,"-a",Pl,"-w",t],{timeout:5e3})}async function Oz(){try{let{stdout:t}=await pi("security",["find-generic-password","-s",Il,"-a",Pl,"-w"],{timeout:5e3});return t.trim()||null}catch{return null}}async function kO(){let t=await HO(["generate-key"]);if(!t)throw new Error("Key generation returned no output");let e=t.indexOf(":");if(e<0)throw new Error("Unexpected generate-key output format");let r=t.slice(0,e),n=t.slice(e+1);return await Rz(r),n}async function FO(t,e){if(process.env.VISA_MOCK_TOUCHID==="true")return Promise.resolve("mock-ecdsa-signature-for-testing");let r=await Oz();if(!r)throw new Error("Attestation key not found. Run setup to generate a new key.");let n=await GO(),o=["sign",t];return e&&o.push(e),new Promise((s,i)=>{let a=(0,sS.execFile)(n,o,{timeout:6e4},(c,u)=>{let l=(u||"").trim();if(c){l.startsWith("ERROR:")?i(new Error(l.slice(6))):i(new Error(c.stderr?.trim()||c.message||"Unknown error"));return}l.startsWith("OK:")?s(l.slice(3)):i(new Error(l.startsWith("ERROR:")?l.slice(6):"Unknown error"))});a.stdin.write(r),a.stdin.end()})}async function qO(){try{await pi("security",["delete-generic-password","-s",Il,"-a",Pl],{timeout:5e3})}catch{}try{await HO(["delete-key"])}catch{}}var vl=require("child_process"),jO=require("util"),co=C(require("fs")),bl=C(require("os")),lS=C(require("path"));var Ln="6820f6e91b762e645c9bf020c0d3673bb99d4a25a824880c0d548e10bb9bc7b1";var Qr=(0,jO.promisify)(vl.execFile),pS=lS.join(bl.homedir(),".visa-mcp"),sc=lS.join(pS,"session-token"),lr="visa-cli",ao="session-token",yl="rc-access",Nz=5e3,Ml=class extends Error{constructor(e){super(e),this.name="CredentialAccessError"}};function Iz(t){let e=t;return[e?.message,e?.stderr].filter(r=>typeof r=="string").join(`
|
|
15
|
+
`)}function YO(t){let e=t;if(e?.code==="EPERM"||e?.code==="EACCES")return!0;let r=Iz(t).toLowerCase();return r.includes("operation not permitted")||r.includes("permission denied")}async function Pz(){try{let{stdout:t}=await Qr("security",["find-generic-password","-s",lr,"-a",ao,"-w"],{timeout:5e3});return t.trim()||null}catch(t){if(YO(t))throw new Ml("Unable to read Visa CLI credentials from macOS Keychain. In sandboxed agents such as Codex, rerun with keychain access or run this command outside the sandbox.");return null}}async function Cz(t){try{try{await Qr("security",["delete-generic-password","-s",lr,"-a",ao],{timeout:5e3})}catch{}return await Qr("security",["add-generic-password","-s",lr,"-a",ao,"-w",t],{timeout:5e3}),!0}catch{return!1}}async function yz(){try{await Qr("security",["delete-generic-password","-s",lr,"-a",ao],{timeout:5e3})}catch{}}async function Mz(){if(!_S())return null;try{let{stdout:t}=await Qr("secret-tool",["lookup","service",lr,"account",ao],{timeout:5e3});return t.trim()||null}catch{return null}}async function vz(t){if(!_S())return!1;try{let e=(0,vl.execFile)("secret-tool",["store","--label",`${lr} ${ao}`,"service",lr,"account",ao]);return e.stdin?(e.stdin.write(t),e.stdin.end(),await Promise.race([new Promise((r,n)=>{e.on("exit",o=>o===0?r():n(new Error(`secret-tool exited ${o}`))),e.on("error",n)}),new Promise((r,n)=>setTimeout(()=>{e.kill(),n(new Error("secret-tool timed out"))},Nz))]),!0):!1}catch{return!1}}async function bz(){if(_S())try{await Qr("secret-tool",["clear","service",lr,"account",ao],{timeout:5e3})}catch{}}function _S(){return!!process.env.DBUS_SESSION_BUS_ADDRESS}async function Lz(){try{let{stdout:t}=await Qr("security",["find-generic-password","-s",lr,"-a",yl,"-w"],{timeout:5e3});return t.trim()||null}catch{return null}}async function Dz(t){try{try{await Qr("security",["delete-generic-password","-s",lr,"-a",yl],{timeout:5e3})}catch{}await Qr("security",["add-generic-password","-s",lr,"-a",yl,"-w",t],{timeout:5e3})}catch{}}async function xz(){try{await Qr("security",["delete-generic-password","-s",lr,"-a",yl],{timeout:5e3})}catch{}}function cS(){try{return co.readFileSync(sc,"utf-8").trim()||null}catch(t){if(YO(t))throw new Ml(`Unable to read Visa CLI credentials from ${sc}. Check file permissions or rerun with access to the Visa CLI credential directory.`);return null}}function $O(t){co.mkdirSync(pS,{recursive:!0,mode:448}),co.writeFileSync(sc,t,{mode:384}),process.platform==="win32"&&Uz(sc)}function uS(){try{co.unlinkSync(sc)}catch{}}function Uz(t){try{let e=bl.userInfo().username;(0,vl.execFile)("icacls",[t,"/inheritance:r","/grant:r",`${e}:F`],{timeout:5e3},r=>{r&&console.error(`[visa-cli] icacls ACL restriction failed: ${r.message}`)})}catch(e){console.error(`[visa-cli] Failed to invoke icacls: ${e instanceof Error?e.message:String(e)}`)}}function aS(){switch(process.platform){case"darwin":return{get:Pz,store:Cz,delete:yz};case"linux":return{get:Mz,store:vz,delete:bz};default:return{get:async()=>cS(),store:async t=>{try{return $O(t),!0}catch{return!1}},delete:async()=>uS(),storesInSessionFile:!0}}}var Xt=class{static async getSessionToken(){if(process.env.VISA_MOCK_KEYCHAIN==="true")return Promise.resolve("mock-session-token-for-testing");let e=aS(),r=await e.get();if(r)return r;let n=cS();return n?(await e.store(n),n):null}static async saveSessionToken(e){if(process.env.VISA_MOCK_KEYCHAIN==="true")return;let r=aS();if(await r.store(e)){if(await r.get()===e){r.storesInSessionFile||uS();return}await r.delete()}if($O(e),cS()!==e)throw new Error("Failed to persist session token. "+(process.platform==="darwin"?'Check Keychain Access permissions for "visa-cli".':`Ensure ${pS} is writable.`))}static async getRcAccessToken(){return process.env.VISA_MOCK_KEYCHAIN==="true"?Ln:Lz()}static async saveRcAccessToken(e){process.env.VISA_MOCK_KEYCHAIN!=="true"&&await Dz(e)}static async deleteSessionToken(){if(process.env.VISA_MOCK_KEYCHAIN==="true")return;await aS().delete(),uS()}static async clearAll(){await this.deleteSessionToken(),await xz()}};var Ll={generate_image:{intro:"Generate an AI image.",tiers:{balanced:{toolId:"fal-flux-pro",priceCents:4,notes:"FLUX Pro v1.1, 1K, ~10s (DEFAULT \u2014 good quality/speed tradeoff)"},fast:{toolId:"fal-flux-schnell",priceCents:1,notes:"FLUX Schnell, 1K, ~3s (drafts, iteration, cheapest)"},pro:{toolId:"fal-flux-pro-ultra",priceCents:6,notes:"FLUX Pro Ultra, 2K, ~30s (hero images, detail)"},text_heavy:{toolId:"fal-ideogram-v2",priceCents:8,notes:"Ideogram V2 \u2014 best when the image contains rendered text/logos"},vector:{toolId:"fal-recraft-v3",priceCents:5,notes:"Recraft V3 \u2014 vector/flat/illustration styles"}},guidance:"If the user didn't specify a tier, pick 'balanced' unless the prompt clearly signals otherwise (text \u2192 text_heavy, logo/icon \u2192 vector, quick test \u2192 fast, hero/print \u2192 pro).",inputProperties:{prompt:{type:"string",description:"Text description of the image to generate."},aspect_ratio:{type:"string",description:'Aspect ratio, e.g. "16:9", "1:1", "9:16".',default:"16:9"}},required:["prompt"]},generate_video:{intro:"Generate an AI video from a text prompt.",tiers:{balanced:{toolId:"fal-minimax-video",priceCents:15,notes:"MiniMax \u2014 good quality/price balance (DEFAULT)"},fast:{toolId:"fal-wan-video",priceCents:10,notes:"Wan \u2014 cheapest, shorter clips"},pro:{toolId:"fal-kling-video",priceCents:20,notes:"Kling \u2014 highest quality, cinematic"}},guidance:"Show the tier menu with prices unless the user specified one. Videos take 60-180s to generate.",inputProperties:{prompt:{type:"string",description:"Text description of the video scene."},aspect_ratio:{type:"string",description:'Aspect ratio, e.g. "16:9" or "9:16".',default:"16:9"}},required:["prompt"]},generate_music:{intro:"Generate an original music track from a prompt.",tiers:{suno:{toolId:"suno-music",priceCents:10,notes:"Suno v4 \u2014 songs with vocals, lyrics, full arrangement"}},guidance:"Takes ~60-90s. Returns an audio URL the user can play.",inputProperties:{prompt:{type:"string",description:"Musical style / mood / lyrics hint."},instrumental:{type:"boolean",description:"True for instrumental (no vocals), false for vocal track.",default:!1}},required:["prompt"]},generate_audio:{intro:"Generate speech (voice cloning) or sound effects.",tiers:{tts:{toolId:"fal-metavoice",priceCents:3,notes:"MetaVoice \u2014 voice cloning TTS (requires a voice sample URL)"},sfx:{toolId:"fal-stable-audio",priceCents:4,notes:"Stable Audio \u2014 sound effects and ambient from a prompt"}},guidance:"For tts: provide text + audio_url (voice sample to clone). For sfx: provide prompt describing the sound.",inputProperties:{prompt:{type:"string",description:"Description of sound to generate (sfx tier)."},text:{type:"string",description:"Text to speak aloud (tts tier)."},audio_url:{type:"string",description:"URL of a voice sample to clone (tts tier, required for MetaVoice)."}},required:[]},generate_3d:{intro:"Generate a 3D model from an image.",tiers:{trellis:{toolId:"fal-trellis-3d",priceCents:8,notes:"Trellis \u2014 image-to-3D, returns a GLB mesh URL"}},guidance:"Pass an image URL. Takes ~30-60s. Returns a downloadable 3D mesh URL.",inputProperties:{image_url:{type:"string",description:"URL of the image to convert to a 3D model."}},required:["image_url"]},upscale_image:{intro:"Upscale an image to higher resolution.",tiers:{aura:{toolId:"fal-aura-sr",priceCents:3,notes:"Aura SR \u2014 default; preserves detail without hallucination"}},guidance:"Pass the existing image URL. Returns an upscaled version.",inputProperties:{image_url:{type:"string",description:"URL of the image to upscale."}},required:["image_url"]},transcribe_audio:{intro:"Transcribe speech in an audio/video URL to text.",tiers:{whisper:{toolId:"fal-whisper",priceCents:2,notes:"OpenAI Whisper \u2014 fast, multilingual"}},guidance:"Pass the URL. Returns the transcript text.",inputProperties:{audio_url:{type:"string",description:"URL of the audio or video file to transcribe."}},required:["audio_url"]},run_llm:{intro:"Run a text prompt through an LLM (OpenRouter). Token-metered \u2014 prices below are per 1M input/output tokens. Typical 500-in/500-out prompts cost 1\u20139\xA2 depending on model.",tiers:{fast:{toolId:"or-gpt-4o-mini",priceCents:1,notes:"GPT-4o Mini \u2014 $0.15/M in \xB7 $0.60/M out. Fastest, cheapest, good general-purpose (DEFAULT)"},reasoning:{toolId:"or-claude-sonnet",priceCents:9,notes:"Claude 3.5 Sonnet \u2014 $3.00/M in \xB7 $15.00/M out. Strong reasoning, long-context. ~20x pricier than `fast`."},deep_reasoning:{toolId:"or-deepseek-r1",priceCents:2,notes:"DeepSeek R1 \u2014 $0.55/M in \xB7 $2.19/M out. Deep chain-of-thought reasoning, mid-range pricing."},search:{toolId:"or-perplexity-sonar",priceCents:1,notes:"Perplexity Sonar \u2014 $1.00/M in \xB7 $1.00/M out. Search-augmented, web-grounded with citations."},open_source:{toolId:"or-llama-70b",priceCents:1,notes:"Llama 3.3 70B \u2014 $0.30/M in \xB7 $0.40/M out. Open-source large model."},coding:{toolId:"or-deepseek-chat",priceCents:1,notes:"DeepSeek Chat V3 \u2014 $0.30/M in \xB7 $0.88/M out. Strong at code generation."}},guidance:"Pick based on the user's need: fast (most questions, cheapest), reasoning (complex analysis \u2014 WARN user it's ~$0.09/call), search (questions about current events), coding (code generation), deep_reasoning (hard math/logic problems).",inputProperties:{prompt:{type:"string",description:"The user query."},system_prompt:{type:"string",description:"Optional system prompt to set model behavior."},max_tokens:{type:"number",description:"Maximum output tokens.",default:1024,minimum:1,maximum:8192},temperature:{type:"number",description:"Sampling temperature \u2014 0 is deterministic, higher is more creative.",default:.7,minimum:0,maximum:2}},required:["prompt"]}};function KO(t){let e=Ll[t];if(!e)throw new Error(`Unknown meta-tool: ${t}`);let r=[e.intro,"","Tiers:"];for(let[n,o]of Object.entries(e.tiers)){let s=`$${(o.priceCents/100).toFixed(2)}`;r.push(` - ${n.padEnd(15)} ${s.padStart(6)} ${o.notes}`)}return r.push("",e.guidance),r.join(`
|
|
16
|
+
`)}function WO(t){let e=Ll[t];if(!e)throw new Error(`Unknown meta-tool: ${t}`);let r=Object.keys(e.tiers);return{type:"object",properties:{tier:{type:"string",enum:r,default:r[0],description:`Quality/style tier. Default: ${r[0]}.`},...e.inputProperties},required:e.required??[]}}function Dl(t,e){if(!fs.includes(t))return t;let r=Ll[t];if(!r)return t;let n=Object.keys(r.tiers),o=e||n[0],s=r.tiers[o];if(!s)throw new Error(`Unknown tier '${o}' for ${t}. Valid tiers: ${n.join(", ")}`);return s.toolId}async function XO(t,e,r){let n=Dl(t,e.tier),{tier:o,...s}=e;return de.executeTool({tool_id:n,...s},r)}var fs=Object.keys(Ll);function zO(t=process.env,e=process.platform){return t.VISA_CLI_NO_BROWSER==="1"||t.VISA_CLI_NO_BROWSER==="true"?{headless:!0,reason:"VISA_CLI_NO_BROWSER is set"}:t.CI==="true"||t.CI==="1"?{headless:!0,reason:"CI environment detected"}:t.SSH_CONNECTION||t.SSH_TTY?{headless:!0,reason:"SSH session detected"}:e==="linux"&&!t.DISPLAY&&!t.WAYLAND_DISPLAY?{headless:!0,reason:"Linux with no $DISPLAY or $WAYLAND_DISPLAY"}:{headless:!1}}function QO(t,e=process.platform){return e==="darwin"?{cmd:"open",args:[t]}:e==="win32"?{cmd:"cmd",args:["/c","start","",t]}:e==="linux"?{cmd:"xdg-open",args:[t]}:null}var uc=C(require("crypto")),nN=require("child_process"),Jt=C(require("fs")),lc=C(require("os")),pc=C(require("path"));var wz="# visa-cli-hud-v1";function xl(t){return typeof t!="string"?!1:t.includes(wz)?!0:t.includes("visa-cli")&&t.includes("statusline")}async function JO(t,e){try{return await e()}catch(r){if(r.message==="Invalid signature"&&bn()){R.warn("attestation:key-mismatch",{action:"reregistering"});try{let n=await kO();await t.registerAttestationKey(n),R.info("attestation:key-reregistered")}catch(n){throw R.error("attestation:reregister-failure",{error:n.message}),r}return await e()}throw r}}var ZO="1.14.0-rc.0";function dS(t,e){return e?{kind:"env",var:t}:{kind:"default"}}function Vz(t,e,r){let n=process.env[t];if(n!==void 0&&n!=="")return{value:n,source:{kind:"env",var:t}};let o=Zf(e);return o!==void 0?{value:o,source:{kind:"settings"}}:{value:r,source:{kind:"default"}}}function ic(t,e,r){let n=process.env[t];if(n!==void 0)return{value:r==="opt-in"?n==="true":n!=="false",source:{kind:"env",var:t}};let o=ds(e);return o!==void 0?{value:o,source:{kind:"settings"}}:{value:r!=="opt-in",source:{kind:"default"}}}function zt(t){return t==null?"\u2014":t?"yes":"no"}function Ul(t){return t==null?"\u2014":`$${t.toFixed(2)}`}async function eN(t){let e=null,r=null;try{e=await t.api.getStatus()}catch(h){r=h?.message||"unknown error"}let n=[],o=Vz("VISA_AUTH_URL","auth.serverUrl","https://auth.visacli.sh");n.push({key:"auth.serverUrl",value:o.value,formatted:o.value,source:o.source,hint:o.source.kind==="default"?"Persist with `visa-cli config set auth.serverUrl <url>` (or set VISA_AUTH_URL for one-off overrides).":void 0}),n.push({key:"account.enrolled",value:e?.enrolled??null,formatted:zt(e?.enrolled),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),e?.githubUser&&n.push({key:"account.githubUser",value:e.githubUser,formatted:e.githubUser,source:{kind:"server"}});let s=e?e.attestationRequired!==!1:void 0;n.push({key:"biometric.required",value:s,formatted:zt(s),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"},hint:s===!1?"Touch ID prompts are suppressed. Re-enable with `visa-cli biometric on`.":void 0}),n.push({key:"biometric.keyRegistered",value:e?.hasAttestationKey??null,formatted:zt(e?.hasAttestationKey),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),n.push({key:"biometric.deviceAvailable",value:bn(),formatted:zt(bn()),source:{kind:"device"}});let i=e?.spendingControls,a=i?i.max_transaction_amount??i.maxTransactionAmount??null:null,c=i?i.daily_limit??i.dailyLimit??null:null;n.push({key:"spending.maxPerTxn",value:a,formatted:Ul(a),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),n.push({key:"spending.dailyLimit",value:c,formatted:Ul(c),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),n.push({key:"spending.dailySpent",value:e?.dailySpent??null,formatted:Ul(e?.dailySpent),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),n.push({key:"spending.dailyRemaining",value:e?.dailyRemaining??null,formatted:Ul(e?.dailyRemaining),source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}}),n.push({key:"cards.count",value:e?.cardCount??null,formatted:e?.cardCount!=null?String(e.cardCount):"\u2014",source:e?{kind:"server"}:{kind:"unknown",reason:r||"offline"}});let u=e?.cards?.find(h=>h.isDefault)??e?.cards?.[0];u&&n.push({key:"cards.default",value:{brand:u.brand??null,last4:u.last4},formatted:`${u.brand||"card"} \u2022\u2022\u2022\u2022 ${u.last4}`,source:{kind:"server"}});let l=ic("VISA_SUPPRESS_BROWSER","ui.suppressBrowser","opt-in");n.push({key:"ui.suppressBrowser",value:l.value,formatted:zt(l.value),source:l.source,hint:"Persist with `visa-cli config set ui.suppressBrowser true` to stop auto-opening result URLs."});let p=ic("VISA_SUPPRESS_FEED","ui.suppressFeed","opt-in");n.push({key:"ui.suppressFeed",value:p.value,formatted:zt(p.value),source:p.source});let _=ml(),d;process.env.VISA_CLI_NO_UPDATE_CHECK?d={kind:"env",var:"VISA_CLI_NO_UPDATE_CHECK"}:process.env.CI?d={kind:"env",var:"CI"}:process.env.NODE_ENV==="test"?d={kind:"env",var:"NODE_ENV"}:d={kind:"default"},n.push({key:"ui.updateCheck",value:!_,formatted:zt(!_),source:d});let S=ic("VISA_META_TOOLS","tools.meta","opt-out");n.push({key:"tools.meta",value:S.value,formatted:zt(S.value),source:S.source,hint:"Persist with `visa-cli config set tools.meta false`. Restart Claude Code for changes to take effect."});let f=ic("VISA_SPECIFIC_TOOLS","tools.specific","opt-out");n.push({key:"tools.specific",value:f.value,formatted:zt(f.value),source:f.source});let T=ic("VISA_DISCOVER_TOOLS","tools.discover","opt-out");if(n.push({key:"tools.discover",value:T.value,formatted:zt(T.value),source:T.source}),n.push({key:"client.version",value:ZO,formatted:ZO,source:{kind:"default"}}),t.includeDev){let h=process.env.VISA_MOCK_KEYCHAIN;n.push({key:"dev.mockKeychain",value:h==="true",formatted:zt(h==="true"),source:dS("VISA_MOCK_KEYCHAIN",!!h)});let A=process.env.VISA_MOCK_TOUCHID;n.push({key:"dev.mockTouchid",value:A==="true",formatted:zt(A==="true"),source:dS("VISA_MOCK_TOUCHID",!!A)});let N=process.env.VISA_CLI_DEBUG;n.push({key:"dev.debug",value:!!N,formatted:zt(!!N),source:dS("VISA_CLI_DEBUG",!!N)})}return{entries:n,statusError:r}}function wl(){return Rl()}var J=new Ol(()=>Xt.getSessionToken()),Bz="1.14.0-rc.0",Gz=["generate_image","generate_video","generate_music","generate_audio","generate_3d","upscale_image","transcribe_audio","run_llm"],tN=["","","You're ready to go! Try:","","Core:",'\u2022 "Show my account status" \u2192 get_status','\u2022 "List my enrolled cards" \u2192 get_cards','\u2022 "Show my recent transactions" \u2192 transaction_history','\u2022 "Set my daily limit to $50" \u2192 update_spending_controls','\u2022 "Pay https://example.com/checkout" \u2192 pay','\u2022 "Generate 3 variations in parallel" \u2192 batch',"","Fast shortcuts:",'\u2022 "Generate an image of a sunset over Tokyo" \u2192 generate_image_card (~$0.06)','\u2022 "Make a fast thumbnail: minimalist cat logo" \u2192 generate_image_fast_card (~$0.04)','\u2022 "Make a 4-second video of a penguin juggling" \u2192 generate_video_tempo_card (~$0.30)','\u2022 "Make a song about coding late at night" \u2192 generate_music_tempo_card (~$0.10)','\u2022 "Check the status of my music job" \u2192 check_music_status_tempo_card','\u2022 "What is ETH on Base trading at?" \u2192 query_onchain_prices_card (~$0.02)','\u2022 "Explore stablecoin inflows on Base" \u2192 allium_explorer_card','\u2022 "Open the latest Allium result set" \u2192 allium_explorer_results_card','\u2022 "Show pxlwall campaign insights" \u2192 pxlwall_card',"","Category tools:",...Gz.map(t=>`\u2022 "${t.replace(/_/g," ")}" \u2192 ${t}`),"","Tool catalog:",'\u2022 "Find an image upscaler" \u2192 discover_tools','\u2022 "Run fal-aura-sr on this URL" \u2192 execute_tool'].join(`
|
|
17
17
|
`);function Qt(t){if(!t||typeof t!="string"||MO())return;let e;try{e=new URL(t)}catch{return}if(e.protocol!=="https:"&&e.protocol!=="http:")return;let r=e.toString(),n=zO();if(n.headless){R.info(`Browser auto-open skipped (${n.reason}). URL: ${r}`);return}let o=QO(r);if(!o){R.info(`No browser command for platform "${lc.platform()}". URL: ${r}`);return}(0,nN.execFile)(o.cmd,o.args,s=>{s&&R.warn(`Browser open failed: ${s.message}. URL: ${r}`)})}async function Ct(t){return JO(J,t)}function Zt(t,e){let r=t.retryable?`The processor returned a transient decline (code ${t.code??"unknown"}). This is not a permanent failure \u2014 it usually clears within ~60 seconds and is most often triggered by rapid successive charges on the same card. Tell the user the call was temporarily declined and that you will retry shortly, then wait at least 60 seconds before retrying the SAME call exactly once. Do not retry more than once. Do not assume the user has run out of funds.`:`The processor returned a non-retryable decline (code ${t.code??"unknown"}). Stop the current task and tell the user their card was declined for ${e.merchantName}. Suggest they check their card status, available balance, or try a different default card via 'visa-cli cards'. Do not retry automatically.`;return{success:!1,declined:!0,retryable:t.retryable,code:t.code,reason:t.reason,merchantName:e.merchantName,amount:e.amount,message:t.message,agent_guidance:r}}var ac=null,Hz=3e4;function oN(){ac=null}async function kz(t){let e=Date.now();if(ac&&ac.expiresAt>e)return ac.value;try{let n=(await J.getStatus(t)).attestationRequired!==!1;return ac={value:n,expiresAt:e+Hz},n}catch{return!0}}async function Je(t,e,r,n,o){if(!bn()){R.warn("attestation:unavailable",{context:t});return}if(!await kz(o)){R.info("attestation:skipped-by-server-policy",{context:t});return}R.info("attestation:attempt",{context:t,amount:e,merchant:r});try{let{nonce:i}=await J.getAttestationChallenge(),a=Buffer.from(JSON.stringify({nonce:i,amount:e,merchant:r,context:t})).toString("base64");R.info("touchid:prompt",{context:t,amount:e,merchant:r});let c=await FO(a,n);return R.info("attestation:success",{context:t,amount:e,merchant:r}),{signature:c,nonce:i,amount:e,merchant:r}}catch(i){throw R.error("attestation:failure",{context:t,amount:e,merchant:r,error:i.message}),i}}async function br(t,e,r){let n=await J.paymentPreview({tool:t,url:e},r);if(!n||!n.merchantName||!n.amount||n.amount<=0)throw new Error("Could not determine payment amount and merchant. Try again.");if(!Number.isFinite(n.amount)||n.amount<0||n.amount>999999)throw new Error(`Invalid payment amount: ${n.amount}. Payment rejected for safety.`);return n}function Jr(t){if(t.pricingMode==="max-cap"){let e=typeof t.estimatedAmount=="number"&&t.estimatedAmount>0?` (estimated $${t.estimatedAmount.toFixed(2)})`:"";return`pay up to $${t.amount.toFixed(2)} to ${t.merchantName}${e}`}return`pay $${t.amount.toFixed(2)} to ${t.merchantName}`}function sN(){return pc.join(lc.homedir(),".visa-mcp","allium-results")}var Fz=16*1024,qz=50*1024*1024,jz=10;function Yz(t){return t.replace(/[^A-Za-z0-9_\-]/g,"_").slice(0,128)}function $z(t,e){let r=sN();Jt.mkdirSync(r,{recursive:!0});let n=Yz(t),o=pc.join(r,`${n}.csv`);Jt.writeFileSync(o,e);let s=Buffer.byteLength(e),i=e.split(`
|
|
18
18
|
`),a=i[0]??"",c=i.slice(1).filter(p=>p.length>0),u=[a,...c.slice(0,jz)].join(`
|
|
19
19
|
`),l={file_path:o,row_count:c.length,size_bytes:s,columns:a,preview:u,truncated:!0};if(s>qz){let p=(s/1048576).toFixed(1);R.warn("allium:large_csv_written",{sessionId:t,size_bytes:s,file_path:o}),l.warning=`Wrote ${p} MB to ${o}. Delete ~/.visa-mcp/allium-results/ files you no longer need \u2014 they are never auto-cleaned.`}return l}function Kz(){let t=sN();try{if(!Jt.existsSync(t))return{file_count:0,size_bytes:0,path:t};let e=Jt.readdirSync(t),r=0,n=0;for(let o of e)try{let s=Jt.statSync(pc.join(t,o));s.isFile()&&(r+=s.size,n++)}catch{}return{file_count:n,size_bytes:r,path:t}}catch(e){return R.warn("allium:disk_usage_error",{error:e.message}),{file_count:0,size_bytes:0,path:t}}}async function _c(t){if(!vO())try{let e=await Xt.getSessionToken();if(!e)return;await fetch(`${wl()}/v1/feed`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e}`},body:JSON.stringify({prompt:t.prompt,tool:t.tool,media_url:t.mediaUrl,media_type:t.mediaType,cost:t.cost,transaction_id:t.transactionId,auto:!0,...t.userContext&&{user_context:t.userContext}}),signal:AbortSignal.timeout(5e3)}),R.info("feed:submitted",{tool:t.tool,mediaType:t.mediaType})}catch{}}async function Wz(t,e){if(!t.url||!t.url.trim())throw new Error("A URL is required for payments. Provide the merchant payment endpoint.");let r=await br(void 0,t.url,e);R.info("payment:attempt",{tool:"pay",amount:r.amount,merchant:r.merchantName,url:t.url});try{return await Ct(async()=>{let n=await Je(t.url||"pay",r.amount,r.merchantName,Jr(r)),o=await J.pay({url:t.url||"",merchantName:t.merchantName||"Unknown",description:t.description||"",method:t.method,body:t.body,attestation:n,idempotencyKey:uc.randomUUID()},e);return o.success?(R.info("payment:success",{tool:"pay",amount:r.amount,merchant:r.merchantName,rail:o.receipt?.rail}),o.receipt&&v8(o.receipt)):R.warn("payment:declined",{tool:"pay",amount:r.amount,merchant:r.merchantName,message:o.message}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"pay",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"pay",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function Xz(t,e){if(!t.prompt||!t.prompt.trim())throw new Error("A prompt is required. Provide a description of what you want to generate.");let r=await br("generate_image_card",void 0,e);R.info("payment:attempt",{tool:"generate_image_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("generate_image_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("generate_image_card",{...t,attestation:n},12e4,e);return R.info("payment:success",{tool:"generate_image_card",amount:r.amount,merchant:r.merchantName}),o.urls?.length?(o.urls.forEach(s=>Qt(s)),_c({prompt:t.prompt,tool:"generate_image_card",mediaUrl:o.urls[0],mediaType:"image",cost:o.amount??r.amount,transactionId:o.transactionId,userContext:e})):R.warn("generation:no-urls",{tool:"generate_image_card",resultKeys:Object.keys(o||{})}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"generate_image_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"generate_image_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function zz(t,e){if(!t.prompt||!t.prompt.trim())throw new Error("A prompt is required. Provide a description of what you want to generate.");let r=await br("generate_image_fast_card",void 0,e);R.info("payment:attempt",{tool:"generate_image_fast_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("generate_image_fast_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("generate_image_fast_card",{...t,attestation:n},6e4,e);return R.info("payment:success",{tool:"generate_image_fast_card",amount:r.amount,merchant:r.merchantName}),o.urls?.length?(o.urls.forEach(s=>Qt(s)),_c({prompt:t.prompt,tool:"generate_image_fast_card",mediaUrl:o.urls[0],mediaType:"image",cost:o.amount??r.amount,transactionId:o.transactionId,userContext:e})):R.warn("generation:no-urls",{tool:"generate_image_fast_card",resultKeys:Object.keys(o||{})}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"generate_image_fast_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"generate_image_fast_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function Qz(t,e){if(!t.prompt||!t.prompt.trim())throw new Error("A prompt is required. Provide a description of what you want to generate.");let r=await br("generate_video_tempo_card",void 0,e);R.info("payment:attempt",{tool:"generate_video_tempo_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("generate_video_tempo_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("generate_video_tempo_card",{...t,attestation:n},12e4,e);return R.info("payment:success",{tool:"generate_video_tempo_card",amount:r.amount,merchant:r.merchantName}),o.urls?.length?(o.urls.forEach(s=>Qt(s)),_c({prompt:t.prompt,tool:"generate_video_tempo_card",mediaUrl:o.urls[0],mediaType:"video",cost:o.amount??r.amount,transactionId:o.transactionId,userContext:e})):R.warn("generation:no-urls",{tool:"generate_video_tempo_card",resultKeys:Object.keys(o||{})}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"generate_video_tempo_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"generate_video_tempo_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function Jz(t,e){if(!t.prompt||!t.prompt.trim())throw new Error("A prompt is required. Provide a description of what you want to generate.");let r=await br("generate_music_tempo_card",void 0,e);R.info("payment:attempt",{tool:"generate_music_tempo_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("generate_music_tempo_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("generate_music_tempo_card",{...t,attestation:n},36e4,e);return R.info("payment:success",{tool:"generate_music_tempo_card",amount:r.amount,merchant:r.merchantName}),o.urls?.length&&o.status!=="processing"?(o.urls.forEach(s=>Qt(s)),_c({prompt:t.prompt,tool:"generate_music_tempo_card",mediaUrl:o.urls[0],mediaType:"audio",cost:o.amount??r.amount,transactionId:o.transactionId,userContext:e})):o.urls?.length&&o.status==="processing"?(o._preliminary_urls=o.urls,delete o.urls,R.info("generation:processing",{tool:"generate_music_tempo_card",note:"URLs withheld until status is completed"})):R.warn("generation:no-urls",{tool:"generate_music_tempo_card",resultKeys:Object.keys(o||{})}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"generate_music_tempo_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"generate_music_tempo_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function Zz(t,e){let r=await br("check_music_status_tempo_card",void 0,e);R.info("payment:attempt",{tool:"check_music_status_tempo_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("check_music_status_tempo_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("check_music_status_tempo_card",{...t,attestation:n},void 0,e);return R.info("payment:success",{tool:"check_music_status_tempo_card",amount:r.amount,merchant:r.merchantName}),o.urls?.length&&o.urls.forEach(s=>Qt(s)),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"check_music_status_tempo_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"check_music_status_tempo_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function e8(t,e){if(!t.chain||!t.chain.trim())throw new Error('A chain is required (e.g., "ethereum", "solana").');if(!t.token_address||!t.token_address.trim())throw new Error("A token address is required. Provide the contract address for the token.");let r=await br("query_onchain_prices_card",void 0,e);R.info("payment:attempt",{tool:"query_onchain_prices_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("query_onchain_prices_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("query_onchain_prices_card",{...t,attestation:n},void 0,e);if(R.info("payment:success",{tool:"query_onchain_prices_card",amount:r.amount,merchant:r.merchantName}),Array.isArray(o?.data))o.data=o.data.map(s=>{if("mint"in s&&!("address"in s)){let{mint:i,...a}=s;return{address:i,...a}}return s});else if(o&&"mint"in o&&!("address"in o)){let{mint:s,...i}=o;return{address:s,...i}}return o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"query_onchain_prices_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"query_onchain_prices_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function t8(t,e){if(!t.prompt||!t.prompt.trim())throw new Error("A prompt is required. Provide a natural language question about blockchain data.");let r=await br("allium_explorer_card",void 0,e);R.info("payment:attempt",{tool:"allium_explorer_card",amount:r.amount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("allium_explorer_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("allium_explorer_card",{...t,attestation:n},12e4,e);return R.info("payment:success",{tool:"allium_explorer_card",amount:r.amount,merchant:r.merchantName}),o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"allium_explorer_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"allium_explorer_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}async function r8(t,e){if(!t.session_id||!t.session_id.trim())throw new Error("A session_id is required. Use the session_id returned from allium_explorer_card.");let r=await br("allium_explorer_results_card",void 0,e);R.info("payment:attempt",{tool:"allium_explorer_results_card",amount:r.amount,pricingMode:r.pricingMode,estimatedAmount:r.estimatedAmount,merchant:r.merchantName});try{return await Ct(async()=>{let n=await Je("allium_explorer_results_card",r.amount,r.merchantName,Jr(r)),o=await J.shortcut("allium_explorer_results_card",{...t,attestation:n},6e4,e);R.info("payment:success",{tool:"allium_explorer_results_card",amount:r.amount,actualCost:o?.actualCost,merchant:r.merchantName});let s=typeof o?.data?.results=="string"?o.data.results:void 0;if(s&&Buffer.byteLength(s)>Fz){let i=$z(t.session_id,s),{results:a,...c}=o.data;return{...o,data:{...c,...i}}}return o})}catch(n){if(n instanceof Qe)return R.warn("payment:declined",{tool:"allium_explorer_results_card",amount:r.amount,merchant:r.merchantName,code:n.code,retryable:n.retryable}),Zt(n,r);throw R.error("payment:failure",{tool:"allium_explorer_results_card",amount:r.amount,merchant:r.merchantName,error:n.message}),n}}var cc="https://pxlwall.com";async function n8(t){if([t.shape,t.text,t.pixels].filter(Boolean).length>1)throw new Error("Provide only one of: shape, text, or pixels. Cannot combine modes.");let r,n,o=t.position||"cheapest";if(typeof o=="string"&&o.startsWith("{"))try{o=JSON.parse(o)}catch{}if(t.shape)r=`${cc}/api/agent/draw-shape`,n={shape:t.shape,color:t.color||"#ffffff",owner:t.owner,position:o},t.shape==="circle"?n.radius=t.size||10:t.shape==="rectangle"?(n.width=t.width||20,n.height=t.height||10):n.size=t.size||10;else if(t.text)r=`${cc}/api/agent/draw-text`,n={text:t.text,color:t.color||"#ffffff",owner:t.owner,position:o};else if(t.pixels){if(t.pixels.length<100)throw new Error(`Minimum 100 pixels per purchase. You requested ${t.pixels.length}.`);for(let i of t.pixels)if(i.x<0||i.x>499||i.y<0||i.y>499)throw new Error(`Pixel (${i.x},${i.y}) is out of bounds. Grid is 500x500 (coordinates 0-499).`);r=`${cc}/api/create-purchase-spec`,n={pixels:t.pixels,color:t.color||"#ffffff",owner:t.owner},t.colors&&(n.colors=t.colors)}else throw new Error("Provide one of: shape, text, or pixels.");let s=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:AbortSignal.timeout(15e3)});if(!s.ok){let i=await s.text().catch(()=>"");throw new Error(`pxlwall spec creation failed (${s.status}): ${i}`)}return s.json()}async function o8(t,e){let r=await n8(t),n=r.pixels?.length??t.pixels?.length??0,o="pxlwall";R.info("payment:attempt",{tool:"pxlwall_card",amount:r.totalUSD,pixelCount:n,merchant:o});try{let s=await Je("pxlwall_card",r.totalUSD,o,`pay $${r.totalUSD.toFixed(2)} to ${o} for ${n} pixels`),i=await J.shortcut("pxlwall_card",{specId:r.specId,attestation:s},6e4,e);return R.info("payment:success",{tool:"pxlwall_card",merchant:o}),Qt(cc),i.urls?.length&&i.urls.forEach(a=>Qt(a)),{...i,specId:r.specId,pixelCount:n,totalUSD:r.totalUSD,canvasUrl:cc}}catch(s){if(s instanceof Qe)return R.warn("payment:declined",{tool:"pxlwall_card",merchant:o,code:s.code,retryable:s.retryable}),Zt(s,{amount:0,merchantName:o});throw R.error("payment:failure",{tool:"pxlwall_card",merchant:o,error:s.message}),s}}var s8=["generate_music_tempo_card"],i8=36e4,a8=18e4,c8=15e3,u8=12e4,l8=2e3;async function p8(t,e){let r;if(t.requests?.some(f=>f.tool||f.tool_id)&&t.requests)r=t.requests.map(f=>{let T=f.tool||f.tool_id||t.tool;if(!T)throw new Error("Each request must specify tool or tool_id, or set tool at the top level.");let h=Dl(T,f.tier||t.tier),{tool:A,tool_id:N,tier:I,...O}=f;return{resolvedTool:h,params:O}});else if(t.tool){let f=Dl(t.tool,t.tier);r=(t.requests||(t.count&&t.params?Array.from({length:t.count},()=>({...t.params})):[])).map(h=>({resolvedTool:f,params:h}))}else throw new Error("Batch requires a top-level tool or per-request tool/tool_id.");if(r.length===0)throw new Error("Batch requires at least one item.");let o=[...new Set(r.map(f=>f.resolvedTool))],s=o.length===1,i={};for(let f of o)i[f]=await br(f,void 0,e);let a=0;for(let f of r)a+=i[f.resolvedTool].amount;let c=[...new Set(Object.values(i).map(f=>f.merchantName))].join(", "),u=s?o[0]:"mixed";R.info("payment:attempt",{tool:"batch",batchTool:u,count:r.length,totalAmount:a,merchant:c,heterogeneous:!s});let l=s?`pay $${a.toFixed(2)} to ${c} (${r.length} items, $${i[o[0]].amount.toFixed(2)} each)`:`pay $${a.toFixed(2)} to ${c} (${r.length} items across ${o.length} tools)`,p=s?r.map(f=>f.params):r.map(f=>({tool_id:f.resolvedTool,...f.params})),_=r.some(f=>s8.includes(f.resolvedTool)),d=r.some(f=>f.resolvedTool.startsWith("or-")||f.resolvedTool==="run_llm"||f.resolvedTool==="execute_tool"),S=_?i8:d?a8+r.length*c8:u8+r.length*l8;try{return await Ct(async()=>{let f=await Je(`batch:${u}`,a,c,l),T=await J.batch({tool:s?o[0]:u,requests:p,attestation:f,idempotencyKey:uc.randomUUID()},S,e);return R.info("payment:success",{tool:"batch",batchTool:u,count:r.length,totalAmount:a,merchant:c}),T.results&&T.results.forEach(h=>{h.urls&&h.urls.forEach(A=>Qt(A))}),T})}catch(f){if(f instanceof Qe)return R.warn("payment:declined",{tool:"batch",batchTool:u,count:r.length,totalAmount:a,merchant:c,code:f.code,retryable:f.retryable}),Zt(f,{amount:a,merchantName:c});throw R.error("payment:failure",{tool:"batch",batchTool:u,count:r.length,totalAmount:a,merchant:c,error:f.message}),f}}function _8(){try{let t=pc.join(lc.homedir(),".claude","settings.json");if(!Jt.existsSync(t))return{enabled:!1,setup:"visa-cli hud enable"};let e=JSON.parse(Jt.readFileSync(t,"utf-8")),r=typeof e.statusLine=="object"?e.statusLine.command:"";return xl(r)?{enabled:!0}:e.statusLine?{enabled:!1,setup:"Another HUD is active. To switch: edit ~/.claude/settings.json \u2192 statusLine"}:{enabled:!1,setup:"visa-cli hud enable"}}catch{return{enabled:!1,setup:"visa-cli hud enable"}}}async function d8(t){let e=await J.getStatus(t);typeof e?.dailyRemaining=="number"&&(e.dailyRemaining=Math.round(e.dailyRemaining*100)/100);let r=Kz();return r.file_count>0&&(e.alliumResultsOnDisk=r),e.hud=_8(),e.version=Bz,e}async function E8(t){let r=(await J.getStatus(t)).cards||[];return r.length===0?{cards:[],message:"No cards enrolled. Use the add_card tool to add a payment card."}:r.some(o=>!Number.isInteger(o?.id)||o.id<=0)?{success:!1,cards:[],message:"Card ids are unavailable right now, so remove_card and set_default_card are temporarily disabled."}:{cards:r}}async function f8(t){let e=await J.getTransactions(t);return Array.isArray(e?.transactions)&&(e.transactions=e.transactions.filter(r=>!(r.tool_name==null||r.amount===0&&r.status==="failed"))),e}async function S8(t,e){return await J.feedback(t.message,t.transaction_id,e)}async function T8(t,e){if(!t.confirm)return{success:!1,message:"Please confirm by setting confirm: true to update spending controls."};R.info("spending_controls:update",{maxTransactionAmount:t.maxTransactionAmount,dailyLimit:t.dailyLimit});try{return await Ct(async()=>{let r=await Je("spending-controls",0,"","update spending controls"),n=await J.updateSpendingControls({maxTransactionAmount:t.maxTransactionAmount,dailyLimit:t.dailyLimit,confirm:!0,attestation:r},e);return R.info("spending_controls:success",{maxTransactionAmount:t.maxTransactionAmount,dailyLimit:t.dailyLimit}),n})}catch(r){throw R.error("spending_controls:failure",{error:r.message}),r}}async function m8(t){let e=await eN({api:J,includeDev:!!t.includeDev});return{config:e.entries.map(r=>({key:r.key,value:r.value,source:r.source,hint:r.hint})),statusError:e.statusError}}async function h8(t){if(!t.key||typeof t.key!="string")return{success:!1,error:"key is required. Call config_list first to see available keys."};if(t.value===void 0)return{success:!1,error:"value is required. Use config_unset to remove a setting."};R.info("config:set",{key:t.key});try{let e=CO(t.key,t.value);return R.info("config:set:success",{key:e.key,requiresRestart:e.requiresRestart}),{success:!0,key:e.key,value:e.value,requiresRestart:e.requiresRestart,path:e.path,message:e.requiresRestart?`Saved ${e.key}. Restart Claude Code for the change to take effect.`:`Saved ${e.key}.`}}catch(e){let r=e instanceof ps?"UNKNOWN_KEY":e instanceof _s?"SERVER_CONTROLLED":"INVALID_VALUE";return R.warn("config:set:rejected",{key:t.key,code:r,error:e.message}),{success:!1,error:e.message,code:r,settableKeys:Object.keys(ai).sort()}}}async function g8(t){if(!t.key||typeof t.key!="string")return{success:!1,error:"key is required. Call config_list first to see which keys are currently set via settings.json."};R.info("config:unset",{key:t.key});try{let e=yO(t.key);return R.info("config:unset:success",{key:e.key,removed:e.removed}),{success:!0,key:e.key,removed:e.removed,requiresRestart:e.requiresRestart,path:e.path,message:e.removed?e.requiresRestart?`Removed ${e.key}. Restart Claude Code for the change to take effect.`:`Removed ${e.key}.`:`${e.key} was not set in settings.json \u2014 nothing to remove.`}}catch(e){let r=e instanceof ps?"UNKNOWN_KEY":e instanceof _s?"SERVER_CONTROLLED":"INVALID_VALUE";return R.warn("config:unset:rejected",{key:t.key,code:r,error:e.message}),{success:!1,error:e.message,code:r,settableKeys:Object.keys(ai).sort()}}}async function A8(t){let e=await J.getStatus(t),r=e.attestationRequired!==!1;return{required:r,hasAttestationKey:!!e.hasAttestationKey,touchIdAvailable:bn(),message:r?"Touch ID is REQUIRED for payments.":"Touch ID is NOT required for payments. Payments will proceed without biometric confirmation."}}async function R8(t){R.info("biometric:on");let e=await J.setBiometricPreference({required:!0},t);return e.success?(oN(),{success:!0,required:!0,message:"Touch ID is now REQUIRED for payments."}):{success:!1,error:e.error||"unknown error"}}async function O8(t,e){if(!t.confirm)return{success:!1,message:"Please confirm by setting confirm: true. Disabling Touch ID is a security downgrade \u2014 the user will be prompted for one final Touch ID confirmation before the change takes effect."};R.info("biometric:off");try{return await Ct(async()=>{let r=await J.getStatus(e),n;if(r.hasAttestationKey&&(n=await Je("biometric-preference",0,"","disable Touch ID requirement"),!n))throw new Error("Touch ID confirmation required to disable \u2014 not available on this device.");let o=await J.setBiometricPreference({required:!1,attestation:n},e);if(!o.success)throw new Error(o.error||"unknown error");return oN(),{success:!0,required:!1,message:"Touch ID is no longer required for payments."}})}catch(r){throw R.error("biometric:off:failure",{error:r.message}),r}}var rN=3e4,N8=3e5;async function iN(t,e){let r=uc.randomBytes(16).toString("hex"),n=`${t}${t.includes("?")?"&":"?"}state=${r}`;Qt(n);let o=Date.now()+N8;for(;Date.now()<o;)try{let s=await fetch(`${wl()}/v1/auth-status`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:r,timeout:rN,...e&&{user_context:e}}),signal:AbortSignal.timeout(rN+5e3)});if(!s.ok)continue;let i=await s.json();if(i.status==="pending")continue;if(i.status==="expired")return{success:!1,message:"Session expired. Please try again."};if(i.status==="error")return{success:!1,message:i.error||"Authentication failed. Please try again."};if(i.status==="complete"){if(i.sessionToken){await Xt.saveSessionToken(i.sessionToken);let c=i.user||"",u=i.last4||"****";return R.info("auth:login_complete",{user:c,last4:u}),{success:!0,message:`Signed in as ${c}. Card ending in ${u} added.${tN}`}}let a=i.last4||"****";return R.info("auth:card_added",{last4:a}),{success:!0,message:`Card ending in ${a} enrolled.${tN}`}}}catch{}return{success:!1,message:"Login timed out. Please try again."}}async function I8(t,e){if(!t.confirm)return{success:!1,message:"Please confirm by setting confirm: true to remove this card."};let r=t.cardId;if(!Number.isInteger(r)||r<=0)return{success:!1,message:"cardId must be a positive integer. Call get_cards to list enrolled cards and their ids."};R.info("cards:remove_attempt",{cardId:r});let n=`remove-card:${r}`,o=`remove enrolled card #${r}`;try{return await Ct(async()=>{let s=await Je(n,0,"",o),i=await J.removeCard(r,{attestation:s},e);return R.info("cards:remove_success",{cardId:r,promotedId:i?.promotedId??null}),i})}catch(s){throw R.error("cards:remove_failure",{cardId:r,error:s.message}),s}}async function P8(t,e){let r=t.cardId;if(!Number.isInteger(r)||r<=0)return{success:!1,message:"cardId must be a positive integer. Call get_cards to list enrolled cards and their ids."};R.info("cards:set_default_attempt",{cardId:r});let n=`set-default-card:${r}`,o=`set card #${r} as default`;try{return await Ct(async()=>{let s=await Je(n,0,"",o),i=await J.setDefaultCard(r,{attestation:s},e);return R.info("cards:set_default_success",{cardId:r}),i})}catch(s){throw R.error("cards:set_default_failure",{cardId:r,error:s.message}),s}}async function C8(t){return R.info("auth:login_attempt"),iN(`${wl()}/login`,t)}async function y8(t){return R.info("auth:add_card_attempt"),await Xt.getSessionToken()?iN(`${wl()}/enroll`,t):{success:!1,message:"Not logged in. Sign up at https://visacli.sh or call the login tool first."}}async function M8(t,e){if(!t.confirm)return{success:!1,message:"Please confirm by setting confirm: true to reset"};R.info("reset:attempt");let r=await Je("reset",0,"","reset device and remove all credentials");try{await J.logout({attestation:r},e)}catch{}if(await Xt.clearAll(),bn())try{await qO()}catch{}return R.info("reset:success"),{success:!0,message:"Device reset. All credentials, cards, and keys have been removed. Use the login tool to re-enroll."}}function v8(t){let e=["url","resultUrl","imageUrl","audioUrl","trackUrl"];for(let r of e){let n=t[r];n&&typeof n=="string"&&n.startsWith("http")&&Qt(n)}Array.isArray(t.urls)&&t.urls.forEach(r=>{r&&typeof r=="string"&&r.startsWith("http")&&Qt(r)})}async function b8(t){if(!t.query&&!t.category)throw new Error("Provide a query (what you want to do) or category (image, video, audio, 3d, llm) to search the tool catalog.");R.info("catalog:discover",{query:t.query,category:t.category});try{let r=(await J.catalogSearch(t.query,t.category)).tools||[];if(r.length===0)return{content:[{type:"text",text:`No tools found for "${t.query||t.category}". Try a different search term.`}]};let n=r.map((o,s)=>`${s+1}. **${o.name}** (${o.id})
|
|
@@ -54,23 +54,23 @@ ${JSON.stringify(i)}
|
|
|
54
54
|
`),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Fr(a))}o(c)}}return typeof n=="string"?n:yde(n)}function yde(t){let e=t.reduce((o,s)=>o+s.length,0),r=new Uint8Array(e),n=0;for(let o of t)r.set(o,n),n+=o.length;return r}function Lh(t){return[{type:"span"},t]}function Dh(t){let e=typeof t.data=="string"?vh(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}var Mde={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item"};function Q_(t){return Mde[t]}function J_(t){if(!t?.sdk)return;let{name:e,version:r}=t.sdk;return{name:e,version:r}}function xh(t,e,r,n){let o=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!r&&n&&{dsn:kr(n)},...o&&{trace:o}}}function vde(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function r1(t,e,r,n){let o=J_(r),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!n&&e&&{dsn:kr(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return or(s,[i])}function n1(t,e,r,n){let o=J_(r),s=t.type&&t.type!=="replay_event"?t.type:"event";vde(t,r?.sdk);let i=xh(t,o,n,e);return delete t.sdkProcessingMetadata,or(i,[[{type:s},t]])}function o1(t,e){function r(l){return!!l.trace_id&&!!l.public_key}let n=Ve(t[0]),o=e?.getDsn(),s=e?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...r(n)&&{trace:n},...!!s&&o&&{dsn:kr(o)}},a=e?.getOptions().beforeSendSpan,c=a?l=>{let p=k(l),_=a(p);return _||(nu(),p)}:k,u=[];for(let l of t){let p=c(l);p&&u.push(Lh(p))}return or(i,u)}function su(t){if(!x)return;let{description:e="< unknown name >",op:r="< unknown op >",parent_span_id:n}=k(t),{spanId:o}=t.spanContext(),s=_n(t),i=ve(t),a=i===t,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${r}`,`name: ${e}`,`ID: ${o}`];if(n&&u.push(`parent ID: ${n}`),!a){let{op:l,description:p}=k(i);u.push(`root ID: ${i.spanContext().spanId}`),l&&u.push(`root op: ${l}`),p&&u.push(`root description: ${p}`)}m.log(`${c}
|
|
55
55
|
${u.join(`
|
|
56
56
|
`)}`)}function iu(t){if(!x)return;let{description:e="< unknown name >",op:r="< unknown op >"}=k(t),{spanId:n}=t.spanContext(),s=ve(t)===t,i=`[Tracing] Finishing "${r}" ${s?"root ":""}span "${e}" with ID ${n}`;m.log(i)}function Vs(t){if(!t||t.length===0)return;let e={};return t.forEach(r=>{let n=r.attributes||{},o=n[Ah],s=n[Rh];typeof o=="string"&&typeof s=="number"&&(e[r.name]={value:s,unit:o})}),e}var s1=1e3,zi=class{constructor(e={}){this._traceId=e.traceId||wr(),this._spanId=e.spanId||rr(),this._startTime=e.startTimestamp||No(),this._links=e.links,this._attributes={},this.setAttributes({[ae]:"manual",[W]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,r){}spanContext(){let{_spanId:e,_traceId:r,_sampled:n}=this;return{spanId:e,traceId:r,traceFlags:n?$_:Y_}}setAttribute(e,r){return r===void 0?delete this._attributes[e]:this._attributes[e]=r,this}setAttributes(e){return Object.keys(e).forEach(r=>this.setAttribute(r,e[r])),this}updateStartTime(e){this._startTime=Ft(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(We,"custom"),this}end(e){this._endTime||(this._endTime=Ft(e),iu(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[W],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Us(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[ae],profile_id:this._attributes[$i],exclusive_time:this._attributes[Ki],measurements:Vs(this._events),is_segment:this._isStandaloneSpan&&ve(this)===this||void 0,segment_id:this._isStandaloneSpan?ve(this).spanContext().spanId:void 0,links:xs(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,r,n){x&&m.log("[Tracing] Adding an event to span:",e);let o=i1(r)?r:n||No(),s=i1(r)?{}:r||{},i={name:e,time:Ft(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=H();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===ve(this)))return;if(this._isStandaloneSpan){this._sampled?Lde(o1([this],e)):(x&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}let n=this._convertSpanToTransaction();n&&(Gr(this).scope||Q()).captureEvent(n)}_convertSpanToTransaction(){if(!a1(k(this)))return;this._name||(x&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");let{scope:e,isolationScope:r}=Gr(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let s=W_(this).filter(l=>l!==this&&!bde(l)).map(l=>k(l)).filter(a1),i=this._attributes[We];delete this._attributes[pn],s.forEach(l=>{delete l.data[pn]});let a={contexts:{trace:Xw(this)},spans:s.length>s1?s.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,s1):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:r,dynamicSamplingContext:Ve(this)},request:n,...i&&{transaction_info:{source:i}}},c=Vs(this._events);return c&&Object.keys(c).length&&(x&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}};function i1(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function a1(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function bde(t){return t instanceof zi&&t.isStandaloneSpan()}function Lde(t){let e=H();if(!e)return;let r=t[1];if(!r||r.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function Hn(t,e,r=()=>{}){let n;try{n=t()}catch(o){throw e(o),r(),o}return Dde(n,e,r)}function Dde(t,e,r){return Ur(t)?t.then(n=>(r(),n),n=>{throw e(n),r(),n}):(r(),t)}function au(t,e,r){if(!st(t))return[!1];let n,o;typeof t.tracesSampler=="function"?(o=t.tracesSampler({...e,inheritOrSampleWith:a=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):a}),n=!0):e.parentSampled!==void 0?o=e.parentSampled:typeof t.tracesSampleRate<"u"&&(o=t.tracesSampleRate,n=!0);let s=nr(o);if(s===void 0)return x&&m.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(o)} of type ${JSON.stringify(typeof o)}.`),[!1];if(!s)return x&&m.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,s,n];let i=r<s;return i||x&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,n]}var Z_="__SENTRY_SUPPRESS_TRACING__";function cu(t,e){let r=td();if(r.startSpan)return r.startSpan(t,e);let n=l1(t),{forceTransaction:o,parentSpan:s,scope:i}=t,a=i?.clone();return ln(a,()=>_1(s)(()=>{let u=Q(),l=p1(u,s),_=t.onlyIfParent&&!l?new ws:u1({parentSpan:l,spanArguments:n,forceTransaction:o,scope:u});return vs(u,_),Hn(()=>e(_),()=>{let{status:d}=k(_);_.isRecording()&&(!d||d==="ok")&&_.setStatus({code:2,message:"internal_error"})},()=>{_.end()})}))}function ed(t,e){let r=td();if(r.startSpanManual)return r.startSpanManual(t,e);let n=l1(t),{forceTransaction:o,parentSpan:s,scope:i}=t,a=i?.clone();return ln(a,()=>_1(s)(()=>{let u=Q(),l=p1(u,s),_=t.onlyIfParent&&!l?new ws:u1({parentSpan:l,spanArguments:n,forceTransaction:o,scope:u});return vs(u,_),Hn(()=>e(_,()=>_.end()),()=>{let{status:d}=k(_);_.isRecording()&&(!d||d==="ok")&&_.setStatus({code:2,message:"internal_error"})})}))}function uu(t,e){let r=td();return r.withActiveSpan?r.withActiveSpan(t,e):ln(n=>(vs(n,t||void 0),e(n)))}function Qi(t){let e=td();return e.suppressTracing?e.suppressTracing(t):ln(r=>{r.setSDKProcessingMetadata({[Z_]:!0});let n=t();return r.setSDKProcessingMetadata({[Z_]:void 0}),n})}function u1({parentSpan:t,spanArguments:e,forceTransaction:r,scope:n}){if(!st()){let i=new ws;if(r||!t){let a={sampled:"false",sample_rate:"0",transaction:e.name,...Ve(i)};X_(i,a)}return i}let o=ie(),s;if(t&&!r)s=xde(t,n,e),Wi(t,s);else if(t){let i=Ve(t),{traceId:a,spanId:c}=t.spanContext(),u=_n(t);s=c1({traceId:a,parentSpanId:c,...e},n,u),X_(s,i)}else{let{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...o.getPropagationContext(),...n.getPropagationContext()};s=c1({traceId:i,parentSpanId:c,...e},n,u),a&&X_(s,a)}return su(s),Zc(s,n,o),s}function l1(t){let r={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){let n={...r};return n.startTimestamp=Ft(t.startTime),delete n.startTime,n}return r}function td(){let t=Lt();return Vr(t)}function c1(t,e,r){let n=H(),o=n?.getOptions()||{},{name:s=""}=t,i={spanAttributes:{...t.attributes},spanName:s,parentSampled:r};n?.emit("beforeSampling",i,{decision:!1});let a=i.parentSampled??r,c=i.spanAttributes,u=e.getPropagationContext(),[l,p,_]=e.getScopeData().sdkProcessingMetadata[Z_]?[!1]:au(o,{name:s,parentSampled:a,attributes:c,parentSampleRate:nr(u.dsc?.sample_rate)},u.sampleRand),d=new zi({...t,attributes:{[We]:"custom",[Br]:p!==void 0&&_?p:void 0,...c},sampled:l});return!l&&n&&(x&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),n.recordDroppedEvent("sample_rate","transaction")),n&&n.emit("spanStart",d),d}function xde(t,e,r){let{spanId:n,traceId:o}=t.spanContext(),s=e.getScopeData().sdkProcessingMetadata[Z_]?!1:_n(t),i=s?new zi({...r,parentSpanId:n,traceId:o,sampled:s}):new ws({traceId:o});Wi(t,i);let a=H();return a&&(a.emit("spanStart",i),r.endTimestamp&&a.emit("spanEnd",i)),i}function p1(t,e){if(e)return e;if(e===null)return;let r=bs(t);if(!r)return;let n=H();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?ve(r):r}function _1(t){return t!==void 0?e=>uu(t,e):e=>e()}var Uh=0,d1=1,E1=2;function qr(t){return new En(e=>{e(t)})}function rd(t){return new En((e,r)=>{r(t)})}var En=class t{constructor(e){this._state=Uh,this._handlers=[],this._runExecutor(e)}then(e,r){return new t((n,o)=>{this._handlers.push([!1,s=>{if(!e)n(s);else try{n(e(s))}catch(i){o(i)}},s=>{if(!r)o(s);else try{n(r(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(e){return this.then(r=>r,e)}finally(e){return new t((r,n)=>{let o,s;return this.then(i=>{s=!1,o=i,e&&e()},i=>{s=!0,o=i,e&&e()}).then(()=>{if(s){n(o);return}r(o)})})}_executeHandlers(){if(this._state===Uh)return;let e=this._handlers.slice();this._handlers=[],e.forEach(r=>{r[0]||(this._state===d1&&r[1](this._value),this._state===E1&&r[2](this._value),r[0]=!0)})}_runExecutor(e){let r=(s,i)=>{if(this._state===Uh){if(Ur(i)){i.then(n,o);return}this._state=s,this._value=i,this._executeHandlers()}},n=s=>{r(d1,s)},o=s=>{r(E1,s)};try{e(n,o)}catch(s){o(s)}}};function nd(t,e,r,n=0){return new En((o,s)=>{let i=t[n];if(e===null||typeof i!="function")o(e);else{let a=i({...e},r);x&&i.id&&a===null&&m.log(`Event processor "${i.id}" dropped event`),Ur(a)?a.then(c=>nd(t,c,r,n+1).then(o)).then(null,s):nd(t,a,r,n+1).then(o).then(null,s)}})}function f1(t,e){let{fingerprint:r,span:n,breadcrumbs:o,sdkProcessingMetadata:s}=e;Ude(t,e),n&&Bde(t,n),Gde(t,r),wde(t,o),Vde(t,s)}function wh(t,e){let{extra:r,tags:n,user:o,contexts:s,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:p,propagationContext:_,transactionName:d,span:S}=e;od(t,"extra",r),od(t,"tags",n),od(t,"user",o),od(t,"contexts",s),t.sdkProcessingMetadata=Io(t.sdkProcessingMetadata,a,2),i&&(t.level=i),d&&(t.transactionName=d),S&&(t.span=S),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext={...t.propagationContext,..._}}function od(t,e,r){t[e]=Io(t[e],r,1)}function Ude(t,e){let{extra:r,tags:n,user:o,contexts:s,level:i,transactionName:a}=e;Object.keys(r).length&&(t.extra={...r,...t.extra}),Object.keys(n).length&&(t.tags={...n,...t.tags}),Object.keys(o).length&&(t.user={...o,...t.user}),Object.keys(s).length&&(t.contexts={...s,...t.contexts}),i&&(t.level=i),a&&t.type!=="transaction"&&(t.transaction=a)}function wde(t,e){let r=[...t.breadcrumbs||[],...e];t.breadcrumbs=r.length?r:void 0}function Vde(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Bde(t,e){t.contexts={trace:yo(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Ve(e),...t.sdkProcessingMetadata};let r=ve(e),n=k(r).description;n&&!t.transaction&&t.type==="transaction"&&(t.transaction=n)}function Gde(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}var sd,S1,id;function T1(t){let e=j._sentryDebugIds;if(!e)return{};let r=Object.keys(e);return id&&r.length===S1||(S1=r.length,id=r.reduce((n,o)=>{sd||(sd={});let s=sd[o];if(s)n[s[0]]=s[1];else{let i=t(o);for(let a=i.length-1;a>=0;a--){let u=i[a]?.filename,l=e[o];if(u&&l){n[u]=l,sd[o]=[u,l];break}}}return n},{})),id}function m1(t,e,r,n,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||r.event_id||Ke(),timestamp:e.timestamp||Vn()},u=r.integrations||t.integrations.map(T=>T.name);Hde(c,t),qde(c,u),o&&o.emit("applyFrameMetadata",e),e.type===void 0&&kde(c,t.stackParser);let l=Yde(n,r.captureContext);r.mechanism&&Fi(c,r.mechanism);let p=o?o.getEventProcessors():[],_=H_().getScopeData();if(s){let T=s.getScopeData();wh(_,T)}if(l){let T=l.getScopeData();wh(_,T)}let d=[...r.attachments||[],..._.attachments];d.length&&(r.attachments=d),f1(c,_);let S=[...p,..._.eventProcessors];return nd(S,c,r).then(T=>(T&&Fde(T),typeof i=="number"&&i>0?jde(T,i,a):T))}function Hde(t,e){let{environment:r,release:n,dist:o,maxValueLength:s=250}=e;t.environment=t.environment||r||Xi,!t.release&&n&&(t.release=n),!t.dist&&o&&(t.dist=o);let i=t.request;i?.url&&(i.url=cn(i.url,s))}function kde(t,e){let r=T1(e);t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=r[o.filename])})})}function Fde(t){let e={};if(t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?e[o.abs_path]=o.debug_id:o.filename&&(e[o.filename]=o.debug_id),delete o.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];let r=t.debug_meta.images;Object.entries(e).forEach(([n,o])=>{r.push({type:"sourcemap",code_file:n,debug_id:o})})}function qde(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function jde(t,e,r){if(!t)return null;let n={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(o=>({...o,...o.data&&{data:Fr(o.data,e,r)}}))},...t.user&&{user:Fr(t.user,e,r)},...t.contexts&&{contexts:Fr(t.contexts,e,r)},...t.extra&&{extra:Fr(t.extra,e,r)}};return t.contexts?.trace&&n.contexts&&(n.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(n.contexts.trace.data=Fr(t.contexts.trace.data,e,r))),t.spans&&(n.spans=t.spans.map(o=>({...o,...o.data&&{data:Fr(o.data,e,r)}}))),t.contexts?.flags&&n.contexts&&(n.contexts.flags=Fr(t.contexts.flags,3,r)),n}function Yde(t,e){if(!e)return t;let r=t?t.clone():new kt;return r.update(e),r}function h1(t){if(t)return $de(t)?{captureContext:t}:Wde(t)?{captureContext:t}:t}function $de(t){return t instanceof kt||typeof t=="function"}var Kde=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Wde(t){return Object.keys(t).some(e=>Kde.includes(e))}function Dt(t,e){return Q().captureException(t,h1(e))}function ad(t,e){let r=typeof e=="string"?e:void 0,n=typeof e!="string"?{captureContext:e}:void 0;return Q().captureMessage(t,r,n)}function cd(t,e){return Q().captureEvent(t,e)}function ud(){let t=H();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function ld(t){let e=ie(),r=Q(),{userAgent:n}=j.navigator||{},o=Vw({user:r.getUser()||e.getUser(),...n&&{userAgent:n},...t}),s=e.getSession();return s?.status==="ok"&&Bn(s,{status:"exited"}),lu(),e.setSession(o),o}function lu(){let t=ie(),r=Q().getSession()||t.getSession();r&&Bw(r),Xde(),t.setSession()}function Xde(){let t=ie(),e=H(),r=t.getSession();r&&e&&e.captureSession(r)}var zde="7";function Qde(t){let e=t.protocol?`${t.protocol}:`:"",r=t.port?`:${t.port}`:"";return`${e}//${t.host}${r}${t.path?`/${t.path}`:""}/api/`}function Jde(t){return`${Qde(t)}${t.projectId}/envelope/`}function Zde(t,e){let r={sentry_version:zde};return t.publicKey&&(r.sentry_key=t.publicKey),e&&(r.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(r).toString()}function g1(t,e,r){return e||`${Jde(t)}?${Zde(t,r)}`}var A1=[];function eEe(t){let e={};return t.forEach(r=>{let{name:n}=r,o=e[n];o&&!o.isDefaultInstance&&r.isDefaultInstance||(e[n]=r)}),Object.values(e)}function Vh(t){let e=t.defaultIntegrations||[],r=t.integrations;e.forEach(o=>{o.isDefaultInstance=!0});let n;if(Array.isArray(r))n=[...e,...r];else if(typeof r=="function"){let o=r(e);n=Array.isArray(o)?o:[o]}else n=e;return eEe(n)}function R1(t,e){let r={};return e.forEach(n=>{n&&Gh(t,n,r)}),r}function Bh(t,e){for(let r of e)r?.afterAllSetup&&r.afterAllSetup(t)}function Gh(t,e,r){if(r[e.name]){x&&m.log(`Integration skipped because it was already installed: ${e.name}`);return}if(r[e.name]=e,A1.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),A1.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){let n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(o,s)=>n(o,s,t))}if(typeof e.processEvent=="function"){let n=e.processEvent.bind(e),o=Object.assign((s,i)=>n(s,i,t),{id:e.name});t.addEventProcessor(o)}x&&m.log(`Integration installed: ${e.name}`)}function O1(t,e,r){let n=[{type:"client_report"},{timestamp:r||Vn(),discarded_events:t}];return or(e?{dsn:e}:{},[n])}function pd(t){let e=[];t.message&&e.push(t.message);try{let r=t.exception.values[t.exception.values.length-1];r?.value&&(e.push(r.value),r.type&&e.push(`${r.type}: ${r.value}`))}catch{}return e}function N1(t){let{trace_id:e,parent_span_id:r,span_id:n,status:o,origin:s,data:i,op:a}=t.contexts?.trace??{};return{data:i??{},description:t.transaction,op:a,parent_span_id:r,span_id:n??"",start_timestamp:t.start_timestamp??0,status:o,timestamp:t.timestamp,trace_id:e??"",origin:s,profile_id:i?.[$i],exclusive_time:i?.[Ki],measurements:t.measurements,is_segment:!0}}function I1(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[$i]:t.profile_id},...t.exclusive_time&&{[Ki]:t.exclusive_time}}}},measurements:t.measurements}}var P1="Not capturing exception because it's already been captured.",C1="Discarded session because of missing or non-string release",v1=Symbol.for("SentryInternalError"),b1=Symbol.for("SentryDoNotSendEventError");function _d(t){return{message:t,[v1]:!0}}function Hh(t){return{message:t,[b1]:!0}}function y1(t){return!!t&&typeof t=="object"&&v1 in t}function M1(t){return!!t&&typeof t=="object"&&b1 in t}var dd=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=e1(e.dsn):x&&m.warn("No DSN provided, client will not send events."),this._dsn){let r=g1(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:r})}}captureException(e,r,n){let o=Ke();if(G_(e))return x&&m.log(P1),o;let s={event_id:o,...r};return this._process(this.eventFromException(e,s).then(i=>this._captureEvent(i,s,n))),s.event_id}captureMessage(e,r,n,o){let s={event_id:Ke(),...n},i=Hi(e)?e:String(e),a=ki(e)?this.eventFromMessage(i,r,s):this.eventFromException(e,s);return this._process(a.then(c=>this._captureEvent(c,s,o))),s.event_id}captureEvent(e,r,n){let o=Ke();if(r?.originalException&&G_(r.originalException))return x&&m.log(P1),o;let s={event_id:o,...r},i=e.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(e,s,a||n,c)),s.event_id}captureSession(e){this.sendSession(e),Bn(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){let r=this._transport;return r?(this.emit("flush"),this._isClientDoneProcessing(e).then(n=>r.flush(e).then(o=>n&&o))):qr(!0)}close(e){return this.flush(e).then(r=>(this.getOptions().enabled=!1,this.emit("close"),r))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){let r=this._integrations[e.name];Gh(this,e,this._integrations),r||Bh(this,[e])}sendEvent(e,r={}){this.emit("beforeSendEvent",e,r);let n=n1(e,this._dsn,this._options._metadata,this._options.tunnel);for(let s of r.attachments||[])n=bh(n,Dh(s));let o=this.sendEnvelope(n);o&&o.then(s=>this.emit("afterSendEvent",e,s),null)}sendSession(e){let{release:r,environment:n=Xi}=this._options;if("aggregates"in e){let s=e.attrs||{};if(!s.release&&!r){x&&m.warn(C1);return}s.release=s.release||r,s.environment=s.environment||n,e.attrs=s}else{if(!e.release&&!r){x&&m.warn(C1);return}e.release=e.release||r,e.environment=e.environment||n}this.emit("beforeSendSession",e);let o=r1(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(e,r,n=1){if(this._options.sendClientReports){let o=`${e}:${r}`;x&&m.log(`Recording outcome: "${o}"${n>1?` (${n} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+n}}on(e,r){let n=this._hooks[e]=this._hooks[e]||[];return n.push(r),()=>{let o=n.indexOf(r);o>-1&&n.splice(o,1)}}emit(e,...r){let n=this._hooks[e];n&&n.forEach(o=>o(...r))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,r=>(x&&m.error("Error while sending envelope:",r),r)):(x&&m.error("Transport disabled"),qr({}))}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=R1(this,e),Bh(this,e)}_updateSessionFromEvent(e,r){let n=r.level==="fatal",o=!1,s=r.exception?.values;if(s){o=!0;for(let c of s)if(c.mechanism?.handled===!1){n=!0;break}}let i=e.status==="ok";(i&&e.errors===0||i&&n)&&(Bn(e,{...n&&{status:"crashed"},errors:e.errors||Number(o||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new En(r=>{let n=0,o=1,s=setInterval(()=>{this._numProcessing==0?(clearInterval(s),r(!0)):(n+=o,e&&n>=e&&(clearInterval(s),r(!1)))},o)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,r,n,o){let s=this.getOptions(),i=Object.keys(this._integrations);return!r.integrations&&i?.length&&(r.integrations=i),this.emit("preprocessEvent",e,r),e.type||o.setLastEventId(e.event_id||r.event_id),m1(s,e,r,n,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,r),a.contexts={trace:Yi(n),...a.contexts};let c=Gn(this,n);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(e,r={},n=Q(),o=ie()){return x&&kh(e)&&m.log(`Captured error event \`${pd(e)[0]||"<unknown>"}\``),this._processEvent(e,r,n,o).then(s=>s.event_id,s=>{x&&(M1(s)?m.log(s.message):y1(s)?m.warn(s.message):m.warn(s))})}_processEvent(e,r,n,o){let s=this.getOptions(),{sampleRate:i}=s,a=L1(e),c=kh(e),u=e.type||"error",l=`before send for type \`${u}\``,p=typeof i>"u"?void 0:nr(i);if(c&&typeof p=="number"&&Math.random()>p)return this.recordDroppedEvent("sample_rate","error"),rd(Hh(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let _=u==="replay_event"?"replay":u;return this._prepareEvent(e,r,n,o).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",_),Hh("An event processor returned `null`, will not send event.");if(r.data&&r.data.__sentry__===!0)return d;let f=rEe(this,s,d,r);return tEe(f,l)}).then(d=>{if(d===null){if(this.recordDroppedEvent("before_send",_),a){let h=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",h)}throw Hh(`${l} returned \`null\`, will not send event.`)}let S=n.getSession()||o.getSession();if(c&&S&&this._updateSessionFromEvent(S,d),a){let T=d.sdkProcessingMetadata?.spanCountBeforeProcessing||0,h=d.spans?d.spans.length:0,A=T-h;A>0&&this.recordDroppedEvent("before_send","span",A)}let f=d.transaction_info;if(a&&f&&d.transaction!==e.transaction){let T="custom";d.transaction_info={...f,source:T}}return this.sendEvent(d,r),d}).then(null,d=>{throw M1(d)||y1(d)?d:(this.captureException(d,{data:{__sentry__:!0},originalException:d}),_d(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
57
|
-
Reason: ${d}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([r,n])=>{let[o,s]=r.split(":");return{reason:o,category:s,quantity:n}})}_flushOutcomes(){x&&m.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){x&&m.log("No outcomes to send");return}if(!this._dsn){x&&m.log("No dsn provided, will not send outcomes");return}x&&m.log("Sending outcomes:",e);let r=O1(e,this._options.tunnel&&kr(this._dsn));this.sendEnvelope(r)}};function tEe(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Ur(t))return t.then(n=>{if(!wn(n)&&n!==null)throw _d(r);return n},n=>{throw _d(`${e} rejected with ${n}`)});if(!wn(t)&&t!==null)throw _d(r);return t}function rEe(t,e,r,n){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=e,a=r;if(kh(a)&&o)return o(a,n);if(L1(a)){if(i){let c=i(N1(a));if(c?a=Io(r,I1(c)):nu(),a.spans){let u=[];for(let l of a.spans){let p=i(l);p?u.push(p):(nu(),u.push(l))}a.spans=u}}if(s){if(a.spans){let c=a.spans.length;a.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(a,n)}}return a}function kh(t){return t.type===void 0}function L1(t){return t.type==="transaction"}function D1(t,e){return e?ln(e,()=>{let r=dn(),n=r?yo(r):Yi(e);return[r?Ve(r):Gn(t,e),n]}):[void 0,void 0]}function x1(t,e,r,n,o){let s={sent_at:new Date().toISOString()};r?.sdk&&(s.sdk={name:r.sdk.name,version:r.sdk.version}),n&&o&&(s.dsn=kr(o)),e&&(s.trace=e);let i=nEe(t);return or(s,[i])}function nEe(t){return[{type:"check_in"},t]}function oEe(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function U1(t,e,r,n){let o={};return e?.sdk&&(o.sdk={name:e.sdk.name,version:e.sdk.version}),r&&n&&(o.dsn=kr(n)),or(o,[oEe(t)])}function Bs(t,e){let r=e??sEe(t)??[];if(r.length===0)return;let n=t.getOptions(),o=U1(r,n._metadata,n.tunnel,t.getDsn());w1().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function sEe(t){return w1().get(t)}function w1(){return Un("clientToLogBufferMap",()=>new WeakMap)}function V1(t,e){return t(e.stack||"",1)}function Fh(t,e){let r={type:e.name||e.constructor.name,value:e.message},n=V1(t,e);return n.length&&(r.stacktrace={frames:n}),r}function iEe(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}function aEe(t){if("name"in t&&typeof t.name=="string"){let n=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(n+=` with message '${t.message}'`),n}else if("message"in t&&typeof t.message=="string")return t.message;let e=dh(t);if(oh(t))return`Event \`ErrorEvent\` captured as exception with message \`${t.message}\``;let r=cEe(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${e}`}function cEe(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function uEe(t,e,r,n){if(go(r))return[r,void 0];if(e.synthetic=!0,wn(r)){let s=t?.getOptions().normalizeDepth,i={__serialized__:Mh(r,s)},a=iEe(r);if(a)return[a,i];let c=aEe(r),u=n?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=n?.syntheticException||new Error(r);return o.message=`${r}`,[o,void 0]}function B1(t,e,r,n){let s=n?.data&&n.data.mechanism||{handled:!0,type:"generic"},[i,a]=uEe(t,s,r,n),c={exception:{values:[Fh(e,i)]}};return a&&(c.extra=a),fh(c,void 0,void 0),Fi(c,s),{...c,event_id:n?.event_id}}function G1(t,e,r="info",n,o){let s={event_id:n?.event_id,level:r};if(o&&n?.syntheticException){let i=V1(t,n.syntheticException);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]},Fi(s,{synthetic:!0}))}if(Hi(e)){let{__sentry_template_string__:i,__sentry_template_values__:a}=e;return s.logentry={message:i,params:a},s}return s.message=e,s}var lEe=5e3,pu=class extends dd{constructor(e){if(Qw(),super(e),this._logWeight=0,this._isLogTimerActive=!1,this._options.enableLogs??this._options._experiments?.enableLogs){let n=this;n.on("flushLogs",()=>{n._logWeight=0,clearTimeout(n._logFlushIdleTimeout),n._isLogTimerActive=!1}),n.on("afterCaptureLog",o=>{n._logWeight+=pEe(o),n._logWeight>=8e5?Bs(n):n._isLogTimerActive||(n._isLogTimerActive=!0,n._logFlushIdleTimeout=setTimeout(()=>{Bs(n)},lEe))}),n.on("flush",()=>{Bs(n)})}}eventFromException(e,r){let n=B1(this,this._options.stackParser,e,r);return n.level="error",qr(n)}eventFromMessage(e,r="info",n){return qr(G1(this._options.stackParser,e,r,n,this._options.attachStacktrace))}captureException(e,r,n){return H1(r),super.captureException(e,r,n)}captureEvent(e,r,n){return!e.type&&e.exception?.values&&e.exception.values.length>0&&H1(r),super.captureEvent(e,r,n)}captureCheckIn(e,r,n){let o="checkInId"in e&&e.checkInId?e.checkInId:Ke();if(!this._isEnabled())return x&&m.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:e.monitorSlug,status:e.status,release:i,environment:a};"duration"in e&&(u.duration=e.duration),r&&(u.monitor_config={schedule:r.schedule,checkin_margin:r.checkinMargin,max_runtime:r.maxRuntime,timezone:r.timezone,failure_issue_threshold:r.failureIssueThreshold,recovery_threshold:r.recoveryThreshold});let[l,p]=D1(this,n);p&&(u.contexts={trace:p});let _=x1(u,l,this.getSdkMetadata(),c,this.getDsn());return x&&m.log("Sending checkin:",e.monitorSlug,e.status),this.sendEnvelope(_),o}_prepareEvent(e,r,n,o){return this._options.platform&&(e.platform=e.platform||this._options.platform),this._options.runtime&&(e.contexts={...e.contexts,runtime:e.contexts?.runtime||this._options.runtime}),this._options.serverName&&(e.server_name=e.server_name||this._options.serverName),super._prepareEvent(e,r,n,o)}};function H1(t){let e=ie().getScopeData().sdkProcessingMetadata.requestSession;if(e){let r=t?.mechanism?.handled??!0;r&&e.status!=="crashed"?e.status="errored":r||(e.status="crashed")}}function pEe(t){let e=0;return t.message&&(e+=t.message.length*2),t.attributes&&Object.values(t.attributes).forEach(r=>{Array.isArray(r)?e+=r.length*k1(r[0]):ki(r)?e+=k1(r):e+=100}),e}function k1(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}var qh=Symbol.for("SentryBufferFullError");function F1(t){let e=[];function r(){return t===void 0||e.length<t}function n(i){return e.splice(e.indexOf(i),1)[0]||Promise.resolve(void 0)}function o(i){if(!r())return rd(qh);let a=i();return e.indexOf(a)===-1&&e.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function s(i){return new En((a,c)=>{let u=e.length;if(!u)return a(!0);let l=setTimeout(()=>{i&&i>0&&a(!1)},i);e.forEach(p=>{qr(p).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:e,add:o,drain:s}}function _Ee(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function dEe(t,e){return t[e]||t.all||0}function q1(t,e,r=Date.now()){return dEe(t,e)>r}function j1(t,{statusCode:e,headers:r},n=Date.now()){let o={...t},s=r?.["x-sentry-rate-limits"],i=r?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,l]=a.split(":",5),p=parseInt(c,10),_=(isNaN(p)?60:p)*1e3;if(!u)o.all=n+_;else for(let d of u.split(";"))d==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[d]=n+_):o[d]=n+_}else i?o.all=n+_Ee(i,n):e===429&&(o.all=n+60*1e3);return o}var EEe=64;function _u(t,e,r=F1(t.bufferSize||EEe)){let n={},o=i=>r.drain(i);function s(i){let a=[];if(z_(i,(p,_)=>{let d=Q_(_);q1(n,d)?t.recordDroppedEvent("ratelimit_backoff",d):a.push(p)}),a.length===0)return qr({});let c=or(i[0],a),u=p=>{z_(c,(_,d)=>{t.recordDroppedEvent(p,Q_(d))})},l=()=>e({body:ou(c)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&x&&m.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),n=j1(n,p),p),p=>{throw u("network_error"),x&&m.error("Encountered error running transport request:",p),p});return r.add(l).then(p=>p,p=>{if(p===qh)return x&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),qr({});throw p})}return{send:s,flush:o}}function Gs(t,e,r=[e],n="npm"){let o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:r.map(s=>({name:`${n}:@sentry/${s}`,version:pe})),version:pe}),t._metadata=o}function Ji(t={}){let e=t.client||H();if(!ud()||!e)return{};let r=Lt(),n=Vr(r);if(n.getTraceData)return n.getTraceData(t);let o=t.scope||Q(),s=t.span||dn(),i=s?K_(s):fEe(o),a=s?Ve(s):Gn(e,o),c=Ls(a);return q_.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function fEe(t){let{traceId:e,sampled:r,propagationSpanId:n}=t.getPropagationContext();return Co(e,n,r)}function jh(t,e,r){let n,o,s,i=r?.maxWait?Math.max(r.maxWait,e):0,a=r?.setTimeoutImpl||setTimeout;function c(){return u(),n=t(),n}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function l(){return o!==void 0||s!==void 0?c():n}function p(){return o&&clearTimeout(o),o=a(c,e),i&&s===void 0&&(s=a(c,i)),n}return p.cancel=u,p.flush=l,p}function Y1(t){let e=Object.create(null);try{Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(e[r]=n)})}catch{}return e}function Ed(t){let e=t.headers||{},n=(typeof e["x-forwarded-host"]=="string"?e["x-forwarded-host"]:void 0)||(typeof e.host=="string"?e.host:void 0),s=(typeof e["x-forwarded-proto"]=="string"?e["x-forwarded-proto"]:void 0)||t.protocol||(t.socket?.encrypted?"https":"http"),i=t.url||"",a=SEe({url:i,host:n,protocol:s}),c=t.body||void 0,u=t.cookies;return{url:a,method:t.method,query_string:$1(i),headers:Y1(e),cookies:u,data:c}}function SEe({url:t,protocol:e,host:r}){if(t?.startsWith("http"))return t;if(t&&r)return`${e}://${r}${t}`}function $1(t){if(t)try{let e=new URL(t,"http://s.io").search.slice(1);return e.length?e:void 0}catch{return}}var TEe=100;function hr(t,e){let r=H(),n=ie();if(!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=TEe}=r.getOptions();if(s<=0)return;let a={timestamp:Vn(),...t},c=o?Me(()=>o(a,e)):a;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,e),n.addBreadcrumb(c,s))}var K1,mEe="FunctionToString",W1=new WeakMap,hEe=(()=>({name:mEe,setupOnce(){K1=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=_h(this),r=W1.has(H())&&e!==void 0?e:this;return K1.apply(r,t)}}catch{}},setup(t){W1.set(t,!0)}})),fd=hEe;var gEe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],AEe="EventFilters",Yh=(t={})=>{let e;return{name:AEe,setup(r){let n=r.getOptions();e=X1(t,n)},processEvent(r,n,o){if(!e){let s=o.getOptions();e=X1(t,s)}return REe(r,e)?null:r}}},Td=((t={})=>({...Yh(t),name:"InboundFilters"}));function X1(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:gEe],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function REe(t,e){if(t.type){if(t.type==="transaction"&&NEe(t,e.ignoreTransactions))return x&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
57
|
+
Reason: ${d}`))})}_process(e){this._numProcessing++,e.then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([r,n])=>{let[o,s]=r.split(":");return{reason:o,category:s,quantity:n}})}_flushOutcomes(){x&&m.log("Flushing outcomes...");let e=this._clearOutcomes();if(e.length===0){x&&m.log("No outcomes to send");return}if(!this._dsn){x&&m.log("No dsn provided, will not send outcomes");return}x&&m.log("Sending outcomes:",e);let r=O1(e,this._options.tunnel&&kr(this._dsn));this.sendEnvelope(r)}};function tEe(t,e){let r=`${e} must return \`null\` or a valid event.`;if(Ur(t))return t.then(n=>{if(!wn(n)&&n!==null)throw _d(r);return n},n=>{throw _d(`${e} rejected with ${n}`)});if(!wn(t)&&t!==null)throw _d(r);return t}function rEe(t,e,r,n){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i}=e,a=r;if(kh(a)&&o)return o(a,n);if(L1(a)){if(i){let c=i(N1(a));if(c?a=Io(r,I1(c)):nu(),a.spans){let u=[];for(let l of a.spans){let p=i(l);p?u.push(p):(nu(),u.push(l))}a.spans=u}}if(s){if(a.spans){let c=a.spans.length;a.sdkProcessingMetadata={...r.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return s(a,n)}}return a}function kh(t){return t.type===void 0}function L1(t){return t.type==="transaction"}function D1(t,e){return e?ln(e,()=>{let r=dn(),n=r?yo(r):Yi(e);return[r?Ve(r):Gn(t,e),n]}):[void 0,void 0]}function x1(t,e,r,n,o){let s={sent_at:new Date().toISOString()};r?.sdk&&(s.sdk={name:r.sdk.name,version:r.sdk.version}),n&&o&&(s.dsn=kr(o)),e&&(s.trace=e);let i=nEe(t);return or(s,[i])}function nEe(t){return[{type:"check_in"},t]}function oEe(t){return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{items:t}]}function U1(t,e,r,n){let o={};return e?.sdk&&(o.sdk={name:e.sdk.name,version:e.sdk.version}),r&&n&&(o.dsn=kr(n)),or(o,[oEe(t)])}function Bs(t,e){let r=e??sEe(t)??[];if(r.length===0)return;let n=t.getOptions(),o=U1(r,n._metadata,n.tunnel,t.getDsn());w1().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(o)}function sEe(t){return w1().get(t)}function w1(){return Un("clientToLogBufferMap",()=>new WeakMap)}function V1(t,e){return t(e.stack||"",1)}function Fh(t,e){let r={type:e.name||e.constructor.name,value:e.message},n=V1(t,e);return n.length&&(r.stacktrace={frames:n}),r}function iEe(t){for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){let r=t[e];if(r instanceof Error)return r}}function aEe(t){if("name"in t&&typeof t.name=="string"){let n=`'${t.name}' captured as exception`;return"message"in t&&typeof t.message=="string"&&(n+=` with message '${t.message}'`),n}else if("message"in t&&typeof t.message=="string")return t.message;let e=dh(t);if(oh(t))return`Event \`ErrorEvent\` captured as exception with message \`${t.message}\``;let r=cEe(t);return`${r&&r!=="Object"?`'${r}'`:"Object"} captured as exception with keys: ${e}`}function cEe(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function uEe(t,e,r,n){if(go(r))return[r,void 0];if(e.synthetic=!0,wn(r)){let s=t?.getOptions().normalizeDepth,i={__serialized__:Mh(r,s)},a=iEe(r);if(a)return[a,i];let c=aEe(r),u=n?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=n?.syntheticException||new Error(r);return o.message=`${r}`,[o,void 0]}function B1(t,e,r,n){let s=n?.data&&n.data.mechanism||{handled:!0,type:"generic"},[i,a]=uEe(t,s,r,n),c={exception:{values:[Fh(e,i)]}};return a&&(c.extra=a),fh(c,void 0,void 0),Fi(c,s),{...c,event_id:n?.event_id}}function G1(t,e,r="info",n,o){let s={event_id:n?.event_id,level:r};if(o&&n?.syntheticException){let i=V1(t,n.syntheticException);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]},Fi(s,{synthetic:!0}))}if(Hi(e)){let{__sentry_template_string__:i,__sentry_template_values__:a}=e;return s.logentry={message:i,params:a},s}return s.message=e,s}var lEe=5e3,pu=class extends dd{constructor(e){if(Qw(),super(e),this._logWeight=0,this._isLogTimerActive=!1,this._options.enableLogs??this._options._experiments?.enableLogs){let n=this;n.on("flushLogs",()=>{n._logWeight=0,clearTimeout(n._logFlushIdleTimeout),n._isLogTimerActive=!1}),n.on("afterCaptureLog",o=>{n._logWeight+=pEe(o),n._logWeight>=8e5?Bs(n):n._isLogTimerActive||(n._isLogTimerActive=!0,n._logFlushIdleTimeout=setTimeout(()=>{Bs(n)},lEe))}),n.on("flush",()=>{Bs(n)})}}eventFromException(e,r){let n=B1(this,this._options.stackParser,e,r);return n.level="error",qr(n)}eventFromMessage(e,r="info",n){return qr(G1(this._options.stackParser,e,r,n,this._options.attachStacktrace))}captureException(e,r,n){return H1(r),super.captureException(e,r,n)}captureEvent(e,r,n){return!e.type&&e.exception?.values&&e.exception.values.length>0&&H1(r),super.captureEvent(e,r,n)}captureCheckIn(e,r,n){let o="checkInId"in e&&e.checkInId?e.checkInId:Ke();if(!this._isEnabled())return x&&m.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:e.monitorSlug,status:e.status,release:i,environment:a};"duration"in e&&(u.duration=e.duration),r&&(u.monitor_config={schedule:r.schedule,checkin_margin:r.checkinMargin,max_runtime:r.maxRuntime,timezone:r.timezone,failure_issue_threshold:r.failureIssueThreshold,recovery_threshold:r.recoveryThreshold});let[l,p]=D1(this,n);p&&(u.contexts={trace:p});let _=x1(u,l,this.getSdkMetadata(),c,this.getDsn());return x&&m.log("Sending checkin:",e.monitorSlug,e.status),this.sendEnvelope(_),o}_prepareEvent(e,r,n,o){return this._options.platform&&(e.platform=e.platform||this._options.platform),this._options.runtime&&(e.contexts={...e.contexts,runtime:e.contexts?.runtime||this._options.runtime}),this._options.serverName&&(e.server_name=e.server_name||this._options.serverName),super._prepareEvent(e,r,n,o)}};function H1(t){let e=ie().getScopeData().sdkProcessingMetadata.requestSession;if(e){let r=t?.mechanism?.handled??!0;r&&e.status!=="crashed"?e.status="errored":r||(e.status="crashed")}}function pEe(t){let e=0;return t.message&&(e+=t.message.length*2),t.attributes&&Object.values(t.attributes).forEach(r=>{Array.isArray(r)?e+=r.length*k1(r[0]):ki(r)?e+=k1(r):e+=100}),e}function k1(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}var qh=Symbol.for("SentryBufferFullError");function F1(t){let e=[];function r(){return t===void 0||e.length<t}function n(i){return e.splice(e.indexOf(i),1)[0]||Promise.resolve(void 0)}function o(i){if(!r())return rd(qh);let a=i();return e.indexOf(a)===-1&&e.push(a),a.then(()=>n(a)).then(null,()=>n(a).then(null,()=>{})),a}function s(i){return new En((a,c)=>{let u=e.length;if(!u)return a(!0);let l=setTimeout(()=>{i&&i>0&&a(!1)},i);e.forEach(p=>{qr(p).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:e,add:o,drain:s}}function _Ee(t,e=Date.now()){let r=parseInt(`${t}`,10);if(!isNaN(r))return r*1e3;let n=Date.parse(`${t}`);return isNaN(n)?6e4:n-e}function dEe(t,e){return t[e]||t.all||0}function q1(t,e,r=Date.now()){return dEe(t,e)>r}function j1(t,{statusCode:e,headers:r},n=Date.now()){let o={...t},s=r?.["x-sentry-rate-limits"],i=r?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,l]=a.split(":",5),p=parseInt(c,10),_=(isNaN(p)?60:p)*1e3;if(!u)o.all=n+_;else for(let d of u.split(";"))d==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[d]=n+_):o[d]=n+_}else i?o.all=n+_Ee(i,n):e===429&&(o.all=n+60*1e3);return o}var EEe=64;function _u(t,e,r=F1(t.bufferSize||EEe)){let n={},o=i=>r.drain(i);function s(i){let a=[];if(z_(i,(p,_)=>{let d=Q_(_);q1(n,d)?t.recordDroppedEvent("ratelimit_backoff",d):a.push(p)}),a.length===0)return qr({});let c=or(i[0],a),u=p=>{z_(c,(_,d)=>{t.recordDroppedEvent(p,Q_(d))})},l=()=>e({body:ou(c)}).then(p=>(p.statusCode!==void 0&&(p.statusCode<200||p.statusCode>=300)&&x&&m.warn(`Sentry responded with status code ${p.statusCode} to sent event.`),n=j1(n,p),p),p=>{throw u("network_error"),x&&m.error("Encountered error running transport request:",p),p});return r.add(l).then(p=>p,p=>{if(p===qh)return x&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),qr({});throw p})}return{send:s,flush:o}}function Gs(t,e,r=[e],n="npm"){let o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${e}`,packages:r.map(s=>({name:`${n}:@sentry/${s}`,version:pe})),version:pe}),t._metadata=o}function Ji(t={}){let e=t.client||H();if(!ud()||!e)return{};let r=Lt(),n=Vr(r);if(n.getTraceData)return n.getTraceData(t);let o=t.scope||Q(),s=t.span||dn(),i=s?K_(s):fEe(o),a=s?Ve(s):Gn(e,o),c=Ls(a);return q_.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function fEe(t){let{traceId:e,sampled:r,propagationSpanId:n}=t.getPropagationContext();return Co(e,n,r)}function jh(t,e,r){let n,o,s,i=r?.maxWait?Math.max(r.maxWait,e):0,a=r?.setTimeoutImpl||setTimeout;function c(){return u(),n=t(),n}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function l(){return o!==void 0||s!==void 0?c():n}function p(){return o&&clearTimeout(o),o=a(c,e),i&&s===void 0&&(s=a(c,i)),n}return p.cancel=u,p.flush=l,p}function Y1(t){let e=Object.create(null);try{Object.entries(t).forEach(([r,n])=>{typeof n=="string"&&(e[r]=n)})}catch{}return e}function Ed(t){let e=t.headers||{},n=(typeof e["x-forwarded-host"]=="string"?e["x-forwarded-host"]:void 0)||(typeof e.host=="string"?e.host:void 0),s=(typeof e["x-forwarded-proto"]=="string"?e["x-forwarded-proto"]:void 0)||t.protocol||(t.socket?.encrypted?"https":"http"),i=t.url||"",a=SEe({url:i,host:n,protocol:s}),c=t.body||void 0,u=t.cookies;return{url:a,method:t.method,query_string:$1(i),headers:Y1(e),cookies:u,data:c}}function SEe({url:t,protocol:e,host:r}){if(t?.startsWith("http"))return t;if(t&&r)return`${e}://${r}${t}`}function $1(t){if(t)try{let e=new URL(t,"http://s.io").search.slice(1);return e.length?e:void 0}catch{return}}var TEe=100;function sr(t,e){let r=H(),n=ie();if(!r)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=TEe}=r.getOptions();if(s<=0)return;let a={timestamp:Vn(),...t},c=o?Me(()=>o(a,e)):a;c!==null&&(r.emit&&r.emit("beforeAddBreadcrumb",c,e),n.addBreadcrumb(c,s))}var K1,mEe="FunctionToString",W1=new WeakMap,hEe=(()=>({name:mEe,setupOnce(){K1=Function.prototype.toString;try{Function.prototype.toString=function(...t){let e=_h(this),r=W1.has(H())&&e!==void 0?e:this;return K1.apply(r,t)}}catch{}},setup(t){W1.set(t,!0)}})),fd=hEe;var gEe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],AEe="EventFilters",Yh=(t={})=>{let e;return{name:AEe,setup(r){let n=r.getOptions();e=X1(t,n)},processEvent(r,n,o){if(!e){let s=o.getOptions();e=X1(t,s)}return REe(r,e)?null:r}}},Td=((t={})=>({...Yh(t),name:"InboundFilters"}));function X1(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:gEe],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function REe(t,e){if(t.type){if(t.type==="transaction"&&NEe(t,e.ignoreTransactions))return x&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
58
58
|
Event: ${Oo(t)}`),!0}else{if(OEe(t,e.ignoreErrors))return x&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
59
59
|
Event: ${Oo(t)}`),!0;if(yEe(t))return x&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
60
60
|
Event: ${Oo(t)}`),!0;if(IEe(t,e.denyUrls))return x&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
61
61
|
Event: ${Oo(t)}.
|
|
62
62
|
Url: ${Sd(t)}`),!0;if(!PEe(t,e.allowUrls))return x&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
63
63
|
Event: ${Oo(t)}.
|
|
64
|
-
Url: ${Sd(t)}`),!0}return!1}function OEe(t,e){return e?.length?pd(t).some(r=>Ro(r,e)):!1}function NEe(t,e){if(!e?.length)return!1;let r=t.transaction;return r?Ro(r,e):!1}function IEe(t,e){if(!e?.length)return!1;let r=Sd(t);return r?Ro(r,e):!1}function PEe(t,e){if(!e?.length)return!0;let r=Sd(t);return r?Ro(r,e):!0}function CEe(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Sd(t){try{let r=[...t.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?CEe(r):null}catch{return x&&m.error(`Cannot extract url for event ${Oo(t)}`),null}}function yEe(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function J1(t,e,r,n,o,s){if(!o.exception?.values||!s||!an(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=$h(t,e,n,s.originalException,r,o.exception.values,i,0))}function $h(t,e,r,n,o,s,i,a){if(s.length>=r+1)return s;let c=[...s];if(an(n[o],Error)){z1(i,a);let u=t(e,n[o]),l=c.length;Q1(u,o,l,a),c=$h(t,e,r,n[o],o,[u,...c],u,l)}return Array.isArray(n.errors)&&n.errors.forEach((u,l)=>{if(an(u,Error)){z1(i,a);let p=t(e,u),_=c.length;Q1(p,`errors[${l}]`,_,a),c=$h(t,e,r,u,o,[p,...c],p,_)}}),c}function z1(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Q1(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}var MEe="cause",vEe=5,bEe="LinkedErrors",LEe=((t={})=>{let e=t.limit||vEe,r=t.key||MEe;return{name:bEe,preprocessEvent(n,o,s){let i=s.getOptions();J1(Fh,i.stackParser,r,e,n,o)}}}),md=LEe;function Z1(t){let e={},r=0;for(;r<t.length;){let n=t.indexOf("=",r);if(n===-1)break;let o=t.indexOf(";",r);if(o===-1)o=t.length;else if(o<n){r=t.lastIndexOf(";",n-1)+1;continue}let s=t.slice(r,n).trim();if(e[s]===void 0){let i=t.slice(n+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{e[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{e[s]=i}}r=o+1}return e}var Kh=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function eV(t){return Kh.map(o=>{let s=t[o],i=Array.isArray(s)?s.join(";"):s;return o==="Forwarded"?DEe(i):i?.split(",").map(a=>a.trim())}).reduce((o,s)=>s?o.concat(s):o,[]).find(o=>o!==null&&xEe(o))||null}function DEe(t){if(!t)return null;for(let e of t.split(";"))if(e.startsWith("for="))return e.slice(4);return null}function xEe(t){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(t)}var UEe={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},wEe="RequestData",VEe=((t={})=>{let e={...UEe,...t.include};return{name:wEe,processEvent(r,n,o){let{sdkProcessingMetadata:s={}}=r,{normalizedRequest:i,ipAddress:a}=s,c={...e,ip:e.ip??o.getOptions().sendDefaultPii};return i&&BEe(r,i,{ipAddress:a},c),r}}}),hd=VEe;function BEe(t,e,r,n){if(t.request={...t.request,...GEe(e,n)},n.ip){let o=e.headers&&eV(e.headers)||r.ipAddress;o&&(t.user={...t.user,ip_address:o})}}function GEe(t,e){let r={},n={...t.headers};if(e.headers&&(r.headers=n,e.cookies||delete n.cookie,e.ip||Kh.forEach(o=>{delete n[o]})),r.method=t.method,e.url&&(r.url=t.url),e.cookies){let o=t.cookies||(n?.cookie?Z1(n.cookie):void 0);r.cookies=o||{}}return e.query_string&&(r.query_string=t.query_string),e.data&&(r.data=t.data),r}function tV(t){let e="console";Vi(e,t),Bi(e,HEe)}function HEe(){"console"in j&&Xc.forEach(function(t){t in j.console&&ph(j.console,t,function(e){return wi[t]=e,function(...r){Gi("console",{args:r,level:t}),wi[t]?.apply(j.console,r)}})})}function rV(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var kEe=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function FEe(t){let e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,r=kEe.exec(e);return r?r.slice(1):[]}function Wh(t){let e=FEe(t),r=e[0]||"",n=e[1];return!r&&!n?".":(n&&(n=n.slice(0,n.length-1)),r+n)}var qEe="Console",gd=(t={})=>{let e=new Set(t.levels||Xc);return{name:qEe,setup(r){tV(({args:n,level:o})=>{H()!==r||!e.has(o)||jEe(o,n)})}}};function jEe(t,e){let r={category:"console",data:{arguments:e,logger:"console"},level:rV(t),message:nV(e)};if(t==="assert")if(e[0]===!1){let n=e.slice(1);r.message=n.length>0?`Assertion failed: ${nV(n)}`:"Assertion failed",r.data.arguments=n}else return;hr(r,{input:e,level:t})}function nV(t){return"util"in j&&typeof j.util.format=="function"?j.util.format(...t):lh(t," ")}function Mo(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}function Zi(t){return t.split(/[?#]/,1)[0]}function vo(t){let{protocol:e,host:r,path:n}=t,o=r?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${e?`${e}://`:""}${o}${n}`}var Xh="ai.prompt",oV="ai.response.object",sV="ai.response.text",iV="ai.response.toolCalls",aV="ai.prompt.messages",cV="ai.prompt.tools",fn="ai.model.id",uV="ai.model.provider",lV="ai.response.providerMetadata",pV="ai.telemetry.functionId",_V="ai.usage.completionTokens",dV="ai.usage.promptTokens",zh="gen_ai.response.model",Ad="gen_ai.usage.input_tokens",Rd="gen_ai.usage.output_tokens",Qh="ai.toolCall.name",Jh="ai.toolCall.id",EV="ai.toolCall.args",fV="ai.toolCall.result";function SV(t,e){t.setAttribute(ae,e)}function YEe(t){let{data:e,description:r}=k(t);if(!r)return;if(e[Qh]&&e[Jh]&&r==="ai.toolCall"){WEe(t,e);return}let n=e[fn],o=e[uV];typeof n!="string"||typeof o!="string"||!n||!o||XEe(t,r,e)}function $Ee(t){if(t.type==="transaction"&&t.spans)for(let e of t.spans)KEe(e);return t}function KEe(t){let{data:e,origin:r}=t;if(r==="auto.vercelai.otel"){gr(e,_V,Rd),gr(e,dV,Ad),typeof e[Rd]=="number"&&typeof e[Ad]=="number"&&(e["gen_ai.usage.total_tokens"]=e[Rd]+e[Ad]),gr(e,aV,"gen_ai.request.messages"),gr(e,sV,"gen_ai.response.text"),gr(e,iV,"gen_ai.response.tool_calls"),gr(e,oV,"gen_ai.response.object"),gr(e,cV,"gen_ai.request.available_tools"),gr(e,EV,"gen_ai.tool.input"),gr(e,fV,"gen_ai.tool.output"),zEe(e);for(let n of Object.keys(e))n.startsWith("ai.")&&gr(e,n,`vercel.${n}`)}}function gr(t,e,r){t[e]!=null&&(t[r]=t[e],delete t[e])}function WEe(t,e){SV(t,"auto.vercelai.otel"),t.setAttribute(W,"gen_ai.execute_tool"),gr(e,Qh,"gen_ai.tool.name"),gr(e,Jh,"gen_ai.tool.call.id"),e["gen_ai.tool.type"]||t.setAttribute("gen_ai.tool.type","function");let r=e["gen_ai.tool.name"];r&&t.updateName(`execute_tool ${r}`)}function XEe(t,e,r){SV(t,"auto.vercelai.otel");let n=e.replace("ai.","");t.setAttribute("ai.pipeline.name",n),t.updateName(n);let o=r[pV];if(o&&typeof o=="string"&&e.split(".").length-1===1&&(t.updateName(`${n} ${o}`),t.setAttribute("gen_ai.function_id",o)),r[Xh]&&t.setAttribute("gen_ai.prompt",r[Xh]),r[fn]&&!r[zh]&&t.setAttribute(zh,r[fn]),t.setAttribute("ai.streaming",e.includes("stream")),e==="ai.generateText"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.generateText.doGenerate"){t.setAttribute(W,"gen_ai.generate_text"),t.updateName(`generate_text ${r[fn]}`);return}if(e==="ai.streamText"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.streamText.doStream"){t.setAttribute(W,"gen_ai.stream_text"),t.updateName(`stream_text ${r[fn]}`);return}if(e==="ai.generateObject"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.generateObject.doGenerate"){t.setAttribute(W,"gen_ai.generate_object"),t.updateName(`generate_object ${r[fn]}`);return}if(e==="ai.streamObject"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.streamObject.doStream"){t.setAttribute(W,"gen_ai.stream_object"),t.updateName(`stream_object ${r[fn]}`);return}if(e==="ai.embed"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.embed.doEmbed"){t.setAttribute(W,"gen_ai.embed"),t.updateName(`embed ${r[fn]}`);return}if(e==="ai.embedMany"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.embedMany.doEmbed"){t.setAttribute(W,"gen_ai.embed_many"),t.updateName(`embed_many ${r[fn]}`);return}if(e.startsWith("ai.stream")){t.setAttribute(W,"ai.run");return}}function Od(t){t.on("spanStart",YEe),t.addEventProcessor(Object.assign($Ee,{id:"VercelAiEventProcessor"}))}function zEe(t){let e=t[lV];if(e)try{let r=JSON.parse(e);r.openai&&(jr(t,"gen_ai.usage.input_tokens.cached",r.openai.cachedPromptTokens),jr(t,"gen_ai.usage.output_tokens.reasoning",r.openai.reasoningTokens),jr(t,"gen_ai.usage.output_tokens.prediction_accepted",r.openai.acceptedPredictionTokens),jr(t,"gen_ai.usage.output_tokens.prediction_rejected",r.openai.rejectedPredictionTokens),jr(t,"gen_ai.conversation.id",r.openai.responseId)),r.anthropic&&(jr(t,"gen_ai.usage.input_tokens.cached",r.anthropic.cacheReadInputTokens),jr(t,"gen_ai.usage.input_tokens.cache_write",r.anthropic.cacheCreationInputTokens)),r.bedrock?.usage&&(jr(t,"gen_ai.usage.input_tokens.cached",r.bedrock.usage.cacheReadInputTokens),jr(t,"gen_ai.usage.input_tokens.cache_write",r.bedrock.usage.cacheWriteInputTokens)),r.deepseek&&(jr(t,"gen_ai.usage.input_tokens.cached",r.deepseek.promptCacheHitTokens),jr(t,"gen_ai.usage.input_tokens.cache_miss",r.deepseek.promptCacheMissTokens))}catch{}}function jr(t,e,r){r!=null&&(t[e]=r)}var TV="gen_ai.system",Nd="gen_ai.request.model",mV="gen_ai.request.temperature",hV="gen_ai.request.frequency_penalty",gV="gen_ai.request.presence_penalty",AV="gen_ai.request.top_p",Zh="gen_ai.response.finish_reasons",RV="gen_ai.response.model",OV="gen_ai.response.id",NV="gen_ai.usage.input_tokens",IV="gen_ai.usage.output_tokens",PV="gen_ai.usage.total_tokens",CV="gen_ai.operation.name",eg="gen_ai.request.messages",tg="gen_ai.response.text",yV="openai.response.id",MV="openai.response.model",vV="openai.response.timestamp",bV="openai.usage.completion_tokens",LV="openai.usage.prompt_tokens",rg={CHAT:"chat"};var bo="OpenAI",DV=["responses.create","chat.completions.create"];function Id(t){return t.includes("chat.completions")?rg.CHAT:t.includes("responses")?rg.CHAT:t.split(".").pop()||"unknown"}function xV(t){return`gen_ai.${Id(t)}`}function UV(t){return DV.includes(t)}function wV(t,e){return t?`${t}.${e}`:e}function VV(t){return t!==null&&typeof t=="object"&&"object"in t&&t.object==="chat.completion"}function BV(t){return t!==null&&typeof t=="object"&&"object"in t&&t.object==="response"}function QEe(t,e){let r={[TV]:"openai",[CV]:Id(e)};if(t.length>0&&typeof t[0]=="object"&&t[0]!==null){let n=t[0];r[Nd]=n.model??"unknown","temperature"in n&&(r[mV]=n.temperature),"top_p"in n&&(r[AV]=n.top_p),"frequency_penalty"in n&&(r[hV]=n.frequency_penalty),"presence_penalty"in n&&(r[gV]=n.presence_penalty)}else r[Nd]="unknown";return r}function GV(t,e,r,n){e!==void 0&&t.setAttributes({[LV]:e,[NV]:e}),r!==void 0&&t.setAttributes({[bV]:r,[IV]:r}),n!==void 0&&t.setAttributes({[PV]:n})}function HV(t,e,r,n){e&&t.setAttributes({[yV]:e,[OV]:e}),r&&t.setAttributes({[MV]:r,[RV]:r}),n&&t.setAttributes({[vV]:new Date(n*1e3).toISOString()})}function JEe(t,e){if(HV(t,e.id,e.model,e.created),e.usage&&GV(t,e.usage.prompt_tokens,e.usage.completion_tokens,e.usage.total_tokens),Array.isArray(e.choices)){let r=e.choices.map(n=>n.finish_reason).filter(n=>n!==null);r.length>0&&t.setAttributes({[Zh]:JSON.stringify(r)})}}function ZEe(t,e){HV(t,e.id,e.model,e.created_at),e.status&&t.setAttributes({[Zh]:JSON.stringify([e.status])}),e.usage&&GV(t,e.usage.input_tokens,e.usage.output_tokens,e.usage.total_tokens)}function efe(t,e,r){if(!e||typeof e!="object")return;let n=e;if(VV(n)){if(JEe(t,n),r&&n.choices?.length){let o=n.choices.map(s=>s.message?.content||"");t.setAttributes({[tg]:JSON.stringify(o)})}}else BV(n)&&(ZEe(t,n),r&&n.output_text&&t.setAttributes({[tg]:n.output_text}))}function tfe(t,e){"messages"in e&&t.setAttributes({[eg]:JSON.stringify(e.messages)}),"input"in e&&t.setAttributes({[eg]:JSON.stringify(e.input)})}function rfe(){let e=Q().getClient(),r=e?.getIntegrationByName(bo),n=r?!!e?.getOptions().sendDefaultPii:!1;return{recordInputs:r?.options?.recordInputs??n,recordOutputs:r?.options?.recordOutputs??n}}function nfe(t,e,r,n){return async function(...s){let i=n||rfe(),a=QEe(s,e),c=a[Nd]||"unknown",u=Id(e);return cu({name:`${u} ${c}`,op:xV(e),attributes:a},async l=>{try{i.recordInputs&&s[0]&&typeof s[0]=="object"&&tfe(l,s[0]);let p=await t.apply(r,s);return efe(l,p,i.recordOutputs),p}catch(p){throw Dt(p),p}})}}function kV(t,e="",r){return new Proxy(t,{get(n,o){let s=n[o],i=wV(e,String(o));return typeof s=="function"&&UV(i)?nfe(s,i,n,r):typeof s=="function"?s.bind(n):s&&typeof s=="object"?kV(s,i,r):s}})}function ng(t,e){return kV(t,"",e)}function du(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}function qV(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&t!==void 0&&!t.includes("node_modules/")}function jV(t){let e=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return n=>{let o=n.match(r);if(o){let s,i,a,c,u;if(o[1]){a=o[1];let _=a.lastIndexOf(".");if(a[_-1]==="."&&_--,_>0){s=a.slice(0,_),i=a.slice(_+1);let d=s.indexOf(".Module");d>0&&(a=a.slice(d+1),s=s.slice(0,d))}c=void 0}i&&(c=s,u=i),i==="<anonymous>"&&(u=void 0,a=void 0),a===void 0&&(u=u||"?",a=c?`${c}.${u}`:u);let l=o[2]?.startsWith("file://")?o[2].slice(7):o[2],p=o[5]==="native";return l?.match(/\/[A-Z]:/)&&(l=l.slice(1)),!l&&o[5]&&!p&&(l=o[5]),{filename:l?decodeURI(l):void 0,module:t?t(l):void 0,function:a,lineno:FV(o[3]),colno:FV(o[4]),in_app:qV(l||"",p)}}if(n.match(e))return{filename:n}}}function og(t){return[90,jV(t)]}function FV(t){return parseInt(t||"",10)||void 0}var qt=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){let r=this._cache.get(e);if(r!==void 0)return this._cache.delete(e),this._cache.set(e,r),r}set(e,r){this._cache.size>=this._maxSize&&this._cache.delete(this._cache.keys().next().value),this._cache.set(e,r)}remove(e){let r=this._cache.get(e);return r&&this._cache.delete(e),r}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let e=[];return this._cache.forEach(r=>e.push(r)),e}};var sg=C(ee(),1),Eu={};function B(t,e,r){return r?yfe(t,e,r):Cfe(t,e)}function Cfe(t,e){return Object.assign(r=>{let n=Eu[t];if(n)return r&&n.setConfig(r),n;let o=e(r);return Eu[t]=o,(0,sg.registerInstrumentations)({instrumentations:[o]}),o},{id:t})}function yfe(t,e,r){return Object.assign(n=>{let o=r(n),s=Eu[t];if(s)return s.setConfig(o),s;let i=new e(o);return Eu[t]=i,(0,sg.registerInstrumentations)({instrumentations:[i]}),i},{id:t})}function fu(t){let e=!1,r=[];if(!Mfe(t))e=!0;else{let o=t._wrap;t._wrap=(...s)=>(e=!0,r.forEach(i=>i()),r=[],o(...s))}return o=>{e?o():r.push(o)}}function Mfe(t){return typeof t._wrap=="function"}var mn=require("node:diagnostics_channel");M();var B$=C(re(),1),Cu=C(ee(),1);ue();M();M();var Rr=C(re(),1),Do=C(mA(),1),CA="sentry.parentIsRemote",ma="sentry.graphql.operation";function yA(t){if("parentSpanId"in t)return t.parentSpanId;if("parentSpanContext"in t)return t.parentSpanContext?.spanId}function MA(t){let e=t;return!!e.attributes&&typeof e.attributes=="object"}function FCe(t){return typeof t.kind=="number"}function qCe(t){return!!t.status}function d$(t){return!!t.name}function jCe(t){if(!MA(t))return{};let e=t.attributes[ta]||t.attributes[ea],r={url:e,"http.method":t.attributes[Hs]||t.attributes[Su]};!r["http.method"]&&r.url&&(r["http.method"]="GET");try{if(typeof e=="string"){let n=Mo(e);r.url=vo(n),n.search&&(r["http.query"]=n.search),n.hash&&(r["http.fragment"]=n.hash)}}catch{}return r}function YCe(t){return FCe(t)?t.kind:ct.INTERNAL}var hA="sentry-trace",gA="baggage",vA="sentry.dsc",bA="sentry.sampled_not_recording",E$="sentry.url",$Ce="sentry.sample_rand",KCe="sentry.sample_rate",f$=Lr("sentry_scopes"),AA=Lr("sentry_fork_isolation_scope"),RA=Lr("sentry_fork_set_scope"),OA=Lr("sentry_fork_set_isolation_scope"),S$="_scopeContext";function ha(t){return t.getValue(f$)}function T$(t,e){return t.setValue(f$,e)}function WCe(t,e){Fe(t,S$,e)}function Nu(t){return t[S$]}function Ta(t){let{traceFlags:e,traceState:r}=t,n=r?r.get(bA)==="1":!1;if(e===lr.SAMPLED)return!0;if(n)return!1;let o=r?r.get(vA):void 0,s=o?Po(o):void 0;if(s?.sampled==="true")return!0;if(s?.sampled==="false")return!1}function m$(t,e,r){let n=e[Hs]||e[Su];if(n)return zCe({attributes:e,name:t,kind:r},n);let o=e[ag],s=typeof e[W]=="string"&&e[W].startsWith("cache.");if(o&&!s)return XCe({attributes:e,name:t});let i=e[We]==="custom"?"custom":"route";if(e[_g])return{...Ou(t,e,"route"),op:"rpc"};if(e[pg])return{...Ou(t,e,i),op:"message"};let u=e[ug];return u?{...Ou(t,e,i),op:u.toString()}:{op:void 0,description:t,source:"custom"}}function h$(t){let e=MA(t)?t.attributes:{},r=d$(t)?t.name:"<unknown>",n=YCe(t);return m$(r,e,n)}function XCe({attributes:t,name:e}){let r=t[pn];if(typeof r=="string")return{op:"db",description:r,source:t[We]||"custom"};if(t[We]==="custom")return{op:"db",description:e,source:"custom"};let n=t[cg];return{op:"db",description:n?n.toString():e,source:"task"}}function zCe({name:t,kind:e,attributes:r},n){let o=["http"];switch(e){case ct.CLIENT:o.push("client");break;case ct.SERVER:o.push("server");break}r["sentry.http.prefetch"]&&o.push("prefetch");let{urlPath:s,url:i,query:a,fragment:c,hasRoute:u}=JCe(r,e);if(!s)return{...Ou(t,r),op:o.join(".")};let l=r[ma],p=`${n} ${s}`,_=l?`${p} (${QCe(l)})`:p,d=u||s==="/"?"route":"url",S={};i&&(S.url=i),a&&(S["http.query"]=a),c&&(S["http.fragment"]=c);let f=e===ct.CLIENT||e===ct.SERVER,h=!`${r[ae]||"manual"}`.startsWith("auto"),A=r[We]==="custom",N=r[pn],I=!A&&N==null&&(f||!h),{description:O,source:b}=I?{description:_,source:d}:Ou(t,r);return{op:o.join("."),description:O,source:b,data:S}}function QCe(t){if(Array.isArray(t)){let e=t.slice().sort();return e.length<=5?e.join(", "):`${e.slice(0,5).join(", ")}, +${e.length-5}`}return`${t}`}function JCe(t,e){let r=t[lg],n=t[ea]||t[ta],o=t[Sn],s=typeof n=="string"?Mo(n):void 0,i=s?vo(s):void 0,a=s?.search||void 0,c=s?.hash||void 0;return typeof o=="string"?{urlPath:o,url:i,query:a,fragment:c,hasRoute:!0}:e===ct.SERVER&&typeof r=="string"?{urlPath:Zi(r),url:i,query:a,fragment:c,hasRoute:!1}:s?{urlPath:i,url:i,query:a,fragment:c,hasRoute:!1}:typeof r=="string"?{urlPath:Zi(r),url:i,query:a,fragment:c,hasRoute:!1}:{urlPath:void 0,url:i,query:a,fragment:c,hasRoute:!1}}function Ou(t,e,r="custom"){let n=e[We]||r,o=e[pn];return o&&typeof o=="string"?{description:o,source:n}:{description:t,source:n}}function g$(t){t.on("createDsc",(e,r)=>{if(!r)return;let s=k(r).data[We],{description:i}=d$(r)?h$(r):{description:void 0};if(s!=="url"&&i&&(e.transaction=i),st()){let a=Ta(r.spanContext());e.sampled=a==null?void 0:String(a)}})}function A$(){return K.getActiveSpan()}var Tn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function R$({dsc:t,sampled:e}){let r=t?Ls(t):void 0,n=new Rr.TraceState,o=r?n.set(vA,r):n;return e===!1?o.set(bA,"1"):o}var O$=new Set;function N$(){return Array.from(O$)}function RE(t){O$.add(t)}var hE=class extends Rr.W3CBaggagePropagator{constructor(){super(),RE("SentryPropagator"),this._urlMatchesTargetsMap=new qt(100)}inject(e,r,n){if((0,Rr.isTracingSuppressed)(e)){Tn&&m.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");return}let o=K.getSpan(e),s=o&&tye(o),i=H()?.getOptions()?.tracePropagationTargets;if(!Iu(s,i,this._urlMatchesTargetsMap)){Tn&&m.log("[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:",s);return}let a=eye(r),c=yt.getBaggage(e)||yt.createBaggage({}),{dynamicSamplingContext:u,traceId:l,spanId:p,sampled:_}=I$(e);if(a){let d=Ds(a);d&&Object.entries(d).forEach(([S,f])=>{c=c.setEntry(S,{value:f})})}u&&(c=Object.entries(u).reduce((d,[S,f])=>f?d.setEntry(`${eu}${S}`,{value:f}):d,c)),l&&l!==gs&&n.set(r,hA,Co(l,p,_)),super.inject(yt.setBaggage(e,c),r,n)}extract(e,r,n){let o=n.get(r,hA),s=n.get(r,gA),i=o?Array.isArray(o)?o[0]:o:void 0;return C$(P$(e,{sentryTrace:i,baggage:s}))}fields(){return[hA,gA]}},u$="[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:";function Iu(t,e,r){if(typeof t!="string"||!e)return!0;let n=r?.get(t);if(n!==void 0)return Tn&&!n&&m.log(u$,t),n;let o=Ro(t,e);return r?.set(t,o),Tn&&!o&&m.log(u$,t),o}function I$(t,e={}){let r=K.getSpan(t);if(r?.spanContext().isRemote){let a=r.spanContext();return{dynamicSamplingContext:Ve(r),traceId:a.traceId,spanId:void 0,sampled:Ta(a)}}if(r){let a=r.spanContext();return{dynamicSamplingContext:Ve(r),traceId:a.traceId,spanId:a.spanId,sampled:Ta(a)}}let n=e.scope||ha(t)?.scope||Q(),o=e.client||H(),s=n.getPropagationContext();return{dynamicSamplingContext:o?Gn(o,n):void 0,traceId:s.traceId,spanId:s.propagationSpanId,sampled:s.sampled}}function P$(t,{sentryTrace:e,baggage:r}){let n=tu(e,r),{traceId:o,parentSpanId:s,sampled:i,dsc:a}=n;if(!s)return t;let c=rye({traceId:o,spanId:s,sampled:i,dsc:a});return K.setSpanContext(t,c)}function ZCe(t,e,r){let n=C$(P$(t,e));return F.with(n,r)}function C$(t){let e=ha(t),r={scope:e?e.scope:Q().clone(),isolationScope:e?e.isolationScope:ie()};return T$(t,r)}function eye(t){try{let e=t[gA];return Array.isArray(e)?e.join(","):e}catch{return}}function tye(t){let e=k(t).data,r=e[ea]||e[ta];if(typeof r=="string")return r;let n=t.spanContext().traceState?.get(E$);if(n)return n}function rye({spanId:t,traceId:e,sampled:r,dsc:n}){let o=R$({dsc:n,sampled:r});return{traceId:e,spanId:t,isRemote:!0,traceFlags:r?lr.SAMPLED:lr.NONE,traceState:o}}function nye(t,e){let r=LA(),{name:n,parentSpan:o}=t;return UA(o)(()=>{let i=xA(t.scope,t.forceTransaction),c=t.onlyIfParent&&!K.getSpan(i)?(0,Rr.suppressTracing)(i):i,u=DA(t);return r.startActiveSpan(n,u,c,l=>Hn(()=>e(l),()=>{k(l).status===void 0&&l.setStatus({code:fe.ERROR})},()=>l.end()))})}function oye(t,e){let r=LA(),{name:n,parentSpan:o}=t;return UA(o)(()=>{let i=xA(t.scope,t.forceTransaction),c=t.onlyIfParent&&!K.getSpan(i)?(0,Rr.suppressTracing)(i):i,u=DA(t);return r.startActiveSpan(n,u,c,l=>Hn(()=>e(l,()=>l.end()),()=>{k(l).status===void 0&&l.setStatus({code:fe.ERROR})}))})}function sye(t){let e=LA(),{name:r,parentSpan:n}=t;return UA(n)(()=>{let s=xA(t.scope,t.forceTransaction),a=t.onlyIfParent&&!K.getSpan(s)?(0,Rr.suppressTracing)(s):s,c=DA(t);return e.startSpan(r,c,a)})}function y$(t,e){let r=t?K.setSpan(F.active(),t):K.deleteSpan(F.active());return F.with(r,()=>e(Q()))}function LA(){return H()?.tracer||K.getTracer("@sentry/opentelemetry",pe)}function DA(t){let{startTime:e,attributes:r,kind:n,op:o,links:s}=t,i=typeof e=="number"?iye(e):e;return{attributes:o?{[W]:o,...r}:r,kind:n,links:s,startTime:i}}function iye(t){return t<9999999999?t*1e3:t}function xA(t,e){let r=aye(t),n=K.getSpan(r);if(!n||!e)return r;let o=K.deleteSpan(r),{spanId:s,traceId:i}=n.spanContext(),a=Ta(n.spanContext()),c=ve(n),u=Ve(c),l=R$({dsc:u,sampled:a}),p={traceId:i,spanId:s,isRemote:!0,traceFlags:a?lr.SAMPLED:lr.NONE,traceState:l};return K.setSpanContext(o,p)}function aye(t){if(t){let e=Nu(t);if(e)return e}return F.active()}function cye(t,e){return ZCe(F.active(),t,e)}function M$(t,e){let r=Nu(e),n=r&&K.getSpan(r),o=n?yo(n):Yi(e);return[n?Ve(n):Gn(t,e),o]}function UA(t){return t!==void 0?e=>y$(t,e):e=>e()}function uye(t){let e=(0,Rr.suppressTracing)(F.active());return F.with(e,t)}function v$(t){t.on("preprocessEvent",e=>{let r=A$();if(!r||e.type==="transaction")return;e.contexts={trace:yo(r),...e.contexts};let n=ve(r);return e.sdkProcessingMetadata={dynamicSamplingContext:Ve(n),...e.sdkProcessingMetadata},e})}function lye({span:t,scope:e,client:r}={}){let n=(e&&Nu(e))??F.active();if(t){let{scope:c}=Gr(t);n=c&&Nu(c)||K.setSpan(F.active(),t)}let{traceId:o,spanId:s,sampled:i,dynamicSamplingContext:a}=I$(n,{scope:e,client:r});return{"sentry-trace":Co(o,s,i),baggage:Ls(a)}}function b$(){function t(){let a=F.active(),c=ha(a);return c||{scope:qi(),isolationScope:un()}}function e(a){let c=F.active();return F.with(c,()=>a(s()))}function r(a,c){let u=Nu(a)||F.active();return F.with(u.setValue(RA,a),()=>c(a))}function n(a){let c=F.active();return F.with(c.setValue(AA,!0),()=>a(i()))}function o(a,c){let u=F.active();return F.with(u.setValue(OA,a),()=>c(i()))}function s(){return t().scope}function i(){return t().isolationScope}hh({withScope:e,withSetScope:r,withSetIsolationScope:o,withIsolationScope:n,getCurrentScope:s,getIsolationScope:i,startSpan:nye,startSpanManual:oye,startInactiveSpan:sye,getActiveSpan:A$,suppressTracing:uye,getTraceData:lye,continueTrace:cye,withActiveSpan:y$})}function L$(t){class e extends t{constructor(...n){super(...n),RE("SentryContextManager")}with(n,o,s,...i){let a=ha(n),c=a?.scope||Q(),u=a?.isolationScope||ie(),l=n.getValue(AA)===!0,p=n.getValue(RA),_=n.getValue(OA),d=p||c.clone(),S=_||(l?u.clone():u),h=T$(n,{scope:d,isolationScope:S}).deleteValue(AA).deleteValue(RA).deleteValue(OA);return WCe(d,h),super.with(h,o,s,...i)}}return e}function pye(t){let e=new Map;for(let r of t)_ye(e,r);return Array.from(e,function([r,n]){return n})}function D$(t){return t.attributes[CA]===!0?void 0:yA(t)}function _ye(t,e){let r=e.spanContext().spanId,n=D$(e);if(!n){NA(t,{id:r,span:e,children:[]});return}let o=dye(t,n),s=NA(t,{id:r,span:e,parentNode:o,children:[]});o.children.push(s)}function dye(t,e){let r=t.get(e);return r||NA(t,{id:e,children:[]})}function NA(t,e){let r=t.get(e.id);return r?.span?r:r&&!r.span?(r.span=e.span,r.parentNode=e.parentNode,r):(t.set(e.id,e),e)}var x$={1:"cancelled",2:"unknown_error",3:"invalid_argument",4:"deadline_exceeded",5:"not_found",6:"already_exists",7:"permission_denied",8:"resource_exhausted",9:"failed_precondition",10:"aborted",11:"out_of_range",12:"unimplemented",13:"internal_error",14:"unavailable",15:"data_loss",16:"unauthenticated"},Eye=t=>Object.values(x$).includes(t);function U$(t){let e=MA(t)?t.attributes:{},r=qCe(t)?t.status:void 0;if(r){if(r.code===fe.OK)return{code:1};if(r.code===fe.ERROR){if(typeof r.message>"u"){let o=l$(e);if(o)return o}return r.message&&Eye(r.message)?{code:2,message:r.message}:{code:2,message:"unknown_error"}}}let n=l$(e);return n||(r?.code===fe.UNSET?{code:1}:{code:2,message:"unknown_error"})}function l$(t){let e=t[Lo]||t[Pd],r=t[dg],n=typeof e=="number"?e:typeof e=="string"?parseInt(e):void 0;if(typeof n=="number")return k_(n);if(typeof r=="string")return{code:2,message:x$[r]||"unknown_error"}}var p$=1e3,_$=300,IA=class{constructor(e){this._finishedSpanBucketSize=e?.timeout||_$,this._finishedSpanBuckets=new Array(this._finishedSpanBucketSize).fill(void 0),this._lastCleanupTimestampInS=Math.floor(Date.now()/1e3),this._spansToBucketEntry=new WeakMap,this._sentSpans=new Map,this._debouncedFlush=jh(this.flush.bind(this),1,{maxWait:100})}export(e){let r=Math.floor(Date.now()/1e3);if(this._lastCleanupTimestampInS!==r){let i=0;this._finishedSpanBuckets.forEach((a,c)=>{a&&a.timestampInS<=r-this._finishedSpanBucketSize&&(i+=a.spans.size,this._finishedSpanBuckets[c]=void 0)}),i>0&&Tn&&m.log(`SpanExporter dropped ${i} spans because they were pending for more than ${this._finishedSpanBucketSize} seconds.`),this._lastCleanupTimestampInS=r}let n=r%this._finishedSpanBucketSize,o=this._finishedSpanBuckets[n]||{timestampInS:r,spans:new Set};this._finishedSpanBuckets[n]=o,o.spans.add(e),this._spansToBucketEntry.set(e,o);let s=D$(e);(!s||this._sentSpans.has(s))&&this._debouncedFlush()}flush(){let e=this._finishedSpanBuckets.flatMap(i=>i?Array.from(i.spans):[]);this._flushSentSpanCache();let r=this._maybeSend(e),n=r.size,o=e.length-n;Tn&&m.log(`SpanExporter exported ${n} spans, ${o} spans are waiting for their parent spans to finish`);let s=Date.now()+_$*1e3;for(let i of r){this._sentSpans.set(i.spanContext().spanId,s);let a=this._spansToBucketEntry.get(i);a&&a.spans.delete(i)}this._debouncedFlush.cancel()}clear(){this._finishedSpanBuckets=this._finishedSpanBuckets.fill(void 0),this._sentSpans.clear(),this._debouncedFlush.cancel()}_maybeSend(e){let r=pye(e),n=new Set,o=this._getCompletedRootNodes(r);for(let s of o){let i=s.span;n.add(i);let a=Sye(i);if(s.parentNode&&this._sentSpans.has(s.parentNode.id)){let l=a.contexts?.trace?.data;l&&(l["sentry.parent_span_already_sent"]=!0)}let c=a.spans||[];for(let l of s.children)PA(l,c,n);a.spans=c.length>p$?c.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,p$):c;let u=Vs(i.events);u&&(a.measurements=u),cd(a)}return n}_flushSentSpanCache(){let e=Date.now();for(let[r,n]of this._sentSpans.entries())n<=e&&this._sentSpans.delete(r)}_nodeIsCompletedRootNodeOrHasSentParent(e){return!!e.span&&(!e.parentNode||this._sentSpans.has(e.parentNode.id))}_getCompletedRootNodes(e){return e.filter(r=>this._nodeIsCompletedRootNodeOrHasSentParent(r))}};function fye(t){let e=t.attributes,r=e[ae],n=e[W],o=e[We];return{origin:r,op:n,source:o}}function Sye(t){let{op:e,description:r,data:n,origin:o="manual",source:s}=w$(t),i=Gr(t),a=t.attributes[Br],c={[We]:s,[Br]:a,[W]:e,[ae]:o,...n,...V$(t.attributes)},{links:u}=t,{traceId:l,spanId:p}=t.spanContext(),_=yA(t),d=U$(t),S={parent_span_id:_,span_id:p,trace_id:l,data:c,origin:o,op:e,status:Us(d),links:xs(u)},f=c[Lo],T=typeof f=="number"?{response:{status_code:f}}:void 0;return{contexts:{trace:S,otel:{resource:t.resource.attributes},...T},spans:[],start_timestamp:Ft(t.startTime),timestamp:Ft(t.endTime),transaction:r,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:i.scope,capturedSpanIsolationScope:i.isolationScope,sampleRate:a,dynamicSamplingContext:Ve(t)},...s&&{transaction_info:{source:s}}}}function PA(t,e,r){let n=t.span;if(n&&r.add(n),!n){t.children.forEach(N=>{PA(N,e,r)});return}let s=n.spanContext().spanId,i=n.spanContext().traceId,a=yA(n),{attributes:c,startTime:u,endTime:l,links:p}=n,{op:_,description:d,data:S,origin:f="manual"}=w$(n),T={[ae]:f,[W]:_,...V$(c),...S},h=U$(n),A={span_id:s,trace_id:i,data:T,description:d,parent_span_id:a,start_timestamp:Ft(u),timestamp:Ft(l)||void 0,status:Us(h),op:_,origin:f,measurements:Vs(n.events),links:xs(p)};e.push(A),t.children.forEach(N=>{PA(N,e,r)})}function w$(t){let{op:e,source:r,origin:n}=fye(t),{op:o,description:s,source:i,data:a}=h$(t),c=e||o,u=r||i,l={...a,...Tye(t)};return{op:c,description:s,source:u,origin:n,data:l}}function V$(t){let e={...t};return delete e[Br],delete e[CA],delete e[pn],e}function Tye(t){let e=t.attributes,r={};t.kind!==ct.INTERNAL&&(r["otel.kind"]=ct[t.kind]);let n=e[Pd];n&&(r[Lo]=n);let o=jCe(t);return o.url&&(r.url=o.url),o["http.query"]&&(r["http.query"]=o["http.query"].slice(1)),o["http.fragment"]&&(r["http.fragment"]=o["http.fragment"].slice(1)),r}function mye(t,e){let r=K.getSpan(e),n=ha(e);r&&!r.spanContext().isRemote&&Wi(r,t),r?.spanContext().isRemote&&t.setAttribute(CA,!0),e===_i&&(n={scope:qi(),isolationScope:un()}),n&&Zc(t,n.scope,n.isolationScope),su(t),H()?.emit("spanStart",t)}function hye(t){iu(t),H()?.emit("spanEnd",t)}var gE=class{constructor(e){RE("SentrySpanProcessor"),this._exporter=new IA(e)}async forceFlush(){this._exporter.flush()}async shutdown(){this._exporter.clear()}onStart(e,r){mye(e,r)}onEnd(e){hye(e),this._exporter.export(e)}},AE=class{constructor(e){this._client=e,RE("SentrySampler")}shouldSample(e,r,n,o,s,i){let a=this._client.getOptions(),c=Rye(e),u=c?.spanContext();if(!st(a))return Sa({decision:void 0,context:e,spanAttributes:s});let l=s[Su]||s[Hs];if(o===ct.CLIENT&&l&&(!c||u?.isRemote))return Sa({decision:void 0,context:e,spanAttributes:s});let p=c?gye(c,r,n):void 0;if(!(!c||u?.isRemote))return Sa({decision:p?Do.SamplingDecision.RECORD_AND_SAMPLED:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s});let{description:d,data:S,op:f}=m$(n,s,o),T={...S,...s};f&&(T[W]=f);let h={decision:!0};if(this._client.emit("beforeSampling",{spanAttributes:T,spanName:d,parentSampled:p,parentContext:u},h),!h.decision)return Sa({decision:void 0,context:e,spanAttributes:s});let{isolationScope:A}=ha(e)??{},N=u?.traceState?u.traceState.get(vA):void 0,I=N?Po(N):void 0,O=nr(I?.sample_rand)??Math.random(),[b,v,X]=au(a,{name:d,attributes:T,normalizedRequest:A?.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampled:p,parentSampleRate:nr(I?.sample_rate)},O),$=`${l}`.toUpperCase();return $==="OPTIONS"||$==="HEAD"?(Tn&&m.log(`[Tracing] Not sampling span because HTTP method is '${$}' for ${n}`),Sa({decision:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s,sampleRand:O,downstreamTraceSampleRate:0})):(!b&&p===void 0&&(Tn&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),this._client.recordDroppedEvent("sample_rate","transaction")),{...Sa({decision:b?Do.SamplingDecision.RECORD_AND_SAMPLED:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s,sampleRand:O,downstreamTraceSampleRate:X?v:void 0}),attributes:{[Br]:X?v:void 0}})}toString(){return"SentrySampler"}};function gye(t,e,r){let n=t.spanContext();if(xn(n)&&n.traceId===e){if(n.isRemote){let s=Ta(t.spanContext());return Tn&&m.log(`[Tracing] Inheriting remote parent's sampled decision for ${r}: ${s}`),s}let o=Ta(n);return Tn&&m.log(`[Tracing] Inheriting parent's sampled decision for ${r}: ${o}`),o}}function Sa({decision:t,context:e,spanAttributes:r,sampleRand:n,downstreamTraceSampleRate:o}){let s=Aye(e,r);return o!==void 0&&(s=s.set(KCe,`${o}`)),n!==void 0&&(s=s.set($Ce,`${n}`)),t==null?{decision:Do.SamplingDecision.NOT_RECORD,traceState:s}:t===Do.SamplingDecision.NOT_RECORD?{decision:t,traceState:s.set(bA,"1")}:{decision:t,traceState:s}}function Aye(t,e){let o=K.getSpan(t)?.spanContext()?.traceState||new Rr.TraceState,s=e[ea]||e[ta];return s&&typeof s=="string"&&(o=o.set(E$,s)),o}function Rye(t){let e=K.getSpan(t);return e&&xn(e.spanContext())?e:void 0}var Z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pu(t,e){if(!t)return e;let r=Ds(t),n=Ds(e);if(!n)return t;let o={...r};return Object.entries(n).forEach(([s,i])=>{o[s]||(o[s]=i)}),F_(o)}function ga(t){let e=t.protocol||"",r=t.hostname||t.host||"",n=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(r)?"":`:${t.port}`,o=t.path?t.path:"/";return`${e}//${r}${n}${o}`}var jt="@sentry/instrumentation-http",Oye=1024*1024,Ks=class extends Cu.InstrumentationBase{constructor(e={}){super(jt,pe,e),this._propagationDecisionMap=new qt(100),this._ignoreOutgoingRequestsMap=new WeakMap}init(){let e=!1,r=(c=>{let u=c;this._patchServerEmitOnce(u.server)}),n=(c=>{let u=c;this._onOutgoingRequestFinish(u.request,u.response)}),o=(c=>{let u=c;this._onOutgoingRequestFinish(u.request,void 0)}),s=(c=>{let u=c;this._onOutgoingRequestCreated(u.request)}),i=c=>(e||(e=!0,(0,mn.subscribe)("http.server.request.start",r),(0,mn.subscribe)("http.client.response.finish",n),(0,mn.subscribe)("http.client.request.error",o),this.getConfig().propagateTraceInOutgoingRequests&&(0,mn.subscribe)("http.client.request.created",s)),c),a=()=>{(0,mn.unsubscribe)("http.server.request.start",r),(0,mn.unsubscribe)("http.client.response.finish",n),(0,mn.unsubscribe)("http.client.request.error",o),(0,mn.unsubscribe)("http.client.request.created",s)};return[new Cu.InstrumentationNodeModuleDefinition("http",["*"],i,a),new Cu.InstrumentationNodeModuleDefinition("https",["*"],i,a)]}_onOutgoingRequestFinish(e,r){Z&&m.log(jt,"Handling finished outgoing request");let n=this.getConfig().breadcrumbs,o=typeof n>"u"?!0:n,s=this._ignoreOutgoingRequestsMap.get(e)??this._shouldIgnoreOutgoingRequest(e);this._ignoreOutgoingRequestsMap.set(e,s),o&&!s&&Nye(e,r)}_onOutgoingRequestCreated(e){let r=this._ignoreOutgoingRequestsMap.get(e)??this._shouldIgnoreOutgoingRequest(e);if(this._ignoreOutgoingRequestsMap.set(e,r),r)return;let n=ga(e),o=H()?.getOptions().tracePropagationTargets,s=Iu(n,o,this._propagationDecisionMap)?Ji():void 0;if(!s)return;let{"sentry-trace":i,baggage:a}=s;if(i&&!e.getHeader("sentry-trace"))try{e.setHeader("sentry-trace",i),Z&&m.log(jt,"Added sentry-trace header to outgoing request")}catch(c){Z&&m.error(jt,"Failed to add sentry-trace header to outgoing request:",go(c)?c.message:"Unknown error")}if(a){let c=Pu(e.getHeader("baggage"),a);if(c)try{e.setHeader("baggage",c),Z&&m.log(jt,"Added baggage header to outgoing request")}catch(u){Z&&m.error(jt,"Failed to add baggage header to outgoing request:",go(u)?u.message:"Unknown error")}}}_patchServerEmitOnce(e){let r=e.emit;if(r.__sentry_patched__)return;Z&&m.log(jt,"Patching server.emit");let n=this,{ignoreIncomingRequestBody:o,maxIncomingRequestBodySize:s="medium"}=n.getConfig(),i=new Proxy(r,{apply(a,c,u){if(u[0]!=="request")return a.apply(c,u);Z&&m.log(jt,"Handling incoming request");let l=ie().clone(),p=u[1],_=u[2],d=Ed(p),S=p.ip||p.socket?.remoteAddress,f=p.url||"/";!o?.(f,p)&&s!=="none"&&Pye(p,l,s),l.setSDKProcessingMetadata({normalizedRequest:d,ipAddress:S});let T=(p.method||"GET").toUpperCase(),h=Zi(f),A=`${T} ${h}`;return l.setTransactionName(A),n.getConfig().trackIncomingRequestsAsSessions!==!1&&yye({requestIsolationScope:l,response:_,sessionFlushingDelayMS:n.getConfig().sessionFlushingDelayMS??6e4}),Jc(l,()=>{if(Q().getPropagationContext().propagationSpanId=rr(),!n.getConfig().extractIncomingTraceFromHeader)return a.apply(c,u);let N=yt.extract(F.active(),d.headers);return F.with(N,()=>a.apply(c,u))})}});Fe(i,"__sentry_patched__",!0),e.emit=i}_shouldIgnoreOutgoingRequest(e){if((0,B$.isTracingSuppressed)(F.active()))return!0;let r=this.getConfig().ignoreOutgoingRequests;if(!r)return!1;let n=Cye(e),o=ga(e);return r(o,n)}};function Nye(t,e){let r=Iye(t),n=e?.statusCode,o=du(n);hr({category:"http",data:{status_code:n,...r},type:"http",level:o},{event:"response",request:t,response:e})}function Iye(t){try{let e=t.getHeader("host")||t.host,r=new URL(t.path,`${t.protocol}//${e}`),n=Mo(r.toString()),o={url:vo(n),"http.method":t.method||"GET"};return n.search&&(o["http.query"]=n.search),n.hash&&(o["http.fragment"]=n.hash),o}catch{return{}}}function Pye(t,e,r){let n=0,o=[];Z&&m.log(jt,"Patching request.on");let s=new WeakMap,i=r==="small"?1e3:r==="medium"?1e4:Oye;try{t.on=new Proxy(t.on,{apply:(a,c,u)=>{let[l,p,..._]=u;if(l==="data"){Z&&m.log(jt,`Handling request.on("data") with maximum body size of ${i}b`);let d=new Proxy(p,{apply:(S,f,T)=>{try{let h=T[0],A=Buffer.from(h);n<i?(o.push(A),n+=A.byteLength):Z&&m.log(jt,`Dropping request body chunk because maximum body length of ${i}b is exceeded.`)}catch{Z&&m.error(jt,"Encountered error while storing body chunk.")}return Reflect.apply(S,f,T)}});return s.set(p,d),Reflect.apply(a,c,[l,d,..._])}return Reflect.apply(a,c,u)}}),t.off=new Proxy(t.off,{apply:(a,c,u)=>{let[,l]=u,p=s.get(l);if(p){s.delete(l);let _=u.slice();return _[1]=p,Reflect.apply(a,c,_)}return Reflect.apply(a,c,u)}}),t.on("end",()=>{try{let a=Buffer.concat(o).toString("utf-8");if(a){let u=Buffer.byteLength(a,"utf-8")>i?`${Buffer.from(a).subarray(0,i-3).toString("utf-8")}...`:a;e.setSDKProcessingMetadata({normalizedRequest:{data:u}})}}catch(a){Z&&m.error(jt,"Error building captured request body",a)}})}catch(a){Z&&m.error(jt,"Error patching request to capture body",a)}}function Cye(t){return{method:t.method,protocol:t.protocol,host:t.host,hostname:t.host,path:t.path,headers:t.getHeaders()}}function yye({requestIsolationScope:t,response:e,sessionFlushingDelayMS:r}){t.setSDKProcessingMetadata({requestSession:{status:"ok"}}),e.once("close",()=>{let n=H(),o=t.getScopeData().sdkProcessingMetadata.requestSession;if(n&&o){Z&&m.log(`Recorded request session with status: ${o.status}`);let s=new Date;s.setSeconds(0,0);let i=s.toISOString(),a=wA.get(n),c=a?.[i]||{exited:0,crashed:0,errored:0};if(c[{ok:"exited",crashed:"crashed",errored:"errored"}[o.status]]++,a)a[i]=c;else{Z&&m.log("Opened new request session aggregate.");let u={[i]:c};wA.set(n,u);let l=()=>{clearTimeout(_),p(),wA.delete(n);let d=Object.entries(u).map(([S,f])=>({started:S,exited:f.exited,errored:f.errored,crashed:f.crashed}));n.sendSession({aggregates:d})},p=n.on("flush",()=>{Z&&m.log("Sending request session aggregate due to client flush"),l()}),_=setTimeout(()=>{Z&&m.log("Sending request session aggregate due to flushing schedule"),l()},r).unref()}}})}var wA=new Map;var G$="Http",Mye=B(`${G$}.sentry`,t=>new Ks(t)),H$=(t={})=>{let e=t.dropSpansForIncomingRequestStatusCodes??[[401,404],[300,399]];return{name:G$,setupOnce(){Mye({...t,extractIncomingTraceFromHeader:!0,propagateTraceInOutgoingRequests:!0})},processEvent(r){if(r.type==="transaction"){let n=r.contexts?.trace?.data?.["http.response.status_code"];if(typeof n=="number"&&e.some(o=>{if(typeof o=="number")return o===n;let[s,i]=o;return n>=s&&n<=i}))return null}return r}}};M();var q$=C(re(),1),j$=C(ee(),1);var Aa=C(require("diagnostics_channel"),1);var Ws=Sh(process.versions.node),yu=Ws.major,k$=Ws.minor;var OE="sentry-trace",VA="baggage",F$=/baggage: (.*)\r\n/,Xs=class extends j$.InstrumentationBase{constructor(e={}){super("@sentry/instrumentation-node-fetch",pe,e),this._channelSubs=[],this._propagationDecisionMap=new qt(100),this._ignoreOutgoingRequestsMap=new WeakMap}init(){}disable(){super.disable(),this._channelSubs.forEach(e=>e.unsubscribe()),this._channelSubs=[]}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this._subscribeToChannel("undici:request:create",this._onRequestCreated.bind(this)),this._subscribeToChannel("undici:request:headers",this._onResponseHeaders.bind(this)))}_onRequestCreated({request:e}){if(!(this.getConfig().enabled!==!1))return;let o=this._shouldIgnoreOutgoingRequest(e);if(this._ignoreOutgoingRequestsMap.set(e,o),o)return;let s=BA(e.origin,e.path),i=H()?.getOptions().tracePropagationTargets,a=Iu(s,i,this._propagationDecisionMap)?Ji():void 0;if(!a)return;let{"sentry-trace":c,baggage:u}=a;if(Array.isArray(e.headers)){let l=e.headers;c&&!l.includes(OE)&&l.push(OE,c);let p=l.findIndex(_=>_===VA);if(u&&p===-1)l.push(VA,u);else if(u){let _=l[p+1],d=Pu(_,u);d&&(l[p+1]=d)}}else{let l=e.headers;c&&!l.includes(`${OE}:`)&&(e.headers+=`${OE}: ${c}\r
|
|
64
|
+
Url: ${Sd(t)}`),!0}return!1}function OEe(t,e){return e?.length?pd(t).some(r=>Ro(r,e)):!1}function NEe(t,e){if(!e?.length)return!1;let r=t.transaction;return r?Ro(r,e):!1}function IEe(t,e){if(!e?.length)return!1;let r=Sd(t);return r?Ro(r,e):!1}function PEe(t,e){if(!e?.length)return!0;let r=Sd(t);return r?Ro(r,e):!0}function CEe(t=[]){for(let e=t.length-1;e>=0;e--){let r=t[e];if(r&&r.filename!=="<anonymous>"&&r.filename!=="[native code]")return r.filename||null}return null}function Sd(t){try{let r=[...t.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return r?CEe(r):null}catch{return x&&m.error(`Cannot extract url for event ${Oo(t)}`),null}}function yEe(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function J1(t,e,r,n,o,s){if(!o.exception?.values||!s||!an(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=$h(t,e,n,s.originalException,r,o.exception.values,i,0))}function $h(t,e,r,n,o,s,i,a){if(s.length>=r+1)return s;let c=[...s];if(an(n[o],Error)){z1(i,a);let u=t(e,n[o]),l=c.length;Q1(u,o,l,a),c=$h(t,e,r,n[o],o,[u,...c],u,l)}return Array.isArray(n.errors)&&n.errors.forEach((u,l)=>{if(an(u,Error)){z1(i,a);let p=t(e,u),_=c.length;Q1(p,`errors[${l}]`,_,a),c=$h(t,e,r,u,o,[p,...c],p,_)}}),c}function z1(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Q1(t,e,r,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:r,parent_id:n}}var MEe="cause",vEe=5,bEe="LinkedErrors",LEe=((t={})=>{let e=t.limit||vEe,r=t.key||MEe;return{name:bEe,preprocessEvent(n,o,s){let i=s.getOptions();J1(Fh,i.stackParser,r,e,n,o)}}}),md=LEe;function Z1(t){let e={},r=0;for(;r<t.length;){let n=t.indexOf("=",r);if(n===-1)break;let o=t.indexOf(";",r);if(o===-1)o=t.length;else if(o<n){r=t.lastIndexOf(";",n-1)+1;continue}let s=t.slice(r,n).trim();if(e[s]===void 0){let i=t.slice(n+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{e[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{e[s]=i}}r=o+1}return e}var Kh=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function eV(t){return Kh.map(o=>{let s=t[o],i=Array.isArray(s)?s.join(";"):s;return o==="Forwarded"?DEe(i):i?.split(",").map(a=>a.trim())}).reduce((o,s)=>s?o.concat(s):o,[]).find(o=>o!==null&&xEe(o))||null}function DEe(t){if(!t)return null;for(let e of t.split(";"))if(e.startsWith("for="))return e.slice(4);return null}function xEe(t){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(t)}var UEe={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},wEe="RequestData",VEe=((t={})=>{let e={...UEe,...t.include};return{name:wEe,processEvent(r,n,o){let{sdkProcessingMetadata:s={}}=r,{normalizedRequest:i,ipAddress:a}=s,c={...e,ip:e.ip??o.getOptions().sendDefaultPii};return i&&BEe(r,i,{ipAddress:a},c),r}}}),hd=VEe;function BEe(t,e,r,n){if(t.request={...t.request,...GEe(e,n)},n.ip){let o=e.headers&&eV(e.headers)||r.ipAddress;o&&(t.user={...t.user,ip_address:o})}}function GEe(t,e){let r={},n={...t.headers};if(e.headers&&(r.headers=n,e.cookies||delete n.cookie,e.ip||Kh.forEach(o=>{delete n[o]})),r.method=t.method,e.url&&(r.url=t.url),e.cookies){let o=t.cookies||(n?.cookie?Z1(n.cookie):void 0);r.cookies=o||{}}return e.query_string&&(r.query_string=t.query_string),e.data&&(r.data=t.data),r}function tV(t){let e="console";Vi(e,t),Bi(e,HEe)}function HEe(){"console"in j&&Xc.forEach(function(t){t in j.console&&ph(j.console,t,function(e){return wi[t]=e,function(...r){Gi("console",{args:r,level:t}),wi[t]?.apply(j.console,r)}})})}function rV(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}var kEe=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function FEe(t){let e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,r=kEe.exec(e);return r?r.slice(1):[]}function Wh(t){let e=FEe(t),r=e[0]||"",n=e[1];return!r&&!n?".":(n&&(n=n.slice(0,n.length-1)),r+n)}var qEe="Console",gd=(t={})=>{let e=new Set(t.levels||Xc);return{name:qEe,setup(r){tV(({args:n,level:o})=>{H()!==r||!e.has(o)||jEe(o,n)})}}};function jEe(t,e){let r={category:"console",data:{arguments:e,logger:"console"},level:rV(t),message:nV(e)};if(t==="assert")if(e[0]===!1){let n=e.slice(1);r.message=n.length>0?`Assertion failed: ${nV(n)}`:"Assertion failed",r.data.arguments=n}else return;sr(r,{input:e,level:t})}function nV(t){return"util"in j&&typeof j.util.format=="function"?j.util.format(...t):lh(t," ")}function Mo(t){if(!t)return{};let e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};let r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:r,hash:n,relative:e[5]+r+n}}function Zi(t){return t.split(/[?#]/,1)[0]}function vo(t){let{protocol:e,host:r,path:n}=t,o=r?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${e?`${e}://`:""}${o}${n}`}var Xh="ai.prompt",oV="ai.response.object",sV="ai.response.text",iV="ai.response.toolCalls",aV="ai.prompt.messages",cV="ai.prompt.tools",fn="ai.model.id",uV="ai.model.provider",lV="ai.response.providerMetadata",pV="ai.telemetry.functionId",_V="ai.usage.completionTokens",dV="ai.usage.promptTokens",zh="gen_ai.response.model",Ad="gen_ai.usage.input_tokens",Rd="gen_ai.usage.output_tokens",Qh="ai.toolCall.name",Jh="ai.toolCall.id",EV="ai.toolCall.args",fV="ai.toolCall.result";function SV(t,e){t.setAttribute(ae,e)}function YEe(t){let{data:e,description:r}=k(t);if(!r)return;if(e[Qh]&&e[Jh]&&r==="ai.toolCall"){WEe(t,e);return}let n=e[fn],o=e[uV];typeof n!="string"||typeof o!="string"||!n||!o||XEe(t,r,e)}function $Ee(t){if(t.type==="transaction"&&t.spans)for(let e of t.spans)KEe(e);return t}function KEe(t){let{data:e,origin:r}=t;if(r==="auto.vercelai.otel"){gr(e,_V,Rd),gr(e,dV,Ad),typeof e[Rd]=="number"&&typeof e[Ad]=="number"&&(e["gen_ai.usage.total_tokens"]=e[Rd]+e[Ad]),gr(e,aV,"gen_ai.request.messages"),gr(e,sV,"gen_ai.response.text"),gr(e,iV,"gen_ai.response.tool_calls"),gr(e,oV,"gen_ai.response.object"),gr(e,cV,"gen_ai.request.available_tools"),gr(e,EV,"gen_ai.tool.input"),gr(e,fV,"gen_ai.tool.output"),zEe(e);for(let n of Object.keys(e))n.startsWith("ai.")&&gr(e,n,`vercel.${n}`)}}function gr(t,e,r){t[e]!=null&&(t[r]=t[e],delete t[e])}function WEe(t,e){SV(t,"auto.vercelai.otel"),t.setAttribute(W,"gen_ai.execute_tool"),gr(e,Qh,"gen_ai.tool.name"),gr(e,Jh,"gen_ai.tool.call.id"),e["gen_ai.tool.type"]||t.setAttribute("gen_ai.tool.type","function");let r=e["gen_ai.tool.name"];r&&t.updateName(`execute_tool ${r}`)}function XEe(t,e,r){SV(t,"auto.vercelai.otel");let n=e.replace("ai.","");t.setAttribute("ai.pipeline.name",n),t.updateName(n);let o=r[pV];if(o&&typeof o=="string"&&e.split(".").length-1===1&&(t.updateName(`${n} ${o}`),t.setAttribute("gen_ai.function_id",o)),r[Xh]&&t.setAttribute("gen_ai.prompt",r[Xh]),r[fn]&&!r[zh]&&t.setAttribute(zh,r[fn]),t.setAttribute("ai.streaming",e.includes("stream")),e==="ai.generateText"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.generateText.doGenerate"){t.setAttribute(W,"gen_ai.generate_text"),t.updateName(`generate_text ${r[fn]}`);return}if(e==="ai.streamText"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.streamText.doStream"){t.setAttribute(W,"gen_ai.stream_text"),t.updateName(`stream_text ${r[fn]}`);return}if(e==="ai.generateObject"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.generateObject.doGenerate"){t.setAttribute(W,"gen_ai.generate_object"),t.updateName(`generate_object ${r[fn]}`);return}if(e==="ai.streamObject"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.streamObject.doStream"){t.setAttribute(W,"gen_ai.stream_object"),t.updateName(`stream_object ${r[fn]}`);return}if(e==="ai.embed"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.embed.doEmbed"){t.setAttribute(W,"gen_ai.embed"),t.updateName(`embed ${r[fn]}`);return}if(e==="ai.embedMany"){t.setAttribute(W,"gen_ai.invoke_agent");return}if(e==="ai.embedMany.doEmbed"){t.setAttribute(W,"gen_ai.embed_many"),t.updateName(`embed_many ${r[fn]}`);return}if(e.startsWith("ai.stream")){t.setAttribute(W,"ai.run");return}}function Od(t){t.on("spanStart",YEe),t.addEventProcessor(Object.assign($Ee,{id:"VercelAiEventProcessor"}))}function zEe(t){let e=t[lV];if(e)try{let r=JSON.parse(e);r.openai&&(jr(t,"gen_ai.usage.input_tokens.cached",r.openai.cachedPromptTokens),jr(t,"gen_ai.usage.output_tokens.reasoning",r.openai.reasoningTokens),jr(t,"gen_ai.usage.output_tokens.prediction_accepted",r.openai.acceptedPredictionTokens),jr(t,"gen_ai.usage.output_tokens.prediction_rejected",r.openai.rejectedPredictionTokens),jr(t,"gen_ai.conversation.id",r.openai.responseId)),r.anthropic&&(jr(t,"gen_ai.usage.input_tokens.cached",r.anthropic.cacheReadInputTokens),jr(t,"gen_ai.usage.input_tokens.cache_write",r.anthropic.cacheCreationInputTokens)),r.bedrock?.usage&&(jr(t,"gen_ai.usage.input_tokens.cached",r.bedrock.usage.cacheReadInputTokens),jr(t,"gen_ai.usage.input_tokens.cache_write",r.bedrock.usage.cacheWriteInputTokens)),r.deepseek&&(jr(t,"gen_ai.usage.input_tokens.cached",r.deepseek.promptCacheHitTokens),jr(t,"gen_ai.usage.input_tokens.cache_miss",r.deepseek.promptCacheMissTokens))}catch{}}function jr(t,e,r){r!=null&&(t[e]=r)}var TV="gen_ai.system",Nd="gen_ai.request.model",mV="gen_ai.request.temperature",hV="gen_ai.request.frequency_penalty",gV="gen_ai.request.presence_penalty",AV="gen_ai.request.top_p",Zh="gen_ai.response.finish_reasons",RV="gen_ai.response.model",OV="gen_ai.response.id",NV="gen_ai.usage.input_tokens",IV="gen_ai.usage.output_tokens",PV="gen_ai.usage.total_tokens",CV="gen_ai.operation.name",eg="gen_ai.request.messages",tg="gen_ai.response.text",yV="openai.response.id",MV="openai.response.model",vV="openai.response.timestamp",bV="openai.usage.completion_tokens",LV="openai.usage.prompt_tokens",rg={CHAT:"chat"};var bo="OpenAI",DV=["responses.create","chat.completions.create"];function Id(t){return t.includes("chat.completions")?rg.CHAT:t.includes("responses")?rg.CHAT:t.split(".").pop()||"unknown"}function xV(t){return`gen_ai.${Id(t)}`}function UV(t){return DV.includes(t)}function wV(t,e){return t?`${t}.${e}`:e}function VV(t){return t!==null&&typeof t=="object"&&"object"in t&&t.object==="chat.completion"}function BV(t){return t!==null&&typeof t=="object"&&"object"in t&&t.object==="response"}function QEe(t,e){let r={[TV]:"openai",[CV]:Id(e)};if(t.length>0&&typeof t[0]=="object"&&t[0]!==null){let n=t[0];r[Nd]=n.model??"unknown","temperature"in n&&(r[mV]=n.temperature),"top_p"in n&&(r[AV]=n.top_p),"frequency_penalty"in n&&(r[hV]=n.frequency_penalty),"presence_penalty"in n&&(r[gV]=n.presence_penalty)}else r[Nd]="unknown";return r}function GV(t,e,r,n){e!==void 0&&t.setAttributes({[LV]:e,[NV]:e}),r!==void 0&&t.setAttributes({[bV]:r,[IV]:r}),n!==void 0&&t.setAttributes({[PV]:n})}function HV(t,e,r,n){e&&t.setAttributes({[yV]:e,[OV]:e}),r&&t.setAttributes({[MV]:r,[RV]:r}),n&&t.setAttributes({[vV]:new Date(n*1e3).toISOString()})}function JEe(t,e){if(HV(t,e.id,e.model,e.created),e.usage&&GV(t,e.usage.prompt_tokens,e.usage.completion_tokens,e.usage.total_tokens),Array.isArray(e.choices)){let r=e.choices.map(n=>n.finish_reason).filter(n=>n!==null);r.length>0&&t.setAttributes({[Zh]:JSON.stringify(r)})}}function ZEe(t,e){HV(t,e.id,e.model,e.created_at),e.status&&t.setAttributes({[Zh]:JSON.stringify([e.status])}),e.usage&&GV(t,e.usage.input_tokens,e.usage.output_tokens,e.usage.total_tokens)}function efe(t,e,r){if(!e||typeof e!="object")return;let n=e;if(VV(n)){if(JEe(t,n),r&&n.choices?.length){let o=n.choices.map(s=>s.message?.content||"");t.setAttributes({[tg]:JSON.stringify(o)})}}else BV(n)&&(ZEe(t,n),r&&n.output_text&&t.setAttributes({[tg]:n.output_text}))}function tfe(t,e){"messages"in e&&t.setAttributes({[eg]:JSON.stringify(e.messages)}),"input"in e&&t.setAttributes({[eg]:JSON.stringify(e.input)})}function rfe(){let e=Q().getClient(),r=e?.getIntegrationByName(bo),n=r?!!e?.getOptions().sendDefaultPii:!1;return{recordInputs:r?.options?.recordInputs??n,recordOutputs:r?.options?.recordOutputs??n}}function nfe(t,e,r,n){return async function(...s){let i=n||rfe(),a=QEe(s,e),c=a[Nd]||"unknown",u=Id(e);return cu({name:`${u} ${c}`,op:xV(e),attributes:a},async l=>{try{i.recordInputs&&s[0]&&typeof s[0]=="object"&&tfe(l,s[0]);let p=await t.apply(r,s);return efe(l,p,i.recordOutputs),p}catch(p){throw Dt(p),p}})}}function kV(t,e="",r){return new Proxy(t,{get(n,o){let s=n[o],i=wV(e,String(o));return typeof s=="function"&&UV(i)?nfe(s,i,n,r):typeof s=="function"?s.bind(n):s&&typeof s=="object"?kV(s,i,r):s}})}function ng(t,e){return kV(t,"",e)}function du(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}function qV(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&t!==void 0&&!t.includes("node_modules/")}function jV(t){let e=/^\s*[-]{4,}$/,r=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return n=>{let o=n.match(r);if(o){let s,i,a,c,u;if(o[1]){a=o[1];let _=a.lastIndexOf(".");if(a[_-1]==="."&&_--,_>0){s=a.slice(0,_),i=a.slice(_+1);let d=s.indexOf(".Module");d>0&&(a=a.slice(d+1),s=s.slice(0,d))}c=void 0}i&&(c=s,u=i),i==="<anonymous>"&&(u=void 0,a=void 0),a===void 0&&(u=u||"?",a=c?`${c}.${u}`:u);let l=o[2]?.startsWith("file://")?o[2].slice(7):o[2],p=o[5]==="native";return l?.match(/\/[A-Z]:/)&&(l=l.slice(1)),!l&&o[5]&&!p&&(l=o[5]),{filename:l?decodeURI(l):void 0,module:t?t(l):void 0,function:a,lineno:FV(o[3]),colno:FV(o[4]),in_app:qV(l||"",p)}}if(n.match(e))return{filename:n}}}function og(t){return[90,jV(t)]}function FV(t){return parseInt(t||"",10)||void 0}var qt=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){let r=this._cache.get(e);if(r!==void 0)return this._cache.delete(e),this._cache.set(e,r),r}set(e,r){this._cache.size>=this._maxSize&&this._cache.delete(this._cache.keys().next().value),this._cache.set(e,r)}remove(e){let r=this._cache.get(e);return r&&this._cache.delete(e),r}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let e=[];return this._cache.forEach(r=>e.push(r)),e}};var sg=C(ee(),1),Eu={};function B(t,e,r){return r?yfe(t,e,r):Cfe(t,e)}function Cfe(t,e){return Object.assign(r=>{let n=Eu[t];if(n)return r&&n.setConfig(r),n;let o=e(r);return Eu[t]=o,(0,sg.registerInstrumentations)({instrumentations:[o]}),o},{id:t})}function yfe(t,e,r){return Object.assign(n=>{let o=r(n),s=Eu[t];if(s)return s.setConfig(o),s;let i=new e(o);return Eu[t]=i,(0,sg.registerInstrumentations)({instrumentations:[i]}),i},{id:t})}function fu(t){let e=!1,r=[];if(!Mfe(t))e=!0;else{let o=t._wrap;t._wrap=(...s)=>(e=!0,r.forEach(i=>i()),r=[],o(...s))}return o=>{e?o():r.push(o)}}function Mfe(t){return typeof t._wrap=="function"}var mn=require("node:diagnostics_channel");M();var B$=C(re(),1),Cu=C(ee(),1);ue();M();M();var Rr=C(re(),1),Do=C(mA(),1),CA="sentry.parentIsRemote",ma="sentry.graphql.operation";function yA(t){if("parentSpanId"in t)return t.parentSpanId;if("parentSpanContext"in t)return t.parentSpanContext?.spanId}function MA(t){let e=t;return!!e.attributes&&typeof e.attributes=="object"}function FCe(t){return typeof t.kind=="number"}function qCe(t){return!!t.status}function d$(t){return!!t.name}function jCe(t){if(!MA(t))return{};let e=t.attributes[ta]||t.attributes[ea],r={url:e,"http.method":t.attributes[Hs]||t.attributes[Su]};!r["http.method"]&&r.url&&(r["http.method"]="GET");try{if(typeof e=="string"){let n=Mo(e);r.url=vo(n),n.search&&(r["http.query"]=n.search),n.hash&&(r["http.fragment"]=n.hash)}}catch{}return r}function YCe(t){return FCe(t)?t.kind:ct.INTERNAL}var hA="sentry-trace",gA="baggage",vA="sentry.dsc",bA="sentry.sampled_not_recording",E$="sentry.url",$Ce="sentry.sample_rand",KCe="sentry.sample_rate",f$=Lr("sentry_scopes"),AA=Lr("sentry_fork_isolation_scope"),RA=Lr("sentry_fork_set_scope"),OA=Lr("sentry_fork_set_isolation_scope"),S$="_scopeContext";function ha(t){return t.getValue(f$)}function T$(t,e){return t.setValue(f$,e)}function WCe(t,e){Fe(t,S$,e)}function Nu(t){return t[S$]}function Ta(t){let{traceFlags:e,traceState:r}=t,n=r?r.get(bA)==="1":!1;if(e===pr.SAMPLED)return!0;if(n)return!1;let o=r?r.get(vA):void 0,s=o?Po(o):void 0;if(s?.sampled==="true")return!0;if(s?.sampled==="false")return!1}function m$(t,e,r){let n=e[Hs]||e[Su];if(n)return zCe({attributes:e,name:t,kind:r},n);let o=e[ag],s=typeof e[W]=="string"&&e[W].startsWith("cache.");if(o&&!s)return XCe({attributes:e,name:t});let i=e[We]==="custom"?"custom":"route";if(e[_g])return{...Ou(t,e,"route"),op:"rpc"};if(e[pg])return{...Ou(t,e,i),op:"message"};let u=e[ug];return u?{...Ou(t,e,i),op:u.toString()}:{op:void 0,description:t,source:"custom"}}function h$(t){let e=MA(t)?t.attributes:{},r=d$(t)?t.name:"<unknown>",n=YCe(t);return m$(r,e,n)}function XCe({attributes:t,name:e}){let r=t[pn];if(typeof r=="string")return{op:"db",description:r,source:t[We]||"custom"};if(t[We]==="custom")return{op:"db",description:e,source:"custom"};let n=t[cg];return{op:"db",description:n?n.toString():e,source:"task"}}function zCe({name:t,kind:e,attributes:r},n){let o=["http"];switch(e){case ct.CLIENT:o.push("client");break;case ct.SERVER:o.push("server");break}r["sentry.http.prefetch"]&&o.push("prefetch");let{urlPath:s,url:i,query:a,fragment:c,hasRoute:u}=JCe(r,e);if(!s)return{...Ou(t,r),op:o.join(".")};let l=r[ma],p=`${n} ${s}`,_=l?`${p} (${QCe(l)})`:p,d=u||s==="/"?"route":"url",S={};i&&(S.url=i),a&&(S["http.query"]=a),c&&(S["http.fragment"]=c);let f=e===ct.CLIENT||e===ct.SERVER,h=!`${r[ae]||"manual"}`.startsWith("auto"),A=r[We]==="custom",N=r[pn],I=!A&&N==null&&(f||!h),{description:O,source:b}=I?{description:_,source:d}:Ou(t,r);return{op:o.join("."),description:O,source:b,data:S}}function QCe(t){if(Array.isArray(t)){let e=t.slice().sort();return e.length<=5?e.join(", "):`${e.slice(0,5).join(", ")}, +${e.length-5}`}return`${t}`}function JCe(t,e){let r=t[lg],n=t[ea]||t[ta],o=t[Sn],s=typeof n=="string"?Mo(n):void 0,i=s?vo(s):void 0,a=s?.search||void 0,c=s?.hash||void 0;return typeof o=="string"?{urlPath:o,url:i,query:a,fragment:c,hasRoute:!0}:e===ct.SERVER&&typeof r=="string"?{urlPath:Zi(r),url:i,query:a,fragment:c,hasRoute:!1}:s?{urlPath:i,url:i,query:a,fragment:c,hasRoute:!1}:typeof r=="string"?{urlPath:Zi(r),url:i,query:a,fragment:c,hasRoute:!1}:{urlPath:void 0,url:i,query:a,fragment:c,hasRoute:!1}}function Ou(t,e,r="custom"){let n=e[We]||r,o=e[pn];return o&&typeof o=="string"?{description:o,source:n}:{description:t,source:n}}function g$(t){t.on("createDsc",(e,r)=>{if(!r)return;let s=k(r).data[We],{description:i}=d$(r)?h$(r):{description:void 0};if(s!=="url"&&i&&(e.transaction=i),st()){let a=Ta(r.spanContext());e.sampled=a==null?void 0:String(a)}})}function A$(){return K.getActiveSpan()}var Tn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function R$({dsc:t,sampled:e}){let r=t?Ls(t):void 0,n=new Rr.TraceState,o=r?n.set(vA,r):n;return e===!1?o.set(bA,"1"):o}var O$=new Set;function N$(){return Array.from(O$)}function RE(t){O$.add(t)}var hE=class extends Rr.W3CBaggagePropagator{constructor(){super(),RE("SentryPropagator"),this._urlMatchesTargetsMap=new qt(100)}inject(e,r,n){if((0,Rr.isTracingSuppressed)(e)){Tn&&m.log("[Tracing] Not injecting trace data for url because tracing is suppressed.");return}let o=K.getSpan(e),s=o&&tye(o),i=H()?.getOptions()?.tracePropagationTargets;if(!Iu(s,i,this._urlMatchesTargetsMap)){Tn&&m.log("[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:",s);return}let a=eye(r),c=yt.getBaggage(e)||yt.createBaggage({}),{dynamicSamplingContext:u,traceId:l,spanId:p,sampled:_}=I$(e);if(a){let d=Ds(a);d&&Object.entries(d).forEach(([S,f])=>{c=c.setEntry(S,{value:f})})}u&&(c=Object.entries(u).reduce((d,[S,f])=>f?d.setEntry(`${eu}${S}`,{value:f}):d,c)),l&&l!==gs&&n.set(r,hA,Co(l,p,_)),super.inject(yt.setBaggage(e,c),r,n)}extract(e,r,n){let o=n.get(r,hA),s=n.get(r,gA),i=o?Array.isArray(o)?o[0]:o:void 0;return C$(P$(e,{sentryTrace:i,baggage:s}))}fields(){return[hA,gA]}},u$="[Tracing] Not injecting trace data for url because it does not match tracePropagationTargets:";function Iu(t,e,r){if(typeof t!="string"||!e)return!0;let n=r?.get(t);if(n!==void 0)return Tn&&!n&&m.log(u$,t),n;let o=Ro(t,e);return r?.set(t,o),Tn&&!o&&m.log(u$,t),o}function I$(t,e={}){let r=K.getSpan(t);if(r?.spanContext().isRemote){let a=r.spanContext();return{dynamicSamplingContext:Ve(r),traceId:a.traceId,spanId:void 0,sampled:Ta(a)}}if(r){let a=r.spanContext();return{dynamicSamplingContext:Ve(r),traceId:a.traceId,spanId:a.spanId,sampled:Ta(a)}}let n=e.scope||ha(t)?.scope||Q(),o=e.client||H(),s=n.getPropagationContext();return{dynamicSamplingContext:o?Gn(o,n):void 0,traceId:s.traceId,spanId:s.propagationSpanId,sampled:s.sampled}}function P$(t,{sentryTrace:e,baggage:r}){let n=tu(e,r),{traceId:o,parentSpanId:s,sampled:i,dsc:a}=n;if(!s)return t;let c=rye({traceId:o,spanId:s,sampled:i,dsc:a});return K.setSpanContext(t,c)}function ZCe(t,e,r){let n=C$(P$(t,e));return F.with(n,r)}function C$(t){let e=ha(t),r={scope:e?e.scope:Q().clone(),isolationScope:e?e.isolationScope:ie()};return T$(t,r)}function eye(t){try{let e=t[gA];return Array.isArray(e)?e.join(","):e}catch{return}}function tye(t){let e=k(t).data,r=e[ea]||e[ta];if(typeof r=="string")return r;let n=t.spanContext().traceState?.get(E$);if(n)return n}function rye({spanId:t,traceId:e,sampled:r,dsc:n}){let o=R$({dsc:n,sampled:r});return{traceId:e,spanId:t,isRemote:!0,traceFlags:r?pr.SAMPLED:pr.NONE,traceState:o}}function nye(t,e){let r=LA(),{name:n,parentSpan:o}=t;return UA(o)(()=>{let i=xA(t.scope,t.forceTransaction),c=t.onlyIfParent&&!K.getSpan(i)?(0,Rr.suppressTracing)(i):i,u=DA(t);return r.startActiveSpan(n,u,c,l=>Hn(()=>e(l),()=>{k(l).status===void 0&&l.setStatus({code:fe.ERROR})},()=>l.end()))})}function oye(t,e){let r=LA(),{name:n,parentSpan:o}=t;return UA(o)(()=>{let i=xA(t.scope,t.forceTransaction),c=t.onlyIfParent&&!K.getSpan(i)?(0,Rr.suppressTracing)(i):i,u=DA(t);return r.startActiveSpan(n,u,c,l=>Hn(()=>e(l,()=>l.end()),()=>{k(l).status===void 0&&l.setStatus({code:fe.ERROR})}))})}function sye(t){let e=LA(),{name:r,parentSpan:n}=t;return UA(n)(()=>{let s=xA(t.scope,t.forceTransaction),a=t.onlyIfParent&&!K.getSpan(s)?(0,Rr.suppressTracing)(s):s,c=DA(t);return e.startSpan(r,c,a)})}function y$(t,e){let r=t?K.setSpan(F.active(),t):K.deleteSpan(F.active());return F.with(r,()=>e(Q()))}function LA(){return H()?.tracer||K.getTracer("@sentry/opentelemetry",pe)}function DA(t){let{startTime:e,attributes:r,kind:n,op:o,links:s}=t,i=typeof e=="number"?iye(e):e;return{attributes:o?{[W]:o,...r}:r,kind:n,links:s,startTime:i}}function iye(t){return t<9999999999?t*1e3:t}function xA(t,e){let r=aye(t),n=K.getSpan(r);if(!n||!e)return r;let o=K.deleteSpan(r),{spanId:s,traceId:i}=n.spanContext(),a=Ta(n.spanContext()),c=ve(n),u=Ve(c),l=R$({dsc:u,sampled:a}),p={traceId:i,spanId:s,isRemote:!0,traceFlags:a?pr.SAMPLED:pr.NONE,traceState:l};return K.setSpanContext(o,p)}function aye(t){if(t){let e=Nu(t);if(e)return e}return F.active()}function cye(t,e){return ZCe(F.active(),t,e)}function M$(t,e){let r=Nu(e),n=r&&K.getSpan(r),o=n?yo(n):Yi(e);return[n?Ve(n):Gn(t,e),o]}function UA(t){return t!==void 0?e=>y$(t,e):e=>e()}function uye(t){let e=(0,Rr.suppressTracing)(F.active());return F.with(e,t)}function v$(t){t.on("preprocessEvent",e=>{let r=A$();if(!r||e.type==="transaction")return;e.contexts={trace:yo(r),...e.contexts};let n=ve(r);return e.sdkProcessingMetadata={dynamicSamplingContext:Ve(n),...e.sdkProcessingMetadata},e})}function lye({span:t,scope:e,client:r}={}){let n=(e&&Nu(e))??F.active();if(t){let{scope:c}=Gr(t);n=c&&Nu(c)||K.setSpan(F.active(),t)}let{traceId:o,spanId:s,sampled:i,dynamicSamplingContext:a}=I$(n,{scope:e,client:r});return{"sentry-trace":Co(o,s,i),baggage:Ls(a)}}function b$(){function t(){let a=F.active(),c=ha(a);return c||{scope:qi(),isolationScope:un()}}function e(a){let c=F.active();return F.with(c,()=>a(s()))}function r(a,c){let u=Nu(a)||F.active();return F.with(u.setValue(RA,a),()=>c(a))}function n(a){let c=F.active();return F.with(c.setValue(AA,!0),()=>a(i()))}function o(a,c){let u=F.active();return F.with(u.setValue(OA,a),()=>c(i()))}function s(){return t().scope}function i(){return t().isolationScope}hh({withScope:e,withSetScope:r,withSetIsolationScope:o,withIsolationScope:n,getCurrentScope:s,getIsolationScope:i,startSpan:nye,startSpanManual:oye,startInactiveSpan:sye,getActiveSpan:A$,suppressTracing:uye,getTraceData:lye,continueTrace:cye,withActiveSpan:y$})}function L$(t){class e extends t{constructor(...n){super(...n),RE("SentryContextManager")}with(n,o,s,...i){let a=ha(n),c=a?.scope||Q(),u=a?.isolationScope||ie(),l=n.getValue(AA)===!0,p=n.getValue(RA),_=n.getValue(OA),d=p||c.clone(),S=_||(l?u.clone():u),h=T$(n,{scope:d,isolationScope:S}).deleteValue(AA).deleteValue(RA).deleteValue(OA);return WCe(d,h),super.with(h,o,s,...i)}}return e}function pye(t){let e=new Map;for(let r of t)_ye(e,r);return Array.from(e,function([r,n]){return n})}function D$(t){return t.attributes[CA]===!0?void 0:yA(t)}function _ye(t,e){let r=e.spanContext().spanId,n=D$(e);if(!n){NA(t,{id:r,span:e,children:[]});return}let o=dye(t,n),s=NA(t,{id:r,span:e,parentNode:o,children:[]});o.children.push(s)}function dye(t,e){let r=t.get(e);return r||NA(t,{id:e,children:[]})}function NA(t,e){let r=t.get(e.id);return r?.span?r:r&&!r.span?(r.span=e.span,r.parentNode=e.parentNode,r):(t.set(e.id,e),e)}var x$={1:"cancelled",2:"unknown_error",3:"invalid_argument",4:"deadline_exceeded",5:"not_found",6:"already_exists",7:"permission_denied",8:"resource_exhausted",9:"failed_precondition",10:"aborted",11:"out_of_range",12:"unimplemented",13:"internal_error",14:"unavailable",15:"data_loss",16:"unauthenticated"},Eye=t=>Object.values(x$).includes(t);function U$(t){let e=MA(t)?t.attributes:{},r=qCe(t)?t.status:void 0;if(r){if(r.code===fe.OK)return{code:1};if(r.code===fe.ERROR){if(typeof r.message>"u"){let o=l$(e);if(o)return o}return r.message&&Eye(r.message)?{code:2,message:r.message}:{code:2,message:"unknown_error"}}}let n=l$(e);return n||(r?.code===fe.UNSET?{code:1}:{code:2,message:"unknown_error"})}function l$(t){let e=t[Lo]||t[Pd],r=t[dg],n=typeof e=="number"?e:typeof e=="string"?parseInt(e):void 0;if(typeof n=="number")return k_(n);if(typeof r=="string")return{code:2,message:x$[r]||"unknown_error"}}var p$=1e3,_$=300,IA=class{constructor(e){this._finishedSpanBucketSize=e?.timeout||_$,this._finishedSpanBuckets=new Array(this._finishedSpanBucketSize).fill(void 0),this._lastCleanupTimestampInS=Math.floor(Date.now()/1e3),this._spansToBucketEntry=new WeakMap,this._sentSpans=new Map,this._debouncedFlush=jh(this.flush.bind(this),1,{maxWait:100})}export(e){let r=Math.floor(Date.now()/1e3);if(this._lastCleanupTimestampInS!==r){let i=0;this._finishedSpanBuckets.forEach((a,c)=>{a&&a.timestampInS<=r-this._finishedSpanBucketSize&&(i+=a.spans.size,this._finishedSpanBuckets[c]=void 0)}),i>0&&Tn&&m.log(`SpanExporter dropped ${i} spans because they were pending for more than ${this._finishedSpanBucketSize} seconds.`),this._lastCleanupTimestampInS=r}let n=r%this._finishedSpanBucketSize,o=this._finishedSpanBuckets[n]||{timestampInS:r,spans:new Set};this._finishedSpanBuckets[n]=o,o.spans.add(e),this._spansToBucketEntry.set(e,o);let s=D$(e);(!s||this._sentSpans.has(s))&&this._debouncedFlush()}flush(){let e=this._finishedSpanBuckets.flatMap(i=>i?Array.from(i.spans):[]);this._flushSentSpanCache();let r=this._maybeSend(e),n=r.size,o=e.length-n;Tn&&m.log(`SpanExporter exported ${n} spans, ${o} spans are waiting for their parent spans to finish`);let s=Date.now()+_$*1e3;for(let i of r){this._sentSpans.set(i.spanContext().spanId,s);let a=this._spansToBucketEntry.get(i);a&&a.spans.delete(i)}this._debouncedFlush.cancel()}clear(){this._finishedSpanBuckets=this._finishedSpanBuckets.fill(void 0),this._sentSpans.clear(),this._debouncedFlush.cancel()}_maybeSend(e){let r=pye(e),n=new Set,o=this._getCompletedRootNodes(r);for(let s of o){let i=s.span;n.add(i);let a=Sye(i);if(s.parentNode&&this._sentSpans.has(s.parentNode.id)){let l=a.contexts?.trace?.data;l&&(l["sentry.parent_span_already_sent"]=!0)}let c=a.spans||[];for(let l of s.children)PA(l,c,n);a.spans=c.length>p$?c.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,p$):c;let u=Vs(i.events);u&&(a.measurements=u),cd(a)}return n}_flushSentSpanCache(){let e=Date.now();for(let[r,n]of this._sentSpans.entries())n<=e&&this._sentSpans.delete(r)}_nodeIsCompletedRootNodeOrHasSentParent(e){return!!e.span&&(!e.parentNode||this._sentSpans.has(e.parentNode.id))}_getCompletedRootNodes(e){return e.filter(r=>this._nodeIsCompletedRootNodeOrHasSentParent(r))}};function fye(t){let e=t.attributes,r=e[ae],n=e[W],o=e[We];return{origin:r,op:n,source:o}}function Sye(t){let{op:e,description:r,data:n,origin:o="manual",source:s}=w$(t),i=Gr(t),a=t.attributes[Br],c={[We]:s,[Br]:a,[W]:e,[ae]:o,...n,...V$(t.attributes)},{links:u}=t,{traceId:l,spanId:p}=t.spanContext(),_=yA(t),d=U$(t),S={parent_span_id:_,span_id:p,trace_id:l,data:c,origin:o,op:e,status:Us(d),links:xs(u)},f=c[Lo],T=typeof f=="number"?{response:{status_code:f}}:void 0;return{contexts:{trace:S,otel:{resource:t.resource.attributes},...T},spans:[],start_timestamp:Ft(t.startTime),timestamp:Ft(t.endTime),transaction:r,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:i.scope,capturedSpanIsolationScope:i.isolationScope,sampleRate:a,dynamicSamplingContext:Ve(t)},...s&&{transaction_info:{source:s}}}}function PA(t,e,r){let n=t.span;if(n&&r.add(n),!n){t.children.forEach(N=>{PA(N,e,r)});return}let s=n.spanContext().spanId,i=n.spanContext().traceId,a=yA(n),{attributes:c,startTime:u,endTime:l,links:p}=n,{op:_,description:d,data:S,origin:f="manual"}=w$(n),T={[ae]:f,[W]:_,...V$(c),...S},h=U$(n),A={span_id:s,trace_id:i,data:T,description:d,parent_span_id:a,start_timestamp:Ft(u),timestamp:Ft(l)||void 0,status:Us(h),op:_,origin:f,measurements:Vs(n.events),links:xs(p)};e.push(A),t.children.forEach(N=>{PA(N,e,r)})}function w$(t){let{op:e,source:r,origin:n}=fye(t),{op:o,description:s,source:i,data:a}=h$(t),c=e||o,u=r||i,l={...a,...Tye(t)};return{op:c,description:s,source:u,origin:n,data:l}}function V$(t){let e={...t};return delete e[Br],delete e[CA],delete e[pn],e}function Tye(t){let e=t.attributes,r={};t.kind!==ct.INTERNAL&&(r["otel.kind"]=ct[t.kind]);let n=e[Pd];n&&(r[Lo]=n);let o=jCe(t);return o.url&&(r.url=o.url),o["http.query"]&&(r["http.query"]=o["http.query"].slice(1)),o["http.fragment"]&&(r["http.fragment"]=o["http.fragment"].slice(1)),r}function mye(t,e){let r=K.getSpan(e),n=ha(e);r&&!r.spanContext().isRemote&&Wi(r,t),r?.spanContext().isRemote&&t.setAttribute(CA,!0),e===_i&&(n={scope:qi(),isolationScope:un()}),n&&Zc(t,n.scope,n.isolationScope),su(t),H()?.emit("spanStart",t)}function hye(t){iu(t),H()?.emit("spanEnd",t)}var gE=class{constructor(e){RE("SentrySpanProcessor"),this._exporter=new IA(e)}async forceFlush(){this._exporter.flush()}async shutdown(){this._exporter.clear()}onStart(e,r){mye(e,r)}onEnd(e){hye(e),this._exporter.export(e)}},AE=class{constructor(e){this._client=e,RE("SentrySampler")}shouldSample(e,r,n,o,s,i){let a=this._client.getOptions(),c=Rye(e),u=c?.spanContext();if(!st(a))return Sa({decision:void 0,context:e,spanAttributes:s});let l=s[Su]||s[Hs];if(o===ct.CLIENT&&l&&(!c||u?.isRemote))return Sa({decision:void 0,context:e,spanAttributes:s});let p=c?gye(c,r,n):void 0;if(!(!c||u?.isRemote))return Sa({decision:p?Do.SamplingDecision.RECORD_AND_SAMPLED:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s});let{description:d,data:S,op:f}=m$(n,s,o),T={...S,...s};f&&(T[W]=f);let h={decision:!0};if(this._client.emit("beforeSampling",{spanAttributes:T,spanName:d,parentSampled:p,parentContext:u},h),!h.decision)return Sa({decision:void 0,context:e,spanAttributes:s});let{isolationScope:A}=ha(e)??{},N=u?.traceState?u.traceState.get(vA):void 0,I=N?Po(N):void 0,O=nr(I?.sample_rand)??Math.random(),[b,v,X]=au(a,{name:d,attributes:T,normalizedRequest:A?.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampled:p,parentSampleRate:nr(I?.sample_rate)},O),$=`${l}`.toUpperCase();return $==="OPTIONS"||$==="HEAD"?(Tn&&m.log(`[Tracing] Not sampling span because HTTP method is '${$}' for ${n}`),Sa({decision:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s,sampleRand:O,downstreamTraceSampleRate:0})):(!b&&p===void 0&&(Tn&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),this._client.recordDroppedEvent("sample_rate","transaction")),{...Sa({decision:b?Do.SamplingDecision.RECORD_AND_SAMPLED:Do.SamplingDecision.NOT_RECORD,context:e,spanAttributes:s,sampleRand:O,downstreamTraceSampleRate:X?v:void 0}),attributes:{[Br]:X?v:void 0}})}toString(){return"SentrySampler"}};function gye(t,e,r){let n=t.spanContext();if(xn(n)&&n.traceId===e){if(n.isRemote){let s=Ta(t.spanContext());return Tn&&m.log(`[Tracing] Inheriting remote parent's sampled decision for ${r}: ${s}`),s}let o=Ta(n);return Tn&&m.log(`[Tracing] Inheriting parent's sampled decision for ${r}: ${o}`),o}}function Sa({decision:t,context:e,spanAttributes:r,sampleRand:n,downstreamTraceSampleRate:o}){let s=Aye(e,r);return o!==void 0&&(s=s.set(KCe,`${o}`)),n!==void 0&&(s=s.set($Ce,`${n}`)),t==null?{decision:Do.SamplingDecision.NOT_RECORD,traceState:s}:t===Do.SamplingDecision.NOT_RECORD?{decision:t,traceState:s.set(bA,"1")}:{decision:t,traceState:s}}function Aye(t,e){let o=K.getSpan(t)?.spanContext()?.traceState||new Rr.TraceState,s=e[ea]||e[ta];return s&&typeof s=="string"&&(o=o.set(E$,s)),o}function Rye(t){let e=K.getSpan(t);return e&&xn(e.spanContext())?e:void 0}var Z=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Pu(t,e){if(!t)return e;let r=Ds(t),n=Ds(e);if(!n)return t;let o={...r};return Object.entries(n).forEach(([s,i])=>{o[s]||(o[s]=i)}),F_(o)}function ga(t){let e=t.protocol||"",r=t.hostname||t.host||"",n=!t.port||t.port===80||t.port===443||/^(.*):(\d+)$/.test(r)?"":`:${t.port}`,o=t.path?t.path:"/";return`${e}//${r}${n}${o}`}var jt="@sentry/instrumentation-http",Oye=1024*1024,Ks=class extends Cu.InstrumentationBase{constructor(e={}){super(jt,pe,e),this._propagationDecisionMap=new qt(100),this._ignoreOutgoingRequestsMap=new WeakMap}init(){let e=!1,r=(c=>{let u=c;this._patchServerEmitOnce(u.server)}),n=(c=>{let u=c;this._onOutgoingRequestFinish(u.request,u.response)}),o=(c=>{let u=c;this._onOutgoingRequestFinish(u.request,void 0)}),s=(c=>{let u=c;this._onOutgoingRequestCreated(u.request)}),i=c=>(e||(e=!0,(0,mn.subscribe)("http.server.request.start",r),(0,mn.subscribe)("http.client.response.finish",n),(0,mn.subscribe)("http.client.request.error",o),this.getConfig().propagateTraceInOutgoingRequests&&(0,mn.subscribe)("http.client.request.created",s)),c),a=()=>{(0,mn.unsubscribe)("http.server.request.start",r),(0,mn.unsubscribe)("http.client.response.finish",n),(0,mn.unsubscribe)("http.client.request.error",o),(0,mn.unsubscribe)("http.client.request.created",s)};return[new Cu.InstrumentationNodeModuleDefinition("http",["*"],i,a),new Cu.InstrumentationNodeModuleDefinition("https",["*"],i,a)]}_onOutgoingRequestFinish(e,r){Z&&m.log(jt,"Handling finished outgoing request");let n=this.getConfig().breadcrumbs,o=typeof n>"u"?!0:n,s=this._ignoreOutgoingRequestsMap.get(e)??this._shouldIgnoreOutgoingRequest(e);this._ignoreOutgoingRequestsMap.set(e,s),o&&!s&&Nye(e,r)}_onOutgoingRequestCreated(e){let r=this._ignoreOutgoingRequestsMap.get(e)??this._shouldIgnoreOutgoingRequest(e);if(this._ignoreOutgoingRequestsMap.set(e,r),r)return;let n=ga(e),o=H()?.getOptions().tracePropagationTargets,s=Iu(n,o,this._propagationDecisionMap)?Ji():void 0;if(!s)return;let{"sentry-trace":i,baggage:a}=s;if(i&&!e.getHeader("sentry-trace"))try{e.setHeader("sentry-trace",i),Z&&m.log(jt,"Added sentry-trace header to outgoing request")}catch(c){Z&&m.error(jt,"Failed to add sentry-trace header to outgoing request:",go(c)?c.message:"Unknown error")}if(a){let c=Pu(e.getHeader("baggage"),a);if(c)try{e.setHeader("baggage",c),Z&&m.log(jt,"Added baggage header to outgoing request")}catch(u){Z&&m.error(jt,"Failed to add baggage header to outgoing request:",go(u)?u.message:"Unknown error")}}}_patchServerEmitOnce(e){let r=e.emit;if(r.__sentry_patched__)return;Z&&m.log(jt,"Patching server.emit");let n=this,{ignoreIncomingRequestBody:o,maxIncomingRequestBodySize:s="medium"}=n.getConfig(),i=new Proxy(r,{apply(a,c,u){if(u[0]!=="request")return a.apply(c,u);Z&&m.log(jt,"Handling incoming request");let l=ie().clone(),p=u[1],_=u[2],d=Ed(p),S=p.ip||p.socket?.remoteAddress,f=p.url||"/";!o?.(f,p)&&s!=="none"&&Pye(p,l,s),l.setSDKProcessingMetadata({normalizedRequest:d,ipAddress:S});let T=(p.method||"GET").toUpperCase(),h=Zi(f),A=`${T} ${h}`;return l.setTransactionName(A),n.getConfig().trackIncomingRequestsAsSessions!==!1&&yye({requestIsolationScope:l,response:_,sessionFlushingDelayMS:n.getConfig().sessionFlushingDelayMS??6e4}),Jc(l,()=>{if(Q().getPropagationContext().propagationSpanId=rr(),!n.getConfig().extractIncomingTraceFromHeader)return a.apply(c,u);let N=yt.extract(F.active(),d.headers);return F.with(N,()=>a.apply(c,u))})}});Fe(i,"__sentry_patched__",!0),e.emit=i}_shouldIgnoreOutgoingRequest(e){if((0,B$.isTracingSuppressed)(F.active()))return!0;let r=this.getConfig().ignoreOutgoingRequests;if(!r)return!1;let n=Cye(e),o=ga(e);return r(o,n)}};function Nye(t,e){let r=Iye(t),n=e?.statusCode,o=du(n);sr({category:"http",data:{status_code:n,...r},type:"http",level:o},{event:"response",request:t,response:e})}function Iye(t){try{let e=t.getHeader("host")||t.host,r=new URL(t.path,`${t.protocol}//${e}`),n=Mo(r.toString()),o={url:vo(n),"http.method":t.method||"GET"};return n.search&&(o["http.query"]=n.search),n.hash&&(o["http.fragment"]=n.hash),o}catch{return{}}}function Pye(t,e,r){let n=0,o=[];Z&&m.log(jt,"Patching request.on");let s=new WeakMap,i=r==="small"?1e3:r==="medium"?1e4:Oye;try{t.on=new Proxy(t.on,{apply:(a,c,u)=>{let[l,p,..._]=u;if(l==="data"){Z&&m.log(jt,`Handling request.on("data") with maximum body size of ${i}b`);let d=new Proxy(p,{apply:(S,f,T)=>{try{let h=T[0],A=Buffer.from(h);n<i?(o.push(A),n+=A.byteLength):Z&&m.log(jt,`Dropping request body chunk because maximum body length of ${i}b is exceeded.`)}catch{Z&&m.error(jt,"Encountered error while storing body chunk.")}return Reflect.apply(S,f,T)}});return s.set(p,d),Reflect.apply(a,c,[l,d,..._])}return Reflect.apply(a,c,u)}}),t.off=new Proxy(t.off,{apply:(a,c,u)=>{let[,l]=u,p=s.get(l);if(p){s.delete(l);let _=u.slice();return _[1]=p,Reflect.apply(a,c,_)}return Reflect.apply(a,c,u)}}),t.on("end",()=>{try{let a=Buffer.concat(o).toString("utf-8");if(a){let u=Buffer.byteLength(a,"utf-8")>i?`${Buffer.from(a).subarray(0,i-3).toString("utf-8")}...`:a;e.setSDKProcessingMetadata({normalizedRequest:{data:u}})}}catch(a){Z&&m.error(jt,"Error building captured request body",a)}})}catch(a){Z&&m.error(jt,"Error patching request to capture body",a)}}function Cye(t){return{method:t.method,protocol:t.protocol,host:t.host,hostname:t.host,path:t.path,headers:t.getHeaders()}}function yye({requestIsolationScope:t,response:e,sessionFlushingDelayMS:r}){t.setSDKProcessingMetadata({requestSession:{status:"ok"}}),e.once("close",()=>{let n=H(),o=t.getScopeData().sdkProcessingMetadata.requestSession;if(n&&o){Z&&m.log(`Recorded request session with status: ${o.status}`);let s=new Date;s.setSeconds(0,0);let i=s.toISOString(),a=wA.get(n),c=a?.[i]||{exited:0,crashed:0,errored:0};if(c[{ok:"exited",crashed:"crashed",errored:"errored"}[o.status]]++,a)a[i]=c;else{Z&&m.log("Opened new request session aggregate.");let u={[i]:c};wA.set(n,u);let l=()=>{clearTimeout(_),p(),wA.delete(n);let d=Object.entries(u).map(([S,f])=>({started:S,exited:f.exited,errored:f.errored,crashed:f.crashed}));n.sendSession({aggregates:d})},p=n.on("flush",()=>{Z&&m.log("Sending request session aggregate due to client flush"),l()}),_=setTimeout(()=>{Z&&m.log("Sending request session aggregate due to flushing schedule"),l()},r).unref()}}})}var wA=new Map;var G$="Http",Mye=B(`${G$}.sentry`,t=>new Ks(t)),H$=(t={})=>{let e=t.dropSpansForIncomingRequestStatusCodes??[[401,404],[300,399]];return{name:G$,setupOnce(){Mye({...t,extractIncomingTraceFromHeader:!0,propagateTraceInOutgoingRequests:!0})},processEvent(r){if(r.type==="transaction"){let n=r.contexts?.trace?.data?.["http.response.status_code"];if(typeof n=="number"&&e.some(o=>{if(typeof o=="number")return o===n;let[s,i]=o;return n>=s&&n<=i}))return null}return r}}};M();var q$=C(re(),1),j$=C(ee(),1);var Aa=C(require("diagnostics_channel"),1);var Ws=Sh(process.versions.node),yu=Ws.major,k$=Ws.minor;var OE="sentry-trace",VA="baggage",F$=/baggage: (.*)\r\n/,Xs=class extends j$.InstrumentationBase{constructor(e={}){super("@sentry/instrumentation-node-fetch",pe,e),this._channelSubs=[],this._propagationDecisionMap=new qt(100),this._ignoreOutgoingRequestsMap=new WeakMap}init(){}disable(){super.disable(),this._channelSubs.forEach(e=>e.unsubscribe()),this._channelSubs=[]}enable(){super.enable(),this._channelSubs=this._channelSubs||[],!(this._channelSubs.length>0)&&(this._subscribeToChannel("undici:request:create",this._onRequestCreated.bind(this)),this._subscribeToChannel("undici:request:headers",this._onResponseHeaders.bind(this)))}_onRequestCreated({request:e}){if(!(this.getConfig().enabled!==!1))return;let o=this._shouldIgnoreOutgoingRequest(e);if(this._ignoreOutgoingRequestsMap.set(e,o),o)return;let s=BA(e.origin,e.path),i=H()?.getOptions().tracePropagationTargets,a=Iu(s,i,this._propagationDecisionMap)?Ji():void 0;if(!a)return;let{"sentry-trace":c,baggage:u}=a;if(Array.isArray(e.headers)){let l=e.headers;c&&!l.includes(OE)&&l.push(OE,c);let p=l.findIndex(_=>_===VA);if(u&&p===-1)l.push(VA,u);else if(u){let _=l[p+1],d=Pu(_,u);d&&(l[p+1]=d)}}else{let l=e.headers;c&&!l.includes(`${OE}:`)&&(e.headers+=`${OE}: ${c}\r
|
|
65
65
|
`);let p=e.headers.match(F$)?.[1];if(u&&!p)e.headers+=`${VA}: ${u}\r
|
|
66
66
|
`;else if(u){let _=Pu(p,u);_&&(e.headers=e.headers.replace(F$,`baggage: ${_}\r
|
|
67
|
-
`))}}}_onResponseHeaders({request:e,response:r}){let n=this.getConfig();if(!(n.enabled!==!1))return;let s=n.breadcrumbs,i=typeof s>"u"?!0:s,a=this._ignoreOutgoingRequestsMap.get(e);i&&!a&&vye(e,r)}_subscribeToChannel(e,r){let n=yu>18||yu===18&&k$>=19,o;if(n)Aa.subscribe?.(e,r),o=()=>Aa.unsubscribe?.(e,r);else{let s=Aa.channel(e);s.subscribe(r),o=()=>s.unsubscribe(r)}this._channelSubs.push({name:e,unsubscribe:o})}_shouldIgnoreOutgoingRequest(e){if((0,q$.isTracingSuppressed)(F.active()))return!0;let r=BA(e.origin,e.path),n=this.getConfig().ignoreOutgoingRequests;return typeof n!="function"||!r?!1:n(r)}};function vye(t,e){let r=bye(t),n=e.statusCode,o=du(n);hr({category:"http",data:{status_code:n,...r},type:"http",level:o},{event:"response",request:t,response:e})}function bye(t){try{let e=BA(t.origin,t.path),r=Mo(e),n={url:vo(r),"http.method":t.method||"GET"};return r.search&&(n["http.query"]=r.search),r.hash&&(n["http.fragment"]=r.hash),n}catch{return{}}}function BA(t,e="/"){try{return new URL(e,t).toString()}catch{let r=`${t}`;return r.endsWith("/")&&e.startsWith("/")?`${r}${e.slice(1)}`:!r.endsWith("/")&&!e.startsWith("/")?`${r}/${e.slice(1)}`:`${r}${e}`}}var Lye="NodeFetch",Dye=B(`${Lye}.sentry`,Xs,t=>t),xye=((t={})=>({name:"NodeFetch",setupOnce(){Dye(t)}})),Y$=xye;var K$=require("node:child_process"),NE=require("node:fs"),it=C(require("node:os"),1),W$=require("node:path"),GA=require("node:util");var Uye=(0,GA.promisify)(NE.readFile),wye=(0,GA.promisify)(NE.readdir),Vye="Context",Bye=((t={})=>{let e,r={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...t};async function n(s){e===void 0&&(e=o());let i=Gye(await e);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(r.os&&(s.os=await Hye()),r.app&&(s.app=Fye()),r.device&&(s.device=qye(r.device)),r.culture){let i=kye();i&&(s.culture=i)}return r.cloudResource&&(s.cloud_resource=Xye()),s}return{name:Vye,processEvent(s){return n(s)}}}),X$=Bye;function Gye(t){if(t.app?.app_memory&&(t.app.app_memory=process.memoryUsage().rss),t.app?.free_memory&&typeof process.availableMemory=="function"){let e=process.availableMemory?.();e!=null&&(t.app.free_memory=e)}return t.device?.free_memory&&(t.device.free_memory=it.freemem()),t}async function Hye(){let t=it.platform();switch(t){case"darwin":return Kye();case"linux":return Wye();default:return{name:jye[t]||t,version:it.release()}}}function kye(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let r=Intl.DateTimeFormat().resolvedOptions();return{locale:r.locale,timezone:r.timeZone}}}catch{}}function Fye(){let t=process.memoryUsage().rss,r={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t};if(typeof process.availableMemory=="function"){let n=process.availableMemory?.();n!=null&&(r.free_memory=n)}return r}function qye(t){let e={},r;try{r=it.uptime()}catch{}if(typeof r=="number"&&(e.boot_time=new Date(Date.now()-r*1e3).toISOString()),e.arch=it.arch(),(t===!0||t.memory)&&(e.memory_size=it.totalmem(),e.free_memory=it.freemem()),t===!0||t.cpu){let n=it.cpus(),o=n?.[0];o&&(e.processor_count=n.length,e.cpu_description=o.model,e.processor_frequency=o.speed)}return e}var jye={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},Yye=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],$ye={alpine:t=>t,arch:t=>hn(/distrib_release=(.*)/,t),centos:t=>hn(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>hn(/release (..)/,t),mint:t=>hn(/distrib_release=(.*)/,t),red:t=>hn(/release ([^ ]+)/,t),suse:t=>hn(/VERSION = (.*)\n/,t),ubuntu:t=>hn(/distrib_release=(.*)/,t)};function hn(t,e){let r=t.exec(e);return r?r[1]:void 0}async function Kye(){let t={kernel_version:it.release(),name:"Mac OS X",version:`10.${Number(it.release().split(".")[0])-4}`};try{let e=await new Promise((r,n)=>{(0,K$.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){n(o);return}r(s)})});t.name=hn(/^ProductName:\s+(.*)$/m,e),t.version=hn(/^ProductVersion:\s+(.*)$/m,e),t.build=hn(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function $$(t){return t.split(" ")[0].toLowerCase()}async function Wye(){let t={kernel_version:it.release(),name:"Linux"};try{let e=await wye("/etc"),r=Yye.find(a=>e.includes(a.name));if(!r)return t;let n=(0,W$.join)("/etc",r.name),o=(await Uye(n,{encoding:"utf-8"})).toLowerCase(),{distros:s}=r;t.name=s.find(a=>o.indexOf($$(a))>=0)||s[0];let i=$$(t.name);t.version=$ye[i]?.(o)}catch{}return t}function Xye(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}var J$=require("node:fs"),Z$=require("node:readline");var HA=new qt(10),eK=new qt(20),zye=7,Qye="ContextLines",Jye=1e3,Zye=1e4;function eMe(t,e,r){let n=t.get(e);return n===void 0?(t.set(e,r),r):n}function tMe(t){return!!(t.startsWith("node:")||t.endsWith(".min.js")||t.endsWith(".min.cjs")||t.endsWith(".min.mjs")||t.startsWith("data:"))}function rMe(t){return t.lineno!==void 0&&t.lineno>Zye||t.colno!==void 0&&t.colno>Jye}function nMe(t,e){let r=HA.get(t);if(r===void 0)return!1;for(let n=e[0];n<=e[1];n++)if(r[n]===void 0)return!1;return!0}function oMe(t,e){if(!t.length)return[];let r=0,n=t[0];if(typeof n!="number")return[];let o=Q$(n,e),s=[];for(;;){if(r===t.length-1){s.push(o);break}let i=t[r+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+e:(s.push(o),o=Q$(i,e)),r++}return s}function sMe(t,e,r){return new Promise((n,o)=>{let s=(0,J$.createReadStream)(t),i=(0,Z$.createInterface)({input:s});function a(){s.destroy(),n()}let c=0,u=0,l=e[u];if(l===void 0){a();return}let p=l[0],_=l[1];function d(S){eK.set(t,1),Z&&m.error(`Failed to read file: ${t}. Error: ${S}`),i.close(),i.removeAllListeners(),a()}s.on("error",d),i.on("error",d),i.on("close",a),i.on("line",S=>{if(c++,!(c<p)&&(r[c]=uh(S,0),c>=_)){if(u===e.length-1){i.close(),i.removeAllListeners();return}u++;let f=e[u];if(f===void 0){i.close(),i.removeAllListeners();return}p=f[0],_=f[1]}})})}async function iMe(t,e){let r={};if(e>0&&t.exception?.values){for(let s of t.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||tMe(c)||rMe(a))continue;r[c]||(r[c]=[]),r[c].push(a.lineno)}}let n=Object.keys(r);if(n.length==0)return t;let o=[];for(let s of n){if(eK.get(s))continue;let i=r[s];if(!i)continue;i.sort((u,l)=>u-l);let a=oMe(i,e);if(a.every(u=>nMe(s,u)))continue;let c=eMe(HA,s,{});o.push(sMe(s,a,c))}if(await Promise.all(o).catch(()=>{Z&&m.log("Failed to read one or more source files and resolve context lines")}),e>0&&t.exception?.values)for(let s of t.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&aMe(s.stacktrace.frames,e,HA);return t}function aMe(t,e,r){for(let n of t)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let o=r.get(n.filename);if(o===void 0)continue;cMe(n.lineno,n,e,o)}}function z$(t){delete t.pre_context,delete t.context_line,delete t.post_context}function cMe(t,e,r,n){if(e.lineno===void 0||n===void 0){Z&&m.error("Cannot resolve context for frame with no lineno or file contents");return}e.pre_context=[];for(let s=tK(t,r);s<t;s++){let i=n[s];if(i===void 0){z$(e),Z&&m.error(`Could not find line ${s} in file ${e.filename}`);return}e.pre_context.push(i)}if(n[t]===void 0){z$(e),Z&&m.error(`Could not find line ${t} in file ${e.filename}`);return}e.context_line=n[t];let o=rK(t,r);e.post_context=[];for(let s=t+1;s<=o;s++){let i=n[s];if(i===void 0)break;e.post_context.push(i)}}function tK(t,e){return Math.max(1,t-e)}function rK(t,e){return t+e}function Q$(t,e){return[tK(t,e),rK(t,e)]}var uMe=((t={})=>{let e=t.frameContextLines!==void 0?t.frameContextLines:zye;return{name:Qye,processEvent(r){return iMe(r,e)}}}),nK=uMe;var aK=require("node:worker_threads");var IE;async function PE(){if(IE===void 0)try{IE=!!(await import("node:inspector")).url()}catch{IE=!1}return IE}var Mu="__SENTRY_ERROR_LOCAL_VARIABLES__";function sK(t,e,r){let n=0,o=5,s=0;return setInterval(()=>{s===0?n>t&&(o*=2,r(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&e()),n=0},1e3).unref(),()=>{n+=1}}function oK(t){return t!==void 0&&(t.length===0||t==="?"||t==="<anonymous>")}function CE(t,e){return t===e||`Object.${t}`===e||t===`Object.${e}`||oK(t)&&oK(e)}var lMe="LyohIEBzZW50cnkvbm9kZS1jb3JlIDkuNDcuMSAoNDExZTEwMikgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIGV9ZnJvbSJub2RlOmluc3BlY3Rvci9wcm9taXNlcyI7aW1wb3J0e3dvcmtlckRhdGEgYXMgdH1mcm9tIm5vZGU6d29ya2VyX3RocmVhZHMiO2NvbnN0IG49Z2xvYmFsVGhpcyxpPXt9O2NvbnN0IG89Il9fU0VOVFJZX0VSUk9SX0xPQ0FMX1ZBUklBQkxFU19fIjtjb25zdCBhPXQ7ZnVuY3Rpb24gcyguLi5lKXthLmRlYnVnJiZmdW5jdGlvbihlKXtpZighKCJjb25zb2xlImluIG4pKXJldHVybiBlKCk7Y29uc3QgdD1uLmNvbnNvbGUsbz17fSxhPU9iamVjdC5rZXlzKGkpO2EuZm9yRWFjaChlPT57Y29uc3Qgbj1pW2VdO29bZV09dFtlXSx0W2VdPW59KTt0cnl7cmV0dXJuIGUoKX1maW5hbGx5e2EuZm9yRWFjaChlPT57dFtlXT1vW2VdfSl9fSgoKT0+Y29uc29sZS5sb2coIltMb2NhbFZhcmlhYmxlcyBXb3JrZXJdIiwuLi5lKSl9YXN5bmMgZnVuY3Rpb24gYyhlLHQsbixpKXtjb25zdCBvPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6dCxvd25Qcm9wZXJ0aWVzOiEwfSk7aVtuXT1vLnJlc3VsdC5maWx0ZXIoZT0+Imxlbmd0aCIhPT1lLm5hbWUmJiFpc05hTihwYXJzZUludChlLm5hbWUsMTApKSkuc29ydCgoZSx0KT0+cGFyc2VJbnQoZS5uYW1lLDEwKS1wYXJzZUludCh0Lm5hbWUsMTApKS5tYXAoZT0+ZS52YWx1ZT8udmFsdWUpfWFzeW5jIGZ1bmN0aW9uIHIoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQubWFwKGU9PltlLm5hbWUsZS52YWx1ZT8udmFsdWVdKS5yZWR1Y2UoKGUsW3Qsbl0pPT4oZVt0XT1uLGUpLHt9KX1mdW5jdGlvbiB1KGUsdCl7ZS52YWx1ZSYmKCJ2YWx1ZSJpbiBlLnZhbHVlP3ZvaWQgMD09PWUudmFsdWUudmFsdWV8fG51bGw9PT1lLnZhbHVlLnZhbHVlP3RbZS5uYW1lXT1gPCR7ZS52YWx1ZS52YWx1ZX0+YDp0W2UubmFtZV09ZS52YWx1ZS52YWx1ZToiZGVzY3JpcHRpb24iaW4gZS52YWx1ZSYmImZ1bmN0aW9uIiE9PWUudmFsdWUudHlwZT90W2UubmFtZV09YDwke2UudmFsdWUuZGVzY3JpcHRpb259PmA6InVuZGVmaW5lZCI9PT1lLnZhbHVlLnR5cGUmJih0W2UubmFtZV09Ijx1bmRlZmluZWQ+IikpfWFzeW5jIGZ1bmN0aW9uIGwoZSx0KXtjb25zdCBuPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6dCxvd25Qcm9wZXJ0aWVzOiEwfSksaT17fTtmb3IoY29uc3QgdCBvZiBuLnJlc3VsdClpZih0LnZhbHVlPy5vYmplY3RJZCYmIkFycmF5Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgYyhlLG4sdC5uYW1lLGkpfWVsc2UgaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJPYmplY3QiPT09dC52YWx1ZS5jbGFzc05hbWUpe2NvbnN0IG49dC52YWx1ZS5vYmplY3RJZDthd2FpdCByKGUsbix0Lm5hbWUsaSl9ZWxzZSB0LnZhbHVlJiZ1KHQsaSk7cmV0dXJuIGl9bGV0IGY7KGFzeW5jIGZ1bmN0aW9uKCl7Y29uc3QgdD1uZXcgZTt0LmNvbm5lY3RUb01haW5UaHJlYWQoKSxzKCJDb25uZWN0ZWQgdG8gbWFpbiB0aHJlYWQiKTtsZXQgbj0hMTt0Lm9uKCJEZWJ1Z2dlci5yZXN1bWVkIiwoKT0+e249ITF9KSx0Lm9uKCJEZWJ1Z2dlci5wYXVzZWQiLGU9PntuPSEwLGFzeW5jIGZ1bmN0aW9uKGUse3JlYXNvbjp0LGRhdGE6e29iamVjdElkOm59LGNhbGxGcmFtZXM6aX0pe2lmKCJleGNlcHRpb24iIT09dCYmInByb21pc2VSZWplY3Rpb24iIT09dClyZXR1cm47aWYoZj8uKCksbnVsbD09bilyZXR1cm47Y29uc3QgYT1bXTtmb3IobGV0IHQ9MDt0PGkubGVuZ3RoO3QrKyl7Y29uc3R7c2NvcGVDaGFpbjpuLGZ1bmN0aW9uTmFtZTpvLHRoaXM6c309aVt0XSxjPW4uZmluZChlPT4ibG9jYWwiPT09ZS50eXBlKSxyPSJnbG9iYWwiIT09cy5jbGFzc05hbWUmJnMuY2xhc3NOYW1lP2Ake3MuY2xhc3NOYW1lfS4ke299YDpvO2lmKHZvaWQgMD09PWM/Lm9iamVjdC5vYmplY3RJZClhW3RdPXtmdW5jdGlvbjpyfTtlbHNle2NvbnN0IG49YXdhaXQgbChlLGMub2JqZWN0Lm9iamVjdElkKTthW3RdPXtmdW5jdGlvbjpyLHZhcnM6bn19fWF3YWl0IGUucG9zdCgiUnVudGltZS5jYWxsRnVuY3Rpb25PbiIse2Z1bmN0aW9uRGVjbGFyYXRpb246YGZ1bmN0aW9uKCkgeyB0aGlzLiR7b30gPSB0aGlzLiR7b30gfHwgJHtKU09OLnN0cmluZ2lmeShhKX07IH1gLHNpbGVudDohMCxvYmplY3RJZDpufSksYXdhaXQgZS5wb3N0KCJSdW50aW1lLnJlbGVhc2VPYmplY3QiLHtvYmplY3RJZDpufSl9KHQsZS5wYXJhbXMpLnRoZW4oYXN5bmMoKT0+e24mJmF3YWl0IHQucG9zdCgiRGVidWdnZXIucmVzdW1lIil9LGFzeW5jIGU9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSl9KSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLmVuYWJsZSIpO2NvbnN0IGk9ITEhPT1hLmNhcHR1cmVBbGxFeGNlcHRpb25zO2lmKGF3YWl0IHQucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZTppPyJhbGwiOiJ1bmNhdWdodCJ9KSxpKXtjb25zdCBlPWEubWF4RXhjZXB0aW9uc1BlclNlY29uZHx8NTA7Zj1mdW5jdGlvbihlLHQsbil7bGV0IGk9MCxvPTUsYT0wO3JldHVybiBzZXRJbnRlcnZhbCgoKT0+ezA9PT1hP2k+ZSYmKG8qPTIsbihvKSxvPjg2NDAwJiYobz04NjQwMCksYT1vKTooYS09MSwwPT09YSYmdCgpKSxpPTB9LDFlMykudW5yZWYoKSwoKT0+e2krPTF9fShlLGFzeW5jKCk9PntzKCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0sYXN5bmMgZT0+e3MoYFJhdGUtbGltaXQgZXhjZWVkZWQuIERpc2FibGluZyBjYXB0dXJpbmcgb2YgY2F1Z2h0IGV4Y2VwdGlvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSl9fSkoKS5jYXRjaChlPT57cygiRmFpbGVkIHRvIHN0YXJ0IGRlYnVnZ2VyIixlKX0pLHNldEludGVydmFsKCgpPT57fSwxZTQpOw==";function iK(...t){m.log("[LocalVariables]",...t)}var cK=((t={})=>{function e(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,l=i[c],p=a[u];if(!p||!l)break;l.vars===void 0||p.in_app===!1||!CE(p.function,l.function)||(p.vars=l.vars)}}function r(s,i){if(i.originalException&&typeof i.originalException=="object"&&Mu in i.originalException&&Array.isArray(i.originalException[Mu])){for(let a of s.exception?.values||[])e(a,i.originalException[Mu]);i.originalException[Mu]=void 0}return s}async function n(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new aK.Worker(new URL(`data:application/javascript;base64,${lMe}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{iK("Worker error",a)}),i.once("exit",a=>{iK("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await PE()){m.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...t,debug:m.isEnabled()};n().then(()=>{try{o(a)}catch(c){m.error("Failed to start worker",c)}},c=>{m.error("Failed to start inspector",c)})},processEvent(s,i){return r(s,i)}}});function uK(t){if(t!==void 0)return t.slice(-10).reduce((e,r)=>`${e},${r.function},${r.lineno},${r.colno}`,"")}function pMe(t,e){if(e!==void 0)return uK(t(e,1))}function lK(t){let e=[],r=!1;function n(i){e=[],!r&&(r=!0,t(i))}e.push(n);function o(i){e.push(i)}function s(i){let a=e.pop()||n;try{a(i)}catch{n(i)}}return{add:o,next:s}}var kA=class t{constructor(e){this._session=e}static async create(e){if(e)return e;let r=await import("node:inspector");return new t(new r.Session)}configureAndConnect(e,r){this._session.connect(),this._session.on("Debugger.paused",n=>{e(n,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,r){this._getProperties(e,n=>{let{add:o,next:s}=lK(r);for(let i of n)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(e,r){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(n,o)=>{r(n?[]:o.result)})}_unrollArray(e,r,n,o){this._getProperties(e,s=>{n[r]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(n)})}_unrollObject(e,r,n,o){this._getProperties(e,s=>{n[r]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(n)})}_unrollOther(e,r,n){e.value&&("value"in e.value?e.value.value===void 0||e.value.value===null?r[e.name]=`<${e.value.value}>`:r[e.name]=e.value.value:"description"in e.value&&e.value.type!=="function"?r[e.name]=`<${e.value.description}>`:e.value.type==="undefined"&&(r[e.name]="<undefined>")),n(r)}},_Me="LocalVariables",dMe=((t={},e)=>{let r=new qt(20),n,o=!1;function s(a){let c=uK(a.stacktrace?.frames);if(c===void 0)return;let u=r.remove(c);if(u===void 0)return;let l=(a.stacktrace?.frames||[]).filter(p=>p.function!=="new Promise");for(let p=0;p<l.length;p++){let _=l.length-p-1,d=u[p],S=l[_];if(!S||!d)break;d.vars===void 0||S.in_app===!1||!CE(S.function,d.function)||(S.vars=d.vars)}}function i(a){for(let c of a.exception?.values||[])s(c);return a}return{name:_Me,async setupOnce(){let c=H()?.getOptions();if(!c?.includeLocalVariables)return;if(yu<18){m.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await PE()){m.warn("Local variables capture has been disabled because the debugger was already enabled");return}kA.create(e).then(l=>{function p(d,{params:{reason:S,data:f,callFrames:T}},h){if(S!=="exception"&&S!=="promiseRejection"){h();return}n?.();let A=pMe(d,f.description);if(A==null){h();return}let{add:N,next:I}=lK(O=>{r.set(A,O),h()});for(let O=0;O<Math.min(T.length,5);O++){let{scopeChain:b,functionName:v,this:X}=T[O],$=b.find(V=>V.type==="local"),De=X.className==="global"||!X.className?v:`${X.className}.${v}`;if($?.object.objectId===void 0)N(V=>{V[O]={function:De},I(V)});else{let V=$.object.objectId;N(z=>l.getLocalVariables(V,Ae=>{z[O]={function:De,vars:Ae},I(z)}))}}I([])}let _=t.captureAllExceptions!==!1;if(l.configureAndConnect((d,S)=>p(c.stackParser,d,S),_),_){let d=t.maxExceptionsPerSecond||50;n=sK(d,()=>{m.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},S=>{m.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${S} seconds.`),l.setPauseOnExceptions(!1)})}o=!0},l=>{m.log("The `LocalVariables` integration failed to start.",l)})},processEvent(a){return o?i(a):a},_getCachedFramesCount(){return r.size},_getFirstCachedFrame(){return r.values()[0]}}}),pK=dMe;var _K=(t={})=>Ws.major<19?pK(t):cK(t);var vu=require("node:fs"),bu=require("node:path");function Ra(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var FA,EMe="Modules",fMe=typeof __SENTRY_SERVER_MODULES__>"u"?{}:__SENTRY_SERVER_MODULES__,SMe=(()=>({name:EMe,processEvent(t){return t.modules={...t.modules,...dK()},t},getModules:dK})),EK=SMe;function TMe(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function mMe(){return{...fMe,...AMe(),...Ra()?hMe():{}}}function hMe(){let t=require.main?.paths||[],e=TMe(),r={},n=new Set;return e.forEach(o=>{let s=o,i=()=>{let a=s;if(s=(0,bu.dirname)(a),!s||a===s||n.has(a))return;if(t.indexOf(s)<0)return i();let c=(0,bu.join)(a,"package.json");if(n.add(a),!(0,vu.existsSync)(c))return i();try{let u=JSON.parse((0,vu.readFileSync)(c,"utf8"));r[u.name]=u.version}catch{}};i()}),r}function dK(){return FA||(FA=mMe()),FA}function gMe(){try{let t=(0,bu.join)(process.cwd(),"package.json");return JSON.parse((0,vu.readFileSync)(t,"utf8"))}catch{return{}}}function AMe(){let t=gMe();return{...t.dependencies,...t.devDependencies}}var RMe=2e3;function Lu(t){Me(()=>{console.error(t)});let e=H();if(e===void 0){Z&&m.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let r=e.getOptions(),n=r?.shutdownTimeout&&r.shutdownTimeout>0?r.shutdownTimeout:RMe;e.close(n).then(o=>{o||Z&&m.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{Z&&m.error(o)})}var OMe="OnUncaughtException",fK=(t={})=>{let e={exitEvenIfOtherHandlersAreRegistered:!1,...t};return{name:OMe,setup(r){global.process.on("uncaughtException",NMe(r,e))}}};function NMe(t,e){let n=!1,o=!1,s=!1,i,a=t.getOptions();return Object.assign(c=>{let u=Lu;e.onFatalError?u=e.onFatalError:a.onFatalError&&(u=a.onFatalError);let p=global.process.listeners("uncaughtException").filter(d=>d.name!=="domainUncaughtExceptionClear"&&d.tag!=="sentry_tracingErrorCallback"&&d._errorHandler!==!0).length===0,_=e.exitEvenIfOtherHandlersAreRegistered||p;n?_&&(s?(Z&&m.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Lu(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,n=!0,H()===t&&Dt(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"onuncaughtexception"}}),!s&&_&&(s=!0,u(c)))},{_errorHandler:!0})}var IMe="OnUnhandledRejection",PMe=((t={})=>{let e={mode:"warn",...t};return{name:IMe,setup(r){global.process.on("unhandledRejection",CMe(r,e))}}}),SK=PMe;function CMe(t,e){return function(n,o){if(H()!==t)return;let s=e.mode==="strict"?"fatal":"error",i=n&&typeof n=="object"?n._sentry_active_span:void 0;(i?c=>uu(i,c):c=>c())(()=>{Dt(n,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"onunhandledrejection"}})}),yMe(n,e.mode)}}function yMe(t,e){let r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";e==="warn"?Me(()=>{console.warn(r),console.error(t&&typeof t=="object"&&"stack"in t?t.stack:t)}):e==="strict"&&(Me(()=>{console.warn(r)}),Lu(t))}var TK=C(require("node:http"),1);var qA="Spotlight",MMe=((t={})=>{let e={sidecarUrl:t.sidecarUrl||"http://localhost:8969/stream"};return{name:qA,setup(r){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&m.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}vMe(r,e)}}}),mK=MMe;function vMe(t,e){let r=bMe(e.sidecarUrl);if(!r)return;let n=0;t.on("beforeEnvelope",o=>{if(n>3){m.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=ou(o);Qi(()=>{let i=TK.request({method:"POST",path:r.pathname,hostname:r.hostname,port:r.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(n=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{n++,m.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function bMe(t){try{return new URL(`${t}`)}catch{m.warn(`[Spotlight] Invalid sidecar URL: ${t}`);return}}var hK=C(require("node:util"),1);var LMe="NodeSystemError";function DMe(t){return!(t instanceof Error)||!("errno"in t)||typeof t.errno!="number"?!1:hK.getSystemErrorMap().has(t.errno)}var gK=(t={})=>({name:LMe,processEvent:(e,r,n)=>{if(!DMe(r.originalException))return e;let o=r.originalException,s={...o};!n.getOptions().sendDefaultPii&&t.includePaths!==!0&&(delete s.path,delete s.dest),e.contexts={...e.contexts,node_system_error:s};for(let i of e.exception?.values||[])i.value&&(o.path&&i.value.includes(o.path)&&(i.value=i.value.replace(`'${o.path}'`,"").trim()),o.dest&&i.value.includes(o.dest)&&(i.value=i.value.replace(`'${o.dest}'`,"").trim()));return e}});var jA=C(require("node:diagnostics_channel"),1);var xMe="ChildProcess",AK=(t={})=>({name:xMe,setup(){jA.channel("child_process").subscribe(e=>{e&&typeof e=="object"&&"process"in e&&UMe(e.process,t)}),jA.channel("worker_threads").subscribe(e=>{e&&typeof e=="object"&&"worker"in e&&wMe(e.worker,t)})}});function UMe(t,e){let r=!1,n;t.on("spawn",()=>{if(t.spawnfile==="/usr/bin/sw_vers"){r=!0;return}n={spawnfile:t.spawnfile},e.includeChildProcessArgs&&(n.spawnargs=t.spawnargs)}).on("exit",o=>{r||(r=!0,o!==null&&o!==0&&hr({category:"child_process",message:`Child process exited with code '${o}'`,level:o===0?"info":"warning",data:n}))}).on("error",o=>{r||(r=!0,hr({category:"child_process",message:`Child process errored with '${o.message}'`,level:"error",data:n}))})}function wMe(t,e){let r;t.on("online",()=>{r=t.threadId}).on("error",n=>{e.captureWorkerErrors!==!1?Dt(n,{mechanism:{type:"instrument",handled:!1,data:{threadId:String(r)}}}):hr({category:"worker_thread",message:`Worker thread errored with '${n.message}'`,level:"error",data:{threadId:r}})})}var IK=C(NK(),1);var XA=L$(IK.AsyncLocalStorageContextManager);M();function zA(){tr.disable(),tr.setLogger({error:m.error,warn:m.warn,info:m.log,debug:m.log,verbose:m.log},$e.DEBUG)}var KMe="ProcessSession",PK=()=>({name:KMe,setupOnce(){ld(),process.on("beforeExit",()=>{ie().getSession()?.status!=="ok"&&lu()})}});var XMe=C(require("node:http"),1),zMe=C(require("node:https"),1),MK=require("node:stream"),vK=require("node:zlib");var Yn=C(require("node:net"),1),JA=C(require("node:tls"),1);var QA=C(require("node:http"),1);var gn=Symbol("AgentBaseInternalState"),bE=class extends QA.Agent{constructor(e){super(e),this[gn]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
67
|
+
`))}}}_onResponseHeaders({request:e,response:r}){let n=this.getConfig();if(!(n.enabled!==!1))return;let s=n.breadcrumbs,i=typeof s>"u"?!0:s,a=this._ignoreOutgoingRequestsMap.get(e);i&&!a&&vye(e,r)}_subscribeToChannel(e,r){let n=yu>18||yu===18&&k$>=19,o;if(n)Aa.subscribe?.(e,r),o=()=>Aa.unsubscribe?.(e,r);else{let s=Aa.channel(e);s.subscribe(r),o=()=>s.unsubscribe(r)}this._channelSubs.push({name:e,unsubscribe:o})}_shouldIgnoreOutgoingRequest(e){if((0,q$.isTracingSuppressed)(F.active()))return!0;let r=BA(e.origin,e.path),n=this.getConfig().ignoreOutgoingRequests;return typeof n!="function"||!r?!1:n(r)}};function vye(t,e){let r=bye(t),n=e.statusCode,o=du(n);sr({category:"http",data:{status_code:n,...r},type:"http",level:o},{event:"response",request:t,response:e})}function bye(t){try{let e=BA(t.origin,t.path),r=Mo(e),n={url:vo(r),"http.method":t.method||"GET"};return r.search&&(n["http.query"]=r.search),r.hash&&(n["http.fragment"]=r.hash),n}catch{return{}}}function BA(t,e="/"){try{return new URL(e,t).toString()}catch{let r=`${t}`;return r.endsWith("/")&&e.startsWith("/")?`${r}${e.slice(1)}`:!r.endsWith("/")&&!e.startsWith("/")?`${r}/${e.slice(1)}`:`${r}${e}`}}var Lye="NodeFetch",Dye=B(`${Lye}.sentry`,Xs,t=>t),xye=((t={})=>({name:"NodeFetch",setupOnce(){Dye(t)}})),Y$=xye;var K$=require("node:child_process"),NE=require("node:fs"),it=C(require("node:os"),1),W$=require("node:path"),GA=require("node:util");var Uye=(0,GA.promisify)(NE.readFile),wye=(0,GA.promisify)(NE.readdir),Vye="Context",Bye=((t={})=>{let e,r={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...t};async function n(s){e===void 0&&(e=o());let i=Gye(await e);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(r.os&&(s.os=await Hye()),r.app&&(s.app=Fye()),r.device&&(s.device=qye(r.device)),r.culture){let i=kye();i&&(s.culture=i)}return r.cloudResource&&(s.cloud_resource=Xye()),s}return{name:Vye,processEvent(s){return n(s)}}}),X$=Bye;function Gye(t){if(t.app?.app_memory&&(t.app.app_memory=process.memoryUsage().rss),t.app?.free_memory&&typeof process.availableMemory=="function"){let e=process.availableMemory?.();e!=null&&(t.app.free_memory=e)}return t.device?.free_memory&&(t.device.free_memory=it.freemem()),t}async function Hye(){let t=it.platform();switch(t){case"darwin":return Kye();case"linux":return Wye();default:return{name:jye[t]||t,version:it.release()}}}function kye(){try{if(typeof process.versions.icu!="string")return;let t=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(t)==="enero"){let r=Intl.DateTimeFormat().resolvedOptions();return{locale:r.locale,timezone:r.timeZone}}}catch{}}function Fye(){let t=process.memoryUsage().rss,r={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:t};if(typeof process.availableMemory=="function"){let n=process.availableMemory?.();n!=null&&(r.free_memory=n)}return r}function qye(t){let e={},r;try{r=it.uptime()}catch{}if(typeof r=="number"&&(e.boot_time=new Date(Date.now()-r*1e3).toISOString()),e.arch=it.arch(),(t===!0||t.memory)&&(e.memory_size=it.totalmem(),e.free_memory=it.freemem()),t===!0||t.cpu){let n=it.cpus(),o=n?.[0];o&&(e.processor_count=n.length,e.cpu_description=o.model,e.processor_frequency=o.speed)}return e}var jye={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows"},Yye=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],$ye={alpine:t=>t,arch:t=>hn(/distrib_release=(.*)/,t),centos:t=>hn(/release ([^ ]+)/,t),debian:t=>t,fedora:t=>hn(/release (..)/,t),mint:t=>hn(/distrib_release=(.*)/,t),red:t=>hn(/release ([^ ]+)/,t),suse:t=>hn(/VERSION = (.*)\n/,t),ubuntu:t=>hn(/distrib_release=(.*)/,t)};function hn(t,e){let r=t.exec(e);return r?r[1]:void 0}async function Kye(){let t={kernel_version:it.release(),name:"Mac OS X",version:`10.${Number(it.release().split(".")[0])-4}`};try{let e=await new Promise((r,n)=>{(0,K$.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){n(o);return}r(s)})});t.name=hn(/^ProductName:\s+(.*)$/m,e),t.version=hn(/^ProductVersion:\s+(.*)$/m,e),t.build=hn(/^BuildVersion:\s+(.*)$/m,e)}catch{}return t}function $$(t){return t.split(" ")[0].toLowerCase()}async function Wye(){let t={kernel_version:it.release(),name:"Linux"};try{let e=await wye("/etc"),r=Yye.find(a=>e.includes(a.name));if(!r)return t;let n=(0,W$.join)("/etc",r.name),o=(await Uye(n,{encoding:"utf-8"})).toLowerCase(),{distros:s}=r;t.name=s.find(a=>o.indexOf($$(a))>=0)||s[0];let i=$$(t.name);t.version=$ye[i]?.(o)}catch{}return t}function Xye(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}var J$=require("node:fs"),Z$=require("node:readline");var HA=new qt(10),eK=new qt(20),zye=7,Qye="ContextLines",Jye=1e3,Zye=1e4;function eMe(t,e,r){let n=t.get(e);return n===void 0?(t.set(e,r),r):n}function tMe(t){return!!(t.startsWith("node:")||t.endsWith(".min.js")||t.endsWith(".min.cjs")||t.endsWith(".min.mjs")||t.startsWith("data:"))}function rMe(t){return t.lineno!==void 0&&t.lineno>Zye||t.colno!==void 0&&t.colno>Jye}function nMe(t,e){let r=HA.get(t);if(r===void 0)return!1;for(let n=e[0];n<=e[1];n++)if(r[n]===void 0)return!1;return!0}function oMe(t,e){if(!t.length)return[];let r=0,n=t[0];if(typeof n!="number")return[];let o=Q$(n,e),s=[];for(;;){if(r===t.length-1){s.push(o);break}let i=t[r+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+e:(s.push(o),o=Q$(i,e)),r++}return s}function sMe(t,e,r){return new Promise((n,o)=>{let s=(0,J$.createReadStream)(t),i=(0,Z$.createInterface)({input:s});function a(){s.destroy(),n()}let c=0,u=0,l=e[u];if(l===void 0){a();return}let p=l[0],_=l[1];function d(S){eK.set(t,1),Z&&m.error(`Failed to read file: ${t}. Error: ${S}`),i.close(),i.removeAllListeners(),a()}s.on("error",d),i.on("error",d),i.on("close",a),i.on("line",S=>{if(c++,!(c<p)&&(r[c]=uh(S,0),c>=_)){if(u===e.length-1){i.close(),i.removeAllListeners();return}u++;let f=e[u];if(f===void 0){i.close(),i.removeAllListeners();return}p=f[0],_=f[1]}})})}async function iMe(t,e){let r={};if(e>0&&t.exception?.values){for(let s of t.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||tMe(c)||rMe(a))continue;r[c]||(r[c]=[]),r[c].push(a.lineno)}}let n=Object.keys(r);if(n.length==0)return t;let o=[];for(let s of n){if(eK.get(s))continue;let i=r[s];if(!i)continue;i.sort((u,l)=>u-l);let a=oMe(i,e);if(a.every(u=>nMe(s,u)))continue;let c=eMe(HA,s,{});o.push(sMe(s,a,c))}if(await Promise.all(o).catch(()=>{Z&&m.log("Failed to read one or more source files and resolve context lines")}),e>0&&t.exception?.values)for(let s of t.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&aMe(s.stacktrace.frames,e,HA);return t}function aMe(t,e,r){for(let n of t)if(n.filename&&n.context_line===void 0&&typeof n.lineno=="number"){let o=r.get(n.filename);if(o===void 0)continue;cMe(n.lineno,n,e,o)}}function z$(t){delete t.pre_context,delete t.context_line,delete t.post_context}function cMe(t,e,r,n){if(e.lineno===void 0||n===void 0){Z&&m.error("Cannot resolve context for frame with no lineno or file contents");return}e.pre_context=[];for(let s=tK(t,r);s<t;s++){let i=n[s];if(i===void 0){z$(e),Z&&m.error(`Could not find line ${s} in file ${e.filename}`);return}e.pre_context.push(i)}if(n[t]===void 0){z$(e),Z&&m.error(`Could not find line ${t} in file ${e.filename}`);return}e.context_line=n[t];let o=rK(t,r);e.post_context=[];for(let s=t+1;s<=o;s++){let i=n[s];if(i===void 0)break;e.post_context.push(i)}}function tK(t,e){return Math.max(1,t-e)}function rK(t,e){return t+e}function Q$(t,e){return[tK(t,e),rK(t,e)]}var uMe=((t={})=>{let e=t.frameContextLines!==void 0?t.frameContextLines:zye;return{name:Qye,processEvent(r){return iMe(r,e)}}}),nK=uMe;var aK=require("node:worker_threads");var IE;async function PE(){if(IE===void 0)try{IE=!!(await import("node:inspector")).url()}catch{IE=!1}return IE}var Mu="__SENTRY_ERROR_LOCAL_VARIABLES__";function sK(t,e,r){let n=0,o=5,s=0;return setInterval(()=>{s===0?n>t&&(o*=2,r(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&e()),n=0},1e3).unref(),()=>{n+=1}}function oK(t){return t!==void 0&&(t.length===0||t==="?"||t==="<anonymous>")}function CE(t,e){return t===e||`Object.${t}`===e||t===`Object.${e}`||oK(t)&&oK(e)}var lMe="LyohIEBzZW50cnkvbm9kZS1jb3JlIDkuNDcuMSAoNDExZTEwMikgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIGV9ZnJvbSJub2RlOmluc3BlY3Rvci9wcm9taXNlcyI7aW1wb3J0e3dvcmtlckRhdGEgYXMgdH1mcm9tIm5vZGU6d29ya2VyX3RocmVhZHMiO2NvbnN0IG49Z2xvYmFsVGhpcyxpPXt9O2NvbnN0IG89Il9fU0VOVFJZX0VSUk9SX0xPQ0FMX1ZBUklBQkxFU19fIjtjb25zdCBhPXQ7ZnVuY3Rpb24gcyguLi5lKXthLmRlYnVnJiZmdW5jdGlvbihlKXtpZighKCJjb25zb2xlImluIG4pKXJldHVybiBlKCk7Y29uc3QgdD1uLmNvbnNvbGUsbz17fSxhPU9iamVjdC5rZXlzKGkpO2EuZm9yRWFjaChlPT57Y29uc3Qgbj1pW2VdO29bZV09dFtlXSx0W2VdPW59KTt0cnl7cmV0dXJuIGUoKX1maW5hbGx5e2EuZm9yRWFjaChlPT57dFtlXT1vW2VdfSl9fSgoKT0+Y29uc29sZS5sb2coIltMb2NhbFZhcmlhYmxlcyBXb3JrZXJdIiwuLi5lKSl9YXN5bmMgZnVuY3Rpb24gYyhlLHQsbixpKXtjb25zdCBvPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6dCxvd25Qcm9wZXJ0aWVzOiEwfSk7aVtuXT1vLnJlc3VsdC5maWx0ZXIoZT0+Imxlbmd0aCIhPT1lLm5hbWUmJiFpc05hTihwYXJzZUludChlLm5hbWUsMTApKSkuc29ydCgoZSx0KT0+cGFyc2VJbnQoZS5uYW1lLDEwKS1wYXJzZUludCh0Lm5hbWUsMTApKS5tYXAoZT0+ZS52YWx1ZT8udmFsdWUpfWFzeW5jIGZ1bmN0aW9uIHIoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQubWFwKGU9PltlLm5hbWUsZS52YWx1ZT8udmFsdWVdKS5yZWR1Y2UoKGUsW3Qsbl0pPT4oZVt0XT1uLGUpLHt9KX1mdW5jdGlvbiB1KGUsdCl7ZS52YWx1ZSYmKCJ2YWx1ZSJpbiBlLnZhbHVlP3ZvaWQgMD09PWUudmFsdWUudmFsdWV8fG51bGw9PT1lLnZhbHVlLnZhbHVlP3RbZS5uYW1lXT1gPCR7ZS52YWx1ZS52YWx1ZX0+YDp0W2UubmFtZV09ZS52YWx1ZS52YWx1ZToiZGVzY3JpcHRpb24iaW4gZS52YWx1ZSYmImZ1bmN0aW9uIiE9PWUudmFsdWUudHlwZT90W2UubmFtZV09YDwke2UudmFsdWUuZGVzY3JpcHRpb259PmA6InVuZGVmaW5lZCI9PT1lLnZhbHVlLnR5cGUmJih0W2UubmFtZV09Ijx1bmRlZmluZWQ+IikpfWFzeW5jIGZ1bmN0aW9uIGwoZSx0KXtjb25zdCBuPWF3YWl0IGUucG9zdCgiUnVudGltZS5nZXRQcm9wZXJ0aWVzIix7b2JqZWN0SWQ6dCxvd25Qcm9wZXJ0aWVzOiEwfSksaT17fTtmb3IoY29uc3QgdCBvZiBuLnJlc3VsdClpZih0LnZhbHVlPy5vYmplY3RJZCYmIkFycmF5Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgYyhlLG4sdC5uYW1lLGkpfWVsc2UgaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJPYmplY3QiPT09dC52YWx1ZS5jbGFzc05hbWUpe2NvbnN0IG49dC52YWx1ZS5vYmplY3RJZDthd2FpdCByKGUsbix0Lm5hbWUsaSl9ZWxzZSB0LnZhbHVlJiZ1KHQsaSk7cmV0dXJuIGl9bGV0IGY7KGFzeW5jIGZ1bmN0aW9uKCl7Y29uc3QgdD1uZXcgZTt0LmNvbm5lY3RUb01haW5UaHJlYWQoKSxzKCJDb25uZWN0ZWQgdG8gbWFpbiB0aHJlYWQiKTtsZXQgbj0hMTt0Lm9uKCJEZWJ1Z2dlci5yZXN1bWVkIiwoKT0+e249ITF9KSx0Lm9uKCJEZWJ1Z2dlci5wYXVzZWQiLGU9PntuPSEwLGFzeW5jIGZ1bmN0aW9uKGUse3JlYXNvbjp0LGRhdGE6e29iamVjdElkOm59LGNhbGxGcmFtZXM6aX0pe2lmKCJleGNlcHRpb24iIT09dCYmInByb21pc2VSZWplY3Rpb24iIT09dClyZXR1cm47aWYoZj8uKCksbnVsbD09bilyZXR1cm47Y29uc3QgYT1bXTtmb3IobGV0IHQ9MDt0PGkubGVuZ3RoO3QrKyl7Y29uc3R7c2NvcGVDaGFpbjpuLGZ1bmN0aW9uTmFtZTpvLHRoaXM6c309aVt0XSxjPW4uZmluZChlPT4ibG9jYWwiPT09ZS50eXBlKSxyPSJnbG9iYWwiIT09cy5jbGFzc05hbWUmJnMuY2xhc3NOYW1lP2Ake3MuY2xhc3NOYW1lfS4ke299YDpvO2lmKHZvaWQgMD09PWM/Lm9iamVjdC5vYmplY3RJZClhW3RdPXtmdW5jdGlvbjpyfTtlbHNle2NvbnN0IG49YXdhaXQgbChlLGMub2JqZWN0Lm9iamVjdElkKTthW3RdPXtmdW5jdGlvbjpyLHZhcnM6bn19fWF3YWl0IGUucG9zdCgiUnVudGltZS5jYWxsRnVuY3Rpb25PbiIse2Z1bmN0aW9uRGVjbGFyYXRpb246YGZ1bmN0aW9uKCkgeyB0aGlzLiR7b30gPSB0aGlzLiR7b30gfHwgJHtKU09OLnN0cmluZ2lmeShhKX07IH1gLHNpbGVudDohMCxvYmplY3RJZDpufSksYXdhaXQgZS5wb3N0KCJSdW50aW1lLnJlbGVhc2VPYmplY3QiLHtvYmplY3RJZDpufSl9KHQsZS5wYXJhbXMpLnRoZW4oYXN5bmMoKT0+e24mJmF3YWl0IHQucG9zdCgiRGVidWdnZXIucmVzdW1lIil9LGFzeW5jIGU9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSl9KSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLmVuYWJsZSIpO2NvbnN0IGk9ITEhPT1hLmNhcHR1cmVBbGxFeGNlcHRpb25zO2lmKGF3YWl0IHQucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZTppPyJhbGwiOiJ1bmNhdWdodCJ9KSxpKXtjb25zdCBlPWEubWF4RXhjZXB0aW9uc1BlclNlY29uZHx8NTA7Zj1mdW5jdGlvbihlLHQsbil7bGV0IGk9MCxvPTUsYT0wO3JldHVybiBzZXRJbnRlcnZhbCgoKT0+ezA9PT1hP2k+ZSYmKG8qPTIsbihvKSxvPjg2NDAwJiYobz04NjQwMCksYT1vKTooYS09MSwwPT09YSYmdCgpKSxpPTB9LDFlMykudW5yZWYoKSwoKT0+e2krPTF9fShlLGFzeW5jKCk9PntzKCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0sYXN5bmMgZT0+e3MoYFJhdGUtbGltaXQgZXhjZWVkZWQuIERpc2FibGluZyBjYXB0dXJpbmcgb2YgY2F1Z2h0IGV4Y2VwdGlvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSl9fSkoKS5jYXRjaChlPT57cygiRmFpbGVkIHRvIHN0YXJ0IGRlYnVnZ2VyIixlKX0pLHNldEludGVydmFsKCgpPT57fSwxZTQpOw==";function iK(...t){m.log("[LocalVariables]",...t)}var cK=((t={})=>{function e(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,l=i[c],p=a[u];if(!p||!l)break;l.vars===void 0||p.in_app===!1||!CE(p.function,l.function)||(p.vars=l.vars)}}function r(s,i){if(i.originalException&&typeof i.originalException=="object"&&Mu in i.originalException&&Array.isArray(i.originalException[Mu])){for(let a of s.exception?.values||[])e(a,i.originalException[Mu]);i.originalException[Mu]=void 0}return s}async function n(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new aK.Worker(new URL(`data:application/javascript;base64,${lMe}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{iK("Worker error",a)}),i.once("exit",a=>{iK("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await PE()){m.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...t,debug:m.isEnabled()};n().then(()=>{try{o(a)}catch(c){m.error("Failed to start worker",c)}},c=>{m.error("Failed to start inspector",c)})},processEvent(s,i){return r(s,i)}}});function uK(t){if(t!==void 0)return t.slice(-10).reduce((e,r)=>`${e},${r.function},${r.lineno},${r.colno}`,"")}function pMe(t,e){if(e!==void 0)return uK(t(e,1))}function lK(t){let e=[],r=!1;function n(i){e=[],!r&&(r=!0,t(i))}e.push(n);function o(i){e.push(i)}function s(i){let a=e.pop()||n;try{a(i)}catch{n(i)}}return{add:o,next:s}}var kA=class t{constructor(e){this._session=e}static async create(e){if(e)return e;let r=await import("node:inspector");return new t(new r.Session)}configureAndConnect(e,r){this._session.connect(),this._session.on("Debugger.paused",n=>{e(n,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"})}setPauseOnExceptions(e){this._session.post("Debugger.setPauseOnExceptions",{state:e?"all":"uncaught"})}getLocalVariables(e,r){this._getProperties(e,n=>{let{add:o,next:s}=lK(r);for(let i of n)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(e,r){this._session.post("Runtime.getProperties",{objectId:e,ownProperties:!0},(n,o)=>{r(n?[]:o.result)})}_unrollArray(e,r,n,o){this._getProperties(e,s=>{n[r]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(n)})}_unrollObject(e,r,n,o){this._getProperties(e,s=>{n[r]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(n)})}_unrollOther(e,r,n){e.value&&("value"in e.value?e.value.value===void 0||e.value.value===null?r[e.name]=`<${e.value.value}>`:r[e.name]=e.value.value:"description"in e.value&&e.value.type!=="function"?r[e.name]=`<${e.value.description}>`:e.value.type==="undefined"&&(r[e.name]="<undefined>")),n(r)}},_Me="LocalVariables",dMe=((t={},e)=>{let r=new qt(20),n,o=!1;function s(a){let c=uK(a.stacktrace?.frames);if(c===void 0)return;let u=r.remove(c);if(u===void 0)return;let l=(a.stacktrace?.frames||[]).filter(p=>p.function!=="new Promise");for(let p=0;p<l.length;p++){let _=l.length-p-1,d=u[p],S=l[_];if(!S||!d)break;d.vars===void 0||S.in_app===!1||!CE(S.function,d.function)||(S.vars=d.vars)}}function i(a){for(let c of a.exception?.values||[])s(c);return a}return{name:_Me,async setupOnce(){let c=H()?.getOptions();if(!c?.includeLocalVariables)return;if(yu<18){m.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await PE()){m.warn("Local variables capture has been disabled because the debugger was already enabled");return}kA.create(e).then(l=>{function p(d,{params:{reason:S,data:f,callFrames:T}},h){if(S!=="exception"&&S!=="promiseRejection"){h();return}n?.();let A=pMe(d,f.description);if(A==null){h();return}let{add:N,next:I}=lK(O=>{r.set(A,O),h()});for(let O=0;O<Math.min(T.length,5);O++){let{scopeChain:b,functionName:v,this:X}=T[O],$=b.find(V=>V.type==="local"),De=X.className==="global"||!X.className?v:`${X.className}.${v}`;if($?.object.objectId===void 0)N(V=>{V[O]={function:De},I(V)});else{let V=$.object.objectId;N(z=>l.getLocalVariables(V,Ae=>{z[O]={function:De,vars:Ae},I(z)}))}}I([])}let _=t.captureAllExceptions!==!1;if(l.configureAndConnect((d,S)=>p(c.stackParser,d,S),_),_){let d=t.maxExceptionsPerSecond||50;n=sK(d,()=>{m.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},S=>{m.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${S} seconds.`),l.setPauseOnExceptions(!1)})}o=!0},l=>{m.log("The `LocalVariables` integration failed to start.",l)})},processEvent(a){return o?i(a):a},_getCachedFramesCount(){return r.size},_getFirstCachedFrame(){return r.values()[0]}}}),pK=dMe;var _K=(t={})=>Ws.major<19?pK(t):cK(t);var vu=require("node:fs"),bu=require("node:path");function Ra(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var FA,EMe="Modules",fMe=typeof __SENTRY_SERVER_MODULES__>"u"?{}:__SENTRY_SERVER_MODULES__,SMe=(()=>({name:EMe,processEvent(t){return t.modules={...t.modules,...dK()},t},getModules:dK})),EK=SMe;function TMe(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function mMe(){return{...fMe,...AMe(),...Ra()?hMe():{}}}function hMe(){let t=require.main?.paths||[],e=TMe(),r={},n=new Set;return e.forEach(o=>{let s=o,i=()=>{let a=s;if(s=(0,bu.dirname)(a),!s||a===s||n.has(a))return;if(t.indexOf(s)<0)return i();let c=(0,bu.join)(a,"package.json");if(n.add(a),!(0,vu.existsSync)(c))return i();try{let u=JSON.parse((0,vu.readFileSync)(c,"utf8"));r[u.name]=u.version}catch{}};i()}),r}function dK(){return FA||(FA=mMe()),FA}function gMe(){try{let t=(0,bu.join)(process.cwd(),"package.json");return JSON.parse((0,vu.readFileSync)(t,"utf8"))}catch{return{}}}function AMe(){let t=gMe();return{...t.dependencies,...t.devDependencies}}var RMe=2e3;function Lu(t){Me(()=>{console.error(t)});let e=H();if(e===void 0){Z&&m.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let r=e.getOptions(),n=r?.shutdownTimeout&&r.shutdownTimeout>0?r.shutdownTimeout:RMe;e.close(n).then(o=>{o||Z&&m.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{Z&&m.error(o)})}var OMe="OnUncaughtException",fK=(t={})=>{let e={exitEvenIfOtherHandlersAreRegistered:!1,...t};return{name:OMe,setup(r){global.process.on("uncaughtException",NMe(r,e))}}};function NMe(t,e){let n=!1,o=!1,s=!1,i,a=t.getOptions();return Object.assign(c=>{let u=Lu;e.onFatalError?u=e.onFatalError:a.onFatalError&&(u=a.onFatalError);let p=global.process.listeners("uncaughtException").filter(d=>d.name!=="domainUncaughtExceptionClear"&&d.tag!=="sentry_tracingErrorCallback"&&d._errorHandler!==!0).length===0,_=e.exitEvenIfOtherHandlersAreRegistered||p;n?_&&(s?(Z&&m.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Lu(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,n=!0,H()===t&&Dt(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"onuncaughtexception"}}),!s&&_&&(s=!0,u(c)))},{_errorHandler:!0})}var IMe="OnUnhandledRejection",PMe=((t={})=>{let e={mode:"warn",...t};return{name:IMe,setup(r){global.process.on("unhandledRejection",CMe(r,e))}}}),SK=PMe;function CMe(t,e){return function(n,o){if(H()!==t)return;let s=e.mode==="strict"?"fatal":"error",i=n&&typeof n=="object"?n._sentry_active_span:void 0;(i?c=>uu(i,c):c=>c())(()=>{Dt(n,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"onunhandledrejection"}})}),yMe(n,e.mode)}}function yMe(t,e){let r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";e==="warn"?Me(()=>{console.warn(r),console.error(t&&typeof t=="object"&&"stack"in t?t.stack:t)}):e==="strict"&&(Me(()=>{console.warn(r)}),Lu(t))}var TK=C(require("node:http"),1);var qA="Spotlight",MMe=((t={})=>{let e={sidecarUrl:t.sidecarUrl||"http://localhost:8969/stream"};return{name:qA,setup(r){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&m.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}vMe(r,e)}}}),mK=MMe;function vMe(t,e){let r=bMe(e.sidecarUrl);if(!r)return;let n=0;t.on("beforeEnvelope",o=>{if(n>3){m.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=ou(o);Qi(()=>{let i=TK.request({method:"POST",path:r.pathname,hostname:r.hostname,port:r.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(n=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{n++,m.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function bMe(t){try{return new URL(`${t}`)}catch{m.warn(`[Spotlight] Invalid sidecar URL: ${t}`);return}}var hK=C(require("node:util"),1);var LMe="NodeSystemError";function DMe(t){return!(t instanceof Error)||!("errno"in t)||typeof t.errno!="number"?!1:hK.getSystemErrorMap().has(t.errno)}var gK=(t={})=>({name:LMe,processEvent:(e,r,n)=>{if(!DMe(r.originalException))return e;let o=r.originalException,s={...o};!n.getOptions().sendDefaultPii&&t.includePaths!==!0&&(delete s.path,delete s.dest),e.contexts={...e.contexts,node_system_error:s};for(let i of e.exception?.values||[])i.value&&(o.path&&i.value.includes(o.path)&&(i.value=i.value.replace(`'${o.path}'`,"").trim()),o.dest&&i.value.includes(o.dest)&&(i.value=i.value.replace(`'${o.dest}'`,"").trim()));return e}});var jA=C(require("node:diagnostics_channel"),1);var xMe="ChildProcess",AK=(t={})=>({name:xMe,setup(){jA.channel("child_process").subscribe(e=>{e&&typeof e=="object"&&"process"in e&&UMe(e.process,t)}),jA.channel("worker_threads").subscribe(e=>{e&&typeof e=="object"&&"worker"in e&&wMe(e.worker,t)})}});function UMe(t,e){let r=!1,n;t.on("spawn",()=>{if(t.spawnfile==="/usr/bin/sw_vers"){r=!0;return}n={spawnfile:t.spawnfile},e.includeChildProcessArgs&&(n.spawnargs=t.spawnargs)}).on("exit",o=>{r||(r=!0,o!==null&&o!==0&&sr({category:"child_process",message:`Child process exited with code '${o}'`,level:o===0?"info":"warning",data:n}))}).on("error",o=>{r||(r=!0,sr({category:"child_process",message:`Child process errored with '${o.message}'`,level:"error",data:n}))})}function wMe(t,e){let r;t.on("online",()=>{r=t.threadId}).on("error",n=>{e.captureWorkerErrors!==!1?Dt(n,{mechanism:{type:"instrument",handled:!1,data:{threadId:String(r)}}}):sr({category:"worker_thread",message:`Worker thread errored with '${n.message}'`,level:"error",data:{threadId:r}})})}var IK=C(NK(),1);var XA=L$(IK.AsyncLocalStorageContextManager);M();function zA(){tr.disable(),tr.setLogger({error:m.error,warn:m.warn,info:m.log,debug:m.log,verbose:m.log},$e.DEBUG)}var KMe="ProcessSession",PK=()=>({name:KMe,setupOnce(){ld(),process.on("beforeExit",()=>{ie().getSession()?.status!=="ok"&&lu()})}});var XMe=C(require("node:http"),1),zMe=C(require("node:https"),1),MK=require("node:stream"),vK=require("node:zlib");var Yn=C(require("node:net"),1),JA=C(require("node:tls"),1);var QA=C(require("node:http"),1);var gn=Symbol("AgentBaseInternalState"),bE=class extends QA.Agent{constructor(e){super(e),this[gn]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint=="boolean")return e.secureEndpoint;if(typeof e.protocol=="string")return e.protocol==="https:"}let{stack:r}=new Error;return typeof r!="string"?!1:r.split(`
|
|
68
68
|
`).some(n=>n.indexOf("(https.js:")!==-1||n.indexOf("node:https:")!==-1)}createSocket(e,r,n){let o={...r,secureEndpoint:this.isSecureEndpoint(r)};Promise.resolve().then(()=>this.connect(e,o)).then(s=>{if(s instanceof QA.Agent)return s.addRequest(e,o);this[gn].currentSocket=s,super.createSocket(e,r,n)},n)}createConnection(){let e=this[gn].currentSocket;if(this[gn].currentSocket=void 0,!e)throw new Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[gn].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(e){this[gn]&&(this[gn].defaultPort=e)}get protocol(){return this[gn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(e){this[gn]&&(this[gn].protocol=e)}};function LE(...t){m.log("[https-proxy-agent:parse-proxy-response]",...t)}function CK(t){return new Promise((e,r)=>{let n=0,o=[];function s(){let l=t.read();l?u(l):t.once("readable",s)}function i(){t.removeListener("end",a),t.removeListener("error",c),t.removeListener("readable",s)}function a(){i(),LE("onend"),r(new Error("Proxy connection ended before receiving CONNECT response"))}function c(l){i(),LE("onerror %o",l),r(l)}function u(l){o.push(l),n+=l.length;let p=Buffer.concat(o,n),_=p.indexOf(`\r
|
|
69
69
|
\r
|
|
70
70
|
`);if(_===-1){LE("have not received end of HTTP headers yet..."),s();return}let d=p.subarray(0,_).toString("ascii").split(`\r
|
|
71
71
|
`),S=d.shift();if(!S)return t.destroy(),r(new Error("No header received from proxy CONNECT response"));let f=S.split(" "),T=+(f[1]||0),h=f.slice(2).join(" "),A={};for(let N of d){if(!N)continue;let I=N.indexOf(":");if(I===-1)return t.destroy(),r(new Error(`Invalid header from proxy CONNECT response: "${N}"`));let O=N.slice(0,I).toLowerCase(),b=N.slice(I+1).trimStart(),v=A[O];typeof v=="string"?A[O]=[v,b]:Array.isArray(v)?v.push(b):A[O]=b}LE("got proxy server response: %o %o",S,A),i(),e({connect:{statusCode:T,statusText:h,headers:A},buffered:p})}t.on("error",c),t.on("end",a),s()})}function Du(...t){m.log("[https-proxy-agent]",...t)}var xu=class extends bE{static __initStatic(){this.protocols=["http","https"]}constructor(e,r){super(r),this.options={},this.proxy=typeof e=="string"?new URL(e):e,this.proxyHeaders=r?.headers??{},Du("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...r?yK(r,"headers"):null,host:n,port:o}}async connect(e,r){let{proxy:n}=this;if(!r.host)throw new TypeError('No "host" provided');let o;if(n.protocol==="https:"){Du("Creating `tls.Socket`: %o",this.connectOpts);let _=this.connectOpts.servername||this.connectOpts.host;o=JA.connect({...this.connectOpts,servername:_&&Yn.isIP(_)?void 0:_})}else Du("Creating `net.Socket`: %o",this.connectOpts),o=Yn.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=Yn.isIPv6(r.host)?`[${r.host}]`:r.host,a=`CONNECT ${i}:${r.port} HTTP/1.1\r
|
|
72
72
|
`;if(n.username||n.password){let _=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(_).toString("base64")}`}s.Host=`${i}:${r.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let _ of Object.keys(s))a+=`${_}: ${s[_]}\r
|
|
73
73
|
`;let c=CK(o);o.write(`${a}\r
|
|
74
|
-
`);let{connect:u,buffered:l}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",WMe),r.secureEndpoint){Du("Upgrading socket connection to TLS");let _=r.servername||r.host;return JA.connect({...yK(r,"host","path","port"),socket:o,servername:Yn.isIP(_)?void 0:_})}return o}o.destroy();let p=new Yn.Socket({writable:!1});return p.readable=!0,e.once("socket",_=>{Du("Replaying proxy buffer for failed request"),_.push(l),_.push(null)}),p}};xu.__initStatic();function WMe(t){t.resume()}function yK(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}var QMe=1024*32;function JMe(t){return new MK.Readable({read(){this.push(t),this.push(null)}})}function bK(t){let e;try{e=new URL(t.url)}catch{return Me(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),_u(t,()=>Promise.resolve({}))}let r=e.protocol==="https:",n=ZMe(e,t.proxy||(r?process.env.https_proxy:void 0)||process.env.http_proxy),o=r?zMe:XMe,s=t.keepAlive===void 0?!1:t.keepAlive,i=n?new xu(n):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=eve(t,t.httpModule??o,i);return _u(t,a)}function ZMe(t,e){let{no_proxy:r}=process.env;if(!r?.split(",").some(o=>t.host.endsWith(o)||t.hostname.endsWith(o)))return e}function eve(t,e,r){let{hostname:n,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(u){return new Promise((l,p)=>{Qi(()=>{let _=JMe(u.body),d={...t.headers};u.body.length>QMe&&(d["content-encoding"]="gzip",_=_.pipe((0,vK.createGzip)()));let S=e.request({method:"POST",agent:r,headers:d,hostname:n,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},f=>{f.on("data",()=>{}),f.on("end",()=>{}),f.setEncoding("utf8");let T=f.headers["retry-after"]??null,h=f.headers["x-sentry-rate-limits"]??null;l({statusCode:f.statusCode,headers:{"retry-after":T,"x-sentry-rate-limits":Array.isArray(h)?h[0]||null:h}})});S.on("error",p),_.pipe(S)})})}}var tve=new Set(["false","f","n","no","off","0"]),rve=new Set(["true","t","y","yes","on","1"]);function DE(t,e){let r=String(t).toLowerCase();return tve.has(r)?!1:rve.has(r)?!0:e?.strict?null:!!t}var xE=require("node:path");function LK(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function DK(t=process.argv[1]?Wh(process.argv[1]):process.cwd(),e=xE.sep==="\\"){let r=e?LK(t):t;return n=>{if(!n)return;let o=e?LK(n):n,{dir:s,base:i,ext:a}=xE.posix.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(r)){let l=s.slice(r.length+1).replace(/\//g,".");return l?`${l}:${c}`:c}return c}}function xK(t){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(j.SENTRY_RELEASE?.id)return j.SENTRY_RELEASE.id;let e=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,r=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,n=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return e||r||n||t}var UK=U_(og(DK()));var wK=C(require("node:os"),1);M();var VK=C(ee(),1);var wE=require("worker_threads");var nve=6e4,UE=class extends pu{constructor(e){let r=e.includeServerName===!1?void 0:e.serverName||global.process.env.SENTRY_NAME||wK.hostname(),n={...e,platform:"node",runtime:{name:"node",version:global.process.version},serverName:r};e.openTelemetryInstrumentations&&(0,VK.registerInstrumentations)({instrumentations:e.openTelemetryInstrumentations}),Gs(n,"node"),m.log(`Initializing Sentry: process: ${process.pid}, thread: ${wE.isMainThread?"main":`worker-${wE.threadId}`}.`),super(n);let{enableLogs:o,_experiments:s}=this.getOptions();(o??s?.enableLogs)&&(this._logOnExitFlushListener=()=>{Bs(this)},r&&this.on("beforeCaptureLog",a=>{a.attributes={...a.attributes,"server.address":r}}),process.on("beforeExit",this._logOnExitFlushListener))}get tracer(){if(this._tracer)return this._tracer;let e="@sentry/node",r=pe,n=K.getTracer(e,r);return this._tracer=n,n}async flush(e){return await this.traceProvider?.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(e)}close(e){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(e)}startClientReportTracking(){let e=this.getOptions();e.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{Z&&m.log("Flushing client reports based on interval."),this._flushOutcomes()},e.clientReportFlushInterval??nve).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}_getTraceInfoFromScope(e){return e?M$(this,e):[void 0,void 0]}};var BK=C(I_(),1),GK=C(require("module"),1),ove={};function HK(){let[t=0,e=0]=process.versions.node.split(".").map(Number);if(t>=21||t===20&&e>=6||t===18&&e>=19){if(!j._sentryEsmLoaderHookRegistered)try{let{addHookMessagePort:r}=(0,BK.createAddHookMessageChannel)();GK.default.register("import-in-the-middle/hook.mjs",ove.url,{data:{addHookMessagePort:r,include:[]},transferList:[r]})}catch(r){m.warn("Failed to register ESM hook",r)}}else Me(()=>{console.warn(`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`)})}function VE(){return[Td(),fd(),md(),hd(),gK(),gd(),H$(),Y$(),fK(),SK(),nK(),_K(),X$(),AK(),PK(),EK()]}function ZA(t={}){return sve(t,VE)}function sve(t={},e){let r=ive(t,e);r.debug===!0&&(Z?m.enable():Me(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),!Ra()&&r.registerEsmLoaderHooks!==!1&&HK(),b$(),Q().update(r.initialScope),r.spotlight&&!r.integrations.some(({name:s})=>s===qA)&&r.integrations.push(mK({sidecarUrl:typeof r.spotlight=="string"?r.spotlight:void 0})),Gs(r,"node-core");let o=new UE(r);return Q().setClient(o),o.init(),m.log(`Running in ${Ra()?"CommonJS":"ESM"} mode.`),o.startClientReportTracking(),uve(),g$(o),v$(o),o}function eR(){if(!Z)return;let t=N$(),e=["SentryContextManager","SentryPropagator"];st()&&e.push("SentrySpanProcessor");for(let r of e)t.includes(r)||m.error(`You have to set up the ${r}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);t.includes("SentrySampler")||m.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.")}function ive(t,e){let r=ave(t.release),n=t.spotlight??DE(process.env.SENTRY_SPOTLIGHT,{strict:!0})??process.env.SENTRY_SPOTLIGHT,o=cve(t.tracesSampleRate),s={...t,dsn:t.dsn??process.env.SENTRY_DSN,environment:t.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:t.sendClientReports??!0,transport:t.transport??bK,stackParser:th(t.stackParser||UK),release:r,tracesSampleRate:o,spotlight:n,debug:DE(t.debug??process.env.SENTRY_DEBUG)},i=t.integrations,a=t.defaultIntegrations??e(s);return{...s,integrations:Vh({defaultIntegrations:a,integrations:i})}}function ave(t){if(t!==void 0)return t;let e=xK();if(e!==void 0)return e}function cve(t){if(t!==void 0)return t;let e=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!e)return;let r=parseFloat(e);return isFinite(r)?r:void 0}function uve(){if(DE(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let t=process.env.SENTRY_TRACE,e=process.env.SENTRY_BAGGAGE,r=tu(t,e);Q().setPropagationContext(r)}}function Te(t,e){t.setAttribute(ae,e)}var tR="Http",kK="@opentelemetry_sentry-patched/instrumentation-http",lve=B(`${tR}.sentry`,t=>new Ks(t)),pve=B(tR,t=>{let e=new FK.HttpInstrumentation(t);try{e._diag=tr.createComponentLogger({namespace:kK}),e.instrumentationName=kK}catch{}return e});function _ve(t,e={}){return typeof t.spans=="boolean"?t.spans:!(e.skipOpenTelemetrySetup||!st(e)&&Ws.major>=22)}var qK=(t={})=>{let e=t.dropSpansForIncomingRequestStatusCodes??[[401,404],[300,399]];return{name:tR,setupOnce(){let r=_ve(t,H()?.getOptions());if(lve({...t,extractIncomingTraceFromHeader:!r,propagateTraceInOutgoingRequests:!r}),r){let n=fve(t);pve(n)}},processEvent(r){if(r.type==="transaction"){let n=r.contexts?.trace?.data?.["http.response.status_code"];if(typeof n=="number"&&e.some(o=>{if(typeof o=="number")return o===n;let[s,i]=o;return n>=s&&n<=i}))return null}return r}}};function dve(t){return"outputData"in t&&"outputSize"in t&&!("client"in t)&&!("statusCode"in t)}function Eve(t){return t.headers["next-router-prefetch"]==="1"}function fve(t={}){return{...t.instrumentation?._experimentalConfig,disableIncomingRequestInstrumentation:t.disableIncomingRequestSpans,ignoreOutgoingRequestHook:r=>{let n=ga(r);if(!n)return!1;let o=t.ignoreOutgoingRequests;return!!o?.(n,r)},ignoreIncomingRequestHook:r=>{let n=r.url,o=r.method?.toUpperCase();if(o==="OPTIONS"||o==="HEAD")return!0;let s=t.ignoreIncomingRequests;return!!(n&&s?.(n,r))},requireParentforOutgoingSpans:!1,requireParentforIncomingSpans:!1,requestHook:(r,n)=>{Te(r,"auto.http.otel.http"),!dve(n)&&Eve(n)&&r.setAttribute("sentry.http.prefetch",!0),t.instrumentation?.requestHook?.(r,n)},responseHook:(r,n)=>{t.instrumentation?.responseHook?.(r,n)},applyCustomAttributesOnSpan:(r,n,o)=>{t.instrumentation?.applyCustomAttributesOnSpan?.(r,n,o)}}}var JK=C(QK(),1);var ZK="NodeFetch",mve=B(ZK,JK.UndiciInstrumentation,t=>Ove(t)),hve=B(`${ZK}.sentry`,Xs,t=>t),gve=((t={})=>({name:"NodeFetch",setupOnce(){Rve(t,H()?.getOptions())&&mve(t),hve(t)}})),eW=gve;function Ave(t,e="/"){let r=`${t}`;return r.endsWith("/")&&e.startsWith("/")?`${r}${e.slice(1)}`:!r.endsWith("/")&&!e.startsWith("/")?`${r}/${e.slice(1)}`:`${r}${e}`}function Rve(t,e={}){return typeof t.spans=="boolean"?t.spans:!e.skipOpenTelemetrySetup&&st(e)}function Ove(t={}){return{requireParentforSpans:!1,ignoreRequestHook:r=>{let n=Ave(r.origin,r.path),o=t.ignoreOutgoingRequests;return!!(o&&n&&o(n))},startSpanHook:()=>({[ae]:"auto.http.otel.node_fetch"})}}var TW=C(pW(),1);var Rn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;M();var KE=C(re(),1),On=C(ee(),1);ue();var Or;(function(t){let e="express.type";t.EXPRESS_TYPE=e;let r="express.name";t.EXPRESS_NAME=r})(Or||(Or={}));var $n;(function(t){let e="router";t.ROUTER=e;let r="middleware";t.MIDDLEWARE=r;let n="request_handler";t.REQUEST_HANDLER=n})($n||($n={}));var aR=Symbol("express-layer-patched"),wo="__ot_middlewares";var dW=(t,e)=>{Array.isArray(t[wo])===!1&&Object.defineProperty(t,wo,{enumerable:!1,value:[]}),e!==void 0&&t[wo].push(e)},EW=(t,e)=>{let r=e.handle?.stack?.[0];return r?.route?.path?`${t}${r.route.path}`:r?.handle?.stack?EW(t,r):t},fW=(t,e,r)=>{if(e.name==="router"){let n=EW("",e),o=n||r||t||"/";return{attributes:{[Or.EXPRESS_NAME]:o,[Or.EXPRESS_TYPE]:$n.ROUTER},name:`router - ${o}`}}else return e.name==="bound dispatch"||e.name==="handle"?{attributes:{[Or.EXPRESS_NAME]:(t||r)??"request handler",[Or.EXPRESS_TYPE]:$n.REQUEST_HANDLER},name:`request handler${e.path?` - ${t||r}`:""}`}:{attributes:{[Or.EXPRESS_NAME]:e.name,[Or.EXPRESS_TYPE]:$n.MIDDLEWARE},name:`middleware - ${e.name}`}},Uve=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},SW=(t,e,r)=>{if(Array.isArray(r?.ignoreLayersType)&&r?.ignoreLayersType?.includes(e))return!0;if(Array.isArray(r?.ignoreLayers)===!1)return!1;try{for(let n of r.ignoreLayers)if(Uve(t,n))return!0}catch{}return!1},cR=t=>t instanceof Error?[t,t.message]:[String(t),String(t)],YE=t=>{let e=t[0];return Array.isArray(e)?e.map(r=>_W(r)||"").join(","):_W(e)},_W=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()};var wve="0.1.0",Vve="@sentry/instrumentation-express-v5",$E=class extends On.InstrumentationBase{constructor(e={}){super(Vve,wve,e)}init(){return[new On.InstrumentationNodeModuleDefinition("express",[">=5.0.0"],e=>this._setup(e),e=>this._tearDown(e))]}_setup(e){let r=e.Router.prototype;return(0,On.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,On.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,On.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e}_tearDown(e){if(e===void 0)return;let r=e.Router.prototype;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(e.application,"use")}_getRoutePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,YE(o)),s}}}_getRouterUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,YE(o)),s}}}_getAppUsePatch(){let e=this;return function(r){return function(...o){let s=this.router,i=r.apply(this,o);if(s){let a=s.stack[s.stack.length-1];e._applyPatch(a,YE(o))}return i}}}_applyPatch(e,r){let n=this;e[aR]!==!0&&(e[aR]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let s=function(i,a){dW(i,r);let c=i[wo].filter(O=>O!=="/"&&O!=="/*").join("").replace(/\/{2,}/g,"/"),u=c.length>0?c:void 0,l={[Tu]:u},p=fW(c,e,r),_=p.attributes[Or.EXPRESS_TYPE],d=(0,KE.getRPCMetadata)(F.active());if(d?.type===KE.RPCType.HTTP&&(d.route=u),SW(p.name,_,n.getConfig()))return _===$n.MIDDLEWARE&&i[wo].pop(),o.apply(this,arguments);if(K.getSpan(F.active())===void 0)return o.apply(this,arguments);let S=n._getSpanName({request:i,layerType:_,route:c},p.name),f=n.tracer.startSpan(S,{attributes:Object.assign(l,p.attributes)}),{requestHook:T}=n.getConfig();T&&(0,On.safeExecuteInTheMiddle)(()=>T(f,{request:i,layerType:_,route:c}),O=>{O&&tr.error("express instrumentation: request hook failed",O)},!0);let h=!1;p.attributes[Or.EXPRESS_TYPE]!==$n.MIDDLEWARE&&(f.end(),h=!0);let A=()=>{h===!1&&(h=!0,f.end())},N=Array.from(arguments),I=N.findIndex(O=>typeof O=="function");I>=0&&(arguments[I]=function(){let O=arguments[0],b=![void 0,null,"route","router"].includes(O);if(!h&&b){let[X,$]=cR(O);f.recordException(X),f.setStatus({code:fe.ERROR,message:$})}return h===!1&&(h=!0,i.res?.removeListener("finish",A),f.end()),i.route&&b||i[wo].pop(),N[I].apply(this,arguments)});try{return o.apply(this,arguments)}catch(O){let[b,v]=cR(O);throw f.recordException(b),f.setStatus({code:fe.ERROR,message:v}),O}finally{h||a.once("finish",A)}};for(let i in o)Object.defineProperty(s,i,{get(){return o[i]},set(a){o[i]=a}});return s}))}_getSpanName(e,r){let{spanNameHook:n}=this.getConfig();if(!(n instanceof Function))return r;try{return n(e,r)??r}catch(o){return tr.error("express instrumentation: error calling span name rewrite hook",o),r}}};var mW="Express",Bve="Express-V5";function hW(t){Te(t,"auto.http.otel.express");let e=k(t).data,r=e["express.type"];r&&t.setAttribute(W,`${r}.express`);let n=e["express.name"];typeof n=="string"&&t.updateName(n)}function gW(t,e){if(ie()===un())return Rn&&m.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),e;if(t.layerType==="request_handler"){let r=t.request,n=r.method?r.method.toUpperCase():"GET";ie().setTransactionName(`${n} ${t.route}`)}return e}var AW=B(mW,()=>new TW.ExpressInstrumentation({requestHook:t=>hW(t),spanNameHook:(t,e)=>gW(t,e)})),RW=B(Bve,()=>new $E({requestHook:t=>hW(t),spanNameHook:(t,e)=>gW(t,e)})),Gve=(()=>({name:mW,setupOnce(){AW(),RW()}})),lR=Gve;var mR=C(require("node:diagnostics_channel"),1);var SR=C(require("node:diagnostics_channel"),1);M();var QE=C(re(),1),ZW=C(ee(),1);ue();var jW=C(UW(),1);var ku=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Kve={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Fu=t=>t.replace(/[[\]\\-]/g,"\\$&"),Wve=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),wW=t=>t.join(""),VW=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,i=!1,a=!1,c=!1,u=!1,l=r,p="";e:for(;s<t.length;){let f=t.charAt(s);if((f==="!"||f==="^")&&s===r+1){u=!0,s++;continue}if(f==="]"&&i&&!c){l=s+1;break}if(i=!0,f==="\\"&&!c){c=!0,s++;continue}if(f==="["&&!c){for(let[T,[h,A,N]]of Object.entries(Kve))if(t.startsWith(T,s)){if(p)return["$.",!1,t.length-r,!0];s+=T.length,N?o.push(h):n.push(h),a=a||A;continue e}}if(c=!1,p){f>p?n.push(Fu(p)+"-"+Fu(f)):f===p&&n.push(Fu(f)),p="",s++;continue}if(t.startsWith("-]",s+1)){n.push(Fu(f+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=f,s+=2;continue}n.push(Fu(f)),s++}if(l<s)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,t.length-r,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let f=n[0].length===2?n[0].slice(-1):n[0];return[Wve(f),!1,l-r,!1]}let _="["+(u?"^":"")+wW(n)+"]",d="["+(u?"":"^")+wW(o)+"]";return[n.length&&o.length?"("+_+"|"+d+")":n.length?_:d,a,l-r,!0]};var Vo=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Yt,Xve=new Set(["!","?","+","*","@"]),dR=t=>Xve.has(t),BW=t=>dR(t.type),zve=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Qve=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Jve=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),GW=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Zve="(?!(?:^|/)\\.\\.?(?:$|/))",WE="(?!\\.)",ebe=new Set(["[","."]),tbe=new Set(["..","."]),rbe=new Set("().*{}+?[]^$\\!"),nbe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ER="[^/]",HW=ER+"*?",kW=ER+"+?",Qs=class{type;#r;#n;#o=!1;#e=[];#t;#a;#u;#c=!1;#s;#i;#l=!1;constructor(e,r,n={}){this.type=e,e&&(this.#n=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,e==="!"&&!this.#r.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#i=this.#e.map(e=>String(e)).join("")}#T(){if(this!==this.#r)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let r=e,n=r.#t;for(;n;){for(let o=r.#a+1;!n.type&&o<n.#e.length;o++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[o])}r=n,n=r.#t}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof Yt&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let r=0;r<this.#a;r++){let n=e.#e[r];if(!(n instanceof Yt&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let e=this.#t?this.#t.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new Yt(this.type,e);for(let n of this.#e)r.copyIn(n);return r}static#p(e,r,n,o,s){let i=o.maxExtglobRecursion??2,a=!1,c=!1,u=-1,l=!1;if(r.type===null){let f=n,T="";for(;f<e.length;){let h=e.charAt(f++);if(a||h==="\\"){a=!a,T+=h;continue}if(c){f===u+1?(h==="^"||h==="!")&&(l=!0):h==="]"&&!(f===u+2&&l)&&(c=!1),T+=h;continue}else if(h==="["){c=!0,u=f,l=!1,T+=h;continue}if(!o.noext&&dR(h)&&e.charAt(f)==="("&&s<=i){r.push(T),T="";let N=new Yt(h,r);f=Yt.#p(e,N,f,o,s+1),r.push(N);continue}T+=h}return r.push(T),f}let p=n+1,_=new Yt(null,r),d=[],S="";for(;p<e.length;){let f=e.charAt(p++);if(a||f==="\\"){a=!a,S+=f;continue}if(c){p===u+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(p===u+2&&l)&&(c=!1),S+=f;continue}else if(f==="["){c=!0,u=p,l=!1,S+=f;continue}if(dR(f)&&e.charAt(p)==="("&&(s<=i||r&&r.#_(f))){let h=r&&r.#_(f)?0:1;_.push(S),S="";let A=new Yt(f,_);_.push(A),p=Yt.#p(e,A,p,o,s+h);continue}if(f==="|"){_.push(S),S="",d.push(_),_=new Yt(null,r);continue}if(f===")")return S===""&&r.#e.length===0&&(r.#l=!0),_.push(S),S="",r.push(...d,_),p;S+=f}return r.type=null,r.#n=void 0,r.#e=[e.substring(n-1)],p}#m(e){return this.#E(e,Qve)}#E(e,r=zve){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#_(n.type,r)}#_(e,r=Jve){return!!r.get(this.type)?.includes(e)}#h(e,r){let n=e.#e[0],o=new Yt(null,n,this.options);o.#e.push(""),n.push(o),this.#f(e,r)}#f(e,r){let n=e.#e[0];this.#e.splice(r,1,...n.#e);for(let o of n.#e)typeof o=="object"&&(o.#t=this);this.#i=void 0}#g(e){return!!GW.get(this.type)?.has(e)}#A(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#g(r.type)}#R(e){let r=GW.get(this.type),n=e.#e[0],o=r?.get(n.type);if(!o)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#t=this);this.type=o,this.#i=void 0,this.#l=!1}#d(){if(BW(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#e.length;n++){let o=this.#e[n];typeof o=="object"&&(o.#d(),this.#E(o)?(r=!1,this.#f(o,n)):this.#m(o)?(r=!1,this.#h(o,n)):this.#A(o)&&(r=!1,this.#R(o)))}}while(!r&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#d();this.#i=void 0}static fromGlob(e,r={}){let n=new Yt(null,void 0,r);return Yt.#p(e,n,0,r,0),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let e=this.toString(),[r,n,o,s]=this.toRegExpSource();if(!(o||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#s.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#T()),!BW(this)){let c=this.isStart()&&this.isEnd(),u=this.#e.map(d=>{let[S,f,T,h]=typeof d=="string"?Yt.#O(d,this.#n,c):d.toRegExpSource(e);return this.#n=this.#n||T,this.#o=this.#o||h,S}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&tbe.has(this.#e[0]))){let S=ebe,f=r&&S.has(u.charAt(0))||u.startsWith("\\.")&&S.has(u.charAt(2))||u.startsWith("\\.\\.")&&S.has(u.charAt(4)),T=!r&&!e&&S.has(u.charAt(0));l=f?Zve:T?WE:""}let p="";return this.isEnd()&&this.#r.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[l+u+p,Vo(u),this.#n=!!this.#n,this.#o]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#S(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#e=[c],u.type=null,u.#n=void 0,[c,Vo(this.toString()),!1,!1]}let i=!n||e||r||!WE?"":this.#S(!0);i===s&&(i=""),i&&(s=`(?:${s})(?:${i})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!r?WE:"")+kW;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!e?WE:"")+HW+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;a=o+s+c}return[a,Vo(s),this.#n=!!this.#n,this.#o]}#S(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,i]=r.toRegExpSource(e);return this.#o=this.#o||i,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#O(e,r,n=!1){let o=!1,s="",i=!1,a=!1;for(let c=0;c<e.length;c++){let u=e.charAt(c);if(o){o=!1,s+=(rbe.has(u)?"\\":"")+u,a=!1;continue}if(u==="\\"){c===e.length-1?s+="\\\\":o=!0;continue}if(u==="["){let[l,p,_,d]=VW(e,c);if(_){s+=l,i=i||p,c+=_-1,r=r||d,a=!1;continue}}if(u==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?kW:HW,r=!0;continue}else a=!1;if(u==="?"){s+=ER,r=!0;continue}s+=nbe(u)}return[s,Vo(e),!!r,i]}};Yt=Qs;var fR=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var lt=(t,e,r={})=>(ku(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ma(e,r).match(t)),obe=/^\*+([^+@!?\*\[\(]*)$/,sbe=t=>e=>!e.startsWith(".")&&e.endsWith(t),ibe=t=>e=>e.endsWith(t),abe=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),cbe=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ube=/^\*+\.\*+$/,lbe=t=>!t.startsWith(".")&&t.includes("."),pbe=t=>t!=="."&&t!==".."&&t.includes("."),_be=/^\.\*+$/,dbe=t=>t!=="."&&t!==".."&&t.startsWith("."),Ebe=/^\*+$/,fbe=t=>t.length!==0&&!t.startsWith("."),Sbe=t=>t.length!==0&&t!=="."&&t!=="..",Tbe=/^\?+([^+@!?\*\[\(]*)?$/,mbe=([t,e=""])=>{let r=YW([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},hbe=([t,e=""])=>{let r=$W([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},gbe=([t,e=""])=>{let r=$W([t]);return e?n=>r(n)&&n.endsWith(e):r},Abe=([t,e=""])=>{let r=YW([t]);return e?n=>r(n)&&n.endsWith(e):r},YW=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},$W=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},KW=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",FW={win32:{sep:"\\"},posix:{sep:"/"}},Rbe=KW==="win32"?FW.win32.sep:FW.posix.sep;lt.sep=Rbe;var Nt=Symbol("globstar **");lt.GLOBSTAR=Nt;var Obe="[^/]",Nbe=Obe+"*?",Ibe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Pbe="(?:(?!(?:\\/|^)\\.).)*?",Cbe=(t,e={})=>r=>lt(r,t,e);lt.filter=Cbe;var Nr=(t,e={})=>Object.assign({},t,e),ybe=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return lt;let e=lt;return Object.assign((n,o,s={})=>e(n,o,Nr(t,s)),{Minimatch:class extends e.Minimatch{constructor(o,s={}){super(o,Nr(t,s))}static defaults(o){return e.defaults(Nr(t,o)).Minimatch}},AST:class extends e.AST{constructor(o,s,i={}){super(o,s,Nr(t,i))}static fromGlob(o,s={}){return e.AST.fromGlob(o,Nr(t,s))}},unescape:(n,o={})=>e.unescape(n,Nr(t,o)),escape:(n,o={})=>e.escape(n,Nr(t,o)),filter:(n,o={})=>e.filter(n,Nr(t,o)),defaults:n=>e.defaults(Nr(t,n)),makeRe:(n,o={})=>e.makeRe(n,Nr(t,o)),braceExpand:(n,o={})=>e.braceExpand(n,Nr(t,o)),match:(n,o,s={})=>e.match(n,o,Nr(t,s)),sep:e.sep,GLOBSTAR:Nt})};lt.defaults=ybe;var WW=(t,e={})=>(ku(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,jW.default)(t));lt.braceExpand=WW;var Mbe=(t,e={})=>new Ma(t,e).makeRe();lt.makeRe=Mbe;var vbe=(t,e,r={})=>{let n=new Ma(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t};lt.match=vbe;var qW=/[?*]|[+@!]\(.*?\)|\[|\]/,bbe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ma=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){ku(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||KW,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!qW.test(s[2]))&&!qW.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(l=>this.parse(l))];if(u)return[s[0],...s.slice(1).map(l=>this.parse(l))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let i=this.set[s];i[0]===""&&i[1]===""&&this.globParts[s][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++)e[n][o]==="**"&&(e[n][o]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;o<e.length-1;o++){let s=e[o];o===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(o,1),o--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let o=e[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let i=o;for(;n[i+1]==="**";)i++;i>o&&n.splice(o+1,i-o);let a=n[o+1],c=n[o+2],u=n[o+3];if(a!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(o,1);let l=n.slice(0);l[o]="**",e.push(l),o--}if(!this.preserveMultipleSlashes){for(let i=1;i<n.length-1;i++){let a=n[i];i===1&&a===""&&n[0]===""||(a==="."||a==="")&&(r=!0,n.splice(i,1),i--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let i=n[s-1];if(i&&i!=="."&&i!==".."&&i!=="**"){r=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let o=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(o){e[r]=[],e[n]=o;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let o=0,s=0,i=[],a="";for(;o<e.length&&s<r.length;)if(e[o]===r[s])i.push(a==="b"?r[s]:e[o]),o++,s++;else if(n&&e[o]==="**"&&r[s]===e[o+1])i.push(e[o]),o++;else if(n&&r[s]==="**"&&e[o]===r[s+1])i.push(r[s]),s++;else if(e[o]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",i.push(e[o]),o++,s++}else if(r[s]==="*"&&e[o]&&(this.options.dot||!e[o].startsWith("."))&&e[o]!=="**"){if(a==="a")return!1;a="b",i.push(r[s]),o++,s++}else return!1;return e.length===r.length&&i}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let o=0;o<e.length&&e.charAt(o)==="!";o++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let o=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),c=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),l=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),p=c?3:a?0:void 0,_=l?3:u?0:void 0;if(typeof p=="number"&&typeof _=="number"){let[d,S]=[e[p],r[_]];d.toLowerCase()===S.toLowerCase()&&(r[_]=d,s=_,o=p)}}let{optimizationLevel:i=1}=this.options;return i>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(Nt)?this.#r(e,r,n,o,s):this.#o(e,r,n,o,s)}#r(e,r,n,o,s){let i=r.indexOf(Nt,s),a=r.lastIndexOf(Nt),[c,u,l]=n?[r.slice(s,i),r.slice(i+1),[]]:[r.slice(s,i),r.slice(i+1,a),r.slice(a+1)];if(c.length){let A=e.slice(o,o+c.length);if(!this.#o(A,c,n,0,0))return!1;o+=c.length}let p=0;if(l.length){if(l.length+o>e.length)return!1;let A=e.length-l.length;if(this.#o(e,l,n,A,0))p=l.length;else{if(e[e.length-1]!==""||o+l.length===e.length||(A--,!this.#o(e,l,n,A,0)))return!1;p=l.length+1}}if(!u.length){let A=!!p;for(let N=o;N<e.length-p;N++){let I=String(e[N]);if(A=!0,I==="."||I===".."||!this.options.dot&&I.startsWith("."))return!1}return n||A}let _=[[[],0]],d=_[0],S=0,f=[0];for(let A of u)A===Nt?(f.push(S),d=[[],0],_.push(d)):(d[0].push(A),S++);let T=_.length-1,h=e.length-p;for(let A of _)A[1]=h-(f[T--]+A[0].length);return!!this.#n(e,_,o,0,n,0,!!p)}#n(e,r,n,o,s,i,a){let c=r[o];if(!c){for(let p=n;p<e.length;p++){a=!0;let _=e[p];if(_==="."||_===".."||!this.options.dot&&_.startsWith("."))return!1}return a}let[u,l]=c;for(;n<=l;){if(this.#o(e.slice(0,n+u.length),u,s,n,0)&&i<this.maxGlobstarRecursion){let d=this.#n(e,r,n+u.length,o+1,s,i+1,a);if(d!==!1)return d}let _=e[n];if(_==="."||_===".."||!this.options.dot&&_.startsWith("."))return!1;n++}return s||null}#o(e,r,n,o,s){let i,a,c,u;for(i=o,a=s,u=e.length,c=r.length;i<u&&a<c;i++,a++){this.debug("matchOne loop");let l=r[a],p=e[i];if(this.debug(r,l,p),l===!1||l===Nt)return!1;let _;if(typeof l=="string"?(_=p===l,this.debug("string match",l,p,_)):(_=l.test(p),this.debug("pattern match",l,p,_)),!_)return!1}if(i===u&&a===c)return!0;if(i===u)return n;if(a===c)return i===u-1&&e[i]==="";throw new Error("wtf?")}braceExpand(){return WW(this.pattern,this.options)}parse(e){ku(e);let r=this.options;if(e==="**")return Nt;if(e==="")return"";let n,o=null;(n=e.match(Ebe))?o=r.dot?Sbe:fbe:(n=e.match(obe))?o=(r.nocase?r.dot?cbe:abe:r.dot?ibe:sbe)(n[1]):(n=e.match(Tbe))?o=(r.nocase?r.dot?hbe:mbe:r.dot?gbe:Abe)(n):(n=e.match(ube))?o=r.dot?pbe:lbe:(n=e.match(_be))&&(o=dbe);let s=Qs.fromGlob(e,this.options).toMMPattern();return o&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Nbe:r.dot?Ibe:Pbe,o=new Set(r.nocase?["i"]:[]),s=e.map(c=>{let u=c.map(l=>{if(l instanceof RegExp)for(let p of l.flags.split(""))o.add(p);return typeof l=="string"?bbe(l):l===Nt?Nt:l._src});return u.forEach((l,p)=>{let _=u[p+1],d=u[p-1];l!==Nt||d===Nt||(d===void 0?_!==void 0&&_!==Nt?u[p+1]="(?:\\/|"+n+"\\/)?"+_:u[p]=n:_===void 0?u[p-1]=d+"(?:\\/|"+n+")?":_!==Nt&&(u[p-1]=d+"(?:\\/|\\/"+n+"\\/)"+_,u[p+1]=Nt))}),u.filter(l=>l!==Nt).join("/")}).join("|"),[i,a]=e.length>1?["(?:",")"]:["",""];s="^"+i+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let i=o[o.length-1];if(!i)for(let a=o.length-2;!i&&a>=0;a--)i=o[a];for(let a=0;a<s.length;a++){let c=s[a],u=o;if(n.matchBase&&c.length===1&&(u=[i]),this.matchOne(u,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return lt.defaults(e).Minimatch}};lt.AST=Qs;lt.Minimatch=Ma;lt.escape=fR;lt.unescape=Vo;var XW="@fastify/otel",Dbe="0.8.0",xbe=">=4.0.0 <6",zW=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],me={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},Bo={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Kn="anonymous",xt=Symbol("fastify otel instance"),Go=Symbol("fastify otel request spans"),qu=Symbol("fastify otel request context"),QW=Symbol("fastify otel addhook original"),JW=Symbol("fastify otel setnotfound original"),XE=Symbol("fastify otel ignore path"),zE=class extends ZW.InstrumentationBase{constructor(e){if(super(XW,Dbe,e),this.servername=e?.servername??process.env.OTEL_SERVICE_NAME??"fastify",this[XE]=null,this._logger=tr.createComponentLogger({namespace:XW}),e?.ignorePaths!=null||process.env.OTEL_FASTIFY_IGNORE_PATHS!=null){let r=e?.ignorePaths??process.env.OTEL_FASTIFY_IGNORE_PATHS;if((typeof r!="string"||r.length===0)&&typeof r!="function")throw new TypeError("ignorePaths must be a string or a function");let n=lt;this[XE]=o=>typeof r=="function"?r(o):n(o.url,r)}}enable(){if(this._handleInitialization===void 0&&this.getConfig().registerOnInitialization){let e=this.plugin();this._handleInitialization=r=>{r.fastify.register(e)},SR.default.subscribe("fastify.initialization",this._handleInitialization)}return super.enable()}disable(){return this._handleInitialization&&(SR.default.unsubscribe("fastify.initialization",this._handleInitialization),this._handleInitialization=void 0),super.disable()}init(){return[]}plugin(){let e=this;return r[Symbol.for("skip-override")]=!0,r[Symbol.for("fastify.display-name")]="@fastify/otel",r[Symbol.for("plugin-meta")]={fastify:xbe,name:"@fastify/otel"},r;function r(n,o,s){n.decorate(xt,e),n.decorate(QW,n.addHook),n.decorate(JW,n.setNotFoundHandler),n.decorateRequest("opentelemetry",function(){let _=this[qu];return{span:this[Go],tracer:e.tracer,context:_,inject:(S,f)=>yt.inject(_,S,f),extract:(S,f)=>yt.extract(_,S,f)}}),n.decorateRequest(Go,null),n.decorateRequest(qu,null),n.addHook("onRoute",function(p){if(e[XE]?.(p)===!0){e._logger.debug(`Ignoring route instrumentation ${p.method} ${p.url} because it matches the ignore path`);return}for(let _ of zW)if(p[_]!=null){let d=p[_];if(typeof d=="function")p[_]=l(d,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[me.FASTIFY_TYPE]:Bo.ROUTE,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:d.name?.length>0?d.name:Kn});else if(Array.isArray(d)){let S=[];for(let f of d)S.push(l(f,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[me.FASTIFY_TYPE]:Bo.ROUTE,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:f.name?.length>0?f.name:Kn}));p[_]=S}}p.onSend!=null?p.onSend=Array.isArray(p.onSend)?[...p.onSend,i]:[p.onSend,i]:p.onSend=i,p.onError!=null?p.onError=Array.isArray(p.onError)?[...p.onError,a]:[p.onError,a]:p.onError=a,p.handler=l(p.handler,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route-handler`,[me.FASTIFY_TYPE]:Bo.HANDLER,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:p.handler.name.length>0?p.handler.name:Kn})}),n.addHook("onRequest",function(p,_,d){if(this[xt].isEnabled()===!1)return d();if(this[xt][XE]?.({url:p.url,method:p.method})===!0)return this[xt]._logger.debug(`Ignoring request ${p.method} ${p.url} because it matches the ignore path`),d();let S=F.active();K.getSpan(S)==null&&(S=yt.extract(S,p.headers));let f=(0,QE.getRPCMetadata)(S);p.routeOptions.url!=null&&f?.type===QE.RPCType.HTTP&&(f.route=p.routeOptions.url);let T=this[xt].tracer.startSpan("request",{attributes:{[sr]:n[xt].servername,[me.ROOT]:"@fastify/otel",[Sn]:p.url,[Hs]:p.method}},S);p[qu]=K.setSpan(S,T),p[Go]=T,F.with(p[qu],()=>{d()})}),n.addHook("onResponse",function(p,_,d){let S=p[Go];S!=null&&(S.setStatus({code:fe.OK,message:"OK"}),S.setAttributes({[Lo]:404}),S.end()),p[Go]=null,d()}),n.addHook=c,n.setNotFoundHandler=u,s();function i(p,_,d,S){let f=p[Go];f!=null&&(_.statusCode<500&&f.setStatus({code:fe.OK,message:"OK"}),f.setAttributes({[Lo]:_.statusCode}),f.end()),p[Go]=null,S(null,d)}function a(p,_,d,S){let f=p[Go];f!=null&&(f.setStatus({code:fe.ERROR,message:d.message}),f.recordException(d)),S()}function c(p,_){let d=this[QW];return zW.includes(p)?d.call(this,p,l(_,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - ${p}`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:_.name?.length>0?_.name:Kn})):d.call(this,p,_)}function u(p,_){let d=this[JW];typeof p=="function"?(_=l(p,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.name?.length>0?p.name:Kn}),d.call(this,_)):(p.preValidation!=null&&(p.preValidation=l(p.preValidation,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.preValidation.name?.length>0?p.preValidation.name:Kn})),p.preHandler!=null&&(p.preHandler=l(p.preHandler,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.preHandler.name?.length>0?p.preHandler.name:Kn})),_=l(_,{[sr]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:_.name?.length>0?_.name:Kn}),d.call(this,p,_))}function l(p,_={}){return function(...S){let f=this[xt],[T]=S;if(f.isEnabled()===!1)return p.call(this,...S);let h=T[qu]??F.active(),A=f.tracer.startSpan(`handler - ${p.name?.length>0?p.name:this.pluginName??Kn}`,{attributes:_},h);return F.with(K.setSpan(h,A),function(){try{let N=p.call(this,...S);return typeof N?.then=="function"?N.then(I=>(A.end(),I),I=>(A.setStatus({code:fe.ERROR,message:I.message}),A.recordException(I),A.end(),Promise.reject(I))):(A.end(),N)}catch(N){throw A.setStatus({code:fe.ERROR,message:N.message}),A.recordException(N),A.end(),N}},this)}}}}};M();var ef=C(re(),1),Js=C(ee(),1);ue();var Wn;(function(t){let e="fastify.name";t.FASTIFY_NAME=e;let r="fastify.type";t.FASTIFY_TYPE=r;let n="hook.name";t.HOOK_NAME=n;let o="plugin.name";t.PLUGIN_NAME=o})(Wn||(Wn={}));var ju;(function(t){let e="middleware";t.MIDDLEWARE=e;let r="request_handler";t.REQUEST_HANDLER=r})(ju||(ju={}));var Yu;(function(t){let e="middleware";t.MIDDLEWARE=e;let r="request handler";t.REQUEST_HANDLER=r})(Yu||(Yu={}));M();var $u=Symbol("opentelemetry.instrumentation.fastify.request_active_span");function TR(t,e,r,n={}){let o=e.startSpan(r,{attributes:n}),s=t[$u]||[];return s.push(o),Object.defineProperty(t,$u,{enumerable:!1,configurable:!0,value:s}),o}function JE(t,e){let r=t[$u]||[];r.length&&(r.forEach(n=>{e&&(n.setStatus({code:fe.ERROR,message:e.message}),n.recordException(e)),n.end()}),delete t[$u])}function t2(t,e,r){let n,o;try{o=t(),e2(o)&&o.then(s=>e(void 0,s),s=>e(s))}catch(s){n=s}finally{if(!e2(o)&&(e(n,o),n))throw n;return o}}function e2(t){return typeof t=="object"&&t&&typeof Object.getOwnPropertyDescriptor(t,"then")?.value=="function"||!1}var Ube="0.1.0",wbe="@sentry/instrumentation-fastify-v3",r2="anonymous",Vbe=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),ZE=class extends Js.InstrumentationBase{constructor(e={}){super(wbe,Ube,e)}init(){return[new Js.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_hookOnRequest(){let e=this;return function(n,o,s){if(!e.isEnabled())return s();e._wrap(o,"send",e._patchSend());let i=n,a=(0,ef.getRPCMetadata)(F.active()),c=i.routeOptions?i.routeOptions.url:n.routerPath;c&&a?.type===ef.RPCType.HTTP&&(a.route=c);let u=n.method||"GET";ie().setTransactionName(`${u} ${c}`),s()}}_wrapHandler(e,r,n,o){let s=this;return this._diag.debug("Patching fastify route.handler function"),function(...i){if(!s.isEnabled())return n.apply(this,i);let a=n.name||e||r2,c=`${Yu.MIDDLEWARE} - ${a}`,u=i[1],l=TR(u,s.tracer,c,{[Wn.FASTIFY_TYPE]:ju.MIDDLEWARE,[Wn.PLUGIN_NAME]:e,[Wn.HOOK_NAME]:r}),p=o&&i[i.length-1];return p&&(i[i.length-1]=function(..._){JE(u),p.apply(this,_)}),F.with(K.setSpan(F.active(),l),()=>t2(()=>n.apply(this,i),_=>{_ instanceof Error&&(l.setStatus({code:fe.ERROR,message:_.message}),l.recordException(_)),o||JE(u)}))}}_wrapAddHook(){let e=this;return this._diag.debug("Patching fastify server.addHook function"),function(r){return function(...o){let s=o[0],i=o[1],a=this.pluginName;if(!Vbe.has(s))return r.apply(this,o);let c=typeof o[o.length-1]=="function"&&i.constructor.name!=="AsyncFunction";return r.apply(this,[s,e._wrapHandler(a,s,i,c)])}}}_patchConstructor(e){let r=this;function n(...o){let s=e.fastify.apply(this,o);return s.addHook("onRequest",r._hookOnRequest()),s.addHook("preHandler",r._hookPreHandler()),Bbe(),r._wrap(s,"addHook",r._wrapAddHook()),s}return e.errorCodes!==void 0&&(n.errorCodes=e.errorCodes),n.fastify=n,n.default=n,n}_patchSend(){let e=this;return this._diag.debug("Patching fastify reply.send function"),function(n){return function(...s){let i=s[0];return e.isEnabled()?(0,Js.safeExecuteInTheMiddle)(()=>n.apply(this,s),a=>{!a&&i instanceof Error&&(a=i),JE(this,a)}):n.apply(this,s)}}}_hookPreHandler(){let e=this;return this._diag.debug("Patching fastify preHandler function"),function(n,o,s){if(!e.isEnabled())return s();let i=n,a=i.routeOptions?.handler||i.context?.handler,c=a?.name.startsWith("bound ")?a.name.substring(6):a?.name,u=`${Yu.REQUEST_HANDLER} - ${c||this.pluginName||r2}`,l={[Wn.PLUGIN_NAME]:this.pluginName,[Wn.FASTIFY_TYPE]:ju.REQUEST_HANDLER,[Tu]:i.routeOptions?i.routeOptions.url:n.routerPath};c&&(l[Wn.FASTIFY_NAME]=c);let p=TR(o,e.tracer,u,l);n2(p);let{requestHook:_}=e.getConfig();return _&&(0,Js.safeExecuteInTheMiddle)(()=>_(p,{request:n}),d=>{d&&e._diag.error("request hook failed",d)},!0),F.with(K.setSpan(F.active(),p),()=>{s()})}}};function Bbe(){let t=H();t&&t.on("spanStart",e=>{n2(e)})}function n2(t){let e=k(t).data,r=e["fastify.type"];if(e[W]||!r)return;t.setAttributes({[ae]:"auto.http.otel.fastify",[W]:`${r}.fastify`});let n=e["fastify.name"]||e["plugin.name"]||e["hook.name"];if(typeof n=="string"){let o=n.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");t.updateName(o)}}var s2="Fastify",Gbe="Fastify-V5",Hbe="Fastify-V3",i2=B(Hbe,()=>new ZE);function kbe(){let t=H();if(t)return t.getIntegrationByName(s2)}function o2(t,e,r,n){let o=kbe()?.getShouldHandleError()||u2;if(n==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&n==="onError-hook"){Rn&&m.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(t,e,r)&&Dt(t,{mechanism:{handled:!1,type:"fastify"}})}var a2=B(Gbe,()=>{let t=new zE,e=t.plugin();return mR.subscribe("fastify.initialization",r=>{let n=r.fastify;n?.register(e).after(o=>{o?Rn&&m.error("Failed to setup Fastify instrumentation",o):(qbe(),n&&jbe(n))})}),mR.subscribe("tracing:fastify.request.handler:error",r=>{let{error:n,request:o,reply:s}=r;o2.call(o2,n,o,s,"diagnostics-channel")}),t}),Fbe=(({shouldHandleError:t})=>{let e;return{name:s2,setupOnce(){e=t||u2,i2(),a2()},getShouldHandleError(){return e},setShouldHandleError(r){e=r}}}),c2=(t={})=>Fbe(t);function u2(t,e,r){let n=r.statusCode;return n>=500||n<=299}function l2(t){let e=k(t),r=e.description,n=e.data,o=n["fastify.type"],s=o==="hook",i=o===r?.startsWith("handler -"),a=r==="request"||o==="request-handler";if(n[W]||!i&&!a&&!s)return;let c=s?"hook":i?"middleware":a?"request-handler":"<unknown>";t.setAttributes({[ae]:"auto.http.otel.fastify",[W]:`${c}.fastify`});let u=n["fastify.name"]||n["plugin.name"]||n["hook.name"];if(typeof u=="string"){let l=u.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");t.updateName(l)}}function qbe(){let t=H();t&&t.on("spanStart",e=>{l2(e)})}function jbe(t){t.addHook("onRequest",async(e,r)=>{if(e.opentelemetry){let{span:s}=e.opentelemetry();s&&l2(s)}let n=e.routeOptions?.url,o=e.method||"GET";ie().setTransactionName(`${o} ${n}`)})}M();var L2=C(b2(),1);var D2="Graphql",x2=B(D2,L2.GraphQLInstrumentation,t=>{let e=w2(t);return{...e,responseHook(r,n){Te(r,"auto.graphql.otel.graphql"),n.errors?.length&&!k(r).status&&r.setStatus({code:fe.ERROR});let s=k(r).data,i=s["graphql.operation.type"],a=s["graphql.operation.name"];if(e.useOperationNameForRootSpan&&i){let c=ve(r),l=k(c).data[ma]||[],p=a?`${i} ${a}`:`${i}`;Array.isArray(l)?(l.push(p),c.setAttribute(ma,l)):typeof l=="string"?c.setAttribute(ma,[l,p]):c.setAttribute(ma,p),k(c).data["original-description"]||c.setAttribute("original-description",k(c).description),c.updateName(`${k(c).data["original-description"]} (${uLe(l)})`)}}}}),cLe=((t={})=>({name:D2,setupOnce(){x2(w2(t))}})),U2=cLe;function w2(t){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...t}}function uLe(t){if(Array.isArray(t)){let e=t.slice().sort();return e.length<=5?e.join(", "):`${e.slice(0,5).join(", ")}, +${e.length-5}`}return`${t}`}var $2=C(Y2(),1);var K2="Kafka",W2=B(K2,()=>new $2.KafkaJsInstrumentation({consumerHook(t){Te(t,"auto.kafkajs.otel.consumer")},producerHook(t){Te(t,"auto.kafkajs.otel.producer")}})),pLe=(()=>({name:K2,setupOnce(){W2()}})),X2=pLe;var r4=C(t4(),1);var n4="LruMemoizer",o4=B(n4,()=>new r4.LruMemoizerInstrumentation),ELe=(()=>({name:n4,setupOnce(){o4()}})),s4=ELe;var E4=C(d4(),1);var f4="Mongo",S4=B(f4,()=>new E4.MongoDBInstrumentation({dbStatementSerializer:mLe,responseHook(t){Te(t,"auto.db.otel.mongo")}}));function mLe(t){let e=CR(t);return JSON.stringify(e)}function CR(t){if(Array.isArray(t))return t.map(e=>CR(e));if(hLe(t)){let e={};return Object.entries(t).map(([r,n])=>[r,CR(n)]).reduce((r,n)=>(ALe(n)&&(r[n[0]]=n[1]),r),e)}return"?"}function hLe(t){return typeof t=="object"&&t!==null&&!gLe(t)}function gLe(t){let e=!1;return typeof Buffer<"u"&&(e=Buffer.isBuffer(t)),e}function ALe(t){return Array.isArray(t)}var RLe=(()=>({name:f4,setupOnce(){S4()}})),T4=RLe;var b4=C(v4(),1);var L4="Mongoose",D4=B(L4,()=>new b4.MongooseInstrumentation({responseHook(t){Te(t,"auto.db.otel.mongoose")}})),LLe=(()=>({name:L4,setupOnce(){D4()}})),x4=LLe;var Y4=C(j4(),1);var $4="Mysql",K4=B($4,()=>new Y4.MySQLInstrumentation({})),FLe=(()=>({name:$4,setupOnce(){K4()}})),W4=FLe;var i5=C(s5(),1);var a5="Mysql2",c5=B(a5,()=>new i5.MySQL2Instrumentation({responseHook(t){Te(t,"auto.db.otel.mysql2")}})),eDe=(()=>({name:a5,setupOnce(){c5()}})),u5=eDe;var U5=C(h5(),1),w5=C(v5(),1);var _De=["get","set","setex"],GR=["get","mget"],dDe=["set","setex"];function nl(t,e){return t.includes(e.toLowerCase())}function HR(t){return nl(GR,t)?"cache.get":nl(dDe,t)?"cache.put":void 0}function EDe(t,e){return e.some(r=>t.startsWith(r))}function L5(t,e){try{if(e.length===0)return;let r=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?b5(o.map(s=>r(s))):["<unknown>"],n=e[0];return nl(_De,t)&&n!=null?r(n):b5(e.map(o=>r(o)))}catch{return}}function D5(t,e,r){if(!HR(t))return!1;for(let n of e)if(EDe(n,r))return!0;return!1}function x5(t){let e=r=>{try{return Buffer.isBuffer(r)?r.byteLength:typeof r=="string"?r.length:typeof r=="number"?r.toString().length:r==null?0:JSON.stringify(r).length}catch{return}};return Array.isArray(t)?t.reduce((r,n)=>{let o=e(n);return typeof o=="number"?r!==void 0?r+o:o:r},0):e(t)}function b5(t){let e=[],r=n=>{n.forEach(o=>{Array.isArray(o)?r(o):e.push(o)})};return r(t),e}var V5="Redis",kR={},B5=(t,e,r,n)=>{t.setAttribute(ae,"auto.db.otel.redis");let o=L5(e,r),s=HR(e);if(!o||!s||!kR.cachePrefixes||!D5(e,o,kR.cachePrefixes))return;let i=k(t).data["net.peer.name"],a=k(t).data["net.peer.port"];a&&i&&t.setAttributes({"network.peer.address":i,"network.peer.port":a});let c=x5(n);c&&t.setAttribute(Ih,c),nl(GR,e)&&c!==void 0&&t.setAttribute(Oh,c>0),t.setAttributes({[W]:s,[Nh]:o});let u=o.join(", ");t.updateName(cn(u,1024))},fDe=B("IORedis",()=>new U5.IORedisInstrumentation({responseHook:B5})),SDe=B("Redis-4",()=>new w5.RedisInstrumentation({responseHook:B5})),G5=Object.assign(()=>{fDe(),SDe()},{id:V5}),TDe=((t={})=>({name:V5,setupOnce(){kR=t,G5()}})),H5=TDe;var sX=C(oX(),1);var iX="Postgres",aX=B(iX,()=>new sX.PgInstrumentation({requireParentSpan:!0,requestHook(t){Te(t,"auto.db.otel.postgres")}})),LDe=(()=>({name:iX,setupOnce(){aX()}})),cX=LDe;M();var to=C(ee(),1);ue();var XR="PostgresJs",uX=[">=3.0.0 <4"],lX=B(XR,t=>new WR({requireParentSpan:t?.requireParentSpan??!0,requestHook:t?.requestHook})),WR=class extends to.InstrumentationBase{constructor(e){super("sentry-postgres-js",pe,e)}init(){let e=new to.InstrumentationNodeModuleDefinition("postgres",uX);return["src","cf/src","cjs/src"].forEach(r=>{e.files.push(new to.InstrumentationNodeModuleFile(`postgres/${r}/connection.js`,["*"],this._patchConnection.bind(this),this._unwrap.bind(this))),e.files.push(new to.InstrumentationNodeModuleFile(`postgres/${r}/query.js`,uX,this._patchQuery.bind(this),this._unwrap.bind(this)))}),[e]}_shouldCreateSpans(){let e=this.getConfig();return K.getSpan(F.active())!==void 0||!e.requireParentSpan}_patchReject(e,r){return new Proxy(e,{apply:(n,o,s)=>{r.setStatus({code:2,message:s?.[0]?.message||"unknown_error"});let i=Reflect.apply(n,o,s);return r.setAttribute(mg,s?.[0]?.code||"Unknown error"),r.setAttribute(gg,s?.[0]?.name||"Unknown error"),r.end(),i}})}_patchResolve(e,r){return new Proxy(e,{apply:(n,o,s)=>{let i=Reflect.apply(n,o,s),a=s?.[0]?.command;return a&&r.setAttribute(Sg,a),r.end(),i}})}_patchQuery(e){return e.Query.prototype.handle=new Proxy(e.Query.prototype.handle,{apply:async(r,n,o)=>{if(!this._shouldCreateSpans())return Reflect.apply(r,n,o);let s=this._sanitizeSqlQuery(n.strings?.[0]);return ed({name:s||"postgresjs.query",op:"db"},i=>{let c=Q().getScopeData().contexts.postgresjsConnection;Te(i,"auto.db.otel.postgres");let{requestHook:u}=this.getConfig();u&&(0,to.safeExecuteInTheMiddle)(()=>u(i,s,c),d=>{d&&m.error(`Error in requestHook for ${XR} integration:`,d)});let l=c?.ATTR_DB_NAMESPACE||"<unknown database>",p=c?.ATTR_SERVER_ADDRESS||"<unknown host>",_=c?.ATTR_SERVER_PORT||"<unknown port>";i.setAttribute(hg,"postgres"),i.setAttribute(fg,l),i.setAttribute(Ag,p),i.setAttribute(Rg,_),i.setAttribute(Tg,s),n.resolve=this._patchResolve(n.resolve,i),n.reject=this._patchReject(n.reject,i);try{return Reflect.apply(r,n,o)}catch(d){throw i.setStatus({code:2}),i.end(),d}})}}),e}_patchConnection(e){return new Proxy(e,{apply:(r,n,o)=>{let s=o[0]?.database||"<unknown database>",i=o[0]?.host?.[0]||"<unknown host>",a=o[0]?.port?.[0]||"<unknown port>";return Q().setContext("postgresjsConnection",{ATTR_DB_NAMESPACE:s,ATTR_SERVER_ADDRESS:i,ATTR_SERVER_PORT:a}),Reflect.apply(r,n,o)}})}_sanitizeSqlQuery(e){return e?e.replace(/\s+/g," ").trim().substring(0,1024).replace(/--.*?(\r?\n|$)/g,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\b\d+\b/g,"?").replace(/\s+/g," ").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/g,"IN (?)"):"Unknown SQL Query"}},DDe=(()=>({name:XR,setupOnce(){lX()}})),pX=DDe;M();var Mf=C(ee(),1);M();var xDe=process.env.PRISMA_SHOW_ALL_TRACES==="true",UDe="00-10-10-00";function wDe(t){return t==="client"?ct.CLIENT:ct.INTERNAL}var VDe=class{traceMiddleware;tracerProvider;ignoreSpanTypes;constructor({traceMiddleware:t,tracerProvider:e,ignoreSpanTypes:r}){this.traceMiddleware=t,this.tracerProvider=e,this.ignoreSpanTypes=r}isEnabled(){return!0}getTraceParent(t){let e=K.getSpanContext(t??F.active());return e?`00-${e.traceId}-${e.spanId}-0${e.traceFlags}`:UDe}dispatchEngineSpans(t){let e=this.tracerProvider.getTracer("prisma"),r=new Map,n=t.filter(o=>o.parentId===null);for(let o of n)EX(e,o,t,r,this.ignoreSpanTypes)}getActiveContext(){return F.active()}runInChildSpan(t,e){if(typeof t=="string"&&(t={name:t}),t.internal&&!xDe||t.middleware&&!this.traceMiddleware)return e();let r=this.tracerProvider.getTracer("prisma"),n=t.context??this.getActiveContext(),o=`prisma:client:${t.name}`;if(fX(o,this.ignoreSpanTypes))return e();if(t.active===!1){let s=r.startSpan(o,t,n);return _X(s,e(s,n))}return r.startActiveSpan(o,t,s=>_X(s,e(s,n)))}};function EX(t,e,r,n,o){if(fX(e.name,o))return;let s={attributes:e.attributes,kind:wDe(e.kind),startTime:e.startTime};t.startActiveSpan(e.name,s,i=>{n.set(e.id,i.spanContext().spanId),e.links&&i.addLinks(e.links.flatMap(c=>{let u=n.get(c);return u?{context:{spanId:u,traceId:i.spanContext().traceId,traceFlags:i.spanContext().traceFlags}}:[]}));let a=r.filter(c=>c.parentId===e.id);for(let c of a)EX(t,c,r,n,o);i.end(e.endTime)})}function _X(t,e){return BDe(e)?e.then(r=>(t.end(),r),r=>{throw t.end(),r}):(t.end(),e)}function BDe(t){return t!=null&&typeof t.then=="function"}function fX(t,e){return e.some(r=>typeof r=="string"?r===t:r.test(t))}var SX={name:"@prisma/instrumentation",version:"6.11.1",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@prisma/internals":"workspace:*","@swc/core":"1.11.5","@types/jest":"29.5.14","@types/node":"18.19.76","@opentelemetry/api":"1.9.0",jest:"29.7.0","jest-junit":"16.0.0",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.52.0 || ^0.53.0 || ^0.54.0 || ^0.55.0 || ^0.56.0 || ^0.57.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"jest"},sideEffects:!1},QR=SX.version,GDe=QR.split(".")[0],dX="PRISMA_INSTRUMENTATION",zR=`V${GDe}_PRISMA_INSTRUMENTATION`,HDe=SX.name,kDe="@prisma/client",TX=class extends Mf.InstrumentationBase{tracerProvider;constructor(t={}){super(HDe,QR,t)}setTracerProvider(t){this.tracerProvider=t}init(){return[new Mf.InstrumentationNodeModuleDefinition(kDe,[QR])]}enable(){let t=this._config,e={helper:new VDe({traceMiddleware:t.middleware??!1,tracerProvider:this.tracerProvider??K.getTracerProvider(),ignoreSpanTypes:t.ignoreSpanTypes??[]})};global[dX]=e,global[zR]=e}disable(){delete global[dX],delete global[zR]}isEnabled(){return!!global[zR]}};var mX="Prisma";function FDe(t){return!!t&&typeof t=="object"&&"dispatchEngineSpans"in t}function hX(){let t=globalThis.PRISMA_INSTRUMENTATION;return t&&typeof t=="object"&&"helper"in t?t.helper:void 0}var JR=class extends TX{constructor(){super()}enable(){super.enable();let e=hX(),r=!1;FDe(e)&&(e.createEngineSpan=()=>{Me(()=>{r||(r=!0,console.warn("[Sentry] The Sentry SDK supports tracing with Prisma version 5 only with limited capabilities. For full tracing capabilities pass `prismaInstrumentation` for version 5 to the Sentry `prismaIntegration`. Read more: https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/"))})})}},qDe=B(mX,t=>t?.prismaInstrumentation?t.prismaInstrumentation:new JR),gX=({prismaInstrumentation:t}={})=>({name:mX,setupOnce(){qDe({prismaInstrumentation:t})},setup(e){hX()&&e.on("spanStart",r=>{let n=k(r);n.description?.startsWith("prisma:")&&r.setAttribute(ae,"auto.db.otel.prisma"),n.description==="prisma:engine:db_query"&&n.data["db.query.text"]&&r.updateName(n.data["db.query.text"]),n.description==="prisma:engine:db_query"&&!n.data["db.system"]&&r.setAttribute("db.system","prisma")})}});var yX=C(CX(),1);var MX="Hapi",vX=B(MX,()=>new yX.HapiInstrumentation),exe=(()=>({name:MX,setupOnce(){vX()}})),bX=exe;var qX=C(FX(),1);ue();var jX="Koa",YX=B(jX,qX.KoaInstrumentation,(t={})=>({ignoreLayersType:t.ignoreLayersType,requestHook(e,r){Te(e,"auto.http.otel.koa");let n=k(e).data,o=n["koa.type"];o&&e.setAttribute(W,`${o}.koa`);let s=n["koa.name"];if(typeof s=="string"&&e.updateName(s||"< unknown >"),ie()===un()){Rn&&m.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let i=n[Sn],a=r.context?.request?.method?.toUpperCase()||"GET";i&&ie().setTransactionName(`${a} ${i}`)}})),axe=((t={})=>({name:jX,setupOnce(){YX(t)}})),$X=axe;var t3=C(e3(),1);var r3="Connect",n3=B(r3,()=>new t3.ConnectInstrumentation),mxe=(()=>({name:r3,setupOnce(){n3()}})),o3=mxe;var S3=C(f3(),1);var Oxe=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),T3="Tedious",m3=B(T3,()=>new S3.TediousInstrumentation({})),Nxe=(()=>{let t;return{name:T3,setupOnce(){let e=m3();t=fu(e)},setup(e){t?.(()=>e.on("spanStart",r=>{let{description:n,data:o}=k(r);if(!n||o["db.system"]!=="mssql")return;let s=n.split(" ")[0]||"";Oxe.has(s)&&r.setAttribute(ae,"auto.db.otel.tedious")}))}}}),h3=Nxe;var N3=C(O3(),1);var I3="GenericPool",P3=B(I3,()=>new N3.GenericPoolInstrumentation({})),Cxe=(()=>{let t;return{name:I3,setupOnce(){let e=P3();t=fu(e)},setup(e){t?.(()=>e.on("spanStart",r=>{let o=k(r).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&r.setAttribute(ae,"auto.db.otel.generic_pool")}))}}}),C3=Cxe;var V3=C(w3(),1);var B3="Amqplib",Vxe={consumeEndHook:t=>{Te(t,"auto.amqplib.otel.consumer")},publishHook:t=>{Te(t,"auto.amqplib.otel.publisher")}},G3=B(B3,()=>new V3.AmqplibInstrumentation(Vxe)),Bxe=(()=>({name:B3,setupOnce(){G3()}})),H3=Bxe;var dl="VercelAI";var Wf=C(ee(),1);var k3=["generateText","streamText","generateObject","streamObject","embed","embedMany"];function Gxe(t,e,r,n){let o=t?.recordInputs!==void 0?t.recordInputs:e.recordInputs!==void 0?e.recordInputs:r===!0?!0:n,s=t?.recordOutputs!==void 0?t.recordOutputs:e.recordOutputs!==void 0?e.recordOutputs:r===!0?!0:n;return{recordInputs:o,recordOutputs:s}}var Kf=class t extends Wf.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(e={}){super("@sentry/instrumentation-vercel-ai",pe,e),t.prototype.__init.call(this),t.prototype.__init2.call(this)}init(){return new Wf.InstrumentationNodeModuleDefinition("ai",[">=3.0.0 <5"],this._patch.bind(this))}callWhenPatched(e){this._isPatched?e():this._callbacks.push(e)}_patch(e){this._isPatched=!0,this._callbacks.forEach(n=>n()),this._callbacks=[];function r(n){return(...o)=>{let s=o[0].experimental_telemetry||{},i=s.isEnabled,a=Q().getClient(),c=a?.getIntegrationByName(dl),u=c?.options,l=c?!!a?.getOptions().sendDefaultPii:!1,{recordInputs:p,recordOutputs:_}=Gxe(u,s,i,l);return o[0].experimental_telemetry={...s,isEnabled:i!==void 0?i:!0,recordInputs:p,recordOutputs:_},Hn(()=>n.apply(this,o),d=>{d&&typeof d=="object"&&Fe(d,"_sentry_active_span",dn())})}}if(Object.prototype.toString.call(e)==="[object Module]"){for(let n of k3)e[n]=r(e[n]);return e}else{let n=k3.reduce((o,s)=>(o[s]=r(e[s]),o),{});return{...e,...n}}}};var F3=B(dl,()=>new Kf({}));function Hxe(t){return!!t.getIntegrationByName("Modules")?.getModules?.()?.ai}var kxe=((t={})=>{let e;return{name:dl,options:t,setupOnce(){e=F3()},afterAllSetup(r){t.force??Hxe(r)?Od(r):e?.callWhenPatched(()=>Od(r))}}}),q3=kxe;var zf=C(ee(),1);var Fxe=[">=4.0.0 <6"];function qxe(t,e){let r=t?.recordInputs??e,n=t?.recordOutputs??e;return{recordInputs:r,recordOutputs:n}}var Xf=class extends zf.InstrumentationBase{constructor(e={}){super("@sentry/instrumentation-openai",pe,e)}init(){return new zf.InstrumentationNodeModuleDefinition("openai",Fxe,this._patch.bind(this))}_patch(e){let r=e.OpenAI,n=function(...o){let s=Reflect.construct(r,o),i=Q().getClient(),c=i?.getIntegrationByName(bo)?.options,u=!!i?.getOptions().sendDefaultPii,{recordInputs:l,recordOutputs:p}=qxe(c,u);return ng(s,{recordInputs:l,recordOutputs:p})};Object.setPrototypeOf(n,r),Object.setPrototypeOf(n.prototype,r.prototype);for(let o of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(o)){let s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(n,o,s)}try{e.OpenAI=n}catch{Object.defineProperty(e,"OpenAI",{value:n,writable:!0,configurable:!0,enumerable:!0})}if(e.default===r)try{e.default=n}catch{Object.defineProperty(e,"default",{value:n,writable:!0,configurable:!0,enumerable:!0})}return e}};var j3=B(bo,()=>new Xf({})),jxe=((t={})=>({name:bo,options:t,setupOnce(){j3()}})),Y3=jxe;function $3(){return[lR(),c2(),U2(),T4(),x4(),W4(),u5(),H5(),cX(),gX(),bX(),$X(),o3(),h3(),C3(),X2(),H3(),s4(),q3(),Y3(),pX()]}M();var K3=C(lA(),1),W3=C(mA(),1);ue();var Yxe=C(I_(),1);var EO=1e6;function X3(t,e={}){t.getOptions().debug&&zA();let r=$xe(t,e);t.traceProvider=r}function $xe(t,e={}){let r=new W3.BasicTracerProvider({sampler:new AE(t),resource:new K3.Resource({[sr]:"node",[Eg]:"sentry",[Og]:pe}),forceFlushTimeoutMillis:500,spanProcessors:[new gE({timeout:Kxe(t.getOptions().maxSpanWaitDuration)}),...e.spanProcessors||[]]});return K.setGlobalTracerProvider(r),yt.setGlobalPropagator(new hE),F.setGlobalContextManager(new XA),r}function Kxe(t){if(t!=null){if(t>EO)return Rn&&m.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${EO}`),EO;if(t<=0||Number.isNaN(t)){Rn&&m.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return t}}function z3(){return VE().filter(e=>e.name!=="Http"&&e.name!=="NodeFetch").concat(qK(),eW())}function Q3(t){return[...z3(),...st(t)?$3():[]]}function fO(t={}){return Wxe(t,Q3)}function Wxe(t={},e){Gs(t,"node");let r=ZA({...t,defaultIntegrations:t.defaultIntegrations??e(t)});return r&&!t.skipOpenTelemetrySetup&&(X3(r,{spanProcessors:t.openTelemetrySpanProcessors}),eR()),r}function zxe(){let t=process.env.SENTRY_RELEASE?.trim();if(t)return t;let r=(process.env.RAILWAY_GIT_COMMIT_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.GITHUB_SHA||process.env.GIT_COMMIT||"").slice(0,7),n=typeof process.env.npm_package_version=="string"?process.env.npm_package_version:"";if(n&&r)return`${n}+${r}`;if(r)return r;if(n)return n}function Z3(){let t=process.env.SENTRY_ENVIRONMENT?.trim();return t||(process.env.NODE_ENV==="production"?"production":"development")}function Qxe(){let t=process.env.SENTRY_TRACES_SAMPLE_RATE?.trim();if(t===""||t===void 0)return Z3()==="production"?.15:1;let e=Number(t);return!Number.isFinite(e)||e<0?0:Math.min(e,1)}var Jxe=new Set(["authorization","cookie","x-admin-key","x-api-key","x-platform-web-secret","proxy-authorization"]);function Zxe(t){if(!t||typeof t!="object")return t;let e={};for(let[r,n]of Object.entries(t)){let o=r.toLowerCase();e[r]=Jxe.has(o)?"[Filtered]":n}return e}function eUe(t){let e=t.request;if(!e)return;e.headers&&typeof e.headers=="object"&&(e.headers=Zxe(e.headers));let r=e.url;typeof r=="string"&&r.includes("token=")&&(e.url=r.replace(/([?&]token=)[^&]+/gi,"$1[Filtered]"))}function tUe(t){try{eUe(t);let r=t.exception?.values?.[0];return r?.value&&typeof r.value=="string"&&(/Bearer\s+\S+/i.test(r.value)&&(r.value=r.value.replace(/Bearer\s+\S+/gi,"Bearer [Filtered]")),/password[=:]\s*\S+/i.test(r.value)&&(r.value="[Filtered]")),t}catch{return t}}var J3=!1;function rUe(t){let e=zxe();return{environment:Z3(),...e?{release:e}:{},tracesSampleRate:Qxe(),beforeSend(r){if(r.type==="transaction")return r;let n=tUe(r);return n===null?null:n},initialScope:r=>(r.setTag("service",t),r)}}function ez(t){if(J3)return;let e=process.env.SENTRY_DSN?.trim();if(!e){t.dsnProvided=!1;return}t.dsnProvided=!0;try{fO({dsn:e,...rUe(t.serviceName)}),J3=!0,console.log(`[visa/observability] Sentry initialized service=${t.serviceName} env=${process.env.SENTRY_ENVIRONMENT??process.env.NODE_ENV??"unknown"}`),ad(`Sentry initialized: ${t.serviceName}`,"info")}catch(r){console.error("[visa/observability] Sentry.init failed:",r),t.dsnProvided=!1}}process.env.SENTRY_DSN;ez({serviceName:"visa-cli"});var Cn=3e3,Vt=0,tz=!1,nUe={user_context:{type:"string",description:"The exact verbatim request the user made that prompted this tool call. Always include the user's full original message."}};function _e(t){return{...t,properties:{...t.properties,...nUe},required:[...t.required||[],"user_context"]}}var rz=["You are an assistant with access to Visa CLI \u2014 a toolkit for AI images, music, videos, crypto prices, and payments. Use these tools when they fit naturally; otherwise just answer the user.","","Tool-response fields you may see, and how to handle them:","- _visa_receipt: a Visa logo built from box-drawing characters that confirms a successful payment. Render it as-is in your reply so the user sees the receipt; you may trim a long URL list if it is unwieldy, but keep the receipt itself intact.","- transaction_history media URLs: include URLs (images, audio, links) for transactions that have them \u2014 the user paid for that content. Summarising them away is unhelpful.","- _feedback_prompt: ask the user the prompt message naturally. If they respond with feedback, call the feedback tool with their message and the transaction_id from the prompt object.","- _feedback_hint: briefly mention that the user can share feedback. If they respond, include the transaction_id when calling the feedback tool.","- _hud_prompt: mention the HUD once, naturally, and include the setup command from the prompt. Do not repeat it if already mentioned.","- _referral_prompt: mention it once, naturally, include the referral code and link plainly. Do not invent or imply incentives.","- _update_available: render it as a single italic line at the end of your response. Mention it once, do not repeat."].join(`
|
|
74
|
+
`);let{connect:u,buffered:l}=await c;if(e.emit("proxyConnect",u),this.emit("proxyConnect",u,e),u.statusCode===200){if(e.once("socket",WMe),r.secureEndpoint){Du("Upgrading socket connection to TLS");let _=r.servername||r.host;return JA.connect({...yK(r,"host","path","port"),socket:o,servername:Yn.isIP(_)?void 0:_})}return o}o.destroy();let p=new Yn.Socket({writable:!1});return p.readable=!0,e.once("socket",_=>{Du("Replaying proxy buffer for failed request"),_.push(l),_.push(null)}),p}};xu.__initStatic();function WMe(t){t.resume()}function yK(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}var QMe=1024*32;function JMe(t){return new MK.Readable({read(){this.push(t),this.push(null)}})}function bK(t){let e;try{e=new URL(t.url)}catch{return Me(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),_u(t,()=>Promise.resolve({}))}let r=e.protocol==="https:",n=ZMe(e,t.proxy||(r?process.env.https_proxy:void 0)||process.env.http_proxy),o=r?zMe:XMe,s=t.keepAlive===void 0?!1:t.keepAlive,i=n?new xu(n):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=eve(t,t.httpModule??o,i);return _u(t,a)}function ZMe(t,e){let{no_proxy:r}=process.env;if(!r?.split(",").some(o=>t.host.endsWith(o)||t.hostname.endsWith(o)))return e}function eve(t,e,r){let{hostname:n,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(u){return new Promise((l,p)=>{Qi(()=>{let _=JMe(u.body),d={...t.headers};u.body.length>QMe&&(d["content-encoding"]="gzip",_=_.pipe((0,vK.createGzip)()));let S=e.request({method:"POST",agent:r,headers:d,hostname:n,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},f=>{f.on("data",()=>{}),f.on("end",()=>{}),f.setEncoding("utf8");let T=f.headers["retry-after"]??null,h=f.headers["x-sentry-rate-limits"]??null;l({statusCode:f.statusCode,headers:{"retry-after":T,"x-sentry-rate-limits":Array.isArray(h)?h[0]||null:h}})});S.on("error",p),_.pipe(S)})})}}var tve=new Set(["false","f","n","no","off","0"]),rve=new Set(["true","t","y","yes","on","1"]);function DE(t,e){let r=String(t).toLowerCase();return tve.has(r)?!1:rve.has(r)?!0:e?.strict?null:!!t}var xE=require("node:path");function LK(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function DK(t=process.argv[1]?Wh(process.argv[1]):process.cwd(),e=xE.sep==="\\"){let r=e?LK(t):t;return n=>{if(!n)return;let o=e?LK(n):n,{dir:s,base:i,ext:a}=xE.posix.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(r)){let l=s.slice(r.length+1).replace(/\//g,".");return l?`${l}:${c}`:c}return c}}function xK(t){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(j.SENTRY_RELEASE?.id)return j.SENTRY_RELEASE.id;let e=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,r=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,n=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return e||r||n||t}var UK=U_(og(DK()));var wK=C(require("node:os"),1);M();var VK=C(ee(),1);var wE=require("worker_threads");var nve=6e4,UE=class extends pu{constructor(e){let r=e.includeServerName===!1?void 0:e.serverName||global.process.env.SENTRY_NAME||wK.hostname(),n={...e,platform:"node",runtime:{name:"node",version:global.process.version},serverName:r};e.openTelemetryInstrumentations&&(0,VK.registerInstrumentations)({instrumentations:e.openTelemetryInstrumentations}),Gs(n,"node"),m.log(`Initializing Sentry: process: ${process.pid}, thread: ${wE.isMainThread?"main":`worker-${wE.threadId}`}.`),super(n);let{enableLogs:o,_experiments:s}=this.getOptions();(o??s?.enableLogs)&&(this._logOnExitFlushListener=()=>{Bs(this)},r&&this.on("beforeCaptureLog",a=>{a.attributes={...a.attributes,"server.address":r}}),process.on("beforeExit",this._logOnExitFlushListener))}get tracer(){if(this._tracer)return this._tracer;let e="@sentry/node",r=pe,n=K.getTracer(e,r);return this._tracer=n,n}async flush(e){return await this.traceProvider?.forceFlush(),this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(e)}close(e){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(e)}startClientReportTracking(){let e=this.getOptions();e.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{Z&&m.log("Flushing client reports based on interval."),this._flushOutcomes()},e.clientReportFlushInterval??nve).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}_getTraceInfoFromScope(e){return e?M$(this,e):[void 0,void 0]}};var BK=C(I_(),1),GK=C(require("module"),1),ove={};function HK(){let[t=0,e=0]=process.versions.node.split(".").map(Number);if(t>=21||t===20&&e>=6||t===18&&e>=19){if(!j._sentryEsmLoaderHookRegistered)try{let{addHookMessagePort:r}=(0,BK.createAddHookMessageChannel)();GK.default.register("import-in-the-middle/hook.mjs",ove.url,{data:{addHookMessagePort:r,include:[]},transferList:[r]})}catch(r){m.warn("Failed to register ESM hook",r)}}else Me(()=>{console.warn(`[Sentry] You are using Node.js v${process.versions.node} in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.`)})}function VE(){return[Td(),fd(),md(),hd(),gK(),gd(),H$(),Y$(),fK(),SK(),nK(),_K(),X$(),AK(),PK(),EK()]}function ZA(t={}){return sve(t,VE)}function sve(t={},e){let r=ive(t,e);r.debug===!0&&(Z?m.enable():Me(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),!Ra()&&r.registerEsmLoaderHooks!==!1&&HK(),b$(),Q().update(r.initialScope),r.spotlight&&!r.integrations.some(({name:s})=>s===qA)&&r.integrations.push(mK({sidecarUrl:typeof r.spotlight=="string"?r.spotlight:void 0})),Gs(r,"node-core");let o=new UE(r);return Q().setClient(o),o.init(),m.log(`Running in ${Ra()?"CommonJS":"ESM"} mode.`),o.startClientReportTracking(),uve(),g$(o),v$(o),o}function eR(){if(!Z)return;let t=N$(),e=["SentryContextManager","SentryPropagator"];st()&&e.push("SentrySpanProcessor");for(let r of e)t.includes(r)||m.error(`You have to set up the ${r}. Without this, the OpenTelemetry & Sentry integration will not work properly.`);t.includes("SentrySampler")||m.warn("You have to set up the SentrySampler. Without this, the OpenTelemetry & Sentry integration may still work, but sample rates set for the Sentry SDK will not be respected. If you use a custom sampler, make sure to use `wrapSamplingDecision`.")}function ive(t,e){let r=ave(t.release),n=t.spotlight??DE(process.env.SENTRY_SPOTLIGHT,{strict:!0})??process.env.SENTRY_SPOTLIGHT,o=cve(t.tracesSampleRate),s={...t,dsn:t.dsn??process.env.SENTRY_DSN,environment:t.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:t.sendClientReports??!0,transport:t.transport??bK,stackParser:th(t.stackParser||UK),release:r,tracesSampleRate:o,spotlight:n,debug:DE(t.debug??process.env.SENTRY_DEBUG)},i=t.integrations,a=t.defaultIntegrations??e(s);return{...s,integrations:Vh({defaultIntegrations:a,integrations:i})}}function ave(t){if(t!==void 0)return t;let e=xK();if(e!==void 0)return e}function cve(t){if(t!==void 0)return t;let e=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!e)return;let r=parseFloat(e);return isFinite(r)?r:void 0}function uve(){if(DE(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let t=process.env.SENTRY_TRACE,e=process.env.SENTRY_BAGGAGE,r=tu(t,e);Q().setPropagationContext(r)}}function Te(t,e){t.setAttribute(ae,e)}var tR="Http",kK="@opentelemetry_sentry-patched/instrumentation-http",lve=B(`${tR}.sentry`,t=>new Ks(t)),pve=B(tR,t=>{let e=new FK.HttpInstrumentation(t);try{e._diag=tr.createComponentLogger({namespace:kK}),e.instrumentationName=kK}catch{}return e});function _ve(t,e={}){return typeof t.spans=="boolean"?t.spans:!(e.skipOpenTelemetrySetup||!st(e)&&Ws.major>=22)}var qK=(t={})=>{let e=t.dropSpansForIncomingRequestStatusCodes??[[401,404],[300,399]];return{name:tR,setupOnce(){let r=_ve(t,H()?.getOptions());if(lve({...t,extractIncomingTraceFromHeader:!r,propagateTraceInOutgoingRequests:!r}),r){let n=fve(t);pve(n)}},processEvent(r){if(r.type==="transaction"){let n=r.contexts?.trace?.data?.["http.response.status_code"];if(typeof n=="number"&&e.some(o=>{if(typeof o=="number")return o===n;let[s,i]=o;return n>=s&&n<=i}))return null}return r}}};function dve(t){return"outputData"in t&&"outputSize"in t&&!("client"in t)&&!("statusCode"in t)}function Eve(t){return t.headers["next-router-prefetch"]==="1"}function fve(t={}){return{...t.instrumentation?._experimentalConfig,disableIncomingRequestInstrumentation:t.disableIncomingRequestSpans,ignoreOutgoingRequestHook:r=>{let n=ga(r);if(!n)return!1;let o=t.ignoreOutgoingRequests;return!!o?.(n,r)},ignoreIncomingRequestHook:r=>{let n=r.url,o=r.method?.toUpperCase();if(o==="OPTIONS"||o==="HEAD")return!0;let s=t.ignoreIncomingRequests;return!!(n&&s?.(n,r))},requireParentforOutgoingSpans:!1,requireParentforIncomingSpans:!1,requestHook:(r,n)=>{Te(r,"auto.http.otel.http"),!dve(n)&&Eve(n)&&r.setAttribute("sentry.http.prefetch",!0),t.instrumentation?.requestHook?.(r,n)},responseHook:(r,n)=>{t.instrumentation?.responseHook?.(r,n)},applyCustomAttributesOnSpan:(r,n,o)=>{t.instrumentation?.applyCustomAttributesOnSpan?.(r,n,o)}}}var JK=C(QK(),1);var ZK="NodeFetch",mve=B(ZK,JK.UndiciInstrumentation,t=>Ove(t)),hve=B(`${ZK}.sentry`,Xs,t=>t),gve=((t={})=>({name:"NodeFetch",setupOnce(){Rve(t,H()?.getOptions())&&mve(t),hve(t)}})),eW=gve;function Ave(t,e="/"){let r=`${t}`;return r.endsWith("/")&&e.startsWith("/")?`${r}${e.slice(1)}`:!r.endsWith("/")&&!e.startsWith("/")?`${r}/${e.slice(1)}`:`${r}${e}`}function Rve(t,e={}){return typeof t.spans=="boolean"?t.spans:!e.skipOpenTelemetrySetup&&st(e)}function Ove(t={}){return{requireParentforSpans:!1,ignoreRequestHook:r=>{let n=Ave(r.origin,r.path),o=t.ignoreOutgoingRequests;return!!(o&&n&&o(n))},startSpanHook:()=>({[ae]:"auto.http.otel.node_fetch"})}}var TW=C(pW(),1);var Rn=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;M();var KE=C(re(),1),On=C(ee(),1);ue();var Or;(function(t){let e="express.type";t.EXPRESS_TYPE=e;let r="express.name";t.EXPRESS_NAME=r})(Or||(Or={}));var $n;(function(t){let e="router";t.ROUTER=e;let r="middleware";t.MIDDLEWARE=r;let n="request_handler";t.REQUEST_HANDLER=n})($n||($n={}));var aR=Symbol("express-layer-patched"),wo="__ot_middlewares";var dW=(t,e)=>{Array.isArray(t[wo])===!1&&Object.defineProperty(t,wo,{enumerable:!1,value:[]}),e!==void 0&&t[wo].push(e)},EW=(t,e)=>{let r=e.handle?.stack?.[0];return r?.route?.path?`${t}${r.route.path}`:r?.handle?.stack?EW(t,r):t},fW=(t,e,r)=>{if(e.name==="router"){let n=EW("",e),o=n||r||t||"/";return{attributes:{[Or.EXPRESS_NAME]:o,[Or.EXPRESS_TYPE]:$n.ROUTER},name:`router - ${o}`}}else return e.name==="bound dispatch"||e.name==="handle"?{attributes:{[Or.EXPRESS_NAME]:(t||r)??"request handler",[Or.EXPRESS_TYPE]:$n.REQUEST_HANDLER},name:`request handler${e.path?` - ${t||r}`:""}`}:{attributes:{[Or.EXPRESS_NAME]:e.name,[Or.EXPRESS_TYPE]:$n.MIDDLEWARE},name:`middleware - ${e.name}`}},Uve=(t,e)=>{if(typeof e=="string")return e===t;if(e instanceof RegExp)return e.test(t);if(typeof e=="function")return e(t);throw new TypeError("Pattern is in unsupported datatype")},SW=(t,e,r)=>{if(Array.isArray(r?.ignoreLayersType)&&r?.ignoreLayersType?.includes(e))return!0;if(Array.isArray(r?.ignoreLayers)===!1)return!1;try{for(let n of r.ignoreLayers)if(Uve(t,n))return!0}catch{}return!1},cR=t=>t instanceof Error?[t,t.message]:[String(t),String(t)],YE=t=>{let e=t[0];return Array.isArray(e)?e.map(r=>_W(r)||"").join(","):_W(e)},_W=t=>{if(typeof t=="string")return t;if(t instanceof RegExp||typeof t=="number")return t.toString()};var wve="0.1.0",Vve="@sentry/instrumentation-express-v5",$E=class extends On.InstrumentationBase{constructor(e={}){super(Vve,wve,e)}init(){return[new On.InstrumentationNodeModuleDefinition("express",[">=5.0.0"],e=>this._setup(e),e=>this._tearDown(e))]}_setup(e){let r=e.Router.prototype;return(0,On.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,On.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,On.isWrapped)(e.application.use)&&this._unwrap(e.application,"use"),this._wrap(e.application,"use",this._getAppUsePatch()),e}_tearDown(e){if(e===void 0)return;let r=e.Router.prototype;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(e.application,"use")}_getRoutePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,YE(o)),s}}}_getRouterUsePatch(){let e=this;return function(r){return function(...o){let s=r.apply(this,o),i=this.stack[this.stack.length-1];return e._applyPatch(i,YE(o)),s}}}_getAppUsePatch(){let e=this;return function(r){return function(...o){let s=this.router,i=r.apply(this,o);if(s){let a=s.stack[s.stack.length-1];e._applyPatch(a,YE(o))}return i}}}_applyPatch(e,r){let n=this;e[aR]!==!0&&(e[aR]=!0,this._wrap(e,"handle",o=>{if(o.length===4)return o;let s=function(i,a){dW(i,r);let c=i[wo].filter(O=>O!=="/"&&O!=="/*").join("").replace(/\/{2,}/g,"/"),u=c.length>0?c:void 0,l={[Tu]:u},p=fW(c,e,r),_=p.attributes[Or.EXPRESS_TYPE],d=(0,KE.getRPCMetadata)(F.active());if(d?.type===KE.RPCType.HTTP&&(d.route=u),SW(p.name,_,n.getConfig()))return _===$n.MIDDLEWARE&&i[wo].pop(),o.apply(this,arguments);if(K.getSpan(F.active())===void 0)return o.apply(this,arguments);let S=n._getSpanName({request:i,layerType:_,route:c},p.name),f=n.tracer.startSpan(S,{attributes:Object.assign(l,p.attributes)}),{requestHook:T}=n.getConfig();T&&(0,On.safeExecuteInTheMiddle)(()=>T(f,{request:i,layerType:_,route:c}),O=>{O&&tr.error("express instrumentation: request hook failed",O)},!0);let h=!1;p.attributes[Or.EXPRESS_TYPE]!==$n.MIDDLEWARE&&(f.end(),h=!0);let A=()=>{h===!1&&(h=!0,f.end())},N=Array.from(arguments),I=N.findIndex(O=>typeof O=="function");I>=0&&(arguments[I]=function(){let O=arguments[0],b=![void 0,null,"route","router"].includes(O);if(!h&&b){let[X,$]=cR(O);f.recordException(X),f.setStatus({code:fe.ERROR,message:$})}return h===!1&&(h=!0,i.res?.removeListener("finish",A),f.end()),i.route&&b||i[wo].pop(),N[I].apply(this,arguments)});try{return o.apply(this,arguments)}catch(O){let[b,v]=cR(O);throw f.recordException(b),f.setStatus({code:fe.ERROR,message:v}),O}finally{h||a.once("finish",A)}};for(let i in o)Object.defineProperty(s,i,{get(){return o[i]},set(a){o[i]=a}});return s}))}_getSpanName(e,r){let{spanNameHook:n}=this.getConfig();if(!(n instanceof Function))return r;try{return n(e,r)??r}catch(o){return tr.error("express instrumentation: error calling span name rewrite hook",o),r}}};var mW="Express",Bve="Express-V5";function hW(t){Te(t,"auto.http.otel.express");let e=k(t).data,r=e["express.type"];r&&t.setAttribute(W,`${r}.express`);let n=e["express.name"];typeof n=="string"&&t.updateName(n)}function gW(t,e){if(ie()===un())return Rn&&m.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),e;if(t.layerType==="request_handler"){let r=t.request,n=r.method?r.method.toUpperCase():"GET";ie().setTransactionName(`${n} ${t.route}`)}return e}var AW=B(mW,()=>new TW.ExpressInstrumentation({requestHook:t=>hW(t),spanNameHook:(t,e)=>gW(t,e)})),RW=B(Bve,()=>new $E({requestHook:t=>hW(t),spanNameHook:(t,e)=>gW(t,e)})),Gve=(()=>({name:mW,setupOnce(){AW(),RW()}})),lR=Gve;var mR=C(require("node:diagnostics_channel"),1);var SR=C(require("node:diagnostics_channel"),1);M();var QE=C(re(),1),ZW=C(ee(),1);ue();var jW=C(UW(),1);var ku=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")};var Kve={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Fu=t=>t.replace(/[[\]\\-]/g,"\\$&"),Wve=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),wW=t=>t.join(""),VW=(t,e)=>{let r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");let n=[],o=[],s=r+1,i=!1,a=!1,c=!1,u=!1,l=r,p="";e:for(;s<t.length;){let f=t.charAt(s);if((f==="!"||f==="^")&&s===r+1){u=!0,s++;continue}if(f==="]"&&i&&!c){l=s+1;break}if(i=!0,f==="\\"&&!c){c=!0,s++;continue}if(f==="["&&!c){for(let[T,[h,A,N]]of Object.entries(Kve))if(t.startsWith(T,s)){if(p)return["$.",!1,t.length-r,!0];s+=T.length,N?o.push(h):n.push(h),a=a||A;continue e}}if(c=!1,p){f>p?n.push(Fu(p)+"-"+Fu(f)):f===p&&n.push(Fu(f)),p="",s++;continue}if(t.startsWith("-]",s+1)){n.push(Fu(f+"-")),s+=2;continue}if(t.startsWith("-",s+1)){p=f,s+=2;continue}n.push(Fu(f)),s++}if(l<s)return["",!1,0,!1];if(!n.length&&!o.length)return["$.",!1,t.length-r,!0];if(o.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!u){let f=n[0].length===2?n[0].slice(-1):n[0];return[Wve(f),!1,l-r,!1]}let _="["+(u?"^":"")+wW(n)+"]",d="["+(u?"":"^")+wW(o)+"]";return[n.length&&o.length?"("+_+"|"+d+")":n.length?_:d,a,l-r,!0]};var Vo=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1");var Yt,Xve=new Set(["!","?","+","*","@"]),dR=t=>Xve.has(t),BW=t=>dR(t.type),zve=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Qve=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),Jve=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),GW=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Zve="(?!(?:^|/)\\.\\.?(?:$|/))",WE="(?!\\.)",ebe=new Set(["[","."]),tbe=new Set(["..","."]),rbe=new Set("().*{}+?[]^$\\!"),nbe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ER="[^/]",HW=ER+"*?",kW=ER+"+?",Qs=class{type;#r;#n;#o=!1;#e=[];#t;#a;#u;#c=!1;#s;#i;#l=!1;constructor(e,r,n={}){this.type=e,e&&(this.#n=!0),this.#t=r,this.#r=this.#t?this.#t.#r:this,this.#s=this.#r===this?n:this.#r.#s,this.#u=this.#r===this?[]:this.#r.#u,e==="!"&&!this.#r.#c&&this.#u.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#n!==void 0)return this.#n;for(let e of this.#e)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#n=!0;return this.#n}toString(){return this.#i!==void 0?this.#i:this.type?this.#i=this.type+"("+this.#e.map(e=>String(e)).join("|")+")":this.#i=this.#e.map(e=>String(e)).join("")}#T(){if(this!==this.#r)throw new Error("should only call on root");if(this.#c)return this;this.toString(),this.#c=!0;let e;for(;e=this.#u.pop();){if(e.type!=="!")continue;let r=e,n=r.#t;for(;n;){for(let o=r.#a+1;!n.type&&o<n.#e.length;o++)for(let s of e.#e){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#e[o])}r=n,n=r.#t}}return this}push(...e){for(let r of e)if(r!==""){if(typeof r!="string"&&!(r instanceof Yt&&r.#t===this))throw new Error("invalid part: "+r);this.#e.push(r)}}toJSON(){let e=this.type===null?this.#e.slice().map(r=>typeof r=="string"?r:r.toJSON()):[this.type,...this.#e.map(r=>r.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#r||this.#r.#c&&this.#t?.type==="!")&&e.push({}),e}isStart(){if(this.#r===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let e=this.#t;for(let r=0;r<this.#a;r++){let n=e.#e[r];if(!(n instanceof Yt&&n.type==="!"))return!1}return!0}isEnd(){if(this.#r===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let e=this.#t?this.#t.#e.length:0;return this.#a===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let r=new Yt(this.type,e);for(let n of this.#e)r.copyIn(n);return r}static#p(e,r,n,o,s){let i=o.maxExtglobRecursion??2,a=!1,c=!1,u=-1,l=!1;if(r.type===null){let f=n,T="";for(;f<e.length;){let h=e.charAt(f++);if(a||h==="\\"){a=!a,T+=h;continue}if(c){f===u+1?(h==="^"||h==="!")&&(l=!0):h==="]"&&!(f===u+2&&l)&&(c=!1),T+=h;continue}else if(h==="["){c=!0,u=f,l=!1,T+=h;continue}if(!o.noext&&dR(h)&&e.charAt(f)==="("&&s<=i){r.push(T),T="";let N=new Yt(h,r);f=Yt.#p(e,N,f,o,s+1),r.push(N);continue}T+=h}return r.push(T),f}let p=n+1,_=new Yt(null,r),d=[],S="";for(;p<e.length;){let f=e.charAt(p++);if(a||f==="\\"){a=!a,S+=f;continue}if(c){p===u+1?(f==="^"||f==="!")&&(l=!0):f==="]"&&!(p===u+2&&l)&&(c=!1),S+=f;continue}else if(f==="["){c=!0,u=p,l=!1,S+=f;continue}if(dR(f)&&e.charAt(p)==="("&&(s<=i||r&&r.#_(f))){let h=r&&r.#_(f)?0:1;_.push(S),S="";let A=new Yt(f,_);_.push(A),p=Yt.#p(e,A,p,o,s+h);continue}if(f==="|"){_.push(S),S="",d.push(_),_=new Yt(null,r);continue}if(f===")")return S===""&&r.#e.length===0&&(r.#l=!0),_.push(S),S="",r.push(...d,_),p;S+=f}return r.type=null,r.#n=void 0,r.#e=[e.substring(n-1)],p}#m(e){return this.#E(e,Qve)}#E(e,r=zve){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null)return!1;let n=e.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#_(n.type,r)}#_(e,r=Jve){return!!r.get(this.type)?.includes(e)}#h(e,r){let n=e.#e[0],o=new Yt(null,n,this.options);o.#e.push(""),n.push(o),this.#f(e,r)}#f(e,r){let n=e.#e[0];this.#e.splice(r,1,...n.#e);for(let o of n.#e)typeof o=="object"&&(o.#t=this);this.#i=void 0}#g(e){return!!GW.get(this.type)?.has(e)}#A(e){if(!e||typeof e!="object"||e.type!==null||e.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let r=e.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#g(r.type)}#R(e){let r=GW.get(this.type),n=e.#e[0],o=r?.get(n.type);if(!o)return!1;this.#e=n.#e;for(let s of this.#e)typeof s=="object"&&(s.#t=this);this.type=o,this.#i=void 0,this.#l=!1}#d(){if(BW(this)){let e=0,r=!1;do{r=!0;for(let n=0;n<this.#e.length;n++){let o=this.#e[n];typeof o=="object"&&(o.#d(),this.#E(o)?(r=!1,this.#f(o,n)):this.#m(o)?(r=!1,this.#h(o,n)):this.#A(o)&&(r=!1,this.#R(o)))}}while(!r&&++e<10)}else for(let e of this.#e)typeof e=="object"&&e.#d();this.#i=void 0}static fromGlob(e,r={}){let n=new Yt(null,void 0,r);return Yt.#p(e,n,0,r,0),n}toMMPattern(){if(this!==this.#r)return this.#r.toMMPattern();let e=this.toString(),[r,n,o,s]=this.toRegExpSource();if(!(o||this.#n||this.#s.nocase&&!this.#s.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#s.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,a),{_src:r,_glob:e})}get options(){return this.#s}toRegExpSource(e){let r=e??!!this.#s.dot;if(this.#r===this&&(this.#d(),this.#T()),!BW(this)){let c=this.isStart()&&this.isEnd(),u=this.#e.map(d=>{let[S,f,T,h]=typeof d=="string"?Yt.#O(d,this.#n,c):d.toRegExpSource(e);return this.#n=this.#n||T,this.#o=this.#o||h,S}).join(""),l="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&tbe.has(this.#e[0]))){let S=ebe,f=r&&S.has(u.charAt(0))||u.startsWith("\\.")&&S.has(u.charAt(2))||u.startsWith("\\.\\.")&&S.has(u.charAt(4)),T=!r&&!e&&S.has(u.charAt(0));l=f?Zve:T?WE:""}let p="";return this.isEnd()&&this.#r.#c&&this.#t?.type==="!"&&(p="(?:$|\\/)"),[l+u+p,Vo(u),this.#n=!!this.#n,this.#o]}let n=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#S(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let c=this.toString(),u=this;return u.#e=[c],u.type=null,u.#n=void 0,[c,Vo(this.toString()),!1,!1]}let i=!n||e||r||!WE?"":this.#S(!0);i===s&&(i=""),i&&(s=`(?:${s})(?:${i})*?`);let a="";if(this.type==="!"&&this.#l)a=(this.isStart()&&!r?WE:"")+kW;else{let c=this.type==="!"?"))"+(this.isStart()&&!r&&!e?WE:"")+HW+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&i?")":this.type==="*"&&i?")?":`)${this.type}`;a=o+s+c}return[a,Vo(s),this.#n=!!this.#n,this.#o]}#S(e){return this.#e.map(r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");let[n,o,s,i]=r.toRegExpSource(e);return this.#o=this.#o||i,n}).filter(r=>!(this.isStart()&&this.isEnd())||!!r).join("|")}static#O(e,r,n=!1){let o=!1,s="",i=!1,a=!1;for(let c=0;c<e.length;c++){let u=e.charAt(c);if(o){o=!1,s+=(rbe.has(u)?"\\":"")+u,a=!1;continue}if(u==="\\"){c===e.length-1?s+="\\\\":o=!0;continue}if(u==="["){let[l,p,_,d]=VW(e,c);if(_){s+=l,i=i||p,c+=_-1,r=r||d,a=!1;continue}}if(u==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?kW:HW,r=!0;continue}else a=!1;if(u==="?"){s+=ER,r=!0;continue}s+=nbe(u)}return[s,Vo(e),!!r,i]}};Yt=Qs;var fR=(t,{windowsPathsNoEscape:e=!1}={})=>e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&");var lt=(t,e,r={})=>(ku(e),!r.nocomment&&e.charAt(0)==="#"?!1:new Ma(e,r).match(t)),obe=/^\*+([^+@!?\*\[\(]*)$/,sbe=t=>e=>!e.startsWith(".")&&e.endsWith(t),ibe=t=>e=>e.endsWith(t),abe=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),cbe=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),ube=/^\*+\.\*+$/,lbe=t=>!t.startsWith(".")&&t.includes("."),pbe=t=>t!=="."&&t!==".."&&t.includes("."),_be=/^\.\*+$/,dbe=t=>t!=="."&&t!==".."&&t.startsWith("."),Ebe=/^\*+$/,fbe=t=>t.length!==0&&!t.startsWith("."),Sbe=t=>t.length!==0&&t!=="."&&t!=="..",Tbe=/^\?+([^+@!?\*\[\(]*)?$/,mbe=([t,e=""])=>{let r=YW([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},hbe=([t,e=""])=>{let r=$W([t]);return e?(e=e.toLowerCase(),n=>r(n)&&n.toLowerCase().endsWith(e)):r},gbe=([t,e=""])=>{let r=$W([t]);return e?n=>r(n)&&n.endsWith(e):r},Abe=([t,e=""])=>{let r=YW([t]);return e?n=>r(n)&&n.endsWith(e):r},YW=([t])=>{let e=t.length;return r=>r.length===e&&!r.startsWith(".")},$W=([t])=>{let e=t.length;return r=>r.length===e&&r!=="."&&r!==".."},KW=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",FW={win32:{sep:"\\"},posix:{sep:"/"}},Rbe=KW==="win32"?FW.win32.sep:FW.posix.sep;lt.sep=Rbe;var Nt=Symbol("globstar **");lt.GLOBSTAR=Nt;var Obe="[^/]",Nbe=Obe+"*?",Ibe="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Pbe="(?:(?!(?:\\/|^)\\.).)*?",Cbe=(t,e={})=>r=>lt(r,t,e);lt.filter=Cbe;var Nr=(t,e={})=>Object.assign({},t,e),ybe=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return lt;let e=lt;return Object.assign((n,o,s={})=>e(n,o,Nr(t,s)),{Minimatch:class extends e.Minimatch{constructor(o,s={}){super(o,Nr(t,s))}static defaults(o){return e.defaults(Nr(t,o)).Minimatch}},AST:class extends e.AST{constructor(o,s,i={}){super(o,s,Nr(t,i))}static fromGlob(o,s={}){return e.AST.fromGlob(o,Nr(t,s))}},unescape:(n,o={})=>e.unescape(n,Nr(t,o)),escape:(n,o={})=>e.escape(n,Nr(t,o)),filter:(n,o={})=>e.filter(n,Nr(t,o)),defaults:n=>e.defaults(Nr(t,n)),makeRe:(n,o={})=>e.makeRe(n,Nr(t,o)),braceExpand:(n,o={})=>e.braceExpand(n,Nr(t,o)),match:(n,o,s={})=>e.match(n,o,Nr(t,s)),sep:e.sep,GLOBSTAR:Nt})};lt.defaults=ybe;var WW=(t,e={})=>(ku(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:(0,jW.default)(t));lt.braceExpand=WW;var Mbe=(t,e={})=>new Ma(t,e).makeRe();lt.makeRe=Mbe;var vbe=(t,e,r={})=>{let n=new Ma(e,r);return t=t.filter(o=>n.match(o)),n.options.nonull&&!t.length&&t.push(e),t};lt.match=vbe;var qW=/[?*]|[+@!]\(.*?\)|\[|\]/,bbe=t=>t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ma=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,r={}){ku(e),r=r||{},this.options=r,this.maxGlobstarRecursion=r.maxGlobstarRecursion??200,this.pattern=e,this.platform=r.platform||KW,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let r of e)if(typeof r!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let o=this.globParts.map((s,i,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let c=s[0]===""&&s[1]===""&&(s[2]==="?"||!qW.test(s[2]))&&!qW.test(s[3]),u=/^[a-z]:/i.test(s[0]);if(c)return[...s.slice(0,4),...s.slice(4).map(l=>this.parse(l))];if(u)return[s[0],...s.slice(1).map(l=>this.parse(l))]}return s.map(c=>this.parse(c))});if(this.debug(this.pattern,o),this.set=o.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let i=this.set[s];i[0]===""&&i[1]===""&&this.globParts[s][2]==="?"&&typeof i[3]=="string"&&/^[a-z]:$/i.test(i[3])&&(i[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let o=0;o<e[n].length;o++)e[n][o]==="**"&&(e[n][o]="*");let{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):r>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let o=n;for(;r[o+1]==="**";)o++;o!==n&&r.splice(n,o-n)}return r})}levelOneOptimize(e){return e.map(r=>(r=r.reduce((n,o)=>{let s=n[n.length-1];return o==="**"&&s==="**"?n:o===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(o),n)},[]),r.length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let o=1;o<e.length-1;o++){let s=e[o];o===1&&s===""&&e[0]===""||(s==="."||s==="")&&(r=!0,e.splice(o,1),o--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let o=e[n-1];o&&o!=="."&&o!==".."&&o!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let i=o;for(;n[i+1]==="**";)i++;i>o&&n.splice(o+1,i-o);let a=n[o+1],c=n[o+2],u=n[o+3];if(a!==".."||!c||c==="."||c===".."||!u||u==="."||u==="..")continue;r=!0,n.splice(o,1);let l=n.slice(0);l[o]="**",e.push(l),o--}if(!this.preserveMultipleSlashes){for(let i=1;i<n.length-1;i++){let a=n[i];i===1&&a===""&&n[0]===""||(a==="."||a==="")&&(r=!0,n.splice(i,1),i--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let i=n[s-1];if(i&&i!=="."&&i!==".."&&i!=="**"){r=!0;let c=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...c),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){let o=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(o){e[r]=[],e[n]=o;break}}return e.filter(r=>r.length)}partsMatch(e,r,n=!1){let o=0,s=0,i=[],a="";for(;o<e.length&&s<r.length;)if(e[o]===r[s])i.push(a==="b"?r[s]:e[o]),o++,s++;else if(n&&e[o]==="**"&&r[s]===e[o+1])i.push(e[o]),o++;else if(n&&r[s]==="**"&&e[o]===r[s+1])i.push(r[s]),s++;else if(e[o]==="*"&&r[s]&&(this.options.dot||!r[s].startsWith("."))&&r[s]!=="**"){if(a==="b")return!1;a="a",i.push(e[o]),o++,s++}else if(r[s]==="*"&&e[o]&&(this.options.dot||!e[o].startsWith("."))&&e[o]!=="**"){if(a==="a")return!1;a="b",i.push(r[s]),o++,s++}else return!1;return e.length===r.length&&i}parseNegate(){if(this.nonegate)return;let e=this.pattern,r=!1,n=0;for(let o=0;o<e.length&&e.charAt(o)==="!";o++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r,n=!1){let o=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),c=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),u=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),l=!u&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3]),p=c?3:a?0:void 0,_=l?3:u?0:void 0;if(typeof p=="number"&&typeof _=="number"){let[d,S]=[e[p],r[_]];d.toLowerCase()===S.toLowerCase()&&(r[_]=d,s=_,o=p)}}let{optimizationLevel:i=1}=this.options;return i>=2&&(e=this.levelTwoFileOptimize(e)),r.includes(Nt)?this.#r(e,r,n,o,s):this.#o(e,r,n,o,s)}#r(e,r,n,o,s){let i=r.indexOf(Nt,s),a=r.lastIndexOf(Nt),[c,u,l]=n?[r.slice(s,i),r.slice(i+1),[]]:[r.slice(s,i),r.slice(i+1,a),r.slice(a+1)];if(c.length){let A=e.slice(o,o+c.length);if(!this.#o(A,c,n,0,0))return!1;o+=c.length}let p=0;if(l.length){if(l.length+o>e.length)return!1;let A=e.length-l.length;if(this.#o(e,l,n,A,0))p=l.length;else{if(e[e.length-1]!==""||o+l.length===e.length||(A--,!this.#o(e,l,n,A,0)))return!1;p=l.length+1}}if(!u.length){let A=!!p;for(let N=o;N<e.length-p;N++){let I=String(e[N]);if(A=!0,I==="."||I===".."||!this.options.dot&&I.startsWith("."))return!1}return n||A}let _=[[[],0]],d=_[0],S=0,f=[0];for(let A of u)A===Nt?(f.push(S),d=[[],0],_.push(d)):(d[0].push(A),S++);let T=_.length-1,h=e.length-p;for(let A of _)A[1]=h-(f[T--]+A[0].length);return!!this.#n(e,_,o,0,n,0,!!p)}#n(e,r,n,o,s,i,a){let c=r[o];if(!c){for(let p=n;p<e.length;p++){a=!0;let _=e[p];if(_==="."||_===".."||!this.options.dot&&_.startsWith("."))return!1}return a}let[u,l]=c;for(;n<=l;){if(this.#o(e.slice(0,n+u.length),u,s,n,0)&&i<this.maxGlobstarRecursion){let d=this.#n(e,r,n+u.length,o+1,s,i+1,a);if(d!==!1)return d}let _=e[n];if(_==="."||_===".."||!this.options.dot&&_.startsWith("."))return!1;n++}return s||null}#o(e,r,n,o,s){let i,a,c,u;for(i=o,a=s,u=e.length,c=r.length;i<u&&a<c;i++,a++){this.debug("matchOne loop");let l=r[a],p=e[i];if(this.debug(r,l,p),l===!1||l===Nt)return!1;let _;if(typeof l=="string"?(_=p===l,this.debug("string match",l,p,_)):(_=l.test(p),this.debug("pattern match",l,p,_)),!_)return!1}if(i===u&&a===c)return!0;if(i===u)return n;if(a===c)return i===u-1&&e[i]==="";throw new Error("wtf?")}braceExpand(){return WW(this.pattern,this.options)}parse(e){ku(e);let r=this.options;if(e==="**")return Nt;if(e==="")return"";let n,o=null;(n=e.match(Ebe))?o=r.dot?Sbe:fbe:(n=e.match(obe))?o=(r.nocase?r.dot?cbe:abe:r.dot?ibe:sbe)(n[1]):(n=e.match(Tbe))?o=(r.nocase?r.dot?hbe:mbe:r.dot?gbe:Abe)(n):(n=e.match(ube))?o=r.dot?pbe:lbe:(n=e.match(_be))&&(o=dbe);let s=Qs.fromGlob(e,this.options).toMMPattern();return o&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:o}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let r=this.options,n=r.noglobstar?Nbe:r.dot?Ibe:Pbe,o=new Set(r.nocase?["i"]:[]),s=e.map(c=>{let u=c.map(l=>{if(l instanceof RegExp)for(let p of l.flags.split(""))o.add(p);return typeof l=="string"?bbe(l):l===Nt?Nt:l._src});return u.forEach((l,p)=>{let _=u[p+1],d=u[p-1];l!==Nt||d===Nt||(d===void 0?_!==void 0&&_!==Nt?u[p+1]="(?:\\/|"+n+"\\/)?"+_:u[p]=n:_===void 0?u[p-1]=d+"(?:\\/|"+n+")?":_!==Nt&&(u[p-1]=d+"(?:\\/|\\/"+n+"\\/)"+_,u[p+1]=Nt))}),u.filter(l=>l!==Nt).join("/")}).join("|"),[i,a]=e.length>1?["(?:",")"]:["",""];s="^"+i+s+a+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,r=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let o=this.slashSplit(e);this.debug(this.pattern,"split",o);let s=this.set;this.debug(this.pattern,"set",s);let i=o[o.length-1];if(!i)for(let a=o.length-2;!i&&a>=0;a--)i=o[a];for(let a=0;a<s.length;a++){let c=s[a],u=o;if(n.matchBase&&c.length===1&&(u=[i]),this.matchOne(u,c,r))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return lt.defaults(e).Minimatch}};lt.AST=Qs;lt.Minimatch=Ma;lt.escape=fR;lt.unescape=Vo;var XW="@fastify/otel",Dbe="0.8.0",xbe=">=4.0.0 <6",zW=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],me={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},Bo={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Kn="anonymous",xt=Symbol("fastify otel instance"),Go=Symbol("fastify otel request spans"),qu=Symbol("fastify otel request context"),QW=Symbol("fastify otel addhook original"),JW=Symbol("fastify otel setnotfound original"),XE=Symbol("fastify otel ignore path"),zE=class extends ZW.InstrumentationBase{constructor(e){if(super(XW,Dbe,e),this.servername=e?.servername??process.env.OTEL_SERVICE_NAME??"fastify",this[XE]=null,this._logger=tr.createComponentLogger({namespace:XW}),e?.ignorePaths!=null||process.env.OTEL_FASTIFY_IGNORE_PATHS!=null){let r=e?.ignorePaths??process.env.OTEL_FASTIFY_IGNORE_PATHS;if((typeof r!="string"||r.length===0)&&typeof r!="function")throw new TypeError("ignorePaths must be a string or a function");let n=lt;this[XE]=o=>typeof r=="function"?r(o):n(o.url,r)}}enable(){if(this._handleInitialization===void 0&&this.getConfig().registerOnInitialization){let e=this.plugin();this._handleInitialization=r=>{r.fastify.register(e)},SR.default.subscribe("fastify.initialization",this._handleInitialization)}return super.enable()}disable(){return this._handleInitialization&&(SR.default.unsubscribe("fastify.initialization",this._handleInitialization),this._handleInitialization=void 0),super.disable()}init(){return[]}plugin(){let e=this;return r[Symbol.for("skip-override")]=!0,r[Symbol.for("fastify.display-name")]="@fastify/otel",r[Symbol.for("plugin-meta")]={fastify:xbe,name:"@fastify/otel"},r;function r(n,o,s){n.decorate(xt,e),n.decorate(QW,n.addHook),n.decorate(JW,n.setNotFoundHandler),n.decorateRequest("opentelemetry",function(){let _=this[qu];return{span:this[Go],tracer:e.tracer,context:_,inject:(S,f)=>yt.inject(_,S,f),extract:(S,f)=>yt.extract(_,S,f)}}),n.decorateRequest(Go,null),n.decorateRequest(qu,null),n.addHook("onRoute",function(p){if(e[XE]?.(p)===!0){e._logger.debug(`Ignoring route instrumentation ${p.method} ${p.url} because it matches the ignore path`);return}for(let _ of zW)if(p[_]!=null){let d=p[_];if(typeof d=="function")p[_]=l(d,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[me.FASTIFY_TYPE]:Bo.ROUTE,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:d.name?.length>0?d.name:Kn});else if(Array.isArray(d)){let S=[];for(let f of d)S.push(l(f,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route -> ${_}`,[me.FASTIFY_TYPE]:Bo.ROUTE,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:f.name?.length>0?f.name:Kn}));p[_]=S}}p.onSend!=null?p.onSend=Array.isArray(p.onSend)?[...p.onSend,i]:[p.onSend,i]:p.onSend=i,p.onError!=null?p.onError=Array.isArray(p.onError)?[...p.onError,a]:[p.onError,a]:p.onError=a,p.handler=l(p.handler,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - route-handler`,[me.FASTIFY_TYPE]:Bo.HANDLER,[Sn]:p.url,[me.HOOK_CALLBACK_NAME]:p.handler.name.length>0?p.handler.name:Kn})}),n.addHook("onRequest",function(p,_,d){if(this[xt].isEnabled()===!1)return d();if(this[xt][XE]?.({url:p.url,method:p.method})===!0)return this[xt]._logger.debug(`Ignoring request ${p.method} ${p.url} because it matches the ignore path`),d();let S=F.active();K.getSpan(S)==null&&(S=yt.extract(S,p.headers));let f=(0,QE.getRPCMetadata)(S);p.routeOptions.url!=null&&f?.type===QE.RPCType.HTTP&&(f.route=p.routeOptions.url);let T=this[xt].tracer.startSpan("request",{attributes:{[ir]:n[xt].servername,[me.ROOT]:"@fastify/otel",[Sn]:p.url,[Hs]:p.method}},S);p[qu]=K.setSpan(S,T),p[Go]=T,F.with(p[qu],()=>{d()})}),n.addHook("onResponse",function(p,_,d){let S=p[Go];S!=null&&(S.setStatus({code:fe.OK,message:"OK"}),S.setAttributes({[Lo]:404}),S.end()),p[Go]=null,d()}),n.addHook=c,n.setNotFoundHandler=u,s();function i(p,_,d,S){let f=p[Go];f!=null&&(_.statusCode<500&&f.setStatus({code:fe.OK,message:"OK"}),f.setAttributes({[Lo]:_.statusCode}),f.end()),p[Go]=null,S(null,d)}function a(p,_,d,S){let f=p[Go];f!=null&&(f.setStatus({code:fe.ERROR,message:d.message}),f.recordException(d)),S()}function c(p,_){let d=this[QW];return zW.includes(p)?d.call(this,p,l(_,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - ${p}`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:_.name?.length>0?_.name:Kn})):d.call(this,p,_)}function u(p,_){let d=this[JW];typeof p=="function"?(_=l(p,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.name?.length>0?p.name:Kn}),d.call(this,_)):(p.preValidation!=null&&(p.preValidation=l(p.preValidation,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.preValidation.name?.length>0?p.preValidation.name:Kn})),p.preHandler!=null&&(p.preHandler=l(p.preHandler,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:p.preHandler.name?.length>0?p.preHandler.name:Kn})),_=l(_,{[ir]:n[xt].servername,[me.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[me.FASTIFY_TYPE]:Bo.INSTANCE,[me.HOOK_CALLBACK_NAME]:_.name?.length>0?_.name:Kn}),d.call(this,p,_))}function l(p,_={}){return function(...S){let f=this[xt],[T]=S;if(f.isEnabled()===!1)return p.call(this,...S);let h=T[qu]??F.active(),A=f.tracer.startSpan(`handler - ${p.name?.length>0?p.name:this.pluginName??Kn}`,{attributes:_},h);return F.with(K.setSpan(h,A),function(){try{let N=p.call(this,...S);return typeof N?.then=="function"?N.then(I=>(A.end(),I),I=>(A.setStatus({code:fe.ERROR,message:I.message}),A.recordException(I),A.end(),Promise.reject(I))):(A.end(),N)}catch(N){throw A.setStatus({code:fe.ERROR,message:N.message}),A.recordException(N),A.end(),N}},this)}}}}};M();var ef=C(re(),1),Js=C(ee(),1);ue();var Wn;(function(t){let e="fastify.name";t.FASTIFY_NAME=e;let r="fastify.type";t.FASTIFY_TYPE=r;let n="hook.name";t.HOOK_NAME=n;let o="plugin.name";t.PLUGIN_NAME=o})(Wn||(Wn={}));var ju;(function(t){let e="middleware";t.MIDDLEWARE=e;let r="request_handler";t.REQUEST_HANDLER=r})(ju||(ju={}));var Yu;(function(t){let e="middleware";t.MIDDLEWARE=e;let r="request handler";t.REQUEST_HANDLER=r})(Yu||(Yu={}));M();var $u=Symbol("opentelemetry.instrumentation.fastify.request_active_span");function TR(t,e,r,n={}){let o=e.startSpan(r,{attributes:n}),s=t[$u]||[];return s.push(o),Object.defineProperty(t,$u,{enumerable:!1,configurable:!0,value:s}),o}function JE(t,e){let r=t[$u]||[];r.length&&(r.forEach(n=>{e&&(n.setStatus({code:fe.ERROR,message:e.message}),n.recordException(e)),n.end()}),delete t[$u])}function t2(t,e,r){let n,o;try{o=t(),e2(o)&&o.then(s=>e(void 0,s),s=>e(s))}catch(s){n=s}finally{if(!e2(o)&&(e(n,o),n))throw n;return o}}function e2(t){return typeof t=="object"&&t&&typeof Object.getOwnPropertyDescriptor(t,"then")?.value=="function"||!1}var Ube="0.1.0",wbe="@sentry/instrumentation-fastify-v3",r2="anonymous",Vbe=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),ZE=class extends Js.InstrumentationBase{constructor(e={}){super(wbe,Ube,e)}init(){return[new Js.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],e=>this._patchConstructor(e))]}_hookOnRequest(){let e=this;return function(n,o,s){if(!e.isEnabled())return s();e._wrap(o,"send",e._patchSend());let i=n,a=(0,ef.getRPCMetadata)(F.active()),c=i.routeOptions?i.routeOptions.url:n.routerPath;c&&a?.type===ef.RPCType.HTTP&&(a.route=c);let u=n.method||"GET";ie().setTransactionName(`${u} ${c}`),s()}}_wrapHandler(e,r,n,o){let s=this;return this._diag.debug("Patching fastify route.handler function"),function(...i){if(!s.isEnabled())return n.apply(this,i);let a=n.name||e||r2,c=`${Yu.MIDDLEWARE} - ${a}`,u=i[1],l=TR(u,s.tracer,c,{[Wn.FASTIFY_TYPE]:ju.MIDDLEWARE,[Wn.PLUGIN_NAME]:e,[Wn.HOOK_NAME]:r}),p=o&&i[i.length-1];return p&&(i[i.length-1]=function(..._){JE(u),p.apply(this,_)}),F.with(K.setSpan(F.active(),l),()=>t2(()=>n.apply(this,i),_=>{_ instanceof Error&&(l.setStatus({code:fe.ERROR,message:_.message}),l.recordException(_)),o||JE(u)}))}}_wrapAddHook(){let e=this;return this._diag.debug("Patching fastify server.addHook function"),function(r){return function(...o){let s=o[0],i=o[1],a=this.pluginName;if(!Vbe.has(s))return r.apply(this,o);let c=typeof o[o.length-1]=="function"&&i.constructor.name!=="AsyncFunction";return r.apply(this,[s,e._wrapHandler(a,s,i,c)])}}}_patchConstructor(e){let r=this;function n(...o){let s=e.fastify.apply(this,o);return s.addHook("onRequest",r._hookOnRequest()),s.addHook("preHandler",r._hookPreHandler()),Bbe(),r._wrap(s,"addHook",r._wrapAddHook()),s}return e.errorCodes!==void 0&&(n.errorCodes=e.errorCodes),n.fastify=n,n.default=n,n}_patchSend(){let e=this;return this._diag.debug("Patching fastify reply.send function"),function(n){return function(...s){let i=s[0];return e.isEnabled()?(0,Js.safeExecuteInTheMiddle)(()=>n.apply(this,s),a=>{!a&&i instanceof Error&&(a=i),JE(this,a)}):n.apply(this,s)}}}_hookPreHandler(){let e=this;return this._diag.debug("Patching fastify preHandler function"),function(n,o,s){if(!e.isEnabled())return s();let i=n,a=i.routeOptions?.handler||i.context?.handler,c=a?.name.startsWith("bound ")?a.name.substring(6):a?.name,u=`${Yu.REQUEST_HANDLER} - ${c||this.pluginName||r2}`,l={[Wn.PLUGIN_NAME]:this.pluginName,[Wn.FASTIFY_TYPE]:ju.REQUEST_HANDLER,[Tu]:i.routeOptions?i.routeOptions.url:n.routerPath};c&&(l[Wn.FASTIFY_NAME]=c);let p=TR(o,e.tracer,u,l);n2(p);let{requestHook:_}=e.getConfig();return _&&(0,Js.safeExecuteInTheMiddle)(()=>_(p,{request:n}),d=>{d&&e._diag.error("request hook failed",d)},!0),F.with(K.setSpan(F.active(),p),()=>{s()})}}};function Bbe(){let t=H();t&&t.on("spanStart",e=>{n2(e)})}function n2(t){let e=k(t).data,r=e["fastify.type"];if(e[W]||!r)return;t.setAttributes({[ae]:"auto.http.otel.fastify",[W]:`${r}.fastify`});let n=e["fastify.name"]||e["plugin.name"]||e["hook.name"];if(typeof n=="string"){let o=n.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");t.updateName(o)}}var s2="Fastify",Gbe="Fastify-V5",Hbe="Fastify-V3",i2=B(Hbe,()=>new ZE);function kbe(){let t=H();if(t)return t.getIntegrationByName(s2)}function o2(t,e,r,n){let o=kbe()?.getShouldHandleError()||u2;if(n==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&n==="onError-hook"){Rn&&m.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(t,e,r)&&Dt(t,{mechanism:{handled:!1,type:"fastify"}})}var a2=B(Gbe,()=>{let t=new zE,e=t.plugin();return mR.subscribe("fastify.initialization",r=>{let n=r.fastify;n?.register(e).after(o=>{o?Rn&&m.error("Failed to setup Fastify instrumentation",o):(qbe(),n&&jbe(n))})}),mR.subscribe("tracing:fastify.request.handler:error",r=>{let{error:n,request:o,reply:s}=r;o2.call(o2,n,o,s,"diagnostics-channel")}),t}),Fbe=(({shouldHandleError:t})=>{let e;return{name:s2,setupOnce(){e=t||u2,i2(),a2()},getShouldHandleError(){return e},setShouldHandleError(r){e=r}}}),c2=(t={})=>Fbe(t);function u2(t,e,r){let n=r.statusCode;return n>=500||n<=299}function l2(t){let e=k(t),r=e.description,n=e.data,o=n["fastify.type"],s=o==="hook",i=o===r?.startsWith("handler -"),a=r==="request"||o==="request-handler";if(n[W]||!i&&!a&&!s)return;let c=s?"hook":i?"middleware":a?"request-handler":"<unknown>";t.setAttributes({[ae]:"auto.http.otel.fastify",[W]:`${c}.fastify`});let u=n["fastify.name"]||n["plugin.name"]||n["hook.name"];if(typeof u=="string"){let l=u.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");t.updateName(l)}}function qbe(){let t=H();t&&t.on("spanStart",e=>{l2(e)})}function jbe(t){t.addHook("onRequest",async(e,r)=>{if(e.opentelemetry){let{span:s}=e.opentelemetry();s&&l2(s)}let n=e.routeOptions?.url,o=e.method||"GET";ie().setTransactionName(`${o} ${n}`)})}M();var L2=C(b2(),1);var D2="Graphql",x2=B(D2,L2.GraphQLInstrumentation,t=>{let e=w2(t);return{...e,responseHook(r,n){Te(r,"auto.graphql.otel.graphql"),n.errors?.length&&!k(r).status&&r.setStatus({code:fe.ERROR});let s=k(r).data,i=s["graphql.operation.type"],a=s["graphql.operation.name"];if(e.useOperationNameForRootSpan&&i){let c=ve(r),l=k(c).data[ma]||[],p=a?`${i} ${a}`:`${i}`;Array.isArray(l)?(l.push(p),c.setAttribute(ma,l)):typeof l=="string"?c.setAttribute(ma,[l,p]):c.setAttribute(ma,p),k(c).data["original-description"]||c.setAttribute("original-description",k(c).description),c.updateName(`${k(c).data["original-description"]} (${uLe(l)})`)}}}}),cLe=((t={})=>({name:D2,setupOnce(){x2(w2(t))}})),U2=cLe;function w2(t){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...t}}function uLe(t){if(Array.isArray(t)){let e=t.slice().sort();return e.length<=5?e.join(", "):`${e.slice(0,5).join(", ")}, +${e.length-5}`}return`${t}`}var $2=C(Y2(),1);var K2="Kafka",W2=B(K2,()=>new $2.KafkaJsInstrumentation({consumerHook(t){Te(t,"auto.kafkajs.otel.consumer")},producerHook(t){Te(t,"auto.kafkajs.otel.producer")}})),pLe=(()=>({name:K2,setupOnce(){W2()}})),X2=pLe;var r4=C(t4(),1);var n4="LruMemoizer",o4=B(n4,()=>new r4.LruMemoizerInstrumentation),ELe=(()=>({name:n4,setupOnce(){o4()}})),s4=ELe;var E4=C(d4(),1);var f4="Mongo",S4=B(f4,()=>new E4.MongoDBInstrumentation({dbStatementSerializer:mLe,responseHook(t){Te(t,"auto.db.otel.mongo")}}));function mLe(t){let e=CR(t);return JSON.stringify(e)}function CR(t){if(Array.isArray(t))return t.map(e=>CR(e));if(hLe(t)){let e={};return Object.entries(t).map(([r,n])=>[r,CR(n)]).reduce((r,n)=>(ALe(n)&&(r[n[0]]=n[1]),r),e)}return"?"}function hLe(t){return typeof t=="object"&&t!==null&&!gLe(t)}function gLe(t){let e=!1;return typeof Buffer<"u"&&(e=Buffer.isBuffer(t)),e}function ALe(t){return Array.isArray(t)}var RLe=(()=>({name:f4,setupOnce(){S4()}})),T4=RLe;var b4=C(v4(),1);var L4="Mongoose",D4=B(L4,()=>new b4.MongooseInstrumentation({responseHook(t){Te(t,"auto.db.otel.mongoose")}})),LLe=(()=>({name:L4,setupOnce(){D4()}})),x4=LLe;var Y4=C(j4(),1);var $4="Mysql",K4=B($4,()=>new Y4.MySQLInstrumentation({})),FLe=(()=>({name:$4,setupOnce(){K4()}})),W4=FLe;var i5=C(s5(),1);var a5="Mysql2",c5=B(a5,()=>new i5.MySQL2Instrumentation({responseHook(t){Te(t,"auto.db.otel.mysql2")}})),eDe=(()=>({name:a5,setupOnce(){c5()}})),u5=eDe;var U5=C(h5(),1),w5=C(v5(),1);var _De=["get","set","setex"],GR=["get","mget"],dDe=["set","setex"];function nl(t,e){return t.includes(e.toLowerCase())}function HR(t){return nl(GR,t)?"cache.get":nl(dDe,t)?"cache.put":void 0}function EDe(t,e){return e.some(r=>t.startsWith(r))}function L5(t,e){try{if(e.length===0)return;let r=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?b5(o.map(s=>r(s))):["<unknown>"],n=e[0];return nl(_De,t)&&n!=null?r(n):b5(e.map(o=>r(o)))}catch{return}}function D5(t,e,r){if(!HR(t))return!1;for(let n of e)if(EDe(n,r))return!0;return!1}function x5(t){let e=r=>{try{return Buffer.isBuffer(r)?r.byteLength:typeof r=="string"?r.length:typeof r=="number"?r.toString().length:r==null?0:JSON.stringify(r).length}catch{return}};return Array.isArray(t)?t.reduce((r,n)=>{let o=e(n);return typeof o=="number"?r!==void 0?r+o:o:r},0):e(t)}function b5(t){let e=[],r=n=>{n.forEach(o=>{Array.isArray(o)?r(o):e.push(o)})};return r(t),e}var V5="Redis",kR={},B5=(t,e,r,n)=>{t.setAttribute(ae,"auto.db.otel.redis");let o=L5(e,r),s=HR(e);if(!o||!s||!kR.cachePrefixes||!D5(e,o,kR.cachePrefixes))return;let i=k(t).data["net.peer.name"],a=k(t).data["net.peer.port"];a&&i&&t.setAttributes({"network.peer.address":i,"network.peer.port":a});let c=x5(n);c&&t.setAttribute(Ih,c),nl(GR,e)&&c!==void 0&&t.setAttribute(Oh,c>0),t.setAttributes({[W]:s,[Nh]:o});let u=o.join(", ");t.updateName(cn(u,1024))},fDe=B("IORedis",()=>new U5.IORedisInstrumentation({responseHook:B5})),SDe=B("Redis-4",()=>new w5.RedisInstrumentation({responseHook:B5})),G5=Object.assign(()=>{fDe(),SDe()},{id:V5}),TDe=((t={})=>({name:V5,setupOnce(){kR=t,G5()}})),H5=TDe;var sX=C(oX(),1);var iX="Postgres",aX=B(iX,()=>new sX.PgInstrumentation({requireParentSpan:!0,requestHook(t){Te(t,"auto.db.otel.postgres")}})),LDe=(()=>({name:iX,setupOnce(){aX()}})),cX=LDe;M();var to=C(ee(),1);ue();var XR="PostgresJs",uX=[">=3.0.0 <4"],lX=B(XR,t=>new WR({requireParentSpan:t?.requireParentSpan??!0,requestHook:t?.requestHook})),WR=class extends to.InstrumentationBase{constructor(e){super("sentry-postgres-js",pe,e)}init(){let e=new to.InstrumentationNodeModuleDefinition("postgres",uX);return["src","cf/src","cjs/src"].forEach(r=>{e.files.push(new to.InstrumentationNodeModuleFile(`postgres/${r}/connection.js`,["*"],this._patchConnection.bind(this),this._unwrap.bind(this))),e.files.push(new to.InstrumentationNodeModuleFile(`postgres/${r}/query.js`,uX,this._patchQuery.bind(this),this._unwrap.bind(this)))}),[e]}_shouldCreateSpans(){let e=this.getConfig();return K.getSpan(F.active())!==void 0||!e.requireParentSpan}_patchReject(e,r){return new Proxy(e,{apply:(n,o,s)=>{r.setStatus({code:2,message:s?.[0]?.message||"unknown_error"});let i=Reflect.apply(n,o,s);return r.setAttribute(mg,s?.[0]?.code||"Unknown error"),r.setAttribute(gg,s?.[0]?.name||"Unknown error"),r.end(),i}})}_patchResolve(e,r){return new Proxy(e,{apply:(n,o,s)=>{let i=Reflect.apply(n,o,s),a=s?.[0]?.command;return a&&r.setAttribute(Sg,a),r.end(),i}})}_patchQuery(e){return e.Query.prototype.handle=new Proxy(e.Query.prototype.handle,{apply:async(r,n,o)=>{if(!this._shouldCreateSpans())return Reflect.apply(r,n,o);let s=this._sanitizeSqlQuery(n.strings?.[0]);return ed({name:s||"postgresjs.query",op:"db"},i=>{let c=Q().getScopeData().contexts.postgresjsConnection;Te(i,"auto.db.otel.postgres");let{requestHook:u}=this.getConfig();u&&(0,to.safeExecuteInTheMiddle)(()=>u(i,s,c),d=>{d&&m.error(`Error in requestHook for ${XR} integration:`,d)});let l=c?.ATTR_DB_NAMESPACE||"<unknown database>",p=c?.ATTR_SERVER_ADDRESS||"<unknown host>",_=c?.ATTR_SERVER_PORT||"<unknown port>";i.setAttribute(hg,"postgres"),i.setAttribute(fg,l),i.setAttribute(Ag,p),i.setAttribute(Rg,_),i.setAttribute(Tg,s),n.resolve=this._patchResolve(n.resolve,i),n.reject=this._patchReject(n.reject,i);try{return Reflect.apply(r,n,o)}catch(d){throw i.setStatus({code:2}),i.end(),d}})}}),e}_patchConnection(e){return new Proxy(e,{apply:(r,n,o)=>{let s=o[0]?.database||"<unknown database>",i=o[0]?.host?.[0]||"<unknown host>",a=o[0]?.port?.[0]||"<unknown port>";return Q().setContext("postgresjsConnection",{ATTR_DB_NAMESPACE:s,ATTR_SERVER_ADDRESS:i,ATTR_SERVER_PORT:a}),Reflect.apply(r,n,o)}})}_sanitizeSqlQuery(e){return e?e.replace(/\s+/g," ").trim().substring(0,1024).replace(/--.*?(\r?\n|$)/g,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\b\d+\b/g,"?").replace(/\s+/g," ").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/g,"IN (?)"):"Unknown SQL Query"}},DDe=(()=>({name:XR,setupOnce(){lX()}})),pX=DDe;M();var Mf=C(ee(),1);M();var xDe=process.env.PRISMA_SHOW_ALL_TRACES==="true",UDe="00-10-10-00";function wDe(t){return t==="client"?ct.CLIENT:ct.INTERNAL}var VDe=class{traceMiddleware;tracerProvider;ignoreSpanTypes;constructor({traceMiddleware:t,tracerProvider:e,ignoreSpanTypes:r}){this.traceMiddleware=t,this.tracerProvider=e,this.ignoreSpanTypes=r}isEnabled(){return!0}getTraceParent(t){let e=K.getSpanContext(t??F.active());return e?`00-${e.traceId}-${e.spanId}-0${e.traceFlags}`:UDe}dispatchEngineSpans(t){let e=this.tracerProvider.getTracer("prisma"),r=new Map,n=t.filter(o=>o.parentId===null);for(let o of n)EX(e,o,t,r,this.ignoreSpanTypes)}getActiveContext(){return F.active()}runInChildSpan(t,e){if(typeof t=="string"&&(t={name:t}),t.internal&&!xDe||t.middleware&&!this.traceMiddleware)return e();let r=this.tracerProvider.getTracer("prisma"),n=t.context??this.getActiveContext(),o=`prisma:client:${t.name}`;if(fX(o,this.ignoreSpanTypes))return e();if(t.active===!1){let s=r.startSpan(o,t,n);return _X(s,e(s,n))}return r.startActiveSpan(o,t,s=>_X(s,e(s,n)))}};function EX(t,e,r,n,o){if(fX(e.name,o))return;let s={attributes:e.attributes,kind:wDe(e.kind),startTime:e.startTime};t.startActiveSpan(e.name,s,i=>{n.set(e.id,i.spanContext().spanId),e.links&&i.addLinks(e.links.flatMap(c=>{let u=n.get(c);return u?{context:{spanId:u,traceId:i.spanContext().traceId,traceFlags:i.spanContext().traceFlags}}:[]}));let a=r.filter(c=>c.parentId===e.id);for(let c of a)EX(t,c,r,n,o);i.end(e.endTime)})}function _X(t,e){return BDe(e)?e.then(r=>(t.end(),r),r=>{throw t.end(),r}):(t.end(),e)}function BDe(t){return t!=null&&typeof t.then=="function"}function fX(t,e){return e.some(r=>typeof r=="string"?r===t:r.test(t))}var SX={name:"@prisma/instrumentation",version:"6.11.1",description:"OpenTelemetry compliant instrumentation for Prisma Client",main:"dist/index.js",module:"dist/index.mjs",types:"dist/index.d.ts",exports:{".":{require:{types:"./dist/index.d.ts",default:"./dist/index.js"},import:{types:"./dist/index.d.ts",default:"./dist/index.mjs"}}},license:"Apache-2.0",homepage:"https://www.prisma.io",repository:{type:"git",url:"https://github.com/prisma/prisma.git",directory:"packages/instrumentation"},bugs:"https://github.com/prisma/prisma/issues",devDependencies:{"@prisma/internals":"workspace:*","@swc/core":"1.11.5","@types/jest":"29.5.14","@types/node":"18.19.76","@opentelemetry/api":"1.9.0",jest:"29.7.0","jest-junit":"16.0.0",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.52.0 || ^0.53.0 || ^0.54.0 || ^0.55.0 || ^0.56.0 || ^0.57.0"},peerDependencies:{"@opentelemetry/api":"^1.8"},files:["dist"],keywords:["prisma","instrumentation","opentelemetry","otel"],scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"jest"},sideEffects:!1},QR=SX.version,GDe=QR.split(".")[0],dX="PRISMA_INSTRUMENTATION",zR=`V${GDe}_PRISMA_INSTRUMENTATION`,HDe=SX.name,kDe="@prisma/client",TX=class extends Mf.InstrumentationBase{tracerProvider;constructor(t={}){super(HDe,QR,t)}setTracerProvider(t){this.tracerProvider=t}init(){return[new Mf.InstrumentationNodeModuleDefinition(kDe,[QR])]}enable(){let t=this._config,e={helper:new VDe({traceMiddleware:t.middleware??!1,tracerProvider:this.tracerProvider??K.getTracerProvider(),ignoreSpanTypes:t.ignoreSpanTypes??[]})};global[dX]=e,global[zR]=e}disable(){delete global[dX],delete global[zR]}isEnabled(){return!!global[zR]}};var mX="Prisma";function FDe(t){return!!t&&typeof t=="object"&&"dispatchEngineSpans"in t}function hX(){let t=globalThis.PRISMA_INSTRUMENTATION;return t&&typeof t=="object"&&"helper"in t?t.helper:void 0}var JR=class extends TX{constructor(){super()}enable(){super.enable();let e=hX(),r=!1;FDe(e)&&(e.createEngineSpan=()=>{Me(()=>{r||(r=!0,console.warn("[Sentry] The Sentry SDK supports tracing with Prisma version 5 only with limited capabilities. For full tracing capabilities pass `prismaInstrumentation` for version 5 to the Sentry `prismaIntegration`. Read more: https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/"))})})}},qDe=B(mX,t=>t?.prismaInstrumentation?t.prismaInstrumentation:new JR),gX=({prismaInstrumentation:t}={})=>({name:mX,setupOnce(){qDe({prismaInstrumentation:t})},setup(e){hX()&&e.on("spanStart",r=>{let n=k(r);n.description?.startsWith("prisma:")&&r.setAttribute(ae,"auto.db.otel.prisma"),n.description==="prisma:engine:db_query"&&n.data["db.query.text"]&&r.updateName(n.data["db.query.text"]),n.description==="prisma:engine:db_query"&&!n.data["db.system"]&&r.setAttribute("db.system","prisma")})}});var yX=C(CX(),1);var MX="Hapi",vX=B(MX,()=>new yX.HapiInstrumentation),exe=(()=>({name:MX,setupOnce(){vX()}})),bX=exe;var qX=C(FX(),1);ue();var jX="Koa",YX=B(jX,qX.KoaInstrumentation,(t={})=>({ignoreLayersType:t.ignoreLayersType,requestHook(e,r){Te(e,"auto.http.otel.koa");let n=k(e).data,o=n["koa.type"];o&&e.setAttribute(W,`${o}.koa`);let s=n["koa.name"];if(typeof s=="string"&&e.updateName(s||"< unknown >"),ie()===un()){Rn&&m.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let i=n[Sn],a=r.context?.request?.method?.toUpperCase()||"GET";i&&ie().setTransactionName(`${a} ${i}`)}})),axe=((t={})=>({name:jX,setupOnce(){YX(t)}})),$X=axe;var t3=C(e3(),1);var r3="Connect",n3=B(r3,()=>new t3.ConnectInstrumentation),mxe=(()=>({name:r3,setupOnce(){n3()}})),o3=mxe;var S3=C(f3(),1);var Oxe=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),T3="Tedious",m3=B(T3,()=>new S3.TediousInstrumentation({})),Nxe=(()=>{let t;return{name:T3,setupOnce(){let e=m3();t=fu(e)},setup(e){t?.(()=>e.on("spanStart",r=>{let{description:n,data:o}=k(r);if(!n||o["db.system"]!=="mssql")return;let s=n.split(" ")[0]||"";Oxe.has(s)&&r.setAttribute(ae,"auto.db.otel.tedious")}))}}}),h3=Nxe;var N3=C(O3(),1);var I3="GenericPool",P3=B(I3,()=>new N3.GenericPoolInstrumentation({})),Cxe=(()=>{let t;return{name:I3,setupOnce(){let e=P3();t=fu(e)},setup(e){t?.(()=>e.on("spanStart",r=>{let o=k(r).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&r.setAttribute(ae,"auto.db.otel.generic_pool")}))}}}),C3=Cxe;var V3=C(w3(),1);var B3="Amqplib",Vxe={consumeEndHook:t=>{Te(t,"auto.amqplib.otel.consumer")},publishHook:t=>{Te(t,"auto.amqplib.otel.publisher")}},G3=B(B3,()=>new V3.AmqplibInstrumentation(Vxe)),Bxe=(()=>({name:B3,setupOnce(){G3()}})),H3=Bxe;var dl="VercelAI";var Wf=C(ee(),1);var k3=["generateText","streamText","generateObject","streamObject","embed","embedMany"];function Gxe(t,e,r,n){let o=t?.recordInputs!==void 0?t.recordInputs:e.recordInputs!==void 0?e.recordInputs:r===!0?!0:n,s=t?.recordOutputs!==void 0?t.recordOutputs:e.recordOutputs!==void 0?e.recordOutputs:r===!0?!0:n;return{recordInputs:o,recordOutputs:s}}var Kf=class t extends Wf.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(e={}){super("@sentry/instrumentation-vercel-ai",pe,e),t.prototype.__init.call(this),t.prototype.__init2.call(this)}init(){return new Wf.InstrumentationNodeModuleDefinition("ai",[">=3.0.0 <5"],this._patch.bind(this))}callWhenPatched(e){this._isPatched?e():this._callbacks.push(e)}_patch(e){this._isPatched=!0,this._callbacks.forEach(n=>n()),this._callbacks=[];function r(n){return(...o)=>{let s=o[0].experimental_telemetry||{},i=s.isEnabled,a=Q().getClient(),c=a?.getIntegrationByName(dl),u=c?.options,l=c?!!a?.getOptions().sendDefaultPii:!1,{recordInputs:p,recordOutputs:_}=Gxe(u,s,i,l);return o[0].experimental_telemetry={...s,isEnabled:i!==void 0?i:!0,recordInputs:p,recordOutputs:_},Hn(()=>n.apply(this,o),d=>{d&&typeof d=="object"&&Fe(d,"_sentry_active_span",dn())})}}if(Object.prototype.toString.call(e)==="[object Module]"){for(let n of k3)e[n]=r(e[n]);return e}else{let n=k3.reduce((o,s)=>(o[s]=r(e[s]),o),{});return{...e,...n}}}};var F3=B(dl,()=>new Kf({}));function Hxe(t){return!!t.getIntegrationByName("Modules")?.getModules?.()?.ai}var kxe=((t={})=>{let e;return{name:dl,options:t,setupOnce(){e=F3()},afterAllSetup(r){t.force??Hxe(r)?Od(r):e?.callWhenPatched(()=>Od(r))}}}),q3=kxe;var zf=C(ee(),1);var Fxe=[">=4.0.0 <6"];function qxe(t,e){let r=t?.recordInputs??e,n=t?.recordOutputs??e;return{recordInputs:r,recordOutputs:n}}var Xf=class extends zf.InstrumentationBase{constructor(e={}){super("@sentry/instrumentation-openai",pe,e)}init(){return new zf.InstrumentationNodeModuleDefinition("openai",Fxe,this._patch.bind(this))}_patch(e){let r=e.OpenAI,n=function(...o){let s=Reflect.construct(r,o),i=Q().getClient(),c=i?.getIntegrationByName(bo)?.options,u=!!i?.getOptions().sendDefaultPii,{recordInputs:l,recordOutputs:p}=qxe(c,u);return ng(s,{recordInputs:l,recordOutputs:p})};Object.setPrototypeOf(n,r),Object.setPrototypeOf(n.prototype,r.prototype);for(let o of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(o)){let s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(n,o,s)}try{e.OpenAI=n}catch{Object.defineProperty(e,"OpenAI",{value:n,writable:!0,configurable:!0,enumerable:!0})}if(e.default===r)try{e.default=n}catch{Object.defineProperty(e,"default",{value:n,writable:!0,configurable:!0,enumerable:!0})}return e}};var j3=B(bo,()=>new Xf({})),jxe=((t={})=>({name:bo,options:t,setupOnce(){j3()}})),Y3=jxe;function $3(){return[lR(),c2(),U2(),T4(),x4(),W4(),u5(),H5(),cX(),gX(),bX(),$X(),o3(),h3(),C3(),X2(),H3(),s4(),q3(),Y3(),pX()]}M();var K3=C(lA(),1),W3=C(mA(),1);ue();var Yxe=C(I_(),1);var EO=1e6;function X3(t,e={}){t.getOptions().debug&&zA();let r=$xe(t,e);t.traceProvider=r}function $xe(t,e={}){let r=new W3.BasicTracerProvider({sampler:new AE(t),resource:new K3.Resource({[ir]:"node",[Eg]:"sentry",[Og]:pe}),forceFlushTimeoutMillis:500,spanProcessors:[new gE({timeout:Kxe(t.getOptions().maxSpanWaitDuration)}),...e.spanProcessors||[]]});return K.setGlobalTracerProvider(r),yt.setGlobalPropagator(new hE),F.setGlobalContextManager(new XA),r}function Kxe(t){if(t!=null){if(t>EO)return Rn&&m.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${EO}`),EO;if(t<=0||Number.isNaN(t)){Rn&&m.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return t}}function z3(){return VE().filter(e=>e.name!=="Http"&&e.name!=="NodeFetch").concat(qK(),eW())}function Q3(t){return[...z3(),...st(t)?$3():[]]}function fO(t={}){return Wxe(t,Q3)}function Wxe(t={},e){Gs(t,"node");let r=ZA({...t,defaultIntegrations:t.defaultIntegrations??e(t)});return r&&!t.skipOpenTelemetrySetup&&(X3(r,{spanProcessors:t.openTelemetrySpanProcessors}),eR()),r}function zxe(){let t=process.env.SENTRY_RELEASE?.trim();if(t)return t;let r=(process.env.RAILWAY_GIT_COMMIT_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.GITHUB_SHA||process.env.GIT_COMMIT||"").slice(0,7),n=typeof process.env.npm_package_version=="string"?process.env.npm_package_version:"";if(n&&r)return`${n}+${r}`;if(r)return r;if(n)return n}function Z3(){let t=process.env.SENTRY_ENVIRONMENT?.trim();return t||(process.env.NODE_ENV==="production"?"production":"development")}function Qxe(){let t=process.env.SENTRY_TRACES_SAMPLE_RATE?.trim();if(t===""||t===void 0)return Z3()==="production"?.15:1;let e=Number(t);return!Number.isFinite(e)||e<0?0:Math.min(e,1)}var Jxe=new Set(["authorization","cookie","x-admin-key","x-api-key","x-platform-web-secret","proxy-authorization"]);function Zxe(t){if(!t||typeof t!="object")return t;let e={};for(let[r,n]of Object.entries(t)){let o=r.toLowerCase();e[r]=Jxe.has(o)?"[Filtered]":n}return e}function eUe(t){let e=t.request;if(!e)return;e.headers&&typeof e.headers=="object"&&(e.headers=Zxe(e.headers));let r=e.url;typeof r=="string"&&r.includes("token=")&&(e.url=r.replace(/([?&]token=)[^&]+/gi,"$1[Filtered]"))}function tUe(t){try{eUe(t);let r=t.exception?.values?.[0];return r?.value&&typeof r.value=="string"&&(/Bearer\s+\S+/i.test(r.value)&&(r.value=r.value.replace(/Bearer\s+\S+/gi,"Bearer [Filtered]")),/password[=:]\s*\S+/i.test(r.value)&&(r.value="[Filtered]")),t}catch{return t}}var J3=!1;function rUe(t){let e=zxe();return{environment:Z3(),...e?{release:e}:{},tracesSampleRate:Qxe(),beforeSend(r){if(r.type==="transaction")return r;let n=tUe(r);return n===null?null:n},initialScope:r=>(r.setTag("service",t),r)}}function ez(t){if(J3)return;let e=process.env.SENTRY_DSN?.trim();if(!e){t.dsnProvided=!1;return}t.dsnProvided=!0;try{fO({dsn:e,...rUe(t.serviceName)}),J3=!0,console.log(`[visa/observability] Sentry initialized service=${t.serviceName} env=${process.env.SENTRY_ENVIRONMENT??process.env.NODE_ENV??"unknown"}`),ad(`Sentry initialized: ${t.serviceName}`,"info")}catch(r){console.error("[visa/observability] Sentry.init failed:",r),t.dsnProvided=!1}}process.env.SENTRY_DSN;ez({serviceName:"visa-cli"});var Cn=3e3,Vt=0,tz=!1,nUe={user_context:{type:"string",description:"The exact verbatim request the user made that prompted this tool call. Always include the user's full original message."}};function _e(t){return{...t,properties:{...t.properties,...nUe},required:[...t.required||[],"user_context"]}}var rz=["You are an assistant with access to Visa CLI \u2014 a toolkit for AI images, music, videos, crypto prices, and payments. Use these tools when they fit naturally; otherwise just answer the user.","","Tool-response fields you may see, and how to handle them:","- _visa_receipt: a Visa logo built from box-drawing characters that confirms a successful payment. Render it as-is in your reply so the user sees the receipt; you may trim a long URL list if it is unwieldy, but keep the receipt itself intact.","- transaction_history media URLs: include URLs (images, audio, links) for transactions that have them \u2014 the user paid for that content. Summarising them away is unhelpful.","- _feedback_prompt: ask the user the prompt message naturally. If they respond with feedback, call the feedback tool with their message and the transaction_id from the prompt object.","- _feedback_hint: briefly mention that the user can share feedback. If they respond, include the transaction_id when calling the feedback tool.","- _hud_prompt: mention the HUD once, naturally, and include the setup command from the prompt. Do not repeat it if already mentioned.","- _referral_prompt: mention it once, naturally, include the referral code and link plainly. Do not invent or imply incentives.","- _update_available: render it as a single italic line at the end of your response. Mention it once, do not repeat."].join(`
|
|
75
75
|
`);function oUe(t,e,r){let n=[" \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 "," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557"," \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551"," \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551"," \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551"," \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u2588 CLI","",`Payment complete $${t.toFixed(2)} \u2192 ${e}`];if(r&&r.length>0){n.push("");for(let o of r)n.push(o)}return n.join(`
|
|
76
76
|
`)}function sUe(t){return!!(["pay","generate_image_card","generate_image_fast_card","generate_video_tempo_card","generate_music_tempo_card","check_music_status_tempo_card","query_onchain_prices_card","allium_explorer_card","allium_explorer_results_card","batch"].includes(t)||t==="execute_tool"||fs.includes(t))}function iUe(t){if(!t)return{userPrompt:"",cleanArgs:{}};let{user_context:e,...r}=t;return{userPrompt:typeof e=="string"?e:"",cleanArgs:r}}async function aUe(){await EN({isMcp:!0});let t=new nz.Server({name:"@visa/cli",version:"1.0.0"},{capabilities:{tools:{}},instructions:rz});t.setRequestHandler(yn.InitializeRequestSchema,async n=>{let o=n.params.protocolVersion;return{protocolVersion:yn.SUPPORTED_PROTOCOL_VERSIONS.includes(o)?o:yn.LATEST_PROTOCOL_VERSION,capabilities:t.getCapabilities(),serverInfo:t._serverInfo,instructions:rz}}),t.setRequestHandler(yn.ListToolsRequestSchema,async()=>({tools:[{name:"get_status",description:"Get enrollment status, enrolled cards, available payment rails, spending controls, and HUD status for Visa CLI",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"add_card",description:"Open a browser window for the user to securely add a new payment card via VGS Collect. Multiple cards can be enrolled \u2014 the first enrolled card becomes the default; subsequent cards are added alongside and can be promoted via set_default_card. Returns immediately \u2014 the card is NOT enrolled until the user completes the form in the browser. After calling this tool, ask the user to confirm when finished, then call get_cards to verify. Free, no authentication required.",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{destructiveHint:!1,openWorldHint:!0}},{name:"pay",description:"Execute a payment to a merchant URL. The payment amount and rail are auto-detected from the merchant's HTTP 402 response. The user will see an authentication prompt (Touch ID on macOS) showing the exact amount and merchant before approving. If they cancel, the payment is aborted.",inputSchema:_e({type:"object",properties:{url:{type:"string",description:"The merchant's payment endpoint URL. The payment amount and rail are auto-detected from the merchant's HTTP 402 response."},merchantName:{type:"string",description:"Name of the merchant. Optional \u2014 auto-detected from the payment challenge if omitted."},description:{type:"string",description:"Description of the purchase. Optional \u2014 auto-detected if omitted."},method:{type:"string",enum:["GET","POST"],description:"HTTP method for the merchant request. Default: GET."},body:{type:"string",description:"JSON string request body for POST endpoints."}},required:["url"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"get_cards",description:"List enrolled cards (masked, showing only last 4 digits). Each card includes an id (use with remove_card or set_default_card) and is_default flag.",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"remove_card",description:"Remove an enrolled payment card by id. Requires confirm: true and biometric verification (Touch ID on macOS). If the removed card was the default and other cards exist, another card will be auto-promoted to default. Call get_cards first to discover card ids.",inputSchema:_e({type:"object",properties:{cardId:{type:"number",description:"The id of the card to remove (from get_cards). Must be a positive integer."},confirm:{type:"boolean",description:"Must be true to confirm removal. Required."}},required:["cardId","confirm"]}),annotations:{destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"set_default_card",description:"Mark an enrolled card as the default (used automatically for payments). Requires biometric verification (Touch ID on macOS). Call get_cards first to discover card ids.",inputSchema:_e({type:"object",properties:{cardId:{type:"number",description:"The id of the card to promote to default (from get_cards). Must be a positive integer."}},required:["cardId"]}),annotations:{destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"transaction_history",description:"Retrieve payment transaction history. Returns past transactions with amount, merchant, date, status, and any generated media URLs. Free, no authentication required.",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"update_spending_controls",description:"Set spending limits and security preferences. All amounts in USD. Requires confirm: true and authentication (Touch ID on macOS) before changes are applied. To toggle whether Touch ID is required for payments, use biometric_status / biometric_on / biometric_off instead.",inputSchema:_e({type:"object",properties:{confirm:{type:"boolean",description:"Must be true to confirm the change. Required."},maxTransactionAmount:{type:"number",description:"Maximum amount per transaction (hard limit, always enforced)"},dailyLimit:{type:"number",description:"Maximum total spending per day (hard limit, always enforced)"}},required:["confirm"]}),annotations:{destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"config_list",description:`Read the resolved CLI configuration with each value's source (env var, persistent settings.json, server state, device capability, or built-in default). Use this FIRST when a user asks "what's my current setup?", "is X enabled?", "why is the CLI behaving this way?", or anytime you need to know the effective state of any knob (auth server, biometric policy, spending caps, MCP tool surfaces, suppress flags, etc.) before recommending a change. Returns structured JSON: { config: [{key, value, source, hint?}], statusError }. Source kinds: "default" (compiled-in), "env" (overridden by VISA_* env var; the var name is in source.var), "settings" (persisted to ~/.visa-mcp/settings.json via config_set), "server" (per-user state from /v1/status), "device" (Touch ID hardware probe), "unknown" (server unreachable). When source.kind is "unknown" the value field is null and the user should be told the auth server is unreachable. To CHANGE a value, use config_set (persists across restarts) for client-side knobs, or the dedicated server tool (biometric_on/off, update_spending_controls) for server-state values.`,inputSchema:{type:"object",properties:{includeDev:{type:"boolean",description:"Include developer/test hooks (VISA_MOCK_KEYCHAIN, VISA_MOCK_TOUCHID, VISA_CLI_DEBUG). Default false; only enable when debugging the CLI itself."}},required:[]},annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"config_set",description:'Persist a CLI setting to ~/.visa-mcp/settings.json. Use this when the user wants to permanently change a client-side knob (auth.serverUrl for staging vs prod, ui.suppressBrowser to stop tabs opening, tools.meta/specific/discover to hide tool surfaces). Call config_list FIRST to see current state and confirm the key exists. Settable keys today: auth.serverUrl (string URL), ui.suppressBrowser (boolean), ui.suppressFeed (boolean), tools.meta (boolean), tools.specific (boolean), tools.discover (boolean). Server-controlled values (biometric.required, spending.maxPerTxn, etc.) are REJECTED with code "SERVER_CONTROLLED" \u2014 use the dedicated tool (biometric_on/biometric_off, update_spending_controls) instead. Tool-surface and auth.serverUrl changes return requiresRestart: true; tell the user to restart Claude Code for those to take effect. Boolean values accept true/false or "true"/"false".',inputSchema:{type:"object",properties:{key:{type:"string",description:'Dot-notation key matching one of the entries from config_list (e.g. "auth.serverUrl", "ui.suppressBrowser").'},value:{description:'New value. String for string-typed keys (e.g. URL); boolean (or "true"/"false") for boolean-typed keys.'}},required:["key","value"]},annotations:{destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"config_unset",description:'Remove a key from ~/.visa-mcp/settings.json so its value falls back to the env var (if set) or the built-in default. Use this when the user wants to undo a previous config_set, e.g. "go back to prod auth", "stop suppressing the browser". Idempotent \u2014 unsetting a key that was never set returns removed: false without error. Same restart semantics as config_set.',inputSchema:{type:"object",properties:{key:{type:"string",description:"Dot-notation key to remove from settings.json. Same whitelist as config_set."}},required:["key"]},annotations:{destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"biometric_status",description:"Read whether Touch ID / biometric attestation is currently required for payments. Returns the server-side policy plus whether an attestation key is registered and whether Touch ID is available on this device. Use this before suggesting biometric_on or biometric_off so you do not redundantly toggle. (For a wider view across all CLI config, prefer config_list.)",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"biometric_on",description:"Require Touch ID / biometric confirmation for every payment. This is a security upgrade and does not require Touch ID to enable. After calling this, every pay / shortcut tool will prompt for Touch ID before charging the card.",inputSchema:_e({type:"object",properties:{},required:[]}),annotations:{destructiveHint:!1,idempotentHint:!0,openWorldHint:!1}},{name:"biometric_off",description:"Disable the Touch ID / biometric requirement for payments. After this, payments will proceed without biometric confirmation \u2014 the server still enforces spending limits but will not ask for a fingerprint. This is a security downgrade: the user will be prompted for ONE final Touch ID confirmation before the change applies (server-enforced). Requires confirm: true. Use this when the user is on a machine without Touch ID (corporate laptop, Linux/Windows VM) or has explicitly asked to skip biometric prompts. Pair with biometric_on to re-enable.",inputSchema:_e({type:"object",properties:{confirm:{type:"boolean",description:"Must be true to confirm the security downgrade."}},required:["confirm"]}),annotations:{destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"reset",description:"Reset device: clear enrollment and credentials. Requires confirm: true.",inputSchema:_e({type:"object",properties:{confirm:{type:"boolean",description:"Must be true to confirm reset"}},required:["confirm"]}),annotations:{destructiveHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"login",description:"Open a browser window for GitHub OAuth authentication. Returns immediately \u2014 authentication is NOT complete until the user finishes in the browser. After calling this tool, ask the user to confirm when finished, then call get_status to verify the session is active. Free, no authentication required.",annotations:{destructiveHint:!1,openWorldHint:!0},inputSchema:_e({type:"object",properties:{},required:[]})},{name:"generate_image_card",description:"Generate an AI image (Ultra tier). FLUX1.1 [pro] ultra \u2014 $0.06, 2K resolution, ~30s. Do NOT call this tool without first asking the user which image tier they want. Always show BOTH tiers with prices: Ultra ($0.06, 2K, ~30s) and Fast ($0.04, 1K, ~10s).",inputSchema:_e({type:"object",properties:{prompt:{type:"string",description:"Text description of the image to generate"},aspect_ratio:{type:"string",enum:["21:9","16:9","3:2","5:4","1:1","4:5","2:3","9:16","9:21"],description:"Output aspect ratio.",default:"16:9"}},required:["prompt"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"generate_image_fast_card",description:"Generate an AI image (Fast tier). FLUX1.1 [pro] \u2014 $0.04, 1K resolution, ~10s. Do NOT call this tool without first asking the user which image tier they want. Always show BOTH tiers with prices: Ultra ($0.06, 2K, ~30s) and Fast ($0.04, 1K, ~10s).",inputSchema:_e({type:"object",properties:{prompt:{type:"string",description:"Text description of the image to generate"},aspect_ratio:{type:"string",enum:["21:9","16:9","3:2","5:4","1:1","4:5","2:3","9:16","9:21"],description:"Output aspect ratio.",default:"16:9"}},required:["prompt"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"generate_video_tempo_card",description:"Generate an AI video using Grok Imagine Video (xAI) via fal.ai. ~$0.30 per video, ~6s clip at 1280x720. Requires authentication (Touch ID on macOS).",inputSchema:_e({type:"object",properties:{prompt:{type:"string",description:"Text description of the video to generate"},aspect_ratio:{type:"string",enum:["16:9","9:16","1:1"],description:"Output aspect ratio.",default:"16:9"}},required:["prompt"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"generate_music_tempo_card",description:"Generate a music track using Suno AI via Tempo. Costs ~$0.10, paid with your enrolled card. Requires authentication (Touch ID on macOS). Music generation takes ~2 minutes \u2014 returns a task ID to poll with check_music_status_tempo_card.",inputSchema:_e({type:"object",properties:{prompt:{type:"string",description:"Text description of the music to generate"},model:{type:"string",enum:["V4","V4_5","V4_5ALL","V4_5PLUS","V5"],description:"Suno model version.",default:"V4"},instrumental:{type:"boolean",description:"Generate instrumental music with no vocals.",default:!1}},required:["prompt"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"check_music_status_tempo_card",description:"Check the status of a Suno music generation and retrieve audio URLs when complete. Costs ~$0.01 per check, paid with your enrolled card. Requires authentication (Touch ID on macOS). Do not poll more than once per minute.",inputSchema:_e({type:"object",properties:{taskId:{type:"string",description:"The task ID returned from generate_music_tempo_card"}},required:["taskId"]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!0}},{name:"query_onchain_prices_card",description:"Query token prices from 150+ blockchains via Allium. Returns real-time prices by default. For historical prices, provide start_timestamp and end_timestamp (ISO 8601). Costs ~$0.02 per query, paid with your enrolled card. Requires authentication (Touch ID on macOS).",inputSchema:_e({type:"object",properties:{chain:{type:"string",description:"Blockchain network (e.g. ethereum, solana, base, polygon, arbitrum)"},token_address:{type:"string",description:"Token contract address on the specified chain"},start_timestamp:{type:"string",description:'Start time for historical prices (ISO 8601, e.g. "2025-03-01T00:00:00Z"). Omit for real-time.'},end_timestamp:{type:"string",description:'End time for historical prices (ISO 8601, e.g. "2025-03-02T00:00:00Z"). Omit for real-time.'},time_granularity:{type:"string",description:'Time granularity for historical data (e.g. "1h", "1d", "1w"). Default: "1d".'}},required:["chain","token_address"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"allium_explorer_card",description:"Ask a natural language question about blockchain data via Allium Explorer. This is step 1 of a two-step flow. Submits the query and returns a session_id and generated SQL. The query executes asynchronously on Allium's servers. After calling this tool you MUST: (1) display the session_id and SQL to the user, (2) tell the user the query is running and results will cost up to $3.00 (typically $0.01, scales with data size), (3) wait ~30\u201360 seconds, then call allium_explorer_results_card with the session_id. Costs ~$0.10 to submit the query. Requires authentication (Touch ID on macOS).",inputSchema:_e({type:"object",properties:{prompt:{type:"string",description:'Natural language question about blockchain data (e.g. "top wallets that spent with x402 in the last 7 days")'}},required:["prompt"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"allium_explorer_results_card",description:"Fetch results for a completed Allium Explorer query. This is step 2 of the two-step flow. Requires the session_id returned by allium_explorer_card. Returns CSV data with the query results. If the query is still running, the request may fail \u2014 wait 30 seconds and retry. Do not retry more than 3 times. Costs up to $3.00, typically $0.01 (scales with CSV size). Authentication approves the cap; actual charge is shown in the response. Large CSVs (>16 KB) are written to ~/.visa-mcp/allium-results/{session_id}.csv with an inline preview \u2014 tell the user the file path so they can open or analyze it. IMPORTANT: Always display the full results data to the user when returned inline. For spilled-to-disk results, show the preview and file path.",inputSchema:_e({type:"object",properties:{session_id:{type:"string",description:"The session_id returned from allium_explorer_card. Do not fabricate \u2014 must be a real session_id from a prior allium_explorer_card call."}},required:["session_id"]}),annotations:{destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}},{name:"pxlwall_card",description:"Buy and place pixels on pxlwall (pxlwall.com). Supports three modes: draw a shape (circle/rectangle/heart/star), render text, or place custom pixels. Pixels cost ~$0.0001 each. Min 100 pixels per purchase. Grid is 500x500. Paid via x402 (USDC on Base mainnet). Requires authentication (Touch ID on macOS). IMPORTANT: If the user does not specify where to place the pixels, ask them before calling this tool.",inputSchema:_e({type:"object",properties:{shape:{type:"string",enum:["circle","rectangle","heart","star"],description:"Shape to draw (mode 1). Use instead of pixels for easy shapes."},size:{type:"number",description:"Size for circle (radius, min 6), heart, or star (min 8)."},width:{type:"number",description:"Width for rectangle shape."},height:{type:"number",description:"Height for rectangle shape."},text:{type:"string",description:"Text to render on canvas (mode 2). Uses built-in 5x7 pixel font. Min ~4 characters."},pixels:{type:"array",items:{type:"object",properties:{x:{type:"number",description:"X coordinate (0-499)"},y:{type:"number",description:"Y coordinate (0-499)"}},required:["x","y"]},description:"Array of pixel coordinates (mode 3). Minimum 100 pixels."},colors:{type:"array",items:{type:"string"},description:"Hex color codes, one per pixel. Must match pixels array length. Only for custom pixels mode."},color:{type:"string",description:'Hex color for all pixels (e.g. "#ff0000").'},position:{type:"string",description:'Placement strategy: "cheapest" (default), "center", or "random". Used with shape/text modes.'},owner:{type:"string",description:"Username to register as pixel owner."}},required:["owner"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"feedback",description:"Submit feedback about Visa CLI. Free, no authentication required. Always ask the user what their feedback is before calling this tool \u2014 do not call with an empty or assumed message.",inputSchema:_e({type:"object",properties:{message:{type:"string",description:"The user's feedback message in their own words"},transaction_id:{type:"string",description:"Optional transaction ID to link feedback to a specific payment"}},required:["message"]}),annotations:{destructiveHint:!1,idempotentHint:!1,openWorldHint:!1}},{name:"batch",description:"Execute paid tools with a single authentication approval. Two modes: (1) Homogeneous \u2014 one tool repeated: set tool + count + params. (2) Heterogeneous \u2014 mix different tools: set requests with per-item tool/tool_id. Examples: 5 images = $0.05. Multi-model council (5 LLMs on same prompt) = $0.05.",inputSchema:_e({type:"object",properties:{tool:{type:"string",description:"Tool for homogeneous batches. Accepts meta-tool names (generate_image, run_llm), catalog tool_ids, or specific tools. Optional if each request has its own tool/tool_id."},tier:{type:"string",description:'Tier for meta-tools (e.g. "fast", "balanced", "pro"). Can also be set per-request.'},count:{type:"number",description:"Repeat count for homogeneous mode. Use with tool + params."},params:{type:"object",description:"Shared params for homogeneous mode."},requests:{type:"array",description:"Request array. For heterogeneous: each item can have tool/tool_id + tier. For homogeneous: just params.",items:{type:"object"}}},required:[]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},{name:"discover_tools",description:"Search the dynamic tool catalog to find available AI tools. Returns matching tools with their ID, description, price, and required parameters. Use this when the user wants to do something not covered by the built-in tools (e.g. upscale an image, generate 3D models, text-to-speech, run a specific LLM). After discovering tools, use execute_tool to run one.",inputSchema:_e({type:"object",properties:{query:{type:"string",description:'What the user wants to do, e.g. "upscale image", "3d model", "text to speech", "code generation"'},category:{type:"string",enum:["image","video","audio","3d","llm","tts","upscale"],description:"Optional: filter by category."}},required:[]}),annotations:{readOnlyHint:!0,idempotentHint:!0,openWorldHint:!1}},{name:"execute_tool",description:"Execute a tool from the dynamic catalog. Requires a tool_id from discover_tools. Shows payment preview, prompts authentication (Touch ID on macOS), executes the tool, and returns results. Pass all required params from the tool's schema.",inputSchema:_e({type:"object",properties:{tool_id:{type:"string",description:'The tool ID from discover_tools results, e.g. "fal-real-esrgan-4x"'},params:{type:"object",description:"Parameters for the tool, matching its inputSchema from discover_tools."}},required:["tool_id"]}),annotations:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}},...ci()?fs.map(n=>({name:n,description:KO(n),inputSchema:_e(WO(n)),annotations:n==="transcribe_audio"?{destructiveHint:!0,idempotentHint:!0,openWorldHint:!0}:{destructiveHint:!0,idempotentHint:!1,openWorldHint:!0}})):[]].filter(n=>!(vr.isToolDisabled(n.name)||!ui()&&ES.has(n.name)||!li()&&fS.has(n.name)))})),t.setRequestHandler(yn.CallToolRequestSchema,async n=>{let{name:o,arguments:s}=n.params,{userPrompt:i,cleanArgs:a}=iUe(s);try{if(vr.isToolDisabled(o))return{content:[{type:"text",text:`The "${o}" tool is currently disabled.`}],isError:!0};let c=aN(o);if(c)return{content:[{type:"text",text:`Tool "${o}" is not available: ${c}=false disables its surface. To enable, unset ${c} or set it to "true" in the MCP server env, then restart Claude.`}],isError:!0};let u;switch(o){case"get_status":u=await de.getStatus(i);break;case"add_card":u=await de.addCard(i);break;case"pay":{let p=Date.now();if(p-Vt<Cn){let _=Cn-(p-Vt);return{content:[{type:"text",text:`Rate limited. Please wait ${Math.ceil(_/1e3)} second(s) between payments.`}],isError:!0}}u=await de.pay(a,i),Vt=Date.now();break}case"get_cards":u=await de.getCards(i);break;case"remove_card":u=await de.removeCard(a,i);break;case"set_default_card":u=await de.setDefaultCard(a,i);break;case"transaction_history":u=await de.transactionHistory(i);break;case"update_spending_controls":u=await de.updateSpendingControls(a,i);break;case"config_list":u=await de.configList(a);break;case"config_set":u=await de.configSet(a);break;case"config_unset":u=await de.configUnset(a);break;case"biometric_status":u=await de.biometricStatus(i);break;case"biometric_on":u=await de.biometricOn(i);break;case"biometric_off":u=await de.biometricOff(a,i);break;case"reset":u=await de.reset(a,i);break;case"login":u=await de.login(i);break;case"generate_image_card":case"generate_image_fast_card":case"generate_video_tempo_card":case"generate_music_tempo_card":case"check_music_status_tempo_card":case"query_onchain_prices_card":case"allium_explorer_card":case"allium_explorer_results_card":case"pxlwall_card":{let p=Date.now();if(p-Vt<Cn){let _=Cn-(p-Vt);return{content:[{type:"text",text:`Rate limited. Please wait ${Math.ceil(_/1e3)} second(s) between payments.`}],isError:!0}}u=await de.shortcut(o,a,i),Vt=Date.now();break}case"feedback":u=await de.feedback(a,i);break;case"batch":{let p=Date.now();if(p-Vt<Cn){let _=Cn-(p-Vt);return{content:[{type:"text",text:`Rate limited. Please wait ${Math.ceil(_/1e3)} second(s) between payments.`}],isError:!0}}u=await de.batch(a,i),Vt=Date.now();break}case"discover_tools":u=await de.discoverTools(a);break;case"execute_tool":{let p=Date.now();if(p-Vt<Cn){let _=Cn-(p-Vt);return{content:[{type:"text",text:`Rate limited. Please wait ${Math.ceil(_/1e3)} second(s) between payments.`}],isError:!0}}u=await de.executeTool(a,i),Vt=Date.now();break}default:{if(fs.includes(o)){let p=Date.now();if(p-Vt<Cn){let _=Cn-(p-Vt);return{content:[{type:"text",text:`Rate limited. Please wait ${Math.ceil(_/1e3)} second(s) between payments.`}],isError:!0}}u=await XO(o,a,i),Vt=Date.now();break}return{content:[{type:"text",text:`Unknown tool: ${o}`}],isError:!0}}}if(sUe(o)&&u&&u.success!==!1){let p=u.amount??u.totalCharged??0,_=u.merchantName??o,d=null,S=u.urls||[];if(u.results&&Array.isArray(u.results))for(let f of u.results)f.urls&&(S=S.concat(f.urls));if(u._visa_receipt=oUe(p,_,S.length>0?S:void 0),SS.includes(o))try{d=await Vl(J);let f=Math.max(0,(d[o]||0)-1),T=cN(o,f,u.transactionId);Object.assign(u,T),d[o]=f+1}catch{}if(!u._feedback_prompt&&!u._feedback_hint)try{d??=await Vl(J);let f=Object.values(d).reduce((h,A)=>h+(Number.isFinite(A)?A:0),0),T=await J.getStatus();Object.assign(u,pN(T,f))}catch{}if(!tz&&!u._feedback_prompt&&!u._hud_prompt)try{if(d??=await Vl(J),Object.values(d).reduce((T,h)=>T+(Number.isFinite(h)?h:0),0)<=1){let T=az.join(iz.homedir(),".claude","settings.json"),h=!1;try{let A=JSON.parse(sz.readFileSync(T,"utf-8")),N=typeof A.statusLine=="object"?A.statusLine.command:"";h=xl(N)}catch{}h||(u._hud_prompt="You can add a small Visa HUD to your terminal \u2014 run `visa-cli hud enable` to keep an eye on agent activity, workspace, and spend at a glance.",tz=!0)}}catch{}}let l=J.lastSignals;return l.updateAvailable&&(u._update_available=l.updateAvailable.message),{content:[{type:"text",text:JSON.stringify(u,null,2)}]}}catch(c){return{content:[{type:"text",text:c.message||"Tool execution failed"}],isError:!0}}});let e=new oz.StdioServerTransport;await t.connect(e);let r=[ui()?"specific":null,ci()?"meta":null,li()?"discover":null].filter(Boolean).join("+")||"account-only";R.info(`Visa CLI Server running on stdio (surfaces: ${r})`)}aUe().catch(t=>{R.error("Server error:",t),process.exit(1)});
|