@tanagram/lore 0.1.140 → 0.1.141

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.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +5 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
3
- var d7e=Object.create;var VM=Object.defineProperty;var p7e=Object.getOwnPropertyDescriptor;var f7e=Object.getOwnPropertyNames;var A7e=Object.getPrototypeOf,m7e=Object.prototype.hasOwnProperty;var Ge=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ha=(e,t)=>{for(var n in t)VM(e,n,{get:t[n],enumerable:!0})},Tle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f7e(t))!m7e.call(e,o)&&o!==n&&VM(e,o,{get:()=>t[o],enumerable:!(r=p7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?d7e(A7e(e)):{},Tle(t||!e||!e.__esModule?VM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Tle(VM({},"__esModule",{value:!0}),e);var m=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.140"}}catch{}})()});var ng,p$=O(()=>{m();ng="1.9.1"});function g7e(e){let t=new Set([e]),n=new Set,r=e.match(ble);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let g=d.match(ble);if(!g)return i(d);let h={major:+g[1],minor:+g[2],patch:+g[3],prerelease:g[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var ble,vle,Rle=O(()=>{m();p$();ble=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;vle=g7e(ng)});function aA(e,t,n,r=!1){var o;let i=Z1[J1]=(o=Z1[J1])!==null&&o!==void 0?o:{version:ng};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==ng){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ng}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ng}.`),!0}function Cl(e){var t,n;let r=(t=Z1[J1])===null||t===void 0?void 0:t.version;if(!(!r||!vle(r)))return(n=Z1[J1])===null||n===void 0?void 0:n[e]}function sA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ng}.`);let n=Z1[J1];n&&delete n[e]}var h7e,J1,Z1,bS=O(()=>{m();p$();Rle();h7e=ng.split(".")[0],J1=Symbol.for(`opentelemetry.js.api.${h7e}`),Z1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function W1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var qM,xle=O(()=>{m();bS();qM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return W1("debug",this._namespace,t)}error(...t){return W1("error",this._namespace,t)}info(...t){return W1("info",this._namespace,t)}warn(...t){return W1("warn",this._namespace,t)}verbose(...t){return W1("verbose",this._namespace,t)}}});var ha,YM=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(ha||(ha={}))});function Dle(e,t){e<ha.NONE?e=ha.NONE:e>ha.ALL&&(e=ha.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",ha.ERROR),warn:n("warn",ha.WARN),info:n("info",ha.INFO),debug:n("debug",ha.DEBUG),verbose:n("verbose",ha.VERBOSE)}}var Ble=O(()=>{m();YM()});var _7e,$a,vS=O(()=>{m();xle();Ble();YM();bS();_7e="diag",$a=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Cl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:ha.INFO})=>{var a,c,d;if(o===n){let S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let g=Cl("diag"),h=Dle((c=i.logLevel)!==null&&c!==void 0?c:ha.INFO,o);if(g&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";g.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return aA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{sA(_7e,n)},n.createComponentLogger=o=>new qM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var KM,Nle=O(()=>{m();KM=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var Ole,wle=O(()=>{m();Ole=Symbol("BaggageEntryMetadata")});function kle(e={}){return new KM(new Map(Object.entries(e)))}function Ple(e){return typeof e!="string"&&(E7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ole,toString(){return e}}}var E7e,f$=O(()=>{m();vS();Nle();wle();E7e=$a.instance()});function bl(e){return Symbol.for(e)}var A$,HC,X1=O(()=>{m();A$=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},HC=new A$});var m$,g$,JM,Mle=O(()=>{m();m$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],g$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(g$[t]=console[t])}JM=class{constructor(){function t(n){return function(...r){let o=g$[n];if(typeof o!="function"&&(o=g$.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<m$.length;n++)this[m$[n].n]=t(m$[n].c)}}});function Ule(){return b$}var h$,$C,_$,E$,S$,y$,eB,T$,I$,C$,b$,S7e,y7e,T7e,I7e,C7e,b7e,v7e,v$=O(()=>{m();h$=class{constructor(){}createGauge(t,n){return y7e}createHistogram(t,n){return T7e}createCounter(t,n){return S7e}createUpDownCounter(t,n){return I7e}createObservableGauge(t,n){return b7e}createObservableCounter(t,n){return C7e}createObservableUpDownCounter(t,n){return v7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},$C=class{},_$=class extends $C{add(t,n){}},E$=class extends $C{add(t,n){}},S$=class extends $C{record(t,n){}},y$=class extends $C{record(t,n){}},eB=class{addCallback(t){}removeCallback(t){}},T$=class extends eB{},I$=class extends eB{},C$=class extends eB{},b$=new h$,S7e=new _$,y7e=new S$,T7e=new y$,I7e=new E$,C7e=new T$,b7e=new I$,v7e=new C$});var ZM,Lle=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ZM||(ZM={}))});var WM,XM,R$=O(()=>{m();WM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},XM={set(e,t,n){e!=null&&(e[t]=n)}}});var e2,Qle=O(()=>{m();X1();e2=class{active(){return HC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var x$,R7e,uA,tB=O(()=>{m();Qle();bS();vS();x$="context",R7e=new e2,uA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return aA(x$,t,$a.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return Cl(x$)||R7e}disable(){this._getContextManager().disable(),sA(x$,$a.instance())}}});var Ks,D$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var nB,RS,t2,n2=O(()=>{m();D$();nB="0000000000000000",RS="00000000000000000000000000000000",t2={traceId:RS,spanId:nB,traceFlags:Ks.NONE}});var cA,r2=O(()=>{m();n2();cA=class{constructor(t=t2){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function o2(e){return e.getValue(B$)||void 0}function Fle(){return o2(uA.getInstance().active())}function rB(e,t){return e.setValue(B$,t)}function Gle(e){return e.deleteValue(B$)}function jle(e,t){return rB(e,new cA(t))}function i2(e){var t;return(t=o2(e))===null||t===void 0?void 0:t.spanContext()}var B$,N$=O(()=>{m();X1();r2();tB();B$=bl("OpenTelemetry Context Key SPAN")});function zle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(a2[e.charCodeAt(r)]|0)+(a2[e.charCodeAt(r+1)]|0)+(a2[e.charCodeAt(r+2)]|0)+(a2[e.charCodeAt(r+3)]|0);return n===t}function O$(e){return zle(e,32)&&e!==RS}function w$(e){return zle(e,16)&&e!==nB}function rg(e){return O$(e.traceId)&&w$(e.spanId)}function Hle(e){return new cA(e)}var a2,s2=O(()=>{m();n2();r2();a2=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 x7e(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var k$,VC,P$=O(()=>{m();tB();N$();r2();s2();k$=uA.getInstance(),VC=class{startSpan(t,n,r=k$.active()){if(!!n?.root)return new cA;let i=r&&i2(r);return x7e(i)&&rg(i)?new cA(i):new cA}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??k$.active(),g=this.startSpan(t,i,d),h=rB(d,g);return k$.with(h,c,void 0,g)}}});var D7e,qC,M$=O(()=>{m();P$();D7e=new VC,qC=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):D7e}}});var u2,$le=O(()=>{m();P$();u2=class{getTracer(t,n,r){return new VC}}});var B7e,xS,U$=O(()=>{m();M$();$le();B7e=new u2,xS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new qC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:B7e}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var c2,Vle=O(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(c2||(c2={}))});var io,qle=O(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(io||(io={}))});var ui,Yle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Kle(e){return w7e.test(e)}function Jle(e){return k7e.test(e)&&!P7e.test(e)}var L$,N7e,O7e,w7e,k7e,P7e,Zle=O(()=>{m();L$="[_0-9a-z-*/]",N7e=`[a-z]${L$}{0,255}`,O7e=`[a-z0-9]${L$}{0,240}@[a-z]${L$}{0,13}`,w7e=new RegExp(`^(?:${N7e}|${O7e})$`),k7e=/^[ -~]{0,255}[!-~]$/,P7e=/,|=/});var Wle,M7e,Xle,ede,l2,tde=O(()=>{m();Zle();Wle=32,M7e=512,Xle=",",ede="=",l2=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+ede+this.get(n)),t),[]).join(Xle)}_parse(t){t.length>M7e||(this._internalState=t.split(Xle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ede);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Kle(a)&&Jle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Wle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Wle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function nde(e){return new l2(e)}var rde=O(()=>{m();tde()});var Ke,ode=O(()=>{m();tB();Ke=uA.getInstance()});var vl,ide=O(()=>{m();vS();vl=$a.instance()});var Q$,ade,sde=O(()=>{m();v$();Q$=class{getMeter(t,n,r){return b$}},ade=new Q$});var F$,d2,ude=O(()=>{m();sde();bS();vS();F$="metrics",d2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return aA(F$,t,$a.instance())}getMeterProvider(){return Cl(F$)||ade}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){sA(F$,$a.instance())}}});var G$,cde=O(()=>{m();ude();G$=d2.getInstance()});var p2,lde=O(()=>{m();p2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(j$)||void 0}function dde(){return z$(uA.getInstance().active())}function pde(e,t){return e.setValue(j$,t)}function fde(e){return e.deleteValue(j$)}var j$,Ade=O(()=>{m();tB();X1();j$=bl("OpenTelemetry Baggage Key")});var H$,U7e,f2,mde=O(()=>{m();bS();lde();R$();Ade();f$();vS();H$="propagation",U7e=new p2,f2=class e{constructor(){this.createBaggage=kle,this.getBaggage=z$,this.getActiveBaggage=dde,this.setBaggage=pde,this.deleteBaggage=fde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return aA(H$,t,$a.instance())}inject(t,n,r=XM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=WM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){sA(H$,$a.instance())}_getGlobalPropagator(){return Cl(H$)||U7e}}});var qp,gde=O(()=>{m();mde();qp=f2.getInstance()});var $$,A2,hde=O(()=>{m();bS();U$();s2();N$();vS();$$="trace",A2=class e{constructor(){this._proxyTracerProvider=new xS,this.wrapSpanContext=Hle,this.isSpanContextValid=rg,this.deleteSpan=Gle,this.getSpan=o2,this.getActiveSpan=Fle,this.getSpanContext=i2,this.setSpan=rB,this.setSpanContext=jle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=aA($$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl($$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){sA($$,$a.instance()),this._proxyTracerProvider=new xS}}});var Ht,_de=O(()=>{m();hde();Ht=A2.getInstance()});var We={};Ha(We,{DiagConsoleLogger:()=>JM,DiagLogLevel:()=>ha,INVALID_SPANID:()=>nB,INVALID_SPAN_CONTEXT:()=>t2,INVALID_TRACEID:()=>RS,ProxyTracer:()=>qC,ProxyTracerProvider:()=>xS,ROOT_CONTEXT:()=>HC,SamplingDecision:()=>c2,SpanKind:()=>io,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>ZM,baggageEntryMetadataFromString:()=>Ple,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ule,createTraceState:()=>nde,default:()=>L7e,defaultTextMapGetter:()=>WM,defaultTextMapSetter:()=>XM,diag:()=>vl,isSpanContextValid:()=>rg,isValidSpanId:()=>w$,isValidTraceId:()=>O$,metrics:()=>G$,propagation:()=>qp,trace:()=>Ht});var L7e,je=O(()=>{m();f$();X1();Mle();YM();v$();Lle();R$();M$();U$();Vle();qle();Yle();D$();rde();s2();n2();ode();ide();cde();gde();_de();L7e={context:Ke,diag:vl,metrics:G$,propagation:qp,trace:Ht}});var oB=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isTracingSuppressed=e_.unsuppressTracing=e_.suppressTracing=void 0;var Q7e=(je(),Me(We)),V$=(0,Q7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function F7e(e){return e.setValue(V$,!0)}e_.suppressTracing=F7e;function G7e(e){return e.deleteValue(V$)}e_.unsuppressTracing=G7e;function j7e(e){return e.getValue(V$)===!0}e_.isTracingSuppressed=j7e});var q$=F(Js=>{"use strict";m();Object.defineProperty(Js,"__esModule",{value:!0});Js.BAGGAGE_MAX_TOTAL_LENGTH=Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=Js.BAGGAGE_HEADER=Js.BAGGAGE_ITEMS_SEPARATOR=Js.BAGGAGE_PROPERTIES_SEPARATOR=Js.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Js.BAGGAGE_KEY_PAIR_SEPARATOR="=";Js.BAGGAGE_PROPERTIES_SEPARATOR=";";Js.BAGGAGE_ITEMS_SEPARATOR=",";Js.BAGGAGE_HEADER="baggage";Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Js.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Y$=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.parseKeyPairsIntoRecord=lA.parsePairKeyValue=lA.getKeyPairs=lA.serializeKeyPairs=void 0;var z7e=(je(),Me(We)),YC=q$();function H7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?YC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>YC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}lA.serializeKeyPairs=H7e;function $7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=YC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}lA.getKeyPairs=$7e;function Ede(e){if(!e)return;let t=e.indexOf(YC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(YC.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let g=e.substring(t+1);d=(0,z7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}lA.parsePairKeyValue=Ede;function V7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(YC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Ede(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}lA.parseKeyPairsIntoRecord=V7e});var Sde=F(m2=>{"use strict";m();Object.defineProperty(m2,"__esModule",{value:!0});m2.W3CBaggagePropagator=void 0;var K$=(je(),Me(We)),q7e=oB(),DS=q$(),J$=Y$(),Z$=class{inject(t,n,r){let o=K$.propagation.getBaggage(t);if(!o||(0,q7e.isTracingSuppressed)(t))return;let i=(0,J$.getKeyPairs)(o).filter(c=>c.length<=DS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,DS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,J$.serializeKeyPairs)(i);a.length>0&&r.set(n,DS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,DS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(DS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(DS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,J$.parsePairKeyValue)(d);if(g){let h={value:g.value};g.metadata&&(h.metadata=g.metadata),a[g.key]=h}}),Object.entries(a).length===0)?t:K$.propagation.setBaggage(t,K$.propagation.createBaggage(a))}fields(){return[DS.BAGGAGE_HEADER]}};m2.W3CBaggagePropagator=Z$});var yde=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.AnchoredClock=void 0;var W$=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};g2.AnchoredClock=W$});var vde=F(t_=>{"use strict";m();Object.defineProperty(t_,"__esModule",{value:!0});t_.isAttributeValue=t_.isAttributeKey=t_.sanitizeAttributes=void 0;var Tde=(je(),Me(We));function Y7e(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Ide(n)){Tde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Cde(r)){Tde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}t_.sanitizeAttributes=Y7e;function Ide(e){return typeof e=="string"&&e!==""}t_.isAttributeKey=Ide;function Cde(e){return e==null?!0:Array.isArray(e)?K7e(e):bde(typeof e)}t_.isAttributeValue=Cde;function K7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bde(r)){t=r;continue}return!1}return!1}}return!0}function bde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var X$=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.loggingErrorHandler=void 0;var J7e=(je(),Me(We));function Z7e(){return e=>{J7e.diag.error(W7e(e))}}h2.loggingErrorHandler=Z7e;function W7e(e){return typeof e=="string"?e:JSON.stringify(X7e(e))}function X7e(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var xde=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.globalErrorHandler=KC.setGlobalErrorHandler=void 0;var eYe=X$(),Rde=(0,eYe.loggingErrorHandler)();function tYe(e){Rde=e}KC.setGlobalErrorHandler=tYe;function nYe(e){try{Rde(e)}catch{}}KC.globalErrorHandler=nYe});var Ode=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.getStringListFromEnv=dA.getBooleanFromEnv=dA.getStringFromEnv=dA.getNumberFromEnv=void 0;var Dde=(je(),Me(We)),Bde=Ge("util");function rYe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}dA.getNumberFromEnv=rYe;function Nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}dA.getStringFromEnv=Nde;function oYe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}dA.getBooleanFromEnv=oYe;function iYe(e){return Nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}dA.getStringListFromEnv=iYe});var wde=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2._globalThis=void 0;_2._globalThis=globalThis});var kde=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2.VERSION=void 0;E2.VERSION="2.6.1"});function bi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var e5=O(()=>{m()});var Pde,Mde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,aYe,t5,sYe,uYe,cYe,lYe,n5,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,r5,DYe,BYe,NYe,OYe,wYe,kYe,PYe,MYe,UYe,LYe,QYe,FYe,o5,GYe,jYe,i5,a5,zYe,HYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,iB,JC,s5,aKe,sKe,BS,uKe,cKe,lKe,dKe,u5,c5,pKe,l5,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,kKe,PKe,d5,MKe,UKe,LKe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,p5,tJe,f5,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,VAe,qAe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,PJe,MJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,ime,ame,sme,ume,cme,hZe,_Ze,EZe,SZe,yZe,TZe,lme,dme,pme,IZe,CZe,bZe,vZe,fme,Ame,mme,gme,RZe,xZe,DZe,BZe,NZe,hme,_me,Eme,Sme,yme,Tme,Ime,OZe,wZe,kZe,PZe,MZe,UZe,LZe,QZe,Cme,bme,vme,Rme,xme,FZe,GZe,jZe,zZe,HZe,$Ze,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,qme,Yme,Kme,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,Jme,Zme,Wme,Xme,ege,AWe,mWe,gWe,hWe,_We,EWe,tge,nge,SWe,yWe,TWe,rge,oge,IWe,CWe,bWe,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,PWe,MWe,UWe,LWe,QWe,FWe,GWe,jWe,zWe,Tge,Ige,HWe,$We,VWe,Cge=O(()=>{m();e5();Pde="aws.lambda.invoked_arn",Mde="db.system",Ude="db.connection_string",Lde="db.user",Qde="db.jdbc.driver_classname",Fde="db.name",Gde="db.statement",jde="db.operation",zde="db.mssql.instance_name",Hde="db.cassandra.keyspace",$de="db.cassandra.page_size",Vde="db.cassandra.consistency_level",qde="db.cassandra.table",Yde="db.cassandra.idempotence",Kde="db.cassandra.speculative_execution_count",Jde="db.cassandra.coordinator.id",Zde="db.cassandra.coordinator.dc",Wde="db.hbase.namespace",Xde="db.redis.database_index",epe="db.mongodb.collection",tpe="db.sql.table",npe="exception.type",rpe="exception.message",ope="exception.stacktrace",ipe="exception.escaped",ape="faas.trigger",spe="faas.execution",upe="faas.document.collection",cpe="faas.document.operation",lpe="faas.document.time",dpe="faas.document.name",ppe="faas.time",fpe="faas.cron",Ape="faas.coldstart",mpe="faas.invoked_name",gpe="faas.invoked_provider",hpe="faas.invoked_region",_pe="net.transport",Epe="net.peer.ip",Spe="net.peer.port",ype="net.peer.name",Tpe="net.host.ip",Ipe="net.host.port",Cpe="net.host.name",bpe="net.host.connection.type",vpe="net.host.connection.subtype",Rpe="net.host.carrier.name",xpe="net.host.carrier.mcc",Dpe="net.host.carrier.mnc",Bpe="net.host.carrier.icc",Npe="peer.service",Ope="enduser.id",wpe="enduser.role",kpe="enduser.scope",Ppe="thread.id",Mpe="thread.name",Upe="code.function",Lpe="code.namespace",Qpe="code.filepath",Fpe="code.lineno",Gpe="http.method",jpe="http.url",zpe="http.target",Hpe="http.host",$pe="http.scheme",Vpe="http.status_code",qpe="http.flavor",Ype="http.user_agent",Kpe="http.request_content_length",Jpe="http.request_content_length_uncompressed",Zpe="http.response_content_length",Wpe="http.response_content_length_uncompressed",Xpe="http.server_name",efe="http.route",tfe="http.client_ip",nfe="aws.dynamodb.table_names",rfe="aws.dynamodb.consumed_capacity",ofe="aws.dynamodb.item_collection_metrics",ife="aws.dynamodb.provisioned_read_capacity",afe="aws.dynamodb.provisioned_write_capacity",sfe="aws.dynamodb.consistent_read",ufe="aws.dynamodb.projection",cfe="aws.dynamodb.limit",lfe="aws.dynamodb.attributes_to_get",dfe="aws.dynamodb.index_name",pfe="aws.dynamodb.select",ffe="aws.dynamodb.global_secondary_indexes",Afe="aws.dynamodb.local_secondary_indexes",mfe="aws.dynamodb.exclusive_start_table",gfe="aws.dynamodb.table_count",hfe="aws.dynamodb.scan_forward",_fe="aws.dynamodb.segment",Efe="aws.dynamodb.total_segments",Sfe="aws.dynamodb.count",yfe="aws.dynamodb.scanned_count",Tfe="aws.dynamodb.attribute_definitions",Ife="aws.dynamodb.global_secondary_index_updates",Cfe="messaging.system",bfe="messaging.destination",vfe="messaging.destination_kind",Rfe="messaging.temp_destination",xfe="messaging.protocol",Dfe="messaging.protocol_version",Bfe="messaging.url",Nfe="messaging.message_id",Ofe="messaging.conversation_id",wfe="messaging.message_payload_size_bytes",kfe="messaging.message_payload_compressed_size_bytes",Pfe="messaging.operation",Mfe="messaging.consumer_id",Ufe="messaging.rabbitmq.routing_key",Lfe="messaging.kafka.message_key",Qfe="messaging.kafka.consumer_group",Ffe="messaging.kafka.client_id",Gfe="messaging.kafka.partition",jfe="messaging.kafka.tombstone",zfe="rpc.system",Hfe="rpc.service",$fe="rpc.method",Vfe="rpc.grpc.status_code",qfe="rpc.jsonrpc.version",Yfe="rpc.jsonrpc.request_id",Kfe="rpc.jsonrpc.error_code",Jfe="rpc.jsonrpc.error_message",Zfe="message.type",Wfe="message.id",Xfe="message.compressed_size",eAe="message.uncompressed_size",aYe=Pde,t5=Mde,sYe=Ude,uYe=Lde,cYe=Qde,lYe=Fde,n5=Gde,dYe=jde,pYe=zde,fYe=Hde,AYe=$de,mYe=Vde,gYe=qde,hYe=Yde,_Ye=Kde,EYe=Jde,SYe=Zde,yYe=Wde,TYe=Xde,IYe=epe,CYe=tpe,bYe=npe,vYe=rpe,RYe=ope,xYe=ipe,r5=ape,DYe=spe,BYe=upe,NYe=cpe,OYe=lpe,wYe=dpe,kYe=ppe,PYe=fpe,MYe=Ape,UYe=mpe,LYe=gpe,QYe=hpe,FYe=_pe,o5=Epe,GYe=Spe,jYe=ype,i5=Tpe,a5=Ipe,zYe=Cpe,HYe=bpe,$Ye=vpe,VYe=Rpe,qYe=xpe,YYe=Dpe,KYe=Bpe,JYe=Npe,ZYe=Ope,WYe=wpe,XYe=kpe,eKe=Ppe,tKe=Mpe,nKe=Upe,rKe=Lpe,oKe=Qpe,iKe=Fpe,iB=Gpe,JC=jpe,s5=zpe,aKe=Hpe,sKe=$pe,BS=Vpe,uKe=qpe,cKe=Ype,lKe=Kpe,dKe=Jpe,u5=Zpe,c5=Wpe,pKe=Xpe,l5=efe,fKe=tfe,AKe=nfe,mKe=rfe,gKe=ofe,hKe=ife,_Ke=afe,EKe=sfe,SKe=ufe,yKe=cfe,TKe=lfe,IKe=dfe,CKe=pfe,bKe=ffe,vKe=Afe,RKe=mfe,xKe=gfe,DKe=hfe,BKe=_fe,NKe=Efe,OKe=Sfe,wKe=yfe,kKe=Tfe,PKe=Ife,d5=Cfe,MKe=bfe,UKe=vfe,LKe=Rfe,QKe=xfe,FKe=Dfe,GKe=Bfe,jKe=Nfe,zKe=Ofe,HKe=wfe,$Ke=kfe,VKe=Pfe,qKe=Mfe,YKe=Ufe,KKe=Lfe,JKe=Qfe,ZKe=Ffe,WKe=Gfe,XKe=jfe,eJe=zfe,p5=Hfe,tJe=$fe,f5=Vfe,nJe=qfe,rJe=Yfe,oJe=Kfe,iJe=Jfe,aJe=Zfe,sJe=Wfe,uJe=Xfe,cJe=eAe,lJe=bi([Pde,Mde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe]),tAe="other_sql",nAe="mssql",rAe="mysql",oAe="oracle",iAe="db2",aAe="postgresql",sAe="redshift",uAe="hive",cAe="cloudscape",lAe="hsqldb",dAe="progress",pAe="maxdb",fAe="hanadb",AAe="ingres",mAe="firstsql",gAe="edb",hAe="cache",_Ae="adabas",EAe="firebird",SAe="derby",yAe="filemaker",TAe="informix",IAe="instantdb",CAe="interbase",bAe="mariadb",vAe="netezza",RAe="pervasive",xAe="pointbase",DAe="sqlite",BAe="sybase",NAe="teradata",OAe="vertica",wAe="h2",kAe="coldfusion",PAe="cassandra",MAe="hbase",UAe="mongodb",LAe="redis",QAe="couchbase",FAe="couchdb",GAe="cosmosdb",jAe="dynamodb",zAe="neo4j",HAe="geode",$Ae="elasticsearch",VAe="memcached",qAe="cockroachdb",dJe=tAe,pJe=nAe,fJe=rAe,AJe=oAe,mJe=iAe,gJe=aAe,hJe=sAe,_Je=uAe,EJe=cAe,SJe=lAe,yJe=dAe,TJe=pAe,IJe=fAe,CJe=AAe,bJe=mAe,vJe=gAe,RJe=hAe,xJe=_Ae,DJe=EAe,BJe=SAe,NJe=yAe,OJe=TAe,wJe=IAe,kJe=CAe,PJe=bAe,MJe=vAe,UJe=RAe,LJe=xAe,QJe=DAe,FJe=BAe,GJe=NAe,jJe=OAe,zJe=wAe,HJe=kAe,$Je=PAe,VJe=MAe,qJe=UAe,YJe=LAe,KJe=QAe,JJe=FAe,ZJe=GAe,WJe=jAe,XJe=zAe,eZe=HAe,tZe=$Ae,nZe=VAe,rZe=qAe,oZe=bi([tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,VAe,qAe]),YAe="all",KAe="each_quorum",JAe="quorum",ZAe="local_quorum",WAe="one",XAe="two",eme="three",tme="local_one",nme="any",rme="serial",ome="local_serial",iZe=YAe,aZe=KAe,sZe=JAe,uZe=ZAe,cZe=WAe,lZe=XAe,dZe=eme,pZe=tme,fZe=nme,AZe=rme,mZe=ome,gZe=bi([YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome]),ime="datasource",ame="http",sme="pubsub",ume="timer",cme="other",hZe=ime,_Ze=ame,EZe=sme,SZe=ume,yZe=cme,TZe=bi([ime,ame,sme,ume,cme]),lme="insert",dme="edit",pme="delete",IZe=lme,CZe=dme,bZe=pme,vZe=bi([lme,dme,pme]),fme="alibaba_cloud",Ame="aws",mme="azure",gme="gcp",RZe=fme,xZe=Ame,DZe=mme,BZe=gme,NZe=bi([fme,Ame,mme,gme]),hme="ip_tcp",_me="ip_udp",Eme="ip",Sme="unix",yme="pipe",Tme="inproc",Ime="other",OZe=hme,wZe=_me,kZe=Eme,PZe=Sme,MZe=yme,UZe=Tme,LZe=Ime,QZe=bi([hme,_me,Eme,Sme,yme,Tme,Ime]),Cme="wifi",bme="wired",vme="cell",Rme="unavailable",xme="unknown",FZe=Cme,GZe=bme,jZe=vme,zZe=Rme,HZe=xme,$Ze=bi([Cme,bme,vme,Rme,xme]),Dme="gprs",Bme="edge",Nme="umts",Ome="cdma",wme="evdo_0",kme="evdo_a",Pme="cdma2000_1xrtt",Mme="hsdpa",Ume="hsupa",Lme="hspa",Qme="iden",Fme="evdo_b",Gme="lte",jme="ehrpd",zme="hspap",Hme="gsm",$me="td_scdma",Vme="iwlan",qme="nr",Yme="nrnsa",Kme="lte_ca",VZe=Dme,qZe=Bme,YZe=Nme,KZe=Ome,JZe=wme,ZZe=kme,WZe=Pme,XZe=Mme,eWe=Ume,tWe=Lme,nWe=Qme,rWe=Fme,oWe=Gme,iWe=jme,aWe=zme,sWe=Hme,uWe=$me,cWe=Vme,lWe=qme,dWe=Yme,pWe=Kme,fWe=bi([Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,qme,Yme,Kme]),Jme="1.0",Zme="1.1",Wme="2.0",Xme="SPDY",ege="QUIC",AWe=Jme,mWe=Zme,gWe=Wme,hWe=Xme,_We=ege,EWe={HTTP_1_0:Jme,HTTP_1_1:Zme,HTTP_2_0:Wme,SPDY:Xme,QUIC:ege},tge="queue",nge="topic",SWe=tge,yWe=nge,TWe=bi([tge,nge]),rge="receive",oge="process",IWe=rge,CWe=oge,bWe=bi([rge,oge]),ige=0,age=1,sge=2,uge=3,cge=4,lge=5,dge=6,pge=7,fge=8,Age=9,mge=10,gge=11,hge=12,_ge=13,Ege=14,Sge=15,yge=16,vWe=ige,RWe=age,xWe=sge,DWe=uge,BWe=cge,NWe=lge,OWe=dge,wWe=pge,kWe=fge,PWe=Age,MWe=mge,UWe=gge,LWe=hge,QWe=_ge,FWe=Ege,GWe=Sge,jWe=yge,zWe={OK:ige,CANCELLED:age,UNKNOWN:sge,INVALID_ARGUMENT:uge,DEADLINE_EXCEEDED:cge,NOT_FOUND:lge,ALREADY_EXISTS:dge,PERMISSION_DENIED:pge,RESOURCE_EXHAUSTED:fge,FAILED_PRECONDITION:Age,ABORTED:mge,OUT_OF_RANGE:gge,UNIMPLEMENTED:hge,INTERNAL:_ge,UNAVAILABLE:Ege,DATA_LOSS:Sge,UNAUTHENTICATED:yge},Tge="SENT",Ige="RECEIVED",HWe=Tge,$We=Ige,VWe=bi([Tge,Ige])});var bge=O(()=>{m();Cge()});var vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Pge,Mge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,UXe,LXe,QXe,FXe,GXe,jXe,zXe,HXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,cet,A5,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Xhe,e_e,t_e,n_e,Tet,Iet,Cet,bet,vet,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,Ret,xet,Det,Bet,Net,Oet,wet,ket,Pet,Met,Uet,Let,Qet,Fet,Get,jet,zet,Het,S_e,y_e,$et,Vet,qet,T_e,I_e,C_e,b_e,v_e,R_e,x_e,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,D_e,B_e,N_e,O_e,w_e,k_e,P_e,M_e,U_e,L_e,Q_e,ntt,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,F_e,G_e,j_e,z_e,H_e,$_e,V_e,q_e,Y_e,K_e,Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,Ctt,J_e=O(()=>{m();e5();vge="cloud.provider",Rge="cloud.account.id",xge="cloud.region",Dge="cloud.availability_zone",Bge="cloud.platform",Nge="aws.ecs.container.arn",Oge="aws.ecs.cluster.arn",wge="aws.ecs.launchtype",kge="aws.ecs.task.arn",Pge="aws.ecs.task.family",Mge="aws.ecs.task.revision",Uge="aws.eks.cluster.arn",Lge="aws.log.group.names",Qge="aws.log.group.arns",Fge="aws.log.stream.names",Gge="aws.log.stream.arns",jge="container.name",zge="container.id",Hge="container.runtime",$ge="container.image.name",Vge="container.image.tag",qge="deployment.environment",Yge="device.id",Kge="device.model.identifier",Jge="device.model.name",Zge="faas.name",Wge="faas.id",Xge="faas.version",ehe="faas.instance",the="faas.max_memory",nhe="host.id",rhe="host.name",ohe="host.type",ihe="host.arch",ahe="host.image.name",she="host.image.id",uhe="host.image.version",che="k8s.cluster.name",lhe="k8s.node.name",dhe="k8s.node.uid",phe="k8s.namespace.name",fhe="k8s.pod.uid",Ahe="k8s.pod.name",mhe="k8s.container.name",ghe="k8s.replicaset.uid",hhe="k8s.replicaset.name",_he="k8s.deployment.uid",Ehe="k8s.deployment.name",She="k8s.statefulset.uid",yhe="k8s.statefulset.name",The="k8s.daemonset.uid",Ihe="k8s.daemonset.name",Che="k8s.job.uid",bhe="k8s.job.name",vhe="k8s.cronjob.uid",Rhe="k8s.cronjob.name",xhe="os.type",Dhe="os.description",Bhe="os.name",Nhe="os.version",Ohe="process.pid",whe="process.executable.name",khe="process.executable.path",Phe="process.command",Mhe="process.command_line",Uhe="process.command_args",Lhe="process.owner",Qhe="process.runtime.name",Fhe="process.runtime.version",Ghe="process.runtime.description",jhe="service.name",zhe="service.namespace",Hhe="service.instance.id",$he="service.version",Vhe="telemetry.sdk.name",qhe="telemetry.sdk.language",Yhe="telemetry.sdk.version",Khe="telemetry.auto.version",Jhe="webengine.name",Zhe="webengine.version",Whe="webengine.description",qWe=vge,YWe=Rge,KWe=xge,JWe=Dge,ZWe=Bge,WWe=Nge,XWe=Oge,eXe=wge,tXe=kge,nXe=Pge,rXe=Mge,oXe=Uge,iXe=Lge,aXe=Qge,sXe=Fge,uXe=Gge,cXe=jge,lXe=zge,dXe=Hge,pXe=$ge,fXe=Vge,AXe=qge,mXe=Yge,gXe=Kge,hXe=Jge,_Xe=Zge,EXe=Wge,SXe=Xge,yXe=ehe,TXe=the,IXe=nhe,CXe=rhe,bXe=ohe,vXe=ihe,RXe=ahe,xXe=she,DXe=uhe,BXe=che,NXe=lhe,OXe=dhe,wXe=phe,kXe=fhe,PXe=Ahe,MXe=mhe,UXe=ghe,LXe=hhe,QXe=_he,FXe=Ehe,GXe=She,jXe=yhe,zXe=The,HXe=Ihe,$Xe=Che,VXe=bhe,qXe=vhe,YXe=Rhe,KXe=xhe,JXe=Dhe,ZXe=Bhe,WXe=Nhe,XXe=Ohe,eet=whe,tet=khe,net=Phe,ret=Mhe,oet=Uhe,iet=Lhe,aet=Qhe,set=Fhe,uet=Ghe,cet=jhe,A5=zhe,det=Hhe,pet=$he,fet=Vhe,Aet=qhe,met=Yhe,get=Khe,het=Jhe,_et=Zhe,Eet=Whe,yet=bi([vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Pge,Mge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe]),Xhe="alibaba_cloud",e_e="aws",t_e="azure",n_e="gcp",Tet=Xhe,Iet=e_e,Cet=t_e,bet=n_e,vet=bi([Xhe,e_e,t_e,n_e]),r_e="alibaba_cloud_ecs",o_e="alibaba_cloud_fc",i_e="aws_ec2",a_e="aws_ecs",s_e="aws_eks",u_e="aws_lambda",c_e="aws_elastic_beanstalk",l_e="azure_vm",d_e="azure_container_instances",p_e="azure_aks",f_e="azure_functions",A_e="azure_app_service",m_e="gcp_compute_engine",g_e="gcp_cloud_run",h_e="gcp_kubernetes_engine",__e="gcp_cloud_functions",E_e="gcp_app_engine",Ret=r_e,xet=o_e,Det=i_e,Bet=a_e,Net=s_e,Oet=u_e,wet=c_e,ket=l_e,Pet=d_e,Met=p_e,Uet=f_e,Let=A_e,Qet=m_e,Fet=g_e,Get=h_e,jet=__e,zet=E_e,Het=bi([r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e]),S_e="ec2",y_e="fargate",$et=S_e,Vet=y_e,qet=bi([S_e,y_e]),T_e="amd64",I_e="arm32",C_e="arm64",b_e="ia64",v_e="ppc32",R_e="ppc64",x_e="x86",Yet=T_e,Ket=I_e,Jet=C_e,Zet=b_e,Wet=v_e,Xet=R_e,ett=x_e,ttt=bi([T_e,I_e,C_e,b_e,v_e,R_e,x_e]),D_e="windows",B_e="linux",N_e="darwin",O_e="freebsd",w_e="netbsd",k_e="openbsd",P_e="dragonflybsd",M_e="hpux",U_e="aix",L_e="solaris",Q_e="z_os",ntt=D_e,rtt=B_e,ott=N_e,itt=O_e,att=w_e,stt=k_e,utt=P_e,ctt=M_e,ltt=U_e,dtt=L_e,ptt=Q_e,ftt=bi([D_e,B_e,N_e,O_e,w_e,k_e,P_e,M_e,U_e,L_e,Q_e]),F_e="cpp",G_e="dotnet",j_e="erlang",z_e="go",H_e="java",$_e="nodejs",V_e="php",q_e="python",Y_e="ruby",K_e="webjs",Att=F_e,mtt=G_e,gtt=j_e,htt=z_e,_tt=H_e,Ett=$_e,Stt=V_e,ytt=q_e,Ttt=Y_e,Itt=K_e,Ctt=bi([F_e,G_e,j_e,z_e,H_e,$_e,V_e,q_e,Y_e,K_e])});var Z_e=O(()=>{m();J_e()});var btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Ptt,Mtt,Utt,Ltt,Qtt,Ftt,Gtt,jtt,ztt,Htt,$tt,Vtt,qtt,Ytt,Ktt,m5,g5,Jtt,ZC,Ztt,h5,_5,Wtt,NS,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,E5,cnt,lnt,dnt,pnt,fnt,Ant,OS,mnt,gnt,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,og,ig,xnt,Dnt,Bnt,Nnt,Ont,wnt,knt,Pnt,Mnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,znt,S5,y5,Hnt,T5,I5,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,C5,b5,irt,v5,art,R5,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,Crt,brt,vrt,Rrt,xrt,Drt,Brt,n_,Nrt,Ort,wrt,x5,W_e=O(()=>{m();btt="aspnetcore.diagnostics.exception.result",vtt="aborted",Rtt="handled",xtt="skipped",Dtt="unhandled",Btt="aspnetcore.diagnostics.handler.type",Ntt="aspnetcore.rate_limiting.policy",Ott="aspnetcore.rate_limiting.result",wtt="acquired",ktt="endpoint_limiter",Ptt="global_limiter",Mtt="request_canceled",Utt="aspnetcore.request.is_unhandled",Ltt="aspnetcore.routing.is_fallback",Qtt="aspnetcore.routing.match_status",Ftt="failure",Gtt="success",jtt="aspnetcore.user.is_authenticated",ztt="client.address",Htt="client.port",$tt="code.column.number",Vtt="code.file.path",qtt="code.function.name",Ytt="code.line.number",Ktt="code.stacktrace",m5="db.collection.name",g5="db.namespace",Jtt="db.operation.batch.size",ZC="db.operation.name",Ztt="db.query.summary",h5="db.query.text",_5="db.response.status_code",Wtt="db.stored_procedure.name",NS="db.system.name",Xtt="mariadb",ent="microsoft.sql_server",tnt="mysql",nnt="postgresql",rnt="dotnet.gc.heap.generation",ont="gen0",int="gen1",ant="gen2",snt="loh",unt="poh",E5="error.type",cnt="_OTHER",lnt="exception.escaped",dnt="exception.message",pnt="exception.stacktrace",fnt="exception.type",Ant=e=>`http.request.header.${e}`,OS="http.request.method",mnt="_OTHER",gnt="CONNECT",hnt="DELETE",_nt="GET",Ent="HEAD",Snt="OPTIONS",ynt="PATCH",Tnt="POST",Int="PUT",Cnt="TRACE",bnt="http.request.method_original",vnt="http.request.resend_count",Rnt=e=>`http.response.header.${e}`,og="http.response.status_code",ig="http.route",xnt="jvm.gc.action",Dnt="jvm.gc.name",Bnt="jvm.memory.pool.name",Nnt="jvm.memory.type",Ont="heap",wnt="non_heap",knt="jvm.thread.daemon",Pnt="jvm.thread.state",Mnt="blocked",Unt="new",Lnt="runnable",Qnt="terminated",Fnt="timed_waiting",Gnt="waiting",jnt="network.local.address",znt="network.local.port",S5="network.peer.address",y5="network.peer.port",Hnt="network.protocol.name",T5="network.protocol.version",I5="network.transport",$nt="pipe",Vnt="quic",qnt="tcp",Ynt="udp",Knt="unix",Jnt="network.type",Znt="ipv4",Wnt="ipv6",Xnt="otel.scope.name",ert="otel.scope.version",trt="otel.status_code",nrt="ERROR",rrt="OK",ort="otel.status_description",C5="server.address",b5="server.port",irt="service.instance.id",v5="service.name",art="service.namespace",R5="service.version",srt="signalr.connection.status",urt="app_shutdown",crt="normal_closure",lrt="timeout",drt="signalr.transport",prt="long_polling",frt="server_sent_events",Art="web_sockets",mrt="telemetry.sdk.language",grt="cpp",hrt="dotnet",_rt="erlang",Ert="go",Srt="java",yrt="nodejs",Trt="php",Irt="python",Crt="ruby",brt="rust",vrt="swift",Rrt="webjs",xrt="telemetry.sdk.name",Drt="telemetry.sdk.version",Brt="url.fragment",n_="url.full",Nrt="url.path",Ort="url.query",wrt="url.scheme",x5="user_agent.original"});var krt,Prt,Mrt,Urt,Lrt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,Vrt,qrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,Cot,bot,vot,Rot,xot,Dot,Bot,X_e=O(()=>{m();krt="aspnetcore.diagnostics.exceptions",Prt="aspnetcore.rate_limiting.active_request_leases",Mrt="aspnetcore.rate_limiting.queued_requests",Urt="aspnetcore.rate_limiting.request.time_in_queue",Lrt="aspnetcore.rate_limiting.request_lease.duration",Qrt="aspnetcore.rate_limiting.requests",Frt="aspnetcore.routing.match_attempts",Grt="db.client.operation.duration",jrt="dotnet.assembly.count",zrt="dotnet.exceptions",Hrt="dotnet.gc.collections",$rt="dotnet.gc.heap.total_allocated",Vrt="dotnet.gc.last_collection.heap.fragmentation.size",qrt="dotnet.gc.last_collection.heap.size",Yrt="dotnet.gc.last_collection.memory.committed_size",Krt="dotnet.gc.pause.time",Jrt="dotnet.jit.compilation.time",Zrt="dotnet.jit.compiled_il.size",Wrt="dotnet.jit.compiled_methods",Xrt="dotnet.monitor.lock_contentions",eot="dotnet.process.cpu.count",tot="dotnet.process.cpu.time",not="dotnet.process.memory.working_set",rot="dotnet.thread_pool.queue.length",oot="dotnet.thread_pool.thread.count",iot="dotnet.thread_pool.work_item.count",aot="dotnet.timer.count",sot="http.client.request.duration",uot="http.server.request.duration",cot="jvm.class.count",lot="jvm.class.loaded",dot="jvm.class.unloaded",pot="jvm.cpu.count",fot="jvm.cpu.recent_utilization",Aot="jvm.cpu.time",mot="jvm.gc.duration",got="jvm.memory.committed",hot="jvm.memory.limit",_ot="jvm.memory.used",Eot="jvm.memory.used_after_last_gc",Sot="jvm.thread.count",yot="kestrel.active_connections",Tot="kestrel.active_tls_handshakes",Iot="kestrel.connection.duration",Cot="kestrel.queued_connections",bot="kestrel.queued_requests",vot="kestrel.rejected_connections",Rot="kestrel.tls_handshake.duration",xot="kestrel.upgraded_connections",Dot="signalr.server.active_connections",Bot="signalr.server.connection.duration"});var Not,eEe=O(()=>{m();Not="exception"});var Lr={};Ha(Lr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>vtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Rtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>xtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Dtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>wtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>ktt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Ptt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Mtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Ftt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Gtt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>btt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Btt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Ntt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ott,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Utt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Ltt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Qtt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>jtt,ATTR_CLIENT_ADDRESS:()=>ztt,ATTR_CLIENT_PORT:()=>Htt,ATTR_CODE_COLUMN_NUMBER:()=>$tt,ATTR_CODE_FILE_PATH:()=>Vtt,ATTR_CODE_FUNCTION_NAME:()=>qtt,ATTR_CODE_LINE_NUMBER:()=>Ytt,ATTR_CODE_STACKTRACE:()=>Ktt,ATTR_DB_COLLECTION_NAME:()=>m5,ATTR_DB_NAMESPACE:()=>g5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Jtt,ATTR_DB_OPERATION_NAME:()=>ZC,ATTR_DB_QUERY_SUMMARY:()=>Ztt,ATTR_DB_QUERY_TEXT:()=>h5,ATTR_DB_RESPONSE_STATUS_CODE:()=>_5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Wtt,ATTR_DB_SYSTEM_NAME:()=>NS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>rnt,ATTR_ERROR_TYPE:()=>E5,ATTR_EXCEPTION_ESCAPED:()=>lnt,ATTR_EXCEPTION_MESSAGE:()=>dnt,ATTR_EXCEPTION_STACKTRACE:()=>pnt,ATTR_EXCEPTION_TYPE:()=>fnt,ATTR_HTTP_REQUEST_HEADER:()=>Ant,ATTR_HTTP_REQUEST_METHOD:()=>OS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>bnt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>vnt,ATTR_HTTP_RESPONSE_HEADER:()=>Rnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>og,ATTR_HTTP_ROUTE:()=>ig,ATTR_JVM_GC_ACTION:()=>xnt,ATTR_JVM_GC_NAME:()=>Dnt,ATTR_JVM_MEMORY_POOL_NAME:()=>Bnt,ATTR_JVM_MEMORY_TYPE:()=>Nnt,ATTR_JVM_THREAD_DAEMON:()=>knt,ATTR_JVM_THREAD_STATE:()=>Pnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>jnt,ATTR_NETWORK_LOCAL_PORT:()=>znt,ATTR_NETWORK_PEER_ADDRESS:()=>S5,ATTR_NETWORK_PEER_PORT:()=>y5,ATTR_NETWORK_PROTOCOL_NAME:()=>Hnt,ATTR_NETWORK_PROTOCOL_VERSION:()=>T5,ATTR_NETWORK_TRANSPORT:()=>I5,ATTR_NETWORK_TYPE:()=>Jnt,ATTR_OTEL_SCOPE_NAME:()=>Xnt,ATTR_OTEL_SCOPE_VERSION:()=>ert,ATTR_OTEL_STATUS_CODE:()=>trt,ATTR_OTEL_STATUS_DESCRIPTION:()=>ort,ATTR_SERVER_ADDRESS:()=>C5,ATTR_SERVER_PORT:()=>b5,ATTR_SERVICE_INSTANCE_ID:()=>irt,ATTR_SERVICE_NAME:()=>v5,ATTR_SERVICE_NAMESPACE:()=>art,ATTR_SERVICE_VERSION:()=>R5,ATTR_SIGNALR_CONNECTION_STATUS:()=>srt,ATTR_SIGNALR_TRANSPORT:()=>drt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>mrt,ATTR_TELEMETRY_SDK_NAME:()=>xrt,ATTR_TELEMETRY_SDK_VERSION:()=>Drt,ATTR_URL_FRAGMENT:()=>Brt,ATTR_URL_FULL:()=>n_,ATTR_URL_PATH:()=>Nrt,ATTR_URL_QUERY:()=>Ort,ATTR_URL_SCHEME:()=>wrt,ATTR_USER_AGENT_ORIGINAL:()=>x5,AWSECSLAUNCHTYPEVALUES_EC2:()=>$et,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Vet,AwsEcsLaunchtypeValues:()=>qet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Ret,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>xet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Det,CLOUDPLATFORMVALUES_AWS_ECS:()=>Bet,CLOUDPLATFORMVALUES_AWS_EKS:()=>Net,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>wet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Oet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Met,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Let,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Pet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Uet,CLOUDPLATFORMVALUES_AZURE_VM:()=>ket,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>zet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>jet,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Fet,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Qet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Get,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Tet,CLOUDPROVIDERVALUES_AWS:()=>Iet,CLOUDPROVIDERVALUES_AZURE:()=>Cet,CLOUDPROVIDERVALUES_GCP:()=>bet,CloudPlatformValues:()=>Het,CloudProviderValues:()=>vet,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>iZe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>fZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>aZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>pZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>uZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>mZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>cZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>sZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>AZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>dZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>lZe,DBSYSTEMVALUES_ADABAS:()=>xJe,DBSYSTEMVALUES_CACHE:()=>RJe,DBSYSTEMVALUES_CASSANDRA:()=>$Je,DBSYSTEMVALUES_CLOUDSCAPE:()=>EJe,DBSYSTEMVALUES_COCKROACHDB:()=>rZe,DBSYSTEMVALUES_COLDFUSION:()=>HJe,DBSYSTEMVALUES_COSMOSDB:()=>ZJe,DBSYSTEMVALUES_COUCHBASE:()=>KJe,DBSYSTEMVALUES_COUCHDB:()=>JJe,DBSYSTEMVALUES_DB2:()=>mJe,DBSYSTEMVALUES_DERBY:()=>BJe,DBSYSTEMVALUES_DYNAMODB:()=>WJe,DBSYSTEMVALUES_EDB:()=>vJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>tZe,DBSYSTEMVALUES_FILEMAKER:()=>NJe,DBSYSTEMVALUES_FIREBIRD:()=>DJe,DBSYSTEMVALUES_FIRSTSQL:()=>bJe,DBSYSTEMVALUES_GEODE:()=>eZe,DBSYSTEMVALUES_H2:()=>zJe,DBSYSTEMVALUES_HANADB:()=>IJe,DBSYSTEMVALUES_HBASE:()=>VJe,DBSYSTEMVALUES_HIVE:()=>_Je,DBSYSTEMVALUES_HSQLDB:()=>SJe,DBSYSTEMVALUES_INFORMIX:()=>OJe,DBSYSTEMVALUES_INGRES:()=>CJe,DBSYSTEMVALUES_INSTANTDB:()=>wJe,DBSYSTEMVALUES_INTERBASE:()=>kJe,DBSYSTEMVALUES_MARIADB:()=>PJe,DBSYSTEMVALUES_MAXDB:()=>TJe,DBSYSTEMVALUES_MEMCACHED:()=>nZe,DBSYSTEMVALUES_MONGODB:()=>qJe,DBSYSTEMVALUES_MSSQL:()=>pJe,DBSYSTEMVALUES_MYSQL:()=>fJe,DBSYSTEMVALUES_NEO4J:()=>XJe,DBSYSTEMVALUES_NETEZZA:()=>MJe,DBSYSTEMVALUES_ORACLE:()=>AJe,DBSYSTEMVALUES_OTHER_SQL:()=>dJe,DBSYSTEMVALUES_PERVASIVE:()=>UJe,DBSYSTEMVALUES_POINTBASE:()=>LJe,DBSYSTEMVALUES_POSTGRESQL:()=>gJe,DBSYSTEMVALUES_PROGRESS:()=>yJe,DBSYSTEMVALUES_REDIS:()=>YJe,DBSYSTEMVALUES_REDSHIFT:()=>hJe,DBSYSTEMVALUES_SQLITE:()=>QJe,DBSYSTEMVALUES_SYBASE:()=>FJe,DBSYSTEMVALUES_TERADATA:()=>GJe,DBSYSTEMVALUES_VERTICA:()=>jJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Xtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ent,DB_SYSTEM_NAME_VALUE_MYSQL:()=>tnt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>nnt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>ont,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>int,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>ant,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>snt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>unt,DbCassandraConsistencyLevelValues:()=>gZe,DbSystemValues:()=>oZe,ERROR_TYPE_VALUE_OTHER:()=>cnt,EVENT_EXCEPTION:()=>Not,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>bZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>CZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>IZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>RZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>xZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>DZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>BZe,FAASTRIGGERVALUES_DATASOURCE:()=>hZe,FAASTRIGGERVALUES_HTTP:()=>_Ze,FAASTRIGGERVALUES_OTHER:()=>yZe,FAASTRIGGERVALUES_PUBSUB:()=>EZe,FAASTRIGGERVALUES_TIMER:()=>SZe,FaasDocumentOperationValues:()=>vZe,FaasInvokedProviderValues:()=>NZe,FaasTriggerValues:()=>TZe,HOSTARCHVALUES_AMD64:()=>Yet,HOSTARCHVALUES_ARM32:()=>Ket,HOSTARCHVALUES_ARM64:()=>Jet,HOSTARCHVALUES_IA64:()=>Zet,HOSTARCHVALUES_PPC32:()=>Wet,HOSTARCHVALUES_PPC64:()=>Xet,HOSTARCHVALUES_X86:()=>ett,HTTPFLAVORVALUES_HTTP_1_0:()=>AWe,HTTPFLAVORVALUES_HTTP_1_1:()=>mWe,HTTPFLAVORVALUES_HTTP_2_0:()=>gWe,HTTPFLAVORVALUES_QUIC:()=>_We,HTTPFLAVORVALUES_SPDY:()=>hWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>gnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>hnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>_nt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Ent,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Snt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>mnt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>ynt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Tnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Int,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Cnt,HostArchValues:()=>ttt,HttpFlavorValues:()=>EWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Ont,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>wnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Mnt,JVM_THREAD_STATE_VALUE_NEW:()=>Unt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Lnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Qnt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Fnt,JVM_THREAD_STATE_VALUE_WAITING:()=>Gnt,MESSAGETYPEVALUES_RECEIVED:()=>$We,MESSAGETYPEVALUES_SENT:()=>HWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>SWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>yWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>CWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>IWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>krt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Prt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Mrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Qrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Lrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Urt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Frt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Grt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>jrt,METRIC_DOTNET_EXCEPTIONS:()=>zrt,METRIC_DOTNET_GC_COLLECTIONS:()=>Hrt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>$rt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Vrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>qrt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Yrt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Krt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Jrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Zrt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Wrt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Xrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>eot,METRIC_DOTNET_PROCESS_CPU_TIME:()=>tot,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>not,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>rot,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>oot,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>iot,METRIC_DOTNET_TIMER_COUNT:()=>aot,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>sot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>uot,METRIC_JVM_CLASS_COUNT:()=>cot,METRIC_JVM_CLASS_LOADED:()=>lot,METRIC_JVM_CLASS_UNLOADED:()=>dot,METRIC_JVM_CPU_COUNT:()=>pot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>fot,METRIC_JVM_CPU_TIME:()=>Aot,METRIC_JVM_GC_DURATION:()=>mot,METRIC_JVM_MEMORY_COMMITTED:()=>got,METRIC_JVM_MEMORY_LIMIT:()=>hot,METRIC_JVM_MEMORY_USED:()=>_ot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Eot,METRIC_JVM_THREAD_COUNT:()=>Sot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>yot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Tot,METRIC_KESTREL_CONNECTION_DURATION:()=>Iot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Cot,METRIC_KESTREL_QUEUED_REQUESTS:()=>bot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>vot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Rot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>xot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Dot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Bot,MessageTypeValues:()=>VWe,MessagingDestinationKindValues:()=>TWe,MessagingOperationValues:()=>bWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>iWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>rWe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>sWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>aWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>nWe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>cWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>oWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>pWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>lWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>dWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>uWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>YZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>jZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>zZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>HZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>FZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>GZe,NETTRANSPORTVALUES_INPROC:()=>UZe,NETTRANSPORTVALUES_IP:()=>kZe,NETTRANSPORTVALUES_IP_TCP:()=>OZe,NETTRANSPORTVALUES_IP_UDP:()=>wZe,NETTRANSPORTVALUES_OTHER:()=>LZe,NETTRANSPORTVALUES_PIPE:()=>MZe,NETTRANSPORTVALUES_UNIX:()=>PZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>$nt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Vnt,NETWORK_TRANSPORT_VALUE_TCP:()=>qnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Ynt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Knt,NETWORK_TYPE_VALUE_IPV4:()=>Znt,NETWORK_TYPE_VALUE_IPV6:()=>Wnt,NetHostConnectionSubtypeValues:()=>fWe,NetHostConnectionTypeValues:()=>$Ze,NetTransportValues:()=>QZe,OSTYPEVALUES_AIX:()=>ltt,OSTYPEVALUES_DARWIN:()=>ott,OSTYPEVALUES_DRAGONFLYBSD:()=>utt,OSTYPEVALUES_FREEBSD:()=>itt,OSTYPEVALUES_HPUX:()=>ctt,OSTYPEVALUES_LINUX:()=>rtt,OSTYPEVALUES_NETBSD:()=>att,OSTYPEVALUES_OPENBSD:()=>stt,OSTYPEVALUES_SOLARIS:()=>dtt,OSTYPEVALUES_WINDOWS:()=>ntt,OSTYPEVALUES_Z_OS:()=>ptt,OTEL_STATUS_CODE_VALUE_ERROR:()=>nrt,OTEL_STATUS_CODE_VALUE_OK:()=>rrt,OsTypeValues:()=>ftt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>MWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>OWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>RWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>GWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>BWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>PWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>QWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>DWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>NWe,RPCGRPCSTATUSCODEVALUES_OK:()=>vWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>UWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>wWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>kWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>jWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>FWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>LWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>xWe,RpcGrpcStatusCodeValues:()=>zWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>TKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>kKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>EKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>mKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>OKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>RKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>bKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>PKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>IKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>gKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>yKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>vKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>SKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>hKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>_Ke,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>wKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>DKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>BKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>CKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>xKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>AKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>NKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>aYe,SEMATTRS_CODE_FILEPATH:()=>oKe,SEMATTRS_CODE_FUNCTION:()=>nKe,SEMATTRS_CODE_LINENO:()=>iKe,SEMATTRS_CODE_NAMESPACE:()=>rKe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>mYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>SYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>EYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>hYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>fYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>AYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>_Ye,SEMATTRS_DB_CASSANDRA_TABLE:()=>gYe,SEMATTRS_DB_CONNECTION_STRING:()=>sYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>yYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>cYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>IYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>pYe,SEMATTRS_DB_NAME:()=>lYe,SEMATTRS_DB_OPERATION:()=>dYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>TYe,SEMATTRS_DB_SQL_TABLE:()=>CYe,SEMATTRS_DB_STATEMENT:()=>n5,SEMATTRS_DB_SYSTEM:()=>t5,SEMATTRS_DB_USER:()=>uYe,SEMATTRS_ENDUSER_ID:()=>ZYe,SEMATTRS_ENDUSER_ROLE:()=>WYe,SEMATTRS_ENDUSER_SCOPE:()=>XYe,SEMATTRS_EXCEPTION_ESCAPED:()=>xYe,SEMATTRS_EXCEPTION_MESSAGE:()=>vYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>RYe,SEMATTRS_EXCEPTION_TYPE:()=>bYe,SEMATTRS_FAAS_COLDSTART:()=>MYe,SEMATTRS_FAAS_CRON:()=>PYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>BYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>wYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>NYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>OYe,SEMATTRS_FAAS_EXECUTION:()=>DYe,SEMATTRS_FAAS_INVOKED_NAME:()=>UYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>LYe,SEMATTRS_FAAS_INVOKED_REGION:()=>QYe,SEMATTRS_FAAS_TIME:()=>kYe,SEMATTRS_FAAS_TRIGGER:()=>r5,SEMATTRS_HTTP_CLIENT_IP:()=>fKe,SEMATTRS_HTTP_FLAVOR:()=>uKe,SEMATTRS_HTTP_HOST:()=>aKe,SEMATTRS_HTTP_METHOD:()=>iB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>lKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>dKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>u5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>c5,SEMATTRS_HTTP_ROUTE:()=>l5,SEMATTRS_HTTP_SCHEME:()=>sKe,SEMATTRS_HTTP_SERVER_NAME:()=>pKe,SEMATTRS_HTTP_STATUS_CODE:()=>BS,SEMATTRS_HTTP_TARGET:()=>s5,SEMATTRS_HTTP_URL:()=>JC,SEMATTRS_HTTP_USER_AGENT:()=>cKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>uJe,SEMATTRS_MESSAGE_ID:()=>sJe,SEMATTRS_MESSAGE_TYPE:()=>aJe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>cJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>qKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>zKe,SEMATTRS_MESSAGING_DESTINATION:()=>MKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>UKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>ZKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>JKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>KKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>WKe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>XKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>jKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>$Ke,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>HKe,SEMATTRS_MESSAGING_OPERATION:()=>VKe,SEMATTRS_MESSAGING_PROTOCOL:()=>QKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>FKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>YKe,SEMATTRS_MESSAGING_SYSTEM:()=>d5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>LKe,SEMATTRS_MESSAGING_URL:()=>GKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>KYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>qYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>YYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>VYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>$Ye,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>HYe,SEMATTRS_NET_HOST_IP:()=>i5,SEMATTRS_NET_HOST_NAME:()=>zYe,SEMATTRS_NET_HOST_PORT:()=>a5,SEMATTRS_NET_PEER_IP:()=>o5,SEMATTRS_NET_PEER_NAME:()=>jYe,SEMATTRS_NET_PEER_PORT:()=>GYe,SEMATTRS_NET_TRANSPORT:()=>FYe,SEMATTRS_PEER_SERVICE:()=>JYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>f5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>oJe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>iJe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>rJe,SEMATTRS_RPC_JSONRPC_VERSION:()=>nJe,SEMATTRS_RPC_METHOD:()=>tJe,SEMATTRS_RPC_SERVICE:()=>p5,SEMATTRS_RPC_SYSTEM:()=>eJe,SEMATTRS_THREAD_ID:()=>eKe,SEMATTRS_THREAD_NAME:()=>tKe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>XWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>WWe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>eXe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>tXe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>nXe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>rXe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>oXe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>aXe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>iXe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>uXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>sXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>YWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>JWe,SEMRESATTRS_CLOUD_PLATFORM:()=>ZWe,SEMRESATTRS_CLOUD_PROVIDER:()=>qWe,SEMRESATTRS_CLOUD_REGION:()=>KWe,SEMRESATTRS_CONTAINER_ID:()=>lXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>pXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>fXe,SEMRESATTRS_CONTAINER_NAME:()=>cXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>dXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>AXe,SEMRESATTRS_DEVICE_ID:()=>mXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>gXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>hXe,SEMRESATTRS_FAAS_ID:()=>EXe,SEMRESATTRS_FAAS_INSTANCE:()=>yXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>TXe,SEMRESATTRS_FAAS_NAME:()=>_Xe,SEMRESATTRS_FAAS_VERSION:()=>SXe,SEMRESATTRS_HOST_ARCH:()=>vXe,SEMRESATTRS_HOST_ID:()=>IXe,SEMRESATTRS_HOST_IMAGE_ID:()=>xXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>RXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>DXe,SEMRESATTRS_HOST_NAME:()=>CXe,SEMRESATTRS_HOST_TYPE:()=>bXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>BXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>MXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>YXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>qXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>HXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>zXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>FXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>QXe,SEMRESATTRS_K8S_JOB_NAME:()=>VXe,SEMRESATTRS_K8S_JOB_UID:()=>$Xe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>wXe,SEMRESATTRS_K8S_NODE_NAME:()=>NXe,SEMRESATTRS_K8S_NODE_UID:()=>OXe,SEMRESATTRS_K8S_POD_NAME:()=>PXe,SEMRESATTRS_K8S_POD_UID:()=>kXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>LXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>UXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>jXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>GXe,SEMRESATTRS_OS_DESCRIPTION:()=>JXe,SEMRESATTRS_OS_NAME:()=>ZXe,SEMRESATTRS_OS_TYPE:()=>KXe,SEMRESATTRS_OS_VERSION:()=>WXe,SEMRESATTRS_PROCESS_COMMAND:()=>net,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>oet,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>ret,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>eet,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>tet,SEMRESATTRS_PROCESS_OWNER:()=>iet,SEMRESATTRS_PROCESS_PID:()=>XXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>uet,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>aet,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>set,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>det,SEMRESATTRS_SERVICE_NAME:()=>cet,SEMRESATTRS_SERVICE_NAMESPACE:()=>A5,SEMRESATTRS_SERVICE_VERSION:()=>pet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>get,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Aet,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>fet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>met,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Eet,SEMRESATTRS_WEBENGINE_NAME:()=>het,SEMRESATTRS_WEBENGINE_VERSION:()=>_et,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>urt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>crt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>lrt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>prt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>frt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Art,SemanticAttributes:()=>lJe,SemanticResourceAttributes:()=>yet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Att,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>mtt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>gtt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>htt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>_tt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ett,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Stt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ytt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Ttt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Itt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>grt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>hrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>_rt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Ert,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Srt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>yrt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Trt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Irt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Crt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>brt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>vrt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Rrt,TelemetrySdkLanguageValues:()=>Ctt});var Zn=O(()=>{m();bge();Z_e();W_e();X_e();eEe()});var tEe=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.ATTR_PROCESS_RUNTIME_NAME=void 0;S2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var nEe=F(T2=>{"use strict";m();Object.defineProperty(T2,"__esModule",{value:!0});T2.SDK_INFO=void 0;var Oot=kde(),y2=(Zn(),Me(Lr)),wot=tEe();T2.SDK_INFO={[y2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[wot.ATTR_PROCESS_RUNTIME_NAME]:"node",[y2.ATTR_TELEMETRY_SDK_LANGUAGE]:y2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[y2.ATTR_TELEMETRY_SDK_VERSION]:Oot.VERSION}});var rEe=F(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.otperformance=Zs.SDK_INFO=Zs._globalThis=Zs.getStringListFromEnv=Zs.getNumberFromEnv=Zs.getBooleanFromEnv=Zs.getStringFromEnv=void 0;var I2=Ode();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return I2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return I2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return I2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return I2.getStringListFromEnv}});var kot=wde();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return kot._globalThis}});var Pot=nEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return Pot.SDK_INFO}});Zs.otperformance=performance});var D5=F(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getStringFromEnv=Ws.getBooleanFromEnv=Ws.otperformance=Ws._globalThis=Ws.SDK_INFO=void 0;var wS=rEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return wS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return wS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return wS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return wS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return wS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return wS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return wS.getStringListFromEnv}})});var sEe=F(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var C2=D5(),oEe=9,Mot=6,Uot=Math.pow(10,Mot),b2=Math.pow(10,oEe);function aB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Uot);return[n,r]}ao.millisToHrTime=aB;function Lot(){return C2.otperformance.timeOrigin}ao.getTimeOrigin=Lot;function iEe(e){let t=aB(C2.otperformance.timeOrigin),n=aB(typeof e=="number"?e:C2.otperformance.now());return aEe(t,n)}ao.hrTime=iEe;function Qot(e){if(B5(e))return e;if(typeof e=="number")return e<C2.otperformance.timeOrigin?iEe(e):aB(e);if(e instanceof Date)return aB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=Qot;function Fot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=b2),[n,r]}ao.hrTimeDuration=Fot;function Got(e){let t=oEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=Got;function jot(e){return e[0]*b2+e[1]}ao.hrTimeToNanoseconds=jot;function zot(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=zot;function Hot(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=Hot;function B5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=B5;function $ot(e){return B5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=$ot;function aEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=b2&&(n[1]-=b2,n[0]+=1),n}ao.addHrTimes=aEe});var uEe=F(v2=>{"use strict";m();Object.defineProperty(v2,"__esModule",{value:!0});v2.unrefTimer=void 0;function Vot(e){typeof e!="number"&&e.unref()}v2.unrefTimer=Vot});var cEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.ExportResultCode=void 0;var qot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(qot=sB.ExportResultCode||(sB.ExportResultCode={}))});var dEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.CompositePropagator=void 0;var lEe=(je(),Me(We)),N5=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){lEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){lEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};R2.CompositePropagator=N5});var pEe=F(WC=>{"use strict";m();Object.defineProperty(WC,"__esModule",{value:!0});WC.validateValue=WC.validateKey=void 0;var O5="[_0-9a-z-*/]",Yot=`[a-z]${O5}{0,255}`,Kot=`[a-z0-9]${O5}{0,240}@[a-z]${O5}{0,13}`,Jot=new RegExp(`^(?:${Yot}|${Kot})$`),Zot=/^[ -~]{0,255}[!-~]$/,Wot=/,|=/;function Xot(e){return Jot.test(e)}WC.validateKey=Xot;function eit(e){return Zot.test(e)&&!Wot.test(e)}WC.validateValue=eit});var k5=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.TraceState=void 0;var fEe=pEe(),AEe=32,tit=512,mEe=",",gEe="=",w5=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+gEe+this.get(n)),t),[]).join(mEe)}_parse(t){t.length>tit||(this._internalState=t.split(mEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(gEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,fEe.validateKey)(a)&&(0,fEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>AEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};x2.TraceState=w5});var _Ee=F(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.W3CTraceContextPropagator=Xs.parseTraceParent=Xs.TRACE_STATE_HEADER=Xs.TRACE_PARENT_HEADER=void 0;var D2=(je(),Me(We)),nit=oB(),rit=k5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var oit="00",iit="(?!ff)[\\da-f]{2}",ait="(?![0]{32})[\\da-f]{32}",sit="(?![0]{16})[\\da-f]{16}",uit="[\\da-f]{2}",cit=new RegExp(`^\\s?(${iit})-(${ait})-(${sit})-(${uit})(-.*)?\\s?$`);function hEe(e){let t=cit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=hEe;var P5=class{inject(t,n,r){let o=D2.trace.getSpanContext(t);if(!o||(0,nit.isTracingSuppressed)(t)||!(0,D2.isSpanContextValid)(o))return;let i=`${oit}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||D2.TraceFlags.NONE).toString(16)}`;r.set(n,Xs.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Xs.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Xs.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=hEe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Xs.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new rit.TraceState(typeof d=="string"?d:void 0)}return D2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var EEe=F(Yp=>{"use strict";m();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.getRPCMetadata=Yp.deleteRPCMetadata=Yp.setRPCMetadata=Yp.RPCType=void 0;var lit=(je(),Me(We)),M5=(0,lit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),dit;(function(e){e.HTTP="http"})(dit=Yp.RPCType||(Yp.RPCType={}));function pit(e,t){return e.setValue(M5,t)}Yp.setRPCMetadata=pit;function fit(e){return e.deleteValue(M5)}Yp.deleteRPCMetadata=fit;function Ait(e){return e.getValue(M5)}Yp.getRPCMetadata=Ait});var CEe=F(B2=>{"use strict";m();Object.defineProperty(B2,"__esModule",{value:!0});B2.isPlainObject=void 0;var mit="[object Object]",git="[object Null]",hit="[object Undefined]",_it=Function.prototype,SEe=_it.toString,Eit=SEe.call(Object),Sit=Object.getPrototypeOf,yEe=Object.prototype,TEe=yEe.hasOwnProperty,kS=Symbol?Symbol.toStringTag:void 0,IEe=yEe.toString;function yit(e){if(!Tit(e)||Iit(e)!==mit)return!1;let t=Sit(e);if(t===null)return!0;let n=TEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&SEe.call(n)===Eit}B2.isPlainObject=yit;function Tit(e){return e!=null&&typeof e=="object"}function Iit(e){return e==null?e===void 0?hit:git:kS&&kS in Object(e)?Cit(e):bit(e)}function Cit(e){let t=TEe.call(e,kS),n=e[kS],r=!1;try{e[kS]=void 0,r=!0}catch{}let o=IEe.call(e);return r&&(t?e[kS]=n:delete e[kS]),o}function bit(e){return IEe.call(e)}});var DEe=F(w2=>{"use strict";m();Object.defineProperty(w2,"__esModule",{value:!0});w2.merge=void 0;var bEe=CEe(),vit=20;function Rit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=REe(t,e.shift(),0,n);return t}w2.merge=Rit;function U5(e){return O2(e)?e.slice():e}function REe(e,t,n=0,r){let o;if(!(n>vit)){if(n++,N2(e)||N2(t)||xEe(t))o=U5(t);else if(O2(e)){if(o=e.slice(),O2(t))for(let i=0,a=t.length;i<a;i++)o.push(U5(t[i]));else if(uB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=U5(t[d])}}}else if(uB(e))if(uB(t)){if(!xit(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],g=t[d];if(N2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(vEe(e,d,r)||vEe(t,d,r))delete o[d];else{if(uB(h)&&uB(S)){let y=r.get(h)||[],C=r.get(S)||[];y.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,y),r.set(S,C)}o[d]=REe(o[d],g,n,r)}}}}else o=t;return o}}function vEe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function O2(e){return Array.isArray(e)}function xEe(e){return typeof e=="function"}function uB(e){return!N2(e)&&!O2(e)&&!xEe(e)&&typeof e=="object"}function N2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function xit(e,t){return!(!(0,bEe.isPlainObject)(e)||!(0,bEe.isPlainObject)(t))}});var BEe=F(XC=>{"use strict";m();Object.defineProperty(XC,"__esModule",{value:!0});XC.callWithTimeout=XC.TimeoutError=void 0;var k2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};XC.TimeoutError=k2;function Dit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new k2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}XC.callWithTimeout=Dit});var OEe=F(eb=>{"use strict";m();Object.defineProperty(eb,"__esModule",{value:!0});eb.isUrlIgnored=eb.urlMatches=void 0;function NEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}eb.urlMatches=NEe;function Bit(e,t){if(!t)return!1;for(let n of t)if(NEe(e,n))return!0;return!1}eb.isUrlIgnored=Bit});var wEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var L5=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};P2.Deferred=L5});var kEe=F(M2=>{"use strict";m();Object.defineProperty(M2,"__esModule",{value:!0});M2.BindOnceFuture=void 0;var Nit=wEe(),Q5=class{_isCalled=!1;_deferred=new Nit.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};M2.BindOnceFuture=Q5});var MEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.diagLogLevelFromString=void 0;var ag=(je(),Me(We)),PEe={ALL:ag.DiagLogLevel.ALL,VERBOSE:ag.DiagLogLevel.VERBOSE,DEBUG:ag.DiagLogLevel.DEBUG,INFO:ag.DiagLogLevel.INFO,WARN:ag.DiagLogLevel.WARN,ERROR:ag.DiagLogLevel.ERROR,NONE:ag.DiagLogLevel.NONE};function Oit(e){if(e==null)return;let t=PEe[e.toUpperCase()];return t??(ag.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(PEe)}, using default`),ag.DiagLogLevel.INFO)}U2.diagLogLevelFromString=Oit});var LEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2._export=void 0;var UEe=(je(),Me(We)),wit=oB();function kit(e,t){return new Promise(n=>{UEe.context.with((0,wit.suppressTracing)(UEe.context.active()),()=>{e.export(t,n)})})}L2._export=kit});var Tr=F(Oe=>{"use strict";m();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.internal=Oe.diagLogLevelFromString=Oe.BindOnceFuture=Oe.urlMatches=Oe.isUrlIgnored=Oe.callWithTimeout=Oe.TimeoutError=Oe.merge=Oe.TraceState=Oe.unsuppressTracing=Oe.suppressTracing=Oe.isTracingSuppressed=Oe.setRPCMetadata=Oe.getRPCMetadata=Oe.deleteRPCMetadata=Oe.RPCType=Oe.parseTraceParent=Oe.W3CTraceContextPropagator=Oe.TRACE_STATE_HEADER=Oe.TRACE_PARENT_HEADER=Oe.CompositePropagator=Oe.otperformance=Oe.getStringListFromEnv=Oe.getNumberFromEnv=Oe.getBooleanFromEnv=Oe.getStringFromEnv=Oe._globalThis=Oe.SDK_INFO=Oe.parseKeyPairsIntoRecord=Oe.ExportResultCode=Oe.unrefTimer=Oe.timeInputToHrTime=Oe.millisToHrTime=Oe.isTimeInputHrTime=Oe.isTimeInput=Oe.hrTimeToTimeStamp=Oe.hrTimeToNanoseconds=Oe.hrTimeToMilliseconds=Oe.hrTimeToMicroseconds=Oe.hrTimeDuration=Oe.hrTime=Oe.getTimeOrigin=Oe.addHrTimes=Oe.loggingErrorHandler=Oe.setGlobalErrorHandler=Oe.globalErrorHandler=Oe.sanitizeAttributes=Oe.isAttributeValue=Oe.AnchoredClock=Oe.W3CBaggagePropagator=void 0;var Pit=Sde();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Pit.W3CBaggagePropagator}});var Mit=yde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return Mit.AnchoredClock}});var QEe=vde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return QEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return QEe.sanitizeAttributes}});var FEe=xde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return FEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return FEe.setGlobalErrorHandler}});var Uit=X$();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return Uit.loggingErrorHandler}});var Dd=sEe();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Dd.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Dd.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Dd.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Dd.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Dd.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Dd.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Dd.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Dd.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Dd.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Dd.timeInputToHrTime}});var Lit=uEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Lit.unrefTimer}});var Qit=cEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Qit.ExportResultCode}});var Fit=Y$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Fit.parseKeyPairsIntoRecord}});var PS=D5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return PS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return PS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return PS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return PS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return PS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return PS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return PS.otperformance}});var Git=dEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return Git.CompositePropagator}});var Q2=_Ee();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Q2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Q2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Q2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return Q2.parseTraceParent}});var F2=EEe();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return F2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return F2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return F2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return F2.setRPCMetadata}});var F5=oB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return F5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return F5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return F5.unsuppressTracing}});var jit=k5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return jit.TraceState}});var zit=DEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return zit.merge}});var GEe=BEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return GEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return GEe.callWithTimeout}});var jEe=OEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return jEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return jEe.urlMatches}});var Hit=kEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Hit.BindOnceFuture}});var $it=MEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return $it.diagLogLevelFromString}});var Vit=LEe();Oe.internal={_export:Vit._export}});var zEe=F(G2=>{"use strict";m();Object.defineProperty(G2,"__esModule",{value:!0});G2.VERSION=void 0;G2.VERSION="0.214.0"});var HEe=F(cB=>{"use strict";m();Object.defineProperty(cB,"__esModule",{value:!0});cB.SeverityNumber=void 0;var qit;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(qit=cB.SeverityNumber||(cB.SeverityNumber={}))});var z2=F(tb=>{"use strict";m();Object.defineProperty(tb,"__esModule",{value:!0});tb.NOOP_LOGGER=tb.NoopLogger=void 0;var j2=class{emit(t){}};tb.NoopLogger=j2;tb.NOOP_LOGGER=new j2});var $Ee=F(pA=>{"use strict";m();Object.defineProperty(pA,"__esModule",{value:!0});pA.API_BACKWARDS_COMPATIBILITY_VERSION=pA.makeGetter=pA._global=pA.GLOBAL_LOGS_API_KEY=void 0;pA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");pA._global=globalThis;function Yit(e,t,n){return r=>r===e?t:n}pA.makeGetter=Yit;pA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var G5=F(nb=>{"use strict";m();Object.defineProperty(nb,"__esModule",{value:!0});nb.NOOP_LOGGER_PROVIDER=nb.NoopLoggerProvider=void 0;var Kit=z2(),H2=class{getLogger(t,n,r){return new Kit.NoopLogger}};nb.NoopLoggerProvider=H2;nb.NOOP_LOGGER_PROVIDER=new H2});var VEe=F($2=>{"use strict";m();Object.defineProperty($2,"__esModule",{value:!0});$2.ProxyLogger=void 0;var Jit=z2(),j5=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Jit.NOOP_LOGGER}};$2.ProxyLogger=j5});var qEe=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLoggerProvider=void 0;var Zit=G5(),Wit=VEe(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Wit.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Zit.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};V2.ProxyLoggerProvider=z5});var KEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.LogsAPI=void 0;var Bd=$Ee(),Xit=G5(),YEe=qEe(),H5=class e{constructor(){this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Xit.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}};q2.LogsAPI=H5});var $5=F(fA=>{"use strict";m();Object.defineProperty(fA,"__esModule",{value:!0});fA.logs=fA.NoopLogger=fA.NOOP_LOGGER=fA.SeverityNumber=void 0;var eat=HEe();Object.defineProperty(fA,"SeverityNumber",{enumerable:!0,get:function(){return eat.SeverityNumber}});var JEe=z2();Object.defineProperty(fA,"NOOP_LOGGER",{enumerable:!0,get:function(){return JEe.NOOP_LOGGER}});Object.defineProperty(fA,"NoopLogger",{enumerable:!0,get:function(){return JEe.NoopLogger}});var tat=KEe();fA.logs=tat.LogsAPI.getInstance()});var ZEe=F(rb=>{"use strict";m();Object.defineProperty(rb,"__esModule",{value:!0});rb.disableInstrumentations=rb.enableInstrumentations=void 0;function nat(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}rb.enableInstrumentations=nat;function rat(e){e.forEach(t=>t.disable())}rb.disableInstrumentations=rat});var e0e=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.registerInstrumentations=void 0;var WEe=(je(),Me(We)),oat=$5(),XEe=ZEe();function iat(e){let t=e.tracerProvider||WEe.trace.getTracerProvider(),n=e.meterProvider||WEe.metrics.getMeterProvider(),r=e.loggerProvider||oat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,XEe.enableInstrumentations)(o,t,n,r),()=>{(0,XEe.disableInstrumentations)(o)}}Y2.registerInstrumentations=iat});var c0e=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.satisfies=void 0;var K5=(je(),Me(We)),i0e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,aat=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,sat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function uat(e,t,n){if(!cat(e))return K5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=fat(e);if(!r)return!1;let o=[],i=a0e(r,t,o,n);return i&&!n?.includePrerelease?dat(r,o):i}K2.satisfies=uat;function cat(e){return typeof e=="string"&&i0e.test(e)}function a0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(V5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=kat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!V5(e,i,n,r))return!1;return!0}return V5(e,t,n,r)}function V5(e,t,n,r){if(t=pat(t,r),t.includes(" "))return a0e(e,t,n,r);{let o=Aat(t);return n.push(o),lat(e,o)}}function lat(e,t){if(t.invalid)return!1;if(!t.version||Y5(t.version))return!0;let n=n0e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=n0e(r,o)}return sat[t.op]?.includes(n)}function dat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function pat(e,t){return e=e.trim(),e=Oat(e,t),e=Nat(e),e=wat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function fat(e){let t=e.match(i0e);if(!t){K5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function Aat(e){if(!e)return{};let t=e.match(aat);if(!t)return K5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function Y5(e){return e==="*"||e==="x"||e==="X"}function t0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function mat(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function gat(e,t){if(Y5(e)||Y5(t))return 0;let[n,r]=mat(t0e(e),t0e(t));return n>r?1:n<r?-1:0}function n0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=gat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var s0e="[a-zA-Z0-9-]",u0e="0|[1-9]\\d*",hat=`\\d*[a-zA-Z-]${s0e}*`,_at="((?:<|>)?=?)",r0e=`(?:${u0e}|${hat})`,Eat=`(?:-(${r0e}(?:\\.${r0e})*))`,o0e=`${s0e}+`,Sat=`(?:\\+(${o0e}(?:\\.${o0e})*))`,q5=`${u0e}|x|X|\\*`,lB=`[v=\\s]*(${q5})(?:\\.(${q5})(?:\\.(${q5})(?:${Eat})?${Sat}?)?)?`,yat=`^${_at}\\s*${lB}$`,Tat=new RegExp(yat),Iat=`^\\s*(${lB})\\s+-\\s+(${lB})\\s*$`,Cat=new RegExp(Iat),bat="(?:~>?)",vat=`^${bat}${lB}$`,Rat=new RegExp(vat),xat="(?:\\^)",Dat=`^${xat}${lB}$`,Bat=new RegExp(Dat);function Nat(e){let t=Rat;return e.replace(t,(n,r,o,i,a)=>{let c;return wu(r)?c="":wu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:wu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Oat(e,t){let n=Bat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return wu(i)?g="":wu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:wu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function wat(e,t){let n=Tat;return e.replace(n,(r,o,i,a,c,d)=>{let g=wu(i),h=g||wu(a),S=h||wu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function kat(e,t){let n=Cat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(wu(i)?o="":wu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:wu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,wu(S)?h="":wu(y)?h=`<${+S+1}.0.0-0`:wu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var J5=F(Ts=>{"use strict";m();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.massUnwrap=Ts.unwrap=Ts.massWrap=Ts.wrap=void 0;var ku=console.error.bind(console);function dB(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Pat=(e,t,n)=>{if(!e||!e[t]){ku("no original function "+String(t)+" to wrap");return}if(!n){ku("no wrapper function"),ku(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ku("original object and wrapper must be functions");return}let o=n(r,t);return dB(o,"__original",r),dB(o,"__unwrap",()=>{e[t]===o&&dB(e,t,r)}),dB(o,"__wrapped",!0),dB(e,t,o),o};Ts.wrap=Pat;var Mat=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ts.wrap)(r,o,n)})})};Ts.massWrap=Mat;var Uat=(e,t)=>{if(!e||!e[t]){ku("no function to unwrap."),ku(new Error().stack);return}let n=e[t];if(!n.__unwrap)ku("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ts.unwrap=Uat;var Lat=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ts.unwrap)(n,r)})})};Ts.massUnwrap=Lat;function pB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=pB;pB.wrap=Ts.wrap;pB.massWrap=Ts.massWrap;pB.unwrap=Ts.unwrap;pB.massUnwrap=Ts.massUnwrap});var l0e=F(Z2=>{"use strict";m();Object.defineProperty(Z2,"__esModule",{value:!0});Z2.InstrumentationAbstract=void 0;var Z5=(je(),Me(We)),Qat=$5(),J2=J5(),W5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=Z5.diag.createComponentLogger({namespace:t}),this._tracer=Z5.trace.getTracer(t,n),this._meter=Z5.metrics.getMeter(t,n),this._logger=Qat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=J2.wrap;_unwrap=J2.unwrap;_massWrap=J2.massWrap;_massUnwrap=J2.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};Z2.InstrumentationAbstract=W5});var p0e=F((B7t,d0e)=>{m();var ob=1e3,ib=ob*60,ab=ib*60,MS=ab*24,Fat=MS*7,Gat=MS*365.25;d0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return jat(e);if(n==="number"&&isFinite(e))return t.long?Hat(e):zat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function jat(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Gat;case"weeks":case"week":case"w":return n*Fat;case"days":case"day":case"d":return n*MS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ab;case"minutes":case"minute":case"mins":case"min":case"m":return n*ib;case"seconds":case"second":case"secs":case"sec":case"s":return n*ob;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function zat(e){var t=Math.abs(e);return t>=MS?Math.round(e/MS)+"d":t>=ab?Math.round(e/ab)+"h":t>=ib?Math.round(e/ib)+"m":t>=ob?Math.round(e/ob)+"s":e+"ms"}function Hat(e){var t=Math.abs(e);return t>=MS?W2(e,t,MS,"day"):t>=ab?W2(e,t,ab,"hour"):t>=ib?W2(e,t,ib,"minute"):t>=ob?W2(e,t,ob,"second"):e+" ms"}function W2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var X5=F((O7t,f0e)=>{m();function $at(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=p0e(),n.destroy=g,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,v;function x(...N){if(!x.enabled)return;let k=x,Q=Number(new Date),j=Q-(S||Q);k.diff=j,k.prev=S,k.curr=Q,S=Q,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let G=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let ye=n.formatters[ge];if(typeof ye=="function"){let be=N[G];oe=ye.call(k,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(k,N),(k.log||n.log).apply(k,N)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,v=n.enabled(h)),v),set:N=>{y=N}}),typeof n.init=="function"&&n.init(x),x}function r(h,S){let y=n(this.namespace+(typeof S>"u"?":":S)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let S=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of S)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,S){let y=0,C=0,v=-1,x=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(v=C,x=y,C++):(y++,C++);else if(v!==-1)C=v+1,x++,y=x;else return!1;for(;C<S.length&&S[C]==="*";)C++;return C===S.length}function a(){let h=[...n.names,...n.skips.map(S=>"-"+S)].join(",");return n.enable(""),h}function c(h){for(let S of n.skips)if(i(h,S))return!1;for(let S of n.names)if(i(h,S))return!0;return!1}function d(h){return h instanceof Error?h.stack||h.message:h}function g(){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 n.enable(n.load()),n}f0e.exports=$at});var A0e=F((xc,X2)=>{m();xc.formatArgs=qat;xc.save=Yat;xc.load=Kat;xc.useColors=Vat;xc.storage=Jat();xc.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();xc.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 Vat(){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 e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+X2.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}xc.log=console.debug||console.log||(()=>{});function Yat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function Kat(){let e;try{e=xc.storage.getItem("debug")||xc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Jat(){try{return localStorage}catch{}}X2.exports=X5()(xc);var{formatters:Zat}=X2.exports;Zat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var g0e=F((P7t,m0e)=>{"use strict";m();m0e.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var E0e=F((U7t,_0e)=>{"use strict";m();var Wat=Ge("os"),h0e=Ge("tty"),Nd=g0e(),{env:Va}=process,r_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?r_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(r_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?r_=1:Va.FORCE_COLOR==="false"?r_=0:r_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function e9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function t9(e,t){if(r_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&r_===void 0)return 0;let n=r_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Wat.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function Xat(e){let t=t9(e,e&&e.isTTY);return e9(t)}_0e.exports={supportsColor:Xat,stdout:e9(t9(!0,h0e.isatty(1))),stderr:e9(t9(!0,h0e.isatty(2)))}});var y0e=F((qa,tU)=>{m();var est=Ge("tty"),eU=Ge("util");qa.init=sst;qa.log=ost;qa.formatArgs=nst;qa.save=ist;qa.load=ast;qa.useColors=tst;qa.destroy=eU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");qa.colors=[6,2,3,4,5,1];try{let e=E0e();e&&(e.stderr||e).level>=2&&(qa.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{}qa.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function tst(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:est.isatty(process.stderr.fd)}function nst(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
3
+ var d7e=Object.create;var VM=Object.defineProperty;var p7e=Object.getOwnPropertyDescriptor;var f7e=Object.getOwnPropertyNames;var A7e=Object.getPrototypeOf,m7e=Object.prototype.hasOwnProperty;var Ge=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var F=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ha=(e,t)=>{for(var n in t)VM(e,n,{get:t[n],enumerable:!0})},Tle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of f7e(t))!m7e.call(e,o)&&o!==n&&VM(e,o,{get:()=>t[o],enumerable:!(r=p7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?d7e(A7e(e)):{},Tle(t||!e||!e.__esModule?VM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Tle(VM({},"__esModule",{value:!0}),e);var m=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.141"}}catch{}})()});var ng,p$=O(()=>{m();ng="1.9.1"});function g7e(e){let t=new Set([e]),n=new Set,r=e.match(ble);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let g=d.match(ble);if(!g)return i(d);let h={major:+g[1],minor:+g[2],patch:+g[3],prerelease:g[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var ble,vle,Rle=O(()=>{m();p$();ble=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;vle=g7e(ng)});function aA(e,t,n,r=!1){var o;let i=Z1[J1]=(o=Z1[J1])!==null&&o!==void 0?o:{version:ng};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==ng){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ng}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ng}.`),!0}function Cl(e){var t,n;let r=(t=Z1[J1])===null||t===void 0?void 0:t.version;if(!(!r||!vle(r)))return(n=Z1[J1])===null||n===void 0?void 0:n[e]}function sA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ng}.`);let n=Z1[J1];n&&delete n[e]}var h7e,J1,Z1,bS=O(()=>{m();p$();Rle();h7e=ng.split(".")[0],J1=Symbol.for(`opentelemetry.js.api.${h7e}`),Z1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function W1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var qM,xle=O(()=>{m();bS();qM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return W1("debug",this._namespace,t)}error(...t){return W1("error",this._namespace,t)}info(...t){return W1("info",this._namespace,t)}warn(...t){return W1("warn",this._namespace,t)}verbose(...t){return W1("verbose",this._namespace,t)}}});var ha,YM=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"})(ha||(ha={}))});function Dle(e,t){e<ha.NONE?e=ha.NONE:e>ha.ALL&&(e=ha.ALL),t=t||{};function n(r,o){let i=t[r];return typeof i=="function"&&e>=o?i.bind(t):function(){}}return{error:n("error",ha.ERROR),warn:n("warn",ha.WARN),info:n("info",ha.INFO),debug:n("debug",ha.DEBUG),verbose:n("verbose",ha.VERBOSE)}}var Ble=O(()=>{m();YM()});var _7e,$a,vS=O(()=>{m();xle();Ble();YM();bS();_7e="diag",$a=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Cl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:ha.INFO})=>{var a,c,d;if(o===n){let S=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((a=S.stack)!==null&&a!==void 0?a:S.message),!1}typeof i=="number"&&(i={logLevel:i});let g=Cl("diag"),h=Dle((c=i.logLevel)!==null&&c!==void 0?c:ha.INFO,o);if(g&&!i.suppressOverrideMessage){let S=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";g.warn(`Current logger will be overwritten from ${S}`),h.warn(`Current logger will overwrite one already registered from ${S}`)}return aA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{sA(_7e,n)},n.createComponentLogger=o=>new qM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var KM,Nle=O(()=>{m();KM=class e{constructor(t){this._entries=t?new Map(t):new Map}getEntry(t){let n=this._entries.get(t);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(t,n){let r=new e(this._entries);return r._entries.set(t,n),r}removeEntry(t){let n=new e(this._entries);return n._entries.delete(t),n}removeEntries(...t){let n=new e(this._entries);for(let r of t)n._entries.delete(r);return n}clear(){return new e}}});var Ole,wle=O(()=>{m();Ole=Symbol("BaggageEntryMetadata")});function kle(e={}){return new KM(new Map(Object.entries(e)))}function Ple(e){return typeof e!="string"&&(E7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ole,toString(){return e}}}var E7e,f$=O(()=>{m();vS();Nle();wle();E7e=$a.instance()});function bl(e){return Symbol.for(e)}var A$,HC,X1=O(()=>{m();A$=class e{constructor(t){let n=this;n._currentContext=t?new Map(t):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,o)=>{let i=new e(n._currentContext);return i._currentContext.set(r,o),i},n.deleteValue=r=>{let o=new e(n._currentContext);return o._currentContext.delete(r),o}}},HC=new A$});var m$,g$,JM,Mle=O(()=>{m();m$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],g$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(g$[t]=console[t])}JM=class{constructor(){function t(n){return function(...r){let o=g$[n];if(typeof o!="function"&&(o=g$.log),typeof o!="function"&&console&&(o=console[n],typeof o!="function"&&(o=console.log)),typeof o=="function")return o.apply(console,r)}}for(let n=0;n<m$.length;n++)this[m$[n].n]=t(m$[n].c)}}});function Ule(){return b$}var h$,$C,_$,E$,S$,y$,eB,T$,I$,C$,b$,S7e,y7e,T7e,I7e,C7e,b7e,v7e,v$=O(()=>{m();h$=class{constructor(){}createGauge(t,n){return y7e}createHistogram(t,n){return T7e}createCounter(t,n){return S7e}createUpDownCounter(t,n){return I7e}createObservableGauge(t,n){return b7e}createObservableCounter(t,n){return C7e}createObservableUpDownCounter(t,n){return v7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},$C=class{},_$=class extends $C{add(t,n){}},E$=class extends $C{add(t,n){}},S$=class extends $C{record(t,n){}},y$=class extends $C{record(t,n){}},eB=class{addCallback(t){}removeCallback(t){}},T$=class extends eB{},I$=class extends eB{},C$=class extends eB{},b$=new h$,S7e=new _$,y7e=new S$,T7e=new y$,I7e=new E$,C7e=new T$,b7e=new I$,v7e=new C$});var ZM,Lle=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(ZM||(ZM={}))});var WM,XM,R$=O(()=>{m();WM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},XM={set(e,t,n){e!=null&&(e[t]=n)}}});var e2,Qle=O(()=>{m();X1();e2=class{active(){return HC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var x$,R7e,uA,tB=O(()=>{m();Qle();bS();vS();x$="context",R7e=new e2,uA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return aA(x$,t,$a.instance())}active(){return this._getContextManager().active()}with(t,n,r,...o){return this._getContextManager().with(t,n,r,...o)}bind(t,n){return this._getContextManager().bind(t,n)}_getContextManager(){return Cl(x$)||R7e}disable(){this._getContextManager().disable(),sA(x$,$a.instance())}}});var Ks,D$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var nB,RS,t2,n2=O(()=>{m();D$();nB="0000000000000000",RS="00000000000000000000000000000000",t2={traceId:RS,spanId:nB,traceFlags:Ks.NONE}});var cA,r2=O(()=>{m();n2();cA=class{constructor(t=t2){this._spanContext=t}spanContext(){return this._spanContext}setAttribute(t,n){return this}setAttributes(t){return this}addEvent(t,n){return this}addLink(t){return this}addLinks(t){return this}setStatus(t){return this}updateName(t){return this}end(t){}isRecording(){return!1}recordException(t,n){}}});function o2(e){return e.getValue(B$)||void 0}function Fle(){return o2(uA.getInstance().active())}function rB(e,t){return e.setValue(B$,t)}function Gle(e){return e.deleteValue(B$)}function jle(e,t){return rB(e,new cA(t))}function i2(e){var t;return(t=o2(e))===null||t===void 0?void 0:t.spanContext()}var B$,N$=O(()=>{m();X1();r2();tB();B$=bl("OpenTelemetry Context Key SPAN")});function zle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(a2[e.charCodeAt(r)]|0)+(a2[e.charCodeAt(r+1)]|0)+(a2[e.charCodeAt(r+2)]|0)+(a2[e.charCodeAt(r+3)]|0);return n===t}function O$(e){return zle(e,32)&&e!==RS}function w$(e){return zle(e,16)&&e!==nB}function rg(e){return O$(e.traceId)&&w$(e.spanId)}function Hle(e){return new cA(e)}var a2,s2=O(()=>{m();n2();r2();a2=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 x7e(e){return e!==null&&typeof e=="object"&&"spanId"in e&&typeof e.spanId=="string"&&"traceId"in e&&typeof e.traceId=="string"&&"traceFlags"in e&&typeof e.traceFlags=="number"}var k$,VC,P$=O(()=>{m();tB();N$();r2();s2();k$=uA.getInstance(),VC=class{startSpan(t,n,r=k$.active()){if(!!n?.root)return new cA;let i=r&&i2(r);return x7e(i)&&rg(i)?new cA(i):new cA}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??k$.active(),g=this.startSpan(t,i,d),h=rB(d,g);return k$.with(h,c,void 0,g)}}});var D7e,qC,M$=O(()=>{m();P$();D7e=new VC,qC=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}startSpan(t,n,r){return this._getTracer().startSpan(t,n,r)}startActiveSpan(t,n,r,o){let i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)}_getTracer(){if(this._delegate)return this._delegate;let t=this._provider.getDelegateTracer(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):D7e}}});var u2,$le=O(()=>{m();P$();u2=class{getTracer(t,n,r){return new VC}}});var B7e,xS,U$=O(()=>{m();M$();$le();B7e=new u2,xS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new qC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:B7e}setDelegate(t){this._delegate=t}getDelegateTracer(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getTracer(t,n,r)}}});var c2,Vle=O(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(c2||(c2={}))});var io,qle=O(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(io||(io={}))});var ui,Yle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Kle(e){return w7e.test(e)}function Jle(e){return k7e.test(e)&&!P7e.test(e)}var L$,N7e,O7e,w7e,k7e,P7e,Zle=O(()=>{m();L$="[_0-9a-z-*/]",N7e=`[a-z]${L$}{0,255}`,O7e=`[a-z0-9]${L$}{0,240}@[a-z]${L$}{0,13}`,w7e=new RegExp(`^(?:${N7e}|${O7e})$`),k7e=/^[ -~]{0,255}[!-~]$/,P7e=/,|=/});var Wle,M7e,Xle,ede,l2,tde=O(()=>{m();Zle();Wle=32,M7e=512,Xle=",",ede="=",l2=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+ede+this.get(n)),t),[]).join(Xle)}_parse(t){t.length>M7e||(this._internalState=t.split(Xle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(ede);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Kle(a)&&Jle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Wle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Wle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function nde(e){return new l2(e)}var rde=O(()=>{m();tde()});var Ke,ode=O(()=>{m();tB();Ke=uA.getInstance()});var vl,ide=O(()=>{m();vS();vl=$a.instance()});var Q$,ade,sde=O(()=>{m();v$();Q$=class{getMeter(t,n,r){return b$}},ade=new Q$});var F$,d2,ude=O(()=>{m();sde();bS();vS();F$="metrics",d2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return aA(F$,t,$a.instance())}getMeterProvider(){return Cl(F$)||ade}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){sA(F$,$a.instance())}}});var G$,cde=O(()=>{m();ude();G$=d2.getInstance()});var p2,lde=O(()=>{m();p2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(j$)||void 0}function dde(){return z$(uA.getInstance().active())}function pde(e,t){return e.setValue(j$,t)}function fde(e){return e.deleteValue(j$)}var j$,Ade=O(()=>{m();tB();X1();j$=bl("OpenTelemetry Baggage Key")});var H$,U7e,f2,mde=O(()=>{m();bS();lde();R$();Ade();f$();vS();H$="propagation",U7e=new p2,f2=class e{constructor(){this.createBaggage=kle,this.getBaggage=z$,this.getActiveBaggage=dde,this.setBaggage=pde,this.deleteBaggage=fde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return aA(H$,t,$a.instance())}inject(t,n,r=XM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=WM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){sA(H$,$a.instance())}_getGlobalPropagator(){return Cl(H$)||U7e}}});var qp,gde=O(()=>{m();mde();qp=f2.getInstance()});var $$,A2,hde=O(()=>{m();bS();U$();s2();N$();vS();$$="trace",A2=class e{constructor(){this._proxyTracerProvider=new xS,this.wrapSpanContext=Hle,this.isSpanContextValid=rg,this.deleteSpan=Gle,this.getSpan=o2,this.getActiveSpan=Fle,this.getSpanContext=i2,this.setSpan=rB,this.setSpanContext=jle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=aA($$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl($$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){sA($$,$a.instance()),this._proxyTracerProvider=new xS}}});var Ht,_de=O(()=>{m();hde();Ht=A2.getInstance()});var We={};Ha(We,{DiagConsoleLogger:()=>JM,DiagLogLevel:()=>ha,INVALID_SPANID:()=>nB,INVALID_SPAN_CONTEXT:()=>t2,INVALID_TRACEID:()=>RS,ProxyTracer:()=>qC,ProxyTracerProvider:()=>xS,ROOT_CONTEXT:()=>HC,SamplingDecision:()=>c2,SpanKind:()=>io,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>ZM,baggageEntryMetadataFromString:()=>Ple,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ule,createTraceState:()=>nde,default:()=>L7e,defaultTextMapGetter:()=>WM,defaultTextMapSetter:()=>XM,diag:()=>vl,isSpanContextValid:()=>rg,isValidSpanId:()=>w$,isValidTraceId:()=>O$,metrics:()=>G$,propagation:()=>qp,trace:()=>Ht});var L7e,je=O(()=>{m();f$();X1();Mle();YM();v$();Lle();R$();M$();U$();Vle();qle();Yle();D$();rde();s2();n2();ode();ide();cde();gde();_de();L7e={context:Ke,diag:vl,metrics:G$,propagation:qp,trace:Ht}});var oB=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isTracingSuppressed=e_.unsuppressTracing=e_.suppressTracing=void 0;var Q7e=(je(),Me(We)),V$=(0,Q7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function F7e(e){return e.setValue(V$,!0)}e_.suppressTracing=F7e;function G7e(e){return e.deleteValue(V$)}e_.unsuppressTracing=G7e;function j7e(e){return e.getValue(V$)===!0}e_.isTracingSuppressed=j7e});var q$=F(Js=>{"use strict";m();Object.defineProperty(Js,"__esModule",{value:!0});Js.BAGGAGE_MAX_TOTAL_LENGTH=Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=Js.BAGGAGE_HEADER=Js.BAGGAGE_ITEMS_SEPARATOR=Js.BAGGAGE_PROPERTIES_SEPARATOR=Js.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Js.BAGGAGE_KEY_PAIR_SEPARATOR="=";Js.BAGGAGE_PROPERTIES_SEPARATOR=";";Js.BAGGAGE_ITEMS_SEPARATOR=",";Js.BAGGAGE_HEADER="baggage";Js.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Js.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Js.BAGGAGE_MAX_TOTAL_LENGTH=8192});var Y$=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.parseKeyPairsIntoRecord=lA.parsePairKeyValue=lA.getKeyPairs=lA.serializeKeyPairs=void 0;var z7e=(je(),Me(We)),YC=q$();function H7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?YC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>YC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}lA.serializeKeyPairs=H7e;function $7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=YC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}lA.getKeyPairs=$7e;function Ede(e){if(!e)return;let t=e.indexOf(YC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(YC.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let g=e.substring(t+1);d=(0,z7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}lA.parsePairKeyValue=Ede;function V7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(YC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Ede(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}lA.parseKeyPairsIntoRecord=V7e});var Sde=F(m2=>{"use strict";m();Object.defineProperty(m2,"__esModule",{value:!0});m2.W3CBaggagePropagator=void 0;var K$=(je(),Me(We)),q7e=oB(),DS=q$(),J$=Y$(),Z$=class{inject(t,n,r){let o=K$.propagation.getBaggage(t);if(!o||(0,q7e.isTracingSuppressed)(t))return;let i=(0,J$.getKeyPairs)(o).filter(c=>c.length<=DS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,DS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,J$.serializeKeyPairs)(i);a.length>0&&r.set(n,DS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,DS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(DS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(DS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,J$.parsePairKeyValue)(d);if(g){let h={value:g.value};g.metadata&&(h.metadata=g.metadata),a[g.key]=h}}),Object.entries(a).length===0)?t:K$.propagation.setBaggage(t,K$.propagation.createBaggage(a))}fields(){return[DS.BAGGAGE_HEADER]}};m2.W3CBaggagePropagator=Z$});var yde=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.AnchoredClock=void 0;var W$=class{_monotonicClock;_epochMillis;_performanceMillis;constructor(t,n){this._monotonicClock=n,this._epochMillis=t.now(),this._performanceMillis=n.now()}now(){let t=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+t}};g2.AnchoredClock=W$});var vde=F(t_=>{"use strict";m();Object.defineProperty(t_,"__esModule",{value:!0});t_.isAttributeValue=t_.isAttributeKey=t_.sanitizeAttributes=void 0;var Tde=(je(),Me(We));function Y7e(e){let t={};if(typeof e!="object"||e==null)return t;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if(!Ide(n)){Tde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Cde(r)){Tde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}t_.sanitizeAttributes=Y7e;function Ide(e){return typeof e=="string"&&e!==""}t_.isAttributeKey=Ide;function Cde(e){return e==null?!0:Array.isArray(e)?K7e(e):bde(typeof e)}t_.isAttributeValue=Cde;function K7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(bde(r)){t=r;continue}return!1}return!1}}return!0}function bde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var X$=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.loggingErrorHandler=void 0;var J7e=(je(),Me(We));function Z7e(){return e=>{J7e.diag.error(W7e(e))}}h2.loggingErrorHandler=Z7e;function W7e(e){return typeof e=="string"?e:JSON.stringify(X7e(e))}function X7e(e){let t={},n=e;for(;n!==null;)Object.getOwnPropertyNames(n).forEach(r=>{if(t[r])return;let o=n[r];o&&(t[r]=String(o))}),n=Object.getPrototypeOf(n);return t}});var xde=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.globalErrorHandler=KC.setGlobalErrorHandler=void 0;var eYe=X$(),Rde=(0,eYe.loggingErrorHandler)();function tYe(e){Rde=e}KC.setGlobalErrorHandler=tYe;function nYe(e){try{Rde(e)}catch{}}KC.globalErrorHandler=nYe});var Ode=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.getStringListFromEnv=dA.getBooleanFromEnv=dA.getStringFromEnv=dA.getNumberFromEnv=void 0;var Dde=(je(),Me(We)),Bde=Ge("util");function rYe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}dA.getNumberFromEnv=rYe;function Nde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}dA.getStringFromEnv=Nde;function oYe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Dde.diag.warn(`Unknown value ${(0,Bde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}dA.getBooleanFromEnv=oYe;function iYe(e){return Nde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}dA.getStringListFromEnv=iYe});var wde=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2._globalThis=void 0;_2._globalThis=globalThis});var kde=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2.VERSION=void 0;E2.VERSION="2.6.1"});function bi(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var e5=O(()=>{m()});var Pde,Mde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,aYe,t5,sYe,uYe,cYe,lYe,n5,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,r5,DYe,BYe,NYe,OYe,wYe,kYe,PYe,MYe,UYe,LYe,QYe,FYe,o5,GYe,jYe,i5,a5,zYe,HYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,iB,JC,s5,aKe,sKe,BS,uKe,cKe,lKe,dKe,u5,c5,pKe,l5,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,kKe,PKe,d5,MKe,UKe,LKe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,p5,tJe,f5,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,VAe,qAe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,PJe,MJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,ime,ame,sme,ume,cme,hZe,_Ze,EZe,SZe,yZe,TZe,lme,dme,pme,IZe,CZe,bZe,vZe,fme,Ame,mme,gme,RZe,xZe,DZe,BZe,NZe,hme,_me,Eme,Sme,yme,Tme,Ime,OZe,wZe,kZe,PZe,MZe,UZe,LZe,QZe,Cme,bme,vme,Rme,xme,FZe,GZe,jZe,zZe,HZe,$Ze,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,qme,Yme,Kme,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,Jme,Zme,Wme,Xme,ege,AWe,mWe,gWe,hWe,_We,EWe,tge,nge,SWe,yWe,TWe,rge,oge,IWe,CWe,bWe,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,yge,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,PWe,MWe,UWe,LWe,QWe,FWe,GWe,jWe,zWe,Tge,Ige,HWe,$We,VWe,Cge=O(()=>{m();e5();Pde="aws.lambda.invoked_arn",Mde="db.system",Ude="db.connection_string",Lde="db.user",Qde="db.jdbc.driver_classname",Fde="db.name",Gde="db.statement",jde="db.operation",zde="db.mssql.instance_name",Hde="db.cassandra.keyspace",$de="db.cassandra.page_size",Vde="db.cassandra.consistency_level",qde="db.cassandra.table",Yde="db.cassandra.idempotence",Kde="db.cassandra.speculative_execution_count",Jde="db.cassandra.coordinator.id",Zde="db.cassandra.coordinator.dc",Wde="db.hbase.namespace",Xde="db.redis.database_index",epe="db.mongodb.collection",tpe="db.sql.table",npe="exception.type",rpe="exception.message",ope="exception.stacktrace",ipe="exception.escaped",ape="faas.trigger",spe="faas.execution",upe="faas.document.collection",cpe="faas.document.operation",lpe="faas.document.time",dpe="faas.document.name",ppe="faas.time",fpe="faas.cron",Ape="faas.coldstart",mpe="faas.invoked_name",gpe="faas.invoked_provider",hpe="faas.invoked_region",_pe="net.transport",Epe="net.peer.ip",Spe="net.peer.port",ype="net.peer.name",Tpe="net.host.ip",Ipe="net.host.port",Cpe="net.host.name",bpe="net.host.connection.type",vpe="net.host.connection.subtype",Rpe="net.host.carrier.name",xpe="net.host.carrier.mcc",Dpe="net.host.carrier.mnc",Bpe="net.host.carrier.icc",Npe="peer.service",Ope="enduser.id",wpe="enduser.role",kpe="enduser.scope",Ppe="thread.id",Mpe="thread.name",Upe="code.function",Lpe="code.namespace",Qpe="code.filepath",Fpe="code.lineno",Gpe="http.method",jpe="http.url",zpe="http.target",Hpe="http.host",$pe="http.scheme",Vpe="http.status_code",qpe="http.flavor",Ype="http.user_agent",Kpe="http.request_content_length",Jpe="http.request_content_length_uncompressed",Zpe="http.response_content_length",Wpe="http.response_content_length_uncompressed",Xpe="http.server_name",efe="http.route",tfe="http.client_ip",nfe="aws.dynamodb.table_names",rfe="aws.dynamodb.consumed_capacity",ofe="aws.dynamodb.item_collection_metrics",ife="aws.dynamodb.provisioned_read_capacity",afe="aws.dynamodb.provisioned_write_capacity",sfe="aws.dynamodb.consistent_read",ufe="aws.dynamodb.projection",cfe="aws.dynamodb.limit",lfe="aws.dynamodb.attributes_to_get",dfe="aws.dynamodb.index_name",pfe="aws.dynamodb.select",ffe="aws.dynamodb.global_secondary_indexes",Afe="aws.dynamodb.local_secondary_indexes",mfe="aws.dynamodb.exclusive_start_table",gfe="aws.dynamodb.table_count",hfe="aws.dynamodb.scan_forward",_fe="aws.dynamodb.segment",Efe="aws.dynamodb.total_segments",Sfe="aws.dynamodb.count",yfe="aws.dynamodb.scanned_count",Tfe="aws.dynamodb.attribute_definitions",Ife="aws.dynamodb.global_secondary_index_updates",Cfe="messaging.system",bfe="messaging.destination",vfe="messaging.destination_kind",Rfe="messaging.temp_destination",xfe="messaging.protocol",Dfe="messaging.protocol_version",Bfe="messaging.url",Nfe="messaging.message_id",Ofe="messaging.conversation_id",wfe="messaging.message_payload_size_bytes",kfe="messaging.message_payload_compressed_size_bytes",Pfe="messaging.operation",Mfe="messaging.consumer_id",Ufe="messaging.rabbitmq.routing_key",Lfe="messaging.kafka.message_key",Qfe="messaging.kafka.consumer_group",Ffe="messaging.kafka.client_id",Gfe="messaging.kafka.partition",jfe="messaging.kafka.tombstone",zfe="rpc.system",Hfe="rpc.service",$fe="rpc.method",Vfe="rpc.grpc.status_code",qfe="rpc.jsonrpc.version",Yfe="rpc.jsonrpc.request_id",Kfe="rpc.jsonrpc.error_code",Jfe="rpc.jsonrpc.error_message",Zfe="message.type",Wfe="message.id",Xfe="message.compressed_size",eAe="message.uncompressed_size",aYe=Pde,t5=Mde,sYe=Ude,uYe=Lde,cYe=Qde,lYe=Fde,n5=Gde,dYe=jde,pYe=zde,fYe=Hde,AYe=$de,mYe=Vde,gYe=qde,hYe=Yde,_Ye=Kde,EYe=Jde,SYe=Zde,yYe=Wde,TYe=Xde,IYe=epe,CYe=tpe,bYe=npe,vYe=rpe,RYe=ope,xYe=ipe,r5=ape,DYe=spe,BYe=upe,NYe=cpe,OYe=lpe,wYe=dpe,kYe=ppe,PYe=fpe,MYe=Ape,UYe=mpe,LYe=gpe,QYe=hpe,FYe=_pe,o5=Epe,GYe=Spe,jYe=ype,i5=Tpe,a5=Ipe,zYe=Cpe,HYe=bpe,$Ye=vpe,VYe=Rpe,qYe=xpe,YYe=Dpe,KYe=Bpe,JYe=Npe,ZYe=Ope,WYe=wpe,XYe=kpe,eKe=Ppe,tKe=Mpe,nKe=Upe,rKe=Lpe,oKe=Qpe,iKe=Fpe,iB=Gpe,JC=jpe,s5=zpe,aKe=Hpe,sKe=$pe,BS=Vpe,uKe=qpe,cKe=Ype,lKe=Kpe,dKe=Jpe,u5=Zpe,c5=Wpe,pKe=Xpe,l5=efe,fKe=tfe,AKe=nfe,mKe=rfe,gKe=ofe,hKe=ife,_Ke=afe,EKe=sfe,SKe=ufe,yKe=cfe,TKe=lfe,IKe=dfe,CKe=pfe,bKe=ffe,vKe=Afe,RKe=mfe,xKe=gfe,DKe=hfe,BKe=_fe,NKe=Efe,OKe=Sfe,wKe=yfe,kKe=Tfe,PKe=Ife,d5=Cfe,MKe=bfe,UKe=vfe,LKe=Rfe,QKe=xfe,FKe=Dfe,GKe=Bfe,jKe=Nfe,zKe=Ofe,HKe=wfe,$Ke=kfe,VKe=Pfe,qKe=Mfe,YKe=Ufe,KKe=Lfe,JKe=Qfe,ZKe=Ffe,WKe=Gfe,XKe=jfe,eJe=zfe,p5=Hfe,tJe=$fe,f5=Vfe,nJe=qfe,rJe=Yfe,oJe=Kfe,iJe=Jfe,aJe=Zfe,sJe=Wfe,uJe=Xfe,cJe=eAe,lJe=bi([Pde,Mde,Ude,Lde,Qde,Fde,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,zpe,Hpe,$pe,Vpe,qpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,mfe,gfe,hfe,_fe,Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe]),tAe="other_sql",nAe="mssql",rAe="mysql",oAe="oracle",iAe="db2",aAe="postgresql",sAe="redshift",uAe="hive",cAe="cloudscape",lAe="hsqldb",dAe="progress",pAe="maxdb",fAe="hanadb",AAe="ingres",mAe="firstsql",gAe="edb",hAe="cache",_Ae="adabas",EAe="firebird",SAe="derby",yAe="filemaker",TAe="informix",IAe="instantdb",CAe="interbase",bAe="mariadb",vAe="netezza",RAe="pervasive",xAe="pointbase",DAe="sqlite",BAe="sybase",NAe="teradata",OAe="vertica",wAe="h2",kAe="coldfusion",PAe="cassandra",MAe="hbase",UAe="mongodb",LAe="redis",QAe="couchbase",FAe="couchdb",GAe="cosmosdb",jAe="dynamodb",zAe="neo4j",HAe="geode",$Ae="elasticsearch",VAe="memcached",qAe="cockroachdb",dJe=tAe,pJe=nAe,fJe=rAe,AJe=oAe,mJe=iAe,gJe=aAe,hJe=sAe,_Je=uAe,EJe=cAe,SJe=lAe,yJe=dAe,TJe=pAe,IJe=fAe,CJe=AAe,bJe=mAe,vJe=gAe,RJe=hAe,xJe=_Ae,DJe=EAe,BJe=SAe,NJe=yAe,OJe=TAe,wJe=IAe,kJe=CAe,PJe=bAe,MJe=vAe,UJe=RAe,LJe=xAe,QJe=DAe,FJe=BAe,GJe=NAe,jJe=OAe,zJe=wAe,HJe=kAe,$Je=PAe,VJe=MAe,qJe=UAe,YJe=LAe,KJe=QAe,JJe=FAe,ZJe=GAe,WJe=jAe,XJe=zAe,eZe=HAe,tZe=$Ae,nZe=VAe,rZe=qAe,oZe=bi([tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,VAe,qAe]),YAe="all",KAe="each_quorum",JAe="quorum",ZAe="local_quorum",WAe="one",XAe="two",eme="three",tme="local_one",nme="any",rme="serial",ome="local_serial",iZe=YAe,aZe=KAe,sZe=JAe,uZe=ZAe,cZe=WAe,lZe=XAe,dZe=eme,pZe=tme,fZe=nme,AZe=rme,mZe=ome,gZe=bi([YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome]),ime="datasource",ame="http",sme="pubsub",ume="timer",cme="other",hZe=ime,_Ze=ame,EZe=sme,SZe=ume,yZe=cme,TZe=bi([ime,ame,sme,ume,cme]),lme="insert",dme="edit",pme="delete",IZe=lme,CZe=dme,bZe=pme,vZe=bi([lme,dme,pme]),fme="alibaba_cloud",Ame="aws",mme="azure",gme="gcp",RZe=fme,xZe=Ame,DZe=mme,BZe=gme,NZe=bi([fme,Ame,mme,gme]),hme="ip_tcp",_me="ip_udp",Eme="ip",Sme="unix",yme="pipe",Tme="inproc",Ime="other",OZe=hme,wZe=_me,kZe=Eme,PZe=Sme,MZe=yme,UZe=Tme,LZe=Ime,QZe=bi([hme,_me,Eme,Sme,yme,Tme,Ime]),Cme="wifi",bme="wired",vme="cell",Rme="unavailable",xme="unknown",FZe=Cme,GZe=bme,jZe=vme,zZe=Rme,HZe=xme,$Ze=bi([Cme,bme,vme,Rme,xme]),Dme="gprs",Bme="edge",Nme="umts",Ome="cdma",wme="evdo_0",kme="evdo_a",Pme="cdma2000_1xrtt",Mme="hsdpa",Ume="hsupa",Lme="hspa",Qme="iden",Fme="evdo_b",Gme="lte",jme="ehrpd",zme="hspap",Hme="gsm",$me="td_scdma",Vme="iwlan",qme="nr",Yme="nrnsa",Kme="lte_ca",VZe=Dme,qZe=Bme,YZe=Nme,KZe=Ome,JZe=wme,ZZe=kme,WZe=Pme,XZe=Mme,eWe=Ume,tWe=Lme,nWe=Qme,rWe=Fme,oWe=Gme,iWe=jme,aWe=zme,sWe=Hme,uWe=$me,cWe=Vme,lWe=qme,dWe=Yme,pWe=Kme,fWe=bi([Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,Ume,Lme,Qme,Fme,Gme,jme,zme,Hme,$me,Vme,qme,Yme,Kme]),Jme="1.0",Zme="1.1",Wme="2.0",Xme="SPDY",ege="QUIC",AWe=Jme,mWe=Zme,gWe=Wme,hWe=Xme,_We=ege,EWe={HTTP_1_0:Jme,HTTP_1_1:Zme,HTTP_2_0:Wme,SPDY:Xme,QUIC:ege},tge="queue",nge="topic",SWe=tge,yWe=nge,TWe=bi([tge,nge]),rge="receive",oge="process",IWe=rge,CWe=oge,bWe=bi([rge,oge]),ige=0,age=1,sge=2,uge=3,cge=4,lge=5,dge=6,pge=7,fge=8,Age=9,mge=10,gge=11,hge=12,_ge=13,Ege=14,Sge=15,yge=16,vWe=ige,RWe=age,xWe=sge,DWe=uge,BWe=cge,NWe=lge,OWe=dge,wWe=pge,kWe=fge,PWe=Age,MWe=mge,UWe=gge,LWe=hge,QWe=_ge,FWe=Ege,GWe=Sge,jWe=yge,zWe={OK:ige,CANCELLED:age,UNKNOWN:sge,INVALID_ARGUMENT:uge,DEADLINE_EXCEEDED:cge,NOT_FOUND:lge,ALREADY_EXISTS:dge,PERMISSION_DENIED:pge,RESOURCE_EXHAUSTED:fge,FAILED_PRECONDITION:Age,ABORTED:mge,OUT_OF_RANGE:gge,UNIMPLEMENTED:hge,INTERNAL:_ge,UNAVAILABLE:Ege,DATA_LOSS:Sge,UNAUTHENTICATED:yge},Tge="SENT",Ige="RECEIVED",HWe=Tge,$We=Ige,VWe=bi([Tge,Ige])});var bge=O(()=>{m();Cge()});var vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Pge,Mge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,UXe,LXe,QXe,FXe,GXe,jXe,zXe,HXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,cet,A5,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Xhe,e_e,t_e,n_e,Tet,Iet,Cet,bet,vet,r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e,Ret,xet,Det,Bet,Net,Oet,wet,ket,Pet,Met,Uet,Let,Qet,Fet,Get,jet,zet,Het,S_e,y_e,$et,Vet,qet,T_e,I_e,C_e,b_e,v_e,R_e,x_e,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,D_e,B_e,N_e,O_e,w_e,k_e,P_e,M_e,U_e,L_e,Q_e,ntt,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,F_e,G_e,j_e,z_e,H_e,$_e,V_e,q_e,Y_e,K_e,Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,Ctt,J_e=O(()=>{m();e5();vge="cloud.provider",Rge="cloud.account.id",xge="cloud.region",Dge="cloud.availability_zone",Bge="cloud.platform",Nge="aws.ecs.container.arn",Oge="aws.ecs.cluster.arn",wge="aws.ecs.launchtype",kge="aws.ecs.task.arn",Pge="aws.ecs.task.family",Mge="aws.ecs.task.revision",Uge="aws.eks.cluster.arn",Lge="aws.log.group.names",Qge="aws.log.group.arns",Fge="aws.log.stream.names",Gge="aws.log.stream.arns",jge="container.name",zge="container.id",Hge="container.runtime",$ge="container.image.name",Vge="container.image.tag",qge="deployment.environment",Yge="device.id",Kge="device.model.identifier",Jge="device.model.name",Zge="faas.name",Wge="faas.id",Xge="faas.version",ehe="faas.instance",the="faas.max_memory",nhe="host.id",rhe="host.name",ohe="host.type",ihe="host.arch",ahe="host.image.name",she="host.image.id",uhe="host.image.version",che="k8s.cluster.name",lhe="k8s.node.name",dhe="k8s.node.uid",phe="k8s.namespace.name",fhe="k8s.pod.uid",Ahe="k8s.pod.name",mhe="k8s.container.name",ghe="k8s.replicaset.uid",hhe="k8s.replicaset.name",_he="k8s.deployment.uid",Ehe="k8s.deployment.name",She="k8s.statefulset.uid",yhe="k8s.statefulset.name",The="k8s.daemonset.uid",Ihe="k8s.daemonset.name",Che="k8s.job.uid",bhe="k8s.job.name",vhe="k8s.cronjob.uid",Rhe="k8s.cronjob.name",xhe="os.type",Dhe="os.description",Bhe="os.name",Nhe="os.version",Ohe="process.pid",whe="process.executable.name",khe="process.executable.path",Phe="process.command",Mhe="process.command_line",Uhe="process.command_args",Lhe="process.owner",Qhe="process.runtime.name",Fhe="process.runtime.version",Ghe="process.runtime.description",jhe="service.name",zhe="service.namespace",Hhe="service.instance.id",$he="service.version",Vhe="telemetry.sdk.name",qhe="telemetry.sdk.language",Yhe="telemetry.sdk.version",Khe="telemetry.auto.version",Jhe="webengine.name",Zhe="webengine.version",Whe="webengine.description",qWe=vge,YWe=Rge,KWe=xge,JWe=Dge,ZWe=Bge,WWe=Nge,XWe=Oge,eXe=wge,tXe=kge,nXe=Pge,rXe=Mge,oXe=Uge,iXe=Lge,aXe=Qge,sXe=Fge,uXe=Gge,cXe=jge,lXe=zge,dXe=Hge,pXe=$ge,fXe=Vge,AXe=qge,mXe=Yge,gXe=Kge,hXe=Jge,_Xe=Zge,EXe=Wge,SXe=Xge,yXe=ehe,TXe=the,IXe=nhe,CXe=rhe,bXe=ohe,vXe=ihe,RXe=ahe,xXe=she,DXe=uhe,BXe=che,NXe=lhe,OXe=dhe,wXe=phe,kXe=fhe,PXe=Ahe,MXe=mhe,UXe=ghe,LXe=hhe,QXe=_he,FXe=Ehe,GXe=She,jXe=yhe,zXe=The,HXe=Ihe,$Xe=Che,VXe=bhe,qXe=vhe,YXe=Rhe,KXe=xhe,JXe=Dhe,ZXe=Bhe,WXe=Nhe,XXe=Ohe,eet=whe,tet=khe,net=Phe,ret=Mhe,oet=Uhe,iet=Lhe,aet=Qhe,set=Fhe,uet=Ghe,cet=jhe,A5=zhe,det=Hhe,pet=$he,fet=Vhe,Aet=qhe,met=Yhe,get=Khe,het=Jhe,_et=Zhe,Eet=Whe,yet=bi([vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Pge,Mge,Uge,Lge,Qge,Fge,Gge,jge,zge,Hge,$ge,Vge,qge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,she,uhe,che,lhe,dhe,phe,fhe,Ahe,mhe,ghe,hhe,_he,Ehe,She,yhe,The,Ihe,Che,bhe,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe]),Xhe="alibaba_cloud",e_e="aws",t_e="azure",n_e="gcp",Tet=Xhe,Iet=e_e,Cet=t_e,bet=n_e,vet=bi([Xhe,e_e,t_e,n_e]),r_e="alibaba_cloud_ecs",o_e="alibaba_cloud_fc",i_e="aws_ec2",a_e="aws_ecs",s_e="aws_eks",u_e="aws_lambda",c_e="aws_elastic_beanstalk",l_e="azure_vm",d_e="azure_container_instances",p_e="azure_aks",f_e="azure_functions",A_e="azure_app_service",m_e="gcp_compute_engine",g_e="gcp_cloud_run",h_e="gcp_kubernetes_engine",__e="gcp_cloud_functions",E_e="gcp_app_engine",Ret=r_e,xet=o_e,Det=i_e,Bet=a_e,Net=s_e,Oet=u_e,wet=c_e,ket=l_e,Pet=d_e,Met=p_e,Uet=f_e,Let=A_e,Qet=m_e,Fet=g_e,Get=h_e,jet=__e,zet=E_e,Het=bi([r_e,o_e,i_e,a_e,s_e,u_e,c_e,l_e,d_e,p_e,f_e,A_e,m_e,g_e,h_e,__e,E_e]),S_e="ec2",y_e="fargate",$et=S_e,Vet=y_e,qet=bi([S_e,y_e]),T_e="amd64",I_e="arm32",C_e="arm64",b_e="ia64",v_e="ppc32",R_e="ppc64",x_e="x86",Yet=T_e,Ket=I_e,Jet=C_e,Zet=b_e,Wet=v_e,Xet=R_e,ett=x_e,ttt=bi([T_e,I_e,C_e,b_e,v_e,R_e,x_e]),D_e="windows",B_e="linux",N_e="darwin",O_e="freebsd",w_e="netbsd",k_e="openbsd",P_e="dragonflybsd",M_e="hpux",U_e="aix",L_e="solaris",Q_e="z_os",ntt=D_e,rtt=B_e,ott=N_e,itt=O_e,att=w_e,stt=k_e,utt=P_e,ctt=M_e,ltt=U_e,dtt=L_e,ptt=Q_e,ftt=bi([D_e,B_e,N_e,O_e,w_e,k_e,P_e,M_e,U_e,L_e,Q_e]),F_e="cpp",G_e="dotnet",j_e="erlang",z_e="go",H_e="java",$_e="nodejs",V_e="php",q_e="python",Y_e="ruby",K_e="webjs",Att=F_e,mtt=G_e,gtt=j_e,htt=z_e,_tt=H_e,Ett=$_e,Stt=V_e,ytt=q_e,Ttt=Y_e,Itt=K_e,Ctt=bi([F_e,G_e,j_e,z_e,H_e,$_e,V_e,q_e,Y_e,K_e])});var Z_e=O(()=>{m();J_e()});var btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Ptt,Mtt,Utt,Ltt,Qtt,Ftt,Gtt,jtt,ztt,Htt,$tt,Vtt,qtt,Ytt,Ktt,m5,g5,Jtt,ZC,Ztt,h5,_5,Wtt,NS,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,E5,cnt,lnt,dnt,pnt,fnt,Ant,OS,mnt,gnt,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,og,ig,xnt,Dnt,Bnt,Nnt,Ont,wnt,knt,Pnt,Mnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,znt,S5,y5,Hnt,T5,I5,$nt,Vnt,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,C5,b5,irt,v5,art,R5,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,Crt,brt,vrt,Rrt,xrt,Drt,Brt,n_,Nrt,Ort,wrt,x5,W_e=O(()=>{m();btt="aspnetcore.diagnostics.exception.result",vtt="aborted",Rtt="handled",xtt="skipped",Dtt="unhandled",Btt="aspnetcore.diagnostics.handler.type",Ntt="aspnetcore.rate_limiting.policy",Ott="aspnetcore.rate_limiting.result",wtt="acquired",ktt="endpoint_limiter",Ptt="global_limiter",Mtt="request_canceled",Utt="aspnetcore.request.is_unhandled",Ltt="aspnetcore.routing.is_fallback",Qtt="aspnetcore.routing.match_status",Ftt="failure",Gtt="success",jtt="aspnetcore.user.is_authenticated",ztt="client.address",Htt="client.port",$tt="code.column.number",Vtt="code.file.path",qtt="code.function.name",Ytt="code.line.number",Ktt="code.stacktrace",m5="db.collection.name",g5="db.namespace",Jtt="db.operation.batch.size",ZC="db.operation.name",Ztt="db.query.summary",h5="db.query.text",_5="db.response.status_code",Wtt="db.stored_procedure.name",NS="db.system.name",Xtt="mariadb",ent="microsoft.sql_server",tnt="mysql",nnt="postgresql",rnt="dotnet.gc.heap.generation",ont="gen0",int="gen1",ant="gen2",snt="loh",unt="poh",E5="error.type",cnt="_OTHER",lnt="exception.escaped",dnt="exception.message",pnt="exception.stacktrace",fnt="exception.type",Ant=e=>`http.request.header.${e}`,OS="http.request.method",mnt="_OTHER",gnt="CONNECT",hnt="DELETE",_nt="GET",Ent="HEAD",Snt="OPTIONS",ynt="PATCH",Tnt="POST",Int="PUT",Cnt="TRACE",bnt="http.request.method_original",vnt="http.request.resend_count",Rnt=e=>`http.response.header.${e}`,og="http.response.status_code",ig="http.route",xnt="jvm.gc.action",Dnt="jvm.gc.name",Bnt="jvm.memory.pool.name",Nnt="jvm.memory.type",Ont="heap",wnt="non_heap",knt="jvm.thread.daemon",Pnt="jvm.thread.state",Mnt="blocked",Unt="new",Lnt="runnable",Qnt="terminated",Fnt="timed_waiting",Gnt="waiting",jnt="network.local.address",znt="network.local.port",S5="network.peer.address",y5="network.peer.port",Hnt="network.protocol.name",T5="network.protocol.version",I5="network.transport",$nt="pipe",Vnt="quic",qnt="tcp",Ynt="udp",Knt="unix",Jnt="network.type",Znt="ipv4",Wnt="ipv6",Xnt="otel.scope.name",ert="otel.scope.version",trt="otel.status_code",nrt="ERROR",rrt="OK",ort="otel.status_description",C5="server.address",b5="server.port",irt="service.instance.id",v5="service.name",art="service.namespace",R5="service.version",srt="signalr.connection.status",urt="app_shutdown",crt="normal_closure",lrt="timeout",drt="signalr.transport",prt="long_polling",frt="server_sent_events",Art="web_sockets",mrt="telemetry.sdk.language",grt="cpp",hrt="dotnet",_rt="erlang",Ert="go",Srt="java",yrt="nodejs",Trt="php",Irt="python",Crt="ruby",brt="rust",vrt="swift",Rrt="webjs",xrt="telemetry.sdk.name",Drt="telemetry.sdk.version",Brt="url.fragment",n_="url.full",Nrt="url.path",Ort="url.query",wrt="url.scheme",x5="user_agent.original"});var krt,Prt,Mrt,Urt,Lrt,Qrt,Frt,Grt,jrt,zrt,Hrt,$rt,Vrt,qrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,Cot,bot,vot,Rot,xot,Dot,Bot,X_e=O(()=>{m();krt="aspnetcore.diagnostics.exceptions",Prt="aspnetcore.rate_limiting.active_request_leases",Mrt="aspnetcore.rate_limiting.queued_requests",Urt="aspnetcore.rate_limiting.request.time_in_queue",Lrt="aspnetcore.rate_limiting.request_lease.duration",Qrt="aspnetcore.rate_limiting.requests",Frt="aspnetcore.routing.match_attempts",Grt="db.client.operation.duration",jrt="dotnet.assembly.count",zrt="dotnet.exceptions",Hrt="dotnet.gc.collections",$rt="dotnet.gc.heap.total_allocated",Vrt="dotnet.gc.last_collection.heap.fragmentation.size",qrt="dotnet.gc.last_collection.heap.size",Yrt="dotnet.gc.last_collection.memory.committed_size",Krt="dotnet.gc.pause.time",Jrt="dotnet.jit.compilation.time",Zrt="dotnet.jit.compiled_il.size",Wrt="dotnet.jit.compiled_methods",Xrt="dotnet.monitor.lock_contentions",eot="dotnet.process.cpu.count",tot="dotnet.process.cpu.time",not="dotnet.process.memory.working_set",rot="dotnet.thread_pool.queue.length",oot="dotnet.thread_pool.thread.count",iot="dotnet.thread_pool.work_item.count",aot="dotnet.timer.count",sot="http.client.request.duration",uot="http.server.request.duration",cot="jvm.class.count",lot="jvm.class.loaded",dot="jvm.class.unloaded",pot="jvm.cpu.count",fot="jvm.cpu.recent_utilization",Aot="jvm.cpu.time",mot="jvm.gc.duration",got="jvm.memory.committed",hot="jvm.memory.limit",_ot="jvm.memory.used",Eot="jvm.memory.used_after_last_gc",Sot="jvm.thread.count",yot="kestrel.active_connections",Tot="kestrel.active_tls_handshakes",Iot="kestrel.connection.duration",Cot="kestrel.queued_connections",bot="kestrel.queued_requests",vot="kestrel.rejected_connections",Rot="kestrel.tls_handshake.duration",xot="kestrel.upgraded_connections",Dot="signalr.server.active_connections",Bot="signalr.server.connection.duration"});var Not,eEe=O(()=>{m();Not="exception"});var Lr={};Ha(Lr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>vtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Rtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>xtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Dtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>wtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>ktt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Ptt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Mtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Ftt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Gtt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>btt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Btt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Ntt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ott,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>Utt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Ltt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Qtt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>jtt,ATTR_CLIENT_ADDRESS:()=>ztt,ATTR_CLIENT_PORT:()=>Htt,ATTR_CODE_COLUMN_NUMBER:()=>$tt,ATTR_CODE_FILE_PATH:()=>Vtt,ATTR_CODE_FUNCTION_NAME:()=>qtt,ATTR_CODE_LINE_NUMBER:()=>Ytt,ATTR_CODE_STACKTRACE:()=>Ktt,ATTR_DB_COLLECTION_NAME:()=>m5,ATTR_DB_NAMESPACE:()=>g5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Jtt,ATTR_DB_OPERATION_NAME:()=>ZC,ATTR_DB_QUERY_SUMMARY:()=>Ztt,ATTR_DB_QUERY_TEXT:()=>h5,ATTR_DB_RESPONSE_STATUS_CODE:()=>_5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Wtt,ATTR_DB_SYSTEM_NAME:()=>NS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>rnt,ATTR_ERROR_TYPE:()=>E5,ATTR_EXCEPTION_ESCAPED:()=>lnt,ATTR_EXCEPTION_MESSAGE:()=>dnt,ATTR_EXCEPTION_STACKTRACE:()=>pnt,ATTR_EXCEPTION_TYPE:()=>fnt,ATTR_HTTP_REQUEST_HEADER:()=>Ant,ATTR_HTTP_REQUEST_METHOD:()=>OS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>bnt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>vnt,ATTR_HTTP_RESPONSE_HEADER:()=>Rnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>og,ATTR_HTTP_ROUTE:()=>ig,ATTR_JVM_GC_ACTION:()=>xnt,ATTR_JVM_GC_NAME:()=>Dnt,ATTR_JVM_MEMORY_POOL_NAME:()=>Bnt,ATTR_JVM_MEMORY_TYPE:()=>Nnt,ATTR_JVM_THREAD_DAEMON:()=>knt,ATTR_JVM_THREAD_STATE:()=>Pnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>jnt,ATTR_NETWORK_LOCAL_PORT:()=>znt,ATTR_NETWORK_PEER_ADDRESS:()=>S5,ATTR_NETWORK_PEER_PORT:()=>y5,ATTR_NETWORK_PROTOCOL_NAME:()=>Hnt,ATTR_NETWORK_PROTOCOL_VERSION:()=>T5,ATTR_NETWORK_TRANSPORT:()=>I5,ATTR_NETWORK_TYPE:()=>Jnt,ATTR_OTEL_SCOPE_NAME:()=>Xnt,ATTR_OTEL_SCOPE_VERSION:()=>ert,ATTR_OTEL_STATUS_CODE:()=>trt,ATTR_OTEL_STATUS_DESCRIPTION:()=>ort,ATTR_SERVER_ADDRESS:()=>C5,ATTR_SERVER_PORT:()=>b5,ATTR_SERVICE_INSTANCE_ID:()=>irt,ATTR_SERVICE_NAME:()=>v5,ATTR_SERVICE_NAMESPACE:()=>art,ATTR_SERVICE_VERSION:()=>R5,ATTR_SIGNALR_CONNECTION_STATUS:()=>srt,ATTR_SIGNALR_TRANSPORT:()=>drt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>mrt,ATTR_TELEMETRY_SDK_NAME:()=>xrt,ATTR_TELEMETRY_SDK_VERSION:()=>Drt,ATTR_URL_FRAGMENT:()=>Brt,ATTR_URL_FULL:()=>n_,ATTR_URL_PATH:()=>Nrt,ATTR_URL_QUERY:()=>Ort,ATTR_URL_SCHEME:()=>wrt,ATTR_USER_AGENT_ORIGINAL:()=>x5,AWSECSLAUNCHTYPEVALUES_EC2:()=>$et,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Vet,AwsEcsLaunchtypeValues:()=>qet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Ret,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>xet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Det,CLOUDPLATFORMVALUES_AWS_ECS:()=>Bet,CLOUDPLATFORMVALUES_AWS_EKS:()=>Net,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>wet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Oet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Met,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Let,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Pet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>Uet,CLOUDPLATFORMVALUES_AZURE_VM:()=>ket,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>zet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>jet,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Fet,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Qet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Get,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Tet,CLOUDPROVIDERVALUES_AWS:()=>Iet,CLOUDPROVIDERVALUES_AZURE:()=>Cet,CLOUDPROVIDERVALUES_GCP:()=>bet,CloudPlatformValues:()=>Het,CloudProviderValues:()=>vet,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>iZe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>fZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>aZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>pZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>uZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>mZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>cZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>sZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>AZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>dZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>lZe,DBSYSTEMVALUES_ADABAS:()=>xJe,DBSYSTEMVALUES_CACHE:()=>RJe,DBSYSTEMVALUES_CASSANDRA:()=>$Je,DBSYSTEMVALUES_CLOUDSCAPE:()=>EJe,DBSYSTEMVALUES_COCKROACHDB:()=>rZe,DBSYSTEMVALUES_COLDFUSION:()=>HJe,DBSYSTEMVALUES_COSMOSDB:()=>ZJe,DBSYSTEMVALUES_COUCHBASE:()=>KJe,DBSYSTEMVALUES_COUCHDB:()=>JJe,DBSYSTEMVALUES_DB2:()=>mJe,DBSYSTEMVALUES_DERBY:()=>BJe,DBSYSTEMVALUES_DYNAMODB:()=>WJe,DBSYSTEMVALUES_EDB:()=>vJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>tZe,DBSYSTEMVALUES_FILEMAKER:()=>NJe,DBSYSTEMVALUES_FIREBIRD:()=>DJe,DBSYSTEMVALUES_FIRSTSQL:()=>bJe,DBSYSTEMVALUES_GEODE:()=>eZe,DBSYSTEMVALUES_H2:()=>zJe,DBSYSTEMVALUES_HANADB:()=>IJe,DBSYSTEMVALUES_HBASE:()=>VJe,DBSYSTEMVALUES_HIVE:()=>_Je,DBSYSTEMVALUES_HSQLDB:()=>SJe,DBSYSTEMVALUES_INFORMIX:()=>OJe,DBSYSTEMVALUES_INGRES:()=>CJe,DBSYSTEMVALUES_INSTANTDB:()=>wJe,DBSYSTEMVALUES_INTERBASE:()=>kJe,DBSYSTEMVALUES_MARIADB:()=>PJe,DBSYSTEMVALUES_MAXDB:()=>TJe,DBSYSTEMVALUES_MEMCACHED:()=>nZe,DBSYSTEMVALUES_MONGODB:()=>qJe,DBSYSTEMVALUES_MSSQL:()=>pJe,DBSYSTEMVALUES_MYSQL:()=>fJe,DBSYSTEMVALUES_NEO4J:()=>XJe,DBSYSTEMVALUES_NETEZZA:()=>MJe,DBSYSTEMVALUES_ORACLE:()=>AJe,DBSYSTEMVALUES_OTHER_SQL:()=>dJe,DBSYSTEMVALUES_PERVASIVE:()=>UJe,DBSYSTEMVALUES_POINTBASE:()=>LJe,DBSYSTEMVALUES_POSTGRESQL:()=>gJe,DBSYSTEMVALUES_PROGRESS:()=>yJe,DBSYSTEMVALUES_REDIS:()=>YJe,DBSYSTEMVALUES_REDSHIFT:()=>hJe,DBSYSTEMVALUES_SQLITE:()=>QJe,DBSYSTEMVALUES_SYBASE:()=>FJe,DBSYSTEMVALUES_TERADATA:()=>GJe,DBSYSTEMVALUES_VERTICA:()=>jJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Xtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ent,DB_SYSTEM_NAME_VALUE_MYSQL:()=>tnt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>nnt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>ont,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>int,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>ant,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>snt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>unt,DbCassandraConsistencyLevelValues:()=>gZe,DbSystemValues:()=>oZe,ERROR_TYPE_VALUE_OTHER:()=>cnt,EVENT_EXCEPTION:()=>Not,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>bZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>CZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>IZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>RZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>xZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>DZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>BZe,FAASTRIGGERVALUES_DATASOURCE:()=>hZe,FAASTRIGGERVALUES_HTTP:()=>_Ze,FAASTRIGGERVALUES_OTHER:()=>yZe,FAASTRIGGERVALUES_PUBSUB:()=>EZe,FAASTRIGGERVALUES_TIMER:()=>SZe,FaasDocumentOperationValues:()=>vZe,FaasInvokedProviderValues:()=>NZe,FaasTriggerValues:()=>TZe,HOSTARCHVALUES_AMD64:()=>Yet,HOSTARCHVALUES_ARM32:()=>Ket,HOSTARCHVALUES_ARM64:()=>Jet,HOSTARCHVALUES_IA64:()=>Zet,HOSTARCHVALUES_PPC32:()=>Wet,HOSTARCHVALUES_PPC64:()=>Xet,HOSTARCHVALUES_X86:()=>ett,HTTPFLAVORVALUES_HTTP_1_0:()=>AWe,HTTPFLAVORVALUES_HTTP_1_1:()=>mWe,HTTPFLAVORVALUES_HTTP_2_0:()=>gWe,HTTPFLAVORVALUES_QUIC:()=>_We,HTTPFLAVORVALUES_SPDY:()=>hWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>gnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>hnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>_nt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Ent,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Snt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>mnt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>ynt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Tnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>Int,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Cnt,HostArchValues:()=>ttt,HttpFlavorValues:()=>EWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Ont,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>wnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Mnt,JVM_THREAD_STATE_VALUE_NEW:()=>Unt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Lnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Qnt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Fnt,JVM_THREAD_STATE_VALUE_WAITING:()=>Gnt,MESSAGETYPEVALUES_RECEIVED:()=>$We,MESSAGETYPEVALUES_SENT:()=>HWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>SWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>yWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>CWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>IWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>krt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Prt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Mrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Qrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Lrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Urt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Frt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Grt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>jrt,METRIC_DOTNET_EXCEPTIONS:()=>zrt,METRIC_DOTNET_GC_COLLECTIONS:()=>Hrt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>$rt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Vrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>qrt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Yrt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Krt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Jrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Zrt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Wrt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Xrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>eot,METRIC_DOTNET_PROCESS_CPU_TIME:()=>tot,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>not,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>rot,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>oot,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>iot,METRIC_DOTNET_TIMER_COUNT:()=>aot,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>sot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>uot,METRIC_JVM_CLASS_COUNT:()=>cot,METRIC_JVM_CLASS_LOADED:()=>lot,METRIC_JVM_CLASS_UNLOADED:()=>dot,METRIC_JVM_CPU_COUNT:()=>pot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>fot,METRIC_JVM_CPU_TIME:()=>Aot,METRIC_JVM_GC_DURATION:()=>mot,METRIC_JVM_MEMORY_COMMITTED:()=>got,METRIC_JVM_MEMORY_LIMIT:()=>hot,METRIC_JVM_MEMORY_USED:()=>_ot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Eot,METRIC_JVM_THREAD_COUNT:()=>Sot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>yot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Tot,METRIC_KESTREL_CONNECTION_DURATION:()=>Iot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Cot,METRIC_KESTREL_QUEUED_REQUESTS:()=>bot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>vot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Rot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>xot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Dot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Bot,MessageTypeValues:()=>VWe,MessagingDestinationKindValues:()=>TWe,MessagingOperationValues:()=>bWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>iWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>rWe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>sWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>aWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>nWe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>cWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>oWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>pWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>lWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>dWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>uWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>YZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>jZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>zZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>HZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>FZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>GZe,NETTRANSPORTVALUES_INPROC:()=>UZe,NETTRANSPORTVALUES_IP:()=>kZe,NETTRANSPORTVALUES_IP_TCP:()=>OZe,NETTRANSPORTVALUES_IP_UDP:()=>wZe,NETTRANSPORTVALUES_OTHER:()=>LZe,NETTRANSPORTVALUES_PIPE:()=>MZe,NETTRANSPORTVALUES_UNIX:()=>PZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>$nt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Vnt,NETWORK_TRANSPORT_VALUE_TCP:()=>qnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Ynt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Knt,NETWORK_TYPE_VALUE_IPV4:()=>Znt,NETWORK_TYPE_VALUE_IPV6:()=>Wnt,NetHostConnectionSubtypeValues:()=>fWe,NetHostConnectionTypeValues:()=>$Ze,NetTransportValues:()=>QZe,OSTYPEVALUES_AIX:()=>ltt,OSTYPEVALUES_DARWIN:()=>ott,OSTYPEVALUES_DRAGONFLYBSD:()=>utt,OSTYPEVALUES_FREEBSD:()=>itt,OSTYPEVALUES_HPUX:()=>ctt,OSTYPEVALUES_LINUX:()=>rtt,OSTYPEVALUES_NETBSD:()=>att,OSTYPEVALUES_OPENBSD:()=>stt,OSTYPEVALUES_SOLARIS:()=>dtt,OSTYPEVALUES_WINDOWS:()=>ntt,OSTYPEVALUES_Z_OS:()=>ptt,OTEL_STATUS_CODE_VALUE_ERROR:()=>nrt,OTEL_STATUS_CODE_VALUE_OK:()=>rrt,OsTypeValues:()=>ftt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>MWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>OWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>RWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>GWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>BWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>PWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>QWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>DWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>NWe,RPCGRPCSTATUSCODEVALUES_OK:()=>vWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>UWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>wWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>kWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>jWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>FWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>LWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>xWe,RpcGrpcStatusCodeValues:()=>zWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>TKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>kKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>EKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>mKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>OKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>RKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>bKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>PKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>IKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>gKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>yKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>vKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>SKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>hKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>_Ke,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>wKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>DKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>BKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>CKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>xKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>AKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>NKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>aYe,SEMATTRS_CODE_FILEPATH:()=>oKe,SEMATTRS_CODE_FUNCTION:()=>nKe,SEMATTRS_CODE_LINENO:()=>iKe,SEMATTRS_CODE_NAMESPACE:()=>rKe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>mYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>SYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>EYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>hYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>fYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>AYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>_Ye,SEMATTRS_DB_CASSANDRA_TABLE:()=>gYe,SEMATTRS_DB_CONNECTION_STRING:()=>sYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>yYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>cYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>IYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>pYe,SEMATTRS_DB_NAME:()=>lYe,SEMATTRS_DB_OPERATION:()=>dYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>TYe,SEMATTRS_DB_SQL_TABLE:()=>CYe,SEMATTRS_DB_STATEMENT:()=>n5,SEMATTRS_DB_SYSTEM:()=>t5,SEMATTRS_DB_USER:()=>uYe,SEMATTRS_ENDUSER_ID:()=>ZYe,SEMATTRS_ENDUSER_ROLE:()=>WYe,SEMATTRS_ENDUSER_SCOPE:()=>XYe,SEMATTRS_EXCEPTION_ESCAPED:()=>xYe,SEMATTRS_EXCEPTION_MESSAGE:()=>vYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>RYe,SEMATTRS_EXCEPTION_TYPE:()=>bYe,SEMATTRS_FAAS_COLDSTART:()=>MYe,SEMATTRS_FAAS_CRON:()=>PYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>BYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>wYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>NYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>OYe,SEMATTRS_FAAS_EXECUTION:()=>DYe,SEMATTRS_FAAS_INVOKED_NAME:()=>UYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>LYe,SEMATTRS_FAAS_INVOKED_REGION:()=>QYe,SEMATTRS_FAAS_TIME:()=>kYe,SEMATTRS_FAAS_TRIGGER:()=>r5,SEMATTRS_HTTP_CLIENT_IP:()=>fKe,SEMATTRS_HTTP_FLAVOR:()=>uKe,SEMATTRS_HTTP_HOST:()=>aKe,SEMATTRS_HTTP_METHOD:()=>iB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>lKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>dKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>u5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>c5,SEMATTRS_HTTP_ROUTE:()=>l5,SEMATTRS_HTTP_SCHEME:()=>sKe,SEMATTRS_HTTP_SERVER_NAME:()=>pKe,SEMATTRS_HTTP_STATUS_CODE:()=>BS,SEMATTRS_HTTP_TARGET:()=>s5,SEMATTRS_HTTP_URL:()=>JC,SEMATTRS_HTTP_USER_AGENT:()=>cKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>uJe,SEMATTRS_MESSAGE_ID:()=>sJe,SEMATTRS_MESSAGE_TYPE:()=>aJe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>cJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>qKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>zKe,SEMATTRS_MESSAGING_DESTINATION:()=>MKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>UKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>ZKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>JKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>KKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>WKe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>XKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>jKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>$Ke,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>HKe,SEMATTRS_MESSAGING_OPERATION:()=>VKe,SEMATTRS_MESSAGING_PROTOCOL:()=>QKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>FKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>YKe,SEMATTRS_MESSAGING_SYSTEM:()=>d5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>LKe,SEMATTRS_MESSAGING_URL:()=>GKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>KYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>qYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>YYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>VYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>$Ye,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>HYe,SEMATTRS_NET_HOST_IP:()=>i5,SEMATTRS_NET_HOST_NAME:()=>zYe,SEMATTRS_NET_HOST_PORT:()=>a5,SEMATTRS_NET_PEER_IP:()=>o5,SEMATTRS_NET_PEER_NAME:()=>jYe,SEMATTRS_NET_PEER_PORT:()=>GYe,SEMATTRS_NET_TRANSPORT:()=>FYe,SEMATTRS_PEER_SERVICE:()=>JYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>f5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>oJe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>iJe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>rJe,SEMATTRS_RPC_JSONRPC_VERSION:()=>nJe,SEMATTRS_RPC_METHOD:()=>tJe,SEMATTRS_RPC_SERVICE:()=>p5,SEMATTRS_RPC_SYSTEM:()=>eJe,SEMATTRS_THREAD_ID:()=>eKe,SEMATTRS_THREAD_NAME:()=>tKe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>XWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>WWe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>eXe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>tXe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>nXe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>rXe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>oXe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>aXe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>iXe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>uXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>sXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>YWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>JWe,SEMRESATTRS_CLOUD_PLATFORM:()=>ZWe,SEMRESATTRS_CLOUD_PROVIDER:()=>qWe,SEMRESATTRS_CLOUD_REGION:()=>KWe,SEMRESATTRS_CONTAINER_ID:()=>lXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>pXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>fXe,SEMRESATTRS_CONTAINER_NAME:()=>cXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>dXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>AXe,SEMRESATTRS_DEVICE_ID:()=>mXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>gXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>hXe,SEMRESATTRS_FAAS_ID:()=>EXe,SEMRESATTRS_FAAS_INSTANCE:()=>yXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>TXe,SEMRESATTRS_FAAS_NAME:()=>_Xe,SEMRESATTRS_FAAS_VERSION:()=>SXe,SEMRESATTRS_HOST_ARCH:()=>vXe,SEMRESATTRS_HOST_ID:()=>IXe,SEMRESATTRS_HOST_IMAGE_ID:()=>xXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>RXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>DXe,SEMRESATTRS_HOST_NAME:()=>CXe,SEMRESATTRS_HOST_TYPE:()=>bXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>BXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>MXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>YXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>qXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>HXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>zXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>FXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>QXe,SEMRESATTRS_K8S_JOB_NAME:()=>VXe,SEMRESATTRS_K8S_JOB_UID:()=>$Xe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>wXe,SEMRESATTRS_K8S_NODE_NAME:()=>NXe,SEMRESATTRS_K8S_NODE_UID:()=>OXe,SEMRESATTRS_K8S_POD_NAME:()=>PXe,SEMRESATTRS_K8S_POD_UID:()=>kXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>LXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>UXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>jXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>GXe,SEMRESATTRS_OS_DESCRIPTION:()=>JXe,SEMRESATTRS_OS_NAME:()=>ZXe,SEMRESATTRS_OS_TYPE:()=>KXe,SEMRESATTRS_OS_VERSION:()=>WXe,SEMRESATTRS_PROCESS_COMMAND:()=>net,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>oet,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>ret,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>eet,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>tet,SEMRESATTRS_PROCESS_OWNER:()=>iet,SEMRESATTRS_PROCESS_PID:()=>XXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>uet,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>aet,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>set,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>det,SEMRESATTRS_SERVICE_NAME:()=>cet,SEMRESATTRS_SERVICE_NAMESPACE:()=>A5,SEMRESATTRS_SERVICE_VERSION:()=>pet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>get,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Aet,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>fet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>met,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Eet,SEMRESATTRS_WEBENGINE_NAME:()=>het,SEMRESATTRS_WEBENGINE_VERSION:()=>_et,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>urt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>crt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>lrt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>prt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>frt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Art,SemanticAttributes:()=>lJe,SemanticResourceAttributes:()=>yet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Att,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>mtt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>gtt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>htt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>_tt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ett,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Stt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ytt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Ttt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>Itt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>grt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>hrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>_rt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Ert,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Srt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>yrt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Trt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Irt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Crt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>brt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>vrt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Rrt,TelemetrySdkLanguageValues:()=>Ctt});var Zn=O(()=>{m();bge();Z_e();W_e();X_e();eEe()});var tEe=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.ATTR_PROCESS_RUNTIME_NAME=void 0;S2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var nEe=F(T2=>{"use strict";m();Object.defineProperty(T2,"__esModule",{value:!0});T2.SDK_INFO=void 0;var Oot=kde(),y2=(Zn(),Me(Lr)),wot=tEe();T2.SDK_INFO={[y2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[wot.ATTR_PROCESS_RUNTIME_NAME]:"node",[y2.ATTR_TELEMETRY_SDK_LANGUAGE]:y2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[y2.ATTR_TELEMETRY_SDK_VERSION]:Oot.VERSION}});var rEe=F(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.otperformance=Zs.SDK_INFO=Zs._globalThis=Zs.getStringListFromEnv=Zs.getNumberFromEnv=Zs.getBooleanFromEnv=Zs.getStringFromEnv=void 0;var I2=Ode();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return I2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return I2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return I2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return I2.getStringListFromEnv}});var kot=wde();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return kot._globalThis}});var Pot=nEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return Pot.SDK_INFO}});Zs.otperformance=performance});var D5=F(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getStringFromEnv=Ws.getBooleanFromEnv=Ws.otperformance=Ws._globalThis=Ws.SDK_INFO=void 0;var wS=rEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return wS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return wS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return wS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return wS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return wS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return wS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return wS.getStringListFromEnv}})});var sEe=F(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var C2=D5(),oEe=9,Mot=6,Uot=Math.pow(10,Mot),b2=Math.pow(10,oEe);function aB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Uot);return[n,r]}ao.millisToHrTime=aB;function Lot(){return C2.otperformance.timeOrigin}ao.getTimeOrigin=Lot;function iEe(e){let t=aB(C2.otperformance.timeOrigin),n=aB(typeof e=="number"?e:C2.otperformance.now());return aEe(t,n)}ao.hrTime=iEe;function Qot(e){if(B5(e))return e;if(typeof e=="number")return e<C2.otperformance.timeOrigin?iEe(e):aB(e);if(e instanceof Date)return aB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=Qot;function Fot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=b2),[n,r]}ao.hrTimeDuration=Fot;function Got(e){let t=oEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=Got;function jot(e){return e[0]*b2+e[1]}ao.hrTimeToNanoseconds=jot;function zot(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=zot;function Hot(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=Hot;function B5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=B5;function $ot(e){return B5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=$ot;function aEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=b2&&(n[1]-=b2,n[0]+=1),n}ao.addHrTimes=aEe});var uEe=F(v2=>{"use strict";m();Object.defineProperty(v2,"__esModule",{value:!0});v2.unrefTimer=void 0;function Vot(e){typeof e!="number"&&e.unref()}v2.unrefTimer=Vot});var cEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.ExportResultCode=void 0;var qot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(qot=sB.ExportResultCode||(sB.ExportResultCode={}))});var dEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.CompositePropagator=void 0;var lEe=(je(),Me(We)),N5=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){lEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){lEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};R2.CompositePropagator=N5});var pEe=F(WC=>{"use strict";m();Object.defineProperty(WC,"__esModule",{value:!0});WC.validateValue=WC.validateKey=void 0;var O5="[_0-9a-z-*/]",Yot=`[a-z]${O5}{0,255}`,Kot=`[a-z0-9]${O5}{0,240}@[a-z]${O5}{0,13}`,Jot=new RegExp(`^(?:${Yot}|${Kot})$`),Zot=/^[ -~]{0,255}[!-~]$/,Wot=/,|=/;function Xot(e){return Jot.test(e)}WC.validateKey=Xot;function eit(e){return Zot.test(e)&&!Wot.test(e)}WC.validateValue=eit});var k5=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.TraceState=void 0;var fEe=pEe(),AEe=32,tit=512,mEe=",",gEe="=",w5=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+gEe+this.get(n)),t),[]).join(mEe)}_parse(t){t.length>tit||(this._internalState=t.split(mEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(gEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,fEe.validateKey)(a)&&(0,fEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>AEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,AEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};x2.TraceState=w5});var _Ee=F(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.W3CTraceContextPropagator=Xs.parseTraceParent=Xs.TRACE_STATE_HEADER=Xs.TRACE_PARENT_HEADER=void 0;var D2=(je(),Me(We)),nit=oB(),rit=k5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var oit="00",iit="(?!ff)[\\da-f]{2}",ait="(?![0]{32})[\\da-f]{32}",sit="(?![0]{16})[\\da-f]{16}",uit="[\\da-f]{2}",cit=new RegExp(`^\\s?(${iit})-(${ait})-(${sit})-(${uit})(-.*)?\\s?$`);function hEe(e){let t=cit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=hEe;var P5=class{inject(t,n,r){let o=D2.trace.getSpanContext(t);if(!o||(0,nit.isTracingSuppressed)(t)||!(0,D2.isSpanContextValid)(o))return;let i=`${oit}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||D2.TraceFlags.NONE).toString(16)}`;r.set(n,Xs.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Xs.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Xs.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=hEe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Xs.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new rit.TraceState(typeof d=="string"?d:void 0)}return D2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var EEe=F(Yp=>{"use strict";m();Object.defineProperty(Yp,"__esModule",{value:!0});Yp.getRPCMetadata=Yp.deleteRPCMetadata=Yp.setRPCMetadata=Yp.RPCType=void 0;var lit=(je(),Me(We)),M5=(0,lit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),dit;(function(e){e.HTTP="http"})(dit=Yp.RPCType||(Yp.RPCType={}));function pit(e,t){return e.setValue(M5,t)}Yp.setRPCMetadata=pit;function fit(e){return e.deleteValue(M5)}Yp.deleteRPCMetadata=fit;function Ait(e){return e.getValue(M5)}Yp.getRPCMetadata=Ait});var CEe=F(B2=>{"use strict";m();Object.defineProperty(B2,"__esModule",{value:!0});B2.isPlainObject=void 0;var mit="[object Object]",git="[object Null]",hit="[object Undefined]",_it=Function.prototype,SEe=_it.toString,Eit=SEe.call(Object),Sit=Object.getPrototypeOf,yEe=Object.prototype,TEe=yEe.hasOwnProperty,kS=Symbol?Symbol.toStringTag:void 0,IEe=yEe.toString;function yit(e){if(!Tit(e)||Iit(e)!==mit)return!1;let t=Sit(e);if(t===null)return!0;let n=TEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&SEe.call(n)===Eit}B2.isPlainObject=yit;function Tit(e){return e!=null&&typeof e=="object"}function Iit(e){return e==null?e===void 0?hit:git:kS&&kS in Object(e)?Cit(e):bit(e)}function Cit(e){let t=TEe.call(e,kS),n=e[kS],r=!1;try{e[kS]=void 0,r=!0}catch{}let o=IEe.call(e);return r&&(t?e[kS]=n:delete e[kS]),o}function bit(e){return IEe.call(e)}});var DEe=F(w2=>{"use strict";m();Object.defineProperty(w2,"__esModule",{value:!0});w2.merge=void 0;var bEe=CEe(),vit=20;function Rit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=REe(t,e.shift(),0,n);return t}w2.merge=Rit;function U5(e){return O2(e)?e.slice():e}function REe(e,t,n=0,r){let o;if(!(n>vit)){if(n++,N2(e)||N2(t)||xEe(t))o=U5(t);else if(O2(e)){if(o=e.slice(),O2(t))for(let i=0,a=t.length;i<a;i++)o.push(U5(t[i]));else if(uB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=U5(t[d])}}}else if(uB(e))if(uB(t)){if(!xit(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],g=t[d];if(N2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(vEe(e,d,r)||vEe(t,d,r))delete o[d];else{if(uB(h)&&uB(S)){let y=r.get(h)||[],C=r.get(S)||[];y.push({obj:e,key:d}),C.push({obj:t,key:d}),r.set(h,y),r.set(S,C)}o[d]=REe(o[d],g,n,r)}}}}else o=t;return o}}function vEe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function O2(e){return Array.isArray(e)}function xEe(e){return typeof e=="function"}function uB(e){return!N2(e)&&!O2(e)&&!xEe(e)&&typeof e=="object"}function N2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function xit(e,t){return!(!(0,bEe.isPlainObject)(e)||!(0,bEe.isPlainObject)(t))}});var BEe=F(XC=>{"use strict";m();Object.defineProperty(XC,"__esModule",{value:!0});XC.callWithTimeout=XC.TimeoutError=void 0;var k2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};XC.TimeoutError=k2;function Dit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new k2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}XC.callWithTimeout=Dit});var OEe=F(eb=>{"use strict";m();Object.defineProperty(eb,"__esModule",{value:!0});eb.isUrlIgnored=eb.urlMatches=void 0;function NEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}eb.urlMatches=NEe;function Bit(e,t){if(!t)return!1;for(let n of t)if(NEe(e,n))return!0;return!1}eb.isUrlIgnored=Bit});var wEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var L5=class{_promise;_resolve;_reject;constructor(){this._promise=new Promise((t,n)=>{this._resolve=t,this._reject=n})}get promise(){return this._promise}resolve(t){this._resolve(t)}reject(t){this._reject(t)}};P2.Deferred=L5});var kEe=F(M2=>{"use strict";m();Object.defineProperty(M2,"__esModule",{value:!0});M2.BindOnceFuture=void 0;var Nit=wEe(),Q5=class{_isCalled=!1;_deferred=new Nit.Deferred;_callback;_that;constructor(t,n){this._callback=t,this._that=n}get isCalled(){return this._isCalled}get promise(){return this._deferred.promise}call(...t){if(!this._isCalled){this._isCalled=!0;try{Promise.resolve(this._callback.call(this._that,...t)).then(n=>this._deferred.resolve(n),n=>this._deferred.reject(n))}catch(n){this._deferred.reject(n)}}return this._deferred.promise}};M2.BindOnceFuture=Q5});var MEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.diagLogLevelFromString=void 0;var ag=(je(),Me(We)),PEe={ALL:ag.DiagLogLevel.ALL,VERBOSE:ag.DiagLogLevel.VERBOSE,DEBUG:ag.DiagLogLevel.DEBUG,INFO:ag.DiagLogLevel.INFO,WARN:ag.DiagLogLevel.WARN,ERROR:ag.DiagLogLevel.ERROR,NONE:ag.DiagLogLevel.NONE};function Oit(e){if(e==null)return;let t=PEe[e.toUpperCase()];return t??(ag.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(PEe)}, using default`),ag.DiagLogLevel.INFO)}U2.diagLogLevelFromString=Oit});var LEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2._export=void 0;var UEe=(je(),Me(We)),wit=oB();function kit(e,t){return new Promise(n=>{UEe.context.with((0,wit.suppressTracing)(UEe.context.active()),()=>{e.export(t,n)})})}L2._export=kit});var Tr=F(Oe=>{"use strict";m();Object.defineProperty(Oe,"__esModule",{value:!0});Oe.internal=Oe.diagLogLevelFromString=Oe.BindOnceFuture=Oe.urlMatches=Oe.isUrlIgnored=Oe.callWithTimeout=Oe.TimeoutError=Oe.merge=Oe.TraceState=Oe.unsuppressTracing=Oe.suppressTracing=Oe.isTracingSuppressed=Oe.setRPCMetadata=Oe.getRPCMetadata=Oe.deleteRPCMetadata=Oe.RPCType=Oe.parseTraceParent=Oe.W3CTraceContextPropagator=Oe.TRACE_STATE_HEADER=Oe.TRACE_PARENT_HEADER=Oe.CompositePropagator=Oe.otperformance=Oe.getStringListFromEnv=Oe.getNumberFromEnv=Oe.getBooleanFromEnv=Oe.getStringFromEnv=Oe._globalThis=Oe.SDK_INFO=Oe.parseKeyPairsIntoRecord=Oe.ExportResultCode=Oe.unrefTimer=Oe.timeInputToHrTime=Oe.millisToHrTime=Oe.isTimeInputHrTime=Oe.isTimeInput=Oe.hrTimeToTimeStamp=Oe.hrTimeToNanoseconds=Oe.hrTimeToMilliseconds=Oe.hrTimeToMicroseconds=Oe.hrTimeDuration=Oe.hrTime=Oe.getTimeOrigin=Oe.addHrTimes=Oe.loggingErrorHandler=Oe.setGlobalErrorHandler=Oe.globalErrorHandler=Oe.sanitizeAttributes=Oe.isAttributeValue=Oe.AnchoredClock=Oe.W3CBaggagePropagator=void 0;var Pit=Sde();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Pit.W3CBaggagePropagator}});var Mit=yde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return Mit.AnchoredClock}});var QEe=vde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return QEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return QEe.sanitizeAttributes}});var FEe=xde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return FEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return FEe.setGlobalErrorHandler}});var Uit=X$();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return Uit.loggingErrorHandler}});var Dd=sEe();Object.defineProperty(Oe,"addHrTimes",{enumerable:!0,get:function(){return Dd.addHrTimes}});Object.defineProperty(Oe,"getTimeOrigin",{enumerable:!0,get:function(){return Dd.getTimeOrigin}});Object.defineProperty(Oe,"hrTime",{enumerable:!0,get:function(){return Dd.hrTime}});Object.defineProperty(Oe,"hrTimeDuration",{enumerable:!0,get:function(){return Dd.hrTimeDuration}});Object.defineProperty(Oe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMicroseconds}});Object.defineProperty(Oe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Dd.hrTimeToMilliseconds}});Object.defineProperty(Oe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Dd.hrTimeToNanoseconds}});Object.defineProperty(Oe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Dd.hrTimeToTimeStamp}});Object.defineProperty(Oe,"isTimeInput",{enumerable:!0,get:function(){return Dd.isTimeInput}});Object.defineProperty(Oe,"isTimeInputHrTime",{enumerable:!0,get:function(){return Dd.isTimeInputHrTime}});Object.defineProperty(Oe,"millisToHrTime",{enumerable:!0,get:function(){return Dd.millisToHrTime}});Object.defineProperty(Oe,"timeInputToHrTime",{enumerable:!0,get:function(){return Dd.timeInputToHrTime}});var Lit=uEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Lit.unrefTimer}});var Qit=cEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return Qit.ExportResultCode}});var Fit=Y$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Fit.parseKeyPairsIntoRecord}});var PS=D5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return PS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return PS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return PS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return PS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return PS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return PS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return PS.otperformance}});var Git=dEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return Git.CompositePropagator}});var Q2=_Ee();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return Q2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return Q2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return Q2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return Q2.parseTraceParent}});var F2=EEe();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return F2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return F2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return F2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return F2.setRPCMetadata}});var F5=oB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return F5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return F5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return F5.unsuppressTracing}});var jit=k5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return jit.TraceState}});var zit=DEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return zit.merge}});var GEe=BEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return GEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return GEe.callWithTimeout}});var jEe=OEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return jEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return jEe.urlMatches}});var Hit=kEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return Hit.BindOnceFuture}});var $it=MEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return $it.diagLogLevelFromString}});var Vit=LEe();Oe.internal={_export:Vit._export}});var zEe=F(G2=>{"use strict";m();Object.defineProperty(G2,"__esModule",{value:!0});G2.VERSION=void 0;G2.VERSION="0.214.0"});var HEe=F(cB=>{"use strict";m();Object.defineProperty(cB,"__esModule",{value:!0});cB.SeverityNumber=void 0;var qit;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(qit=cB.SeverityNumber||(cB.SeverityNumber={}))});var z2=F(tb=>{"use strict";m();Object.defineProperty(tb,"__esModule",{value:!0});tb.NOOP_LOGGER=tb.NoopLogger=void 0;var j2=class{emit(t){}};tb.NoopLogger=j2;tb.NOOP_LOGGER=new j2});var $Ee=F(pA=>{"use strict";m();Object.defineProperty(pA,"__esModule",{value:!0});pA.API_BACKWARDS_COMPATIBILITY_VERSION=pA.makeGetter=pA._global=pA.GLOBAL_LOGS_API_KEY=void 0;pA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");pA._global=globalThis;function Yit(e,t,n){return r=>r===e?t:n}pA.makeGetter=Yit;pA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var G5=F(nb=>{"use strict";m();Object.defineProperty(nb,"__esModule",{value:!0});nb.NOOP_LOGGER_PROVIDER=nb.NoopLoggerProvider=void 0;var Kit=z2(),H2=class{getLogger(t,n,r){return new Kit.NoopLogger}};nb.NoopLoggerProvider=H2;nb.NOOP_LOGGER_PROVIDER=new H2});var VEe=F($2=>{"use strict";m();Object.defineProperty($2,"__esModule",{value:!0});$2.ProxyLogger=void 0;var Jit=z2(),j5=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):Jit.NOOP_LOGGER}};$2.ProxyLogger=j5});var qEe=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLoggerProvider=void 0;var Zit=G5(),Wit=VEe(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Wit.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Zit.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};V2.ProxyLoggerProvider=z5});var KEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.LogsAPI=void 0;var Bd=$Ee(),Xit=G5(),YEe=qEe(),H5=class e{constructor(){this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,Xit.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new YEe.ProxyLoggerProvider}};q2.LogsAPI=H5});var $5=F(fA=>{"use strict";m();Object.defineProperty(fA,"__esModule",{value:!0});fA.logs=fA.NoopLogger=fA.NOOP_LOGGER=fA.SeverityNumber=void 0;var eat=HEe();Object.defineProperty(fA,"SeverityNumber",{enumerable:!0,get:function(){return eat.SeverityNumber}});var JEe=z2();Object.defineProperty(fA,"NOOP_LOGGER",{enumerable:!0,get:function(){return JEe.NOOP_LOGGER}});Object.defineProperty(fA,"NoopLogger",{enumerable:!0,get:function(){return JEe.NoopLogger}});var tat=KEe();fA.logs=tat.LogsAPI.getInstance()});var ZEe=F(rb=>{"use strict";m();Object.defineProperty(rb,"__esModule",{value:!0});rb.disableInstrumentations=rb.enableInstrumentations=void 0;function nat(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}rb.enableInstrumentations=nat;function rat(e){e.forEach(t=>t.disable())}rb.disableInstrumentations=rat});var e0e=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.registerInstrumentations=void 0;var WEe=(je(),Me(We)),oat=$5(),XEe=ZEe();function iat(e){let t=e.tracerProvider||WEe.trace.getTracerProvider(),n=e.meterProvider||WEe.metrics.getMeterProvider(),r=e.loggerProvider||oat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,XEe.enableInstrumentations)(o,t,n,r),()=>{(0,XEe.disableInstrumentations)(o)}}Y2.registerInstrumentations=iat});var c0e=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.satisfies=void 0;var K5=(je(),Me(We)),i0e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,aat=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,sat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function uat(e,t,n){if(!cat(e))return K5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=fat(e);if(!r)return!1;let o=[],i=a0e(r,t,o,n);return i&&!n?.includePrerelease?dat(r,o):i}K2.satisfies=uat;function cat(e){return typeof e=="string"&&i0e.test(e)}function a0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(V5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=kat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!V5(e,i,n,r))return!1;return!0}return V5(e,t,n,r)}function V5(e,t,n,r){if(t=pat(t,r),t.includes(" "))return a0e(e,t,n,r);{let o=Aat(t);return n.push(o),lat(e,o)}}function lat(e,t){if(t.invalid)return!1;if(!t.version||Y5(t.version))return!0;let n=n0e(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=n0e(r,o)}return sat[t.op]?.includes(n)}function dat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function pat(e,t){return e=e.trim(),e=Oat(e,t),e=Nat(e),e=wat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function fat(e){let t=e.match(i0e);if(!t){K5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function Aat(e){if(!e)return{};let t=e.match(aat);if(!t)return K5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function Y5(e){return e==="*"||e==="x"||e==="X"}function t0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function mat(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function gat(e,t){if(Y5(e)||Y5(t))return 0;let[n,r]=mat(t0e(e),t0e(t));return n>r?1:n<r?-1:0}function n0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=gat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var s0e="[a-zA-Z0-9-]",u0e="0|[1-9]\\d*",hat=`\\d*[a-zA-Z-]${s0e}*`,_at="((?:<|>)?=?)",r0e=`(?:${u0e}|${hat})`,Eat=`(?:-(${r0e}(?:\\.${r0e})*))`,o0e=`${s0e}+`,Sat=`(?:\\+(${o0e}(?:\\.${o0e})*))`,q5=`${u0e}|x|X|\\*`,lB=`[v=\\s]*(${q5})(?:\\.(${q5})(?:\\.(${q5})(?:${Eat})?${Sat}?)?)?`,yat=`^${_at}\\s*${lB}$`,Tat=new RegExp(yat),Iat=`^\\s*(${lB})\\s+-\\s+(${lB})\\s*$`,Cat=new RegExp(Iat),bat="(?:~>?)",vat=`^${bat}${lB}$`,Rat=new RegExp(vat),xat="(?:\\^)",Dat=`^${xat}${lB}$`,Bat=new RegExp(Dat);function Nat(e){let t=Rat;return e.replace(t,(n,r,o,i,a)=>{let c;return wu(r)?c="":wu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:wu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Oat(e,t){let n=Bat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return wu(i)?g="":wu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:wu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function wat(e,t){let n=Tat;return e.replace(n,(r,o,i,a,c,d)=>{let g=wu(i),h=g||wu(a),S=h||wu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function kat(e,t){let n=Cat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(wu(i)?o="":wu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:wu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,wu(S)?h="":wu(y)?h=`<${+S+1}.0.0-0`:wu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var J5=F(Ts=>{"use strict";m();Object.defineProperty(Ts,"__esModule",{value:!0});Ts.massUnwrap=Ts.unwrap=Ts.massWrap=Ts.wrap=void 0;var ku=console.error.bind(console);function dB(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Pat=(e,t,n)=>{if(!e||!e[t]){ku("no original function "+String(t)+" to wrap");return}if(!n){ku("no wrapper function"),ku(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ku("original object and wrapper must be functions");return}let o=n(r,t);return dB(o,"__original",r),dB(o,"__unwrap",()=>{e[t]===o&&dB(e,t,r)}),dB(o,"__wrapped",!0),dB(e,t,o),o};Ts.wrap=Pat;var Mat=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ts.wrap)(r,o,n)})})};Ts.massWrap=Mat;var Uat=(e,t)=>{if(!e||!e[t]){ku("no function to unwrap."),ku(new Error().stack);return}let n=e[t];if(!n.__unwrap)ku("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ts.unwrap=Uat;var Lat=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ku("must provide one or more modules to patch"),ku(new Error().stack);return}if(!(t&&Array.isArray(t))){ku("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ts.unwrap)(n,r)})})};Ts.massUnwrap=Lat;function pB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=pB;pB.wrap=Ts.wrap;pB.massWrap=Ts.massWrap;pB.unwrap=Ts.unwrap;pB.massUnwrap=Ts.massUnwrap});var l0e=F(Z2=>{"use strict";m();Object.defineProperty(Z2,"__esModule",{value:!0});Z2.InstrumentationAbstract=void 0;var Z5=(je(),Me(We)),Qat=$5(),J2=J5(),W5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=Z5.diag.createComponentLogger({namespace:t}),this._tracer=Z5.trace.getTracer(t,n),this._meter=Z5.metrics.getMeter(t,n),this._logger=Qat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=J2.wrap;_unwrap=J2.unwrap;_massWrap=J2.massWrap;_massUnwrap=J2.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};Z2.InstrumentationAbstract=W5});var p0e=F((B7t,d0e)=>{m();var ob=1e3,ib=ob*60,ab=ib*60,MS=ab*24,Fat=MS*7,Gat=MS*365.25;d0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return jat(e);if(n==="number"&&isFinite(e))return t.long?Hat(e):zat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function jat(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),r=(t[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*Gat;case"weeks":case"week":case"w":return n*Fat;case"days":case"day":case"d":return n*MS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*ab;case"minutes":case"minute":case"mins":case"min":case"m":return n*ib;case"seconds":case"second":case"secs":case"sec":case"s":return n*ob;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function zat(e){var t=Math.abs(e);return t>=MS?Math.round(e/MS)+"d":t>=ab?Math.round(e/ab)+"h":t>=ib?Math.round(e/ib)+"m":t>=ob?Math.round(e/ob)+"s":e+"ms"}function Hat(e){var t=Math.abs(e);return t>=MS?W2(e,t,MS,"day"):t>=ab?W2(e,t,ab,"hour"):t>=ib?W2(e,t,ib,"minute"):t>=ob?W2(e,t,ob,"second"):e+" ms"}function W2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var X5=F((O7t,f0e)=>{m();function $at(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=p0e(),n.destroy=g,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let S=0;for(let y=0;y<h.length;y++)S=(S<<5)-S+h.charCodeAt(y),S|=0;return n.colors[Math.abs(S)%n.colors.length]}n.selectColor=t;function n(h){let S,y=null,C,v;function x(...N){if(!x.enabled)return;let k=x,Q=Number(new Date),j=Q-(S||Q);k.diff=j,k.prev=S,k.curr=Q,S=Q,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let G=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let ye=n.formatters[ge];if(typeof ye=="function"){let be=N[G];oe=ye.call(k,be),N.splice(G,1),G--}return oe}),n.formatArgs.call(k,N),(k.log||n.log).apply(k,N)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>y!==null?y:(C!==n.namespaces&&(C=n.namespaces,v=n.enabled(h)),v),set:N=>{y=N}}),typeof n.init=="function"&&n.init(x),x}function r(h,S){let y=n(this.namespace+(typeof S>"u"?":":S)+h);return y.log=this.log,y}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let S=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let y of S)y[0]==="-"?n.skips.push(y.slice(1)):n.names.push(y)}function i(h,S){let y=0,C=0,v=-1,x=0;for(;y<h.length;)if(C<S.length&&(S[C]===h[y]||S[C]==="*"))S[C]==="*"?(v=C,x=y,C++):(y++,C++);else if(v!==-1)C=v+1,x++,y=x;else return!1;for(;C<S.length&&S[C]==="*";)C++;return C===S.length}function a(){let h=[...n.names,...n.skips.map(S=>"-"+S)].join(",");return n.enable(""),h}function c(h){for(let S of n.skips)if(i(h,S))return!1;for(let S of n.names)if(i(h,S))return!0;return!1}function d(h){return h instanceof Error?h.stack||h.message:h}function g(){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 n.enable(n.load()),n}f0e.exports=$at});var A0e=F((xc,X2)=>{m();xc.formatArgs=qat;xc.save=Yat;xc.load=Kat;xc.useColors=Vat;xc.storage=Jat();xc.destroy=(()=>{let e=!1;return()=>{e||(e=!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`."))}})();xc.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 Vat(){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 e;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&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function qat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+X2.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let n=0,r=0;e[0].replace(/%[a-zA-Z%]/g,o=>{o!=="%%"&&(n++,o==="%c"&&(r=n))}),e.splice(r,0,t)}xc.log=console.debug||console.log||(()=>{});function Yat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function Kat(){let e;try{e=xc.storage.getItem("debug")||xc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Jat(){try{return localStorage}catch{}}X2.exports=X5()(xc);var{formatters:Zat}=X2.exports;Zat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var g0e=F((P7t,m0e)=>{"use strict";m();m0e.exports=(e,t=process.argv)=>{let n=e.startsWith("-")?"":e.length===1?"-":"--",r=t.indexOf(n+e),o=t.indexOf("--");return r!==-1&&(o===-1||r<o)}});var E0e=F((U7t,_0e)=>{"use strict";m();var Wat=Ge("os"),h0e=Ge("tty"),Nd=g0e(),{env:Va}=process,r_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?r_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(r_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?r_=1:Va.FORCE_COLOR==="false"?r_=0:r_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function e9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function t9(e,t){if(r_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&r_===void 0)return 0;let n=r_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Wat.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function Xat(e){let t=t9(e,e&&e.isTTY);return e9(t)}_0e.exports={supportsColor:Xat,stdout:e9(t9(!0,h0e.isatty(1))),stderr:e9(t9(!0,h0e.isatty(2)))}});var y0e=F((qa,tU)=>{m();var est=Ge("tty"),eU=Ge("util");qa.init=sst;qa.log=ost;qa.formatArgs=nst;qa.save=ist;qa.load=ast;qa.useColors=tst;qa.destroy=eU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");qa.colors=[6,2,3,4,5,1];try{let e=E0e();e&&(e.stderr||e).level>=2&&(qa.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{}qa.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function tst(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:est.isatty(process.stderr.fd)}function nst(e){let{namespace:t,useColors:n}=this;if(n){let r=this.color,o="\x1B[3"+(r<8?r:"8;5;"+r),i=` ${o};1m${t} \x1B[0m`;e[0]=i+e[0].split(`
4
4
  `).join(`
5
5
  `+i),e.push(o+"m+"+tU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=rst()+t+" "+e[0]}function rst(){return qa.inspectOpts.hideDate?"":new Date().toISOString()+" "}function ost(...e){return process.stderr.write(eU.formatWithOptions(qa.inspectOpts,...e)+`
6
6
  `)}function ist(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function ast(){return process.env.DEBUG}function sst(e){e.inspectOpts={};let t=Object.keys(qa.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=qa.inspectOpts[t[n]]}tU.exports=X5()(qa);var{formatters:S0e}=tU.exports;S0e.o=function(e){return this.inspectOpts.colors=this.useColors,eU.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${pL(e)}`),!0}return!1}function Ilt(e,t){return t?.length?sL(e).some(n=>f_(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let a=o.substring(0,i).toLowerCase(),c=o.substring(i+1).trim(),d=n.get(a);d&&Array.isArray(d)?d.push(c):d?n.set(a,[d,c]):n.set(a,c)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,xN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),oe=>oe&&this._diag.error("caught ignoreRequestHook error: ",oe),!0))return;let i=(0,t4.hrTime)(),a;try{a=new Rht.URL(t.path,t.origin)}catch(oe){this._diag.warn("could not determine url.full:",oe);return}let c=a.protocol.replace(":",""),d=this.getRequestMethod(t.method),g={[Zi.ATTR_HTTP_REQUEST_METHOD]:d,[Zi.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Zi.ATTR_URL_FULL]:a.toString(),[Zi.ATTR_URL_PATH]:a.pathname,[Zi.ATTR_URL_QUERY]:a.search,[Zi.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},S=a.hostname,y=a.port||h[c];g[Zi.ATTR_SERVER_ADDRESS]=S,y&&!isNaN(Number(y))&&(g[Zi.ATTR_SERVER_PORT]=Number(y));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let oe=Array.isArray(v)?v[v.length-1]:v;g[Zi.ATTR_USER_AGENT_ORIGINAL]=oe}let x=(0,xN.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),oe=>oe&&this._diag.error("caught startSpanHook error: ",oe),!0);x&&Object.entries(x).forEach(([oe,ge])=>{g[oe]=ge});let N=Ml.context.active(),k=Ml.trace.getSpan(N),Q;n.requireParentforSpans&&(!k||!Ml.trace.isSpanContextValid(k.spanContext()))?Q=Ml.trace.wrapSpanContext(Ml.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:Ml.SpanKind.CLIENT,attributes:g},N),(0,xN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),oe=>oe&&this._diag.error("caught requestHook error: ",oe),!0);let j=Ml.trace.setSpan(Ml.context.active(),Q),G={};Ml.propagation.inject(j,G);let q=Object.entries(G);for(let oe=0;oe<q.length;oe++){let[ge,ye]=q[oe];typeof t.addHeader=="function"?t.addHeader(ge,ye):typeof t.headers=="string"?t.headers+=`${ge}: ${ye}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ge,ye)}this._recordFromReq.set(t,{span:Q,attributes:g,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:a,remotePort:c}=n,d={[Zi.ATTR_NETWORK_PEER_ADDRESS]:a,[Zi.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let g=new Set(o.headersToSpanAttributes.requestHeaders.map(S=>S.toLowerCase())),h=this.parseRequestHeaders(t);for(let[S,y]of h.entries())if(g.has(S)){let C=Array.isArray(y)?y:[y];d[`http.request.header.${S}`]=C}}i.setAttributes(d)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,a={[Zi.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,xN.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),d=>d&&this._diag.error("caught responseHook error: ",d),!0),c.headersToSpanAttributes?.responseHeaders){let d=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(g=>d.add(g.toLowerCase()));for(let g=0;g<n.headers.length;g=g+2){let h=n.headers[g].toString().toLowerCase(),S=n.headers[g+1];if(d.has(h)){let y=`http.response.header.${h}`;Object.hasOwn(a,y)?a[y].push(S.toString()):a[y]=[S.toString()]}}}o.setAttributes(a),o.setStatus({code:n.statusCode>=400?Ml.SpanStatusCode.ERROR:Ml.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,a)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:a}=r;o.recordException(n),o.setStatus({code:Ml.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[Zi.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Zi.ATTR_HTTP_RESPONSE_STATUS_CODE,Zi.ATTR_HTTP_REQUEST_METHOD,Zi.ATTR_SERVER_ADDRESS,Zi.ATTR_SERVER_PORT,Zi.ATTR_URL_SCHEME,Zi.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,t4.hrTimeToMilliseconds)((0,t4.hrTimeDuration)(n,(0,t4.hrTime)()))/1e3;this._httpClientDurationHistogram.record(i,r)}getRequestMethod(t){let n={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0,QUERY:!0};return t.toUpperCase()in n?t.toUpperCase():"_OTHER"}};n4.UndiciInstrumentation=PY});var Ixe=F(r4=>{"use strict";m();Object.defineProperty(r4,"__esModule",{value:!0});r4.UndiciInstrumentation=void 0;var xht=Txe();Object.defineProperty(r4,"UndiciInstrumentation",{enumerable:!0,get:function(){return xht.UndiciInstrumentation}})});function Cxe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function Oht(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&xi(t)}function wht(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=Cxe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=Cxe(n.origin,n.path);if(r.startsWith("data:")){let o=Lb(r);return{[kt]:"auto.http.otel.node_fetch","http.url":o,[__]:o,[Pd]:`${n.method||"GET"} ${o}`}}return{[kt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var bxe,vxe,Dht,Bht,Nht,Rxe,xxe=O(()=>{m();bxe=ie(Ixe(),1);dt();mr();vxe="NodeFetch",Dht=st(vxe,bxe.UndiciInstrumentation,e=>wht(e)),Bht=st(`${vxe}.sentry`,iy,e=>e),Nht=(e={})=>({name:"NodeFetch",setupOnce(){Oht(e,gt()?.getOptions())&&Dht(e),Bht(e)}}),Rxe=Nht});var o4=F(DN=>{"use strict";m();Object.defineProperty(DN,"__esModule",{value:!0});DN.ExpressLayerType=void 0;var kht;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(kht=DN.ExpressLayerType||(DN.ExpressLayerType={}))});var i4=F(BN=>{"use strict";m();Object.defineProperty(BN,"__esModule",{value:!0});BN.AttributeNames=void 0;var Pht;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(Pht=BN.AttributeNames||(BN.AttributeNames={}))});var MY=F(mv=>{"use strict";m();Object.defineProperty(mv,"__esModule",{value:!0});mv._LAYERS_STORE_PROPERTY=mv.kLayerPatched=void 0;mv.kLayerPatched=Symbol("express-layer-patched");mv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Nxe=F(Wi=>{"use strict";m();Object.defineProperty(Wi,"__esModule",{value:!0});Wi.getActualMatchedRoute=Wi.getConstructedRoute=Wi.getLayerPath=Wi.asErrorAndMessage=Wi.isLayerIgnored=Wi.getLayerMetadata=Wi.getRouterPath=Wi.storeLayerPath=void 0;var UY=o4(),gv=i4(),dy=MY(),Mht=(e,t)=>(Array.isArray(e[dy._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,dy._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[dy._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Wi.storeLayerPath=Mht;var Uht=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Wi.getRouterPath)(e,n):e};Wi.getRouterPath=Uht;var Lht=(e,t,n)=>{if(t.name==="router"){let r=(0,Wi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[gv.AttributeNames.EXPRESS_NAME]:o,[gv.AttributeNames.EXPRESS_TYPE]:UY.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[gv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[gv.AttributeNames.EXPRESS_TYPE]:UY.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[gv.AttributeNames.EXPRESS_NAME]:t.name,[gv.AttributeNames.EXPRESS_TYPE]:UY.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Wi.getLayerMetadata=Lht;var Qht=(e,t)=>{if(typeof t=="string")return t===e;if(t instanceof RegExp)return t.test(e);if(typeof t=="function")return t(e);throw new TypeError("Pattern is in unsupported datatype")},Fht=(e,t,n)=>{if(Array.isArray(n?.ignoreLayersType)&&n?.ignoreLayersType?.includes(t))return!0;if(Array.isArray(n?.ignoreLayers)===!1)return!1;try{for(let r of n.ignoreLayers)if(Qht(e,r))return!0}catch{}return!1};Wi.isLayerIgnored=Fht;var Ght=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Wi.asErrorAndMessage=Ght;var jht=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>Dxe(n)||"").join(","):Dxe(t)};Wi.getLayerPath=jht;var Dxe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Bxe(e){let n=(Array.isArray(e[dy._LAYERS_STORE_PROPERTY])?e[dy._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Wi.getConstructedRoute=Bxe;function zht(e){let t=Array.isArray(e[dy._LAYERS_STORE_PROPERTY])?e[dy._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Bxe(e);if(n==="*"||n.includes("/")&&(n.includes(",")||n.includes("\\")||n.includes("*")||n.includes("[")))return n;let r=n.startsWith("/")?n:`/${n}`;return r.length>0&&(e.originalUrl===r||e.originalUrl.startsWith(r)||Hht(r))?r:void 0}Wi.getActualMatchedRoute=zht;function Hht(e){return e.includes(":")||e.includes("*")}});var Oxe=F(hv=>{"use strict";m();Object.defineProperty(hv,"__esModule",{value:!0});hv.PACKAGE_NAME=hv.PACKAGE_VERSION=void 0;hv.PACKAGE_VERSION="0.62.0";hv.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var Uxe=F(s4=>{"use strict";m();Object.defineProperty(s4,"__esModule",{value:!0});s4.ExpressInstrumentation=void 0;var wxe=Tr(),Pc=(je(),Me(We)),kxe=o4(),Pxe=i4(),wA=Nxe(),Mxe=Oxe(),_v=on(),$ht=(Zn(),Me(Lr)),a4=MY(),LY=class extends _v.InstrumentationBase{constructor(t={}){super(Mxe.PACKAGE_NAME,Mxe.PACKAGE_VERSION,t)}init(){return[new _v.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,_v.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,_v.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,_v.isWrapped)(t.application.use)&&this._unwrap(t.application,"use"),this._wrap(t.application,"use",this._getAppUsePatch(n)),t},t=>{if(t===void 0)return;let r=typeof t?.Router?.prototype?.route=="function"?t.Router.prototype:t.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(t.application,"use")})]}_getRoutePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,wA.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,wA.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let a=t?this.router:this._router,c=r.apply(this,i);if(a){let d=a.stack[a.stack.length-1];n._applyPatch(d,(0,wA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[a4.kLayerPatched]!==!0&&(t[a4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,wA.storeLayerPath)(a,n),g=(0,wA.getConstructedRoute)(a),h=(0,wA.getActualMatchedRoute)(a),S={[$ht.ATTR_HTTP_ROUTE]:h},y=(0,wA.getLayerMetadata)(g,t,n),C=y.attributes[Pxe.AttributeNames.EXPRESS_TYPE],v=(0,wxe.getRPCMetadata)(Pc.context.active());if(v?.type===wxe.RPCType.HTTP&&(v.route=h),(0,wA.isLayerIgnored)(y.name,C,r.getConfig()))return C===kxe.ExpressLayerType.MIDDLEWARE&&a[a4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Pc.trace.getSpan(Pc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:a,layerType:C,route:g},y.name),N=r.tracer.startSpan(x,{attributes:Object.assign(S,y.attributes)}),k=Pc.context.active(),Q=Pc.trace.setSpan(k,N),{requestHook:j}=r.getConfig();j&&(0,_v.safeExecuteInTheMiddle)(()=>j(N,{request:a,layerType:C,route:g}),ye=>{ye&&Pc.diag.error("express instrumentation: request hook failed",ye)},!0);let G=!1;y.attributes[Pxe.AttributeNames.EXPRESS_TYPE]===kxe.ExpressLayerType.ROUTER&&(N.end(),G=!0,Q=k);let q=()=>{G===!1&&(G=!0,N.end())},oe=Array.from(arguments),ge=oe.findIndex(ye=>typeof ye=="function");ge>=0&&(arguments[ge]=function(){let ye=arguments[0],be=![void 0,null,"route","router"].includes(ye);if(!G&&be){let[pn,xe]=(0,wA.asErrorAndMessage)(ye);N.recordException(pn),N.setStatus({code:Pc.SpanStatusCode.ERROR,message:xe})}G===!1&&(G=!0,a.res?.removeListener("finish",q),N.end()),!(a.route&&be)&&d&&a[a4._LAYERS_STORE_PROPERTY].pop();let Xe=oe[ge],wt=Pc.context.active(),nt=Pc.trace.getSpan(k),Vt=nt?Pc.trace.setSpan(wt,nt):wt;return Pc.context.bind(Vt,Xe).apply(this,arguments)});try{return Pc.context.bind(Q,o).apply(this,arguments)}catch(ye){let[be,Xe]=(0,wA.asErrorAndMessage)(ye);throw N.recordException(be),N.setStatus({code:Pc.SpanStatusCode.ERROR,message:Xe}),ye}finally{G||c.once("finish",q)}};for(let a in o)Object.defineProperty(i,a,{get(){return o[a]},set(c){o[a]=c}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return Pc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};s4.ExpressInstrumentation=LY});var Lxe=F(F_=>{"use strict";m();Object.defineProperty(F_,"__esModule",{value:!0});F_.AttributeNames=F_.ExpressLayerType=F_.ExpressInstrumentation=void 0;var Vht=Uxe();Object.defineProperty(F_,"ExpressInstrumentation",{enumerable:!0,get:function(){return Vht.ExpressInstrumentation}});var qht=o4();Object.defineProperty(F_,"ExpressLayerType",{enumerable:!0,get:function(){return qht.ExpressLayerType}});var Yht=i4();Object.defineProperty(F_,"AttributeNames",{enumerable:!0,get:function(){return Yht.AttributeNames}})});var ya,py=O(()=>{m();ya=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function Kht(e){Qr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function Jht(e,t){if(bn()===kd())return ya&&J.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";bn().setTransactionName(`${r} ${e.route}`)}return t}var Qxe,Fxe,Gxe,Zht,jxe,zxe=O(()=>{m();Qxe=ie(Lxe(),1);dt();mr();py();Fxe="Express";Gxe=st(Fxe,()=>new Qxe.ExpressInstrumentation({requestHook:e=>Kht(e),spanNameHook:(e,t)=>Jht(e,t)})),Zht=()=>({name:Fxe,setupOnce(){Gxe()}}),jxe=Zht});var Hxe=F(NN=>{"use strict";m();Object.defineProperty(NN,"__esModule",{value:!0});NN.SeverityNumber=void 0;var Wht;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(Wht=NN.SeverityNumber||(NN.SeverityNumber={}))});var l4=F(Ev=>{"use strict";m();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.NOOP_LOGGER=Ev.NoopLogger=void 0;var c4=class{emit(t){}};Ev.NoopLogger=c4;Ev.NOOP_LOGGER=new c4});var $xe=F(kA=>{"use strict";m();Object.defineProperty(kA,"__esModule",{value:!0});kA.API_BACKWARDS_COMPATIBILITY_VERSION=kA.makeGetter=kA._global=kA.GLOBAL_LOGS_API_KEY=void 0;kA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");kA._global=globalThis;function Xht(e,t,n){return r=>r===e?t:n}kA.makeGetter=Xht;kA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var QY=F(Sv=>{"use strict";m();Object.defineProperty(Sv,"__esModule",{value:!0});Sv.NOOP_LOGGER_PROVIDER=Sv.NoopLoggerProvider=void 0;var e_t=l4(),d4=class{getLogger(t,n,r){return new e_t.NoopLogger}};Sv.NoopLoggerProvider=d4;Sv.NOOP_LOGGER_PROVIDER=new d4});var Vxe=F(p4=>{"use strict";m();Object.defineProperty(p4,"__esModule",{value:!0});p4.ProxyLogger=void 0;var t_t=l4(),FY=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):t_t.NOOP_LOGGER}};p4.ProxyLogger=FY});var qxe=F(f4=>{"use strict";m();Object.defineProperty(f4,"__esModule",{value:!0});f4.ProxyLoggerProvider=void 0;var n_t=QY(),r_t=Vxe(),GY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new r_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:n_t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};f4.ProxyLoggerProvider=GY});var Kxe=F(A4=>{"use strict";m();Object.defineProperty(A4,"__esModule",{value:!0});A4.LogsAPI=void 0;var Gd=$xe(),o_t=QY(),Yxe=qxe(),jY=class e{constructor(){this._proxyLoggerProvider=new Yxe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Gd._global[Gd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Gd._global[Gd.GLOBAL_LOGS_API_KEY]=(0,Gd.makeGetter)(Gd.API_BACKWARDS_COMPATIBILITY_VERSION,t,o_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Gd._global[Gd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Gd._global,Gd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Gd._global[Gd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Yxe.ProxyLoggerProvider}};A4.LogsAPI=jY});var zY=F(PA=>{"use strict";m();Object.defineProperty(PA,"__esModule",{value:!0});PA.logs=PA.NoopLogger=PA.NOOP_LOGGER=PA.SeverityNumber=void 0;var i_t=Hxe();Object.defineProperty(PA,"SeverityNumber",{enumerable:!0,get:function(){return i_t.SeverityNumber}});var Jxe=l4();Object.defineProperty(PA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Jxe.NOOP_LOGGER}});Object.defineProperty(PA,"NoopLogger",{enumerable:!0,get:function(){return Jxe.NoopLogger}});var a_t=Kxe();PA.logs=a_t.LogsAPI.getInstance()});var Zxe=F(yv=>{"use strict";m();Object.defineProperty(yv,"__esModule",{value:!0});yv.disableInstrumentations=yv.enableInstrumentations=void 0;function s_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}yv.enableInstrumentations=s_t;function u_t(e){e.forEach(t=>t.disable())}yv.disableInstrumentations=u_t});var eDe=F(m4=>{"use strict";m();Object.defineProperty(m4,"__esModule",{value:!0});m4.registerInstrumentations=void 0;var Wxe=(je(),Me(We)),c_t=zY(),Xxe=Zxe();function l_t(e){let t=e.tracerProvider||Wxe.trace.getTracerProvider(),n=e.meterProvider||Wxe.metrics.getMeterProvider(),r=e.loggerProvider||c_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Xxe.enableInstrumentations)(o,t,n,r),()=>{(0,Xxe.disableInstrumentations)(o)}}m4.registerInstrumentations=l_t});var cDe=F(g4=>{"use strict";m();Object.defineProperty(g4,"__esModule",{value:!0});g4.satisfies=void 0;var qY=(je(),Me(We)),iDe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,d_t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,p_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function f_t(e,t,n){if(!A_t(e))return qY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=__t(e);if(!r)return!1;let o=[],i=aDe(r,t,o,n);return i&&!n?.includePrerelease?g_t(r,o):i}g4.satisfies=f_t;function A_t(e){return typeof e=="string"&&iDe.test(e)}function aDe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(HY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Q_t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!HY(e,i,n,r))return!1;return!0}return HY(e,t,n,r)}function HY(e,t,n,r){if(t=h_t(t,r),t.includes(" "))return aDe(e,t,n,r);{let o=E_t(t);return n.push(o),m_t(e,o)}}function m_t(e,t){if(t.invalid)return!1;if(!t.version||VY(t.version))return!0;let n=nDe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=nDe(r,o)}return p_t[t.op]?.includes(n)}function g_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function h_t(e,t){return e=e.trim(),e=U_t(e,t),e=M_t(e),e=L_t(e,t),e=e.trim(),e}function Gu(e){return!e||e.toLowerCase()==="x"||e==="*"}function __t(e){let t=e.match(iDe);if(!t){qY.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function E_t(e){if(!e)return{};let t=e.match(d_t);if(!t)return qY.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function VY(e){return e==="*"||e==="x"||e==="X"}function tDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function S_t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function y_t(e,t){if(VY(e)||VY(t))return 0;let[n,r]=S_t(tDe(e),tDe(t));return n>r?1:n<r?-1:0}function nDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=y_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var sDe="[a-zA-Z0-9-]",uDe="0|[1-9]\\d*",T_t=`\\d*[a-zA-Z-]${sDe}*`,I_t="((?:<|>)?=?)",rDe=`(?:${uDe}|${T_t})`,C_t=`(?:-(${rDe}(?:\\.${rDe})*))`,oDe=`${sDe}+`,b_t=`(?:\\+(${oDe}(?:\\.${oDe})*))`,$Y=`${uDe}|x|X|\\*`,ON=`[v=\\s]*(${$Y})(?:\\.(${$Y})(?:\\.(${$Y})(?:${C_t})?${b_t}?)?)?`,v_t=`^${I_t}\\s*${ON}$`,R_t=new RegExp(v_t),x_t=`^\\s*(${ON})\\s+-\\s+(${ON})\\s*$`,D_t=new RegExp(x_t),B_t="(?:~>?)",N_t=`^${B_t}${ON}$`,O_t=new RegExp(N_t),w_t="(?:\\^)",k_t=`^${w_t}${ON}$`,P_t=new RegExp(k_t);function M_t(e){let t=O_t;return e.replace(t,(n,r,o,i,a)=>{let c;return Gu(r)?c="":Gu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Gu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function U_t(e,t){let n=P_t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Gu(i)?g="":Gu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Gu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function L_t(e,t){let n=R_t;return e.replace(n,(r,o,i,a,c,d)=>{let g=Gu(i),h=g||Gu(a),S=h||Gu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function Q_t(e,t){let n=D_t;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Gu(i)?o="":Gu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Gu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Gu(S)?h="":Gu(y)?h=`<${+S+1}.0.0-0`:Gu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var YY=F(Bs=>{"use strict";m();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.massUnwrap=Bs.unwrap=Bs.massWrap=Bs.wrap=void 0;var ju=console.error.bind(console);function wN(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var F_t=(e,t,n)=>{if(!e||!e[t]){ju("no original function "+String(t)+" to wrap");return}if(!n){ju("no wrapper function"),ju(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ju("original object and wrapper must be functions");return}let o=n(r,t);return wN(o,"__original",r),wN(o,"__unwrap",()=>{e[t]===o&&wN(e,t,r)}),wN(o,"__wrapped",!0),wN(e,t,o),o};Bs.wrap=F_t;var G_t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ju("must provide one or more modules to patch"),ju(new Error().stack);return}if(!(t&&Array.isArray(t))){ju("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Bs.wrap)(r,o,n)})})};Bs.massWrap=G_t;var j_t=(e,t)=>{if(!e||!e[t]){ju("no function to unwrap."),ju(new Error().stack);return}let n=e[t];if(!n.__unwrap)ju("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Bs.unwrap=j_t;var z_t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ju("must provide one or more modules to patch"),ju(new Error().stack);return}if(!(t&&Array.isArray(t))){ju("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Bs.unwrap)(n,r)})})};Bs.massUnwrap=z_t;function kN(e){e&&e.logger&&(typeof e.logger!="function"?ju("new logger isn't a function, not replacing"):ju=e.logger)}Bs.default=kN;kN.wrap=Bs.wrap;kN.massWrap=Bs.massWrap;kN.unwrap=Bs.unwrap;kN.massUnwrap=Bs.massUnwrap});var lDe=F(_4=>{"use strict";m();Object.defineProperty(_4,"__esModule",{value:!0});_4.InstrumentationAbstract=void 0;var KY=(je(),Me(We)),H_t=zY(),h4=YY(),JY=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=KY.diag.createComponentLogger({namespace:t}),this._tracer=KY.trace.getTracer(t,n),this._meter=KY.metrics.getMeter(t,n),this._logger=H_t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=h4.wrap;_unwrap=h4.unwrap;_massWrap=h4.massWrap;_massUnwrap=h4.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};_4.InstrumentationAbstract=JY});var dDe=F(G_=>{"use strict";m();Object.defineProperty(G_,"__esModule",{value:!0});G_.ModuleNameTrie=G_.ModuleNameSeparator=void 0;G_.ModuleNameSeparator="/";var E4=class{hooks=[];children=new Map},ZY=class{_trie=new E4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(G_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new E4,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(G_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};G_.ModuleNameTrie=ZY});var fDe=F(S4=>{"use strict";m();Object.defineProperty(S4,"__esModule",{value:!0});S4.RequireInTheMiddleSingleton=void 0;var $_t=US(),pDe=Ge("path"),WY=dDe(),V_t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),XY=class e{_moduleNameTrie=new WY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new $_t.Hook(null,{internals:!0},(t,n,r)=>{let o=q_t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return V_t?new e:this._instance=this._instance??new e}};S4.RequireInTheMiddleSingleton=XY;function q_t(e){return pDe.sep!==WY.ModuleNameSeparator?e.split(pDe.sep).join(WY.ModuleNameSeparator):e}});var _De=F(PN=>{m();var ADe=[],eK=new WeakMap,mDe=new WeakMap,gDe=new Map,hDe=[],Y_t={set(e,t,n){let r=eK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=mDe.get(e)[t];if(typeof n=="function")return n()},defineProperty(e,t,n){if(!("value"in n))throw new Error("Getters/setters are not supported for exports property descriptors.");let r=eK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function K_t(e,t,n,r,o){gDe.set(e,o),eK.set(t,n),mDe.set(t,r);let i=new Proxy(t,Y_t);ADe.forEach(a=>a(e,i,o)),hDe.push([e,i,o])}PN.register=K_t;PN.importHooks=ADe;PN.specifiers=gDe;PN.toHook=hDe});var oK=F((qmn,Iv)=>{m();var EDe=Ge("path"),J_t=nU(),{fileURLToPath:Z_t}=Ge("url"),{MessageChannel:W_t}=Ge("worker_threads"),{isBuiltin:tK}=Ge("module");tK||(tK=()=>!0);var{importHooks:nK,specifiers:X_t,toHook:eEt}=_De();function SDe(e){nK.push(e),eEt.forEach(([t,n,r])=>e(t,n,r))}function yDe(e){let t=nK.indexOf(e);t>-1&&nK.splice(t,1)}function Tv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var rK;function tEt(){let{port1:e,port2:t}=new W_t,n=0,r;rK=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),d=new Promise(g=>{r=g}).then(()=>{clearInterval(c)});return n===0&&r(),d}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function MN(e,t,n){if(!(this instanceof MN))return new MN(e,t,n);typeof e=="function"?(n=e,e=null,t=null):typeof t=="function"&&(n=t,t=null);let r=t?t.internals===!0:!1;rK&&Array.isArray(e)&&rK(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),g,h;if(d){let S=o.slice(5);tK(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{g=Z_t(o),o=g}catch{}if(Error.stackTraceLimit=S,g){let y=J_t(g);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(g&&S===g)Tv(n,i,g,void 0);else if(S===o){if(!h)Tv(n,i,o,h);else if(h.endsWith(X_t.get(c)))Tv(n,i,o,h);else if(r){let y=o+EDe.sep+EDe.relative(h,g);Tv(n,i,y,h)}}else S===a&&Tv(n,i,a,h);else Tv(n,i,o,h)},SDe(this._iitmHook)}MN.prototype.unhook=function(){yDe(this._iitmHook)};Iv.exports=MN;Iv.exports.Hook=MN;Iv.exports.addHook=SDe;Iv.exports.removeHook=yDe;Iv.exports.createAddHookMessageChannel=tEt});var iK=F(j_=>{"use strict";m();Object.defineProperty(j_,"__esModule",{value:!0});j_.isWrapped=j_.safeExecuteInTheMiddleAsync=j_.safeExecuteInTheMiddle=void 0;function nEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}j_.safeExecuteInTheMiddle=nEt;async function rEt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(await t(r,o),r&&!n)throw r;return o}}j_.safeExecuteInTheMiddleAsync=rEt;function oEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}j_.isWrapped=oEt});var CDe=F(y4=>{"use strict";m();Object.defineProperty(y4,"__esModule",{value:!0});y4.InstrumentationBase=void 0;var UN=Ge("path"),TDe=Ge("util"),iEt=cDe(),aK=YY(),aEt=lDe(),sEt=fDe(),uEt=oK(),LN=(je(),Me(We)),cEt=US(),lEt=Ge("fs"),dEt=iK(),sK=class extends aEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=sEt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,dEt.isWrapped)(t[n])&&this._unwrap(t,n),TDe.types.isProxy(t)){let o=(0,aK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,aK.wrap)(t,n,r)};_unwrap=(t,n)=>TDe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,aK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{LN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){LN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{LN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){LN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,lEt.readFileSync)(UN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{LN.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return IDe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=UN.normalize(r);return a.filter(g=>g.name===c&&IDe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(g,t.moduleVersion)):g),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&UN.isAbsolute(c)){let g=UN.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=UN.isAbsolute(t.name)?new cEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new uEt.Hook([t.name],{internals:!0},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};y4.InstrumentationBase=sK;function IDe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,iEt.satisfies)(t,r,{includePrerelease:n}))}});var bDe=F(T4=>{"use strict";m();Object.defineProperty(T4,"__esModule",{value:!0});T4.normalize=void 0;var pEt=Ge("path");Object.defineProperty(T4,"normalize",{enumerable:!0,get:function(){return pEt.normalize}})});var vDe=F(Cv=>{"use strict";m();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.normalize=Cv.InstrumentationBase=void 0;var fEt=CDe();Object.defineProperty(Cv,"InstrumentationBase",{enumerable:!0,get:function(){return fEt.InstrumentationBase}});var AEt=bDe();Object.defineProperty(Cv,"normalize",{enumerable:!0,get:function(){return AEt.normalize}})});var uK=F(bv=>{"use strict";m();Object.defineProperty(bv,"__esModule",{value:!0});bv.normalize=bv.InstrumentationBase=void 0;var RDe=vDe();Object.defineProperty(bv,"InstrumentationBase",{enumerable:!0,get:function(){return RDe.InstrumentationBase}});Object.defineProperty(bv,"normalize",{enumerable:!0,get:function(){return RDe.normalize}})});var xDe=F(I4=>{"use strict";m();Object.defineProperty(I4,"__esModule",{value:!0});I4.InstrumentationNodeModuleDefinition=void 0;var cK=class{files;name;supportedVersions;patch;unpatch;constructor(t,n,r,o,i){this.files=i||[],this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o}};I4.InstrumentationNodeModuleDefinition=cK});var DDe=F(C4=>{"use strict";m();Object.defineProperty(C4,"__esModule",{value:!0});C4.InstrumentationNodeModuleFile=void 0;var mEt=uK(),lK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,mEt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};C4.InstrumentationNodeModuleFile=lK});var BDe=F(fy=>{"use strict";m();Object.defineProperty(fy,"__esModule",{value:!0});fy.semconvStabilityFromStr=fy.SemconvStability=void 0;var b4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(b4=fy.SemconvStability||(fy.SemconvStability={}));function gEt(e,t){let n=b4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=b4.DUPLICATE;break}else o.toLowerCase()===e&&(n=b4.STABLE);return n}fy.semconvStabilityFromStr=gEt});var ODe=F(Xi=>{"use strict";m();Object.defineProperty(Xi,"__esModule",{value:!0});Xi.semconvStabilityFromStr=Xi.SemconvStability=Xi.safeExecuteInTheMiddleAsync=Xi.safeExecuteInTheMiddle=Xi.isWrapped=Xi.InstrumentationNodeModuleFile=Xi.InstrumentationNodeModuleDefinition=Xi.InstrumentationBase=Xi.registerInstrumentations=void 0;var hEt=eDe();Object.defineProperty(Xi,"registerInstrumentations",{enumerable:!0,get:function(){return hEt.registerInstrumentations}});var _Et=uK();Object.defineProperty(Xi,"InstrumentationBase",{enumerable:!0,get:function(){return _Et.InstrumentationBase}});var EEt=xDe();Object.defineProperty(Xi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return EEt.InstrumentationNodeModuleDefinition}});var SEt=DDe();Object.defineProperty(Xi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return SEt.InstrumentationNodeModuleFile}});var dK=iK();Object.defineProperty(Xi,"isWrapped",{enumerable:!0,get:function(){return dK.isWrapped}});Object.defineProperty(Xi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return dK.safeExecuteInTheMiddle}});Object.defineProperty(Xi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return dK.safeExecuteInTheMiddleAsync}});var NDe=BDe();Object.defineProperty(Xi,"SemconvStability",{enumerable:!0,get:function(){return NDe.SemconvStability}});Object.defineProperty(Xi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return NDe.semconvStabilityFromStr}})});var wDe=F((Agn,yEt)=>{yEt.exports={name:"@fastify/otel",version:"0.18.0",description:"Official Fastify OpenTelemetry Instrumentation",main:"index.js",type:"commonjs",types:"types/index.d.ts",scripts:{lint:"eslint","lint:fix":"eslint --fix",test:"npm run test:all && npm run test:typescript","test:unit":"c8 --100 node --test","test:all":"npm run test:v4 && npm run test:v5","test:v4":"cross-env FASTIFY_VERSION=fastifyv4 npm run test:unit","test:v5":"cross-env FASTIFY_VERSION=fastify npm run test:unit","test:coverage":"c8 node --test && c8 report --reporter=html","test:typescript":"tsd"},repository:{type:"git",url:"git+https://github.com/fastify/otel.git"},keywords:["plugin","helper","fastify","instrumentation","otel","opentelemetry"],author:"Carlos Fuentes - @metcoder95 (https://metcoder.dev)",license:"MIT",bugs:{url:"https://github.com/fastify/otel/issues"},homepage:"https://github.com/fastify/otel#readme",funding:[{type:"github",url:"https://github.com/sponsors/fastify"},{type:"opencollective",url:"https://opencollective.com/fastify"}],devDependencies:{"@fastify/type-provider-typebox":"^6.1.0","@opentelemetry/context-async-hooks":"^2.0.0","@opentelemetry/contrib-test-utils":"^0.59.0","@opentelemetry/instrumentation-http":"^0.212.0","@opentelemetry/propagator-jaeger":"^2.0.0","@opentelemetry/sdk-trace-base":"^2.0.0","@opentelemetry/sdk-trace-node":"^2.2.0","@types/node":"^25.0.3",c8:"^11.0.0","cross-env":"^10.0.0",eslint:"^9.16.0",fastify:"^5.1.0","fastify-plugin":"^5.1.0",fastifyv4:"npm:fastify@^4.0.0",neostandard:"^0.12.0",tsd:"^0.33.0"},dependencies:{"@opentelemetry/core":"^2.0.0","@opentelemetry/instrumentation":"^0.212.0","@opentelemetry/semantic-conventions":"^1.28.0",minimatch:"^10.2.4"},peerDependencies:{"@opentelemetry/api":"^1.9.0"},tsd:{directory:"types"}}});var PDe=F(Ay=>{"use strict";m();Object.defineProperty(Ay,"__esModule",{value:!0});Ay.range=Ay.balanced=void 0;var TEt=(e,t,n)=>{let r=e instanceof RegExp?kDe(e,n):e,o=t instanceof RegExp?kDe(t,n):t,i=r!==null&&o!=null&&(0,Ay.range)(r,o,n);return i&&{start:i[0],end:i[1],pre:n.slice(0,i[0]),body:n.slice(i[0]+r.length,i[1]),post:n.slice(i[1]+o.length)}};Ay.balanced=TEt;var kDe=(e,t)=>{let n=t.match(e);return n?n[0]:null},IEt=(e,t,n)=>{let r,o,i,a,c,d=n.indexOf(e),g=n.indexOf(t,d+1),h=d;if(d>=0&&g>0){if(e===t)return[d,g];for(r=[],i=n.length;h>=0&&!c;){if(h===d)r.push(h),d=n.indexOf(e,h+1);else if(r.length===1){let S=r.pop();S!==void 0&&(c=[S,g])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=g),g=n.indexOf(t,h+1);h=d<g&&d>=0?d:g}r.length&&a!==void 0&&(c=[i,a])}return c};Ay.range=IEt});var jDe=F(vv=>{"use strict";m();Object.defineProperty(vv,"__esModule",{value:!0});vv.EXPANSION_MAX=void 0;vv.expand=MEt;var MDe=PDe(),UDe="\0SLASH"+Math.random()+"\0",LDe="\0OPEN"+Math.random()+"\0",fK="\0CLOSE"+Math.random()+"\0",QDe="\0COMMA"+Math.random()+"\0",FDe="\0PERIOD"+Math.random()+"\0",CEt=new RegExp(UDe,"g"),bEt=new RegExp(LDe,"g"),vEt=new RegExp(fK,"g"),REt=new RegExp(QDe,"g"),xEt=new RegExp(FDe,"g"),DEt=/\\\\/g,BEt=/\\{/g,NEt=/\\}/g,OEt=/\\,/g,wEt=/\\\./g;vv.EXPANSION_MAX=1e5;function pK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function kEt(e){return e.replace(DEt,UDe).replace(BEt,LDe).replace(NEt,fK).replace(OEt,QDe).replace(wEt,FDe)}function PEt(e){return e.replace(CEt,"\\").replace(bEt,"{").replace(vEt,"}").replace(REt,",").replace(xEt,".")}function GDe(e){if(!e)return[""];let t=[],n=(0,MDe.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,a=r.split(",");a[a.length-1]+="{"+o+"}";let c=GDe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function MEt(e,t={}){if(!e)return[];let{max:n=vv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),QN(kEt(e),n,!0).map(PEt)}function UEt(e){return"{"+e+"}"}function LEt(e){return/^-?0\d/.test(e)}function QEt(e,t){return e<=t}function FEt(e,t){return e>=t}function QN(e,t,n){let r=[],o=(0,MDe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?QN(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<a.length&&c<t;c++){let d=i+"{"+o.body+"}"+a[c];r.push(d)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),g=c||d,h=o.body.indexOf(",")>=0;if(!g&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+fK+o.post,QN(e,t,!0)):[e];let S;if(g)S=o.body.split(/\.\./);else if(S=GDe(o.body),S.length===1&&S[0]!==void 0&&(S=QN(S[0],t,!1).map(UEt),S.length===1))return a.map(C=>o.pre+S[0]+C);let y;if(g&&S[0]!==void 0&&S[1]!==void 0){let C=pK(S[0]),v=pK(S[1]),x=Math.max(S[0].length,S[1].length),N=S.length===3&&S[2]!==void 0?Math.abs(pK(S[2])):1,k=QEt;v<C&&(N*=-1,k=FEt);let j=S.some(LEt);y=[];for(let G=C;k(G,v);G+=N){let q;if(d)q=String.fromCharCode(G),q==="\\"&&(q="");else if(q=String(G),j){let oe=x-q.length;if(oe>0){let ge=new Array(oe+1).join("0");G<0?q="-"+ge+q.slice(1):q=ge+q}}y.push(q)}}else{y=[];for(let C=0;C<S.length;C++)y.push.apply(y,QN(S[C],t,!1))}for(let C=0;C<y.length;C++)for(let v=0;v<a.length&&r.length<t;v++){let x=i+y[C]+a[v];(!n||g||x)&&r.push(x)}}return r}});var zDe=F(v4=>{"use strict";m();Object.defineProperty(v4,"__esModule",{value:!0});v4.assertValidPattern=void 0;var GEt=1024*64,jEt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>GEt)throw new TypeError("pattern is too long")};v4.assertValidPattern=jEt});var $De=F(R4=>{"use strict";m();Object.defineProperty(R4,"__esModule",{value:!0});R4.parseClass=void 0;var zEt={"[: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]},FN=e=>e.replace(/[[\]\\-]/g,"\\$&"),HEt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),HDe=e=>e.join(""),$Et=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,a=!1,c=!1,d=!1,g=!1,h=n,S="";e:for(;i<e.length;){let x=e.charAt(i);if((x==="!"||x==="^")&&i===n+1){g=!0,i++;continue}if(x==="]"&&a&&!d){h=i+1;break}if(a=!0,x==="\\"&&!d){d=!0,i++;continue}if(x==="["&&!d){for(let[N,[k,Q,j]]of Object.entries(zEt))if(e.startsWith(N,i)){if(S)return["$.",!1,e.length-n,!0];i+=N.length,j?o.push(k):r.push(k),c=c||Q;continue e}}if(d=!1,S){x>S?r.push(FN(S)+"-"+FN(x)):x===S&&r.push(FN(x)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(FN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=x,i+=2;continue}r.push(FN(x)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!g){let x=r[0].length===2?r[0].slice(-1):r[0];return[HEt(x),!1,h-n,!1]}let y="["+(g?"^":"")+HDe(r)+"]",C="["+(g?"":"^")+HDe(o)+"]";return[r.length&&o.length?"("+y+"|"+C+")":r.length?y:C,c,h-n,!0]};R4.parseClass=$Et});var D4=F(x4=>{"use strict";m();Object.defineProperty(x4,"__esModule",{value:!0});x4.unescape=void 0;var VEt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"):t?e.replace(/\[([^\/\\{}])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\{}])\]/g,"$1$2").replace(/\\([^\/{}])/g,"$1");x4.unescape=VEt});var gK=F(w4=>{"use strict";m();var Mc;Object.defineProperty(w4,"__esModule",{value:!0});w4.AST=void 0;var qEt=$De(),B4=D4(),YEt=new Set(["!","?","+","*","@"]),AK=e=>YEt.has(e),VDe=e=>AK(e.type),KEt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),JEt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),ZEt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),qDe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),WEt="(?!(?:^|/)\\.\\.?(?:$|/))",N4="(?!\\.)",XEt=new Set(["[","."]),e0t=new Set(["..","."]),t0t=new Set("().*{}+?[]^$\\!"),n0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),mK="[^/]",YDe=mK+"*?",KDe=mK+"+?",r0t=0,O4=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++r0t;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,n,r={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,t==="!"&&!this.#n.#u&&this.#c.push(this),this.#s=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#a=this.#e.map(t=>String(t)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#t;for(;r;){for(let o=n.#s+1;!r.type&&o<r.#e.length;o++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[o])}n=r,r=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Mc&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let t=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#s===0)return!0;let t=this.#t;for(let n=0;n<this.#s;n++){let r=t.#e[n];if(!(r instanceof Mc&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Mc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let a=o.maxExtglobRecursion??2,c=!1,d=!1,g=-1,h=!1;if(n.type===null){let x=r,N="";for(;x<t.length;){let k=t.charAt(x++);if(c||k==="\\"){c=!c,N+=k;continue}if(d){x===g+1?(k==="^"||k==="!")&&(h=!0):k==="]"&&!(x===g+2&&h)&&(d=!1),N+=k;continue}else if(k==="["){d=!0,g=x,h=!1,N+=k;continue}if(!o.noext&&AK(k)&&t.charAt(x)==="("&&i<=a){n.push(N),N="";let j=new Mc(k,n);x=Mc.#d(t,j,x,o,i+1),n.push(j);continue}N+=k}return n.push(N),x}let S=r+1,y=new Mc(null,n),C=[],v="";for(;S<t.length;){let x=t.charAt(S++);if(c||x==="\\"){c=!c,v+=x;continue}if(d){S===g+1?(x==="^"||x==="!")&&(h=!0):x==="]"&&!(S===g+2&&h)&&(d=!1),v+=x;continue}else if(x==="["){d=!0,g=S,h=!1,v+=x;continue}if(!o.noext&&AK(x)&&t.charAt(S)==="("&&(i<=a||n&&n.#p(x))){let k=n&&n.#p(x)?0:1;y.push(v),v="";let Q=new Mc(x,y);y.push(Q),S=Mc.#d(t,Q,S,o,i+k);continue}if(x==="|"){y.push(v),v="",C.push(y),y=new Mc(null,n);continue}if(x===")")return v===""&&n.#e.length===0&&(n.#l=!0),y.push(v),v="",n.push(...C,y),S;v+=x}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],S}#_(t){return this.#A(t,JEt)}#A(t,n=KEt){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null)return!1;let r=t.#e[0];return!r||typeof r!="object"||r.type===null?!1:this.#p(r.type,n)}#p(t,n=ZEt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Mc(null,r,this.options);o.#e.push(""),r.push(o),this.#m(t,n)}#m(t,n){let r=t.#e[0];this.#e.splice(n,1,...r.#e);for(let o of r.#e)typeof o=="object"&&(o.#t=this);this.#a=void 0}#S(t){return!!qDe.get(this.type)?.has(t)}#y(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=t.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#S(n.type)}#T(t){let n=qDe.get(this.type),r=t.#e[0],o=n?.get(r.type);if(!o)return!1;this.#e=r.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=o,this.#a=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new Mc(null,void 0,n);return Mc.#d(t,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){let n=t??!!this.#i.dot;if(this.#n===this&&(this.#f(),this.#h()),!VDe(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(C=>typeof C!="string"),g=this.#e.map(C=>{let[v,x,N,k]=typeof C=="string"?Mc.#I(C,this.#r,d):C.toRegExpSource(t);return this.#r=this.#r||N,this.#o=this.#o||k,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&e0t.has(this.#e[0]))){let v=XEt,x=n&&v.has(g.charAt(0))||g.startsWith("\\.")&&v.has(g.charAt(2))||g.startsWith("\\.\\.")&&v.has(g.charAt(4)),N=!n&&!t&&v.has(g.charAt(0));h=x?WEt:N?N4:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+g+S,(0,B4.unescape)(g),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let d=this.toString(),g=this;return g.#e=[d],g.type=null,g.#r=void 0,[d,(0,B4.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!N4?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?N4:"")+KDe;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?N4:"")+YDe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,B4.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(VDe(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#A(o)?(n=!1,this.#m(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#y(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#a=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,a]=n.toRegExpSource(t);return this.#o=this.#o||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",a=!1,c=!1;for(let d=0;d<t.length;d++){let g=t.charAt(d);if(o){o=!1,i+=(t0t.has(g)?"\\":"")+g;continue}if(g==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?KDe:YDe,n=!0;continue}else c=!1;if(g==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(g==="["){let[h,S,y,C]=(0,qEt.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(g==="?"){i+=mK,n=!0;continue}i+=n0t(g)}return[i,(0,B4.unescape)(t),!!n,a]}};w4.AST=O4;Mc=O4});var hK=F(k4=>{"use strict";m();Object.defineProperty(k4,"__esModule",{value:!0});k4.escape=void 0;var o0t=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");k4.escape=o0t});var n1e=F(ft=>{"use strict";m();Object.defineProperty(ft,"__esModule",{value:!0});ft.unescape=ft.escape=ft.AST=ft.Minimatch=ft.match=ft.makeRe=ft.braceExpand=ft.defaults=ft.filter=ft.GLOBSTAR=ft.sep=ft.minimatch=void 0;var i0t=jDe(),P4=zDe(),WDe=gK(),a0t=hK(),s0t=D4(),u0t=(e,t,n={})=>((0,P4.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new my(t,n).match(e));ft.minimatch=u0t;var c0t=/^\*+([^+@!?\*\[\(]*)$/,l0t=e=>t=>!t.startsWith(".")&&t.endsWith(e),d0t=e=>t=>t.endsWith(e),p0t=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),f0t=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),A0t=/^\*+\.\*+$/,m0t=e=>!e.startsWith(".")&&e.includes("."),g0t=e=>e!=="."&&e!==".."&&e.includes("."),h0t=/^\.\*+$/,_0t=e=>e!=="."&&e!==".."&&e.startsWith("."),E0t=/^\*+$/,S0t=e=>e.length!==0&&!e.startsWith("."),y0t=e=>e.length!==0&&e!=="."&&e!=="..",T0t=/^\?+([^+@!?\*\[\(]*)?$/,I0t=([e,t=""])=>{let n=XDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},C0t=([e,t=""])=>{let n=e1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},b0t=([e,t=""])=>{let n=e1e([e]);return t?r=>n(r)&&r.endsWith(t):n},v0t=([e,t=""])=>{let n=XDe([e]);return t?r=>n(r)&&r.endsWith(t):n},XDe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},e1e=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},t1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",JDe={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=t1e==="win32"?JDe.win32.sep:JDe.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var R0t="[^/]",x0t=R0t+"*?",D0t="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",B0t="(?:(?!(?:\\/|^)\\.).)*?",N0t=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=N0t;ft.minimatch.filter=ft.filter;var jd=(e,t={})=>Object.assign({},e,t),O0t=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ft.minimatch;let t=ft.minimatch;return Object.assign((r,o,i={})=>t(r,o,jd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,jd(e,i))}static defaults(o){return t.defaults(jd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,jd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,jd(e,i))}},unescape:(r,o={})=>t.unescape(r,jd(e,o)),escape:(r,o={})=>t.escape(r,jd(e,o)),filter:(r,o={})=>t.filter(r,jd(e,o)),defaults:r=>t.defaults(jd(e,r)),makeRe:(r,o={})=>t.makeRe(r,jd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,jd(e,o)),match:(r,o,i={})=>t.match(r,o,jd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=O0t;ft.minimatch.defaults=ft.defaults;var w0t=(e,t={})=>((0,P4.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,i0t.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=w0t;ft.minimatch.braceExpand=ft.braceExpand;var k0t=(e,t={})=>new my(e,t).makeRe();ft.makeRe=k0t;ft.minimatch.makeRe=ft.makeRe;var P0t=(e,t,n={})=>{let r=new my(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=P0t;ft.minimatch.match=ft.match;var ZDe=/[?*]|[+@!]\(.*?\)|\[|\]/,M0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),my=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,P4.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||t1e,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.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 t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let d=i[0]===""&&i[1]===""&&(i[2]==="?"||!ZDe.test(i[2]))&&!ZDe.test(i[3]),g=/^[a-z]:/i.test(i[0]);if(d)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(g)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(d=>this.parse(d))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let c=r[o+1],d=r[o+2],g=r[o+3];if(c!==".."||!d||d==="."||d===".."||!g||g==="."||g==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let d=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...d),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,a=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(c==="a")return!1;c="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),d=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),g=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!g&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),S=d?3:c?0:void 0,y=h?3:g?0:void 0;if(typeof S=="number"&&typeof y=="number"){let[C,v]=[t[S],n[y]];C.toLowerCase()===v.toLowerCase()&&(n[y]=C,i=y,o=S)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(ft.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let a=n.indexOf(ft.GLOBSTAR,i),c=n.lastIndexOf(ft.GLOBSTAR),[d,g,h]=r?[n.slice(i,a),n.slice(a+1),[]]:[n.slice(i,a),n.slice(a+1,c),n.slice(c+1)];if(d.length){let Q=t.slice(o,o+d.length);if(!this.#o(Q,d,r,0,0))return!1;o+=d.length,i+=d.length}let S=0;if(h.length){if(h.length+o>t.length)return!1;let Q=t.length-h.length;if(this.#o(t,h,r,Q,0))S=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(Q--,!this.#o(t,h,r,Q,0)))return!1;S=h.length+1}}if(!g.length){let Q=!!S;for(let j=o;j<t.length-S;j++){let G=String(t[j]);if(Q=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||Q}let y=[[[],0]],C=y[0],v=0,x=[0];for(let Q of g)Q===ft.GLOBSTAR?(x.push(v),C=[[],0],y.push(C)):(C[0].push(Q),v++);let N=y.length-1,k=t.length-S;for(let Q of y)Q[1]=k-(x[N--]+Q[0].length);return!!this.#r(t,y,o,0,r,0,!!S)}#r(t,n,r,o,i,a,c){let d=n[o];if(!d){for(let S=r;S<t.length;S++){c=!0;let y=t[S];if(y==="."||y===".."||!this.options.dot&&y.startsWith("."))return!1}return c}let[g,h]=d;for(;r<=h;){if(this.#o(t.slice(0,r+g.length),g,i,r,0)&&a<this.maxGlobstarRecursion){let C=this.#r(t,n,r+g.length,o+1,i,a+1,c);if(C!==!1)return C}let y=t[r];if(y==="."||y===".."||!this.options.dot&&y.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let a,c,d,g;for(a=o,c=i,g=t.length,d=n.length;a<g&&c<d;a++,c++){this.debug("matchOne loop");let h=n[c],S=t[a];if(this.debug(n,h,S),h===!1||h===ft.GLOBSTAR)return!1;let y;if(typeof h=="string"?(y=S===h,this.debug("string match",h,S,y)):(y=h.test(S),this.debug("pattern match",h,S,y)),!y)return!1}if(a===g&&c===d)return!0;if(a===g)return r;if(c===d)return a===g-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ft.braceExpand)(this.pattern,this.options)}parse(t){(0,P4.assertValidPattern)(t);let n=this.options;if(t==="**")return ft.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(E0t))?o=n.dot?y0t:S0t:(r=t.match(c0t))?o=(n.nocase?n.dot?f0t:p0t:n.dot?d0t:l0t)(r[1]):(r=t.match(T0t))?o=(n.nocase?n.dot?C0t:I0t:n.dot?b0t:v0t)(r):(r=t.match(A0t))?o=n.dot?g0t:m0t:(r=t.match(h0t))&&(o=_0t);let i=WDe.AST.fromGlob(t,this.options).toMMPattern();return o&&typeof i=="object"&&Reflect.defineProperty(i,"test",{value:o}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let t=this.set;if(!t.length)return this.regexp=!1,this.regexp;let n=this.options,r=n.noglobstar?x0t:n.dot?D0t:B0t,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let g=d.map(S=>{if(S instanceof RegExp)for(let y of S.flags.split(""))o.add(y);return typeof S=="string"?M0t(S):S===ft.GLOBSTAR?ft.GLOBSTAR:S._src});g.forEach((S,y)=>{let C=g[y+1],v=g[y-1];S!==ft.GLOBSTAR||v===ft.GLOBSTAR||(v===void 0?C!==void 0&&C!==ft.GLOBSTAR?g[y+1]="(?:\\/|"+r+"\\/)?"+C:g[y]=r:C===void 0?g[y-1]=v+"(?:\\/|\\/"+r+")?":C!==ft.GLOBSTAR&&(g[y-1]=v+"(?:\\/|\\/"+r+"\\/)"+C,g[y+1]=ft.GLOBSTAR))});let h=g.filter(S=>S!==ft.GLOBSTAR);if(this.partial&&h.length>=1){let S=[];for(let y=1;y<=h.length;y++)S.push(h.slice(0,y).join("/"));return"(?:"+S.join("|")+")"}return h.join("/")}).join("|"),[a,c]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+c+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let c=o.length-2;!a&&c>=0;c--)a=o[c];for(let c=0;c<i.length;c++){let d=i[c],g=o;if(r.matchBase&&d.length===1&&(g=[a]),this.matchOne(g,d,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ft.minimatch.defaults(t).Minimatch}};ft.Minimatch=my;var U0t=gK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return U0t.AST}});var L0t=hK();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return L0t.escape}});var Q0t=D4();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return Q0t.unescape}});ft.minimatch.AST=WDe.AST;ft.minimatch.Minimatch=my;ft.minimatch.escape=a0t.escape;ft.minimatch.unescape=s0t.unescape});var c1e=F((wgn,SK)=>{"use strict";m();var r1e=Ge("node:diagnostics_channel"),{context:M4,trace:_K,SpanStatusCode:U4,propagation:EK,diag:F0t}=(je(),Me(We)),{getRPCMetadata:G0t,RPCType:j0t}=Tr(),{ATTR_HTTP_ROUTE:L4,ATTR_HTTP_RESPONSE_STATUS_CODE:o1e,ATTR_HTTP_REQUEST_METHOD:z0t,ATTR_URL_PATH:H0t}=(Zn(),Me(Lr)),{InstrumentationBase:$0t}=ODe(),{version:V0t,name:i1e}=wDe(),q0t=">=4.0.0 <6",a1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Eo={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},z_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},vg="anonymous",H_=Symbol("fastify otel instance"),$_=Symbol("fastify otel request spans"),GN=Symbol("fastify otel request context"),s1e=Symbol("fastify otel addhook original"),u1e=Symbol("fastify otel setnotfound original"),jN=Symbol("fastify otel ignore path"),zN=Symbol("fastify otel record exceptions"),Q4=class extends $0t{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(i1e,V0t,t),this.logger=F0t.createComponentLogger({namespace:i1e}),this[jN]=null,this[zN]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[zN]=t.recordExceptions}if(typeof t?.requestHook=="function"&&(this._requestHook=t.requestHook),typeof t?.lifecycleHook=="function"&&(this._lifecycleHook=t.lifecycleHook),t?.ignorePaths!=null||process.env.OTEL_FASTIFY_IGNORE_PATHS!=null){let n=t?.ignorePaths??process.env.OTEL_FASTIFY_IGNORE_PATHS;if((typeof n!="string"||n.length===0)&&typeof n!="function")throw new TypeError("ignorePaths must be a string or a function");let r=null;this[jN]=o=>typeof n=="function"?n(o):(r==null&&(r=n1e().minimatch),r(o.url,n))}}enable(){return this._handleInitialization===void 0&&this.getConfig().registerOnInitialization&&(this._handleInitialization=t=>{this.plugin()(t.fastify,void 0,()=>{});let n=(r,o,i)=>{i()};n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",t.fastify.register(n)},r1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(r1e.unsubscribe("fastify.initialization",this._handleInitialization),this._handleInitialization=void 0),super.disable()}init(){return[]}plugin(){let t=this;return n[Symbol.for("skip-override")]=!0,n[Symbol.for("fastify.display-name")]="@fastify/otel",n[Symbol.for("plugin-meta")]={fastify:q0t,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(H_,t),r.decorate(s1e,r.addHook),r.decorate(u1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[GN],v=this[$_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:C,inject:(x,N)=>EK.inject(C,x,N),extract:(x,N)=>EK.extract(C,x,N)}}),r.decorateRequest($_,null),r.decorateRequest(GN,null),r.addHook("onRoute",function(C){if(t[jN]?.(C)===!0){t.logger.debug(`Ignoring route instrumentation ${C.method} ${C.url} because it matches the ignore path`);return}if(C.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${C.method} ${C.url} because it is disabled`);return}for(let v of a1e)if(C[v]!=null){let x=C[v];if(typeof x=="function")C[v]=S(x,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:z_.ROUTE,[L4]:C.url,[Eo.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:vg});else if(Array.isArray(x)){let N=[];for(let k of x)N.push(S(k,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:z_.ROUTE,[L4]:C.url,[Eo.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:vg}));C[v]=N}}C.onSend!=null?C.onSend=Array.isArray(C.onSend)?[...C.onSend,a]:[C.onSend,a]:C.onSend=a,C.onError!=null?C.onError=Array.isArray(C.onError)?[...C.onError,c]:[C.onError,c]:C.onError=c,C.handler=S(C.handler,"handler",{[Eo.HOOK_NAME]:`${this.pluginName} - route-handler`,[Eo.FASTIFY_TYPE]:z_.HANDLER,[L4]:C.url,[Eo.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:vg})}),r.addHook("onRequest",function(C,v,x){if(this[H_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return x();if(this[H_][jN]?.({url:C.url,method:C.method})===!0)return this[H_].logger.debug(`Ignoring request ${C.method} ${C.url} because it matches the ignore path`),x();let N=M4.active();_K.getSpan(N)==null&&(N=EK.extract(N,C.headers));let k=G0t(N);C.routeOptions.url!=null&&k?.type===j0t.HTTP&&(k.route=C.routeOptions.url);let Q={[Eo.ROOT]:"@fastify/otel",[z0t]:C.method,[H0t]:C.url};C.routeOptions.url!=null&&(Q[L4]=C.routeOptions.url);let j=this[H_].tracer.startSpan("request",{attributes:Q},N);try{this[H_]._requestHook?.(j,C)}catch(G){this[H_].logger.error({err:G},"requestHook threw")}C[GN]=_K.setSpan(N,j),C[$_]=j,M4.with(C[GN],()=>{x()})}),r.addHook("onResponse",function(C,v,x){let N=C[$_];N!=null&&(N.setAttributes({[o1e]:v.statusCode}),N.end()),C[$_]=null,x()}),r.addHook=d,r.setNotFoundHandler=g,i();function a(y,C,v,x){let N=y[$_];N!=null&&(C.statusCode>=500&&N.setStatus({code:U4.ERROR}),N.setAttributes({[o1e]:C.statusCode}),N.end()),y[$_]=null,x(null,v)}function c(y,C,v,x){let N=y[$_];N!=null&&(N.setStatus({code:U4.ERROR,message:v.message}),t[zN]!==!1&&N.recordException(v)),x()}function d(y,C){let v=this[s1e];return a1e.includes(y)?v.call(this,y,S(C,y,{[Eo.HOOK_NAME]:`${this.pluginName} - ${y}`,[Eo.FASTIFY_TYPE]:z_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:vg})):v.call(this,y,C)}function g(y,C){let v=this[u1e];typeof y=="function"?(C=S(y,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:z_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:vg}),v.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Eo.FASTIFY_TYPE]:z_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:vg})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Eo.FASTIFY_TYPE]:z_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:vg})),C=S(C,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:z_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:vg}),v.call(this,y,C))}function h(y){for(let C of y)if(C?.routeOptions&&C.url&&C.method)return C;return null}function S(y,C,v={}){return function(...N){let k=this[H_],Q=h(N);if(Q===null)return k.logger.debug(`Ignoring route instrumentation because ${C} was called without a Fastify request argument`),y.call(this,...N);if(k.isEnabled()===!1||Q.routeOptions.config?.otel===!1)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it is disabled`),y.call(this,...N);if(k[jN]?.({url:Q.url,method:Q.method})===!0)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it matches the ignore path`),y.call(this,...N);let j=Q[GN]??M4.active(),G=y.name?.length>0?y.name:this.pluginName??vg,q=k.tracer.startSpan(`${C} - ${G}`,{attributes:v},j);if(k._lifecycleHook!=null)try{k._lifecycleHook(q,{hookName:C,request:Q,handler:G})}catch(oe){k.logger.error({err:oe},"Execution of lifecycleHook failed")}return M4.with(_K.setSpan(j,q),function(){try{let oe=y.call(this,...N);return typeof oe?.then=="function"?oe.then(ge=>(q.end(),ge),ge=>(q.setStatus({code:U4.ERROR,message:ge.message}),k[zN]!==!1&&q.recordException(ge),q.end(),Promise.reject(ge))):(q.end(),oe)}catch(oe){throw q.setStatus({code:U4.ERROR,message:oe.message}),k[zN]!==!1&&q.recordException(oe),q.end(),oe}},this)}}}}};SK.exports=Q4;SK.exports.FastifyOtelInstrumentation=Q4});var Rg,HN,$N,l1e=O(()=>{m();(function(e){let t="fastify.name";e.FASTIFY_NAME=t;let n="fastify.type";e.FASTIFY_TYPE=n;let r="hook.name";e.HOOK_NAME=r;let o="plugin.name";e.PLUGIN_NAME=o})(Rg||(Rg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(HN||(HN={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})($N||($N={}))});var VN,d1e=O(()=>{m();VN=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function yK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[VN]||[];return i.push(o),Object.defineProperty(e,VN,{enumerable:!1,configurable:!0,value:i}),o}function F4(e,t){let n=e[VN]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:ui.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[VN])}function f1e(e,t,n){let r,o;try{o=e(),p1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!p1e(o)&&(t(r,o),r))throw r;return o}}function p1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var A1e=O(()=>{m();je();d1e()});function Z0t(){let e=gt();e&&e.on("spanStart",t=>{g1e(t)})}function g1e(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${n}.fastify`});let r=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof r=="string"){let o=r.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(o)}}var j4,gy,Y0t,K0t,m1e,J0t,G4,h1e=O(()=>{m();je();j4=ie(Tr(),1),gy=ie(on(),1);Zn();dt();l1e();A1e();Y0t="0.1.0",K0t="@sentry/instrumentation-fastify-v3",m1e="anonymous",J0t=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),G4=class extends gy.InstrumentationBase{constructor(t={}){super(K0t,Y0t,t)}init(){return[new gy.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let a=r,c=(0,j4.getRPCMetadata)(Ke.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===j4.RPCType.HTTP&&(c.route=d);let g=r.method||"GET";bn().setTransactionName(`${g} ${d}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||m1e,d=`${$N.MIDDLEWARE} - ${c}`,g=a[1],h=yK(g,i.tracer,d,{[Rg.FASTIFY_TYPE]:HN.MIDDLEWARE,[Rg.PLUGIN_NAME]:t,[Rg.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){F4(g),S.apply(this,y)}),Ke.with(Ht.setSpan(Ke.active(),h),()=>f1e(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:ui.ERROR,message:y.message}),h.recordException(y)),o||F4(g)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],a=o[1],c=this.pluginName;if(!J0t.has(i))return n.apply(this,o);let d=typeof o[o.length-1]=="function"&&a.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(c,i,a,d)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),Z0t(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(r.errorCodes=t.errorCodes),r.fastify=r,r.default=r,r}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let a=i[0];return t.isEnabled()?(0,gy.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),F4(this,c)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let a=r,c=a.routeOptions?.handler||a.context?.handler,d=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,g=`${$N.REQUEST_HANDLER} - ${d||this.pluginName||m1e}`,h={[Rg.PLUGIN_NAME]:this.pluginName,[Rg.FASTIFY_TYPE]:HN.REQUEST_HANDLER,[l5]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Rg.FASTIFY_NAME]=d);let S=yK(o,t.tracer,g,h);g1e(S);let{requestHook:y}=t.getConfig();return y&&(0,gy.safeExecuteInTheMiddle)(()=>y(S,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),Ke.with(Ht.setSpan(Ke.active(),S),()=>{i()})}}}});import*as TK from"node:diagnostics_channel";function W0t(){let e=gt();if(e)return e.getIntegrationByName(z4)}function _1e(e,t,n,r){let o=W0t()?.getShouldHandleError()||I1e;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){ya&&J.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(e,t,n)&&nn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function I1e(e,t,n){let r=n.statusCode;return r>=500||r<=299}function C1e(e){let t=Ot(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",a=o===n?.startsWith("handler -"),c=n==="request"||o==="request-handler";if(r[Xt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${d}.fastify`});let g=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof g=="string"){let h=g.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function eSt(){let e=gt();e&&e.on("spanStart",t=>{C1e(t)})}function tSt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&C1e(i)}let r=t.routeOptions?.url,o=t.method||"GET";bn().setTransactionName(`${o} ${r}`)})}var E1e,z4,S1e,y1e,X0t,T1e,b1e=O(()=>{m();E1e=ie(c1e(),1);dt();mr();py();h1e();z4="Fastify",S1e=st(`${z4}.v3`,()=>new G4);y1e=st(`${z4}.v5`,()=>{let e=new E1e.FastifyOtelInstrumentation,t=e.plugin();return TK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?ya&&J.error("Failed to setup Fastify instrumentation",o):(eSt(),r&&tSt(r))})}),TK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;_1e.call(_1e,r,o,i,"diagnostics-channel")}),e}),X0t=({shouldHandleError:e})=>{let t;return{name:z4,setupOnce(){t=e||I1e,S1e(),y1e()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},T1e=(e={})=>X0t(e)});var IK=F(sf=>{"use strict";m();Object.defineProperty(sf,"__esModule",{value:!0});sf.SpanNames=sf.TokenKind=sf.AllowedOperationTypes=void 0;var nSt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(nSt=sf.AllowedOperationTypes||(sf.AllowedOperationTypes={}));var rSt;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(rSt=sf.TokenKind||(sf.TokenKind={}));var oSt;(function(e){e.EXECUTE="graphql.execute",e.PARSE="graphql.parse",e.RESOLVE="graphql.resolve",e.VALIDATE="graphql.validate",e.SCHEMA_VALIDATE="graphql.validateSchema",e.SCHEMA_PARSE="graphql.parseSchema"})(oSt=sf.SpanNames||(sf.SpanNames={}))});var CK=F(qN=>{"use strict";m();Object.defineProperty(qN,"__esModule",{value:!0});qN.AttributeNames=void 0;var iSt;(function(e){e.SOURCE="graphql.source",e.FIELD_NAME="graphql.field.name",e.FIELD_PATH="graphql.field.path",e.FIELD_TYPE="graphql.field.type",e.PARENT_NAME="graphql.parent.name",e.OPERATION_TYPE="graphql.operation.type",e.OPERATION_NAME="graphql.operation.name",e.VARIABLES="graphql.variables.",e.ERROR_VALIDATION_NAME="graphql.validation.error"})(iSt=qN.AttributeNames||(qN.AttributeNames={}))});var H4=F(Rv=>{"use strict";m();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.OTEL_GRAPHQL_DATA_SYMBOL=Rv.OTEL_PATCHED_SYMBOL=void 0;Rv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Rv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var v1e=F($4=>{"use strict";m();Object.defineProperty($4,"__esModule",{value:!0});$4.OPERATION_NOT_SUPPORTED=void 0;var uhn=H4();$4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var F1e=F(Ta=>{"use strict";m();Object.defineProperty(Ta,"__esModule",{value:!0});Ta.wrapFieldResolver=Ta.wrapFields=Ta.getSourceFromLocation=Ta.getOperation=Ta.endSpan=Ta.addSpanSource=Ta.addInputVariableAttributes=Ta.isPromise=void 0;var xv=(je(),Me(We)),V_=IK(),hy=CK(),xg=H4(),R1e=Object.values(V_.AllowedOperationTypes),aSt=e=>typeof e?.then=="function";Ta.isPromise=aSt;var sSt=e=>typeof e=="object"&&e!==null;function bK(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{bK(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{bK(e,`${t}.${r}`,o)}):e.setAttribute(`${hy.AttributeNames.VARIABLES}${String(t)}`,n)}function uSt(e,t){Object.entries(t).forEach(([n,r])=>{bK(e,n,r)})}Ta.addInputVariableAttributes=uSt;function N1e(e,t,n,r,o){let i=M1e(t,n,r,o);e.setAttribute(hy.AttributeNames.SOURCE,i)}Ta.addSpanSource=N1e;function cSt(e,t,n,r,o){let i=O1e(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?k1e(n):w1e(n,o);return i={span:lSt(e,t,n,r,o,c)},fSt(n,o,i),{field:i,spanAdded:!0}}function lSt(e,t,n,r,o,i){let a={[hy.AttributeNames.FIELD_NAME]:r.fieldName,[hy.AttributeNames.FIELD_PATH]:o.join("."),[hy.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[hy.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${V_.SpanNames.RESOLVE} ${a[hy.AttributeNames.FIELD_PATH]}`,{attributes:a},i?xv.trace.setSpan(xv.context.active(),i):void 0),d=n[xg.OTEL_GRAPHQL_DATA_SYMBOL].source,g=r.fieldNodes.find(h=>h.kind==="Field");return g&&N1e(c,d.loc,t().allowValues,g.loc?.start,g.loc?.end),c}function dSt(e,t){t&&e.recordException(t),e.end()}Ta.endSpan=dSt;function pSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>R1e.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>R1e.indexOf(n?.operation)!==-1)}Ta.getOperation=pSt;function fSt(e,t,n){return e[xg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function O1e(e,t){return e[xg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function w1e(e,t){for(let n=t.length-1;n>0;n--){let r=O1e(e,t.slice(0,n));if(r)return r.span}return k1e(e)}function k1e(e){return e[xg.OTEL_GRAPHQL_DATA_SYMBOL].span}function ASt(e,t){let n=[],r=t;for(;r;){let o=r.key;e&&typeof o=="number"&&(o="*"),n.push(String(o)),r=r.prev}return n.reverse()}function mSt(e){return P1e(`
37
37
  `,e)}function x1e(e){return P1e(" ",e)}function P1e(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var gSt=[V_.TokenKind.FLOAT,V_.TokenKind.STRING,V_.TokenKind.INT,V_.TokenKind.BLOCK_STRING];function M1e(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,a=typeof r=="number"?r:e.end,c=e.startToken.next,d=1;for(;c;){if(c.start<i){c=c.next,d=c?.line;continue}if(c.end>a){c=c.next,d=c?.line;continue}let g=c.value||c.kind,h="";!t&&gSt.indexOf(c.kind)>=0&&(g="*"),c.kind===V_.TokenKind.STRING&&(g=`"${g}"`),c.kind===V_.TokenKind.EOF&&(g=""),c.line>d?(o+=mSt(c.line-d),d=c.line,h=x1e(c.column-1)):c.line===c.prev?.line&&(h=x1e(c.start-(c.prev?.end||0))),o+=h+g,c&&(c=c.next)}}return o}Ta.getSourceFromLocation=M1e;function U1e(e,t,n){if(!e||e[xg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[xg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=Q1e(t,n,i.resolve)),i.type)){let a=L1e(i.type);for(let c of a)U1e(c,t,n)}})}Ta.wrapFields=U1e;function L1e(e){return"ofType"in e?L1e(e.ofType):hSt(e)?e.getTypes():_St(e)?[e]:[]}function hSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function _St(e){return"getFields"in e&&typeof e.getFields=="function"}var D1e=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:xv.SpanStatusCode.ERROR,message:t.message}),e.end())},B1e=(e,t)=>{t&&e.end()};function Q1e(e,t,n,r=!1){if(o[xg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let g=t();if(g.ignoreTrivialResolveSpans&&r&&(sSt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[xg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=ASt(g.mergeItems,d&&d.path),S=h.filter(v=>typeof v=="string").length,y,C=!1;if(g.depth>=0&&g.depth<S)y=w1e(c,h);else{let{field:v,spanAdded:x}=cSt(e,t,c,d,h);y=v.span,C=x}return xv.context.with(xv.trace.setSpan(xv.context.active(),y),()=>{try{let v=n.call(this,i,a,c,d);return(0,Ta.isPromise)(v)?v.then(x=>(B1e(y,C),x),x=>{throw D1e(y,x,C),x}):(B1e(y,C),v)}catch(v){throw D1e(y,v,C),v}})}return o[xg.OTEL_PATCHED_SYMBOL]=!0,o}Ta.wrapFieldResolver=Q1e});var G1e=F(Dv=>{"use strict";m();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.PACKAGE_NAME=Dv.PACKAGE_VERSION=void 0;Dv.PACKAGE_VERSION="0.62.0";Dv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var H1e=F(Y4=>{"use strict";m();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.GraphQLInstrumentation=void 0;var Dg=(je(),Me(We)),zd=on(),YN=IK(),V4=CK(),vK=H4(),ESt=v1e(),ou=F1e(),j1e=G1e(),z1e={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},q4=[">=14.0.0 <17"],RK=class extends zd.InstrumentationBase{constructor(t={}){super(j1e.PACKAGE_NAME,j1e.PACKAGE_VERSION,{...z1e,...t})}setConfig(t={}){super.setConfig({...z1e,...t})}init(){let t=new zd.InstrumentationNodeModuleDefinition("graphql",q4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new zd.InstrumentationNodeModuleFile("graphql/execution/execute.js",q4,t=>((0,zd.isWrapped)(t.execute)&&this._unwrap(t,"execute"),this._wrap(t,"execute",this._patchExecute(t.defaultFieldResolver)),t),t=>{t&&this._unwrap(t,"execute")})}_addPatchingParser(){return new zd.InstrumentationNodeModuleFile("graphql/language/parser.js",q4,t=>((0,zd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new zd.InstrumentationNodeModuleFile("graphql/validation/validate.js",q4,t=>((0,zd.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let a;if(arguments.length>=2){let g=arguments;a=n._wrapExecuteArgs(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],t)}else{let g=arguments[0];a=n._wrapExecuteArgs(g.schema,g.document,g.rootValue,g.contextValue,g.variableValues,g.operationName,g.fieldResolver,g.typeResolver,t)}let c=(0,ou.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[vK.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[vK.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},Dg.context.with(Dg.trace.setSpan(Dg.context.active(),d),()=>(0,zd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(g,h)=>{n._handleExecutionResult(d,g,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,ou.endSpan)(t,n);return}if((0,ou.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,ou.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,ou.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,ou.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,zd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,ou.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,a){return t._parse(this,r,i,a)}}}_patchValidate(){let t=this;return function(r){return function(i,a,c,d,g){return t._validate(this,r,i,a,c,g,d)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan(YN.SpanNames.PARSE);return Dg.context.with(Dg.trace.setSpan(Dg.context.active(),a),()=>(0,zd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,ou.getOperation)(d)?d.loc&&(0,ou.addSpanSource)(a,d.loc,i.allowValues):a.updateName(YN.SpanNames.SCHEMA_PARSE)),(0,ou.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(YN.SpanNames.VALIDATE,{});return Dg.context.with(Dg.trace.setSpan(Dg.context.active(),d),()=>(0,zd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(g,h)=>{o.loc||d.updateName(YN.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:V4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,ou.endSpan)(d,g)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(YN.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(V4.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(V4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=ESt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(V4.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,ou.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,ou.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,g){if(o||(o={}),o[vK.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d};let h=c==null,S=c??g;return c=(0,ou.wrapFieldResolver)(this.tracer,()=>this.getConfig(),S,h),t&&((0,ou.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,ou.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d}}};Y4.GraphQLInstrumentation=RK});var $1e=F(K4=>{"use strict";m();Object.defineProperty(K4,"__esModule",{value:!0});K4.GraphQLInstrumentation=void 0;var SSt=H1e();Object.defineProperty(K4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return SSt.GraphQLInstrumentation}})});function J1e(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function TSt(e){if(Array.isArray(e)){let t=e.slice().sort();return t.length<=5?t.join(", "):`${t.slice(0,5).join(", ")}, +${t.length-5}`}return`${e}`}var V1e,q1e,Y1e,ySt,K1e,Z1e=O(()=>{m();je();V1e=ie($1e(),1);dt();mr();fv();q1e="Graphql",Y1e=st(q1e,V1e.GraphQLInstrumentation,e=>{let t=J1e(e);return{...t,responseHook(n,r){Qr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Ot(n).status&&n.setStatus({code:ui.ERROR});let i=Ot(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=ci(n),h=Ot(d).data[dv]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(dv,h)):typeof h=="string"?d.setAttribute(dv,[h,S]):d.setAttribute(dv,S),Ot(d).data["original-description"]||d.setAttribute("original-description",Ot(d).description),d.updateName(`${Ot(d).data["original-description"]} (${TSt(h)})`)}}}}),ySt=(e={})=>({name:q1e,setupOnce(){Y1e(J1e(e))}}),K1e=ySt});var W1e=F(J4=>{"use strict";m();Object.defineProperty(J4,"__esModule",{value:!0});J4.EVENT_LISTENERS_SET=void 0;J4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var X1e=F(Z4=>{"use strict";m();Object.defineProperty(Z4,"__esModule",{value:!0});Z4.bufferTextMapGetter=void 0;Z4.bufferTextMapGetter={get(e,t){if(!e)return;let n=Object.keys(e);for(let r of n)if(r===t||r.toLowerCase()===t)return e[r]?.toString()},keys(e){return e?Object.keys(e):[]}}});var eBe=F(nr=>{"use strict";m();Object.defineProperty(nr,"__esModule",{value:!0});nr.METRIC_MESSAGING_PROCESS_DURATION=nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=nr.MESSAGING_SYSTEM_VALUE_KAFKA=nr.MESSAGING_OPERATION_TYPE_VALUE_SEND=nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=nr.ATTR_MESSAGING_SYSTEM=nr.ATTR_MESSAGING_OPERATION_TYPE=nr.ATTR_MESSAGING_OPERATION_NAME=nr.ATTR_MESSAGING_KAFKA_OFFSET=nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=nr.ATTR_MESSAGING_DESTINATION_NAME=nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";nr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";nr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";nr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";nr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";nr.ATTR_MESSAGING_SYSTEM="messaging.system";nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";nr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";nr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";nr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var tBe=F(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.PACKAGE_NAME=Bv.PACKAGE_VERSION=void 0;Bv.PACKAGE_VERSION="0.23.0";Bv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var sBe=F(X4=>{"use strict";m();Object.defineProperty(X4,"__esModule",{value:!0});X4.KafkaJsInstrumentation=void 0;var Fr=(je(),Me(We)),Hd=on(),Nv=(Zn(),Me(Lr)),nBe=W1e(),rBe=X1e(),At=eBe(),oBe=tBe();function W4(e,t,n){return r=>{e.add(t,{...n,...r?{[Nv.ATTR_ERROR_TYPE]:r}:{}})}}function iBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[Nv.ATTR_ERROR_TYPE]:r}:{}})}}var aBe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],xK=class extends Hd.InstrumentationBase{constructor(t={}){super(oBe.PACKAGE_NAME,oBe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(At.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:aBe}}),this._sentMessages=this.meter.createCounter(At.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(At.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(At.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:aBe}})}init(){let t=r=>{(0,Hd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Hd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Hd.InstrumentationNodeModuleDefinition("kafkajs",[">=0.3.0 <3"],r=>(t(r),this._wrap(r?.Kafka?.prototype,"producer",this._getProducerPatch()),this._wrap(r?.Kafka?.prototype,"consumer",this._getConsumerPatch()),r),t)}_getConsumerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Hd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[nBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[nBe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[Nv.ATTR_SERVER_ADDRESS]:n,[Nv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Hd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Hd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Hd.isWrapped)(i.transaction)&&t._unwrap(i,"transaction"),t._wrap(i,"transaction",t._getProducerTransactionPatch()),t._setKafkaEventListeners(i),i}}_getConsumerRunPatch(){let t=this;return n=>function(...o){let i=o[0];return i?.eachMessage&&((0,Hd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Hd.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],a=Fr.propagation.extract(Fr.ROOT_CONTEXT,i.message.headers,rBe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:a,attributes:{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),d=[iBe(t._processDuration,Date.now(),{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),W4(t._consumedMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],g=Fr.context.with(Fr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,g)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Fr.ROOT_CONTEXT,attributes:{[At.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>{let c=Date.now(),d=[],g=[W4(n._consumedMessages,i.batch.messages.length,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(S=>{let y=Fr.propagation.extract(Fr.ROOT_CONTEXT,S.headers,rBe.bufferTextMapGetter),C=Fr.trace.getSpan(y)?.spanContext(),v;C&&(v={context:C}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:S,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),g.push(iBe(n._processDuration,c,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return d.unshift(a),n._endSpansOnPromise(d,g,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let d=c.send;c.send=function(...C){return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(x=>{throw i.setStatus({code:Fr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let g=c.sendBatch;c.sendBatch=function(...C){return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),i),()=>t._getSendBatchPatch()(g).apply(this,C).catch(x=>{throw i.setStatus({code:Fr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let h=c.commit;c.commit=function(...C){let v=h.apply(this,C).then(()=>{i.setStatus({code:Fr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let S=c.abort;c.abort=function(...C){let v=S.apply(this,C);return t._endSpansOnPromise([i],[],v)}}).catch(c=>{i.setStatus({code:Fr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),a}}_getSendBatchPatch(){let t=this;return n=>function(...o){let a=o[0].topicMessages||[],c=[],d=[];a.forEach(h=>{h.messages.forEach(S=>{c.push(t._startProducerSpan(h.topic,S)),d.push(W4(t._sentMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...S.partition!==void 0?{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(S.partition)}:{}}))})});let g=n.apply(this,o);return t._endSpansOnPromise(c,d,g)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(g=>t._startProducerSpan(i.topic,g)),c=i.messages.map(g=>W4(t._sentMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...g.partition!==void 0?{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(g.partition)}:{}})),d=n.apply(this,o);return t._endSpansOnPromise(a,c,d)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,a=Nv.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,a=o.constructor.name),n.forEach(c=>c(a)),t.forEach(c=>{c.setAttribute(Nv.ATTR_ERROR_TYPE,a),c.setStatus({code:Fr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:a}){let c=r===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,d=this.tracer.startSpan(`${c} ${t}`,{kind:r===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Fr.SpanKind.CLIENT:Fr.SpanKind.CONSUMER,attributes:{...a,[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_OPERATION_TYPE]:r,[At.ATTR_MESSAGING_OPERATION_NAME]:c,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:g}=this.getConfig();return g&&n&&(0,Hd.safeExecuteInTheMiddle)(()=>g(d,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),d}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:Fr.SpanKind.PRODUCER,attributes:{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_OPERATION_TYPE]:At.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Fr.propagation.inject(Fr.trace.setSpan(Fr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Hd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};X4.KafkaJsInstrumentation=xK});var uBe=F(eF=>{"use strict";m();Object.defineProperty(eF,"__esModule",{value:!0});eF.KafkaJsInstrumentation=void 0;var ISt=sBe();Object.defineProperty(eF,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return ISt.KafkaJsInstrumentation}})});var cBe,lBe,dBe,CSt,pBe,fBe=O(()=>{m();cBe=ie(uBe(),1);mr();lBe="Kafka",dBe=st(lBe,()=>new cBe.KafkaJsInstrumentation({consumerHook(e){Qr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Qr(e,"auto.kafkajs.otel.producer")}})),CSt=()=>({name:lBe,setupOnce(){dBe()}}),pBe=CSt});var ABe=F(Ov=>{"use strict";m();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.PACKAGE_NAME=Ov.PACKAGE_VERSION=void 0;Ov.PACKAGE_VERSION="0.58.0";Ov.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var _Be=F(tF=>{"use strict";m();Object.defineProperty(tF,"__esModule",{value:!0});tF.LruMemoizerInstrumentation=void 0;var mBe=(je(),Me(We)),gBe=on(),hBe=ABe(),DK=class extends gBe.InstrumentationBase{constructor(t={}){super(hBe.PACKAGE_NAME,hBe.PACKAGE_VERSION,t)}init(){return[new gBe.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),a=typeof i=="function"?mBe.context.bind(mBe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};tF.LruMemoizerInstrumentation=DK});var EBe=F(nF=>{"use strict";m();Object.defineProperty(nF,"__esModule",{value:!0});nF.LruMemoizerInstrumentation=void 0;var bSt=_Be();Object.defineProperty(nF,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return bSt.LruMemoizerInstrumentation}})});var SBe,yBe,TBe,vSt,IBe,CBe=O(()=>{m();SBe=ie(EBe(),1);mr();yBe="LruMemoizer",TBe=st(yBe,()=>new SBe.LruMemoizerInstrumentation),vSt=()=>({name:yBe,setupOnce(){TBe()}}),IBe=vSt});var bBe=F(Bo=>{"use strict";m();Object.defineProperty(Bo,"__esModule",{value:!0});Bo.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Bo.DB_SYSTEM_VALUE_MONGODB=Bo.DB_SYSTEM_NAME_VALUE_MONGODB=Bo.ATTR_NET_PEER_PORT=Bo.ATTR_NET_PEER_NAME=Bo.ATTR_DB_SYSTEM=Bo.ATTR_DB_STATEMENT=Bo.ATTR_DB_OPERATION=Bo.ATTR_DB_NAME=Bo.ATTR_DB_MONGODB_COLLECTION=Bo.ATTR_DB_CONNECTION_STRING=void 0;Bo.ATTR_DB_CONNECTION_STRING="db.connection_string";Bo.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Bo.ATTR_DB_NAME="db.name";Bo.ATTR_DB_OPERATION="db.operation";Bo.ATTR_DB_STATEMENT="db.statement";Bo.ATTR_DB_SYSTEM="db.system";Bo.ATTR_NET_PEER_NAME="net.peer.name";Bo.ATTR_NET_PEER_PORT="net.peer.port";Bo.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Bo.DB_SYSTEM_VALUE_MONGODB="mongodb";Bo.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var vBe=F(KN=>{"use strict";m();Object.defineProperty(KN,"__esModule",{value:!0});KN.MongodbCommandType=void 0;var RSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(RSt=KN.MongodbCommandType||(KN.MongodbCommandType={}))});var RBe=F(wv=>{"use strict";m();Object.defineProperty(wv,"__esModule",{value:!0});wv.PACKAGE_NAME=wv.PACKAGE_VERSION=void 0;wv.PACKAGE_VERSION="0.67.0";wv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var BBe=F(rF=>{"use strict";m();Object.defineProperty(rF,"__esModule",{value:!0});rF.MongoDBInstrumentation=void 0;var Yo=(je(),Me(We)),rr=on(),Bg=(Zn(),Me(Lr)),Ul=bBe(),_y=vBe(),xBe=RBe(),DBe={requireParentSpan:!0},BK=class e extends rr.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xBe.PACKAGE_NAME,xBe.PACKAGE_VERSION,{...DBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,rr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,rr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...DBe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Ul.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:d,v4UnpatchConnectionPool:g}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:S}=this._getV4SessionsPatches();return[new rr.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new rr.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,g),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new rr.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,S)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,rr.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,rr.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,rr.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,rr.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,rr.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,rr.isWrapped)(t.getMore)&&this._unwrap(t,"getMore"),this._wrap(t,"getMore",this._getV3PatchCursor()),t),v3UnpatchConnection:t=>{t!==void 0&&(this._unwrap(t,"insert"),this._unwrap(t,"remove"),this._unwrap(t,"update"),this._unwrap(t,"command"),this._unwrap(t,"query"),this._unwrap(t,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:t=>((0,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,rr.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,rr.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),a=this.sessions.length;return o===a?t._connCountAdd(1,t._poolName,"used"):o-1===a&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,rr.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),t},v4UnpatchConnectionPool:t=>{t!==void 0&&this._unwrap(t.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:t=>((0,rr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=Yo.context.bind(Yo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,d){if(c||!d){i(c,d);return}t.setPoolName(o),i(c,d)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,rr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,rr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,d,g){let h=Yo.trace.getSpan(Yo.context.active()),S=n._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;if(S||typeof y!="function"||typeof c!="object")return typeof d=="function"?r.call(this,i,a,c,d):r.call(this,i,a,c,d,g);let C=n._getV3SpanAttributes(a,i,c[0],t),v=n._spanNameFromAttrs(C),x=n.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=n._patchEnd(x,y);return typeof d=="function"?r.call(this,i,a,c,N):r.call(this,i,a,c,d,N)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,a,c,d){let g=Yo.trace.getSpan(Yo.context.active()),h=t._checkSkipInstrumentation(g),S=typeof c=="function"?c:d;if(h||typeof S!="function"||typeof a!="object")return typeof c=="function"?n.call(this,o,i,a,c):n.call(this,o,i,a,c,d);let y=e._getCommandType(a),C=y===_y.MongodbCommandType.UNKNOWN?void 0:y,v=t._getV3SpanAttributes(i,o,a,C),x=t._spanNameFromAttrs(v),N=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v}),k=t._patchEnd(N,S);return typeof c=="function"?n.call(this,o,i,a,k):n.call(this,o,i,a,c,k)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let d=Yo.trace.getSpan(Yo.context.active()),g=t._checkSkipInstrumentation(d),h=c,S=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,a,c);let y;if(!g){let v=t._getV4SpanAttributes(this,o,i,S),x=t._spanNameFromAttrs(v);y=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v})}let C=t._patchEnd(y,h,this.id,S);return n.call(this,o,i,a,C)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,a]=o,c=Yo.trace.getSpan(Yo.context.active()),d=t._checkSkipInstrumentation(c),g=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let S;if(!d){let v=t._getV4SpanAttributes(this,i,a,g),x=t._spanNameFromAttrs(v);S=t.tracer.startSpan(x,{kind:Yo.SpanKind.CLIENT,attributes:v})}let y=t._patchEnd(S,h,this.id,g),C=n.apply(this,o);return C.then(v=>y(null,v),v=>y(v)),C}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,d,g){let h=Yo.trace.getSpan(Yo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;if(S||typeof y!="function"||typeof a!="object")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,g);let C=t._getV3SpanAttributes(i,o,a,"find"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(x,y);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,a,c,d,g){let h=Yo.trace.getSpan(Yo.context.active()),S=t._checkSkipInstrumentation(h),y=typeof d=="function"?d:g;if(S||typeof y!="function")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,g);let C=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),v=t._spanNameFromAttrs(C),x=t.tracer.startSpan(v,{kind:Yo.SpanKind.CLIENT,attributes:C}),N=t._patchEnd(x,y);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}static _getCommandType(t){return t.createIndexes!==void 0?_y.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?_y.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?_y.MongodbCommandType.IS_MASTER:t.count!==void 0?_y.MongodbCommandType.COUNT:t.aggregate!==void 0?_y.MongodbCommandType.AGGREGATE:_y.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let d=typeof t.address=="string"?t.address.split(":"):"";d.length===2&&(i=d[0],a=d[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let S=h.split(":");i=S[0],a=S[1]}}let[c,d]=t.toString().split("."),g=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,g,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_SYSTEM]=Ul.DB_SYSTEM_VALUE_MONGODB,c[Ul.ATTR_DB_NAME]=t,c[Ul.ATTR_DB_MONGODB_COLLECTION]=n,c[Ul.ATTR_DB_OPERATION]=a,c[Ul.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[Bg.ATTR_DB_SYSTEM_NAME]=Ul.DB_SYSTEM_NAME_VALUE_MONGODB,c[Bg.ATTR_DB_NAMESPACE]=t,c[Bg.ATTR_DB_OPERATION_NAME]=a,c[Bg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[Bg.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[Bg.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),g=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,rr.safeExecuteInTheMiddle)(()=>{let h=g(i);this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[Bg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return c}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&rr.SemconvStability.STABLE?n=[t[Bg.ATTR_DB_OPERATION_NAME],t[Bg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Ul.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Ul.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,r)=>typeof r!="object"||!r?"?":t.has(r)?"[Circular]":(t.add(r),r)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:r}=this.getConfig();typeof r=="function"&&(0,rr.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Yo.context.active(),a=this,c=!1;return function(...g){if(!c){c=!0;let h=g[0];if(t){if(h instanceof Error)t.setStatus({code:Yo.SpanStatusCode.ERROR,message:h.message});else{let S=g[1];a._handleExecutionResult(t,S)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return Yo.context.with(i,()=>n.apply(this,g))}}setPoolName(t){let n=t.hostAddress?.host,r=t.hostAddress?.port,o=t.dbName,i=`mongodb://${n}:${r}/${o}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};rF.MongoDBInstrumentation=BK});var NBe=F(JN=>{"use strict";m();Object.defineProperty(JN,"__esModule",{value:!0});JN.MongodbCommandType=void 0;var xSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(xSt=JN.MongodbCommandType||(JN.MongodbCommandType={}))});var OBe=F(kv=>{"use strict";m();Object.defineProperty(kv,"__esModule",{value:!0});kv.MongodbCommandType=kv.MongoDBInstrumentation=void 0;var DSt=BBe();Object.defineProperty(kv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return DSt.MongoDBInstrumentation}});var BSt=NBe();Object.defineProperty(kv,"MongodbCommandType",{enumerable:!0,get:function(){return BSt.MongodbCommandType}})});function NSt(e){let t=NK(e);return JSON.stringify(t)}function NK(e){if(Array.isArray(e))return e.map(t=>NK(t));if(OSt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,NK(r)]).reduce((n,r)=>(kSt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function OSt(e){return typeof e=="object"&&e!==null&&!wSt(e)}function wSt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function kSt(e){return Array.isArray(e)}var wBe,kBe,PBe,PSt,MBe,UBe=O(()=>{m();wBe=ie(OBe(),1);mr();kBe="Mongo",PBe=st(kBe,()=>new wBe.MongoDBInstrumentation({dbStatementSerializer:NSt,responseHook(e){Qr(e,"auto.db.otel.mongo")}}));PSt=()=>({name:kBe,setupOnce(){PBe()}}),MBe=PSt});var OK=F(ea=>{"use strict";m();Object.defineProperty(ea,"__esModule",{value:!0});ea.DB_SYSTEM_NAME_VALUE_MONGODB=ea.ATTR_NET_PEER_PORT=ea.ATTR_NET_PEER_NAME=ea.ATTR_DB_USER=ea.ATTR_DB_SYSTEM=ea.ATTR_DB_STATEMENT=ea.ATTR_DB_OPERATION=ea.ATTR_DB_NAME=ea.ATTR_DB_MONGODB_COLLECTION=void 0;ea.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";ea.ATTR_DB_NAME="db.name";ea.ATTR_DB_OPERATION="db.operation";ea.ATTR_DB_STATEMENT="db.statement";ea.ATTR_DB_SYSTEM="db.system";ea.ATTR_DB_USER="db.user";ea.ATTR_NET_PEER_NAME="net.peer.name";ea.ATTR_NET_PEER_PORT="net.peer.port";ea.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var FBe=F(q_=>{"use strict";m();Object.defineProperty(q_,"__esModule",{value:!0});q_.handleCallbackResponse=q_.handlePromiseResponse=q_.getAttributesFromCollection=void 0;var LBe=(je(),Me(We)),WN=on(),ZN=OK(),oF=(Zn(),Me(Lr));function MSt(e,t,n){let r={};return t&WN.SemconvStability.OLD&&(r[ZN.ATTR_DB_MONGODB_COLLECTION]=e.name,r[ZN.ATTR_DB_NAME]=e.conn.name,r[ZN.ATTR_DB_USER]=e.conn.user),t&WN.SemconvStability.STABLE&&(r[oF.ATTR_DB_COLLECTION_NAME]=e.name,r[oF.ATTR_DB_NAMESPACE]=e.conn.name),n&WN.SemconvStability.OLD&&(r[ZN.ATTR_NET_PEER_NAME]=e.conn.host,r[ZN.ATTR_NET_PEER_PORT]=e.conn.port),n&WN.SemconvStability.STABLE&&(r[oF.ATTR_SERVER_ADDRESS]=e.conn.host,r[oF.ATTR_SERVER_PORT]=e.conn.port),r}q_.getAttributesFromCollection=MSt;function QBe(e,t={}){e.recordException(t),e.setStatus({code:LBe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function wK(e,t,n,r=void 0){n&&(0,WN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function USt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(wK(t,o,n,r),o)).catch(o=>{throw QBe(t,o),o}).finally(()=>t.end()):(wK(t,e,n,r),t.end(),e)}q_.handlePromiseResponse=USt;function LSt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,g)=>(d?QBe(r,d):wK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}q_.handleCallbackResponse=LSt});var GBe=F(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.PACKAGE_NAME=Pv.PACKAGE_VERSION=void 0;Pv.PACKAGE_VERSION="0.60.0";Pv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VBe=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ia=(je(),Me(We)),QSt=Tr(),kK=FBe(),Ns=on(),jBe=GBe(),Y_=OK(),Ey=(Zn(),Me(Lr)),iF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],FSt=["remove","count","findOneAndRemove",...iF],GSt=["count","findOneAndRemove",...iF],jSt=[...iF];function zBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?FSt:e.startsWith("7.")?GSt:jSt:iF}function HBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $Be(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Uc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Uc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var PK=class extends Ns.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jBe.PACKAGE_NAME,jBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ns.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ns.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ns.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$Be(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),zBe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=zBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._unwrap(r.Model.prototype,"remove"),$Be(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[Y_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[Ey.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Uc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[Y_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[Ey.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let g={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&Ns.SemconvStability.OLD&&(g[Y_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[Ey.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,g);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);let g=d,h=a,S=c;typeof a=="function"?(g=a,h=void 0,S=void 0):typeof c=="function"&&(g=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&Ns.SemconvStability.OLD&&(y[Y_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[Ey.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,g,n);return x&&typeof x=="object"&&(x[Uc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let g={};switch(t){case"insertMany":g.documents=a;break;case"bulkWrite":g.operations=a;break;default:g.document=a;break}c!==void 0&&(g.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,g);r._dbSemconvStability&Ns.SemconvStability.OLD&&(h[Y_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[Ey.ATTR_DB_QUERY_TEXT]=C)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ia.trace.getSpan(Ia.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Uc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Uc._STORED_PARENT_SPAN]=Ia.trace.getSpan(Ia.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,kK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[Y_.ATTR_DB_OPERATION]=r,a[Y_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[Ey.ATTR_DB_OPERATION_NAME]=r,a[Ey.ATTR_DB_SYSTEM_NAME]=Y_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ia.SpanKind.CLIENT,attributes:a},i?Ia.trace.setSpan(Ia.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,kK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,kK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ia.context.with((0,QSt.suppressTracing)(Ia.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var qBe=F(aF=>{"use strict";m();Object.defineProperty(aF,"__esModule",{value:!0});aF.MongooseInstrumentation=void 0;var zSt=VBe();Object.defineProperty(aF,"MongooseInstrumentation",{enumerable:!0,get:function(){return zSt.MongooseInstrumentation}})});var YBe,KBe,JBe,HSt,ZBe,WBe=O(()=>{m();YBe=ie(qBe(),1);mr();KBe="Mongoose",JBe=st(KBe,()=>new YBe.MongooseInstrumentation({responseHook(e){Qr(e,"auto.db.otel.mongoose")}})),HSt=()=>({name:KBe,setupOnce(){JBe()}}),ZBe=HSt});var XBe=F(ta=>{"use strict";m();Object.defineProperty(ta,"__esModule",{value:!0});ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ta.DB_SYSTEM_VALUE_MYSQL=ta.ATTR_NET_PEER_PORT=ta.ATTR_NET_PEER_NAME=ta.ATTR_DB_USER=ta.ATTR_DB_SYSTEM=ta.ATTR_DB_STATEMENT=ta.ATTR_DB_NAME=ta.ATTR_DB_CONNECTION_STRING=void 0;ta.ATTR_DB_CONNECTION_STRING="db.connection_string";ta.ATTR_DB_NAME="db.name";ta.ATTR_DB_STATEMENT="db.statement";ta.ATTR_DB_SYSTEM="db.system";ta.ATTR_DB_USER="db.user";ta.ATTR_NET_PEER_NAME="net.peer.name";ta.ATTR_NET_PEER_PORT="net.peer.port";ta.DB_SYSTEM_VALUE_MYSQL="mysql";ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var eNe=F(XN=>{"use strict";m();Object.defineProperty(XN,"__esModule",{value:!0});XN.AttributeNames=void 0;var $St;(function(e){e.MYSQL_VALUES="db.mysql.values"})($St=XN.AttributeNames||(XN.AttributeNames={}))});var tNe=F(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.getPoolNameOld=iu.arrayStringifyHelper=iu.getSpanName=iu.getDbValues=iu.getDbQueryText=iu.getJDBCString=iu.getConfig=void 0;function VSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}iu.getConfig=VSt;function qSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=qSt;function YSt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=YSt;function KSt(e,t){return MK(typeof e=="string"?t:t||e.values)}iu.getDbValues=KSt;function JSt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}iu.getSpanName=JSt;function MK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=MK;function ZSt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}iu.getPoolNameOld=ZSt});var nNe=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.60.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oNe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MySQLInstrumentation=void 0;var Lc=(je(),Me(We)),$d=on(),Uv=(Zn(),Me(Lr)),Ng=XBe(),WSt=eNe(),Sy=tNe(),rNe=nNe(),UK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,$d.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,$d.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Ng.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new $d.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,$d.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,$d.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,$d.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,g=(0,Sy.getPoolNameOld)(t);r._connCountAdd(-d,g,"used"),r._connCountAdd(-c,g,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),g=c[d].pool;r._setPoolCallbacks(g,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Lc.context.active();return function(o,i){i&&((0,$d.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Lc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:g,database:h,user:S}=(0,Sy.getConfig)(t.config),y=parseInt(g,10),C=(0,Sy.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[Ng.ATTR_DB_SYSTEM]=Ng.DB_SYSTEM_VALUE_MYSQL,c[Ng.ATTR_DB_CONNECTION_STRING]=(0,Sy.getJDBCString)(d,g,h),c[Ng.ATTR_DB_NAME]=h,c[Ng.ATTR_DB_USER]=S,c[Ng.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Uv.ATTR_DB_SYSTEM_NAME]=Uv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Uv.ATTR_DB_NAMESPACE]=h,c[Uv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[Ng.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Ng.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Uv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Uv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,Sy.getSpanName)(o),{kind:Lc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(WSt.AttributeNames.MYSQL_VALUES,(0,Sy.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),N=Lc.context.active();if(x===-1){let k=Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments));return Lc.context.bind(N,k),k.on("error",Q=>v.setStatus({code:Lc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Lc.SpanStatusCode.ERROR,message:o.message}),t.end(),Lc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,Sy.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};sF.MySQLInstrumentation=UK});var iNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var XSt=oNe();Object.defineProperty(uF,"MySQLInstrumentation",{enumerable:!0,get:function(){return XSt.MySQLInstrumentation}})});var aNe,sNe,uNe,eyt,cNe,lNe=O(()=>{m();aNe=ie(iNe(),1);mr();sNe="Mysql",uNe=st(sNe,()=>new aNe.MySQLInstrumentation({})),eyt=()=>({name:sNe,setupOnce(){uNe()}}),cNe=eyt});var LK=F(ts=>{"use strict";m();Object.defineProperty(ts,"__esModule",{value:!0});ts.DB_SYSTEM_VALUE_MYSQL=ts.ATTR_NET_PEER_PORT=ts.ATTR_NET_PEER_NAME=ts.ATTR_DB_USER=ts.ATTR_DB_SYSTEM=ts.ATTR_DB_STATEMENT=ts.ATTR_DB_NAME=ts.ATTR_DB_CONNECTION_STRING=void 0;ts.ATTR_DB_CONNECTION_STRING="db.connection_string";ts.ATTR_DB_NAME="db.name";ts.ATTR_DB_STATEMENT="db.statement";ts.ATTR_DB_SYSTEM="db.system";ts.ATTR_DB_USER="db.user";ts.ATTR_NET_PEER_NAME="net.peer.name";ts.ATTR_NET_PEER_PORT="net.peer.port";ts.DB_SYSTEM_VALUE_MYSQL="mysql"});var FK=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.addSqlCommenterComment=void 0;var QK=(je(),Me(We)),tyt=Tr();function nyt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function ryt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function oyt(e,t){if(typeof t!="string"||t.length===0||nyt(t))return t;let n=new tyt.W3CTraceContextPropagator,r={};n.inject(QK.trace.setSpan(QK.ROOT_CONTEXT,e),r,QK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=ryt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}cF.addSqlCommenterComment=oyt});var dNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var eO=LK(),lF=on(),GK=(Zn(),Me(Lr));function iyt(e,t,n){let{host:r,port:o,database:i,user:a}=ayt(e),c={};t&lF.SemconvStability.OLD&&(c[eO.ATTR_DB_CONNECTION_STRING]=syt(r,o,i),c[eO.ATTR_DB_NAME]=i,c[eO.ATTR_DB_USER]=a),t&lF.SemconvStability.STABLE&&(c[GK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&lF.SemconvStability.OLD&&(c[eO.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[eO.ATTR_NET_PEER_PORT]=d)),n&lF.SemconvStability.STABLE&&(c[GK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[GK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=iyt;function ayt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function syt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function uyt(e,t,n,r=!1,o=cyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,lyt(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Vd.getQueryText=uyt;function cyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function lyt(e){return"values"in e}function dyt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Vd.getSpanName=dyt;var pyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=pyt;function fyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=fyt});var pNe=F(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.60.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gNe=F(dF=>{"use strict";m();Object.defineProperty(dF,"__esModule",{value:!0});dF.MySQL2Instrumentation=void 0;var fNe=(je(),Me(We)),uf=on(),jK=LK(),ANe=FK(),Qv=dNe(),mNe=pNe(),zK=(Zn(),Me(Lr)),HK=[">=1.4.2 <4"],$K=class extends uf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mNe.PACKAGE_NAME,mNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,uf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,uf.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,uf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,uf.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new uf.InstrumentationNodeModuleDefinition("mysql2",HK,i=>(n(i),i),()=>{},[new uf.InstrumentationNodeModuleFile("mysql2/promise.js",HK,i=>(n(i),i),()=>{}),new uf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",HK,i=>{let a=(0,Qv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Qv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:g,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,Qv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Qv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&uf.SemconvStability.OLD&&(y[jK.ATTR_DB_SYSTEM]=jK.DB_SYSTEM_VALUE_MYSQL,y[jK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&uf.SemconvStability.STABLE&&(y[zK.ATTR_DB_SYSTEM_NAME]=zK.DB_SYSTEM_NAME_VALUE_MYSQL,y[zK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,Qv.getSpanName)(i),{kind:fNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ANe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ANe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Qv.once)((N,k)=>{N?v.setStatus({code:fNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,uf.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let N=r.apply(this,arguments);return N.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};dF.MySQL2Instrumentation=$K});var hNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var Ayt=gNe();Object.defineProperty(pF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return Ayt.MySQL2Instrumentation}})});var _Ne,ENe,SNe,myt,yNe,TNe=O(()=>{m();_Ne=ie(hNe(),1);mr();ENe="Mysql2",SNe=st(ENe,()=>new _Ne.MySQL2Instrumentation({responseHook(e){Qr(e,"auto.db.otel.mysql2")}})),myt=()=>({name:ENe,setupOnce(){SNe()}}),yNe=myt});var INe=F(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var CNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.endSpan=void 0;var gyt=(je(),Me(We)),hyt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:gyt.SpanStatusCode.ERROR,message:t.message})),e.end()};fF.endSpan=hyt});var mF=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.defaultDbStatementSerializer=void 0;var _yt=[{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}],Eyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=_yt.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};AF.defaultDbStatementSerializer=Eyt});var bNe=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.PACKAGE_NAME=Fv.PACKAGE_VERSION=void 0;Fv.PACKAGE_VERSION="0.62.0";Fv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var DNe=F(gF=>{"use strict";m();Object.defineProperty(gF,"__esModule",{value:!0});gF.IORedisInstrumentation=void 0;var K_=(je(),Me(We)),Qc=on(),J_=(Zn(),Me(Lr)),Fc=INe(),vNe=on(),tO=CNe(),Syt=mF(),RNe=bNe(),xNe={requireParentSpan:!0},VK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,{...xNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xNe,...t})}init(){return[new Qc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Qc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Qc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||Syt.defaultDbStatementSerializer,c=K_.trace.getSpan(K_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:g,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,d[Fc.ATTR_DB_STATEMENT]=S,d[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&Qc.SemconvStability.STABLE&&(d[J_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[J_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_NET_PEER_NAME]=g,d[Fc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Qc.SemconvStability.STABLE&&(d[J_.ATTR_SERVER_ADDRESS]=g,d[J_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:K_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,vNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&K_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,vNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&K_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,tO.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,tO.endSpan)(y,k),N(k)},v}catch(v){throw(0,tO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=K_.trace.getSpan(K_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,o[Fc.ATTR_DB_STATEMENT]="connect",o[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Qc.SemconvStability.STABLE&&(o[J_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[J_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_NET_PEER_NAME]=i,o[Fc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Qc.SemconvStability.STABLE&&(o[J_.ATTR_SERVER_ADDRESS]=i,o[J_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:K_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,tO.endSpan)(c,null),d}catch(d){throw(0,tO.endSpan)(c,d),d}}}};gF.IORedisInstrumentation=VK});var BNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var yyt=DNe();Object.defineProperty(hF,"IORedisInstrumentation",{enumerable:!0,get:function(){return yyt.IORedisInstrumentation}})});var _F=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.PACKAGE_NAME=Gv.PACKAGE_VERSION=void 0;Gv.PACKAGE_VERSION="0.62.0";Gv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var NNe=F(Z_=>{"use strict";m();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.getTracedCreateStreamTrace=Z_.getTracedCreateClient=Z_.endSpan=void 0;var nO=(je(),Me(We)),Tyt=(e,t)=>{t&&e.setStatus({code:nO.SpanStatusCode.ERROR,message:t.message}),e.end()};Z_.endSpan=Tyt;var Iyt=e=>function(){let n=e.apply(this,arguments);return nO.context.bind(nO.context.active(),n)};Z_.getTracedCreateClient=Iyt;var Cyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){nO.context.bind(nO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};Z_.getTracedCreateStreamTrace=Cyt});var EF=F(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var wNe=F(yF=>{"use strict";m();Object.defineProperty(yF,"__esModule",{value:!0});yF.RedisInstrumentationV2_V3=void 0;var Ll=on(),SF=NNe(),ONe=_F(),rO=(je(),Me(We)),oO=(Zn(),Me(Lr)),yy=EF(),byt=mF(),qK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(ONe.PACKAGE_NAME,ONe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ll.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ll.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,Ll.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ll.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=rO.trace.getSpan(rO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||byt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[yy.ATTR_DB_SYSTEM]:yy.DB_SYSTEM_VALUE_REDIS,[yy.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[oO.ATTR_DB_SYSTEM_NAME]:yy.DB_SYSTEM_NAME_VALUE_REDIS,[oO.ATTR_DB_OPERATION_NAME]:i.command,[oO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:rO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[yy.ATTR_NET_PEER_NAME]:this.connection_options.host,[yy.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[oO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[oO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(yy.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=rO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ll.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,SF.endSpan)(h,v),rO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,SF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,SF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,SF.getTracedCreateStreamTrace)(n)}}};yF.RedisInstrumentationV2_V3=qK});var PNe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.getClientAttributes=void 0;var YK=(Zn(),Me(Lr)),jv=EF(),kNe=on();function vyt(e,t,n){let r={};return n&kNe.SemconvStability.OLD&&Object.assign(r,{[jv.ATTR_DB_SYSTEM]:jv.DB_SYSTEM_VALUE_REDIS,[jv.ATTR_NET_PEER_NAME]:t?.socket?.host,[jv.ATTR_NET_PEER_PORT]:t?.socket?.port,[jv.ATTR_DB_CONNECTION_STRING]:Ryt(e,t?.url)}),n&kNe.SemconvStability.STABLE&&Object.assign(r,{[YK.ATTR_DB_SYSTEM_NAME]:jv.DB_SYSTEM_NAME_VALUE_REDIS,[YK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[YK.ATTR_SERVER_PORT]:t?.socket?.port}),r}TF.getClientAttributes=vyt;function Ryt(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var QNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.RedisInstrumentationV4_V5=void 0;var qd=(je(),Me(We)),So=on(),MNe=PNe(),xyt=mF(),UNe=_F(),KK=(Zn(),Me(Lr)),Dyt=EF(),iO=Symbol("opentelemetry.instrumentation.redis.open_spans"),LNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),JK=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,g){let h=t(d,g).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[iO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[iO];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let g=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,g,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[LNe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,MNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:qd.SpanKind.CLIENT,attributes:a});return qd.context.with(qd.trace.setSpan(qd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:qd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(qd.trace.getSpan(qd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[LNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||xyt.defaultDbStatementSerializer,h=(0,MNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[KK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Dyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[KK.ATTR_DB_QUERY_TEXT]=C))}catch(C){this._diag.error("dbStatementSerializer throw an exception",C,{commandName:c})}let S=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:qd.SpanKind.CLIENT,attributes:h}),y=qd.context.with(qd.trace.setSpan(qd.context.active(),S),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(C=>{this._endSpanWithResponse(S,c,d,C,void 0)},C=>{this._endSpanWithResponse(S,c,d,null,C)});else{let C=y;C[iO]=C[iO]||[],C[iO].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(KK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],g,S,y)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:qd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};IF.RedisInstrumentationV4_V5=JK});var jNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentation=void 0;var Byt=on(),FNe=_F(),Nyt=wNe(),Oyt=QNe(),GNe={requireParentSpan:!1},ZK=class extends Byt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...GNe,...t};super(FNe.PACKAGE_NAME,FNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Nyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Oyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...GNe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};CF.RedisInstrumentation=ZK});var zNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var wyt=jNe();Object.defineProperty(bF,"RedisInstrumentation",{enumerable:!0,get:function(){return wyt.RedisInstrumentation}})});function aO(e,t){return e.includes(t.toLowerCase())}function XK(e){return aO(WK,e)?"cache.get":aO(Pyt,e)?"cache.put":void 0}function Myt(e,t){return t.some(n=>e.startsWith(n))}function $Ne(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?HNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return aO(kyt,e)&&r!=null?n(r):HNe(t.map(o=>n(o)))}catch{return}}function VNe(e,t,n){if(!XK(e))return!1;for(let r of t)if(Myt(r,n))return!0;return!1}function qNe(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function HNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var kyt,WK,Pyt,YNe=O(()=>{m();kyt=["get","set","setex"],WK=["get","mget"],Pyt=["set","setex"]});var KNe,JNe,vF,sO,ZNe,Uyt,Lyt,WNe,Qyt,XNe,eOe=O(()=>{m();KNe=ie(BNe(),1),JNe=ie(zNe(),1);dt();mr();YNe();vF="Redis",sO={},ZNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=$Ne(t,n),i=XK(t);if(!o||!i||!sO.cachePrefixes||!VNe(t,o,sO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qNe(r);d&&e.setAttribute(rV,d),aO(WK,t)&&d!==void 0&&e.setAttribute(tV,d>0),e.setAttributes({[Xt]:i,[nV]:o});let g=o.join(", ");e.updateName(sO.maxCacheKeyLength?p_(g,sO.maxCacheKeyLength):g)},Uyt=st(`${vF}.IORedis`,()=>new KNe.IORedisInstrumentation({responseHook:ZNe})),Lyt=st(`${vF}.Redis`,()=>new JNe.RedisInstrumentation({responseHook:ZNe})),WNe=Object.assign(()=>{Uyt(),Lyt()},{id:vF}),Qyt=(e={})=>({name:vF,setupOnce(){sO=e,WNe()}}),XNe=Qyt});var tOe=F(RF=>{"use strict";m();Object.defineProperty(RF,"__esModule",{value:!0});RF.EVENT_LISTENERS_SET=void 0;RF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var eJ=F(uO=>{"use strict";m();Object.defineProperty(uO,"__esModule",{value:!0});uO.AttributeNames=void 0;var Fyt;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(Fyt=uO.AttributeNames||(uO.AttributeNames={}))});var tJ=F(xr=>{"use strict";m();Object.defineProperty(xr,"__esModule",{value:!0});xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=xr.METRIC_DB_CLIENT_CONNECTION_COUNT=xr.DB_SYSTEM_VALUE_POSTGRESQL=xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=xr.ATTR_NET_PEER_PORT=xr.ATTR_NET_PEER_NAME=xr.ATTR_DB_USER=xr.ATTR_DB_SYSTEM=xr.ATTR_DB_STATEMENT=xr.ATTR_DB_NAME=xr.ATTR_DB_CONNECTION_STRING=xr.ATTR_DB_CLIENT_CONNECTION_STATE=xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";xr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";xr.ATTR_DB_CONNECTION_STRING="db.connection_string";xr.ATTR_DB_NAME="db.name";xr.ATTR_DB_STATEMENT="db.statement";xr.ATTR_DB_SYSTEM="db.system";xr.ATTR_DB_USER="db.user";xr.ATTR_NET_PEER_NAME="net.peer.name";xr.ATTR_NET_PEER_PORT="net.peer.port";xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";xr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";xr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var nJ=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SpanNames=void 0;var Gyt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Gyt=cO.SpanNames||(cO.SpanNames={}))});var uOe=F(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var W_=(je(),Me(We)),xF=eJ(),Yd=(Zn(),Me(Lr)),pi=tJ(),Ty=on(),nOe=nJ();function rOe(e,t){if(!t)return nOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:oOe(t.text);return`${nOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=rOe;function oOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}or.parseNormalizedOperationName=oOe;function iOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=iOe;function rJ(e){if("connectionString"in e&&e.connectionString)return iOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=rJ;function DF(e){if(Number.isInteger(e))return e}function aOe(e,t){let n={};return t&Ty.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:rJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:DF(e.port)}),t&Ty.SemconvStability.STABLE&&(n={...n,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:e.host,[Yd.ATTR_SERVER_PORT]:DF(e.port)}),n}or.getSemanticAttributesFromConnection=aOe;function jyt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[xF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[xF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Ty.SemconvStability.OLD&&(r={...r,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[pi.ATTR_DB_CONNECTION_STRING]:rJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||DF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Ty.SemconvStability.STABLE&&(r={...r,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Yd.ATTR_SERVER_PORT]:Number(n?.port)||DF(e.port)}),r}or.getSemanticAttributesFromPoolConnection=jyt;function zyt(e){return e.requireParentSpan===!0&&W_.trace.getSpan(W_.context.active())===void 0}or.shouldSkipInstrumentation=zyt;function Hyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=rOe(i,r),c=e.startSpan(a,{kind:W_.SpanKind.CLIENT,attributes:aOe(o,n)});if(!r)return c;if(r.text&&(n&Ty.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Ty.SemconvStability.STABLE&&c.setAttribute(Yd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(g=>g==null?"null":g instanceof Buffer?g.toString():typeof g=="object"?typeof g.toPostgres=="function"?g.toPostgres():JSON.stringify(g):g.toString());c.setAttribute(xF.AttributeNames.PG_VALUES,d)}catch(d){W_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(xF.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=Hyt;function sOe(e,t,n){typeof e.responseHook=="function"&&(0,Ty.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&W_.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=sOe;function $yt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Yd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(BF(a)),t.setStatus({code:W_.SpanStatusCode.ERROR,message:a.message})):sOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=$yt;function Vyt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}or.getPoolName=Vyt;function qyt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=qyt;function Yyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(BF(r)),e.setStatus({code:W_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=Yyt;function Kyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(BF(r)),e.setStatus({code:W_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=Kyt;function Jyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=Jyt;function Zyt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=Zyt;function BF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=BF});var cOe=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.66.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var mOe=F(OF=>{"use strict";m();Object.defineProperty(OF,"__esModule",{value:!0});OF.PgInstrumentation=void 0;var zu=on(),Gr=(je(),Me(We)),lOe=tOe(),Ko=uOe(),dOe=FK(),pOe=cOe(),fOe=nJ(),NF=Tr(),cf=(Zn(),Me(Lr)),lO=tJ();function Hv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var oJ=class extends zu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,t),this._semconvStability=(0,zu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(cf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Gr.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(lO.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(lO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new zu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new zu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new zu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Hv(c);return this._patchPgClient(d.Client),c},c=>{let d=Hv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new zu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Hv(c);return(0,zu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Hv(c);(0,zu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Hv(t);return(0,zu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,zu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=Hv(t);return(0,zu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,zu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}recordOperationDuration(t,n){let r={},o=[cf.ATTR_DB_NAMESPACE,cf.ATTR_ERROR_TYPE,cf.ATTR_SERVER_PORT,cf.ATTR_SERVER_ADDRESS,cf.ATTR_DB_OPERATION_NAME];this._semconvStability&zu.SemconvStability.OLD&&o.push(lO.ATTR_DB_SYSTEM),this._semconvStability&zu.SemconvStability.STABLE&&o.push(cf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,NF.hrTimeToMilliseconds)((0,NF.hrTimeDuration)(n,(0,NF.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Ko.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,NF.hrTime)(),a=o[0],c=typeof a=="string",d=Ko.isObjectWithTextString(a),g=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[lO.ATTR_DB_SYSTEM]:lO.DB_SYSTEM_VALUE_POSTGRESQL,[cf.ATTR_DB_NAMESPACE]:this.database,[cf.ATTR_SERVER_PORT]:this.connectionParameters.port,[cf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[cf.ATTR_DB_OPERATION_NAME]=Ko.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Ko.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,dOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,dOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Gr.trace.getSpan(Gr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Ko.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Gr.context.bind(Gr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Ko.patchCallback(t.getConfig(),C,g.callback,h,S);N&&(k=Gr.context.bind(Gr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,zu.safeExecuteInTheMiddle)(()=>{let{database:N,host:k,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:k,port:Q,user:j},query:{text:g.text,values:g.values,name:g.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let x;try{x=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(k=>{Ko.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),k(N)})).catch(N=>new Promise((k,Q)=>{N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[lOe.EVENT_LISTENERS_SET])return;let n=Ko.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[lOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.POOL_CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}};OF.PgInstrumentation=oJ;function AOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Gr.context.bind(Gr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Gr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var gOe=F($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.AttributeNames=$v.PgInstrumentation=void 0;var Wyt=mOe();Object.defineProperty($v,"PgInstrumentation",{enumerable:!0,get:function(){return Wyt.PgInstrumentation}});var Xyt=eJ();Object.defineProperty($v,"AttributeNames",{enumerable:!0,get:function(){return Xyt.AttributeNames}})});var hOe,_Oe,EOe,eTt,SOe,yOe=O(()=>{m();hOe=ie(gOe(),1);mr();_Oe="Postgres",EOe=st(_Oe,hOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),eTt=e=>({name:_Oe,setupOnce(){EOe(e)}}),SOe=eTt});var X_,aJ,TOe,tTt,nTt,IOe,iJ,rTt,COe,bOe=O(()=>{m();je();X_=ie(on(),1);Zn();dt();mr();py();aJ="PostgresJs",TOe=[">=3.0.0 <4"],tTt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,nTt=Symbol.for("sentry.query.from.instrumented.sql"),IOe=st(aJ,e=>new iJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),iJ=class extends X_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new X_.InstrumentationNodeModuleDefinition("postgres",TOe,n=>{try{return this._patchPostgres(n)}catch(r){return ya&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new X_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,TOe,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return ya&&J.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return ya&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return iq(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(iN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ht.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(ZC,r);return}let o=n?.match(tTt);o?.[1]&&t.setAttribute(ZC,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[nTt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Za({name:a||"postgresjs.query",op:"db"},c=>{Qr(c,"auto.db.postgresjs"),c.setAttributes({[NS]:"postgres",[h5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,X_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),ya&&J.error(`Error in requestHook for ${aJ} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){ya&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(y,C,v)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,C,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(_5,v?.[0]?.code||"unknown"),c.setAttribute(E5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){ya&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(y,C,v)}});try{return r.apply(this,o)}catch(y){throw c.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),c.end(),y}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},rTt=e=>({name:aJ,setupOnce(){IOe(e)}}),COe=rTt});var vOe=F(dO=>{"use strict";m();Object.defineProperty(dO,"__esModule",{value:!0});dO.SeverityNumber=void 0;var oTt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(oTt=dO.SeverityNumber||(dO.SeverityNumber={}))});var kF=F(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.NOOP_LOGGER=Vv.NoopLogger=void 0;var wF=class{emit(t){}};Vv.NoopLogger=wF;Vv.NOOP_LOGGER=new wF});var MF=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.NOOP_LOGGER_PROVIDER=qv.NoopLoggerProvider=void 0;var iTt=kF(),PF=class{getLogger(t,n,r){return new iTt.NoopLogger}};qv.NoopLoggerProvider=PF;qv.NOOP_LOGGER_PROVIDER=new PF});var uJ=F(UF=>{"use strict";m();Object.defineProperty(UF,"__esModule",{value:!0});UF.ProxyLogger=void 0;var aTt=kF(),sJ=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):aTt.NOOP_LOGGER}};UF.ProxyLogger=sJ});var lJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLoggerProvider=void 0;var sTt=MF(),uTt=uJ(),cJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new uTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:sTt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};LF.ProxyLoggerProvider=cJ});var ROe=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF._globalThis=void 0;QF._globalThis=typeof globalThis=="object"?globalThis:global});var xOe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;var cTt=ROe();Object.defineProperty(FF,"_globalThis",{enumerable:!0,get:function(){return cTt._globalThis}})});var DOe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var lTt=xOe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return lTt._globalThis}})});var BOe=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.API_BACKWARDS_COMPATIBILITY_VERSION=MA.makeGetter=MA._global=MA.GLOBAL_LOGS_API_KEY=void 0;var dTt=DOe();MA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");MA._global=dTt._globalThis;function pTt(e,t,n){return r=>r===e?t:n}MA.makeGetter=pTt;MA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var OOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF.LogsAPI=void 0;var Kd=BOe(),fTt=MF(),NOe=lJ(),dJ=class e{constructor(){this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Kd._global[Kd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Kd._global[Kd.GLOBAL_LOGS_API_KEY]=(0,Kd.makeGetter)(Kd.API_BACKWARDS_COMPATIBILITY_VERSION,t,fTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Kd._global[Kd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Kd._global,Kd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Kd._global[Kd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}};jF.LogsAPI=dJ});var pJ=F(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.logs=ns.ProxyLoggerProvider=ns.ProxyLogger=ns.NoopLoggerProvider=ns.NOOP_LOGGER_PROVIDER=ns.NoopLogger=ns.NOOP_LOGGER=ns.SeverityNumber=void 0;var ATt=vOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return ATt.SeverityNumber}});var wOe=kF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return wOe.NoopLogger}});var kOe=MF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return kOe.NoopLoggerProvider}});var mTt=uJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return mTt.ProxyLogger}});var gTt=lJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return gTt.ProxyLoggerProvider}});var hTt=OOe();ns.logs=hTt.LogsAPI.getInstance()});var POe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.disableInstrumentations=Yv.enableInstrumentations=void 0;function _Tt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Yv.enableInstrumentations=_Tt;function ETt(e){e.forEach(t=>t.disable())}Yv.disableInstrumentations=ETt});var LOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var MOe=(je(),Me(We)),STt=pJ(),UOe=POe();function yTt(e){let t=e.tracerProvider||MOe.trace.getTracerProvider(),n=e.meterProvider||MOe.metrics.getMeterProvider(),r=e.loggerProvider||STt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,UOe.enableInstrumentations)(o,t,n,r),()=>{(0,UOe.disableInstrumentations)(o)}}zF.registerInstrumentations=yTt});var qOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.satisfies=void 0;var gJ=(je(),Me(We)),zOe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,TTt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,ITt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function CTt(e,t,n){if(!bTt(e))return gJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=DTt(e);if(!r)return!1;let o=[],i=HOe(r,t,o,n);return i&&!n?.includePrerelease?RTt(r,o):i}HF.satisfies=CTt;function bTt(e){return typeof e=="string"&&zOe.test(e)}function HOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(fJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=JTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!fJ(e,i,n,r))return!1;return!0}return fJ(e,t,n,r)}function fJ(e,t,n,r){if(t=xTt(t,r),t.includes(" "))return HOe(e,t,n,r);{let o=BTt(t);return n.push(o),vTt(e,o)}}function vTt(e,t){if(t.invalid)return!1;if(!t.version||mJ(t.version))return!0;let n=FOe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=FOe(r,o)}return ITt[t.op]?.includes(n)}function RTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function xTt(e,t){return e=e.trim(),e=YTt(e,t),e=qTt(e),e=KTt(e,t),e=e.trim(),e}function Hu(e){return!e||e.toLowerCase()==="x"||e==="*"}function DTt(e){let t=e.match(zOe);if(!t){gJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function BTt(e){if(!e)return{};let t=e.match(TTt);if(!t)return gJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function mJ(e){return e==="*"||e==="x"||e==="X"}function QOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function NTt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function OTt(e,t){if(mJ(e)||mJ(t))return 0;let[n,r]=NTt(QOe(e),QOe(t));return n>r?1:n<r?-1:0}function FOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=OTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $Oe="[a-zA-Z0-9-]",VOe="0|[1-9]\\d*",wTt=`\\d*[a-zA-Z-]${$Oe}*`,kTt="((?:<|>)?=?)",GOe=`(?:${VOe}|${wTt})`,PTt=`(?:-(${GOe}(?:\\.${GOe})*))`,jOe=`${$Oe}+`,MTt=`(?:\\+(${jOe}(?:\\.${jOe})*))`,AJ=`${VOe}|x|X|\\*`,pO=`[v=\\s]*(${AJ})(?:\\.(${AJ})(?:\\.(${AJ})(?:${PTt})?${MTt}?)?)?`,UTt=`^${kTt}\\s*${pO}$`,LTt=new RegExp(UTt),QTt=`^\\s*(${pO})\\s+-\\s+(${pO})\\s*$`,FTt=new RegExp(QTt),GTt="(?:~>?)",jTt=`^${GTt}${pO}$`,zTt=new RegExp(jTt),HTt="(?:\\^)",$Tt=`^${HTt}${pO}$`,VTt=new RegExp($Tt);function qTt(e){let t=zTt;return e.replace(t,(n,r,o,i,a)=>{let c;return Hu(r)?c="":Hu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Hu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function YTt(e,t){let n=VTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Hu(i)?g="":Hu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Hu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function KTt(e,t){let n=LTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=Hu(i),h=g||Hu(a),S=h||Hu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function JTt(e,t){let n=FTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Hu(i)?o="":Hu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Hu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Hu(S)?h="":Hu(y)?h=`<${+S+1}.0.0-0`:Hu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var hJ=F(Os=>{"use strict";m();Object.defineProperty(Os,"__esModule",{value:!0});Os.massUnwrap=Os.unwrap=Os.massWrap=Os.wrap=void 0;var $u=console.error.bind(console);function fO(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var ZTt=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return fO(o,"__original",r),fO(o,"__unwrap",()=>{e[t]===o&&fO(e,t,r)}),fO(o,"__wrapped",!0),fO(e,t,o),o};Os.wrap=ZTt;var WTt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Os.wrap)(r,o,n)})})};Os.massWrap=WTt;var XTt=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Os.unwrap=XTt;var eIt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Os.unwrap)(n,r)})})};Os.massUnwrap=eIt;function AO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=AO;AO.wrap=Os.wrap;AO.massWrap=Os.massWrap;AO.unwrap=Os.unwrap;AO.massUnwrap=Os.massUnwrap});var YOe=F(VF=>{"use strict";m();Object.defineProperty(VF,"__esModule",{value:!0});VF.InstrumentationAbstract=void 0;var _J=(je(),Me(We)),tIt=pJ(),$F=hJ(),EJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=_J.diag.createComponentLogger({namespace:t}),this._tracer=_J.trace.getTracer(t,n),this._meter=_J.metrics.getMeter(t,n),this._logger=tIt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=$F.wrap;_unwrap=$F.unwrap;_massWrap=$F.massWrap;_massUnwrap=$F.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};VF.InstrumentationAbstract=EJ});var KOe=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.ModuleNameTrie=eE.ModuleNameSeparator=void 0;eE.ModuleNameSeparator="/";var qF=class{hooks=[];children=new Map},SJ=class{_trie=new qF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(eE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new qF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(eE.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};eE.ModuleNameTrie=SJ});var ZOe=F(YF=>{"use strict";m();Object.defineProperty(YF,"__esModule",{value:!0});YF.RequireInTheMiddleSingleton=void 0;var nIt=US(),JOe=Ge("path"),yJ=KOe(),rIt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),TJ=class e{_moduleNameTrie=new yJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new nIt.Hook(null,{internals:!0},(t,n,r)=>{let o=oIt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return rIt?new e:this._instance=this._instance??new e}};YF.RequireInTheMiddleSingleton=TJ;function oIt(e){return JOe.sep!==yJ.ModuleNameSeparator?e.split(JOe.sep).join(yJ.ModuleNameSeparator):e}});var IJ=F(tE=>{"use strict";m();Object.defineProperty(tE,"__esModule",{value:!0});tE.isWrapped=tE.safeExecuteInTheMiddleAsync=tE.safeExecuteInTheMiddle=void 0;function iIt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}tE.safeExecuteInTheMiddle=iIt;async function aIt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}tE.safeExecuteInTheMiddleAsync=aIt;function sIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}tE.isWrapped=sIt});var ewe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.InstrumentationBase=void 0;var mO=Ge("path"),WOe=Ge("util"),uIt=qOe(),CJ=hJ(),cIt=YOe(),lIt=ZOe(),dIt=oK(),gO=(je(),Me(We)),pIt=US(),fIt=Ge("fs"),AIt=IJ(),bJ=class extends cIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=lIt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,AIt.isWrapped)(t[n])&&this._unwrap(t,n),WOe.types.isProxy(t)){let o=(0,CJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,CJ.wrap)(t,n,r)};_unwrap=(t,n)=>WOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,CJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{gO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{gO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,fIt.readFileSync)(mO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{gO.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return XOe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=mO.normalize(r);return a.filter(g=>g.name===c).filter(g=>XOe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(g,t.moduleVersion)):g),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&mO.isAbsolute(c)){let g=mO.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=mO.isAbsolute(t.name)?new pIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new dIt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};KF.InstrumentationBase=bJ;function XOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,uIt.satisfies)(t,r,{includePrerelease:n}))}});var twe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.normalize=void 0;var mIt=Ge("path");Object.defineProperty(JF,"normalize",{enumerable:!0,get:function(){return mIt.normalize}})});var nwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.normalize=Kv.InstrumentationBase=void 0;var gIt=ewe();Object.defineProperty(Kv,"InstrumentationBase",{enumerable:!0,get:function(){return gIt.InstrumentationBase}});var hIt=twe();Object.defineProperty(Kv,"normalize",{enumerable:!0,get:function(){return hIt.normalize}})});var vJ=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.normalize=Jv.InstrumentationBase=void 0;var rwe=nwe();Object.defineProperty(Jv,"InstrumentationBase",{enumerable:!0,get:function(){return rwe.InstrumentationBase}});Object.defineProperty(Jv,"normalize",{enumerable:!0,get:function(){return rwe.normalize}})});var owe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.InstrumentationNodeModuleDefinition=void 0;var RJ=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};ZF.InstrumentationNodeModuleDefinition=RJ});var iwe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleFile=void 0;var _It=vJ(),xJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,_It.normalize)(t)}};WF.InstrumentationNodeModuleFile=xJ});var awe=F(Iy=>{"use strict";m();Object.defineProperty(Iy,"__esModule",{value:!0});Iy.semconvStabilityFromStr=Iy.SemconvStability=void 0;var XF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(XF=Iy.SemconvStability||(Iy.SemconvStability={}));function EIt(e,t){let n=XF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=XF.DUPLICATE;break}else o.toLowerCase()===e&&(n=XF.STABLE);return n}Iy.semconvStabilityFromStr=EIt});var uwe=F(na=>{"use strict";m();Object.defineProperty(na,"__esModule",{value:!0});na.semconvStabilityFromStr=na.SemconvStability=na.safeExecuteInTheMiddleAsync=na.safeExecuteInTheMiddle=na.isWrapped=na.InstrumentationNodeModuleFile=na.InstrumentationNodeModuleDefinition=na.InstrumentationBase=na.registerInstrumentations=void 0;var SIt=LOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return SIt.registerInstrumentations}});var yIt=vJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return yIt.InstrumentationBase}});var TIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return TIt.InstrumentationNodeModuleDefinition}});var IIt=iwe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return IIt.InstrumentationNodeModuleFile}});var DJ=IJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return DJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return DJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return DJ.safeExecuteInTheMiddleAsync}});var swe=awe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return swe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return swe.semconvStabilityFromStr}})});function vIt(){let e=Zv[NJ];return e?.helper?e.helper:Zv[BJ]?.helper}function RIt(e){let t={helper:e};Zv[NJ]=t,Zv[BJ]=t}function xIt(){delete Zv[NJ],delete Zv[BJ]}function NIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function dwe(e,t,n,r,o){if(pwe(t.name,o))return;let i={attributes:t.attributes,kind:NIt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let g=r.get(d);return g?{context:{spanId:g,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dwe(e,d,n,r,o);a.end(t.endTime)})}function cwe(e,t){return wIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function wIt(e){return e!=null&&typeof e.then=="function"}function pwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var e3,CIt,bIt,BJ,NJ,Zv,DIt,BIt,OIt,fwe,lwe,kIt,PIt,Awe,mwe=O(()=>{m();je();e3=ie(uwe(),1);je();CIt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",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.mts",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-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},bIt=CIt.version.split(".")[0],BJ="PRISMA_INSTRUMENTATION",NJ=`V${bIt}_PRISMA_INSTRUMENTATION`,Zv=globalThis;DIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",BIt="00-10-10-00";OIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ht.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:BIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!DIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cwe(i,t(i,r)))}};fwe={name:"@prisma/instrumentation",version:"7.6.0",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:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.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:"vitest run"},sideEffects:!1},lwe=fwe.version,kIt=fwe.name,PIt="@prisma/client",Awe=class extends e3.InstrumentationBase{tracerProvider;constructor(e={}){super(kIt,lwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new e3.InstrumentationNodeModuleDefinition(PIt,[lwe])]}enable(){let e=this._config;RIt(new OIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){xIt()}isEnabled(){return vIt()!==void 0}}});function MIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function UIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var gwe,OJ,LIt,_we,Ewe=O(()=>{m();je();mwe();dt();mr();gwe="Prisma";OJ=class extends Awe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hwe();MIt(t)&&(t.createEngineSpan=n=>{let r=Ht.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Vo(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=UIt(i.kind),c=i.parent_span_id,d=i.span_id,g=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Ks.SAMPLED}})),S=Ht.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Ks.SAMPLED});Ke.with(S,()=>{let y={generateTraceId:()=>g,generateSpanId:()=>d};r._idGenerator=y,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};LIt=st(gwe,e=>new OJ(e)),_we=e=>({name:gwe,setupOnce(){LIt(e)},setup(t){hwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var Swe=F(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.PACKAGE_NAME=Wv.PACKAGE_VERSION=void 0;Wv.PACKAGE_VERSION="0.60.0";Wv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var wJ=F(UA=>{"use strict";m();Object.defineProperty(UA,"__esModule",{value:!0});UA.HapiLifecycleMethodNames=UA.HapiLayerType=UA.handlerPatched=UA.HapiComponentName=void 0;UA.HapiComponentName="@hapi/hapi";UA.handlerPatched=Symbol("hapi-handler-patched");UA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};UA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var ywe=F(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.ATTR_HTTP_METHOD=void 0;t3.ATTR_HTTP_METHOD="http.method"});var kJ=F(hO=>{"use strict";m();Object.defineProperty(hO,"__esModule",{value:!0});hO.AttributeNames=void 0;var QIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(QIt=hO.AttributeNames||(hO.AttributeNames={}))});var Cwe=F(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.getPluginFromInput=ra.getExtMetadata=ra.getRouteMetadata=ra.isPatchableExtMethod=ra.isDirectExtInput=ra.isLifecycleExtEventObj=ra.isLifecycleExtType=ra.getPluginName=void 0;var Twe=(Zn(),Me(Lr)),FIt=ywe(),_O=wJ(),nE=kJ(),Iwe=on();function GIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=GIt;var jIt=e=>typeof e=="string"&&_O.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=jIt;var zIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=zIt;var HIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=HIt;var $It=e=>!Array.isArray(e);ra.isPatchableExtMethod=$It;var VIt=(e,t,n)=>{let r={[Twe.ATTR_HTTP_ROUTE]:e.path};t&Iwe.SemconvStability.OLD&&(r[FIt.ATTR_HTTP_METHOD]=e.method),t&Iwe.SemconvStability.STABLE&&(r[Twe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[nE.AttributeNames.HAPI_TYPE]=_O.HapiLayerType.PLUGIN,r[nE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[nE.AttributeNames.HAPI_TYPE]=_O.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=VIt;var qIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[nE.AttributeNames.EXT_TYPE]:e,[nE.AttributeNames.HAPI_TYPE]:_O.HapiLayerType.EXT,[nE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[nE.AttributeNames.EXT_TYPE]:e,[nE.AttributeNames.HAPI_TYPE]:_O.HapiLayerType.EXT},name:r}};ra.getExtMetadata=qIt;var YIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=YIt});var Rwe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.HapiInstrumentation=void 0;var Ql=(je(),Me(We)),bwe=Tr(),EO=on(),vwe=Swe(),SO=wJ(),Og=Cwe(),PJ=class extends EO.InstrumentationBase{_semconvStability;constructor(t={}){super(vwe.PACKAGE_NAME,vwe.PACKAGE_VERSION,t),this._semconvStability=(0,EO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new EO.InstrumentationNodeModuleDefinition(SO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,EO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,EO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Og.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Og.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Og.isLifecycleExtType)(d.type)){let g=d,h=r._wrapExtMethods(g.method,d.type,n);g.method=h,a[c]=g}}return t.apply(this,i)}else if((0,Og.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Og.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Og.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",g=>n._getServerRoutePatch.bind(n)(g,r)),i._wrap(c,"ext",g=>n._getServerExtPatch.bind(n)(g,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Og.isPatchableExtMethod)(t))return t[SO.handlerPatched]===!0?t:(t[SO.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Og.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Ql.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[SO.handlerPatched]===!0)return t;t[SO.handlerPatched]=!0;let o=i=>async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await i.call(this,...a);let c=(0,bwe.getRPCMetadata)(Ql.context.active());c?.type===bwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Og.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Ql.SpanStatusCode.ERROR,message:h.message}),h}finally{g.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};n3.HapiInstrumentation=PJ});var xwe=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.AttributeNames=Xv.HapiInstrumentation=void 0;var KIt=Rwe();Object.defineProperty(Xv,"HapiInstrumentation",{enumerable:!0,get:function(){return KIt.HapiInstrumentation}});var JIt=kJ();Object.defineProperty(Xv,"AttributeNames",{enumerable:!0,get:function(){return JIt.AttributeNames}})});var Dwe,Bwe,Nwe,ZIt,Owe,wwe=O(()=>{m();Dwe=ie(xwe(),1);mr();Bwe="Hapi",Nwe=st(Bwe,()=>new Dwe.HapiInstrumentation),ZIt=()=>({name:Bwe,setupOnce(){Nwe()}}),Owe=ZIt});var rE,yO,MJ=O(()=>{m();rE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},yO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var o3,WIt,XIt,r3,kwe=O(()=>{m();je();o3=ie(on(),1);dt();MJ();WIt="@sentry/instrumentation-hono",XIt="0.0.1",r3=class extends o3.InstrumentationBase{constructor(t={}){super(WIt,XIt,t)}init(){return[new o3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return Ke.with(Ht.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Is(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[rE.HONO_TYPE]:g,[rE.HONO_NAME]:g===yO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[rE.HONO_TYPE]:d,[rE.HONO_NAME]:d===yO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return Is(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?yO.MIDDLEWARE:yO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function eCt(e){let t=Ot(e).data,n=t[rE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[rE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),bn()===kd()){ya&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ig],i=t[OS];typeof o=="string"&&typeof i=="string"&&bn().setTransactionName(`${i} ${o}`)}var Pwe,Mwe,tCt,Uwe,Lwe=O(()=>{m();Zn();dt();mr();py();MJ();kwe();Pwe="Hono";Mwe=st(Pwe,()=>new r3({responseHook:e=>{eCt(e)}})),tCt=()=>({name:Pwe,setupOnce(){Mwe()}}),Uwe=tCt});var i3=F(TO=>{"use strict";m();Object.defineProperty(TO,"__esModule",{value:!0});TO.KoaLayerType=void 0;var nCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(nCt=TO.KoaLayerType||(TO.KoaLayerType={}))});var Qwe=F(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.PACKAGE_NAME=eR.PACKAGE_VERSION=void 0;eR.PACKAGE_VERSION="0.62.0";eR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var UJ=F(IO=>{"use strict";m();Object.defineProperty(IO,"__esModule",{value:!0});IO.AttributeNames=void 0;var rCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(rCt=IO.AttributeNames||(IO.AttributeNames={}))});var Gwe=F(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.isLayerIgnored=tR.getMiddlewareMetadata=void 0;var Fwe=i3(),a3=UJ(),oCt=(Zn(),Me(Lr)),iCt=(e,t,n,r)=>n?{attributes:{[a3.AttributeNames.KOA_NAME]:r?.toString(),[a3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.ROUTER,[oCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[a3.AttributeNames.KOA_NAME]:t.name??"middleware",[a3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};tR.getMiddlewareMetadata=iCt;var aCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));tR.isLayerIgnored=aCt});var jwe=F(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.kLayerPatched=void 0;s3.kLayerPatched=Symbol("koa-layer-patched")});var Ywe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.KoaInstrumentation=void 0;var LA=(je(),Me(We)),CO=on(),zwe=i3(),Hwe=Qwe(),$we=Gwe(),Vwe=Tr(),qwe=jwe(),LJ=class extends CO.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return new CO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,CO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,CO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){LA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?zwe.KoaLayerType.ROUTER:zwe.KoaLayerType.MIDDLEWARE;return t[qwe.kLayerPatched]===!0||(0,$we.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(LA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qwe.kLayerPatched]=!0,LA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(LA.trace.getSpan(LA.context.active())===void 0)return t(i,a);let d=(0,$we.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,Vwe.getRPCMetadata)(LA.context.active());h?.type===Vwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,CO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&LA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=LA.trace.setSpan(LA.context.active(),g);return LA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};u3.KoaInstrumentation=LJ});var Kwe=F(oE=>{"use strict";m();Object.defineProperty(oE,"__esModule",{value:!0});oE.KoaLayerType=oE.AttributeNames=oE.KoaInstrumentation=void 0;var sCt=Ywe();Object.defineProperty(oE,"KoaInstrumentation",{enumerable:!0,get:function(){return sCt.KoaInstrumentation}});var uCt=UJ();Object.defineProperty(oE,"AttributeNames",{enumerable:!0,get:function(){return uCt.AttributeNames}});var cCt=i3();Object.defineProperty(oE,"KoaLayerType",{enumerable:!0,get:function(){return cCt.KoaLayerType}})});var Jwe,Zwe,Wwe,lCt,Xwe,eke=O(()=>{m();Jwe=ie(Kwe(),1);Zn();dt();mr();py();Zwe="Koa",Wwe=st(Zwe,Jwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Qr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),bn()===kd()){ya&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ig],c=n.context?.request?.method?.toUpperCase()||"GET";a&&bn().setTransactionName(`${c} ${a}`)}})),lCt=(e={})=>({name:Zwe,setupOnce(){Wwe(e)}}),Xwe=lCt});var QJ=F(lf=>{"use strict";m();Object.defineProperty(lf,"__esModule",{value:!0});lf.ConnectNames=lf.ConnectTypes=lf.AttributeNames=void 0;var dCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(dCt=lf.AttributeNames||(lf.AttributeNames={}));var pCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(pCt=lf.ConnectTypes||(lf.ConnectTypes={}));var fCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(fCt=lf.ConnectNames||(lf.ConnectNames={}))});var tke=F(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.PACKAGE_NAME=nR.PACKAGE_VERSION=void 0;nR.PACKAGE_VERSION="0.57.0";nR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nke=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3._LAYERS_STORE_PROPERTY=void 0;c3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rke=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.generateRoute=aE.replaceCurrentStackRoute=aE.addNewStackLayer=void 0;var ACt=(je(),Me(We)),iE=nke(),mCt=e=>{Array.isArray(e[iE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,iE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[iE._LAYERS_STORE_PROPERTY].push("/");let t=e[iE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[iE._LAYERS_STORE_PROPERTY].length?e[iE._LAYERS_STORE_PROPERTY].pop():ACt.diag.warn("Connect: Trying to pop the stack multiple time")}};aE.addNewStackLayer=mCt;var gCt=(e,t)=>{t&&e[iE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};aE.replaceCurrentStackRoute=gCt;var hCt=e=>e[iE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);aE.generateRoute=hCt});var ake=F(sE=>{"use strict";m();Object.defineProperty(sE,"__esModule",{value:!0});sE.ConnectInstrumentation=sE.ANONYMOUS_NAME=void 0;var _Ct=(je(),Me(We)),oke=Tr(),rR=QJ(),ike=tke(),l3=on(),ECt=(Zn(),Me(Lr)),FJ=rke();sE.ANONYMOUS_NAME="anonymous";var GJ=class extends l3.InstrumentationBase{constructor(t={}){super(ike.PACKAGE_NAME,ike.PACKAGE_VERSION,t)}init(){return[new l3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,l3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,l3.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=rR.ConnectTypes.REQUEST_HANDLER,i=rR.ConnectNames.REQUEST_HANDLER,o=t):(r=rR.ConnectTypes.MIDDLEWARE,i=rR.ConnectNames.MIDDLEWARE,o=n.name||sE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[ECt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[rR.AttributeNames.CONNECT_TYPE]:r,[rR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],g=arguments[a],h=arguments[c],S=arguments[d];(0,FJ.replaceCurrentStackRoute)(g,t);let y=(0,oke.getRPCMetadata)(_Ct.context.active());t&&y?.type===oke.RPCType.HTTP&&(y.route=(0,FJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||sE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function N(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(S,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,FJ.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};sE.ConnectInstrumentation=GJ});var uke=F(Jd=>{"use strict";m();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ConnectTypes=Jd.ConnectNames=Jd.AttributeNames=Jd.ANONYMOUS_NAME=Jd.ConnectInstrumentation=void 0;var ske=ake();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ske.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ske.ANONYMOUS_NAME}});var jJ=QJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return jJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return jJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return jJ.ConnectTypes}})});var cke,lke,dke,SCt,pke,fke=O(()=>{m();cke=ie(uke(),1);mr();lke="Connect",dke=st(lke,()=>new cke.ConnectInstrumentation),SCt=()=>({name:lke,setupOnce(){dke()}}),pke=SCt});var Ake=F(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.DB_SYSTEM_VALUE_MSSQL=rs.ATTR_NET_PEER_PORT=rs.ATTR_NET_PEER_NAME=rs.ATTR_DB_USER=rs.ATTR_DB_SYSTEM=rs.ATTR_DB_STATEMENT=rs.ATTR_DB_SQL_TABLE=rs.ATTR_DB_NAME=void 0;rs.ATTR_DB_NAME="db.name";rs.ATTR_DB_SQL_TABLE="db.sql.table";rs.ATTR_DB_STATEMENT="db.statement";rs.ATTR_DB_SYSTEM="db.system";rs.ATTR_DB_USER="db.user";rs.ATTR_NET_PEER_NAME="net.peer.name";rs.ATTR_NET_PEER_PORT="net.peer.port";rs.DB_SYSTEM_VALUE_MSSQL="mssql"});var mke=F(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.once=oR.getSpanName=void 0;function yCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}oR.getSpanName=yCt;var TCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};oR.once=TCt});var gke=F(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.PACKAGE_NAME=iR.PACKAGE_VERSION=void 0;iR.PACKAGE_VERSION="0.33.0";iR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yke=F(cE=>{"use strict";m();Object.defineProperty(cE,"__esModule",{value:!0});cE.TediousInstrumentation=cE.INJECTED_CTX=void 0;var aR=(je(),Me(We)),ICt=Ge("events"),QA=on(),Cy=(Zn(),Me(Lr)),uE=Ake(),hke=mke(),_ke=gke(),Ske=Symbol("opentelemetry.instrumentation-tedious.current-database");cE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Eke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function d3(e){Object.defineProperty(this,Ske,{value:e,writable:!0})}var zJ=class e extends QA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_ke.PACKAGE_NAME,_ke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,QA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,QA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new QA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Eke)(0,QA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,QA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of Eke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return d3.call(this,this.config?.options?.database),this.removeListener("databaseChange",d3),this.on("databaseChange",d3),this.once("end",()=>{this.removeListener("databaseChange",d3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||aR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,cE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[cE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof ICt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,g=()=>d++,h=()=>c++,S=this[Ske],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&QA.SemconvStability.OLD&&(C[uE.ATTR_DB_SYSTEM]=uE.DB_SYSTEM_VALUE_MSSQL,C[uE.ATTR_DB_NAME]=S,C[uE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[uE.ATTR_DB_STATEMENT]=y,C[uE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&QA.SemconvStability.STABLE&&(C[Cy.ATTR_DB_NAMESPACE]=S,C[Cy.ATTR_DB_SYSTEM_NAME]=Cy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[Cy.ATTR_DB_QUERY_TEXT]=y,C[Cy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&QA.SemconvStability.OLD&&(C[uE.ATTR_NET_PEER_NAME]=this.config?.server,C[uE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&QA.SemconvStability.STABLE&&(C[Cy.ATTR_SERVER_ADDRESS]=this.config?.server,C[Cy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,hke.getSpanName)(t,S,y,a.table),{kind:aR.SpanKind.CLIENT,attributes:C}),x=(0,hke.once)(G=>{a.removeListener("done",g),a.removeListener("doneInProc",g),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",d),G&&v.setStatus({code:aR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",g),a.on("doneInProc",g),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let N=()=>aR.context.with(aR.trace.setSpan(aR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};cE.TediousInstrumentation=zJ});var Tke=F(p3=>{"use strict";m();Object.defineProperty(p3,"__esModule",{value:!0});p3.TediousInstrumentation=void 0;var CCt=yke();Object.defineProperty(p3,"TediousInstrumentation",{enumerable:!0,get:function(){return CCt.TediousInstrumentation}})});var Ike,bCt,Cke,bke,vCt,vke,Rke=O(()=>{m();Ike=ie(Tke(),1);dt();mr();bCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Cke="Tedious",bke=st(Cke,()=>new Ike.TediousInstrumentation({})),vCt=()=>{let e;return{name:Cke,setupOnce(){let t=bke();e=sN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";bCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},vke=vCt});var xke=F(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.PACKAGE_NAME=sR.PACKAGE_VERSION=void 0;sR.PACKAGE_VERSION="0.57.0";sR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Bke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.GenericPoolInstrumentation=void 0;var uR=(je(),Me(We)),by=on(),Dke=xke(),HJ="generic-pool",$J=class extends by.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Dke.PACKAGE_NAME,Dke.PACKAGE_VERSION,t)}init(){return[new by.InstrumentationNodeModuleDefinition(HJ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,by.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new by.InstrumentationNodeModuleDefinition(HJ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,by.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new by.InstrumentationNodeModuleDefinition(HJ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,by.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=uR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return uR.context.with(uR.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=uR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return uR.context.with(uR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};f3.GenericPoolInstrumentation=$J});var Nke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var RCt=Bke();Object.defineProperty(A3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return RCt.GenericPoolInstrumentation}})});var Oke,wke,kke,xCt,Pke,Mke=O(()=>{m();Oke=ie(Nke(),1);dt();mr();wke="GenericPool",kke=st(wke,()=>new Oke.GenericPoolInstrumentation({})),xCt=()=>{let e;return{name:wke,setupOnce(){let t=kke();e=sN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}},Pke=xCt});var VJ=F(FA=>{"use strict";m();Object.defineProperty(FA,"__esModule",{value:!0});FA.ATTR_NET_PEER_PORT=FA.ATTR_NET_PEER_NAME=FA.ATTR_MESSAGING_SYSTEM=FA.ATTR_MESSAGING_OPERATION=void 0;FA.ATTR_MESSAGING_OPERATION="messaging.operation";FA.ATTR_MESSAGING_SYSTEM="messaging.system";FA.ATTR_NET_PEER_NAME="net.peer.name";FA.ATTR_NET_PEER_PORT="net.peer.port"});var qJ=F(fi=>{"use strict";m();Object.defineProperty(fi,"__esModule",{value:!0});fi.ATTR_MESSAGING_CONVERSATION_ID=fi.OLD_ATTR_MESSAGING_MESSAGE_ID=fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=fi.ATTR_MESSAGING_URL=fi.ATTR_MESSAGING_PROTOCOL_VERSION=fi.ATTR_MESSAGING_PROTOCOL=fi.MESSAGING_OPERATION_VALUE_PROCESS=fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=fi.ATTR_MESSAGING_DESTINATION_KIND=fi.ATTR_MESSAGING_DESTINATION=void 0;fi.ATTR_MESSAGING_DESTINATION="messaging.destination";fi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";fi.MESSAGING_OPERATION_VALUE_PROCESS="process";fi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";fi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";fi.ATTR_MESSAGING_URL="messaging.url";fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";fi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";fi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var YJ=F(vy=>{"use strict";m();Object.defineProperty(vy,"__esModule",{value:!0});vy.DEFAULT_CONFIG=vy.EndOperation=void 0;var DCt;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(DCt=vy.EndOperation||(vy.EndOperation={}));vy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Fke=F(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.isConfirmChannelTracing=Ai.unmarkConfirmChannelTracing=Ai.markConfirmChannelTracing=Ai.getConnectionAttributesFromUrl=Ai.getConnectionAttributesFromServer=Ai.normalizeExchange=Ai.CONNECTION_ATTRIBUTES=Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Ai.CHANNEL_SPANS_NOT_ENDED=Ai.MESSAGE_STORED_SPAN=void 0;var KJ=(je(),Me(We)),lE=on(),m3=(Zn(),Me(Lr)),bO=VJ(),g3=qJ();Ai.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ai.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ai.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var JJ=(0,KJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),BCt=e=>e!==""?e:"<default>";Ai.normalizeExchange=BCt;var NCt=e=>e.replace(/:[^:@/]*@/,":***@"),Uke=(e,t)=>e||(t==="AMQP"?5672:5671),Lke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Qke=e=>e||"localhost",GA=(e,t,n,r)=>n?{[t]:n}:(KJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),OCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[bO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=OCt;var wCt=(e,t)=>{let n={[g3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Lke(r?.protocol);Object.assign(n,{...GA(e,g3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Qke(r?.hostname);t&lE.SemconvStability.OLD&&Object.assign(n,{...GA(e,bO.ATTR_NET_PEER_NAME,i,"hostname")}),t&lE.SemconvStability.STABLE&&Object.assign(n,{...GA(e,m3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Uke(r.port,o);t&lE.SemconvStability.OLD&&Object.assign(n,GA(e,bO.ATTR_NET_PEER_PORT,a,"port")),t&lE.SemconvStability.STABLE&&Object.assign(n,GA(e,m3.ATTR_SERVER_PORT,a,"port"))}else{let r=NCt(e);n[g3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Lke(o.protocol);Object.assign(n,{...GA(r,g3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Qke(o.hostname);t&lE.SemconvStability.OLD&&Object.assign(n,{...GA(r,bO.ATTR_NET_PEER_NAME,a,"hostname")}),t&lE.SemconvStability.STABLE&&Object.assign(n,{...GA(r,m3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Uke(o.port?parseInt(o.port):void 0,i);t&lE.SemconvStability.OLD&&Object.assign(n,GA(r,bO.ATTR_NET_PEER_PORT,c,"port")),t&lE.SemconvStability.STABLE&&Object.assign(n,GA(r,m3.ATTR_SERVER_PORT,c,"port"))}catch(o){KJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=wCt;var kCt=e=>e.setValue(JJ,!0);Ai.markConfirmChannelTracing=kCt;var PCt=e=>e.deleteValue(JJ);Ai.unmarkConfirmChannelTracing=PCt;var MCt=e=>e.getValue(JJ)===!0;Ai.isConfirmChannelTracing=MCt});var Gke=F(cR=>{"use strict";m();Object.defineProperty(cR,"__esModule",{value:!0});cR.PACKAGE_NAME=cR.PACKAGE_VERSION=void 0;cR.PACKAGE_VERSION="0.61.0";cR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var zke=F(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.AmqplibInstrumentation=void 0;var Jo=(je(),Me(We)),h3=Tr(),Cr=on(),UCt=VJ(),Fl=qJ(),Vu=YJ(),mi=Fke(),jke=Gke(),_3=[">=0.5.5 <1"],ZJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jke.PACKAGE_NAME,jke.PACKAGE_VERSION,{...Vu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Vu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",_3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",_3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",_3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",_3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Cr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Cr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Cr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Vu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Vu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Vu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Vu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Vu.EndOperation.NackAll)),(0,Cr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Cr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Cr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Cr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Cr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Cr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Cr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let g=(0,mi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,mi.getConnectionAttributesFromServer)(d);d[mi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelClosed,void 0);let i=this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let g=this,h=n===Vu.EndOperation.Reject?c:d,S=g[mi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Vu.EndOperation.Reject&&c){for(let C=0;C<=y;C++)o.endConsumerSpan(S[C].msg,t,n,h);S.splice(0,y+1)}else o.endConsumerSpan(a,t,n,h),S.splice(y,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let d=this;if(!Object.prototype.hasOwnProperty.call(d,mi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[mi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Jo.propagation.extract(Jo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Jo.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Jo.SpanKind.CONSUMER,attributes:{...d?.connection?.[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:C,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[UCt.ATTR_MESSAGING_OPERATION]:Fl.MESSAGING_OPERATION_VALUE_PROCESS,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:N}=r.getConfig();N&&(0,Cr.safeExecuteInTheMiddle)(()=>N(x,{moduleVersion:t,msg:h}),Q=>{Q&&Jo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[mi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,h3.hrTime)()}),h[mi.MESSAGE_STORED_SPAN]=x);let k=y||Jo.ROOT_CONTEXT;Jo.context.with(Jo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Vu.EndOperation.AutoAck),x.end())};return arguments[1]=g,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,g){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),k=>{k&&Jo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{g?.call(this,k,Q)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Cr.safeExecuteInTheMiddle)(()=>j(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:k}),G=>{G&&Jo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Jo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,mi.markConfirmChannelTracing)(Jo.context.active()),N=[...arguments];return N[3]=y,N[4]=Jo.context.bind((0,mi.unmarkConfirmChannelTracing)(Jo.trace.setSpan(x,S)),v),Jo.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,mi.isConfirmChannelTracing)(Jo.context.active()))return n.apply(this,arguments);{let g=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,g,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Jo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let C=[...arguments];C[3]=S;let v=n.apply(this,C);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,mi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Jo.SpanKind.PRODUCER,attributes:{...o.connection[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:n,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Jo.propagation.inject(Jo.trace.setSpan(Jo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[mi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Jo.SpanStatusCode.ERROR,message:r!==Vu.EndOperation.ChannelClosed&&r!==Vu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[mi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[mi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[mi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Cr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Jo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,h3.hrTime)(),r=t[mi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,h3.hrTimeDuration)(a.timeOfConsume,n);if((0,h3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};E3.AmqplibInstrumentation=ZJ});var $ke=F(dE=>{"use strict";m();Object.defineProperty(dE,"__esModule",{value:!0});dE.EndOperation=dE.DEFAULT_CONFIG=dE.AmqplibInstrumentation=void 0;var LCt=zke();Object.defineProperty(dE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return LCt.AmqplibInstrumentation}});var Hke=YJ();Object.defineProperty(dE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return Hke.DEFAULT_CONFIG}});Object.defineProperty(dE,"EndOperation",{enumerable:!0,get:function(){return Hke.EndOperation}})});var Vke,qke,QCt,Yke,FCt,Kke,Jke=O(()=>{m();Vke=ie($ke(),1);mr();qke="Amqplib",QCt={consumeEndHook:e=>{Qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Qr(e,"auto.amqplib.otel.publisher")}},Yke=st(qke,()=>new Vke.AmqplibInstrumentation(QCt)),FCt=()=>({name:qke,setupOnce(){Yke()}}),Kke=FCt});var vO,WJ=O(()=>{m();vO="VercelAI"});function jCt(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function zCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(HCt(t.content),$Ct(t.content))}function HCt(e){for(let t of e){if(!jCt(t))continue;let n=xq(t.toolCallId);n?xl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):xl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function $Ct(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Dq(t.toolCallId)}function VCt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var y3,GCt,Zke,S3,Wke=O(()=>{m();y3=ie(on(),1);dt();WJ();GCt=[">=3.0.0 <7"],Zke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];S3=class e extends y3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new y3.InstrumentationNodeModuleDefinition("ai",GCt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,g=gt(),h=g?.getIntegrationByName(vO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=VCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},rf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{zCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Zke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Zke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function qCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Xke,YCt,ePe,tPe=O(()=>{m();dt();mr();WJ();Wke();Xke=st(vO,()=>new S3({}));YCt=(e={})=>{let t;return{name:vO,options:e,setupOnce(){t=Xke()},afterAllSetup(n){e.force??qCt(n)?vL(n):t?.callWhenPatched(()=>vL(n))}}},ePe=YCt});var I3,KCt,T3,nPe=O(()=>{m();I3=ie(on(),1);dt();KCt=[">=4.0.0 <7"],T3=class extends I3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new I3.InstrumentationNodeModuleDefinition("openai",KCt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(KS(P_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return DL(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var rPe,JCt,oPe,iPe=O(()=>{m();dt();mr();nPe();rPe=st(P_,e=>new T3(e)),JCt=(e={})=>({name:P_,setupOnce(){rPe(e)}}),oPe=JCt});var b3,ZCt,C3,aPe=O(()=>{m();b3=ie(on(),1);dt();ZCt=[">=0.19.2 <1.0.0"],C3=class extends b3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new b3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",ZCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(KS(M_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return BL(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var sPe,WCt,uPe,cPe=O(()=>{m();dt();mr();aPe();sPe=st(M_,e=>new C3(e)),WCt=(e={})=>({name:M_,options:e,setupOnce(){sPe(e)}}),uPe=WCt});var lR,lPe,v3,dPe=O(()=>{m();lR=ie(on(),1);dt();lPe=[">=0.10.0 <2"],v3=class extends lR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new lR.InstrumentationNodeModuleDefinition("@google/genai",lPe,n=>this._patch(n),n=>n,[new lR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lPe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(KS(U_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return NL(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return iN(t,"GoogleGenAI",o),t}}});var pPe,XCt,fPe,APe=O(()=>{m();dt();mr();dPe();pPe=st(U_,e=>new v3(e)),XCt=(e={})=>({name:U_,setupOnce(){pPe(e)}}),fPe=XCt});function ebt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function tbt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,g=ebt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var pE,R3,x3,mPe=O(()=>{m();pE=ie(on(),1);dt();R3=[">=0.1.0 <2.0.0"];x3=class extends pE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new pE.InstrumentationNodeModuleDefinition(r,R3,this._patch.bind(this),o=>o,[new pE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,R3,this._patch.bind(this),o=>o)]));return t.push(new pE.InstrumentationNodeModuleDefinition("langchain",R3,this._patch.bind(this),r=>r,[new pE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",R3,this._patch.bind(this),r=>r)])),t}_patch(t){$V([P_,M_,U_]);let n=PL(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let g=a[d];typeof g=="function"&&(a[d]=tbt(g,n))}}}});var gPe,nbt,hPe,_Pe=O(()=>{m();dt();mr();mPe();gPe=st(OL,e=>new x3(e)),nbt=(e={})=>({name:OL,setupOnce(){gPe(e)}}),hPe=nbt});var dR,EPe,D3,SPe=O(()=>{m();dR=ie(on(),1);dt();EPe=[">=0.0.0 <2.0.0"],D3=class extends dR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new dR.InstrumentationNodeModuleDefinition("@langchain/langgraph",EPe,this._patch.bind(this),n=>n,[new dR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EPe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&UL(t.StateGraph.prototype,this.getConfig()),t}}});var yPe,rbt,TPe,IPe=O(()=>{m();dt();mr();SPe();yPe=st(ML,e=>new D3(e)),rbt=(e={})=>({name:ML,setupOnce(){yPe(e)}}),TPe=rbt});import*as bPe from"node:net";function vPe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,wg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new wg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>CPe(h,n,r,e,a)),g=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of g)d.files.push(new wg.InstrumentationNodeModuleFile(h,t,S=>CPe(S,n,r,e,a),S=>RPe(S,r)));return d}function CPe(e,t,n,r,o){return RPe(e,n),t(e,"addDoc",obt(r,o)),t(e,"getDocs",abt(r,o)),t(e,"setDoc",sbt(r,o)),t(e,"deleteDoc",ibt(r,o)),e}function RPe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,wg.isWrapped)(e[n])&&t(e,n);return e}function obt(e,t){return function(r){return function(o,i){let a=N3(e,"addDoc",o);return t(a),B3(a,()=>r(o,i))}}}function ibt(e,t){return function(r){return function(o){let i=N3(e,"deleteDoc",o.parent||o);return t(i),B3(i,()=>r(o))}}}function abt(e,t){return function(r){return function(o){let i=N3(e,"getDocs",o);return t(i),B3(i,()=>r(o))}}}function sbt(e,t){return function(r){return function(o,i,a){let c=N3(e,"setDoc",o.parent||o);return t(c),B3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function B3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,wg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function N3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return cbt(r,n),r.setAttribute(ZC,t),r}function ubt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(bPe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function cbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[m5]:t.path,[g5]:n.name,[NS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=ubt(i);c&&(a[C5]=c),d&&(a[b5]=d),e.setAttributes(a)}var wg,xPe=O(()=>{m();je();wg=ie(on(),1);Zn()});function DPe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,g=o.functions?.responseHook;typeof g=="function"&&(a=(y,C)=>{(0,kg.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,kg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new kg.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:y,triggerType:C})=>{h.files.push(new kg.InstrumentationNodeModuleFile(y,t,v=>lbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>BPe(v,r)))}),h}function qu(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),Ke.with(Ht.setSpan(Ke.active(),S),async()=>{let C,v;try{v=await a.apply(this,g)}catch(x){C=x}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return v})};return c?o.call(this,c,d):o.call(this,d)}}}function lbt(e,t,n,r,o,i){switch(BPe(e,n),i){case"function":t(e,"onRequest",qu(r,o,"http.request")),t(e,"onCall",qu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",qu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",qu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",qu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",qu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",qu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",qu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",qu(r,o,"storage.object.metadataUpdated"));break}return e}function BPe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,kg.isWrapped)(e[r])&&t(e,r);return e}var kg,NPe=O(()=>{m();je();kg=ie(on(),1)});var wPe,OPe,dbt,pbt,O3,kPe=O(()=>{m();wPe=ie(on(),1);dt();xPe();NPe();OPe={},dbt=[">=3.0.0 <5"],pbt=[">=6.0.0 <7"],O3=class extends wPe.InstrumentationBase{constructor(t=OPe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...OPe,...t})}init(){let t=[];return t.push(vPe(this.tracer,dbt,this._wrap,this._unwrap,this.getConfig())),t.push(DPe(this.tracer,pbt,this._wrap,this._unwrap,this.getConfig())),t}}});var PPe,fbt,MPe,Abt,UPe,LPe=O(()=>{m();dt();mr();kPe();PPe="Firebase",fbt={firestoreSpanCreationHook:e=>{Qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Pb(2e3))}}},MPe=st(PPe,()=>new O3(fbt)),Abt=()=>({name:PPe,setupOnce(){MPe()}}),UPe=Abt});function QPe(){return[jxe(),T1e(),K1e(),Uwe(),MBe(),ZBe(),cNe(),yNe(),XNe(),SOe(),_we(),Owe(),Xwe(),pke(),vke(),Pke(),pBe(),Kke(),IBe(),hPe(),TPe(),ePe(),oPe(),uPe(),fPe(),COe(),UPe()]}var FPe=O(()=>{m();Jke();cPe();fke();zxe();b1e();LPe();Mke();APe();Z1e();wwe();Lwe();fBe();eke();_Pe();IPe();CBe();UBe();WBe();lNe();TNe();iPe();yOe();bOe();Ewe();eOe();Rke();tPe()});function jPe(e,t={}){e.getOptions().debug&&aY();let[n,r]=mbt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function mbt(e,t={}){let n=new GPe.BasicTracerProvider({sampler:new zQ(e),resource:(0,w3.defaultResource)().merge((0,w3.resourceFromAttributes)({[v5]:"node",[A5]:"sentry",[R5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new jQ({timeout:gbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),qp.setGlobalPropagator(new GQ);let r=new $Q;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function gbt(e){if(e!=null){if(e>XJ)return ya&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${XJ}`),XJ;if(e<=0||Number.isNaN(e)){ya&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var w3,GPe,XJ,zPe=O(()=>{m();je();w3=ie(E7(),1),GPe=ie($7(),1);Zn();dt();mr();fv();py();XJ=1e6});function HPe(){return WQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_xe(),Rxe())}function $Pe(e){return[...HPe(),...xi(e)?QPe():[]]}function eZ(e={}){return hbt(e,$Pe)}function hbt(e={},t){JS(e,"node");let n=OY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jPe(n,{spanProcessors:e.openTelemetrySpanProcessors}),XQ()),n}var VPe=O(()=>{m();dt();mr();Exe();xxe();FPe();zPe()});var pR=O(()=>{m();VPe();dt();mr()});function Ni(){return _bt}function Yu(){return qPe}function YPe(){return Ebt}var _bt,qPe,Ebt,Gl=O(()=>{"use strict";m();_bt="prod",qPe="0.1.140",Ebt=`@tanagram/lore/${qPe}`});function Cbt(e=""){if(!Tbt.test(e))return e!==e.toLowerCase()}function KPe(e,t){let n=t??Ibt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let g=Cbt(c);if(a===!1){if(i===!1&&g===!0){r.push(o),o=c,i=g;continue}if(i===!0&&g===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=g;continue}}o+=c,i=g,a=d}return r.push(o),r}function bbt(e){return e?e[0].toUpperCase()+e.slice(1):""}function vbt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Rbt(e,t){return e?(Array.isArray(e)?e:KPe(e)).map(n=>bbt(t?.normalize?n.toLowerCase():n)).join(""):""}function xO(e,t){return vbt(Rbt(e||"",t))}function k3(e,t){return e?(Array.isArray(e)?e:KPe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JPe(e){return k3(e||"","_")}var Tbt,Ibt,ZPe=O(()=>{m();Tbt=/\d/,Ibt=["-","_","/","."]});import{parseArgs as xbt}from"node:util";function L3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function tZ(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
38
+ Mongoose Error Code: ${t.code}`:""}`})}function wK(e,t,n,r=void 0){n&&(0,WN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function USt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(wK(t,o,n,r),o)).catch(o=>{throw QBe(t,o),o}).finally(()=>t.end()):(wK(t,e,n,r),t.end(),e)}q_.handlePromiseResponse=USt;function LSt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,g)=>(d?QBe(r,d):wK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}q_.handleCallbackResponse=LSt});var GBe=F(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.PACKAGE_NAME=Pv.PACKAGE_VERSION=void 0;Pv.PACKAGE_VERSION="0.60.0";Pv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VBe=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ia=(je(),Me(We)),QSt=Tr(),kK=FBe(),Ns=on(),jBe=GBe(),Y_=OK(),Ey=(Zn(),Me(Lr)),iF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],FSt=["remove","count","findOneAndRemove",...iF],GSt=["count","findOneAndRemove",...iF],jSt=[...iF];function zBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?FSt:e.startsWith("7.")?GSt:jSt:iF}function HBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $Be(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Uc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Uc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var PK=class extends Ns.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jBe.PACKAGE_NAME,jBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ns.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ns.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ns.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$Be(n)&&(this._wrap(r.Model.prototype,"updateOne",this._patchDocumentUpdateMethods("updateOne",n)),this._wrap(r.Model.prototype,"deleteOne",this._patchDocumentUpdateMethods("deleteOne",n))),this._wrap(r.Query.prototype,"exec",this.patchQueryExec(n)),this._wrap(r.Aggregate.prototype,"exec",this.patchAggregateExec(n)),zBe(n).forEach(i=>{this._wrap(r.Query.prototype,i,this.patchAndCaptureSpanContext(i))}),this._wrap(r.Model,"aggregate",this.patchModelAggregate()),this._wrap(r.Model,"insertMany",this.patchModelStatic("insertMany",n)),this._wrap(r.Model,"bulkWrite",this.patchModelStatic("bulkWrite",n)),r}unpatch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t,o=zBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._unwrap(r.Model.prototype,"remove"),$Be(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[Y_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[Ey.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Uc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return r.apply(this,arguments);let a=this[Uc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ns.SemconvStability.OLD&&(c[Y_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[Ey.ATTR_DB_QUERY_TEXT]=h)}let g=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(g,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let g={},{dbStatementSerializer:h}=r.getConfig();if(h){let y=h(t,d);r._dbSemconvStability&Ns.SemconvStability.OLD&&(g[Y_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[Ey.ATTR_DB_QUERY_TEXT]=y)}let S=r._startSpan(this.constructor.collection,this.constructor.modelName,t,g);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(S,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);let g=d,h=a,S=c;typeof a=="function"?(g=a,h=void 0,S=void 0):typeof c=="function"&&(g=c,S=void 0);let y={},C=r.getConfig().dbStatementSerializer;if(C){let N=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&Ns.SemconvStability.OLD&&(y[Y_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[Ey.ATTR_DB_QUERY_TEXT]=N)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,y),x=r._handleResponse(v,o,this,arguments,g,n);return x&&typeof x=="object"&&(x[Uc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&Ia.trace.getSpan(Ia.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let g={};switch(t){case"insertMany":g.documents=a;break;case"bulkWrite":g.operations=a;break;default:g.document=a;break}c!==void 0&&(g.options=c);let h={},{dbStatementSerializer:S}=r.getConfig();if(S){let C=S(t,g);r._dbSemconvStability&Ns.SemconvStability.OLD&&(h[Y_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[Ey.ATTR_DB_QUERY_TEXT]=C)}let y=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(y,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ia.trace.getSpan(Ia.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Uc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Uc._STORED_PARENT_SPAN]=Ia.trace.getSpan(Ia.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,kK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[Y_.ATTR_DB_OPERATION]=r,a[Y_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[Ey.ATTR_DB_OPERATION_NAME]=r,a[Ey.ATTR_DB_SYSTEM_NAME]=Y_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ia.SpanKind.CLIENT,attributes:a},i?Ia.trace.setSpan(Ia.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,kK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,kK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ia.context.with((0,QSt.suppressTracing)(Ia.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var qBe=F(aF=>{"use strict";m();Object.defineProperty(aF,"__esModule",{value:!0});aF.MongooseInstrumentation=void 0;var zSt=VBe();Object.defineProperty(aF,"MongooseInstrumentation",{enumerable:!0,get:function(){return zSt.MongooseInstrumentation}})});var YBe,KBe,JBe,HSt,ZBe,WBe=O(()=>{m();YBe=ie(qBe(),1);mr();KBe="Mongoose",JBe=st(KBe,()=>new YBe.MongooseInstrumentation({responseHook(e){Qr(e,"auto.db.otel.mongoose")}})),HSt=()=>({name:KBe,setupOnce(){JBe()}}),ZBe=HSt});var XBe=F(ta=>{"use strict";m();Object.defineProperty(ta,"__esModule",{value:!0});ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ta.DB_SYSTEM_VALUE_MYSQL=ta.ATTR_NET_PEER_PORT=ta.ATTR_NET_PEER_NAME=ta.ATTR_DB_USER=ta.ATTR_DB_SYSTEM=ta.ATTR_DB_STATEMENT=ta.ATTR_DB_NAME=ta.ATTR_DB_CONNECTION_STRING=void 0;ta.ATTR_DB_CONNECTION_STRING="db.connection_string";ta.ATTR_DB_NAME="db.name";ta.ATTR_DB_STATEMENT="db.statement";ta.ATTR_DB_SYSTEM="db.system";ta.ATTR_DB_USER="db.user";ta.ATTR_NET_PEER_NAME="net.peer.name";ta.ATTR_NET_PEER_PORT="net.peer.port";ta.DB_SYSTEM_VALUE_MYSQL="mysql";ta.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var eNe=F(XN=>{"use strict";m();Object.defineProperty(XN,"__esModule",{value:!0});XN.AttributeNames=void 0;var $St;(function(e){e.MYSQL_VALUES="db.mysql.values"})($St=XN.AttributeNames||(XN.AttributeNames={}))});var tNe=F(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.getPoolNameOld=iu.arrayStringifyHelper=iu.getSpanName=iu.getDbValues=iu.getDbQueryText=iu.getJDBCString=iu.getConfig=void 0;function VSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}iu.getConfig=VSt;function qSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=qSt;function YSt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=YSt;function KSt(e,t){return MK(typeof e=="string"?t:t||e.values)}iu.getDbValues=KSt;function JSt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}iu.getSpanName=JSt;function MK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=MK;function ZSt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}iu.getPoolNameOld=ZSt});var nNe=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.60.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oNe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MySQLInstrumentation=void 0;var Lc=(je(),Me(We)),$d=on(),Uv=(Zn(),Me(Lr)),Ng=XBe(),WSt=eNe(),Sy=tNe(),rNe=nNe(),UK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rNe.PACKAGE_NAME,rNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,$d.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,$d.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Ng.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new $d.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,$d.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,$d.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,$d.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,g=(0,Sy.getPoolNameOld)(t);r._connCountAdd(-d,g,"used"),r._connCountAdd(-c,g,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),g=c[d].pool;r._setPoolCallbacks(g,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Lc.context.active();return function(o,i){i&&((0,$d.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Lc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:g,database:h,user:S}=(0,Sy.getConfig)(t.config),y=parseInt(g,10),C=(0,Sy.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[Ng.ATTR_DB_SYSTEM]=Ng.DB_SYSTEM_VALUE_MYSQL,c[Ng.ATTR_DB_CONNECTION_STRING]=(0,Sy.getJDBCString)(d,g,h),c[Ng.ATTR_DB_NAME]=h,c[Ng.ATTR_DB_USER]=S,c[Ng.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Uv.ATTR_DB_SYSTEM_NAME]=Uv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Uv.ATTR_DB_NAMESPACE]=h,c[Uv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[Ng.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[Ng.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Uv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Uv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,Sy.getSpanName)(o),{kind:Lc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(WSt.AttributeNames.MYSQL_VALUES,(0,Sy.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),N=Lc.context.active();if(x===-1){let k=Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments));return Lc.context.bind(N,k),k.on("error",Q=>v.setStatus({code:Lc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,N)),Lc.context.with(Lc.trace.setSpan(Lc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Lc.SpanStatusCode.ERROR,message:o.message}),t.end(),Lc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,Sy.getPoolNameOld)(t);t.on("connection",o=>{this._connCountAdd(1,r,"idle")}),t.on("acquire",o=>{this._connCountAdd(-1,r,"idle"),this._connCountAdd(1,r,"used")}),t.on("release",o=>{this._connCountAdd(1,r,"idle"),this._connCountAdd(-1,r,"used")})}};sF.MySQLInstrumentation=UK});var iNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var XSt=oNe();Object.defineProperty(uF,"MySQLInstrumentation",{enumerable:!0,get:function(){return XSt.MySQLInstrumentation}})});var aNe,sNe,uNe,eyt,cNe,lNe=O(()=>{m();aNe=ie(iNe(),1);mr();sNe="Mysql",uNe=st(sNe,()=>new aNe.MySQLInstrumentation({})),eyt=()=>({name:sNe,setupOnce(){uNe()}}),cNe=eyt});var LK=F(ts=>{"use strict";m();Object.defineProperty(ts,"__esModule",{value:!0});ts.DB_SYSTEM_VALUE_MYSQL=ts.ATTR_NET_PEER_PORT=ts.ATTR_NET_PEER_NAME=ts.ATTR_DB_USER=ts.ATTR_DB_SYSTEM=ts.ATTR_DB_STATEMENT=ts.ATTR_DB_NAME=ts.ATTR_DB_CONNECTION_STRING=void 0;ts.ATTR_DB_CONNECTION_STRING="db.connection_string";ts.ATTR_DB_NAME="db.name";ts.ATTR_DB_STATEMENT="db.statement";ts.ATTR_DB_SYSTEM="db.system";ts.ATTR_DB_USER="db.user";ts.ATTR_NET_PEER_NAME="net.peer.name";ts.ATTR_NET_PEER_PORT="net.peer.port";ts.DB_SYSTEM_VALUE_MYSQL="mysql"});var FK=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.addSqlCommenterComment=void 0;var QK=(je(),Me(We)),tyt=Tr();function nyt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function ryt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function oyt(e,t){if(typeof t!="string"||t.length===0||nyt(t))return t;let n=new tyt.W3CTraceContextPropagator,r={};n.inject(QK.trace.setSpan(QK.ROOT_CONTEXT,e),r,QK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=ryt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}cF.addSqlCommenterComment=oyt});var dNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var eO=LK(),lF=on(),GK=(Zn(),Me(Lr));function iyt(e,t,n){let{host:r,port:o,database:i,user:a}=ayt(e),c={};t&lF.SemconvStability.OLD&&(c[eO.ATTR_DB_CONNECTION_STRING]=syt(r,o,i),c[eO.ATTR_DB_NAME]=i,c[eO.ATTR_DB_USER]=a),t&lF.SemconvStability.STABLE&&(c[GK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&lF.SemconvStability.OLD&&(c[eO.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[eO.ATTR_NET_PEER_PORT]=d)),n&lF.SemconvStability.STABLE&&(c[GK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[GK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=iyt;function ayt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function syt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function uyt(e,t,n,r=!1,o=cyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,lyt(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Vd.getQueryText=uyt;function cyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function lyt(e){return"values"in e}function dyt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Vd.getSpanName=dyt;var pyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=pyt;function fyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=fyt});var pNe=F(Lv=>{"use strict";m();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.60.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gNe=F(dF=>{"use strict";m();Object.defineProperty(dF,"__esModule",{value:!0});dF.MySQL2Instrumentation=void 0;var fNe=(je(),Me(We)),uf=on(),jK=LK(),ANe=FK(),Qv=dNe(),mNe=pNe(),zK=(Zn(),Me(Lr)),HK=[">=1.4.2 <4"],$K=class extends uf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mNe.PACKAGE_NAME,mNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,uf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,uf.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){let t;function n(i){!t&&i.format&&(t=i.format)}let r=i=>{(0,uf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,uf.isWrapped)(i.execute)&&this._unwrap(i,"execute"),this._wrap(i,"execute",this._patchQuery(t,!0))},o=i=>{this._unwrap(i,"query"),this._unwrap(i,"execute")};return[new uf.InstrumentationNodeModuleDefinition("mysql2",HK,i=>(n(i),i),()=>{},[new uf.InstrumentationNodeModuleFile("mysql2/promise.js",HK,i=>(n(i),i),()=>{}),new uf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",HK,i=>{let a=(0,Qv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Qv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:g,maskStatementHook:h,responseHook:S}=o.getConfig(),y=(0,Qv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,Qv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&uf.SemconvStability.OLD&&(y[jK.ATTR_DB_SYSTEM]=jK.DB_SYSTEM_VALUE_MYSQL,y[jK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&uf.SemconvStability.STABLE&&(y[zK.ATTR_DB_SYSTEM_NAME]=zK.DB_SYSTEM_NAME_VALUE_MYSQL,y[zK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,Qv.getSpanName)(i),{kind:fNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,ANe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,ANe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Qv.once)((N,k)=>{N?v.setStatus({code:fNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,uf.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let N=r.apply(this,arguments);return N.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};dF.MySQL2Instrumentation=$K});var hNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var Ayt=gNe();Object.defineProperty(pF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return Ayt.MySQL2Instrumentation}})});var _Ne,ENe,SNe,myt,yNe,TNe=O(()=>{m();_Ne=ie(hNe(),1);mr();ENe="Mysql2",SNe=st(ENe,()=>new _Ne.MySQL2Instrumentation({responseHook(e){Qr(e,"auto.db.otel.mysql2")}})),myt=()=>({name:ENe,setupOnce(){SNe()}}),yNe=myt});var INe=F(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var CNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.endSpan=void 0;var gyt=(je(),Me(We)),hyt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:gyt.SpanStatusCode.ERROR,message:t.message})),e.end()};fF.endSpan=hyt});var mF=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.defaultDbStatementSerializer=void 0;var _yt=[{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}],Eyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=_yt.find(({regex:o})=>o.test(e))?.args??0,r=n>=0?t.slice(0,n):t;return t.length>r.length&&r.push(`[${t.length-n} other arguments]`),`${e} ${r.join(" ")}`}return e};AF.defaultDbStatementSerializer=Eyt});var bNe=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.PACKAGE_NAME=Fv.PACKAGE_VERSION=void 0;Fv.PACKAGE_VERSION="0.62.0";Fv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var DNe=F(gF=>{"use strict";m();Object.defineProperty(gF,"__esModule",{value:!0});gF.IORedisInstrumentation=void 0;var K_=(je(),Me(We)),Qc=on(),J_=(Zn(),Me(Lr)),Fc=INe(),vNe=on(),tO=CNe(),Syt=mF(),RNe=bNe(),xNe={requireParentSpan:!0},VK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,{...xNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xNe,...t})}init(){return[new Qc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Qc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Qc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||Syt.defaultDbStatementSerializer,c=K_.trace.getSpan(K_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:g,port:h}=this.options,S=a(o.name,o.args);r._dbSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,d[Fc.ATTR_DB_STATEMENT]=S,d[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&Qc.SemconvStability.STABLE&&(d[J_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[J_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&Qc.SemconvStability.OLD&&(d[Fc.ATTR_NET_PEER_NAME]=g,d[Fc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Qc.SemconvStability.STABLE&&(d[J_.ATTR_SERVER_ADDRESS]=g,d[J_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:K_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,vNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&K_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,vNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&K_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,tO.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,tO.endSpan)(y,k),N(k)},v}catch(v){throw(0,tO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=K_.trace.getSpan(K_.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_DB_SYSTEM]=Fc.DB_SYSTEM_VALUE_REDIS,o[Fc.ATTR_DB_STATEMENT]="connect",o[Fc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Qc.SemconvStability.STABLE&&(o[J_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[J_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Qc.SemconvStability.OLD&&(o[Fc.ATTR_NET_PEER_NAME]=i,o[Fc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Qc.SemconvStability.STABLE&&(o[J_.ATTR_SERVER_ADDRESS]=i,o[J_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:K_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,tO.endSpan)(c,null),d}catch(d){throw(0,tO.endSpan)(c,d),d}}}};gF.IORedisInstrumentation=VK});var BNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var yyt=DNe();Object.defineProperty(hF,"IORedisInstrumentation",{enumerable:!0,get:function(){return yyt.IORedisInstrumentation}})});var _F=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.PACKAGE_NAME=Gv.PACKAGE_VERSION=void 0;Gv.PACKAGE_VERSION="0.62.0";Gv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var NNe=F(Z_=>{"use strict";m();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.getTracedCreateStreamTrace=Z_.getTracedCreateClient=Z_.endSpan=void 0;var nO=(je(),Me(We)),Tyt=(e,t)=>{t&&e.setStatus({code:nO.SpanStatusCode.ERROR,message:t.message}),e.end()};Z_.endSpan=Tyt;var Iyt=e=>function(){let n=e.apply(this,arguments);return nO.context.bind(nO.context.active(),n)};Z_.getTracedCreateClient=Iyt;var Cyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){nO.context.bind(nO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};Z_.getTracedCreateStreamTrace=Cyt});var EF=F(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var wNe=F(yF=>{"use strict";m();Object.defineProperty(yF,"__esModule",{value:!0});yF.RedisInstrumentationV2_V3=void 0;var Ll=on(),SF=NNe(),ONe=_F(),rO=(je(),Me(We)),oO=(Zn(),Me(Lr)),yy=EF(),byt=mF(),qK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(ONe.PACKAGE_NAME,ONe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ll.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ll.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ll.isWrapped)(t.RedisClient.prototype.internal_send_command)&&this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._wrap(t.RedisClient.prototype,"internal_send_command",this._getPatchInternalSendCommand()),(0,Ll.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ll.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=rO.trace.getSpan(rO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||byt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[yy.ATTR_DB_SYSTEM]:yy.DB_SYSTEM_VALUE_REDIS,[yy.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[oO.ATTR_DB_SYSTEM_NAME]:yy.DB_SYSTEM_NAME_VALUE_REDIS,[oO.ATTR_DB_OPERATION_NAME]:i.command,[oO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:rO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[yy.ATTR_NET_PEER_NAME]:this.connection_options.host,[yy.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[oO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[oO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(yy.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=rO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let N=a.responseHook;(0,Ll.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,SF.endSpan)(h,v),rO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,SF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,SF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,SF.getTracedCreateStreamTrace)(n)}}};yF.RedisInstrumentationV2_V3=qK});var PNe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.getClientAttributes=void 0;var YK=(Zn(),Me(Lr)),jv=EF(),kNe=on();function vyt(e,t,n){let r={};return n&kNe.SemconvStability.OLD&&Object.assign(r,{[jv.ATTR_DB_SYSTEM]:jv.DB_SYSTEM_VALUE_REDIS,[jv.ATTR_NET_PEER_NAME]:t?.socket?.host,[jv.ATTR_NET_PEER_PORT]:t?.socket?.port,[jv.ATTR_DB_CONNECTION_STRING]:Ryt(e,t?.url)}),n&kNe.SemconvStability.STABLE&&Object.assign(r,{[YK.ATTR_DB_SYSTEM_NAME]:jv.DB_SYSTEM_NAME_VALUE_REDIS,[YK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[YK.ATTR_SERVER_PORT]:t?.socket?.port}),r}TF.getClientAttributes=vyt;function Ryt(e,t){if(!(typeof t!="string"||!t))try{let n=new URL(t);return n.searchParams.delete("user_pwd"),n.username="",n.password="",n.href}catch(n){e.error("failed to sanitize redis connection url",n)}}});var QNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.RedisInstrumentationV4_V5=void 0;var qd=(je(),Me(We)),So=on(),MNe=PNe(),xyt=mF(),UNe=_F(),KK=(Zn(),Me(Lr)),Dyt=EF(),iO=Symbol("opentelemetry.instrumentation.redis.open_spans"),LNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),JK=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(UNe.PACKAGE_NAME,UNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,g){let h=t(d,g).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[iO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[iO];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let g=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,g,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[LNe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,MNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:qd.SpanKind.CLIENT,attributes:a});return qd.context.with(qd.trace.setSpan(qd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:qd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(qd.trace.getSpan(qd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[LNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||xyt.defaultDbStatementSerializer,h=(0,MNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[KK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Dyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[KK.ATTR_DB_QUERY_TEXT]=C))}catch(C){this._diag.error("dbStatementSerializer throw an exception",C,{commandName:c})}let S=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:qd.SpanKind.CLIENT,attributes:h}),y=qd.context.with(qd.trace.setSpan(qd.context.active(),S),()=>t.apply(n,r));if(typeof y?.then=="function")y.then(C=>{this._endSpanWithResponse(S,c,d,C,void 0)},C=>{this._endSpanWithResponse(S,c,d,null,C)});else{let C=y;C[iO]=C[iO]||[],C[iO].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(KK.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],g,S,y)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:qd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};IF.RedisInstrumentationV4_V5=JK});var jNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentation=void 0;var Byt=on(),FNe=_F(),Nyt=wNe(),Oyt=QNe(),GNe={requireParentSpan:!1},ZK=class extends Byt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...GNe,...t};super(FNe.PACKAGE_NAME,FNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Nyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Oyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...GNe,...t};super.setConfig(n),this.initialized&&(this.instrumentationV2_V3.setConfig(n),this.instrumentationV4_V5.setConfig(n))}init(){}getModuleDefinitions(){return[...this.instrumentationV2_V3.getModuleDefinitions(),...this.instrumentationV4_V5.getModuleDefinitions()]}setTracerProvider(t){super.setTracerProvider(t),this.initialized&&(this.instrumentationV2_V3.setTracerProvider(t),this.instrumentationV4_V5.setTracerProvider(t))}enable(){super.enable(),this.initialized&&(this.instrumentationV2_V3.enable(),this.instrumentationV4_V5.enable())}disable(){super.disable(),this.initialized&&(this.instrumentationV2_V3.disable(),this.instrumentationV4_V5.disable())}};CF.RedisInstrumentation=ZK});var zNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var wyt=jNe();Object.defineProperty(bF,"RedisInstrumentation",{enumerable:!0,get:function(){return wyt.RedisInstrumentation}})});function aO(e,t){return e.includes(t.toLowerCase())}function XK(e){return aO(WK,e)?"cache.get":aO(Pyt,e)?"cache.put":void 0}function Myt(e,t){return t.some(n=>e.startsWith(n))}function $Ne(e,t){try{if(t.length===0)return;let n=o=>typeof o=="string"||typeof o=="number"||Buffer.isBuffer(o)?[o.toString()]:Array.isArray(o)?HNe(o.map(i=>n(i))):["<unknown>"],r=t[0];return aO(kyt,e)&&r!=null?n(r):HNe(t.map(o=>n(o)))}catch{return}}function VNe(e,t,n){if(!XK(e))return!1;for(let r of t)if(Myt(r,n))return!0;return!1}function qNe(e){let t=n=>{try{return Buffer.isBuffer(n)?n.byteLength:typeof n=="string"?n.length:typeof n=="number"?n.toString().length:n==null?0:JSON.stringify(n).length}catch{return}};return Array.isArray(e)?e.reduce((n,r)=>{let o=t(r);return typeof o=="number"?n!==void 0?n+o:o:n},0):t(e)}function HNe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var kyt,WK,Pyt,YNe=O(()=>{m();kyt=["get","set","setex"],WK=["get","mget"],Pyt=["set","setex"]});var KNe,JNe,vF,sO,ZNe,Uyt,Lyt,WNe,Qyt,XNe,eOe=O(()=>{m();KNe=ie(BNe(),1),JNe=ie(zNe(),1);dt();mr();YNe();vF="Redis",sO={},ZNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=$Ne(t,n),i=XK(t);if(!o||!i||!sO.cachePrefixes||!VNe(t,o,sO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qNe(r);d&&e.setAttribute(rV,d),aO(WK,t)&&d!==void 0&&e.setAttribute(tV,d>0),e.setAttributes({[Xt]:i,[nV]:o});let g=o.join(", ");e.updateName(sO.maxCacheKeyLength?p_(g,sO.maxCacheKeyLength):g)},Uyt=st(`${vF}.IORedis`,()=>new KNe.IORedisInstrumentation({responseHook:ZNe})),Lyt=st(`${vF}.Redis`,()=>new JNe.RedisInstrumentation({responseHook:ZNe})),WNe=Object.assign(()=>{Uyt(),Lyt()},{id:vF}),Qyt=(e={})=>({name:vF,setupOnce(){sO=e,WNe()}}),XNe=Qyt});var tOe=F(RF=>{"use strict";m();Object.defineProperty(RF,"__esModule",{value:!0});RF.EVENT_LISTENERS_SET=void 0;RF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var eJ=F(uO=>{"use strict";m();Object.defineProperty(uO,"__esModule",{value:!0});uO.AttributeNames=void 0;var Fyt;(function(e){e.PG_VALUES="db.postgresql.values",e.PG_PLAN="db.postgresql.plan",e.IDLE_TIMEOUT_MILLIS="db.postgresql.idle.timeout.millis",e.MAX_CLIENT="db.postgresql.max.client"})(Fyt=uO.AttributeNames||(uO.AttributeNames={}))});var tJ=F(xr=>{"use strict";m();Object.defineProperty(xr,"__esModule",{value:!0});xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=xr.METRIC_DB_CLIENT_CONNECTION_COUNT=xr.DB_SYSTEM_VALUE_POSTGRESQL=xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=xr.ATTR_NET_PEER_PORT=xr.ATTR_NET_PEER_NAME=xr.ATTR_DB_USER=xr.ATTR_DB_SYSTEM=xr.ATTR_DB_STATEMENT=xr.ATTR_DB_NAME=xr.ATTR_DB_CONNECTION_STRING=xr.ATTR_DB_CLIENT_CONNECTION_STATE=xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;xr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";xr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";xr.ATTR_DB_CONNECTION_STRING="db.connection_string";xr.ATTR_DB_NAME="db.name";xr.ATTR_DB_STATEMENT="db.statement";xr.ATTR_DB_SYSTEM="db.system";xr.ATTR_DB_USER="db.user";xr.ATTR_NET_PEER_NAME="net.peer.name";xr.ATTR_NET_PEER_PORT="net.peer.port";xr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";xr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";xr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";xr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";xr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var nJ=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SpanNames=void 0;var Gyt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Gyt=cO.SpanNames||(cO.SpanNames={}))});var uOe=F(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var W_=(je(),Me(We)),xF=eJ(),Yd=(Zn(),Me(Lr)),pi=tJ(),Ty=on(),nOe=nJ();function rOe(e,t){if(!t)return nOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:oOe(t.text);return`${nOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=rOe;function oOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}or.parseNormalizedOperationName=oOe;function iOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=iOe;function rJ(e){if("connectionString"in e&&e.connectionString)return iOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=rJ;function DF(e){if(Number.isInteger(e))return e}function aOe(e,t){let n={};return t&Ty.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:rJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:DF(e.port)}),t&Ty.SemconvStability.STABLE&&(n={...n,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:e.host,[Yd.ATTR_SERVER_PORT]:DF(e.port)}),n}or.getSemanticAttributesFromConnection=aOe;function jyt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[xF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[xF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Ty.SemconvStability.OLD&&(r={...r,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[pi.ATTR_DB_CONNECTION_STRING]:rJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||DF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Ty.SemconvStability.STABLE&&(r={...r,[Yd.ATTR_DB_SYSTEM_NAME]:Yd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Yd.ATTR_DB_NAMESPACE]:e.namespace,[Yd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Yd.ATTR_SERVER_PORT]:Number(n?.port)||DF(e.port)}),r}or.getSemanticAttributesFromPoolConnection=jyt;function zyt(e){return e.requireParentSpan===!0&&W_.trace.getSpan(W_.context.active())===void 0}or.shouldSkipInstrumentation=zyt;function Hyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=rOe(i,r),c=e.startSpan(a,{kind:W_.SpanKind.CLIENT,attributes:aOe(o,n)});if(!r)return c;if(r.text&&(n&Ty.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Ty.SemconvStability.STABLE&&c.setAttribute(Yd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(g=>g==null?"null":g instanceof Buffer?g.toString():typeof g=="object"?typeof g.toPostgres=="function"?g.toPostgres():JSON.stringify(g):g.toString());c.setAttribute(xF.AttributeNames.PG_VALUES,d)}catch(d){W_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(xF.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=Hyt;function sOe(e,t,n){typeof e.responseHook=="function"&&(0,Ty.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&W_.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=sOe;function $yt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Yd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(BF(a)),t.setStatus({code:W_.SpanStatusCode.ERROR,message:a.message})):sOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=$yt;function Vyt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}or.getPoolName=Vyt;function qyt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[pi.ATTR_DB_CLIENT_CONNECTION_STATE]:pi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[pi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=qyt;function Yyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(BF(r)),e.setStatus({code:W_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=Yyt;function Kyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(BF(r)),e.setStatus({code:W_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=Kyt;function Jyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=Jyt;function Zyt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=Zyt;function BF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=BF});var cOe=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.66.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var mOe=F(OF=>{"use strict";m();Object.defineProperty(OF,"__esModule",{value:!0});OF.PgInstrumentation=void 0;var zu=on(),Gr=(je(),Me(We)),lOe=tOe(),Ko=uOe(),dOe=FK(),pOe=cOe(),fOe=nJ(),NF=Tr(),cf=(Zn(),Me(Lr)),lO=tJ();function Hv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var oJ=class extends zu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,t),this._semconvStability=(0,zu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(cf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Gr.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(lO.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(lO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new zu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new zu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new zu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Hv(c);return this._patchPgClient(d.Client),c},c=>{let d=Hv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new zu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Hv(c);return(0,zu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Hv(c);(0,zu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Hv(t);return(0,zu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,zu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=Hv(t);return(0,zu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,zu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}recordOperationDuration(t,n){let r={},o=[cf.ATTR_DB_NAMESPACE,cf.ATTR_ERROR_TYPE,cf.ATTR_SERVER_PORT,cf.ATTR_SERVER_ADDRESS,cf.ATTR_DB_OPERATION_NAME];this._semconvStability&zu.SemconvStability.OLD&&o.push(lO.ATTR_DB_SYSTEM),this._semconvStability&zu.SemconvStability.STABLE&&o.push(cf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,NF.hrTimeToMilliseconds)((0,NF.hrTimeDuration)(n,(0,NF.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Ko.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,NF.hrTime)(),a=o[0],c=typeof a=="string",d=Ko.isObjectWithTextString(a),g=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[lO.ATTR_DB_SYSTEM]:lO.DB_SYSTEM_VALUE_POSTGRESQL,[cf.ATTR_DB_NAMESPACE]:this.database,[cf.ATTR_SERVER_PORT]:this.connectionParameters.port,[cf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[cf.ATTR_DB_OPERATION_NAME]=Ko.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Ko.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,dOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,dOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Gr.trace.getSpan(Gr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Ko.patchCallback(y,C,o[o.length-1],h,S),N&&(o[o.length-1]=Gr.context.bind(Gr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Ko.patchCallback(t.getConfig(),C,g.callback,h,S);N&&(k=Gr.context.bind(Gr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,zu.safeExecuteInTheMiddle)(()=>{let{database:N,host:k,port:Q,user:j}=this.connectionParameters;v(C,{connection:{database:N,host:k,port:Q,user:j},query:{text:g.text,values:g.values,name:g.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let x;try{x=n.apply(this,o)}catch(N){throw N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(N)}),C.end(),N}return x instanceof Promise?x.then(N=>new Promise(k=>{Ko.handleExecutionResult(t.getConfig(),C,N),S(),C.end(),k(N)})).catch(N=>new Promise((k,Q)=>{N instanceof Error&&C.recordException(Ko.sanitizedErrorMessage(N)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[lOe.EVENT_LISTENERS_SET])return;let n=Ko.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Ko.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[lOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Ko.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(fOe.SpanNames.POOL_CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return AOe(a,c)}}};OF.PgInstrumentation=oJ;function AOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Gr.context.bind(Gr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Gr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var gOe=F($v=>{"use strict";m();Object.defineProperty($v,"__esModule",{value:!0});$v.AttributeNames=$v.PgInstrumentation=void 0;var Wyt=mOe();Object.defineProperty($v,"PgInstrumentation",{enumerable:!0,get:function(){return Wyt.PgInstrumentation}});var Xyt=eJ();Object.defineProperty($v,"AttributeNames",{enumerable:!0,get:function(){return Xyt.AttributeNames}})});var hOe,_Oe,EOe,eTt,SOe,yOe=O(()=>{m();hOe=ie(gOe(),1);mr();_Oe="Postgres",EOe=st(_Oe,hOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),eTt=e=>({name:_Oe,setupOnce(){EOe(e)}}),SOe=eTt});var X_,aJ,TOe,tTt,nTt,IOe,iJ,rTt,COe,bOe=O(()=>{m();je();X_=ie(on(),1);Zn();dt();mr();py();aJ="PostgresJs",TOe=[">=3.0.0 <4"],tTt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,nTt=Symbol.for("sentry.query.from.instrumented.sql"),IOe=st(aJ,e=>new iJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),iJ=class extends X_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new X_.InstrumentationNodeModuleDefinition("postgres",TOe,n=>{try{return this._patchPostgres(n)}catch(r){return ya&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new X_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,TOe,this._patchQueryPrototype.bind(this),this._unpatchQueryPrototype.bind(this)))}),t}_patchPostgres(t){let n=typeof t=="function",r=n?t:t.default;if(typeof r!="function")return ya&&J.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return ya&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return iq(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(iN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ht.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(ZC,r);return}let o=n?.match(tTt);o?.[1]&&t.setAttribute(ZC,o[1].toUpperCase())}_reconstructQuery(t){if(t?.length)return t.length===1?t[0]||void 0:t.reduce((n,r,o)=>o===0?r:`${n}$${o}${r}`,"")}_sanitizeSqlQuery(t){return t?t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").replace(/;\s*$/,"").replace(/\s+/g," ").trim().replace(/\bX'[0-9A-Fa-f]*'/gi,"?").replace(/\bB'[01]*'/gi,"?").replace(/'(?:[^']|'')*'/g,"?").replace(/\b0x[0-9A-Fa-f]+/gi,"?").replace(/\b(?:TRUE|FALSE)\b/gi,"?").replace(/-?\b\d+\.?\d*[eE][+-]?\d+\b/g,"?").replace(/-?\b\d+\.\d+\b/g,"?").replace(/-?\.\d+\b/g,"?").replace(/(?<!\$)-?\b\d+\b/g,"?").replace(/\bIN\b\s*\(\s*\?(?:\s*,\s*\?)*\s*\)/gi,"IN (?)").replace(/\bIN\b\s*\(\s*\$\d+(?:\s*,\s*\$\d+)*\s*\)/gi,"IN ($?)"):"Unknown SQL Query"}_patchQueryPrototype(t){let n=this,r=t.Query.prototype.handle;return t.Query.prototype.handle=async function(...o){if(this[nTt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Za({name:a||"postgresjs.query",op:"db"},c=>{Qr(c,"auto.db.postgresjs"),c.setAttributes({[NS]:"postgres",[h5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,X_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),ya&&J.error(`Error in requestHook for ${aJ} integration:`,y))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(y,C,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){ya&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(y,C,v)}});let S=this.reject;this.reject=new Proxy(S,{apply:(y,C,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(_5,v?.[0]?.code||"unknown"),c.setAttribute(E5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){ya&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(y,C,v)}});try{return r.apply(this,o)}catch(y){throw c.setStatus({code:2,message:y instanceof Error?y.message:"unknown_error"}),c.end(),y}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},rTt=e=>({name:aJ,setupOnce(){IOe(e)}}),COe=rTt});var vOe=F(dO=>{"use strict";m();Object.defineProperty(dO,"__esModule",{value:!0});dO.SeverityNumber=void 0;var oTt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(oTt=dO.SeverityNumber||(dO.SeverityNumber={}))});var kF=F(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.NOOP_LOGGER=Vv.NoopLogger=void 0;var wF=class{emit(t){}};Vv.NoopLogger=wF;Vv.NOOP_LOGGER=new wF});var MF=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.NOOP_LOGGER_PROVIDER=qv.NoopLoggerProvider=void 0;var iTt=kF(),PF=class{getLogger(t,n,r){return new iTt.NoopLogger}};qv.NoopLoggerProvider=PF;qv.NOOP_LOGGER_PROVIDER=new PF});var uJ=F(UF=>{"use strict";m();Object.defineProperty(UF,"__esModule",{value:!0});UF.ProxyLogger=void 0;var aTt=kF(),sJ=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):aTt.NOOP_LOGGER}};UF.ProxyLogger=sJ});var lJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLoggerProvider=void 0;var sTt=MF(),uTt=uJ(),cJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new uTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:sTt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};LF.ProxyLoggerProvider=cJ});var ROe=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF._globalThis=void 0;QF._globalThis=typeof globalThis=="object"?globalThis:global});var xOe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;var cTt=ROe();Object.defineProperty(FF,"_globalThis",{enumerable:!0,get:function(){return cTt._globalThis}})});var DOe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var lTt=xOe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return lTt._globalThis}})});var BOe=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.API_BACKWARDS_COMPATIBILITY_VERSION=MA.makeGetter=MA._global=MA.GLOBAL_LOGS_API_KEY=void 0;var dTt=DOe();MA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");MA._global=dTt._globalThis;function pTt(e,t,n){return r=>r===e?t:n}MA.makeGetter=pTt;MA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var OOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF.LogsAPI=void 0;var Kd=BOe(),fTt=MF(),NOe=lJ(),dJ=class e{constructor(){this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Kd._global[Kd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Kd._global[Kd.GLOBAL_LOGS_API_KEY]=(0,Kd.makeGetter)(Kd.API_BACKWARDS_COMPATIBILITY_VERSION,t,fTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Kd._global[Kd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Kd._global,Kd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Kd._global[Kd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new NOe.ProxyLoggerProvider}};jF.LogsAPI=dJ});var pJ=F(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.logs=ns.ProxyLoggerProvider=ns.ProxyLogger=ns.NoopLoggerProvider=ns.NOOP_LOGGER_PROVIDER=ns.NoopLogger=ns.NOOP_LOGGER=ns.SeverityNumber=void 0;var ATt=vOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return ATt.SeverityNumber}});var wOe=kF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return wOe.NoopLogger}});var kOe=MF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return kOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return kOe.NoopLoggerProvider}});var mTt=uJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return mTt.ProxyLogger}});var gTt=lJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return gTt.ProxyLoggerProvider}});var hTt=OOe();ns.logs=hTt.LogsAPI.getInstance()});var POe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.disableInstrumentations=Yv.enableInstrumentations=void 0;function _Tt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Yv.enableInstrumentations=_Tt;function ETt(e){e.forEach(t=>t.disable())}Yv.disableInstrumentations=ETt});var LOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var MOe=(je(),Me(We)),STt=pJ(),UOe=POe();function yTt(e){let t=e.tracerProvider||MOe.trace.getTracerProvider(),n=e.meterProvider||MOe.metrics.getMeterProvider(),r=e.loggerProvider||STt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,UOe.enableInstrumentations)(o,t,n,r),()=>{(0,UOe.disableInstrumentations)(o)}}zF.registerInstrumentations=yTt});var qOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.satisfies=void 0;var gJ=(je(),Me(We)),zOe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,TTt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,ITt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function CTt(e,t,n){if(!bTt(e))return gJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=DTt(e);if(!r)return!1;let o=[],i=HOe(r,t,o,n);return i&&!n?.includePrerelease?RTt(r,o):i}HF.satisfies=CTt;function bTt(e){return typeof e=="string"&&zOe.test(e)}function HOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(fJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=JTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!fJ(e,i,n,r))return!1;return!0}return fJ(e,t,n,r)}function fJ(e,t,n,r){if(t=xTt(t,r),t.includes(" "))return HOe(e,t,n,r);{let o=BTt(t);return n.push(o),vTt(e,o)}}function vTt(e,t){if(t.invalid)return!1;if(!t.version||mJ(t.version))return!0;let n=FOe(e.versionSegments||[],t.versionSegments||[]);if(n===0){let r=e.prereleaseSegments||[],o=t.prereleaseSegments||[];!r.length&&!o.length?n=0:!r.length&&o.length?n=1:r.length&&!o.length?n=-1:n=FOe(r,o)}return ITt[t.op]?.includes(n)}function RTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function xTt(e,t){return e=e.trim(),e=YTt(e,t),e=qTt(e),e=KTt(e,t),e=e.trim(),e}function Hu(e){return!e||e.toLowerCase()==="x"||e==="*"}function DTt(e){let t=e.match(zOe);if(!t){gJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function BTt(e){if(!e)return{};let t=e.match(TTt);if(!t)return gJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function mJ(e){return e==="*"||e==="x"||e==="X"}function QOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function NTt(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function OTt(e,t){if(mJ(e)||mJ(t))return 0;let[n,r]=NTt(QOe(e),QOe(t));return n>r?1:n<r?-1:0}function FOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=OTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $Oe="[a-zA-Z0-9-]",VOe="0|[1-9]\\d*",wTt=`\\d*[a-zA-Z-]${$Oe}*`,kTt="((?:<|>)?=?)",GOe=`(?:${VOe}|${wTt})`,PTt=`(?:-(${GOe}(?:\\.${GOe})*))`,jOe=`${$Oe}+`,MTt=`(?:\\+(${jOe}(?:\\.${jOe})*))`,AJ=`${VOe}|x|X|\\*`,pO=`[v=\\s]*(${AJ})(?:\\.(${AJ})(?:\\.(${AJ})(?:${PTt})?${MTt}?)?)?`,UTt=`^${kTt}\\s*${pO}$`,LTt=new RegExp(UTt),QTt=`^\\s*(${pO})\\s+-\\s+(${pO})\\s*$`,FTt=new RegExp(QTt),GTt="(?:~>?)",jTt=`^${GTt}${pO}$`,zTt=new RegExp(jTt),HTt="(?:\\^)",$Tt=`^${HTt}${pO}$`,VTt=new RegExp($Tt);function qTt(e){let t=zTt;return e.replace(t,(n,r,o,i,a)=>{let c;return Hu(r)?c="":Hu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Hu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function YTt(e,t){let n=VTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Hu(i)?g="":Hu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Hu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function KTt(e,t){let n=LTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=Hu(i),h=g||Hu(a),S=h||Hu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function JTt(e,t){let n=FTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Hu(i)?o="":Hu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Hu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Hu(S)?h="":Hu(y)?h=`<${+S+1}.0.0-0`:Hu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var hJ=F(Os=>{"use strict";m();Object.defineProperty(Os,"__esModule",{value:!0});Os.massUnwrap=Os.unwrap=Os.massWrap=Os.wrap=void 0;var $u=console.error.bind(console);function fO(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var ZTt=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return fO(o,"__original",r),fO(o,"__unwrap",()=>{e[t]===o&&fO(e,t,r)}),fO(o,"__wrapped",!0),fO(e,t,o),o};Os.wrap=ZTt;var WTt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Os.wrap)(r,o,n)})})};Os.massWrap=WTt;var XTt=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Os.unwrap=XTt;var eIt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Os.unwrap)(n,r)})})};Os.massUnwrap=eIt;function AO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=AO;AO.wrap=Os.wrap;AO.massWrap=Os.massWrap;AO.unwrap=Os.unwrap;AO.massUnwrap=Os.massUnwrap});var YOe=F(VF=>{"use strict";m();Object.defineProperty(VF,"__esModule",{value:!0});VF.InstrumentationAbstract=void 0;var _J=(je(),Me(We)),tIt=pJ(),$F=hJ(),EJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=_J.diag.createComponentLogger({namespace:t}),this._tracer=_J.trace.getTracer(t,n),this._meter=_J.metrics.getMeter(t,n),this._logger=tIt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=$F.wrap;_unwrap=$F.unwrap;_massWrap=$F.massWrap;_massUnwrap=$F.massUnwrap;get meter(){return this._meter}setMeterProvider(t){this._meter=t.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(t){this._logger=t.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){let t=this.init()??[];return Array.isArray(t)?t:[t]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(t){this._config={enabled:!0,...t}}setTracerProvider(t){this._tracer=t.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(t,n,r,o){if(t)try{t(r,o)}catch(i){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:n},i)}}};VF.InstrumentationAbstract=EJ});var KOe=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.ModuleNameTrie=eE.ModuleNameSeparator=void 0;eE.ModuleNameSeparator="/";var qF=class{hooks=[];children=new Map},SJ=class{_trie=new qF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(eE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new qF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(eE.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};eE.ModuleNameTrie=SJ});var ZOe=F(YF=>{"use strict";m();Object.defineProperty(YF,"__esModule",{value:!0});YF.RequireInTheMiddleSingleton=void 0;var nIt=US(),JOe=Ge("path"),yJ=KOe(),rIt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),TJ=class e{_moduleNameTrie=new yJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new nIt.Hook(null,{internals:!0},(t,n,r)=>{let o=oIt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return rIt?new e:this._instance=this._instance??new e}};YF.RequireInTheMiddleSingleton=TJ;function oIt(e){return JOe.sep!==yJ.ModuleNameSeparator?e.split(JOe.sep).join(yJ.ModuleNameSeparator):e}});var IJ=F(tE=>{"use strict";m();Object.defineProperty(tE,"__esModule",{value:!0});tE.isWrapped=tE.safeExecuteInTheMiddleAsync=tE.safeExecuteInTheMiddle=void 0;function iIt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}tE.safeExecuteInTheMiddle=iIt;async function aIt(e,t,n){let r,o;try{o=await e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}tE.safeExecuteInTheMiddleAsync=aIt;function sIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}tE.isWrapped=sIt});var ewe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.InstrumentationBase=void 0;var mO=Ge("path"),WOe=Ge("util"),uIt=qOe(),CJ=hJ(),cIt=YOe(),lIt=ZOe(),dIt=oK(),gO=(je(),Me(We)),pIt=US(),fIt=Ge("fs"),AIt=IJ(),bJ=class extends cIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=lIt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,AIt.isWrapped)(t[n])&&this._unwrap(t,n),WOe.types.isProxy(t)){let o=(0,CJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,CJ.wrap)(t,n,r)};_unwrap=(t,n)=>WOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,CJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{gO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{gO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){gO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,fIt.readFileSync)(mO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{gO.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return XOe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=mO.normalize(r);return a.filter(g=>g.name===c).filter(g=>XOe(g.supportedVersions,i,t.includePrerelease)).reduce((g,h)=>(h.moduleExports=g,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(g,t.moduleVersion)):g),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&mO.isAbsolute(c)){let g=mO.parse(c);c=g.name,d=g.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=mO.isAbsolute(t.name)?new pIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new dIt.Hook([t.name],{internals:!1},n);this._hooks.push(i)}}}disable(){if(this._enabled){this._enabled=!1;for(let t of this._modules){typeof t.unpatch=="function"&&t.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module on instrumentation disabled",{module:t.name,version:t.moduleVersion}),t.unpatch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Removing instrumentation patch for nodejs module file on instrumentation disabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.unpatch(n.moduleExports,t.moduleVersion))}}}isEnabled(){return this._enabled}};KF.InstrumentationBase=bJ;function XOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,uIt.satisfies)(t,r,{includePrerelease:n}))}});var twe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.normalize=void 0;var mIt=Ge("path");Object.defineProperty(JF,"normalize",{enumerable:!0,get:function(){return mIt.normalize}})});var nwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.normalize=Kv.InstrumentationBase=void 0;var gIt=ewe();Object.defineProperty(Kv,"InstrumentationBase",{enumerable:!0,get:function(){return gIt.InstrumentationBase}});var hIt=twe();Object.defineProperty(Kv,"normalize",{enumerable:!0,get:function(){return hIt.normalize}})});var vJ=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.normalize=Jv.InstrumentationBase=void 0;var rwe=nwe();Object.defineProperty(Jv,"InstrumentationBase",{enumerable:!0,get:function(){return rwe.InstrumentationBase}});Object.defineProperty(Jv,"normalize",{enumerable:!0,get:function(){return rwe.normalize}})});var owe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.InstrumentationNodeModuleDefinition=void 0;var RJ=class{name;supportedVersions;patch;unpatch;files;constructor(t,n,r,o,i){this.name=t,this.supportedVersions=n,this.patch=r,this.unpatch=o,this.files=i||[]}};ZF.InstrumentationNodeModuleDefinition=RJ});var iwe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleFile=void 0;var _It=vJ(),xJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,_It.normalize)(t)}};WF.InstrumentationNodeModuleFile=xJ});var awe=F(Iy=>{"use strict";m();Object.defineProperty(Iy,"__esModule",{value:!0});Iy.semconvStabilityFromStr=Iy.SemconvStability=void 0;var XF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(XF=Iy.SemconvStability||(Iy.SemconvStability={}));function EIt(e,t){let n=XF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=XF.DUPLICATE;break}else o.toLowerCase()===e&&(n=XF.STABLE);return n}Iy.semconvStabilityFromStr=EIt});var uwe=F(na=>{"use strict";m();Object.defineProperty(na,"__esModule",{value:!0});na.semconvStabilityFromStr=na.SemconvStability=na.safeExecuteInTheMiddleAsync=na.safeExecuteInTheMiddle=na.isWrapped=na.InstrumentationNodeModuleFile=na.InstrumentationNodeModuleDefinition=na.InstrumentationBase=na.registerInstrumentations=void 0;var SIt=LOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return SIt.registerInstrumentations}});var yIt=vJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return yIt.InstrumentationBase}});var TIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return TIt.InstrumentationNodeModuleDefinition}});var IIt=iwe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return IIt.InstrumentationNodeModuleFile}});var DJ=IJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return DJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return DJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return DJ.safeExecuteInTheMiddleAsync}});var swe=awe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return swe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return swe.semconvStabilityFromStr}})});function vIt(){let e=Zv[NJ];return e?.helper?e.helper:Zv[BJ]?.helper}function RIt(e){let t={helper:e};Zv[NJ]=t,Zv[BJ]=t}function xIt(){delete Zv[NJ],delete Zv[BJ]}function NIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function dwe(e,t,n,r,o){if(pwe(t.name,o))return;let i={attributes:t.attributes,kind:NIt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let g=r.get(d);return g?{context:{spanId:g,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dwe(e,d,n,r,o);a.end(t.endTime)})}function cwe(e,t){return wIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function wIt(e){return e!=null&&typeof e.then=="function"}function pwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var e3,CIt,bIt,BJ,NJ,Zv,DIt,BIt,OIt,fwe,lwe,kIt,PIt,Awe,mwe=O(()=>{m();je();e3=ie(uwe(),1);je();CIt={name:"@prisma/instrumentation-contract",version:"7.6.0",description:"Shared types and utilities for Prisma instrumentation",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.mts",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-contract"},bugs:"https://github.com/prisma/prisma/issues",scripts:{dev:"DEV=true tsx helpers/build.ts",build:"tsx helpers/build.ts",prepublishOnly:"pnpm run build",test:"vitest run"},files:["dist"],sideEffects:!1,devDependencies:{"@opentelemetry/api":"1.9.0"},peerDependencies:{"@opentelemetry/api":"^1.8"}},bIt=CIt.version.split(".")[0],BJ="PRISMA_INSTRUMENTATION",NJ=`V${bIt}_PRISMA_INSTRUMENTATION`,Zv=globalThis;DIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",BIt="00-10-10-00";OIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ht.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:BIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!DIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cwe(i,t(i,r)))}};fwe={name:"@prisma/instrumentation",version:"7.6.0",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:{"@opentelemetry/api":"1.9.0","@prisma/instrumentation-contract":"workspace:*","@types/node":"~20.19.24",typescript:"5.4.5"},dependencies:{"@opentelemetry/instrumentation":"^0.207.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:"vitest run"},sideEffects:!1},lwe=fwe.version,kIt=fwe.name,PIt="@prisma/client",Awe=class extends e3.InstrumentationBase{tracerProvider;constructor(e={}){super(kIt,lwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new e3.InstrumentationNodeModuleDefinition(PIt,[lwe])]}enable(){let e=this._config;RIt(new OIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){xIt()}isEnabled(){return vIt()!==void 0}}});function MIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function UIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var gwe,OJ,LIt,_we,Ewe=O(()=>{m();je();mwe();dt();mr();gwe="Prisma";OJ=class extends Awe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hwe();MIt(t)&&(t.createEngineSpan=n=>{let r=Ht.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Vo(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=UIt(i.kind),c=i.parent_span_id,d=i.span_id,g=i.trace_id,h=i.links?.map(y=>({context:{traceId:y.trace_id,spanId:y.span_id,traceFlags:Ks.SAMPLED}})),S=Ht.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Ks.SAMPLED});Ke.with(S,()=>{let y={generateTraceId:()=>g,generateSpanId:()=>d};r._idGenerator=y,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};LIt=st(gwe,e=>new OJ(e)),_we=e=>({name:gwe,setupOnce(){LIt(e)},setup(t){hwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var Swe=F(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.PACKAGE_NAME=Wv.PACKAGE_VERSION=void 0;Wv.PACKAGE_VERSION="0.60.0";Wv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var wJ=F(UA=>{"use strict";m();Object.defineProperty(UA,"__esModule",{value:!0});UA.HapiLifecycleMethodNames=UA.HapiLayerType=UA.handlerPatched=UA.HapiComponentName=void 0;UA.HapiComponentName="@hapi/hapi";UA.handlerPatched=Symbol("hapi-handler-patched");UA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};UA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var ywe=F(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.ATTR_HTTP_METHOD=void 0;t3.ATTR_HTTP_METHOD="http.method"});var kJ=F(hO=>{"use strict";m();Object.defineProperty(hO,"__esModule",{value:!0});hO.AttributeNames=void 0;var QIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(QIt=hO.AttributeNames||(hO.AttributeNames={}))});var Cwe=F(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.getPluginFromInput=ra.getExtMetadata=ra.getRouteMetadata=ra.isPatchableExtMethod=ra.isDirectExtInput=ra.isLifecycleExtEventObj=ra.isLifecycleExtType=ra.getPluginName=void 0;var Twe=(Zn(),Me(Lr)),FIt=ywe(),_O=wJ(),nE=kJ(),Iwe=on();function GIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=GIt;var jIt=e=>typeof e=="string"&&_O.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=jIt;var zIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=zIt;var HIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=HIt;var $It=e=>!Array.isArray(e);ra.isPatchableExtMethod=$It;var VIt=(e,t,n)=>{let r={[Twe.ATTR_HTTP_ROUTE]:e.path};t&Iwe.SemconvStability.OLD&&(r[FIt.ATTR_HTTP_METHOD]=e.method),t&Iwe.SemconvStability.STABLE&&(r[Twe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[nE.AttributeNames.HAPI_TYPE]=_O.HapiLayerType.PLUGIN,r[nE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[nE.AttributeNames.HAPI_TYPE]=_O.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=VIt;var qIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[nE.AttributeNames.EXT_TYPE]:e,[nE.AttributeNames.HAPI_TYPE]:_O.HapiLayerType.EXT,[nE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[nE.AttributeNames.EXT_TYPE]:e,[nE.AttributeNames.HAPI_TYPE]:_O.HapiLayerType.EXT},name:r}};ra.getExtMetadata=qIt;var YIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=YIt});var Rwe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.HapiInstrumentation=void 0;var Ql=(je(),Me(We)),bwe=Tr(),EO=on(),vwe=Swe(),SO=wJ(),Og=Cwe(),PJ=class extends EO.InstrumentationBase{_semconvStability;constructor(t={}){super(vwe.PACKAGE_NAME,vwe.PACKAGE_VERSION,t),this._semconvStability=(0,EO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new EO.InstrumentationNodeModuleDefinition(SO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,EO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,EO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Og.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Og.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Og.isLifecycleExtType)(d.type)){let g=d,h=r._wrapExtMethods(g.method,d.type,n);g.method=h,a[c]=g}}return t.apply(this,i)}else if((0,Og.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Og.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Og.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",g=>n._getServerRoutePatch.bind(n)(g,r)),i._wrap(c,"ext",g=>n._getServerExtPatch.bind(n)(g,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Og.isPatchableExtMethod)(t))return t[SO.handlerPatched]===!0?t:(t[SO.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Og.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Ql.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[SO.handlerPatched]===!0)return t;t[SO.handlerPatched]=!0;let o=i=>async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await i.call(this,...a);let c=(0,bwe.getRPCMetadata)(Ql.context.active());c?.type===bwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Og.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Ql.context.with(Ql.trace.setSpan(Ql.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Ql.SpanStatusCode.ERROR,message:h.message}),h}finally{g.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};n3.HapiInstrumentation=PJ});var xwe=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.AttributeNames=Xv.HapiInstrumentation=void 0;var KIt=Rwe();Object.defineProperty(Xv,"HapiInstrumentation",{enumerable:!0,get:function(){return KIt.HapiInstrumentation}});var JIt=kJ();Object.defineProperty(Xv,"AttributeNames",{enumerable:!0,get:function(){return JIt.AttributeNames}})});var Dwe,Bwe,Nwe,ZIt,Owe,wwe=O(()=>{m();Dwe=ie(xwe(),1);mr();Bwe="Hapi",Nwe=st(Bwe,()=>new Dwe.HapiInstrumentation),ZIt=()=>({name:Bwe,setupOnce(){Nwe()}}),Owe=ZIt});var rE,yO,MJ=O(()=>{m();rE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},yO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var o3,WIt,XIt,r3,kwe=O(()=>{m();je();o3=ie(on(),1);dt();MJ();WIt="@sentry/instrumentation-hono",XIt="0.0.1",r3=class extends o3.InstrumentationBase{constructor(t={}){super(WIt,XIt,t)}init(){return[new o3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return Ke.with(Ht.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Is(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[rE.HONO_TYPE]:g,[rE.HONO_NAME]:g===yO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[rE.HONO_TYPE]:d,[rE.HONO_NAME]:d===yO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return Is(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?yO.MIDDLEWARE:yO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function eCt(e){let t=Ot(e).data,n=t[rE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[rE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),bn()===kd()){ya&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ig],i=t[OS];typeof o=="string"&&typeof i=="string"&&bn().setTransactionName(`${i} ${o}`)}var Pwe,Mwe,tCt,Uwe,Lwe=O(()=>{m();Zn();dt();mr();py();MJ();kwe();Pwe="Hono";Mwe=st(Pwe,()=>new r3({responseHook:e=>{eCt(e)}})),tCt=()=>({name:Pwe,setupOnce(){Mwe()}}),Uwe=tCt});var i3=F(TO=>{"use strict";m();Object.defineProperty(TO,"__esModule",{value:!0});TO.KoaLayerType=void 0;var nCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(nCt=TO.KoaLayerType||(TO.KoaLayerType={}))});var Qwe=F(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.PACKAGE_NAME=eR.PACKAGE_VERSION=void 0;eR.PACKAGE_VERSION="0.62.0";eR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var UJ=F(IO=>{"use strict";m();Object.defineProperty(IO,"__esModule",{value:!0});IO.AttributeNames=void 0;var rCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(rCt=IO.AttributeNames||(IO.AttributeNames={}))});var Gwe=F(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.isLayerIgnored=tR.getMiddlewareMetadata=void 0;var Fwe=i3(),a3=UJ(),oCt=(Zn(),Me(Lr)),iCt=(e,t,n,r)=>n?{attributes:{[a3.AttributeNames.KOA_NAME]:r?.toString(),[a3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.ROUTER,[oCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[a3.AttributeNames.KOA_NAME]:t.name??"middleware",[a3.AttributeNames.KOA_TYPE]:Fwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};tR.getMiddlewareMetadata=iCt;var aCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));tR.isLayerIgnored=aCt});var jwe=F(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.kLayerPatched=void 0;s3.kLayerPatched=Symbol("koa-layer-patched")});var Ywe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.KoaInstrumentation=void 0;var LA=(je(),Me(We)),CO=on(),zwe=i3(),Hwe=Qwe(),$we=Gwe(),Vwe=Tr(),qwe=jwe(),LJ=class extends CO.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return new CO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,CO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use"),this._wrap(n.prototype,"use",this._getKoaUsePatch.bind(this)),t)},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;(0,CO.isWrapped)(n.prototype.use)&&this._unwrap(n.prototype,"use")})}_getKoaUsePatch(t){let n=this;return function(o){let i;return o.router?i=n._patchRouterDispatch(o):i=n._patchLayer(o,!1),t.apply(this,[i])}}_patchRouterDispatch(t){LA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?zwe.KoaLayerType.ROUTER:zwe.KoaLayerType.MIDDLEWARE;return t[qwe.kLayerPatched]===!0||(0,$we.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(LA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qwe.kLayerPatched]=!0,LA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(LA.trace.getSpan(LA.context.active())===void 0)return t(i,a);let d=(0,$we.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,Vwe.getRPCMetadata)(LA.context.active());h?.type===Vwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,CO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&LA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=LA.trace.setSpan(LA.context.active(),g);return LA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};u3.KoaInstrumentation=LJ});var Kwe=F(oE=>{"use strict";m();Object.defineProperty(oE,"__esModule",{value:!0});oE.KoaLayerType=oE.AttributeNames=oE.KoaInstrumentation=void 0;var sCt=Ywe();Object.defineProperty(oE,"KoaInstrumentation",{enumerable:!0,get:function(){return sCt.KoaInstrumentation}});var uCt=UJ();Object.defineProperty(oE,"AttributeNames",{enumerable:!0,get:function(){return uCt.AttributeNames}});var cCt=i3();Object.defineProperty(oE,"KoaLayerType",{enumerable:!0,get:function(){return cCt.KoaLayerType}})});var Jwe,Zwe,Wwe,lCt,Xwe,eke=O(()=>{m();Jwe=ie(Kwe(),1);Zn();dt();mr();py();Zwe="Koa",Wwe=st(Zwe,Jwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Qr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),bn()===kd()){ya&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ig],c=n.context?.request?.method?.toUpperCase()||"GET";a&&bn().setTransactionName(`${c} ${a}`)}})),lCt=(e={})=>({name:Zwe,setupOnce(){Wwe(e)}}),Xwe=lCt});var QJ=F(lf=>{"use strict";m();Object.defineProperty(lf,"__esModule",{value:!0});lf.ConnectNames=lf.ConnectTypes=lf.AttributeNames=void 0;var dCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(dCt=lf.AttributeNames||(lf.AttributeNames={}));var pCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(pCt=lf.ConnectTypes||(lf.ConnectTypes={}));var fCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(fCt=lf.ConnectNames||(lf.ConnectNames={}))});var tke=F(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.PACKAGE_NAME=nR.PACKAGE_VERSION=void 0;nR.PACKAGE_VERSION="0.57.0";nR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nke=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3._LAYERS_STORE_PROPERTY=void 0;c3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rke=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.generateRoute=aE.replaceCurrentStackRoute=aE.addNewStackLayer=void 0;var ACt=(je(),Me(We)),iE=nke(),mCt=e=>{Array.isArray(e[iE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,iE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[iE._LAYERS_STORE_PROPERTY].push("/");let t=e[iE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[iE._LAYERS_STORE_PROPERTY].length?e[iE._LAYERS_STORE_PROPERTY].pop():ACt.diag.warn("Connect: Trying to pop the stack multiple time")}};aE.addNewStackLayer=mCt;var gCt=(e,t)=>{t&&e[iE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};aE.replaceCurrentStackRoute=gCt;var hCt=e=>e[iE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);aE.generateRoute=hCt});var ake=F(sE=>{"use strict";m();Object.defineProperty(sE,"__esModule",{value:!0});sE.ConnectInstrumentation=sE.ANONYMOUS_NAME=void 0;var _Ct=(je(),Me(We)),oke=Tr(),rR=QJ(),ike=tke(),l3=on(),ECt=(Zn(),Me(Lr)),FJ=rke();sE.ANONYMOUS_NAME="anonymous";var GJ=class extends l3.InstrumentationBase{constructor(t={}){super(ike.PACKAGE_NAME,ike.PACKAGE_VERSION,t)}init(){return[new l3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,l3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,l3.isWrapped)(t.handle)||this._wrap(t,"handle",this._patchHandle.bind(this))}_patchConstructor(t){let n=this;return function(...r){let o=t.apply(this,r);return n._patchApp(o),o}}_patchNext(t,n){return function(o){let i=t.apply(this,[o]);return n(),i}}_startSpan(t,n){let r,o,i;t?(r=rR.ConnectTypes.REQUEST_HANDLER,i=rR.ConnectNames.REQUEST_HANDLER,o=t):(r=rR.ConnectTypes.MIDDLEWARE,i=rR.ConnectNames.MIDDLEWARE,o=n.name||sE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[ECt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[rR.AttributeNames.CONNECT_TYPE]:r,[rR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],g=arguments[a],h=arguments[c],S=arguments[d];(0,FJ.replaceCurrentStackRoute)(g,t);let y=(0,oke.getRPCMetadata)(_Ct.context.active());t&&y?.type===oke.RPCType.HTTP&&(y.route=(0,FJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||sE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function N(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(S,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,FJ.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};sE.ConnectInstrumentation=GJ});var uke=F(Jd=>{"use strict";m();Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ConnectTypes=Jd.ConnectNames=Jd.AttributeNames=Jd.ANONYMOUS_NAME=Jd.ConnectInstrumentation=void 0;var ske=ake();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ske.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ske.ANONYMOUS_NAME}});var jJ=QJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return jJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return jJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return jJ.ConnectTypes}})});var cke,lke,dke,SCt,pke,fke=O(()=>{m();cke=ie(uke(),1);mr();lke="Connect",dke=st(lke,()=>new cke.ConnectInstrumentation),SCt=()=>({name:lke,setupOnce(){dke()}}),pke=SCt});var Ake=F(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.DB_SYSTEM_VALUE_MSSQL=rs.ATTR_NET_PEER_PORT=rs.ATTR_NET_PEER_NAME=rs.ATTR_DB_USER=rs.ATTR_DB_SYSTEM=rs.ATTR_DB_STATEMENT=rs.ATTR_DB_SQL_TABLE=rs.ATTR_DB_NAME=void 0;rs.ATTR_DB_NAME="db.name";rs.ATTR_DB_SQL_TABLE="db.sql.table";rs.ATTR_DB_STATEMENT="db.statement";rs.ATTR_DB_SYSTEM="db.system";rs.ATTR_DB_USER="db.user";rs.ATTR_NET_PEER_NAME="net.peer.name";rs.ATTR_NET_PEER_PORT="net.peer.port";rs.DB_SYSTEM_VALUE_MSSQL="mssql"});var mke=F(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.once=oR.getSpanName=void 0;function yCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}oR.getSpanName=yCt;var TCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};oR.once=TCt});var gke=F(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.PACKAGE_NAME=iR.PACKAGE_VERSION=void 0;iR.PACKAGE_VERSION="0.33.0";iR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yke=F(cE=>{"use strict";m();Object.defineProperty(cE,"__esModule",{value:!0});cE.TediousInstrumentation=cE.INJECTED_CTX=void 0;var aR=(je(),Me(We)),ICt=Ge("events"),QA=on(),Cy=(Zn(),Me(Lr)),uE=Ake(),hke=mke(),_ke=gke(),Ske=Symbol("opentelemetry.instrumentation-tedious.current-database");cE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Eke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function d3(e){Object.defineProperty(this,Ske,{value:e,writable:!0})}var zJ=class e extends QA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_ke.PACKAGE_NAME,_ke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,QA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,QA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new QA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Eke)(0,QA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,QA.isWrapped)(n.connect)&&this._unwrap(n,"connect"),this._wrap(n,"connect",this._patchConnect),t},t=>{if(t===void 0)return;let n=t.Connection.prototype;for(let r of Eke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return d3.call(this,this.config?.options?.database),this.removeListener("databaseChange",d3),this.on("databaseChange",d3),this.once("end",()=>{this.removeListener("databaseChange",d3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||aR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,cE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[cE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof ICt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,g=()=>d++,h=()=>c++,S=this[Ske],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&QA.SemconvStability.OLD&&(C[uE.ATTR_DB_SYSTEM]=uE.DB_SYSTEM_VALUE_MSSQL,C[uE.ATTR_DB_NAME]=S,C[uE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[uE.ATTR_DB_STATEMENT]=y,C[uE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&QA.SemconvStability.STABLE&&(C[Cy.ATTR_DB_NAMESPACE]=S,C[Cy.ATTR_DB_SYSTEM_NAME]=Cy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[Cy.ATTR_DB_QUERY_TEXT]=y,C[Cy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&QA.SemconvStability.OLD&&(C[uE.ATTR_NET_PEER_NAME]=this.config?.server,C[uE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&QA.SemconvStability.STABLE&&(C[Cy.ATTR_SERVER_ADDRESS]=this.config?.server,C[Cy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,hke.getSpanName)(t,S,y,a.table),{kind:aR.SpanKind.CLIENT,attributes:C}),x=(0,hke.once)(G=>{a.removeListener("done",g),a.removeListener("doneInProc",g),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",d),G&&v.setStatus({code:aR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",g),a.on("doneInProc",g),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let N=()=>aR.context.with(aR.trace.setSpan(aR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};cE.TediousInstrumentation=zJ});var Tke=F(p3=>{"use strict";m();Object.defineProperty(p3,"__esModule",{value:!0});p3.TediousInstrumentation=void 0;var CCt=yke();Object.defineProperty(p3,"TediousInstrumentation",{enumerable:!0,get:function(){return CCt.TediousInstrumentation}})});var Ike,bCt,Cke,bke,vCt,vke,Rke=O(()=>{m();Ike=ie(Tke(),1);dt();mr();bCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Cke="Tedious",bke=st(Cke,()=>new Ike.TediousInstrumentation({})),vCt=()=>{let e;return{name:Cke,setupOnce(){let t=bke();e=sN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";bCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},vke=vCt});var xke=F(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.PACKAGE_NAME=sR.PACKAGE_VERSION=void 0;sR.PACKAGE_VERSION="0.57.0";sR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Bke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.GenericPoolInstrumentation=void 0;var uR=(je(),Me(We)),by=on(),Dke=xke(),HJ="generic-pool",$J=class extends by.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Dke.PACKAGE_NAME,Dke.PACKAGE_VERSION,t)}init(){return[new by.InstrumentationNodeModuleDefinition(HJ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,by.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquirePatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new by.InstrumentationNodeModuleDefinition(HJ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,by.isWrapped)(n.prototype.acquire)&&this._unwrap(n.prototype,"acquire"),this._wrap(n.prototype,"acquire",this._acquireWithCallbacksPatcher.bind(this)),t},t=>{let n=t.Pool;return this._unwrap(n.prototype,"acquire"),t}),new by.InstrumentationNodeModuleDefinition(HJ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,by.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=uR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return uR.context.with(uR.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=uR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return uR.context.with(uR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};f3.GenericPoolInstrumentation=$J});var Nke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var RCt=Bke();Object.defineProperty(A3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return RCt.GenericPoolInstrumentation}})});var Oke,wke,kke,xCt,Pke,Mke=O(()=>{m();Oke=ie(Nke(),1);dt();mr();wke="GenericPool",kke=st(wke,()=>new Oke.GenericPoolInstrumentation({})),xCt=()=>{let e;return{name:wke,setupOnce(){let t=kke();e=sN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}},Pke=xCt});var VJ=F(FA=>{"use strict";m();Object.defineProperty(FA,"__esModule",{value:!0});FA.ATTR_NET_PEER_PORT=FA.ATTR_NET_PEER_NAME=FA.ATTR_MESSAGING_SYSTEM=FA.ATTR_MESSAGING_OPERATION=void 0;FA.ATTR_MESSAGING_OPERATION="messaging.operation";FA.ATTR_MESSAGING_SYSTEM="messaging.system";FA.ATTR_NET_PEER_NAME="net.peer.name";FA.ATTR_NET_PEER_PORT="net.peer.port"});var qJ=F(fi=>{"use strict";m();Object.defineProperty(fi,"__esModule",{value:!0});fi.ATTR_MESSAGING_CONVERSATION_ID=fi.OLD_ATTR_MESSAGING_MESSAGE_ID=fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=fi.ATTR_MESSAGING_URL=fi.ATTR_MESSAGING_PROTOCOL_VERSION=fi.ATTR_MESSAGING_PROTOCOL=fi.MESSAGING_OPERATION_VALUE_PROCESS=fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=fi.ATTR_MESSAGING_DESTINATION_KIND=fi.ATTR_MESSAGING_DESTINATION=void 0;fi.ATTR_MESSAGING_DESTINATION="messaging.destination";fi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";fi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";fi.MESSAGING_OPERATION_VALUE_PROCESS="process";fi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";fi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";fi.ATTR_MESSAGING_URL="messaging.url";fi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";fi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";fi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var YJ=F(vy=>{"use strict";m();Object.defineProperty(vy,"__esModule",{value:!0});vy.DEFAULT_CONFIG=vy.EndOperation=void 0;var DCt;(function(e){e.AutoAck="auto ack",e.Ack="ack",e.AckAll="ackAll",e.Reject="reject",e.Nack="nack",e.NackAll="nackAll",e.ChannelClosed="channel closed",e.ChannelError="channel error",e.InstrumentationTimeout="instrumentation timeout"})(DCt=vy.EndOperation||(vy.EndOperation={}));vy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Fke=F(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.isConfirmChannelTracing=Ai.unmarkConfirmChannelTracing=Ai.markConfirmChannelTracing=Ai.getConnectionAttributesFromUrl=Ai.getConnectionAttributesFromServer=Ai.normalizeExchange=Ai.CONNECTION_ATTRIBUTES=Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Ai.CHANNEL_SPANS_NOT_ENDED=Ai.MESSAGE_STORED_SPAN=void 0;var KJ=(je(),Me(We)),lE=on(),m3=(Zn(),Me(Lr)),bO=VJ(),g3=qJ();Ai.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Ai.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Ai.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Ai.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var JJ=(0,KJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),BCt=e=>e!==""?e:"<default>";Ai.normalizeExchange=BCt;var NCt=e=>e.replace(/:[^:@/]*@/,":***@"),Uke=(e,t)=>e||(t==="AMQP"?5672:5671),Lke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Qke=e=>e||"localhost",GA=(e,t,n,r)=>n?{[t]:n}:(KJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),OCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[bO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=OCt;var wCt=(e,t)=>{let n={[g3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Lke(r?.protocol);Object.assign(n,{...GA(e,g3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Qke(r?.hostname);t&lE.SemconvStability.OLD&&Object.assign(n,{...GA(e,bO.ATTR_NET_PEER_NAME,i,"hostname")}),t&lE.SemconvStability.STABLE&&Object.assign(n,{...GA(e,m3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Uke(r.port,o);t&lE.SemconvStability.OLD&&Object.assign(n,GA(e,bO.ATTR_NET_PEER_PORT,a,"port")),t&lE.SemconvStability.STABLE&&Object.assign(n,GA(e,m3.ATTR_SERVER_PORT,a,"port"))}else{let r=NCt(e);n[g3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Lke(o.protocol);Object.assign(n,{...GA(r,g3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Qke(o.hostname);t&lE.SemconvStability.OLD&&Object.assign(n,{...GA(r,bO.ATTR_NET_PEER_NAME,a,"hostname")}),t&lE.SemconvStability.STABLE&&Object.assign(n,{...GA(r,m3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Uke(o.port?parseInt(o.port):void 0,i);t&lE.SemconvStability.OLD&&Object.assign(n,GA(r,bO.ATTR_NET_PEER_PORT,c,"port")),t&lE.SemconvStability.STABLE&&Object.assign(n,GA(r,m3.ATTR_SERVER_PORT,c,"port"))}catch(o){KJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=wCt;var kCt=e=>e.setValue(JJ,!0);Ai.markConfirmChannelTracing=kCt;var PCt=e=>e.deleteValue(JJ);Ai.unmarkConfirmChannelTracing=PCt;var MCt=e=>e.getValue(JJ)===!0;Ai.isConfirmChannelTracing=MCt});var Gke=F(cR=>{"use strict";m();Object.defineProperty(cR,"__esModule",{value:!0});cR.PACKAGE_NAME=cR.PACKAGE_VERSION=void 0;cR.PACKAGE_VERSION="0.61.0";cR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var zke=F(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.AmqplibInstrumentation=void 0;var Jo=(je(),Me(We)),h3=Tr(),Cr=on(),UCt=VJ(),Fl=qJ(),Vu=YJ(),mi=Fke(),jke=Gke(),_3=[">=0.5.5 <1"],ZJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jke.PACKAGE_NAME,jke.PACKAGE_VERSION,{...Vu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Vu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",_3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",_3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",_3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",_3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,Cr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,Cr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,Cr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,Cr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Vu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Vu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Vu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Vu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Vu.EndOperation.NackAll)),(0,Cr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,Cr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,Cr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,Cr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,Cr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,Cr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,Cr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,Cr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let g=(0,mi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,mi.getConnectionAttributesFromServer)(d);d[mi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelClosed,void 0);let i=this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Vu.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let g=this,h=n===Vu.EndOperation.Reject?c:d,S=g[mi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Vu.EndOperation.Reject&&c){for(let C=0;C<=y;C++)o.endConsumerSpan(S[C].msg,t,n,h);S.splice(0,y+1)}else o.endConsumerSpan(a,t,n,h),S.splice(y,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let d=this;if(!Object.prototype.hasOwnProperty.call(d,mi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[mi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[mi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Jo.propagation.extract(Jo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=y?Jo.trace.getSpan(y)?.spanContext():void 0;y=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Jo.SpanKind.CONSUMER,attributes:{...d?.connection?.[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:C,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[UCt.ATTR_MESSAGING_OPERATION]:Fl.MESSAGING_OPERATION_VALUE_PROCESS,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:N}=r.getConfig();N&&(0,Cr.safeExecuteInTheMiddle)(()=>N(x,{moduleVersion:t,msg:h}),Q=>{Q&&Jo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(d[mi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,h3.hrTime)()}),h[mi.MESSAGE_STORED_SPAN]=x);let k=y||Jo.ROOT_CONTEXT;Jo.context.with(Jo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Vu.EndOperation.AutoAck),x.end())};return arguments[1]=g,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,g){let h=this,{span:S,modifiedOptions:y}=r.createPublishSpan(r,i,a,h,d),{publishHook:C}=r.getConfig();C&&(0,Cr.safeExecuteInTheMiddle)(()=>C(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!0}),k=>{k&&Jo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{g?.call(this,k,Q)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,Cr.safeExecuteInTheMiddle)(()=>j(S,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:k}),G=>{G&&Jo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Jo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,mi.markConfirmChannelTracing)(Jo.context.active()),N=[...arguments];return N[3]=y,N[4]=Jo.context.bind((0,mi.unmarkConfirmChannelTracing)(Jo.trace.setSpan(x,S)),v),Jo.context.with(x,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,mi.isConfirmChannelTracing)(Jo.context.active()))return n.apply(this,arguments);{let g=this,{span:h,modifiedOptions:S}=r.createPublishSpan(r,i,a,g,d),{publishHook:y}=r.getConfig();y&&(0,Cr.safeExecuteInTheMiddle)(()=>y(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!1}),x=>{x&&Jo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let C=[...arguments];C[3]=S;let v=n.apply(this,C);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,mi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Jo.SpanKind.PRODUCER,attributes:{...o.connection[mi.CONNECTION_ATTRIBUTES],[Fl.ATTR_MESSAGING_DESTINATION]:n,[Fl.ATTR_MESSAGING_DESTINATION_KIND]:Fl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Fl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Fl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Fl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Jo.propagation.inject(Jo.trace.setSpan(Jo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[mi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Jo.SpanStatusCode.ERROR,message:r!==Vu.EndOperation.ChannelClosed&&r!==Vu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[mi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[mi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[mi.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,Cr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Jo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,h3.hrTime)(),r=t[mi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,h3.hrTimeDuration)(a.timeOfConsume,n);if((0,h3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};E3.AmqplibInstrumentation=ZJ});var $ke=F(dE=>{"use strict";m();Object.defineProperty(dE,"__esModule",{value:!0});dE.EndOperation=dE.DEFAULT_CONFIG=dE.AmqplibInstrumentation=void 0;var LCt=zke();Object.defineProperty(dE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return LCt.AmqplibInstrumentation}});var Hke=YJ();Object.defineProperty(dE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return Hke.DEFAULT_CONFIG}});Object.defineProperty(dE,"EndOperation",{enumerable:!0,get:function(){return Hke.EndOperation}})});var Vke,qke,QCt,Yke,FCt,Kke,Jke=O(()=>{m();Vke=ie($ke(),1);mr();qke="Amqplib",QCt={consumeEndHook:e=>{Qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Qr(e,"auto.amqplib.otel.publisher")}},Yke=st(qke,()=>new Vke.AmqplibInstrumentation(QCt)),FCt=()=>({name:qke,setupOnce(){Yke()}}),Kke=FCt});var vO,WJ=O(()=>{m();vO="VercelAI"});function jCt(e){if(typeof e!="object"||e===null)return!1;let t=e;return"type"in t&&"error"in t&&"toolName"in t&&"toolCallId"in t&&t.type==="tool-error"&&t.error instanceof Error}function zCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(HCt(t.content),$Ct(t.content))}function HCt(e){for(let t of e){if(!jCt(t))continue;let n=xq(t.toolCallId);n?xl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):xl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function $Ct(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Dq(t.toolCallId)}function VCt(e,t,n,r){let o=e?.recordInputs!==void 0?e.recordInputs:t.recordInputs!==void 0?t.recordInputs:n===!0?!0:r,i=e?.recordOutputs!==void 0?e.recordOutputs:t.recordOutputs!==void 0?t.recordOutputs:n===!0?!0:r;return{recordInputs:o,recordOutputs:i}}var y3,GCt,Zke,S3,Wke=O(()=>{m();y3=ie(on(),1);dt();WJ();GCt=[">=3.0.0 <7"],Zke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];S3=class e extends y3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new y3.InstrumentationNodeModuleDefinition("ai",GCt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,g=gt(),h=g?.getIntegrationByName(vO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=VCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},rf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{zCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Zke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Zke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function qCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Xke,YCt,ePe,tPe=O(()=>{m();dt();mr();WJ();Wke();Xke=st(vO,()=>new S3({}));YCt=(e={})=>{let t;return{name:vO,options:e,setupOnce(){t=Xke()},afterAllSetup(n){e.force??qCt(n)?vL(n):t?.callWhenPatched(()=>vL(n))}}},ePe=YCt});var I3,KCt,T3,nPe=O(()=>{m();I3=ie(on(),1);dt();KCt=[">=4.0.0 <7"],T3=class extends I3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new I3.InstrumentationNodeModuleDefinition("openai",KCt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(KS(P_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return DL(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var rPe,JCt,oPe,iPe=O(()=>{m();dt();mr();nPe();rPe=st(P_,e=>new T3(e)),JCt=(e={})=>({name:P_,setupOnce(){rPe(e)}}),oPe=JCt});var b3,ZCt,C3,aPe=O(()=>{m();b3=ie(on(),1);dt();ZCt=[">=0.19.2 <1.0.0"],C3=class extends b3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new b3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",ZCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(KS(M_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return BL(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var sPe,WCt,uPe,cPe=O(()=>{m();dt();mr();aPe();sPe=st(M_,e=>new C3(e)),WCt=(e={})=>({name:M_,options:e,setupOnce(){sPe(e)}}),uPe=WCt});var lR,lPe,v3,dPe=O(()=>{m();lR=ie(on(),1);dt();lPe=[">=0.10.0 <2"],v3=class extends lR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new lR.InstrumentationNodeModuleDefinition("@google/genai",lPe,n=>this._patch(n),n=>n,[new lR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lPe,n=>this._patch(n),n=>n)])}_patch(t){let n=t.GoogleGenAI,r=this.getConfig();if(typeof n!="function")return t;let o=function(...i){if(KS(U_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return NL(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return iN(t,"GoogleGenAI",o),t}}});var pPe,XCt,fPe,APe=O(()=>{m();dt();mr();dPe();pPe=st(U_,e=>new v3(e)),XCt=(e={})=>({name:U_,setupOnce(){pPe(e)}}),fPe=XCt});function ebt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function tbt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,g=ebt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var pE,R3,x3,mPe=O(()=>{m();pE=ie(on(),1);dt();R3=[">=0.1.0 <2.0.0"];x3=class extends pE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new pE.InstrumentationNodeModuleDefinition(r,R3,this._patch.bind(this),o=>o,[new pE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,R3,this._patch.bind(this),o=>o)]));return t.push(new pE.InstrumentationNodeModuleDefinition("langchain",R3,this._patch.bind(this),r=>r,[new pE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",R3,this._patch.bind(this),r=>r)])),t}_patch(t){$V([P_,M_,U_]);let n=PL(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let g=a[d];typeof g=="function"&&(a[d]=tbt(g,n))}}}});var gPe,nbt,hPe,_Pe=O(()=>{m();dt();mr();mPe();gPe=st(OL,e=>new x3(e)),nbt=(e={})=>({name:OL,setupOnce(){gPe(e)}}),hPe=nbt});var dR,EPe,D3,SPe=O(()=>{m();dR=ie(on(),1);dt();EPe=[">=0.0.0 <2.0.0"],D3=class extends dR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new dR.InstrumentationNodeModuleDefinition("@langchain/langgraph",EPe,this._patch.bind(this),n=>n,[new dR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EPe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&UL(t.StateGraph.prototype,this.getConfig()),t}}});var yPe,rbt,TPe,IPe=O(()=>{m();dt();mr();SPe();yPe=st(ML,e=>new D3(e)),rbt=(e={})=>({name:ML,setupOnce(){yPe(e)}}),TPe=rbt});import*as bPe from"node:net";function vPe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,wg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new wg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>CPe(h,n,r,e,a)),g=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of g)d.files.push(new wg.InstrumentationNodeModuleFile(h,t,S=>CPe(S,n,r,e,a),S=>RPe(S,r)));return d}function CPe(e,t,n,r,o){return RPe(e,n),t(e,"addDoc",obt(r,o)),t(e,"getDocs",abt(r,o)),t(e,"setDoc",sbt(r,o)),t(e,"deleteDoc",ibt(r,o)),e}function RPe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,wg.isWrapped)(e[n])&&t(e,n);return e}function obt(e,t){return function(r){return function(o,i){let a=N3(e,"addDoc",o);return t(a),B3(a,()=>r(o,i))}}}function ibt(e,t){return function(r){return function(o){let i=N3(e,"deleteDoc",o.parent||o);return t(i),B3(i,()=>r(o))}}}function abt(e,t){return function(r){return function(o){let i=N3(e,"getDocs",o);return t(i),B3(i,()=>r(o))}}}function sbt(e,t){return function(r){return function(o,i,a){let c=N3(e,"setDoc",o.parent||o);return t(c),B3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function B3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,wg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function N3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return cbt(r,n),r.setAttribute(ZC,t),r}function ubt(e){let t,n;if(typeof e.host=="string")if(e.host.startsWith("[")){if(e.host.endsWith("]"))t=e.host.replace(/^\[|\]$/g,"");else if(e.host.includes("]:")){let r=e.host.lastIndexOf(":");r!==-1&&(t=e.host.slice(1,r).replace(/^\[|\]$/g,""),n=e.host.slice(r+1))}}else if(bPe.isIPv6(e.host))t=e.host;else{let r=e.host.lastIndexOf(":");r!==-1?(t=e.host.slice(0,r),n=e.host.slice(r+1)):t=e.host}return{address:t,port:n?parseInt(n,10):void 0}}function cbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[m5]:t.path,[g5]:n.name,[NS]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=ubt(i);c&&(a[C5]=c),d&&(a[b5]=d),e.setAttributes(a)}var wg,xPe=O(()=>{m();je();wg=ie(on(),1);Zn()});function DPe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,g=o.functions?.responseHook;typeof g=="function"&&(a=(y,C)=>{(0,kg.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,kg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new kg.InstrumentationNodeModuleDefinition("firebase-functions",t);return[{name:"firebase-functions/lib/v2/providers/https.js",triggerType:"function"},{name:"firebase-functions/lib/v2/providers/firestore.js",triggerType:"firestore"},{name:"firebase-functions/lib/v2/providers/scheduler.js",triggerType:"scheduler"},{name:"firebase-functions/lib/v2/storage.js",triggerType:"storage"}].forEach(({name:y,triggerType:C})=>{h.files.push(new kg.InstrumentationNodeModuleFile(y,t,v=>lbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>BPe(v,r)))}),h}function qu(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),Ke.with(Ht.setSpan(Ke.active(),S),async()=>{let C,v;try{v=await a.apply(this,g)}catch(x){C=x}if(t?.responseHook?.(S,C),C&&S.recordException(C),S.end(),C)throw await t?.errorHook?.(S,C),C;return v})};return c?o.call(this,c,d):o.call(this,d)}}}function lbt(e,t,n,r,o,i){switch(BPe(e,n),i){case"function":t(e,"onRequest",qu(r,o,"http.request")),t(e,"onCall",qu(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",qu(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",qu(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",qu(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",qu(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",qu(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",qu(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",qu(r,o,"storage.object.finalized")),t(e,"onObjectArchived",qu(r,o,"storage.object.archived")),t(e,"onObjectDeleted",qu(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",qu(r,o,"storage.object.metadataUpdated"));break}return e}function BPe(e,t){let n=["onSchedule","onRequest","onCall","onObjectFinalized","onObjectArchived","onObjectDeleted","onObjectMetadataUpdated","onDocumentCreated","onDocumentUpdated","onDocumentDeleted","onDocumentWritten","onDocumentCreatedWithAuthContext","onDocumentUpdatedWithAuthContext","onDocumentDeletedWithAuthContext","onDocumentWrittenWithAuthContext"];for(let r of n)(0,kg.isWrapped)(e[r])&&t(e,r);return e}var kg,NPe=O(()=>{m();je();kg=ie(on(),1)});var wPe,OPe,dbt,pbt,O3,kPe=O(()=>{m();wPe=ie(on(),1);dt();xPe();NPe();OPe={},dbt=[">=3.0.0 <5"],pbt=[">=6.0.0 <7"],O3=class extends wPe.InstrumentationBase{constructor(t=OPe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...OPe,...t})}init(){let t=[];return t.push(vPe(this.tracer,dbt,this._wrap,this._unwrap,this.getConfig())),t.push(DPe(this.tracer,pbt,this._wrap,this._unwrap,this.getConfig())),t}}});var PPe,fbt,MPe,Abt,UPe,LPe=O(()=>{m();dt();mr();kPe();PPe="Firebase",fbt={firestoreSpanCreationHook:e=>{Qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Pb(2e3))}}},MPe=st(PPe,()=>new O3(fbt)),Abt=()=>({name:PPe,setupOnce(){MPe()}}),UPe=Abt});function QPe(){return[jxe(),T1e(),K1e(),Uwe(),MBe(),ZBe(),cNe(),yNe(),XNe(),SOe(),_we(),Owe(),Xwe(),pke(),vke(),Pke(),pBe(),Kke(),IBe(),hPe(),TPe(),ePe(),oPe(),uPe(),fPe(),COe(),UPe()]}var FPe=O(()=>{m();Jke();cPe();fke();zxe();b1e();LPe();Mke();APe();Z1e();wwe();Lwe();fBe();eke();_Pe();IPe();CBe();UBe();WBe();lNe();TNe();iPe();yOe();bOe();Ewe();eOe();Rke();tPe()});function jPe(e,t={}){e.getOptions().debug&&aY();let[n,r]=mbt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function mbt(e,t={}){let n=new GPe.BasicTracerProvider({sampler:new zQ(e),resource:(0,w3.defaultResource)().merge((0,w3.resourceFromAttributes)({[v5]:"node",[A5]:"sentry",[R5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new jQ({timeout:gbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),qp.setGlobalPropagator(new GQ);let r=new $Q;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function gbt(e){if(e!=null){if(e>XJ)return ya&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${XJ}`),XJ;if(e<=0||Number.isNaN(e)){ya&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var w3,GPe,XJ,zPe=O(()=>{m();je();w3=ie(E7(),1),GPe=ie($7(),1);Zn();dt();mr();fv();py();XJ=1e6});function HPe(){return WQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_xe(),Rxe())}function $Pe(e){return[...HPe(),...xi(e)?QPe():[]]}function eZ(e={}){return hbt(e,$Pe)}function hbt(e={},t){JS(e,"node");let n=OY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jPe(n,{spanProcessors:e.openTelemetrySpanProcessors}),XQ()),n}var VPe=O(()=>{m();dt();mr();Exe();xxe();FPe();zPe()});var pR=O(()=>{m();VPe();dt();mr()});function Ni(){return _bt}function Yu(){return qPe}function YPe(){return Ebt}var _bt,qPe,Ebt,Gl=O(()=>{"use strict";m();_bt="prod",qPe="0.1.141",Ebt=`@tanagram/lore/${qPe}`});function Cbt(e=""){if(!Tbt.test(e))return e!==e.toLowerCase()}function KPe(e,t){let n=t??Ibt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let g=Cbt(c);if(a===!1){if(i===!1&&g===!0){r.push(o),o=c,i=g;continue}if(i===!0&&g===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=g;continue}}o+=c,i=g,a=d}return r.push(o),r}function bbt(e){return e?e[0].toUpperCase()+e.slice(1):""}function vbt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Rbt(e,t){return e?(Array.isArray(e)?e:KPe(e)).map(n=>bbt(t?.normalize?n.toLowerCase():n)).join(""):""}function xO(e,t){return vbt(Rbt(e||"",t))}function k3(e,t){return e?(Array.isArray(e)?e:KPe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JPe(e){return k3(e||"","_")}var Tbt,Ibt,ZPe=O(()=>{m();Tbt=/\d/,Ibt=["-","_","/","."]});import{parseArgs as xbt}from"node:util";function L3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function tZ(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
39
39
  `)}function jl(e){return typeof e=="function"?e():e}function Dbt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},a=new Map,c=new Map;for(let[N,k]of Object.entries(o)){let Q=k;for(let j of Q)a.set(N,j),c.has(j)||c.set(j,[]),c.get(j).push(N),a.set(j,N),c.has(N)||c.set(N,[]),c.get(N).push(j)}let d={};function g(N){if(n.has(N))return"boolean";let k=c.get(N)||[];for(let Q of k)if(n.has(Q))return"boolean";return"string"}function h(N){if(r.has(N))return!0;let k=c.get(N)||[];for(let Q of k)if(r.has(Q))return!0;return!1}let S=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let N of S)d[N]||(d[N]={type:g(N),default:i[N]});for(let[N,k]of a.entries())N.length===1&&d[k]&&!d[k].short&&(d[k].short=N);let y=[],C={};for(let N=0;N<e.length;N++){let k=e[N];if(k==="--"){y.push(...e.slice(N));break}if(k.startsWith("--no-")){let Q=k.slice(5);C[Q]=!0;continue}y.push(k)}let v;try{v=xbt({args:y,options:Object.keys(d).length>0?d:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:y}}let x={_:[]};x._=v.positionals;for(let[N,k]of Object.entries(v.values)){let Q=k;g(N)==="boolean"&&typeof k=="string"?Q=k!=="false":h(N)&&typeof k=="boolean"&&(Q=""),x[N]=Q}for(let[N]of Object.entries(C)){x[N]=!1;let k=a.get(N);k&&(x[k]=!1);let Q=c.get(N);if(Q)for(let j of Q)x[j]=!1}for(let[N,k]of a.entries())x[N]!==void 0&&x[k]===void 0&&(x[k]=x[N]),x[k]!==void 0&&x[N]===void 0&&(x[N]=x[k]),x[N]!==x[k]&&i[k]===x[k]&&(x[k]=x[N]);return x}function Nbt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=eMe(t);for(let c of r){if(c.type==="positional")continue;c.type==="string"||c.type==="enum"?n.string.push(c.name):c.type==="boolean"&&n.boolean.push(c.name),c.default!==void 0&&(n.default[c.name]=c.default),c.alias&&(n.alias[c.name]=c.alias);let d=xO(c.name),g=k3(c.name);if(d!==c.name||g!==c.name){let h=L3(n.alias[c.name]||[]);d!==c.name&&!h.includes(d)&&h.push(d),g!==c.name&&!h.includes(g)&&h.push(g),h.length>0&&(n.alias[c.name]=h)}}let o=Dbt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[xO(d)]??c[k3(d)]}});for(let[,c]of r.entries())if(c.type==="positional"){let d=i.shift();if(d!==void 0)a[c.name]=d;else{if(c.default===void 0&&c.required!==!1)throw new Ry(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let d=a[c.name],g=c.options||[];if(d!==void 0&&g.length>0&&!g.includes(d))throw new Ry(`Invalid value for argument: ${df(`--${c.name}`)} (${df(d)}). Expected one of: ${g.map(h=>df(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new Ry(`Missing required argument: --${c.name}`,"EARG");return a}function eMe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:L3(r.alias)});return t}async function Obt(e){return Promise.all(e.map(t=>jl(t)))}async function xy(e,t){let n=await jl(e.args||{}),r=Nbt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await Obt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let g=await jl(e.subCommands);if(g&&Object.keys(g).length>0){let h=wbt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await WPe(g,S);if(!y)throw new Ry(`Unknown command ${df(S)}`,"E_UNKNOWN_COMMAND");await xy(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await jl(e.default);if(y){if(e.run)throw new Ry("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await WPe(g,y);if(!C)throw new Ry(`Default sub command ${df(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await xy(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new Ry("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(g){c=g}let d=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(g){d.push(g)}for(let g of[...i].reverse())try{await g.cleanup?.(o)}catch(h){d.push(h)}if(c)throw c;if(d.length===1)throw d[0];if(d.length>1)throw new Error("Multiple cleanup errors",{cause:d});return{result:a}}async function WPe(e,t){if(t in e)return jl(e[t]);for(let n of Object.values(e)){let r=await jl(n),o=await jl(r?.meta);if(o?.alias&&L3(o.alias).includes(t))return r}}function wbt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&kbt(r,t)&&n++;continue}return n}return-1}function kbt(e,t){let n=e.replace(/^-{1,2}/,""),r=xO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===xO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function rZ(e,t){let n=await jl(e.meta||{}),r=eMe(await jl(e.args||{})),o=await jl(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],d=[],g=[];for(let C of r)if(C.type==="positional"){let v=C.name.toUpperCase(),x=C.required!==!1&&C.default===void 0;c.push([df(v+nZ(C)),XPe(C,x)]),g.push(x?`<${v}>`:`[${v}]`)}else{let v=C.required===!0&&C.default===void 0,x=[...(C.alias||[]).map(N=>`-${N}`),`--${C.name}`].join(", ")+nZ(C);if(a.push([df(x),XPe(C,v)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!Pbt.test(C.name)){let N=[...(C.alias||[]).map(k=>`--no-${k}`),`--no-${C.name}`].join(", ");a.push([df(N),[C.negativeDescription,v?U3("(Required)"):""].filter(Boolean).join(" ")])}v&&g.push(`--${C.name}`+nZ(C))}if(e.subCommands){let C=[],v=await jl(e.subCommands);for(let[x,N]of Object.entries(v)){let k=await jl((await jl(N))?.meta);if(k?.hidden)continue;let Q=L3(k?.alias),j=[x,...Q].join(", ");d.push([df(j),k?.description||""]),C.push(x,...Q)}g.push(C.join("|"))}let h=[],S=n.version||o.version;h.push(U3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${M3(P3("USAGE"))} ${df(`${i}${y?" [OPTIONS]":""} ${g.join(" ")}`)}`,""),c.length>0&&(h.push(M3(P3("ARGUMENTS")),""),h.push(tZ(c," ")),h.push("")),a.length>0&&(h.push(M3(P3("OPTIONS")),""),h.push(tZ(a," ")),h.push("")),d.length>0&&(h.push(M3(P3("COMMANDS")),""),h.push(tZ(d," ")),h.push("",`Use ${df(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
40
40
  `)}function nZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${JPe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function XPe(e,t){let n=t?U3("(Required)"):"",r=e.default===void 0?"":U3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var Ry,Bbt,Q3,P3,df,U3,M3,Pbt,oZ=O(()=>{m();ZPe();Ry=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Bbt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),Q3=(e,t=39)=>n=>Bbt?n:`\x1B[${e}m${n}\x1B[${t}m`,P3=Q3(1,22),df=Q3(36),U3=Q3(90),M3=Q3(4,24);Pbt=/^no[-A-Z]/});function Ubt(e){oMe=e}function G3(){return oMe}function ut(e,t){let n=j3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,G3(),DO].filter(r=>!!r)});e.common.issues.push(n)}function vn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,c)=>a.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:r??c.defaultError}:{message:n??c.defaultError},description:o}}function Ybt(e,t){return!!((t==="v4"||!t)&&$bt.test(e)||(t==="v6"||!t)&&Vbt.test(e))}function Kbt(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}function fR(e){if(e instanceof lu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=pf.create(fR(r))}return new lu({...e._def,shape:()=>t})}else return e instanceof Mg?new Mg({...e._def,type:fR(e.element)}):e instanceof pf?pf.create(fR(e.unwrap())):e instanceof Ug?Ug.create(fR(e.unwrap())):e instanceof jA?jA.create(e.items.map(t=>fR(t))):e}function lZ(e,t){let n=fE(e),r=fE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=_r.objectKeys(t),i=_r.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let d=lZ(e[c],t[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(n===at.array&&r===at.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let a=e[i],c=t[i],d=lZ(a,c);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===at.date&&r===at.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function aMe(e,t){return new Qy({values:e,typeName:Yt.ZodEnum,...vn(t)})}var _r,sZ,at,fE,Ve,Mbt,Gc,DO,oMe,j3,Lbt,cu,hn,iMe,Ku,uZ,cZ,BO,z3,Mt,Wd,tMe,Rn,Qbt,Fbt,Gbt,jbt,zbt,Hbt,$bt,Vbt,qbt,AE,Dy,By,Ny,Oy,AR,wy,ky,mE,Pg,ff,mR,Mg,lu,Py,F3,H3,My,jA,$3,gR,hR,V3,Uy,Ly,Qy,Fy,gE,zl,pf,Ug,Gy,_R,ER,Jbt,q3,NO,SR,sMe,Zbt,Yt,Wbt,uMe,cMe,Xbt,evt,lMe,tvt,nvt,rvt,ovt,ivt,avt,svt,uvt,cvt,lvt,dvt,pvt,fvt,Avt,mvt,gvt,hvt,_vt,Evt,Svt,yvt,Tvt,Ivt,Cvt,nMe,bvt,vvt,Rvt,xvt,Dvt,Bvt,Nvt,Ovt,wvt,uu,kvt,iZ,Pvt,Zd,dZ,lbn,dbn,pbn,dMe,Mvt,Uvt,Lvt,Qvt,pMe,fMe,AMe,aZ,os,Fvt,Gvt,jvt,zvt,pZ,fZ,AZ,Hvt,rMe,$vt,Vvt,qvt,Yvt,mZ,Af=O(()=>{m();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),a={};for(let c of i)a[c]=o[c];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(_r||(_r={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(sZ||(sZ={}));at=_r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fE=e=>{switch(typeof e){case"undefined":return at.undefined;case"string":return at.string;case"number":return isNaN(e)?at.nan:at.number;case"boolean":return at.boolean;case"function":return at.function;case"bigint":return at.bigint;case"symbol":return at.symbol;case"object":return Array.isArray(e)?at.array:e===null?at.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?at.promise:typeof Map<"u"&&e instanceof Map?at.map:typeof Set<"u"&&e instanceof Set?at.set:typeof Date<"u"&&e instanceof Date?at.date:at.object;default:return at.unknown}},Ve=_r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Mbt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Gc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,d=0;for(;d<a.path.length;){let g=a.path[d];d===a.path.length-1?(c[g]=c[g]||{_errors:[]},c[g]._errors.push(n(a))):c[g]=c[g]||{_errors:[]},c=c[g],d++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,_r.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Gc.create=e=>new Gc(e);DO=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_r.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${_r.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_r.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${_r.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:_r.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,_r.assertNever(e)}return{message:n}},oMe=DO;j3=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",d=r.filter(g=>!!g).slice().reverse();for(let g of d)c=g(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},Lbt=[];cu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return hn;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return hn;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}},hn=Object.freeze({status:"aborted"}),iMe=e=>({status:"dirty",value:e}),Ku=e=>({status:"valid",value:e}),uZ=e=>e.status==="aborted",cZ=e=>e.status==="dirty",BO=e=>e.status==="valid",z3=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Mt||(Mt={}));Wd=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},tMe=(e,t)=>{if(BO(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let n=new Gc(e.common.issues);return this._error=n,this._error}}};Rn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return fE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new cu,ctx:{common:t.parent.common,data:t.data,parsedType:fE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(z3(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let o={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return tMe(o,i)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(z3(o)?o:Promise.resolve(o));return tMe(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let a=t(o),c=()=>i.addIssue({code:Ve.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new zl({schema:this,typeName:Yt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return pf.create(this,this._def)}nullable(){return Ug.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mg.create(this,this._def)}promise(){return gE.create(this,this._def)}or(t){return Py.create([this,t],this._def)}and(t){return My.create(this,t,this._def)}transform(t){return new zl({...vn(this._def),schema:this,typeName:Yt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Gy({...vn(this._def),innerType:this,defaultValue:n,typeName:Yt.ZodDefault})}brand(){return new q3({typeName:Yt.ZodBranded,type:this,...vn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new _R({...vn(this._def),innerType:this,catchValue:n,typeName:Yt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return NO.create(this,t)}readonly(){return SR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Qbt=/^c[^\s-]{8,}$/i,Fbt=/^[a-z][a-z0-9]*$/,Gbt=/[0-9A-HJKMNP-TV-Z]{26}/,jbt=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,zbt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hbt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),$bt=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,Vbt=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qbt=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");AE=class e extends Rn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ve.invalid_string,...Mt.errToObj(r)}),this.nonempty=t=>this.min(1,Mt.errToObj(t)),this.trim=()=>new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==at.string){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.string,received:i.parsedType}),hn}let r=new cu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,c=t.data.length<i.value;(a||c)&&(o=this._getOrReturnCtx(t,o),a?ut(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")zbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Hbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")jbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Qbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Fbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Gbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ut(o,{validation:"url",code:Ve.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"regex",code:Ve.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?qbt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?Ybt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:Ve.invalid_string,message:i.message}),r.dirty()):_r.assertNever(i);return{status:r.value,value:t.data}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Mt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Mt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Mt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Mt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Mt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Mt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Mt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Mt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,...Mt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Mt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Mt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Mt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Mt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Mt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Mt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Mt.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};AE.create=e=>{var t;return new AE({checks:[],typeName:Yt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...vn(e)})};Dy=class e extends Rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==at.number){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.number,received:i.parsedType}),hn}let r,o=new cu;for(let i of this._def.checks)i.kind==="int"?_r.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Kbt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_finite,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Mt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Mt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Mt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Mt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Mt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Mt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Mt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Mt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Mt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Mt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Mt.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&_r.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};Dy.create=e=>new Dy({checks:[],typeName:Yt.ZodNumber,coerce:e?.coerce||!1,...vn(e)});By=class e extends Rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==at.bigint){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.bigint,received:i.parsedType}),hn}let r,o=new cu;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Mt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Mt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Mt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Mt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Mt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Mt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Mt.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};By.create=e=>{var t;return new By({checks:[],typeName:Yt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...vn(e)})};Ny=class extends Rn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.boolean,received:r.parsedType}),hn}return Ku(t.data)}};Ny.create=e=>new Ny({typeName:Yt.ZodBoolean,coerce:e?.coerce||!1,...vn(e)});Oy=class e extends Rn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.date,received:i.parsedType}),hn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_date}),hn}let r=new cu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):_r.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Mt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Mt.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Oy.create=e=>new Oy({checks:[],coerce:e?.coerce||!1,typeName:Yt.ZodDate,...vn(e)});AR=class extends Rn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.symbol,received:r.parsedType}),hn}return Ku(t.data)}};AR.create=e=>new AR({typeName:Yt.ZodSymbol,...vn(e)});wy=class extends Rn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.undefined,received:r.parsedType}),hn}return Ku(t.data)}};wy.create=e=>new wy({typeName:Yt.ZodUndefined,...vn(e)});ky=class extends Rn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.null,received:r.parsedType}),hn}return Ku(t.data)}};ky.create=e=>new ky({typeName:Yt.ZodNull,...vn(e)});mE=class extends Rn{constructor(){super(...arguments),this._any=!0}_parse(t){return Ku(t.data)}};mE.create=e=>new mE({typeName:Yt.ZodAny,...vn(e)});Pg=class extends Rn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ku(t.data)}};Pg.create=e=>new Pg({typeName:Yt.ZodUnknown,...vn(e)});ff=class extends Rn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:Ve.invalid_type,expected:at.never,received:n.parsedType}),hn}};ff.create=e=>new ff({typeName:Yt.ZodNever,...vn(e)});mR=class extends Rn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.void,received:r.parsedType}),hn}return Ku(t.data)}};mR.create=e=>new mR({typeName:Yt.ZodVoid,...vn(e)});Mg=class e extends Rn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return ut(n,{code:Ve.invalid_type,expected:at.array,received:n.parsedType}),hn;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(ut(n,{code:a?Ve.too_big:Ve.too_small,minimum:c?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ut(n,{code:Ve.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ut(n,{code:Ve.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>o.type._parseAsync(new Wd(n,a,n.path,c)))).then(a=>cu.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new Wd(n,a,n.path,c)));return cu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Mt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Mt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Mt.toString(n)}})}nonempty(t){return this.min(1,t)}};Mg.create=(e,t)=>new Mg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Yt.ZodArray,...vn(t)});lu=class e extends Rn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=_r.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let g=this._getOrReturnCtx(t);return ut(g,{code:Ve.invalid_type,expected:at.object,received:g.parsedType}),hn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof ff&&this._def.unknownKeys==="strip"))for(let g in o.data)a.includes(g)||c.push(g);let d=[];for(let g of a){let h=i[g],S=o.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new Wd(o,S,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof ff){let g=this._def.unknownKeys;if(g==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(g==="strict")c.length>0&&(ut(o,{code:Ve.unrecognized_keys,keys:c}),r.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let g=this._def.catchall;for(let h of c){let S=o.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new Wd(o,S,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let g=[];for(let h of d){let S=await h.key;g.push({key:S,value:await h.value,alwaysSet:h.alwaysSet})}return g}).then(g=>cu.mergeObjectSync(r,g)):cu.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Mt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,c;let d=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=Mt.errToObj(t).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Yt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return _r.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return _r.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return fR(this)}partial(t){let n={};return _r.objectKeys(this.shape).forEach(r=>{let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return _r.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof pf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return aMe(_r.objectKeys(this.shape))}};lu.create=(e,t)=>new lu({shape:()=>e,unknownKeys:"strip",catchall:ff.create(),typeName:Yt.ZodObject,...vn(t)});lu.strictCreate=(e,t)=>new lu({shape:()=>e,unknownKeys:"strict",catchall:ff.create(),typeName:Yt.ZodObject,...vn(t)});lu.lazycreate=(e,t)=>new lu({shape:e,unknownKeys:"strip",catchall:ff.create(),typeName:Yt.ZodObject,...vn(t)});Py=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Gc(c.ctx.common.issues));return ut(n,{code:Ve.invalid_union,unionErrors:a}),hn}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let d of r){let g={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:g});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:g}),g.common.issues.length&&a.push(g.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new Gc(d));return ut(n,{code:Ve.invalid_union,unionErrors:c}),hn}}get options(){return this._def.options}};Py.create=(e,t)=>new Py({options:e,typeName:Yt.ZodUnion,...vn(t)});F3=e=>e instanceof Uy?F3(e.schema):e instanceof zl?F3(e.innerType()):e instanceof Ly?[e.value]:e instanceof Qy?e.options:e instanceof Fy?Object.keys(e.enum):e instanceof Gy?F3(e._def.innerType):e instanceof wy?[void 0]:e instanceof ky?[null]:null,H3=class e extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return ut(n,{code:Ve.invalid_type,expected:at.object,received:n.parsedType}),hn;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ut(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),hn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let a=F3(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let c of a){if(o.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);o.set(c,i)}}return new e({typeName:Yt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...vn(r)})}};My=class extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(uZ(i)||uZ(a))return hn;let c=lZ(i.value,a.value);return c.valid?((cZ(i)||cZ(a))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:Ve.invalid_intersection_types}),hn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};My.create=(e,t,n)=>new My({left:e,right:t,typeName:Yt.ZodIntersection,...vn(n)});jA=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return ut(r,{code:Ve.invalid_type,expected:at.array,received:r.parsedType}),hn;if(r.data.length<this._def.items.length)return ut(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),hn;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let d=this._def.items[c]||this._def.rest;return d?d._parse(new Wd(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>cu.mergeArray(n,a)):cu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};jA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new jA({items:e,typeName:Yt.ZodTuple,rest:null,...vn(t)})};$3=class e extends Rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.object)return ut(r,{code:Ve.invalid_type,expected:at.object,received:r.parsedType}),hn;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new Wd(r,c,r.path,c)),value:a._parse(new Wd(r,r.data[c],r.path,c))});return r.common.async?cu.mergeObjectAsync(n,o):cu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Rn?new e({keyType:t,valueType:n,typeName:Yt.ZodRecord,...vn(r)}):new e({keyType:AE.create(),valueType:t,typeName:Yt.ZodRecord,...vn(n)})}},gR=class extends Rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.map)return ut(r,{code:Ve.invalid_type,expected:at.map,received:r.parsedType}),hn;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],g)=>({key:o._parse(new Wd(r,c,r.path,[g,"key"])),value:i._parse(new Wd(r,d,r.path,[g,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let g=await d.key,h=await d.value;if(g.status==="aborted"||h.status==="aborted")return hn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let g=d.key,h=d.value;if(g.status==="aborted"||h.status==="aborted")return hn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}}}};gR.create=(e,t,n)=>new gR({valueType:t,keyType:e,typeName:Yt.ZodMap,...vn(n)});hR=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return ut(r,{code:Ve.invalid_type,expected:at.set,received:r.parsedType}),hn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:Ve.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ut(r,{code:Ve.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(d){let g=new Set;for(let h of d){if(h.status==="aborted")return hn;h.status==="dirty"&&n.dirty(),g.add(h.value)}return{status:n.value,value:g}}let c=[...r.data.values()].map((d,g)=>i._parse(new Wd(r,d,r.path,g)));return r.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:Mt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Mt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};hR.create=(e,t)=>new hR({valueType:e,minSize:null,maxSize:null,typeName:Yt.ZodSet,...vn(t)});V3=class e extends Rn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return ut(n,{code:Ve.invalid_type,expected:at.function,received:n.parsedType}),hn;function r(c,d){return j3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,G3(),DO].filter(g=>!!g),issueData:{code:Ve.invalid_arguments,argumentsError:d}})}function o(c,d){return j3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,G3(),DO].filter(g=>!!g),issueData:{code:Ve.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof gE){let c=this;return Ku(async function(...d){let g=new Gc([]),h=await c._def.args.parseAsync(d,i).catch(C=>{throw g.addIssue(r(d,C)),g}),S=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(S,i).catch(C=>{throw g.addIssue(o(S,C)),g})})}else{let c=this;return Ku(function(...d){let g=c._def.args.safeParse(d,i);if(!g.success)throw new Gc([r(d,g.error)]);let h=Reflect.apply(a,this,g.data),S=c._def.returns.safeParse(h,i);if(!S.success)throw new Gc([o(h,S.error)]);return S.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:jA.create(t).rest(Pg.create())})}returns(t){return new e({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new e({args:t||jA.create([]).rest(Pg.create()),returns:n||Pg.create(),typeName:Yt.ZodFunction,...vn(r)})}},Uy=class extends Rn{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Uy.create=(e,t)=>new Uy({getter:e,typeName:Yt.ZodLazy,...vn(t)});Ly=class extends Rn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),hn}return{status:"valid",value:t.data}}get value(){return this._def.value}};Ly.create=(e,t)=>new Ly({value:e,typeName:Yt.ZodLiteral,...vn(t)});Qy=class e extends Rn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{expected:_r.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),hn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),hn}return Ku(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};Qy.create=aMe;Fy=class extends Rn{_parse(t){let n=_r.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=_r.objectValues(n);return ut(r,{expected:_r.joinValues(o),received:r.parsedType,code:Ve.invalid_type}),hn}if(n.indexOf(t.data)===-1){let o=_r.objectValues(n);return ut(r,{received:r.data,code:Ve.invalid_enum_value,options:o}),hn}return Ku(t.data)}get enum(){return this._def.values}};Fy.create=(e,t)=>new Fy({values:e,typeName:Yt.ZodNativeEnum,...vn(t)});gE=class extends Rn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return ut(n,{code:Ve.invalid_type,expected:at.promise,received:n.parsedType}),hn;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return Ku(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};gE.create=(e,t)=>new gE({type:e,typeName:Yt.ZodPromise,...vn(t)});zl=class extends Rn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Yt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ut(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){let a=c=>{let d=o.refinement(c,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?hn:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?hn:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!BO(a))return a;let c=o.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>BO(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);_r.assertNever(o)}};zl.create=(e,t,n)=>new zl({schema:e,typeName:Yt.ZodEffects,effect:t,...vn(n)});zl.createWithPreprocess=(e,t,n)=>new zl({schema:t,effect:{type:"preprocess",transform:e},typeName:Yt.ZodEffects,...vn(n)});pf=class extends Rn{_parse(t){return this._getType(t)===at.undefined?Ku(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};pf.create=(e,t)=>new pf({innerType:e,typeName:Yt.ZodOptional,...vn(t)});Ug=class extends Rn{_parse(t){return this._getType(t)===at.null?Ku(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ug.create=(e,t)=>new Ug({innerType:e,typeName:Yt.ZodNullable,...vn(t)});Gy=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===at.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Gy.create=(e,t)=>new Gy({innerType:e,typeName:Yt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...vn(t)});_R=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return z3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Gc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Gc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};_R.create=(e,t)=>new _R({innerType:e,typeName:Yt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...vn(t)});ER=class extends Rn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.nan,received:r.parsedType}),hn}return{status:"valid",value:t.data}}};ER.create=e=>new ER({typeName:Yt.ZodNaN,...vn(e)});Jbt=Symbol("zod_brand"),q3=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},NO=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?hn:i.status==="dirty"?(n.dirty(),iMe(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?hn:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Yt.ZodPipeline})}},SR=class extends Rn{_parse(t){let n=this._def.innerType._parse(t);return BO(n)&&(n.value=Object.freeze(n.value)),n}};SR.create=(e,t)=>new SR({innerType:e,typeName:Yt.ZodReadonly,...vn(t)});sMe=(e,t={},n)=>e?mE.create().superRefine((r,o)=>{var i,a;if(!e(r)){let c=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,d=(a=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,g=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...g,fatal:d})}}):mE.create(),Zbt={object:lu.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Yt||(Yt={}));Wbt=(e,t={message:`Input not instance of ${e.name}`})=>sMe(n=>n instanceof e,t),uMe=AE.create,cMe=Dy.create,Xbt=ER.create,evt=By.create,lMe=Ny.create,tvt=Oy.create,nvt=AR.create,rvt=wy.create,ovt=ky.create,ivt=mE.create,avt=Pg.create,svt=ff.create,uvt=mR.create,cvt=Mg.create,lvt=lu.create,dvt=lu.strictCreate,pvt=Py.create,fvt=H3.create,Avt=My.create,mvt=jA.create,gvt=$3.create,hvt=gR.create,_vt=hR.create,Evt=V3.create,Svt=Uy.create,yvt=Ly.create,Tvt=Qy.create,Ivt=Fy.create,Cvt=gE.create,nMe=zl.create,bvt=pf.create,vvt=Ug.create,Rvt=zl.createWithPreprocess,xvt=NO.create,Dvt=()=>uMe().optional(),Bvt=()=>cMe().optional(),Nvt=()=>lMe().optional(),Ovt={string:e=>AE.create({...e,coerce:!0}),number:e=>Dy.create({...e,coerce:!0}),boolean:e=>Ny.create({...e,coerce:!0}),bigint:e=>By.create({...e,coerce:!0}),date:e=>Oy.create({...e,coerce:!0})},wvt=hn,uu=Object.freeze({__proto__:null,defaultErrorMap:DO,setErrorMap:Ubt,getErrorMap:G3,makeIssue:j3,EMPTY_PATH:Lbt,addIssueToContext:ut,ParseStatus:cu,INVALID:hn,DIRTY:iMe,OK:Ku,isAborted:uZ,isDirty:cZ,isValid:BO,isAsync:z3,get util(){return _r},get objectUtil(){return sZ},ZodParsedType:at,getParsedType:fE,ZodType:Rn,ZodString:AE,ZodNumber:Dy,ZodBigInt:By,ZodBoolean:Ny,ZodDate:Oy,ZodSymbol:AR,ZodUndefined:wy,ZodNull:ky,ZodAny:mE,ZodUnknown:Pg,ZodNever:ff,ZodVoid:mR,ZodArray:Mg,ZodObject:lu,ZodUnion:Py,ZodDiscriminatedUnion:H3,ZodIntersection:My,ZodTuple:jA,ZodRecord:$3,ZodMap:gR,ZodSet:hR,ZodFunction:V3,ZodLazy:Uy,ZodLiteral:Ly,ZodEnum:Qy,ZodNativeEnum:Fy,ZodPromise:gE,ZodEffects:zl,ZodTransformer:zl,ZodOptional:pf,ZodNullable:Ug,ZodDefault:Gy,ZodCatch:_R,ZodNaN:ER,BRAND:Jbt,ZodBranded:q3,ZodPipeline:NO,ZodReadonly:SR,custom:sMe,Schema:Rn,ZodSchema:Rn,late:Zbt,get ZodFirstPartyTypeKind(){return Yt},coerce:Ovt,any:ivt,array:cvt,bigint:evt,boolean:lMe,date:tvt,discriminatedUnion:fvt,effect:nMe,enum:Tvt,function:Evt,instanceof:Wbt,intersection:Avt,lazy:Svt,literal:yvt,map:hvt,nan:Xbt,nativeEnum:Ivt,never:svt,null:ovt,nullable:vvt,number:cMe,object:lvt,oboolean:Nvt,onumber:Bvt,optional:bvt,ostring:Dvt,pipeline:xvt,preprocess:Rvt,promise:Cvt,record:gvt,set:_vt,strictObject:dvt,string:uMe,symbol:nvt,transformer:nMe,tuple:mvt,undefined:rvt,union:pvt,unknown:avt,void:uvt,NEVER:wvt,ZodIssueCode:Ve,quotelessJson:Mbt,ZodError:Gc}),kvt=e=>typeof e?.safeParse=="function",iZ=e=>typeof e?.passthrough=="function",Pvt=(e,t)=>iZ(e)?iZ(t)?e.merge(t):e:iZ(t)?t:Object.assign({},e,t),Zd=uu.object({name:uu.literal("ZodError"),issues:uu.array(uu.object({path:uu.array(uu.union([uu.string(),uu.number()])),message:uu.string().optional(),code:uu.nativeEnum(uu.ZodIssueCode)}).catchall(uu.any()))}),dZ=class extends Error{constructor(t){let n=JSON.stringify(t,(r,o)=>typeof o=="bigint"?o.toString():o,2);super(n),this.name="ValidationError",this.issues=t}toString(){return this.message}},lbn=uu.object({message:uu.literal("Request validation failed"),pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),dbn=uu.object({pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),pbn=uu.object({paramsResult:Zd.nullable(),headersResult:Zd.nullable(),queryResult:Zd.nullable(),bodyResult:Zd.nullable()}),dMe="zod-ts-rest-polyfill",Mvt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},Uvt=e=>Mvt(e)?e:kvt(e)?(Object.assign(e,{"~standard":{vendor:dMe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,Lvt=(e,t)=>e?t?e instanceof lu&&t instanceof lu?Pvt(e,t):{...e,...t}:e:t,Qvt=(e,t,{passThroughExtraKeys:n=!1}={})=>{let r=t["~standard"].validate(e);if(r instanceof Promise)throw new Error("Schema validation must be synchronous");return r.issues?t["~standard"].vendor===dMe?{error:new Gc(r.issues)}:{error:new dZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},pMe=Symbol("ContractNoBody"),fMe=e=>"method"in e&&"path"in e,AMe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return fMe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:Lvt(t?.baseHeaders,r.headers),strictStatusCodes:(o=r.strictStatusCodes)!==null&&o!==void 0?o:t?.strictStatusCodes,validateResponseOnClient:(i=r.validateResponseOnClient)!==null&&i!==void 0?i:t?.validateResponseOnClient,responses:{...t?.commonResponses,...r.responses},metadata:t?.metadata?{...t?.metadata,...(a=r.metadata)!==null&&a!==void 0?a:{}}:r.metadata}]:[n,AMe(r,t)]})),aZ=Symbol("ContractPlainType"),os=()=>({router:(e,t)=>AMe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>aZ,body:()=>aZ,type:()=>aZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>pMe}),Fvt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},Gvt=(e,t=!1)=>{let n=t?jvt(e):zvt(e);return n?.length>0?"?"+n:""},jvt=e=>e?Object.entries(e).filter(([,t])=>t!==void 0).map(([t,n])=>{let r;return typeof n=="string"&&!["true","false","null"].includes(n.trim())&&isNaN(Number(n))?r=n:r=JSON.stringify(n),`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}).join("&"):"",zvt=e=>e?Object.keys(e).flatMap(t=>pZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",pZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>pZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>pZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],fZ=class extends Error{constructor(t,n){let r=n.join(",");super(`Server returned unexpected response. Expected one of: ${r} got: ${t.status}`),this.response=t}},AZ=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:a})=>{let c=await fetch(t,{...a,method:n,headers:r,body:o}),d=c.headers.get("content-type");if(d?.includes("application/")&&d?.includes("json")){let g=e.responses[c.status],h={status:c.status,body:g===pMe?void 0:await c.json(),headers:c.headers},S=Uvt(g);if(S&&(i??e.validateResponseOnClient)){let y=Qvt(h.body,S);if(y.error)throw y.error;return{...h,body:y.value}}return h}return d?.includes("text/")?{status:c.status,body:await c.text(),headers:c.headers}:{status:c.status,body:await c.blob(),headers:c.headers}},Hvt=e=>{let t=new FormData,n=(r,o)=>{o instanceof File?t.append(r,o):t.append(r,JSON.stringify(o))};return Object.entries(e).forEach(([r,o])=>{if(Array.isArray(o))for(let i of o)n(r,i);else n(r,o)}),t},rMe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),$vt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,g=n.api||AZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,v])=>typeof v=="function"?[C,v(e)]:[C,v])),S={...h&&rMe(h),...rMe(c)};Object.keys(S).forEach(C=>{S[C]===void 0&&delete S[C]});let y={route:r,path:t,method:r.method,headers:S,body:void 0,rawBody:o,rawQuery:i,contentType:void 0,validateResponse:n.validateResponse,fetchOptions:{...n.credentials&&{credentials:n.credentials},...d},...d?.signal&&{signal:d.signal},...d?.cache&&{cache:d.cache},...d&&"next"in d&&!!d?.next&&{next:d.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?y={...y,contentType:"multipart/form-data",body:o instanceof FormData?o:Hvt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?y={...y,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...y.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(y={...y,contentType:"application/json",headers:{"content-type":"application/json",...y.headers},body:JSON.stringify(o)})),g({...y,...a})},Vvt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:g,cache:h,next:S,...y}=n||{},C={...t,...d},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,k])=>[N,String(k)])):{};return{path:qvt(r,C.baseUrl,v,e,!!C.jsonQuery),clientArgs:C,route:e,body:i,query:r,extraInputArgs:y,fetchOptions:{...h&&{cache:h},...S&&{next:S},...g},headers:{...c,...a}}},qvt=(e,t,n,r,o)=>{let i=Fvt({path:r.path,params:n}),a=Gvt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},Yvt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Vvt(e,t,r),i=await $vt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new fZ(i,n)}},mZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>fMe(r)?[n,Yvt(r,t)]:[n,mZ(r,t)]))});function ne(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);let g=a.prototype,h=Object.keys(g);for(let S=0;S<h.length;S++){let y=h[S];y in c||(c[y]=g[y].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var d;let g=n?.Parent?new i:this;r(g,c),(d=g._zod).deferred??(d.deferred=[]);for(let h of g._zod.deferred)h();return g}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function gi(e){return e&&Object.assign(jy,e),jy}var mMe,gZ,hZ,mf,hE,jy,zy=O(()=>{m();gZ=Object.freeze({status:"aborted"});hZ=Symbol("zod_brand"),mf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},hE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(mMe=globalThis).__zod_globalConfig??(mMe.__zod_globalConfig={});jy=globalThis.__zod_globalConfig});var Ue={};Ha(Ue,{BIGINT_FORMAT_RANGES:()=>RZ,Class:()=>EZ,NUMBER_FORMAT_RANGES:()=>vZ,aborted:()=>yE,allowsEval:()=>TZ,assert:()=>Xvt,assertEqual:()=>Kvt,assertIs:()=>Zvt,assertNever:()=>Wvt,assertNotEqual:()=>Jvt,assignProp:()=>EE,base64ToUint8Array:()=>hMe,base64urlToUint8Array:()=>gRt,cached:()=>TR,captureStackTrace:()=>K3,cleanEnum:()=>mRt,cleanRegex:()=>kO,clone:()=>Ju,cloneDef:()=>tRt,createTransparentProxy:()=>sRt,defineLazy:()=>jn,esc:()=>Y3,escapeRegex:()=>Xd,explicitlyAborted:()=>xZ,extend:()=>lRt,finalizeIssue:()=>Zu,floatSafeRemainder:()=>SZ,getElementAtPath:()=>nRt,getEnumValues:()=>wO,getLengthableOrigin:()=>UO,getParsedType:()=>aRt,getSizableOrigin:()=>MO,hexToUint8Array:()=>_Rt,isObject:()=>Hy,isPlainObject:()=>SE,issue:()=>IR,joinValues:()=>ue,jsonStringifyReplacer:()=>yR,merge:()=>pRt,mergeDefs:()=>Lg,normalizeParams:()=>He,nullish:()=>_E,numKeys:()=>iRt,objectClone:()=>eRt,omit:()=>cRt,optionalKeys:()=>bZ,parsedType:()=>ke,partial:()=>fRt,pick:()=>uRt,prefixIssues:()=>jc,primitiveTypes:()=>CZ,promiseAllObject:()=>rRt,propertyKeyTypes:()=>PO,randomString:()=>oRt,required:()=>ARt,safeExtend:()=>dRt,shallowClone:()=>IZ,slugify:()=>yZ,stringifyPrimitive:()=>Ne,uint8ArrayToBase64:()=>_Me,uint8ArrayToBase64url:()=>hRt,uint8ArrayToHex:()=>ERt,unwrapMessage:()=>OO});function Kvt(e){return e}function Jvt(e){return e}function Zvt(e){}function Wvt(e){throw new Error("Unexpected value in exhaustive check")}function Xvt(e){}function wO(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ue(e,t="|"){return e.map(n=>Ne(n)).join(t)}function yR(e,t){return typeof t=="bigint"?t.toString():t}function TR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function _E(e){return e==null}function kO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function SZ(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function jn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==gMe)return r===void 0&&(r=gMe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function eRt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function EE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Lg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function tRt(e){return Lg(e._zod.def)}function nRt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function rRt(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let o={};for(let i=0;i<t.length;i++)o[t[i]]=r[i];return o})}function oRt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function Y3(e){return JSON.stringify(e)}function yZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Hy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function SE(e){if(Hy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Hy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function IZ(e){return SE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function iRt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Xd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ju(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function He(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function sRt(e){let t;return new Proxy({},{get(n,r,o){return t??(t=e()),Reflect.get(t,r,o)},set(n,r,o,i){return t??(t=e()),Reflect.set(t,r,o,i)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,o){return t??(t=e()),Reflect.defineProperty(t,r,o)}})}function Ne(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function bZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function uRt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=Lg(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return EE(this,"shape",a),a},checks:[]});return Ju(e,i)}function cRt(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=Lg(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return EE(this,"shape",a),a},checks:[]});return Ju(e,i)}function lRt(e,t){if(!SE(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Lg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return EE(this,"shape",i),i}});return Ju(e,o)}function dRt(e,t){if(!SE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Lg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return EE(this,"shape",r),r}});return Ju(e,n)}function pRt(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Lg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return EE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ju(e,n)}function fRt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Lg(t._zod.def,{get shape(){let c=t._zod.def.shape,d={...c};if(n)for(let g in n){if(!(g in c))throw new Error(`Unrecognized key: "${g}"`);n[g]&&(d[g]=e?new e({type:"optional",innerType:c[g]}):c[g])}else for(let g in c)d[g]=e?new e({type:"optional",innerType:c[g]}):c[g];return EE(this,"shape",d),d},checks:[]});return Ju(t,a)}function ARt(e,t,n){let r=Lg(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return EE(this,"shape",i),i}});return Ju(t,r)}function yE(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xZ(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function jc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function OO(e){return typeof e=="string"?e:e?.message}function Zu(e,t,n){let r=e.message?e.message:OO(e.inst?._zod.def?.error?.(e))??OO(t?.error?.(e))??OO(n.customError?.(e))??OO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:a,...c}=e;return c.path??(c.path=[]),c.message=r,t?.reportInput&&(c.input=a),c}function MO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function UO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ke(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function IR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function mRt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function hMe(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function _Me(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function gRt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return hMe(t+n)}function hRt(e){return _Me(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _Rt(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function ERt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var gMe,K3,TZ,aRt,PO,CZ,vZ,RZ,EZ,Et=O(()=>{m();zy();gMe=Symbol("evaluating");K3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};TZ=TR(()=>{if(jy.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});aRt=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},PO=new Set(["string","number","symbol"]),CZ=new Set(["string","number","bigint","boolean","symbol","undefined"]);vZ={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},RZ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};EZ=class{constructor(...t){}}});function QO(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function FO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{let c=[...i,...a.path];if(c.length===0)n._errors.push(t(a));else{let d=n,g=0;for(;g<c.length;){let h=c[g];g===c.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(a))):d[h]=d[h]||{_errors:[]},d=d[h],g++}}}};return r(e),n}function DZ(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var a,c;for(let d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(g=>r({issues:g},[...i,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...i,...d.path]);else{let g=[...i,...d.path];if(g.length===0){n.errors.push(t(d));continue}let h=n,S=0;for(;S<g.length;){let y=g[S],C=S===g.length-1;typeof y=="string"?(h.properties??(h.properties={}),(a=h.properties)[y]??(a[y]={errors:[]}),h=h.properties[y]):(h.items??(h.items=[]),(c=h.items)[y]??(c[y]={errors:[]}),h=h.items[y]),C&&h.errors.push(t(d)),S++}}};return r(e),n}function SMe(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function BZ(e){let t=[],n=[...e.issues].sort((r,o)=>(r.path??[]).length-(o.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${SMe(r.path)}`);return t.join(`
41
41
  `)}var EMe,LO,zc,NZ=O(()=>{m();zy();Et();EMe=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,yR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},LO=ne("$ZodError",EMe),zc=ne("$ZodError",EMe,{Parent:Error})});var CR,J3,bR,Z3,vR,OZ,RR,wZ,W3,yRt,X3,TRt,e6,IRt,t6,CRt,n6,bRt,r6,vRt,o6,RRt,i6,xRt,kZ=O(()=>{m();zy();NZ();Et();CR=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new mf;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Zu(d,i,gi())));throw K3(c,o?.callee),c}return a.value},J3=CR(zc),bR=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Zu(d,i,gi())));throw K3(c,o?.callee),c}return a.value},Z3=bR(zc),vR=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new mf;return i.issues.length?{success:!1,error:new(e??LO)(i.issues.map(a=>Zu(a,o,gi())))}:{success:!0,data:i.value}},OZ=vR(zc),RR=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Zu(a,o,gi())))}:{success:!0,data:i.value}},wZ=RR(zc),W3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return CR(e)(t,n,o)},yRt=W3(zc),X3=e=>(t,n,r)=>CR(e)(t,n,r),TRt=X3(zc),e6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return bR(e)(t,n,o)},IRt=e6(zc),t6=e=>async(t,n,r)=>bR(e)(t,n,r),CRt=t6(zc),n6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return vR(e)(t,n,o)},bRt=n6(zc),r6=e=>(t,n,r)=>vR(e)(t,n,r),vRt=r6(zc),o6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return RR(e)(t,n,o)},RRt=o6(zc),i6=e=>async(t,n,r)=>RR(e)(t,n,r),xRt=i6(zc)});var Hl={};Ha(Hl,{base64:()=>JZ,base64url:()=>a6,bigint:()=>rW,boolean:()=>iW,browserEmail:()=>MRt,cidrv4:()=>YZ,cidrv6:()=>KZ,cuid:()=>PZ,cuid2:()=>MZ,date:()=>XZ,datetime:()=>tW,domain:()=>QRt,duration:()=>GZ,e164:()=>WZ,email:()=>zZ,emoji:()=>HZ,extendedDuration:()=>DRt,guid:()=>jZ,hex:()=>FRt,hostname:()=>LRt,html5Email:()=>wRt,httpProtocol:()=>ZZ,idnEmail:()=>PRt,integer:()=>oW,ipv4:()=>$Z,ipv6:()=>VZ,ksuid:()=>QZ,lowercase:()=>uW,mac:()=>qZ,md5_base64:()=>jRt,md5_base64url:()=>zRt,md5_hex:()=>GRt,nanoid:()=>FZ,null:()=>aW,number:()=>s6,rfc5322Email:()=>kRt,sha1_base64:()=>$Rt,sha1_base64url:()=>VRt,sha1_hex:()=>HRt,sha256_base64:()=>YRt,sha256_base64url:()=>KRt,sha256_hex:()=>qRt,sha384_base64:()=>ZRt,sha384_base64url:()=>WRt,sha384_hex:()=>JRt,sha512_base64:()=>ext,sha512_base64url:()=>txt,sha512_hex:()=>XRt,string:()=>nW,time:()=>eW,ulid:()=>UZ,undefined:()=>sW,unicodeEmail:()=>yMe,uppercase:()=>cW,uuid:()=>$y,uuid4:()=>BRt,uuid6:()=>NRt,uuid7:()=>ORt,xid:()=>LZ});function HZ(){return new RegExp(URt,"u")}function IMe(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function eW(e){return new RegExp(`^${IMe(e)}$`)}function tW(e){let t=IMe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${TMe}T(?:${r})$`)}function GO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function jO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var PZ,MZ,UZ,LZ,QZ,FZ,GZ,DRt,jZ,$y,BRt,NRt,ORt,zZ,wRt,kRt,yMe,PRt,MRt,URt,$Z,VZ,qZ,YZ,KZ,JZ,a6,LRt,QRt,ZZ,WZ,TMe,XZ,nW,rW,oW,s6,iW,aW,sW,uW,cW,FRt,GRt,jRt,zRt,HRt,$Rt,VRt,qRt,YRt,KRt,JRt,ZRt,WRt,XRt,ext,txt,u6=O(()=>{m();Et();PZ=/^[cC][0-9a-z]{6,}$/,MZ=/^[0-9a-z]+$/,UZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,LZ=/^[0-9a-vA-V]{20}$/,QZ=/^[A-Za-z0-9]{27}$/,FZ=/^[a-zA-Z0-9_-]{21}$/,GZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,DRt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,jZ=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,$y=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,BRt=$y(4),NRt=$y(6),ORt=$y(7),zZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wRt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,kRt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,yMe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,PRt=yMe,MRt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,URt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";$Z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,VZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qZ=e=>{let t=Xd(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},YZ=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,KZ=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,JZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,a6=/^[A-Za-z0-9_-]*$/,LRt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,QRt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ZZ=/^https?$/,WZ=/^\+[1-9]\d{6,14}$/,TMe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",XZ=new RegExp(`^${TMe}$`);nW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},rW=/^-?\d+n?$/,oW=/^-?\d+$/,s6=/^-?\d+(?:\.\d+)?$/,iW=/^(?:true|false)$/i,aW=/^null$/i,sW=/^undefined$/i,uW=/^[^A-Z]*$/,cW=/^[^a-z]*$/,FRt=/^[0-9a-fA-F]*$/;GRt=/^[0-9a-fA-F]{32}$/,jRt=GO(22,"=="),zRt=jO(22),HRt=/^[0-9a-fA-F]{40}$/,$Rt=GO(27,"="),VRt=jO(27),qRt=/^[0-9a-fA-F]{64}$/,YRt=GO(43,"="),KRt=jO(43),JRt=/^[0-9a-fA-F]{96}$/,ZRt=GO(64,""),WRt=jO(64),XRt=/^[0-9a-fA-F]{128}$/,ext=GO(86,"=="),txt=jO(86)});function CMe(e,t,n){e.issues.length&&t.issues.push(...jc(n,e.issues))}var Yr,bMe,c6,l6,lW,dW,pW,fW,AW,mW,gW,hW,_W,xR,EW,SW,yW,TW,IW,CW,bW,vW,RW,d6=O(()=>{m();zy();u6();Et();Yr=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),bMe={number:"number",bigint:"bigint",object:"date"},c6=ne("$ZodCheckLessThan",(e,t)=>{Yr.init(e,t);let n=bMe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),l6=ne("$ZodCheckGreaterThan",(e,t)=>{Yr.init(e,t);let n=bMe[typeof t.value];e._zod.onattach.push(r=>{let o=r._zod.bag,i=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lW=ne("$ZodCheckMultipleOf",(e,t)=>{Yr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):SZ(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dW=ne("$ZodCheckNumberFormat",(e,t)=>{Yr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=vZ[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=oW)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),pW=ne("$ZodCheckBigIntFormat",(e,t)=>{Yr.init(e,t);let[n,r]=RZ[t.format];e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=o=>{let i=o.value;i<n&&o.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),i>r&&o.issues.push({origin:"bigint",input:i,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),fW=ne("$ZodCheckMaxSize",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:MO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),AW=ne("$ZodCheckMinSize",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:MO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),mW=ne("$ZodCheckSizeEquals",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:MO(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),gW=ne("$ZodCheckMaxLength",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let a=UO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hW=ne("$ZodCheckMinLength",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let a=UO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_W=ne("$ZodCheckLengthEquals",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!_E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let a=UO(o),c=i>t.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),xR=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;Yr.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),EW=ne("$ZodCheckRegex",(e,t)=>{xR.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),SW=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=uW),xR.init(e,t)}),yW=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=cW),xR.init(e,t)}),TW=ne("$ZodCheckIncludes",(e,t)=>{Yr.init(e,t);let n=Xd(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{let i=o._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),IW=ne("$ZodCheckStartsWith",(e,t)=>{Yr.init(e,t);let n=new RegExp(`^${Xd(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),CW=ne("$ZodCheckEndsWith",(e,t)=>{Yr.init(e,t);let n=new RegExp(`.*${Xd(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});bW=ne("$ZodCheckProperty",(e,t)=>{Yr.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>CMe(o,n,t.property));CMe(r,n,t.property)}}),vW=ne("$ZodCheckMimeType",(e,t)=>{Yr.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),RW=ne("$ZodCheckOverwrite",(e,t)=>{Yr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var zO,xW=O(()=>{m();zO=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
@@ -486,7 +486,7 @@ exec ${uue(n)} ${uue(e)} "$@"
486
486
  Authorization expired. Please try again.
487
487
  `);return;case"login_failed":console.log(`
488
488
  Login failed: ${e.message}
489
- `);return}}});var D5e={};Ha(D5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>w9e,getOpenBrowserCommand:()=>F9e,loginCommand:()=>fue,openBrowser:()=>Q9e,pollForTokens:()=>L9e,requestDeviceAuthorization:()=>U9e,runLogin:()=>G9e});import{spawn as yzt}from"node:child_process";function w9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function Czt(e){let n=await Lt({token:e}).whoAmI({headers:{}});n.status===200&&(v4e(`lore_${n.body.user.id}`),D4e(w9e(n.body)))}async function k9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function P9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function M9e(e,t){return new URL(t,e).toString()}async function bzt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function U9e({clientId:e,workosApiOrigin:t}){let n=await fetch(M9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await k9e(n);if(!n.ok)throw new Error(P9e(r));return r}async function L9e({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(M9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:Izt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let g=await k9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await O9e(c*1e3);break;case"slow_down":c+=1,await O9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(P9e(h))}}}async function Q9e(e){let{command:t,args:n}=F9e(process.platform,e);await new Promise((r,o)=>{let i=yzt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function F9e(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function vzt(e){if(!await Kt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function Rzt(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:tp()})}catch(r){Ee.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function xzt(e){if(nx(e))return`Could not reach the Lore API at ${KA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`;if(e instanceof Error&&e.message==="WorkOS CLI Auth is not configured.")return e.message}async function G9e({client:e=Lt(),enableLaunchAgent:t=OH,openBrowser:n=Q9e,platform:r=process.platform,pollForTokens:o=L9e,requestDeviceAuthorization:i=U9e,getCliAuthConfig:a=bzt,setAccessToken:c=tx,setRefreshToken:d=ej,cacheAnalyticsDistinctId:g=Czt,timeoutMs:h=Tzt,progress:S=B9e}={}){if(await vzt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){Ee.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{Ee.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await Rzt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),Rw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),Rw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),Rw());let C=xzt(y);throw C&&(S({kind:"login_failed",message:C}),Rw()),y}}var Tzt,Izt,O9e,fue,zse=O(async()=>{"use strict";m();kr();wn();tj();wr();ki();BE();await Fse();await x5e();Fk();aT();N9e();Tzt=5*60*1e3,Izt="urn:ietf:params:oauth:grant-type:device_code";O9e=e=>new Promise(t=>setTimeout(t,e));fue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){Ee.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Au()&&!e?.progress){await R5e(t),await SH({skipIfAlreadyConfigured:!0});return}await G9e({...t,progress:e?.progress})}}});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="caf4bef5-be94-4b08-a382-ee742c1e020d",e._sentryDebugIdIdentifier="sentry-dbid-caf4bef5-be94-4b08-a382-ee742c1e020d")}catch{}})();m();m();m();function Ile(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var Cle=Ile();Cle.ok||(process.stderr.write(`lore: ${Cle.message}.
489
+ `);return}}});var D5e={};Ha(D5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>w9e,getOpenBrowserCommand:()=>F9e,loginCommand:()=>fue,openBrowser:()=>Q9e,pollForTokens:()=>L9e,requestDeviceAuthorization:()=>U9e,runLogin:()=>G9e});import{spawn as yzt}from"node:child_process";function w9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function Czt(e){let n=await Lt({token:e}).whoAmI({headers:{}});n.status===200&&(v4e(`lore_${n.body.user.id}`),D4e(w9e(n.body)))}async function k9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function P9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function M9e(e,t){return new URL(t,e).toString()}async function bzt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function U9e({clientId:e,workosApiOrigin:t}){let n=await fetch(M9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await k9e(n);if(!n.ok)throw new Error(P9e(r));return r}async function L9e({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(M9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:Izt,device_code:t,client_id:e}),signal:a})}catch(S){throw S instanceof Error&&S.name==="TimeoutError"?new Error("authorization timed out"):S}let g=await k9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await O9e(c*1e3);break;case"slow_down":c+=1,await O9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(P9e(h))}}}async function Q9e(e){let{command:t,args:n}=F9e(process.platform,e);await new Promise((r,o)=>{let i=yzt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function F9e(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function vzt(e){if(!await Kt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function Rzt(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:tp()})}catch(r){Ee.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function xzt(e){if(nx(e))return`Could not reach the Lore API at ${KA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`;if(e instanceof Error&&e.message==="WorkOS CLI Auth is not configured.")return e.message}async function G9e({client:e=Lt(),enableLaunchAgent:t=OH,openBrowser:n=Q9e,platform:r=process.platform,pollForTokens:o=L9e,requestDeviceAuthorization:i=U9e,getCliAuthConfig:a=bzt,setAccessToken:c=tx,setRefreshToken:d=ej,cacheAnalyticsDistinctId:g=Czt,timeoutMs:h=Tzt,progress:S=B9e}={}){if(await vzt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){Ee.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{Ee.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await Rzt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),Rw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),Rw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),Rw());let C=xzt(y);throw C&&(S({kind:"login_failed",message:C}),Rw()),y}}var Tzt,Izt,O9e,fue,zse=O(async()=>{"use strict";m();kr();wn();tj();wr();ki();BE();await Fse();await x5e();Fk();aT();N9e();Tzt=5*60*1e3,Izt="urn:ietf:params:oauth:grant-type:device_code";O9e=e=>new Promise(t=>setTimeout(t,e));fue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){Ee.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Au()&&!e?.progress){await R5e(t),await SH({skipIfAlreadyConfigured:!0});return}await G9e({...t,progress:e?.progress})}}});m();m();(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f9f1ffb7-ddc1-480b-9494-5fc90bcb63b2",e._sentryDebugIdIdentifier="sentry-dbid-f9f1ffb7-ddc1-480b-9494-5fc90bcb63b2")}catch{}})();m();m();m();function Ile(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var Cle=Ile();Cle.ok||(process.stderr.write(`lore: ${Cle.message}.
490
490
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
491
491
  `),process.exit(1));m();pR();Gl();function Sbt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var ybt=Sbt();eZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Ni(),release:Yu(),sendDefaultPii:!0,enableLogs:!0,spotlight:ybt,tracesSampleRate:1});ZU("service_name","lore-cli");pR();oZ();import{realpathSync as r$t}from"node:fs";import{fileURLToPath as o$t,pathToFileURL as Gqe}from"node:url";m();m();zG();kr();wn();wr();m();function xw(e){let t=e;return t._def??t.def??{}}function Jkt(e){let t=xw(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Vc(e,t,n){let r=Jkt(e);return r===t||r===n}function Y4e(e){let t=xw(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Zkt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=xw(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function mre(e){if(!e||!Vc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=xw(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function K4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=xw(t);if(Vc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Vc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Vc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Vc(t,"ZodEffects","effects"))t=i.schema;else if(Vc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Wkt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=K4e(e),a=!1,c=n;Vc(c,"ZodArray","array")&&(a=!0,c=Y4e(c)??c);let d=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Vc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Zkt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Vc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:d,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:d,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function gre(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=Wkt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Xkt(i)}}return{args:n,fields:r}}function hre(e,t={}){let n=mre(e);return n?gre(n,t):{args:{},fields:{}}}function Xkt(e){let{inner:t}=K4e(e),n=t;return Vc(n,"ZodArray","array")&&(n=Y4e(n)??n),Vc(n,"ZodNumber","number")?"number":Vc(n,"ZodBoolean","boolean")?"boolean":Vc(n,"ZodEnum","enum")?"enum":Vc(n,"ZodString","string")?"string":"other"}function ePt(e,t){let n=e;for(let r of t){if(n===null||typeof n!="object"||!(r in n))throw new Error(`cliRoutes path [${t.join(".")}] does not resolve in apiContract`);n=n[r]}if(n===null||typeof n!="object"||typeof n.method!="string")throw new Error(`cliRoutes path [${t.join(".")}] is not a leaf route (missing 'method')`);return n}function tPt(e,t){let n=e;for(let r of t)n=n[r];if(typeof n!="function")throw new Error(`client method for [${t.join(".")}] is not callable`);return n}function _re(e,t){if(!(e==null||e==="")){if(t.isArray&&typeof e=="string"){let n=e.split(",").map(r=>r.trim()).filter(r=>r.length>0);return n.length>0?n:void 0}if(t.leafKind==="number"&&typeof e=="string"){let n=Number(e);return Number.isFinite(n)?n:e}return e}}function nPt(e){if(typeof e!="string")return e;try{let n=new URL(e).pathname.split("/").filter(Boolean),r=n.findIndex(i=>i==="thread"||i==="threads"),o=r>=0?n[r+1]:void 0;return o&&o.length>0?o:e}catch{return e}}function rPt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Ere(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>rPt(n,a))}function oPt(e,t,n){return e.resource==="threads"&&t==="id"?nPt(n):n}function J4e(e){let t=ePt(KG,e.path),n=mre(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=gre(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=hre(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:hre(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},g=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:g},args:d,async run({args:h,data:S}){Ee.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.getAccessToken??Kt)())throw new we("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let ye=h[ge],be=_re(ye,i.fields[ge])??ye;v[ge]=oPt(e,ge,be)}let x={};for(let[ge,ye]of Object.entries(a.fields)){let be=_re(h[ge],ye);be!==void 0&&(x[ge]=be)}let N={};for(let[ge,ye]of Object.entries(c.fields)){let be=_re(h[ge],ye);be!==void 0&&(N[ge]=be)}let k=[...Ere(t.pathParams,v,"path"),...Ere(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Ere(t.body,N,"body")];if(k.length>0)throw new we(`Invalid request for \`lore ${e.resource} ${e.op}\`:
492
492
  ${k.join(`