@tanagram/lore 0.1.125 → 0.1.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +4 -4
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 e7e=Object.create;var qP=Object.defineProperty;var t7e=Object.getOwnPropertyDescriptor;var n7e=Object.getOwnPropertyNames;var r7e=Object.getPrototypeOf,o7e=Object.prototype.hasOwnProperty;var Fe=(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),za=(e,t)=>{for(var n in t)qP(e,n,{get:t[n],enumerable:!0})},yle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of n7e(t))!o7e.call(e,o)&&o!==n&&qP(e,o,{get:()=>t[o],enumerable:!(r=t7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?e7e(r7e(e)):{},yle(t||!e||!e.__esModule?qP(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>yle(qP({},"__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.125"}}catch{}})()});var Xm,f$=O(()=>{m();Xm="1.9.1"});function i7e(e){let t=new Set([e]),n=new Set,r=e.match(Cle);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(Cle);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 Cle,ble,vle=O(()=>{m();f$();Cle=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;ble=i7e(Xm)});function oA(e,t,n,r=!1){var o;let i=K1[Y1]=(o=K1[Y1])!==null&&o!==void 0?o:{version:Xm};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!==Xm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Xm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Xm}.`),!0}function Cl(e){var t,n;let r=(t=K1[Y1])===null||t===void 0?void 0:t.version;if(!(!r||!ble(r)))return(n=K1[Y1])===null||n===void 0?void 0:n[e]}function iA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Xm}.`);let n=K1[Y1];n&&delete n[e]}var a7e,Y1,K1,TS=O(()=>{m();f$();vle();a7e=Xm.split(".")[0],Y1=Symbol.for(`opentelemetry.js.api.${a7e}`),K1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function J1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var YP,Rle=O(()=>{m();TS();YP=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return J1("debug",this._namespace,t)}error(...t){return J1("error",this._namespace,t)}info(...t){return J1("info",this._namespace,t)}warn(...t){return J1("warn",this._namespace,t)}verbose(...t){return J1("verbose",this._namespace,t)}}});var _a,KP=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"})(_a||(_a={}))});function xle(e,t){e<_a.NONE?e=_a.NONE:e>_a.ALL&&(e=_a.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",_a.ERROR),warn:n("warn",_a.WARN),info:n("info",_a.INFO),debug:n("debug",_a.DEBUG),verbose:n("verbose",_a.VERBOSE)}}var Dle=O(()=>{m();KP()});var s7e,$a,IS=O(()=>{m();Rle();Dle();KP();TS();s7e="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:_a.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=xle((c=i.logLevel)!==null&&c!==void 0?c:_a.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 oA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{iA(s7e,n)},n.createComponentLogger=o=>new YP(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var JP,Ble=O(()=>{m();JP=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 Nle,Ole=O(()=>{m();Nle=Symbol("BaggageEntryMetadata")});function wle(e={}){return new JP(new Map(Object.entries(e)))}function kle(e){return typeof e!="string"&&(u7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Nle,toString(){return e}}}var u7e,A$=O(()=>{m();IS();Ble();Ole();u7e=$a.instance()});function bl(e){return Symbol.for(e)}var m$,LC,Z1=O(()=>{m();m$=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}}},LC=new m$});var g$,h$,ZP,Mle=O(()=>{m();g$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h$[t]=console[t])}ZP=class{constructor(){function t(n){return function(...r){let o=h$[n];if(typeof o!="function"&&(o=h$.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<g$.length;n++)this[g$[n].n]=t(g$[n].c)}}});function Ple(){return v$}var _$,QC,E$,S$,y$,T$,W1,I$,C$,b$,v$,c7e,l7e,d7e,p7e,f7e,A7e,m7e,R$=O(()=>{m();_$=class{constructor(){}createGauge(t,n){return l7e}createHistogram(t,n){return d7e}createCounter(t,n){return c7e}createUpDownCounter(t,n){return p7e}createObservableGauge(t,n){return A7e}createObservableCounter(t,n){return f7e}createObservableUpDownCounter(t,n){return m7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},QC=class{},E$=class extends QC{add(t,n){}},S$=class extends QC{add(t,n){}},y$=class extends QC{record(t,n){}},T$=class extends QC{record(t,n){}},W1=class{addCallback(t){}removeCallback(t){}},I$=class extends W1{},C$=class extends W1{},b$=class extends W1{},v$=new _$,c7e=new E$,l7e=new y$,d7e=new T$,p7e=new S$,f7e=new I$,A7e=new C$,m7e=new b$});var WP,Ule=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(WP||(WP={}))});var XP,e2,x$=O(()=>{m();XP={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},e2={set(e,t,n){e!=null&&(e[t]=n)}}});var t2,Lle=O(()=>{m();Z1();t2=class{active(){return LC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D$,g7e,aA,X1=O(()=>{m();Lle();TS();IS();D$="context",g7e=new t2,aA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return oA(D$,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(D$)||g7e}disable(){this._getContextManager().disable(),iA(D$,$a.instance())}}});var Ks,B$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var eB,CS,n2,r2=O(()=>{m();B$();eB="0000000000000000",CS="00000000000000000000000000000000",n2={traceId:CS,spanId:eB,traceFlags:Ks.NONE}});var sA,o2=O(()=>{m();r2();sA=class{constructor(t=n2){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 i2(e){return e.getValue(N$)||void 0}function Qle(){return i2(aA.getInstance().active())}function tB(e,t){return e.setValue(N$,t)}function Fle(e){return e.deleteValue(N$)}function Gle(e,t){return tB(e,new sA(t))}function a2(e){var t;return(t=i2(e))===null||t===void 0?void 0:t.spanContext()}var N$,O$=O(()=>{m();Z1();o2();X1();N$=bl("OpenTelemetry Context Key SPAN")});function jle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(s2[e.charCodeAt(r)]|0)+(s2[e.charCodeAt(r+1)]|0)+(s2[e.charCodeAt(r+2)]|0)+(s2[e.charCodeAt(r+3)]|0);return n===t}function w$(e){return jle(e,32)&&e!==CS}function k$(e){return jle(e,16)&&e!==eB}function eg(e){return w$(e.traceId)&&k$(e.spanId)}function Hle(e){return new sA(e)}var s2,u2=O(()=>{m();r2();o2();s2=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 h7e(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 M$,FC,P$=O(()=>{m();X1();O$();o2();u2();M$=aA.getInstance(),FC=class{startSpan(t,n,r=M$.active()){if(!!n?.root)return new sA;let i=r&&a2(r);return h7e(i)&&eg(i)?new sA(i):new sA}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??M$.active(),g=this.startSpan(t,i,d),h=tB(d,g);return M$.with(h,c,void 0,g)}}});var _7e,GC,U$=O(()=>{m();P$();_7e=new FC,GC=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):_7e}}});var c2,zle=O(()=>{m();P$();c2=class{getTracer(t,n,r){return new FC}}});var E7e,bS,L$=O(()=>{m();U$();zle();E7e=new c2,bS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new GC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:E7e}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 l2,$le=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"})(l2||(l2={}))});var oo,Vle=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"})(oo||(oo={}))});var ui,qle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Yle(e){return T7e.test(e)}function Kle(e){return I7e.test(e)&&!C7e.test(e)}var Q$,S7e,y7e,T7e,I7e,C7e,Jle=O(()=>{m();Q$="[_0-9a-z-*/]",S7e=`[a-z]${Q$}{0,255}`,y7e=`[a-z0-9]${Q$}{0,240}@[a-z]${Q$}{0,13}`,T7e=new RegExp(`^(?:${S7e}|${y7e})$`),I7e=/^[ -~]{0,255}[!-~]$/,C7e=/,|=/});var Zle,b7e,Wle,Xle,d2,ede=O(()=>{m();Jle();Zle=32,b7e=512,Wle=",",Xle="=",d2=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+Xle+this.get(n)),t),[]).join(Wle)}_parse(t){t.length>b7e||(this._internalState=t.split(Wle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Xle);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Yle(a)&&Kle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Zle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Zle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function tde(e){return new d2(e)}var nde=O(()=>{m();ede()});var Ke,rde=O(()=>{m();X1();Ke=aA.getInstance()});var vl,ode=O(()=>{m();IS();vl=$a.instance()});var F$,ide,ade=O(()=>{m();R$();F$=class{getMeter(t,n,r){return v$}},ide=new F$});var G$,p2,sde=O(()=>{m();ade();TS();IS();G$="metrics",p2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return oA(G$,t,$a.instance())}getMeterProvider(){return Cl(G$)||ide}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){iA(G$,$a.instance())}}});var j$,ude=O(()=>{m();sde();j$=p2.getInstance()});var f2,cde=O(()=>{m();f2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(H$)||void 0}function lde(){return z$(aA.getInstance().active())}function dde(e,t){return e.setValue(H$,t)}function pde(e){return e.deleteValue(H$)}var H$,fde=O(()=>{m();X1();Z1();H$=bl("OpenTelemetry Baggage Key")});var $$,v7e,A2,Ade=O(()=>{m();TS();cde();x$();fde();A$();IS();$$="propagation",v7e=new f2,A2=class e{constructor(){this.createBaggage=wle,this.getBaggage=z$,this.getActiveBaggage=lde,this.setBaggage=dde,this.deleteBaggage=pde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return oA($$,t,$a.instance())}inject(t,n,r=e2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=XP){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iA($$,$a.instance())}_getGlobalPropagator(){return Cl($$)||v7e}}});var Vp,mde=O(()=>{m();Ade();Vp=A2.getInstance()});var V$,m2,gde=O(()=>{m();TS();L$();u2();O$();IS();V$="trace",m2=class e{constructor(){this._proxyTracerProvider=new bS,this.wrapSpanContext=Hle,this.isSpanContextValid=eg,this.deleteSpan=Fle,this.getSpan=i2,this.getActiveSpan=Qle,this.getSpanContext=a2,this.setSpan=tB,this.setSpanContext=Gle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=oA(V$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl(V$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){iA(V$,$a.instance()),this._proxyTracerProvider=new bS}}});var Ht,hde=O(()=>{m();gde();Ht=m2.getInstance()});var We={};za(We,{DiagConsoleLogger:()=>ZP,DiagLogLevel:()=>_a,INVALID_SPANID:()=>eB,INVALID_SPAN_CONTEXT:()=>n2,INVALID_TRACEID:()=>CS,ProxyTracer:()=>GC,ProxyTracerProvider:()=>bS,ROOT_CONTEXT:()=>LC,SamplingDecision:()=>l2,SpanKind:()=>oo,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>WP,baggageEntryMetadataFromString:()=>kle,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ple,createTraceState:()=>tde,default:()=>R7e,defaultTextMapGetter:()=>XP,defaultTextMapSetter:()=>e2,diag:()=>vl,isSpanContextValid:()=>eg,isValidSpanId:()=>k$,isValidTraceId:()=>w$,metrics:()=>j$,propagation:()=>Vp,trace:()=>Ht});var R7e,Ge=O(()=>{m();A$();Z1();Mle();KP();R$();Ule();x$();U$();L$();$le();Vle();qle();B$();nde();u2();r2();rde();ode();ude();mde();hde();R7e={context:Ke,diag:vl,metrics:j$,propagation:Vp,trace:Ht}});var nB=F(Xh=>{"use strict";m();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.isTracingSuppressed=Xh.unsuppressTracing=Xh.suppressTracing=void 0;var x7e=(Ge(),Me(We)),q$=(0,x7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function D7e(e){return e.setValue(q$,!0)}Xh.suppressTracing=D7e;function B7e(e){return e.deleteValue(q$)}Xh.unsuppressTracing=B7e;function N7e(e){return e.getValue(q$)===!0}Xh.isTracingSuppressed=N7e});var Y$=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 K$=F(uA=>{"use strict";m();Object.defineProperty(uA,"__esModule",{value:!0});uA.parseKeyPairsIntoRecord=uA.parsePairKeyValue=uA.getKeyPairs=uA.serializeKeyPairs=void 0;var O7e=(Ge(),Me(We)),jC=Y$();function w7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?jC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>jC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}uA.serializeKeyPairs=w7e;function k7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=jC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}uA.getKeyPairs=k7e;function _de(e){if(!e)return;let t=e.indexOf(jC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(jC.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,O7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}uA.parsePairKeyValue=_de;function M7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(jC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=_de(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}uA.parseKeyPairsIntoRecord=M7e});var Ede=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.W3CBaggagePropagator=void 0;var J$=(Ge(),Me(We)),P7e=nB(),vS=Y$(),Z$=K$(),W$=class{inject(t,n,r){let o=J$.propagation.getBaggage(t);if(!o||(0,P7e.isTracingSuppressed)(t))return;let i=(0,Z$.getKeyPairs)(o).filter(c=>c.length<=vS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,vS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Z$.serializeKeyPairs)(i);a.length>0&&r.set(n,vS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,vS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(vS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(vS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,Z$.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:J$.propagation.setBaggage(t,J$.propagation.createBaggage(a))}fields(){return[vS.BAGGAGE_HEADER]}};g2.W3CBaggagePropagator=W$});var Sde=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.AnchoredClock=void 0;var X$=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}};h2.AnchoredClock=X$});var bde=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isAttributeValue=e_.isAttributeKey=e_.sanitizeAttributes=void 0;var yde=(Ge(),Me(We));function U7e(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(!Tde(n)){yde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ide(r)){yde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}e_.sanitizeAttributes=U7e;function Tde(e){return typeof e=="string"&&e!==""}e_.isAttributeKey=Tde;function Ide(e){return e==null?!0:Array.isArray(e)?L7e(e):Cde(typeof e)}e_.isAttributeValue=Ide;function L7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Cde(r)){t=r;continue}return!1}return!1}}return!0}function Cde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var e5=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2.loggingErrorHandler=void 0;var Q7e=(Ge(),Me(We));function F7e(){return e=>{Q7e.diag.error(G7e(e))}}_2.loggingErrorHandler=F7e;function G7e(e){return typeof e=="string"?e:JSON.stringify(j7e(e))}function j7e(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 Rde=F(HC=>{"use strict";m();Object.defineProperty(HC,"__esModule",{value:!0});HC.globalErrorHandler=HC.setGlobalErrorHandler=void 0;var H7e=e5(),vde=(0,H7e.loggingErrorHandler)();function z7e(e){vde=e}HC.setGlobalErrorHandler=z7e;function $7e(e){try{vde(e)}catch{}}HC.globalErrorHandler=$7e});var Nde=F(cA=>{"use strict";m();Object.defineProperty(cA,"__esModule",{value:!0});cA.getStringListFromEnv=cA.getBooleanFromEnv=cA.getStringFromEnv=cA.getNumberFromEnv=void 0;var xde=(Ge(),Me(We)),Dde=Fe("util");function V7e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){xde.diag.warn(`Unknown value ${(0,Dde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}cA.getNumberFromEnv=V7e;function Bde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}cA.getStringFromEnv=Bde;function q7e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||xde.diag.warn(`Unknown value ${(0,Dde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}cA.getBooleanFromEnv=q7e;function Y7e(e){return Bde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}cA.getStringListFromEnv=Y7e});var Ode=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2._globalThis=void 0;E2._globalThis=globalThis});var wde=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.VERSION=void 0;S2.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 t5=O(()=>{m()});var kde,Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$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,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$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,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,K7e,n5,J7e,Z7e,W7e,X7e,r5,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,o5,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,i5,BYe,NYe,a5,s5,OYe,wYe,kYe,MYe,PYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,rB,zC,u5,KYe,JYe,RS,ZYe,WYe,XYe,eKe,c5,l5,tKe,d5,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,p5,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,kKe,MKe,PKe,UKe,LKe,QKe,FKe,GKe,jKe,HKe,f5,zKe,A5,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eAe,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,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,MJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,ome,ime,ame,sme,ume,aZe,sZe,uZe,cZe,lZe,dZe,cme,lme,dme,pZe,fZe,AZe,mZe,pme,fme,Ame,mme,gZe,hZe,_Ze,EZe,SZe,gme,hme,_me,Eme,Sme,yme,Tme,yZe,TZe,IZe,CZe,bZe,vZe,RZe,xZe,Ime,Cme,bme,vme,Rme,DZe,BZe,NZe,OZe,wZe,kZe,xme,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,MZe,PZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,Kme,Jme,Zme,Wme,Xme,rWe,oWe,iWe,aWe,sWe,uWe,ege,tge,cWe,lWe,dWe,nge,rge,pWe,fWe,AWe,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,yge,Tge,wWe,kWe,MWe,Ige=O(()=>{m();t5();kde="aws.lambda.invoked_arn",Mde="db.system",Pde="db.connection_string",Ude="db.user",Lde="db.jdbc.driver_classname",Qde="db.name",Fde="db.statement",Gde="db.operation",jde="db.mssql.instance_name",Hde="db.cassandra.keyspace",zde="db.cassandra.page_size",$de="db.cassandra.consistency_level",Vde="db.cassandra.table",qde="db.cassandra.idempotence",Yde="db.cassandra.speculative_execution_count",Kde="db.cassandra.coordinator.id",Jde="db.cassandra.coordinator.dc",Zde="db.hbase.namespace",Wde="db.redis.database_index",Xde="db.mongodb.collection",epe="db.sql.table",tpe="exception.type",npe="exception.message",rpe="exception.stacktrace",ope="exception.escaped",ipe="faas.trigger",ape="faas.execution",spe="faas.document.collection",upe="faas.document.operation",cpe="faas.document.time",lpe="faas.document.name",dpe="faas.time",ppe="faas.cron",fpe="faas.coldstart",Ape="faas.invoked_name",mpe="faas.invoked_provider",gpe="faas.invoked_region",hpe="net.transport",_pe="net.peer.ip",Epe="net.peer.port",Spe="net.peer.name",ype="net.host.ip",Tpe="net.host.port",Ipe="net.host.name",Cpe="net.host.connection.type",bpe="net.host.connection.subtype",vpe="net.host.carrier.name",Rpe="net.host.carrier.mcc",xpe="net.host.carrier.mnc",Dpe="net.host.carrier.icc",Bpe="peer.service",Npe="enduser.id",Ope="enduser.role",wpe="enduser.scope",kpe="thread.id",Mpe="thread.name",Ppe="code.function",Upe="code.namespace",Lpe="code.filepath",Qpe="code.lineno",Fpe="http.method",Gpe="http.url",jpe="http.target",Hpe="http.host",zpe="http.scheme",$pe="http.status_code",Vpe="http.flavor",qpe="http.user_agent",Ype="http.request_content_length",Kpe="http.request_content_length_uncompressed",Jpe="http.response_content_length",Zpe="http.response_content_length_uncompressed",Wpe="http.server_name",Xpe="http.route",efe="http.client_ip",tfe="aws.dynamodb.table_names",nfe="aws.dynamodb.consumed_capacity",rfe="aws.dynamodb.item_collection_metrics",ofe="aws.dynamodb.provisioned_read_capacity",ife="aws.dynamodb.provisioned_write_capacity",afe="aws.dynamodb.consistent_read",sfe="aws.dynamodb.projection",ufe="aws.dynamodb.limit",cfe="aws.dynamodb.attributes_to_get",lfe="aws.dynamodb.index_name",dfe="aws.dynamodb.select",pfe="aws.dynamodb.global_secondary_indexes",ffe="aws.dynamodb.local_secondary_indexes",Afe="aws.dynamodb.exclusive_start_table",mfe="aws.dynamodb.table_count",gfe="aws.dynamodb.scan_forward",hfe="aws.dynamodb.segment",_fe="aws.dynamodb.total_segments",Efe="aws.dynamodb.count",Sfe="aws.dynamodb.scanned_count",yfe="aws.dynamodb.attribute_definitions",Tfe="aws.dynamodb.global_secondary_index_updates",Ife="messaging.system",Cfe="messaging.destination",bfe="messaging.destination_kind",vfe="messaging.temp_destination",Rfe="messaging.protocol",xfe="messaging.protocol_version",Dfe="messaging.url",Bfe="messaging.message_id",Nfe="messaging.conversation_id",Ofe="messaging.message_payload_size_bytes",wfe="messaging.message_payload_compressed_size_bytes",kfe="messaging.operation",Mfe="messaging.consumer_id",Pfe="messaging.rabbitmq.routing_key",Ufe="messaging.kafka.message_key",Lfe="messaging.kafka.consumer_group",Qfe="messaging.kafka.client_id",Ffe="messaging.kafka.partition",Gfe="messaging.kafka.tombstone",jfe="rpc.system",Hfe="rpc.service",zfe="rpc.method",$fe="rpc.grpc.status_code",Vfe="rpc.jsonrpc.version",qfe="rpc.jsonrpc.request_id",Yfe="rpc.jsonrpc.error_code",Kfe="rpc.jsonrpc.error_message",Jfe="message.type",Zfe="message.id",Wfe="message.compressed_size",Xfe="message.uncompressed_size",K7e=kde,n5=Mde,J7e=Pde,Z7e=Ude,W7e=Lde,X7e=Qde,r5=Fde,eYe=Gde,tYe=jde,nYe=Hde,rYe=zde,oYe=$de,iYe=Vde,aYe=qde,sYe=Yde,uYe=Kde,cYe=Jde,lYe=Zde,dYe=Wde,pYe=Xde,fYe=epe,AYe=tpe,mYe=npe,gYe=rpe,hYe=ope,o5=ipe,_Ye=ape,EYe=spe,SYe=upe,yYe=cpe,TYe=lpe,IYe=dpe,CYe=ppe,bYe=fpe,vYe=Ape,RYe=mpe,xYe=gpe,DYe=hpe,i5=_pe,BYe=Epe,NYe=Spe,a5=ype,s5=Tpe,OYe=Ipe,wYe=Cpe,kYe=bpe,MYe=vpe,PYe=Rpe,UYe=xpe,LYe=Dpe,QYe=Bpe,FYe=Npe,GYe=Ope,jYe=wpe,HYe=kpe,zYe=Mpe,$Ye=Ppe,VYe=Upe,qYe=Lpe,YYe=Qpe,rB=Fpe,zC=Gpe,u5=jpe,KYe=Hpe,JYe=zpe,RS=$pe,ZYe=Vpe,WYe=qpe,XYe=Ype,eKe=Kpe,c5=Jpe,l5=Zpe,tKe=Wpe,d5=Xpe,nKe=efe,rKe=tfe,oKe=nfe,iKe=rfe,aKe=ofe,sKe=ife,uKe=afe,cKe=sfe,lKe=ufe,dKe=cfe,pKe=lfe,fKe=dfe,AKe=pfe,mKe=ffe,gKe=Afe,hKe=mfe,_Ke=gfe,EKe=hfe,SKe=_fe,yKe=Efe,TKe=Sfe,IKe=yfe,CKe=Tfe,p5=Ife,bKe=Cfe,vKe=bfe,RKe=vfe,xKe=Rfe,DKe=xfe,BKe=Dfe,NKe=Bfe,OKe=Nfe,wKe=Ofe,kKe=wfe,MKe=kfe,PKe=Mfe,UKe=Pfe,LKe=Ufe,QKe=Lfe,FKe=Qfe,GKe=Ffe,jKe=Gfe,HKe=jfe,f5=Hfe,zKe=zfe,A5=$fe,$Ke=Vfe,VKe=qfe,qKe=Yfe,YKe=Kfe,KKe=Jfe,JKe=Zfe,ZKe=Wfe,WKe=Xfe,XKe=bi([kde,Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$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,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$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,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe]),eAe="other_sql",tAe="mssql",nAe="mysql",rAe="oracle",oAe="db2",iAe="postgresql",aAe="redshift",sAe="hive",uAe="cloudscape",cAe="hsqldb",lAe="progress",dAe="maxdb",pAe="hanadb",fAe="ingres",AAe="firstsql",mAe="edb",gAe="cache",hAe="adabas",_Ae="firebird",EAe="derby",SAe="filemaker",yAe="informix",TAe="instantdb",IAe="interbase",CAe="mariadb",bAe="netezza",vAe="pervasive",RAe="pointbase",xAe="sqlite",DAe="sybase",BAe="teradata",NAe="vertica",OAe="h2",wAe="coldfusion",kAe="cassandra",MAe="hbase",PAe="mongodb",UAe="redis",LAe="couchbase",QAe="couchdb",FAe="cosmosdb",GAe="dynamodb",jAe="neo4j",HAe="geode",zAe="elasticsearch",$Ae="memcached",VAe="cockroachdb",eJe=eAe,tJe=tAe,nJe=nAe,rJe=rAe,oJe=oAe,iJe=iAe,aJe=aAe,sJe=sAe,uJe=uAe,cJe=cAe,lJe=lAe,dJe=dAe,pJe=pAe,fJe=fAe,AJe=AAe,mJe=mAe,gJe=gAe,hJe=hAe,_Je=_Ae,EJe=EAe,SJe=SAe,yJe=yAe,TJe=TAe,IJe=IAe,CJe=CAe,bJe=bAe,vJe=vAe,RJe=RAe,xJe=xAe,DJe=DAe,BJe=BAe,NJe=NAe,OJe=OAe,wJe=wAe,kJe=kAe,MJe=MAe,PJe=PAe,UJe=UAe,LJe=LAe,QJe=QAe,FJe=FAe,GJe=GAe,jJe=jAe,HJe=HAe,zJe=zAe,$Je=$Ae,VJe=VAe,qJe=bi([eAe,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,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe]),qAe="all",YAe="each_quorum",KAe="quorum",JAe="local_quorum",ZAe="one",WAe="two",XAe="three",eme="local_one",tme="any",nme="serial",rme="local_serial",YJe=qAe,KJe=YAe,JJe=KAe,ZJe=JAe,WJe=ZAe,XJe=WAe,eZe=XAe,tZe=eme,nZe=tme,rZe=nme,oZe=rme,iZe=bi([qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme]),ome="datasource",ime="http",ame="pubsub",sme="timer",ume="other",aZe=ome,sZe=ime,uZe=ame,cZe=sme,lZe=ume,dZe=bi([ome,ime,ame,sme,ume]),cme="insert",lme="edit",dme="delete",pZe=cme,fZe=lme,AZe=dme,mZe=bi([cme,lme,dme]),pme="alibaba_cloud",fme="aws",Ame="azure",mme="gcp",gZe=pme,hZe=fme,_Ze=Ame,EZe=mme,SZe=bi([pme,fme,Ame,mme]),gme="ip_tcp",hme="ip_udp",_me="ip",Eme="unix",Sme="pipe",yme="inproc",Tme="other",yZe=gme,TZe=hme,IZe=_me,CZe=Eme,bZe=Sme,vZe=yme,RZe=Tme,xZe=bi([gme,hme,_me,Eme,Sme,yme,Tme]),Ime="wifi",Cme="wired",bme="cell",vme="unavailable",Rme="unknown",DZe=Ime,BZe=Cme,NZe=bme,OZe=vme,wZe=Rme,kZe=bi([Ime,Cme,bme,vme,Rme]),xme="gprs",Dme="edge",Bme="umts",Nme="cdma",Ome="evdo_0",wme="evdo_a",kme="cdma2000_1xrtt",Mme="hsdpa",Pme="hsupa",Ume="hspa",Lme="iden",Qme="evdo_b",Fme="lte",Gme="ehrpd",jme="hspap",Hme="gsm",zme="td_scdma",$me="iwlan",Vme="nr",qme="nrnsa",Yme="lte_ca",MZe=xme,PZe=Dme,UZe=Bme,LZe=Nme,QZe=Ome,FZe=wme,GZe=kme,jZe=Mme,HZe=Pme,zZe=Ume,$Ze=Lme,VZe=Qme,qZe=Fme,YZe=Gme,KZe=jme,JZe=Hme,ZZe=zme,WZe=$me,XZe=Vme,eWe=qme,tWe=Yme,nWe=bi([xme,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme]),Kme="1.0",Jme="1.1",Zme="2.0",Wme="SPDY",Xme="QUIC",rWe=Kme,oWe=Jme,iWe=Zme,aWe=Wme,sWe=Xme,uWe={HTTP_1_0:Kme,HTTP_1_1:Jme,HTTP_2_0:Zme,SPDY:Wme,QUIC:Xme},ege="queue",tge="topic",cWe=ege,lWe=tge,dWe=bi([ege,tge]),nge="receive",rge="process",pWe=nge,fWe=rge,AWe=bi([nge,rge]),oge=0,ige=1,age=2,sge=3,uge=4,cge=5,lge=6,dge=7,pge=8,fge=9,Age=10,mge=11,gge=12,hge=13,_ge=14,Ege=15,Sge=16,mWe=oge,gWe=ige,hWe=age,_We=sge,EWe=uge,SWe=cge,yWe=lge,TWe=dge,IWe=pge,CWe=fge,bWe=Age,vWe=mge,RWe=gge,xWe=hge,DWe=_ge,BWe=Ege,NWe=Sge,OWe={OK:oge,CANCELLED:ige,UNKNOWN:age,INVALID_ARGUMENT:sge,DEADLINE_EXCEEDED:uge,NOT_FOUND:cge,ALREADY_EXISTS:lge,PERMISSION_DENIED:dge,RESOURCE_EXHAUSTED:pge,FAILED_PRECONDITION:fge,ABORTED:Age,OUT_OF_RANGE:mge,UNIMPLEMENTED:gge,INTERNAL:hge,UNAVAILABLE:_ge,DATA_LOSS:Ege,UNAUTHENTICATED:Sge},yge="SENT",Tge="RECEIVED",wWe=yge,kWe=Tge,MWe=bi([yge,Tge])});var Cge=O(()=>{m();Ige()});var bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$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,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,PWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,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,MXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,m5,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,Whe,Xhe,e_e,t_e,cet,det,pet,fet,Aet,n_e,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,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,Net,Oet,wet,E_e,S_e,ket,Met,Pet,y_e,T_e,I_e,C_e,b_e,v_e,R_e,Uet,Let,Qet,Fet,Get,jet,Het,zet,x_e,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,$et,Vet,qet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,K_e=O(()=>{m();t5();bge="cloud.provider",vge="cloud.account.id",Rge="cloud.region",xge="cloud.availability_zone",Dge="cloud.platform",Bge="aws.ecs.container.arn",Nge="aws.ecs.cluster.arn",Oge="aws.ecs.launchtype",wge="aws.ecs.task.arn",kge="aws.ecs.task.family",Mge="aws.ecs.task.revision",Pge="aws.eks.cluster.arn",Uge="aws.log.group.names",Lge="aws.log.group.arns",Qge="aws.log.stream.names",Fge="aws.log.stream.arns",Gge="container.name",jge="container.id",Hge="container.runtime",zge="container.image.name",$ge="container.image.tag",Vge="deployment.environment",qge="device.id",Yge="device.model.identifier",Kge="device.model.name",Jge="faas.name",Zge="faas.id",Wge="faas.version",Xge="faas.instance",ehe="faas.max_memory",the="host.id",nhe="host.name",rhe="host.type",ohe="host.arch",ihe="host.image.name",ahe="host.image.id",she="host.image.version",uhe="k8s.cluster.name",che="k8s.node.name",lhe="k8s.node.uid",dhe="k8s.namespace.name",phe="k8s.pod.uid",fhe="k8s.pod.name",Ahe="k8s.container.name",mhe="k8s.replicaset.uid",ghe="k8s.replicaset.name",hhe="k8s.deployment.uid",_he="k8s.deployment.name",Ehe="k8s.statefulset.uid",She="k8s.statefulset.name",yhe="k8s.daemonset.uid",The="k8s.daemonset.name",Ihe="k8s.job.uid",Che="k8s.job.name",bhe="k8s.cronjob.uid",vhe="k8s.cronjob.name",Rhe="os.type",xhe="os.description",Dhe="os.name",Bhe="os.version",Nhe="process.pid",Ohe="process.executable.name",whe="process.executable.path",khe="process.command",Mhe="process.command_line",Phe="process.command_args",Uhe="process.owner",Lhe="process.runtime.name",Qhe="process.runtime.version",Fhe="process.runtime.description",Ghe="service.name",jhe="service.namespace",Hhe="service.instance.id",zhe="service.version",$he="telemetry.sdk.name",Vhe="telemetry.sdk.language",qhe="telemetry.sdk.version",Yhe="telemetry.auto.version",Khe="webengine.name",Jhe="webengine.version",Zhe="webengine.description",PWe=bge,UWe=vge,LWe=Rge,QWe=xge,FWe=Dge,GWe=Bge,jWe=Nge,HWe=Oge,zWe=wge,$We=kge,VWe=Mge,qWe=Pge,YWe=Uge,KWe=Lge,JWe=Qge,ZWe=Fge,WWe=Gge,XWe=jge,eXe=Hge,tXe=zge,nXe=$ge,rXe=Vge,oXe=qge,iXe=Yge,aXe=Kge,sXe=Jge,uXe=Zge,cXe=Wge,lXe=Xge,dXe=ehe,pXe=the,fXe=nhe,AXe=rhe,mXe=ohe,gXe=ihe,hXe=ahe,_Xe=she,EXe=uhe,SXe=che,yXe=lhe,TXe=dhe,IXe=phe,CXe=fhe,bXe=Ahe,vXe=mhe,RXe=ghe,xXe=hhe,DXe=_he,BXe=Ehe,NXe=She,OXe=yhe,wXe=The,kXe=Ihe,MXe=Che,PXe=bhe,UXe=vhe,LXe=Rhe,QXe=xhe,FXe=Dhe,GXe=Bhe,jXe=Nhe,HXe=Ohe,zXe=whe,$Xe=khe,VXe=Mhe,qXe=Phe,YXe=Uhe,KXe=Lhe,JXe=Qhe,ZXe=Fhe,WXe=Ghe,m5=jhe,XXe=Hhe,eet=zhe,tet=$he,net=Vhe,ret=qhe,oet=Yhe,iet=Khe,aet=Jhe,set=Zhe,uet=bi([bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$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,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe]),Whe="alibaba_cloud",Xhe="aws",e_e="azure",t_e="gcp",cet=Whe,det=Xhe,pet=e_e,fet=t_e,Aet=bi([Whe,Xhe,e_e,t_e]),n_e="alibaba_cloud_ecs",r_e="alibaba_cloud_fc",o_e="aws_ec2",i_e="aws_ecs",a_e="aws_eks",s_e="aws_lambda",u_e="aws_elastic_beanstalk",c_e="azure_vm",l_e="azure_container_instances",d_e="azure_aks",p_e="azure_functions",f_e="azure_app_service",A_e="gcp_compute_engine",m_e="gcp_cloud_run",g_e="gcp_kubernetes_engine",h_e="gcp_cloud_functions",__e="gcp_app_engine",met=n_e,get=r_e,het=o_e,_et=i_e,Eet=a_e,yet=s_e,Tet=u_e,Iet=c_e,Cet=l_e,bet=d_e,vet=p_e,Ret=f_e,xet=A_e,Det=m_e,Bet=g_e,Net=h_e,Oet=__e,wet=bi([n_e,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="ec2",S_e="fargate",ket=E_e,Met=S_e,Pet=bi([E_e,S_e]),y_e="amd64",T_e="arm32",I_e="arm64",C_e="ia64",b_e="ppc32",v_e="ppc64",R_e="x86",Uet=y_e,Let=T_e,Qet=I_e,Fet=C_e,Get=b_e,jet=v_e,Het=R_e,zet=bi([y_e,T_e,I_e,C_e,b_e,v_e,R_e]),x_e="windows",D_e="linux",B_e="darwin",N_e="freebsd",O_e="netbsd",w_e="openbsd",k_e="dragonflybsd",M_e="hpux",P_e="aix",U_e="solaris",L_e="z_os",$et=x_e,Vet=D_e,qet=B_e,Yet=N_e,Ket=O_e,Jet=w_e,Zet=k_e,Wet=M_e,Xet=P_e,ett=U_e,ttt=L_e,ntt=bi([x_e,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e]),Q_e="cpp",F_e="dotnet",G_e="erlang",j_e="go",H_e="java",z_e="nodejs",$_e="php",V_e="python",q_e="ruby",Y_e="webjs",rtt=Q_e,ott=F_e,itt=G_e,att=j_e,stt=H_e,utt=z_e,ctt=$_e,ltt=V_e,dtt=q_e,ptt=Y_e,ftt=bi([Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e])});var J_e=O(()=>{m();K_e()});var Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Mtt,Ptt,Utt,Ltt,g5,h5,Qtt,$C,Ftt,_5,E5,Gtt,xS,jtt,Htt,ztt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,S5,Wtt,Xtt,ent,tnt,nnt,rnt,DS,ont,int,ant,snt,unt,cnt,lnt,dnt,pnt,fnt,Ant,mnt,gnt,tg,ng,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,y5,T5,wnt,I5,C5,knt,Mnt,Pnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,qnt,b5,v5,Ynt,R5,Knt,x5,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,t_,Srt,yrt,Trt,D5,Z_e=O(()=>{m();Att="aspnetcore.diagnostics.exception.result",mtt="aborted",gtt="handled",htt="skipped",_tt="unhandled",Ett="aspnetcore.diagnostics.handler.type",Stt="aspnetcore.rate_limiting.policy",ytt="aspnetcore.rate_limiting.result",Ttt="acquired",Itt="endpoint_limiter",Ctt="global_limiter",btt="request_canceled",vtt="aspnetcore.request.is_unhandled",Rtt="aspnetcore.routing.is_fallback",xtt="aspnetcore.routing.match_status",Dtt="failure",Btt="success",Ntt="aspnetcore.user.is_authenticated",Ott="client.address",wtt="client.port",ktt="code.column.number",Mtt="code.file.path",Ptt="code.function.name",Utt="code.line.number",Ltt="code.stacktrace",g5="db.collection.name",h5="db.namespace",Qtt="db.operation.batch.size",$C="db.operation.name",Ftt="db.query.summary",_5="db.query.text",E5="db.response.status_code",Gtt="db.stored_procedure.name",xS="db.system.name",jtt="mariadb",Htt="microsoft.sql_server",ztt="mysql",$tt="postgresql",Vtt="dotnet.gc.heap.generation",qtt="gen0",Ytt="gen1",Ktt="gen2",Jtt="loh",Ztt="poh",S5="error.type",Wtt="_OTHER",Xtt="exception.escaped",ent="exception.message",tnt="exception.stacktrace",nnt="exception.type",rnt=e=>`http.request.header.${e}`,DS="http.request.method",ont="_OTHER",int="CONNECT",ant="DELETE",snt="GET",unt="HEAD",cnt="OPTIONS",lnt="PATCH",dnt="POST",pnt="PUT",fnt="TRACE",Ant="http.request.method_original",mnt="http.request.resend_count",gnt=e=>`http.response.header.${e}`,tg="http.response.status_code",ng="http.route",hnt="jvm.gc.action",_nt="jvm.gc.name",Ent="jvm.memory.pool.name",Snt="jvm.memory.type",ynt="heap",Tnt="non_heap",Int="jvm.thread.daemon",Cnt="jvm.thread.state",bnt="blocked",vnt="new",Rnt="runnable",xnt="terminated",Dnt="timed_waiting",Bnt="waiting",Nnt="network.local.address",Ont="network.local.port",y5="network.peer.address",T5="network.peer.port",wnt="network.protocol.name",I5="network.protocol.version",C5="network.transport",knt="pipe",Mnt="quic",Pnt="tcp",Unt="udp",Lnt="unix",Qnt="network.type",Fnt="ipv4",Gnt="ipv6",jnt="otel.scope.name",Hnt="otel.scope.version",znt="otel.status_code",$nt="ERROR",Vnt="OK",qnt="otel.status_description",b5="server.address",v5="server.port",Ynt="service.instance.id",R5="service.name",Knt="service.namespace",x5="service.version",Jnt="signalr.connection.status",Znt="app_shutdown",Wnt="normal_closure",Xnt="timeout",ert="signalr.transport",trt="long_polling",nrt="server_sent_events",rrt="web_sockets",ort="telemetry.sdk.language",irt="cpp",art="dotnet",srt="erlang",urt="go",crt="java",lrt="nodejs",drt="php",prt="python",frt="ruby",Art="rust",mrt="swift",grt="webjs",hrt="telemetry.sdk.name",_rt="telemetry.sdk.version",Ert="url.fragment",t_="url.full",Srt="url.path",yrt="url.query",Trt="url.scheme",D5="user_agent.original"});var Irt,Crt,brt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Mrt,Prt,Urt,Lrt,Qrt,Frt,Grt,jrt,Hrt,zrt,$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,W_e=O(()=>{m();Irt="aspnetcore.diagnostics.exceptions",Crt="aspnetcore.rate_limiting.active_request_leases",brt="aspnetcore.rate_limiting.queued_requests",vrt="aspnetcore.rate_limiting.request.time_in_queue",Rrt="aspnetcore.rate_limiting.request_lease.duration",xrt="aspnetcore.rate_limiting.requests",Drt="aspnetcore.routing.match_attempts",Brt="db.client.operation.duration",Nrt="dotnet.assembly.count",Ort="dotnet.exceptions",wrt="dotnet.gc.collections",krt="dotnet.gc.heap.total_allocated",Mrt="dotnet.gc.last_collection.heap.fragmentation.size",Prt="dotnet.gc.last_collection.heap.size",Urt="dotnet.gc.last_collection.memory.committed_size",Lrt="dotnet.gc.pause.time",Qrt="dotnet.jit.compilation.time",Frt="dotnet.jit.compiled_il.size",Grt="dotnet.jit.compiled_methods",jrt="dotnet.monitor.lock_contentions",Hrt="dotnet.process.cpu.count",zrt="dotnet.process.cpu.time",$rt="dotnet.process.memory.working_set",Vrt="dotnet.thread_pool.queue.length",qrt="dotnet.thread_pool.thread.count",Yrt="dotnet.thread_pool.work_item.count",Krt="dotnet.timer.count",Jrt="http.client.request.duration",Zrt="http.server.request.duration",Wrt="jvm.class.count",Xrt="jvm.class.loaded",eot="jvm.class.unloaded",tot="jvm.cpu.count",not="jvm.cpu.recent_utilization",rot="jvm.cpu.time",oot="jvm.gc.duration",iot="jvm.memory.committed",aot="jvm.memory.limit",sot="jvm.memory.used",uot="jvm.memory.used_after_last_gc",cot="jvm.thread.count",lot="kestrel.active_connections",dot="kestrel.active_tls_handshakes",pot="kestrel.connection.duration",fot="kestrel.queued_connections",Aot="kestrel.queued_requests",mot="kestrel.rejected_connections",got="kestrel.tls_handshake.duration",hot="kestrel.upgraded_connections",_ot="signalr.server.active_connections",Eot="signalr.server.connection.duration"});var Sot,X_e=O(()=>{m();Sot="exception"});var Ur={};za(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>mtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>gtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>htt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>_tt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Ttt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Itt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Ctt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>btt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Dtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Btt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Att,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Ett,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Stt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>ytt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>vtt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Rtt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>xtt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Ntt,ATTR_CLIENT_ADDRESS:()=>Ott,ATTR_CLIENT_PORT:()=>wtt,ATTR_CODE_COLUMN_NUMBER:()=>ktt,ATTR_CODE_FILE_PATH:()=>Mtt,ATTR_CODE_FUNCTION_NAME:()=>Ptt,ATTR_CODE_LINE_NUMBER:()=>Utt,ATTR_CODE_STACKTRACE:()=>Ltt,ATTR_DB_COLLECTION_NAME:()=>g5,ATTR_DB_NAMESPACE:()=>h5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Qtt,ATTR_DB_OPERATION_NAME:()=>$C,ATTR_DB_QUERY_SUMMARY:()=>Ftt,ATTR_DB_QUERY_TEXT:()=>_5,ATTR_DB_RESPONSE_STATUS_CODE:()=>E5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Gtt,ATTR_DB_SYSTEM_NAME:()=>xS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Vtt,ATTR_ERROR_TYPE:()=>S5,ATTR_EXCEPTION_ESCAPED:()=>Xtt,ATTR_EXCEPTION_MESSAGE:()=>ent,ATTR_EXCEPTION_STACKTRACE:()=>tnt,ATTR_EXCEPTION_TYPE:()=>nnt,ATTR_HTTP_REQUEST_HEADER:()=>rnt,ATTR_HTTP_REQUEST_METHOD:()=>DS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Ant,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>mnt,ATTR_HTTP_RESPONSE_HEADER:()=>gnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>tg,ATTR_HTTP_ROUTE:()=>ng,ATTR_JVM_GC_ACTION:()=>hnt,ATTR_JVM_GC_NAME:()=>_nt,ATTR_JVM_MEMORY_POOL_NAME:()=>Ent,ATTR_JVM_MEMORY_TYPE:()=>Snt,ATTR_JVM_THREAD_DAEMON:()=>Int,ATTR_JVM_THREAD_STATE:()=>Cnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Nnt,ATTR_NETWORK_LOCAL_PORT:()=>Ont,ATTR_NETWORK_PEER_ADDRESS:()=>y5,ATTR_NETWORK_PEER_PORT:()=>T5,ATTR_NETWORK_PROTOCOL_NAME:()=>wnt,ATTR_NETWORK_PROTOCOL_VERSION:()=>I5,ATTR_NETWORK_TRANSPORT:()=>C5,ATTR_NETWORK_TYPE:()=>Qnt,ATTR_OTEL_SCOPE_NAME:()=>jnt,ATTR_OTEL_SCOPE_VERSION:()=>Hnt,ATTR_OTEL_STATUS_CODE:()=>znt,ATTR_OTEL_STATUS_DESCRIPTION:()=>qnt,ATTR_SERVER_ADDRESS:()=>b5,ATTR_SERVER_PORT:()=>v5,ATTR_SERVICE_INSTANCE_ID:()=>Ynt,ATTR_SERVICE_NAME:()=>R5,ATTR_SERVICE_NAMESPACE:()=>Knt,ATTR_SERVICE_VERSION:()=>x5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Jnt,ATTR_SIGNALR_TRANSPORT:()=>ert,ATTR_TELEMETRY_SDK_LANGUAGE:()=>ort,ATTR_TELEMETRY_SDK_NAME:()=>hrt,ATTR_TELEMETRY_SDK_VERSION:()=>_rt,ATTR_URL_FRAGMENT:()=>Ert,ATTR_URL_FULL:()=>t_,ATTR_URL_PATH:()=>Srt,ATTR_URL_QUERY:()=>yrt,ATTR_URL_SCHEME:()=>Trt,ATTR_USER_AGENT_ORIGINAL:()=>D5,AWSECSLAUNCHTYPEVALUES_EC2:()=>ket,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Met,AwsEcsLaunchtypeValues:()=>Pet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>met,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>get,CLOUDPLATFORMVALUES_AWS_EC2:()=>het,CLOUDPLATFORMVALUES_AWS_ECS:()=>_et,CLOUDPLATFORMVALUES_AWS_EKS:()=>Eet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Tet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>yet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>bet,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Ret,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Cet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>vet,CLOUDPLATFORMVALUES_AZURE_VM:()=>Iet,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Oet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Net,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Det,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>xet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Bet,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>cet,CLOUDPROVIDERVALUES_AWS:()=>det,CLOUDPROVIDERVALUES_AZURE:()=>pet,CLOUDPROVIDERVALUES_GCP:()=>fet,CloudPlatformValues:()=>wet,CloudProviderValues:()=>Aet,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>YJe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>nZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>KJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>tZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>ZJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>oZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>WJe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>JJe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>rZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>eZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>XJe,DBSYSTEMVALUES_ADABAS:()=>hJe,DBSYSTEMVALUES_CACHE:()=>gJe,DBSYSTEMVALUES_CASSANDRA:()=>kJe,DBSYSTEMVALUES_CLOUDSCAPE:()=>uJe,DBSYSTEMVALUES_COCKROACHDB:()=>VJe,DBSYSTEMVALUES_COLDFUSION:()=>wJe,DBSYSTEMVALUES_COSMOSDB:()=>FJe,DBSYSTEMVALUES_COUCHBASE:()=>LJe,DBSYSTEMVALUES_COUCHDB:()=>QJe,DBSYSTEMVALUES_DB2:()=>oJe,DBSYSTEMVALUES_DERBY:()=>EJe,DBSYSTEMVALUES_DYNAMODB:()=>GJe,DBSYSTEMVALUES_EDB:()=>mJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>zJe,DBSYSTEMVALUES_FILEMAKER:()=>SJe,DBSYSTEMVALUES_FIREBIRD:()=>_Je,DBSYSTEMVALUES_FIRSTSQL:()=>AJe,DBSYSTEMVALUES_GEODE:()=>HJe,DBSYSTEMVALUES_H2:()=>OJe,DBSYSTEMVALUES_HANADB:()=>pJe,DBSYSTEMVALUES_HBASE:()=>MJe,DBSYSTEMVALUES_HIVE:()=>sJe,DBSYSTEMVALUES_HSQLDB:()=>cJe,DBSYSTEMVALUES_INFORMIX:()=>yJe,DBSYSTEMVALUES_INGRES:()=>fJe,DBSYSTEMVALUES_INSTANTDB:()=>TJe,DBSYSTEMVALUES_INTERBASE:()=>IJe,DBSYSTEMVALUES_MARIADB:()=>CJe,DBSYSTEMVALUES_MAXDB:()=>dJe,DBSYSTEMVALUES_MEMCACHED:()=>$Je,DBSYSTEMVALUES_MONGODB:()=>PJe,DBSYSTEMVALUES_MSSQL:()=>tJe,DBSYSTEMVALUES_MYSQL:()=>nJe,DBSYSTEMVALUES_NEO4J:()=>jJe,DBSYSTEMVALUES_NETEZZA:()=>bJe,DBSYSTEMVALUES_ORACLE:()=>rJe,DBSYSTEMVALUES_OTHER_SQL:()=>eJe,DBSYSTEMVALUES_PERVASIVE:()=>vJe,DBSYSTEMVALUES_POINTBASE:()=>RJe,DBSYSTEMVALUES_POSTGRESQL:()=>iJe,DBSYSTEMVALUES_PROGRESS:()=>lJe,DBSYSTEMVALUES_REDIS:()=>UJe,DBSYSTEMVALUES_REDSHIFT:()=>aJe,DBSYSTEMVALUES_SQLITE:()=>xJe,DBSYSTEMVALUES_SYBASE:()=>DJe,DBSYSTEMVALUES_TERADATA:()=>BJe,DBSYSTEMVALUES_VERTICA:()=>NJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>jtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Htt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>ztt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>$tt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>qtt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Ytt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Ktt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Jtt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Ztt,DbCassandraConsistencyLevelValues:()=>iZe,DbSystemValues:()=>qJe,ERROR_TYPE_VALUE_OTHER:()=>Wtt,EVENT_EXCEPTION:()=>Sot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>AZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>fZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>pZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>gZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>hZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>_Ze,FAASINVOKEDPROVIDERVALUES_GCP:()=>EZe,FAASTRIGGERVALUES_DATASOURCE:()=>aZe,FAASTRIGGERVALUES_HTTP:()=>sZe,FAASTRIGGERVALUES_OTHER:()=>lZe,FAASTRIGGERVALUES_PUBSUB:()=>uZe,FAASTRIGGERVALUES_TIMER:()=>cZe,FaasDocumentOperationValues:()=>mZe,FaasInvokedProviderValues:()=>SZe,FaasTriggerValues:()=>dZe,HOSTARCHVALUES_AMD64:()=>Uet,HOSTARCHVALUES_ARM32:()=>Let,HOSTARCHVALUES_ARM64:()=>Qet,HOSTARCHVALUES_IA64:()=>Fet,HOSTARCHVALUES_PPC32:()=>Get,HOSTARCHVALUES_PPC64:()=>jet,HOSTARCHVALUES_X86:()=>Het,HTTPFLAVORVALUES_HTTP_1_0:()=>rWe,HTTPFLAVORVALUES_HTTP_1_1:()=>oWe,HTTPFLAVORVALUES_HTTP_2_0:()=>iWe,HTTPFLAVORVALUES_QUIC:()=>sWe,HTTPFLAVORVALUES_SPDY:()=>aWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>int,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>ant,HTTP_REQUEST_METHOD_VALUE_GET:()=>snt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>unt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>cnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>ont,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>lnt,HTTP_REQUEST_METHOD_VALUE_POST:()=>dnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>pnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>fnt,HostArchValues:()=>zet,HttpFlavorValues:()=>uWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>ynt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Tnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>bnt,JVM_THREAD_STATE_VALUE_NEW:()=>vnt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Rnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>xnt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Dnt,JVM_THREAD_STATE_VALUE_WAITING:()=>Bnt,MESSAGETYPEVALUES_RECEIVED:()=>kWe,MESSAGETYPEVALUES_SENT:()=>wWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>cWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>lWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>fWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>pWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Irt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Crt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>brt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>xrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Rrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>vrt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Drt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Brt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Nrt,METRIC_DOTNET_EXCEPTIONS:()=>Ort,METRIC_DOTNET_GC_COLLECTIONS:()=>wrt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>krt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Mrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Prt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Urt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Lrt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Qrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Frt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Grt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>jrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Hrt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>zrt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>$rt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Vrt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>qrt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Yrt,METRIC_DOTNET_TIMER_COUNT:()=>Krt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Jrt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Zrt,METRIC_JVM_CLASS_COUNT:()=>Wrt,METRIC_JVM_CLASS_LOADED:()=>Xrt,METRIC_JVM_CLASS_UNLOADED:()=>eot,METRIC_JVM_CPU_COUNT:()=>tot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>not,METRIC_JVM_CPU_TIME:()=>rot,METRIC_JVM_GC_DURATION:()=>oot,METRIC_JVM_MEMORY_COMMITTED:()=>iot,METRIC_JVM_MEMORY_LIMIT:()=>aot,METRIC_JVM_MEMORY_USED:()=>sot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>uot,METRIC_JVM_THREAD_COUNT:()=>cot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>lot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>dot,METRIC_KESTREL_CONNECTION_DURATION:()=>pot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>fot,METRIC_KESTREL_QUEUED_REQUESTS:()=>Aot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>mot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>got,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>hot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>_ot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Eot,MessageTypeValues:()=>MWe,MessagingDestinationKindValues:()=>dWe,MessagingOperationValues:()=>AWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>LZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>GZe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>PZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>YZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>QZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>FZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>MZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>jZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>zZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>HZe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>$Ze,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>UZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>NZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>OZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>wZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>DZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>BZe,NETTRANSPORTVALUES_INPROC:()=>vZe,NETTRANSPORTVALUES_IP:()=>IZe,NETTRANSPORTVALUES_IP_TCP:()=>yZe,NETTRANSPORTVALUES_IP_UDP:()=>TZe,NETTRANSPORTVALUES_OTHER:()=>RZe,NETTRANSPORTVALUES_PIPE:()=>bZe,NETTRANSPORTVALUES_UNIX:()=>CZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>knt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Mnt,NETWORK_TRANSPORT_VALUE_TCP:()=>Pnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Unt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Lnt,NETWORK_TYPE_VALUE_IPV4:()=>Fnt,NETWORK_TYPE_VALUE_IPV6:()=>Gnt,NetHostConnectionSubtypeValues:()=>nWe,NetHostConnectionTypeValues:()=>kZe,NetTransportValues:()=>xZe,OSTYPEVALUES_AIX:()=>Xet,OSTYPEVALUES_DARWIN:()=>qet,OSTYPEVALUES_DRAGONFLYBSD:()=>Zet,OSTYPEVALUES_FREEBSD:()=>Yet,OSTYPEVALUES_HPUX:()=>Wet,OSTYPEVALUES_LINUX:()=>Vet,OSTYPEVALUES_NETBSD:()=>Ket,OSTYPEVALUES_OPENBSD:()=>Jet,OSTYPEVALUES_SOLARIS:()=>ett,OSTYPEVALUES_WINDOWS:()=>$et,OSTYPEVALUES_Z_OS:()=>ttt,OTEL_STATUS_CODE_VALUE_ERROR:()=>$nt,OTEL_STATUS_CODE_VALUE_OK:()=>Vnt,OsTypeValues:()=>ntt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>bWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>yWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>gWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>BWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>EWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>CWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>xWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>_We,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>SWe,RPCGRPCSTATUSCODEVALUES_OK:()=>mWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>vWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>TWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>IWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>NWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>DWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>RWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>hWe,RpcGrpcStatusCodeValues:()=>OWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>dKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>IKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>uKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>oKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>yKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>gKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>AKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>CKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>pKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>iKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>lKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>mKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>cKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>aKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>sKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>TKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>_Ke,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>EKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>fKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>hKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>rKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>SKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>K7e,SEMATTRS_CODE_FILEPATH:()=>qYe,SEMATTRS_CODE_FUNCTION:()=>$Ye,SEMATTRS_CODE_LINENO:()=>YYe,SEMATTRS_CODE_NAMESPACE:()=>VYe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>oYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>cYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>uYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>aYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>nYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>rYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>sYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>iYe,SEMATTRS_DB_CONNECTION_STRING:()=>J7e,SEMATTRS_DB_HBASE_NAMESPACE:()=>lYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>W7e,SEMATTRS_DB_MONGODB_COLLECTION:()=>pYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>tYe,SEMATTRS_DB_NAME:()=>X7e,SEMATTRS_DB_OPERATION:()=>eYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>dYe,SEMATTRS_DB_SQL_TABLE:()=>fYe,SEMATTRS_DB_STATEMENT:()=>r5,SEMATTRS_DB_SYSTEM:()=>n5,SEMATTRS_DB_USER:()=>Z7e,SEMATTRS_ENDUSER_ID:()=>FYe,SEMATTRS_ENDUSER_ROLE:()=>GYe,SEMATTRS_ENDUSER_SCOPE:()=>jYe,SEMATTRS_EXCEPTION_ESCAPED:()=>hYe,SEMATTRS_EXCEPTION_MESSAGE:()=>mYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>gYe,SEMATTRS_EXCEPTION_TYPE:()=>AYe,SEMATTRS_FAAS_COLDSTART:()=>bYe,SEMATTRS_FAAS_CRON:()=>CYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>EYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>TYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>SYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>yYe,SEMATTRS_FAAS_EXECUTION:()=>_Ye,SEMATTRS_FAAS_INVOKED_NAME:()=>vYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>RYe,SEMATTRS_FAAS_INVOKED_REGION:()=>xYe,SEMATTRS_FAAS_TIME:()=>IYe,SEMATTRS_FAAS_TRIGGER:()=>o5,SEMATTRS_HTTP_CLIENT_IP:()=>nKe,SEMATTRS_HTTP_FLAVOR:()=>ZYe,SEMATTRS_HTTP_HOST:()=>KYe,SEMATTRS_HTTP_METHOD:()=>rB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>XYe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>eKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>c5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>l5,SEMATTRS_HTTP_ROUTE:()=>d5,SEMATTRS_HTTP_SCHEME:()=>JYe,SEMATTRS_HTTP_SERVER_NAME:()=>tKe,SEMATTRS_HTTP_STATUS_CODE:()=>RS,SEMATTRS_HTTP_TARGET:()=>u5,SEMATTRS_HTTP_URL:()=>zC,SEMATTRS_HTTP_USER_AGENT:()=>WYe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>ZKe,SEMATTRS_MESSAGE_ID:()=>JKe,SEMATTRS_MESSAGE_TYPE:()=>KKe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>WKe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>PKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>OKe,SEMATTRS_MESSAGING_DESTINATION:()=>bKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>vKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>FKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>QKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>LKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>GKe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>jKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>NKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>kKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>wKe,SEMATTRS_MESSAGING_OPERATION:()=>MKe,SEMATTRS_MESSAGING_PROTOCOL:()=>xKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>DKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>UKe,SEMATTRS_MESSAGING_SYSTEM:()=>p5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>RKe,SEMATTRS_MESSAGING_URL:()=>BKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>LYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>PYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>UYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>MYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>kYe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>wYe,SEMATTRS_NET_HOST_IP:()=>a5,SEMATTRS_NET_HOST_NAME:()=>OYe,SEMATTRS_NET_HOST_PORT:()=>s5,SEMATTRS_NET_PEER_IP:()=>i5,SEMATTRS_NET_PEER_NAME:()=>NYe,SEMATTRS_NET_PEER_PORT:()=>BYe,SEMATTRS_NET_TRANSPORT:()=>DYe,SEMATTRS_PEER_SERVICE:()=>QYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>A5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>qKe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>YKe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>VKe,SEMATTRS_RPC_JSONRPC_VERSION:()=>$Ke,SEMATTRS_RPC_METHOD:()=>zKe,SEMATTRS_RPC_SERVICE:()=>f5,SEMATTRS_RPC_SYSTEM:()=>HKe,SEMATTRS_THREAD_ID:()=>HYe,SEMATTRS_THREAD_NAME:()=>zYe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>jWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>GWe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>HWe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>zWe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>$We,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>VWe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>qWe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>KWe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>YWe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>ZWe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>JWe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>UWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>QWe,SEMRESATTRS_CLOUD_PLATFORM:()=>FWe,SEMRESATTRS_CLOUD_PROVIDER:()=>PWe,SEMRESATTRS_CLOUD_REGION:()=>LWe,SEMRESATTRS_CONTAINER_ID:()=>XWe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>tXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>nXe,SEMRESATTRS_CONTAINER_NAME:()=>WWe,SEMRESATTRS_CONTAINER_RUNTIME:()=>eXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>rXe,SEMRESATTRS_DEVICE_ID:()=>oXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>iXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>aXe,SEMRESATTRS_FAAS_ID:()=>uXe,SEMRESATTRS_FAAS_INSTANCE:()=>lXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>dXe,SEMRESATTRS_FAAS_NAME:()=>sXe,SEMRESATTRS_FAAS_VERSION:()=>cXe,SEMRESATTRS_HOST_ARCH:()=>mXe,SEMRESATTRS_HOST_ID:()=>pXe,SEMRESATTRS_HOST_IMAGE_ID:()=>hXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>gXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>_Xe,SEMRESATTRS_HOST_NAME:()=>fXe,SEMRESATTRS_HOST_TYPE:()=>AXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>EXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>bXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>UXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>PXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>wXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>OXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>DXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>xXe,SEMRESATTRS_K8S_JOB_NAME:()=>MXe,SEMRESATTRS_K8S_JOB_UID:()=>kXe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>TXe,SEMRESATTRS_K8S_NODE_NAME:()=>SXe,SEMRESATTRS_K8S_NODE_UID:()=>yXe,SEMRESATTRS_K8S_POD_NAME:()=>CXe,SEMRESATTRS_K8S_POD_UID:()=>IXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>RXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>vXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>NXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>BXe,SEMRESATTRS_OS_DESCRIPTION:()=>QXe,SEMRESATTRS_OS_NAME:()=>FXe,SEMRESATTRS_OS_TYPE:()=>LXe,SEMRESATTRS_OS_VERSION:()=>GXe,SEMRESATTRS_PROCESS_COMMAND:()=>$Xe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>qXe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>VXe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>HXe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>zXe,SEMRESATTRS_PROCESS_OWNER:()=>YXe,SEMRESATTRS_PROCESS_PID:()=>jXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>ZXe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>KXe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>JXe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>XXe,SEMRESATTRS_SERVICE_NAME:()=>WXe,SEMRESATTRS_SERVICE_NAMESPACE:()=>m5,SEMRESATTRS_SERVICE_VERSION:()=>eet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>oet,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>net,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>tet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>ret,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>set,SEMRESATTRS_WEBENGINE_NAME:()=>iet,SEMRESATTRS_WEBENGINE_VERSION:()=>aet,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Znt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Wnt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Xnt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>trt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>nrt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>rrt,SemanticAttributes:()=>XKe,SemanticResourceAttributes:()=>uet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>rtt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>ott,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>itt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>att,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>stt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>utt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>ctt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ltt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>dtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>ptt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>irt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>art,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>srt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>urt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>crt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>drt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>prt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>frt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Art,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>mrt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>grt,TelemetrySdkLanguageValues:()=>ftt});var Jn=O(()=>{m();Cge();J_e();Z_e();W_e();X_e()});var eEe=F(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.ATTR_PROCESS_RUNTIME_NAME=void 0;y2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var tEe=F(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.SDK_INFO=void 0;var yot=wde(),T2=(Jn(),Me(Ur)),Tot=eEe();I2.SDK_INFO={[T2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Tot.ATTR_PROCESS_RUNTIME_NAME]:"node",[T2.ATTR_TELEMETRY_SDK_LANGUAGE]:T2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[T2.ATTR_TELEMETRY_SDK_VERSION]:yot.VERSION}});var nEe=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 C2=Nde();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return C2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return C2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return C2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return C2.getStringListFromEnv}});var Iot=Ode();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return Iot._globalThis}});var Cot=tEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return Cot.SDK_INFO}});Zs.otperformance=performance});var B5=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 BS=nEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return BS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return BS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return BS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return BS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return BS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return BS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return BS.getStringListFromEnv}})});var aEe=F(io=>{"use strict";m();Object.defineProperty(io,"__esModule",{value:!0});io.addHrTimes=io.isTimeInput=io.isTimeInputHrTime=io.hrTimeToMicroseconds=io.hrTimeToMilliseconds=io.hrTimeToNanoseconds=io.hrTimeToTimeStamp=io.hrTimeDuration=io.timeInputToHrTime=io.hrTime=io.getTimeOrigin=io.millisToHrTime=void 0;var b2=B5(),rEe=9,bot=6,vot=Math.pow(10,bot),v2=Math.pow(10,rEe);function oB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*vot);return[n,r]}io.millisToHrTime=oB;function Rot(){return b2.otperformance.timeOrigin}io.getTimeOrigin=Rot;function oEe(e){let t=oB(b2.otperformance.timeOrigin),n=oB(typeof e=="number"?e:b2.otperformance.now());return iEe(t,n)}io.hrTime=oEe;function xot(e){if(N5(e))return e;if(typeof e=="number")return e<b2.otperformance.timeOrigin?oEe(e):oB(e);if(e instanceof Date)return oB(e.getTime());throw TypeError("Invalid input type")}io.timeInputToHrTime=xot;function Dot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=v2),[n,r]}io.hrTimeDuration=Dot;function Bot(e){let t=rEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}io.hrTimeToTimeStamp=Bot;function Not(e){return e[0]*v2+e[1]}io.hrTimeToNanoseconds=Not;function Oot(e){return e[0]*1e3+e[1]/1e6}io.hrTimeToMilliseconds=Oot;function wot(e){return e[0]*1e6+e[1]/1e3}io.hrTimeToMicroseconds=wot;function N5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}io.isTimeInputHrTime=N5;function kot(e){return N5(e)||typeof e=="number"||e instanceof Date}io.isTimeInput=kot;function iEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=v2&&(n[1]-=v2,n[0]+=1),n}io.addHrTimes=iEe});var sEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.unrefTimer=void 0;function Mot(e){typeof e!="number"&&e.unref()}R2.unrefTimer=Mot});var uEe=F(iB=>{"use strict";m();Object.defineProperty(iB,"__esModule",{value:!0});iB.ExportResultCode=void 0;var Pot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Pot=iB.ExportResultCode||(iB.ExportResultCode={}))});var lEe=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.CompositePropagator=void 0;var cEe=(Ge(),Me(We)),O5=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){cEe.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){cEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};x2.CompositePropagator=O5});var dEe=F(VC=>{"use strict";m();Object.defineProperty(VC,"__esModule",{value:!0});VC.validateValue=VC.validateKey=void 0;var w5="[_0-9a-z-*/]",Uot=`[a-z]${w5}{0,255}`,Lot=`[a-z0-9]${w5}{0,240}@[a-z]${w5}{0,13}`,Qot=new RegExp(`^(?:${Uot}|${Lot})$`),Fot=/^[ -~]{0,255}[!-~]$/,Got=/,|=/;function jot(e){return Qot.test(e)}VC.validateKey=jot;function Hot(e){return Fot.test(e)&&!Got.test(e)}VC.validateValue=Hot});var M5=F(D2=>{"use strict";m();Object.defineProperty(D2,"__esModule",{value:!0});D2.TraceState=void 0;var pEe=dEe(),fEe=32,zot=512,AEe=",",mEe="=",k5=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+mEe+this.get(n)),t),[]).join(AEe)}_parse(t){t.length>zot||(this._internalState=t.split(AEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(mEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,pEe.validateKey)(a)&&(0,pEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>fEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,fEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};D2.TraceState=k5});var hEe=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 B2=(Ge(),Me(We)),$ot=nB(),Vot=M5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var qot="00",Yot="(?!ff)[\\da-f]{2}",Kot="(?![0]{32})[\\da-f]{32}",Jot="(?![0]{16})[\\da-f]{16}",Zot="[\\da-f]{2}",Wot=new RegExp(`^\\s?(${Yot})-(${Kot})-(${Jot})-(${Zot})(-.*)?\\s?$`);function gEe(e){let t=Wot.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=gEe;var P5=class{inject(t,n,r){let o=B2.trace.getSpanContext(t);if(!o||(0,$ot.isTracingSuppressed)(t)||!(0,B2.isSpanContextValid)(o))return;let i=`${qot}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||B2.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=gEe(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 Vot.TraceState(typeof d=="string"?d:void 0)}return B2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var _Ee=F(qp=>{"use strict";m();Object.defineProperty(qp,"__esModule",{value:!0});qp.getRPCMetadata=qp.deleteRPCMetadata=qp.setRPCMetadata=qp.RPCType=void 0;var Xot=(Ge(),Me(We)),U5=(0,Xot.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),eit;(function(e){e.HTTP="http"})(eit=qp.RPCType||(qp.RPCType={}));function tit(e,t){return e.setValue(U5,t)}qp.setRPCMetadata=tit;function nit(e){return e.deleteValue(U5)}qp.deleteRPCMetadata=nit;function rit(e){return e.getValue(U5)}qp.getRPCMetadata=rit});var IEe=F(N2=>{"use strict";m();Object.defineProperty(N2,"__esModule",{value:!0});N2.isPlainObject=void 0;var oit="[object Object]",iit="[object Null]",ait="[object Undefined]",sit=Function.prototype,EEe=sit.toString,uit=EEe.call(Object),cit=Object.getPrototypeOf,SEe=Object.prototype,yEe=SEe.hasOwnProperty,NS=Symbol?Symbol.toStringTag:void 0,TEe=SEe.toString;function lit(e){if(!dit(e)||pit(e)!==oit)return!1;let t=cit(e);if(t===null)return!0;let n=yEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&EEe.call(n)===uit}N2.isPlainObject=lit;function dit(e){return e!=null&&typeof e=="object"}function pit(e){return e==null?e===void 0?ait:iit:NS&&NS in Object(e)?fit(e):Ait(e)}function fit(e){let t=yEe.call(e,NS),n=e[NS],r=!1;try{e[NS]=void 0,r=!0}catch{}let o=TEe.call(e);return r&&(t?e[NS]=n:delete e[NS]),o}function Ait(e){return TEe.call(e)}});var xEe=F(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.merge=void 0;var CEe=IEe(),mit=20;function git(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=vEe(t,e.shift(),0,n);return t}k2.merge=git;function L5(e){return w2(e)?e.slice():e}function vEe(e,t,n=0,r){let o;if(!(n>mit)){if(n++,O2(e)||O2(t)||REe(t))o=L5(t);else if(w2(e)){if(o=e.slice(),w2(t))for(let i=0,a=t.length;i<a;i++)o.push(L5(t[i]));else if(aB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=L5(t[d])}}}else if(aB(e))if(aB(t)){if(!hit(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(O2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(bEe(e,d,r)||bEe(t,d,r))delete o[d];else{if(aB(h)&&aB(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]=vEe(o[d],g,n,r)}}}}else o=t;return o}}function bEe(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 w2(e){return Array.isArray(e)}function REe(e){return typeof e=="function"}function aB(e){return!O2(e)&&!w2(e)&&!REe(e)&&typeof e=="object"}function O2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function hit(e,t){return!(!(0,CEe.isPlainObject)(e)||!(0,CEe.isPlainObject)(t))}});var DEe=F(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.callWithTimeout=qC.TimeoutError=void 0;var M2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};qC.TimeoutError=M2;function _it(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new M2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}qC.callWithTimeout=_it});var NEe=F(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.isUrlIgnored=YC.urlMatches=void 0;function BEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}YC.urlMatches=BEe;function Eit(e,t){if(!t)return!1;for(let n of t)if(BEe(e,n))return!0;return!1}YC.isUrlIgnored=Eit});var OEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var Q5=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=Q5});var wEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.BindOnceFuture=void 0;var Sit=OEe(),F5=class{_isCalled=!1;_deferred=new Sit.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}};U2.BindOnceFuture=F5});var MEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2.diagLogLevelFromString=void 0;var rg=(Ge(),Me(We)),kEe={ALL:rg.DiagLogLevel.ALL,VERBOSE:rg.DiagLogLevel.VERBOSE,DEBUG:rg.DiagLogLevel.DEBUG,INFO:rg.DiagLogLevel.INFO,WARN:rg.DiagLogLevel.WARN,ERROR:rg.DiagLogLevel.ERROR,NONE:rg.DiagLogLevel.NONE};function yit(e){if(e==null)return;let t=kEe[e.toUpperCase()];return t??(rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kEe)}, using default`),rg.DiagLogLevel.INFO)}L2.diagLogLevelFromString=yit});var UEe=F(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2._export=void 0;var PEe=(Ge(),Me(We)),Tit=nB();function Iit(e,t){return new Promise(n=>{PEe.context.with((0,Tit.suppressTracing)(PEe.context.active()),()=>{e.export(t,n)})})}Q2._export=Iit});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 Cit=Ede();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Cit.W3CBaggagePropagator}});var bit=Sde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return bit.AnchoredClock}});var LEe=bde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return LEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return LEe.sanitizeAttributes}});var QEe=Rde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return QEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return QEe.setGlobalErrorHandler}});var vit=e5();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return vit.loggingErrorHandler}});var Dd=aEe();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 Rit=sEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Rit.unrefTimer}});var xit=uEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return xit.ExportResultCode}});var Dit=K$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Dit.parseKeyPairsIntoRecord}});var OS=B5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return OS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return OS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return OS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return OS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return OS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return OS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return OS.otperformance}});var Bit=lEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return Bit.CompositePropagator}});var F2=hEe();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return F2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return F2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return F2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return F2.parseTraceParent}});var G2=_Ee();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return G2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return G2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return G2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return G2.setRPCMetadata}});var G5=nB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return G5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return G5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return G5.unsuppressTracing}});var Nit=M5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Nit.TraceState}});var Oit=xEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Oit.merge}});var FEe=DEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return FEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return FEe.callWithTimeout}});var GEe=NEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return GEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return GEe.urlMatches}});var wit=wEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return wit.BindOnceFuture}});var kit=MEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return kit.diagLogLevelFromString}});var Mit=UEe();Oe.internal={_export:Mit._export}});var jEe=F(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.VERSION=void 0;j2.VERSION="0.214.0"});var HEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.SeverityNumber=void 0;var Pit;(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"})(Pit=sB.SeverityNumber||(sB.SeverityNumber={}))});var z2=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.NOOP_LOGGER=KC.NoopLogger=void 0;var H2=class{emit(t){}};KC.NoopLogger=H2;KC.NOOP_LOGGER=new H2});var zEe=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=globalThis;function Uit(e,t,n){return r=>r===e?t:n}lA.makeGetter=Uit;lA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var j5=F(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER_PROVIDER=JC.NoopLoggerProvider=void 0;var Lit=z2(),$2=class{getLogger(t,n,r){return new Lit.NoopLogger}};JC.NoopLoggerProvider=$2;JC.NOOP_LOGGER_PROVIDER=new $2});var $Ee=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLogger=void 0;var Qit=z2(),H5=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):Qit.NOOP_LOGGER}};V2.ProxyLogger=H5});var VEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.ProxyLoggerProvider=void 0;var Fit=j5(),Git=$Ee(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Git.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Fit.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)}};q2.ProxyLoggerProvider=z5});var YEe=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.LogsAPI=void 0;var Bd=zEe(),jit=j5(),qEe=VEe(),$5=class e{constructor(){this._proxyLoggerProvider=new qEe.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,jit.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 qEe.ProxyLoggerProvider}};Y2.LogsAPI=$5});var V5=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.logs=dA.NoopLogger=dA.NOOP_LOGGER=dA.SeverityNumber=void 0;var Hit=HEe();Object.defineProperty(dA,"SeverityNumber",{enumerable:!0,get:function(){return Hit.SeverityNumber}});var KEe=z2();Object.defineProperty(dA,"NOOP_LOGGER",{enumerable:!0,get:function(){return KEe.NOOP_LOGGER}});Object.defineProperty(dA,"NoopLogger",{enumerable:!0,get:function(){return KEe.NoopLogger}});var zit=YEe();dA.logs=zit.LogsAPI.getInstance()});var JEe=F(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.disableInstrumentations=ZC.enableInstrumentations=void 0;function $it(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()}}ZC.enableInstrumentations=$it;function Vit(e){e.forEach(t=>t.disable())}ZC.disableInstrumentations=Vit});var XEe=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.registerInstrumentations=void 0;var ZEe=(Ge(),Me(We)),qit=V5(),WEe=JEe();function Yit(e){let t=e.tracerProvider||ZEe.trace.getTracerProvider(),n=e.meterProvider||ZEe.metrics.getMeterProvider(),r=e.loggerProvider||qit.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,WEe.enableInstrumentations)(o,t,n,r),()=>{(0,WEe.disableInstrumentations)(o)}}K2.registerInstrumentations=Yit});var u0e=F(J2=>{"use strict";m();Object.defineProperty(J2,"__esModule",{value:!0});J2.satisfies=void 0;var J5=(Ge(),Me(We)),o0e=/^(?: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-]+)*))?$/,Kit=/^(?<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-]+)*))?$/,Jit={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Zit(e,t,n){if(!Wit(e))return J5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=nat(e);if(!r)return!1;let o=[],i=i0e(r,t,o,n);return i&&!n?.includePrerelease?eat(r,o):i}J2.satisfies=Zit;function Wit(e){return typeof e=="string"&&o0e.test(e)}function i0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(q5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Iat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!q5(e,i,n,r))return!1;return!0}return q5(e,t,n,r)}function q5(e,t,n,r){if(t=tat(t,r),t.includes(" "))return i0e(e,t,n,r);{let o=rat(t);return n.push(o),Xit(e,o)}}function Xit(e,t){if(t.invalid)return!1;if(!t.version||K5(t.version))return!0;let n=t0e(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=t0e(r,o)}return Jit[t.op]?.includes(n)}function eat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function tat(e,t){return e=e.trim(),e=yat(e,t),e=Sat(e),e=Tat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function nat(e){let t=e.match(o0e);if(!t){J5.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 rat(e){if(!e)return{};let t=e.match(Kit);if(!t)return J5.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 K5(e){return e==="*"||e==="x"||e==="X"}function e0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function oat(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 iat(e,t){if(K5(e)||K5(t))return 0;let[n,r]=oat(e0e(e),e0e(t));return n>r?1:n<r?-1:0}function t0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=iat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var a0e="[a-zA-Z0-9-]",s0e="0|[1-9]\\d*",aat=`\\d*[a-zA-Z-]${a0e}*`,sat="((?:<|>)?=?)",n0e=`(?:${s0e}|${aat})`,uat=`(?:-(${n0e}(?:\\.${n0e})*))`,r0e=`${a0e}+`,cat=`(?:\\+(${r0e}(?:\\.${r0e})*))`,Y5=`${s0e}|x|X|\\*`,uB=`[v=\\s]*(${Y5})(?:\\.(${Y5})(?:\\.(${Y5})(?:${uat})?${cat}?)?)?`,lat=`^${sat}\\s*${uB}$`,dat=new RegExp(lat),pat=`^\\s*(${uB})\\s+-\\s+(${uB})\\s*$`,fat=new RegExp(pat),Aat="(?:~>?)",mat=`^${Aat}${uB}$`,gat=new RegExp(mat),hat="(?:\\^)",_at=`^${hat}${uB}$`,Eat=new RegExp(_at);function Sat(e){let t=gat;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 yat(e,t){let n=Eat,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 Tat(e,t){let n=dat;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 Iat(e,t){let n=fat;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 Z5=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 cB(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 Cat=(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 cB(o,"__original",r),cB(o,"__unwrap",()=>{e[t]===o&&cB(e,t,r)}),cB(o,"__wrapped",!0),cB(e,t,o),o};Ts.wrap=Cat;var bat=(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=bat;var vat=(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=vat;var Rat=(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=Rat;function lB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=lB;lB.wrap=Ts.wrap;lB.massWrap=Ts.massWrap;lB.unwrap=Ts.unwrap;lB.massUnwrap=Ts.massUnwrap});var c0e=F(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.InstrumentationAbstract=void 0;var W5=(Ge(),Me(We)),xat=V5(),Z2=Z5(),X5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=W5.diag.createComponentLogger({namespace:t}),this._tracer=W5.trace.getTracer(t,n),this._meter=W5.metrics.getMeter(t,n),this._logger=xat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z2.wrap;_unwrap=Z2.unwrap;_massWrap=Z2.massWrap;_massUnwrap=Z2.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)}}};W2.InstrumentationAbstract=X5});var d0e=F((s7t,l0e)=>{m();var WC=1e3,XC=WC*60,eb=XC*60,wS=eb*24,Dat=wS*7,Bat=wS*365.25;l0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Nat(e);if(n==="number"&&isFinite(e))return t.long?wat(e):Oat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Nat(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*Bat;case"weeks":case"week":case"w":return n*Dat;case"days":case"day":case"d":return n*wS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*eb;case"minutes":case"minute":case"mins":case"min":case"m":return n*XC;case"seconds":case"second":case"secs":case"sec":case"s":return n*WC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Oat(e){var t=Math.abs(e);return t>=wS?Math.round(e/wS)+"d":t>=eb?Math.round(e/eb)+"h":t>=XC?Math.round(e/XC)+"m":t>=WC?Math.round(e/WC)+"s":e+"ms"}function wat(e){var t=Math.abs(e);return t>=wS?X2(e,t,wS,"day"):t>=eb?X2(e,t,eb,"hour"):t>=XC?X2(e,t,XC,"minute"):t>=WC?X2(e,t,WC,"second"):e+" ms"}function X2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e9=F((c7t,p0e)=>{m();function kat(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=d0e(),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}p0e.exports=kat});var f0e=F((xc,eU)=>{m();xc.formatArgs=Pat;xc.save=Uat;xc.load=Lat;xc.useColors=Mat;xc.storage=Qat();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 Mat(){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 Pat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+eU.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 Uat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function Lat(){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 Qat(){try{return localStorage}catch{}}eU.exports=e9()(xc);var{formatters:Fat}=eU.exports;Fat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var m0e=F((p7t,A0e)=>{"use strict";m();A0e.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 _0e=F((A7t,h0e)=>{"use strict";m();var Gat=Fe("os"),g0e=Fe("tty"),Nd=m0e(),{env:Va}=process,n_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?n_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(n_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?n_=1:Va.FORCE_COLOR==="false"?n_=0:n_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function t9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n9(e,t){if(n_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&n_===void 0)return 0;let n=n_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Gat.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 jat(e){let t=n9(e,e&&e.isTTY);return t9(t)}h0e.exports={supportsColor:jat,stdout:t9(n9(!0,g0e.isatty(1))),stderr:t9(n9(!0,g0e.isatty(2)))}});var S0e=F((qa,nU)=>{m();var Hat=Fe("tty"),tU=Fe("util");qa.init=Jat;qa.log=qat;qa.formatArgs=$at;qa.save=Yat;qa.load=Kat;qa.useColors=zat;qa.destroy=tU.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=_0e();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 zat(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:Hat.isatty(process.stderr.fd)}function $at(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 e7e=Object.create;var qP=Object.defineProperty;var t7e=Object.getOwnPropertyDescriptor;var n7e=Object.getOwnPropertyNames;var r7e=Object.getPrototypeOf,o7e=Object.prototype.hasOwnProperty;var Fe=(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),za=(e,t)=>{for(var n in t)qP(e,n,{get:t[n],enumerable:!0})},yle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of n7e(t))!o7e.call(e,o)&&o!==n&&qP(e,o,{get:()=>t[o],enumerable:!(r=t7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?e7e(r7e(e)):{},yle(t||!e||!e.__esModule?qP(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>yle(qP({},"__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.126"}}catch{}})()});var Xm,f$=O(()=>{m();Xm="1.9.1"});function i7e(e){let t=new Set([e]),n=new Set,r=e.match(Cle);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(Cle);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 Cle,ble,vle=O(()=>{m();f$();Cle=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;ble=i7e(Xm)});function oA(e,t,n,r=!1){var o;let i=K1[Y1]=(o=K1[Y1])!==null&&o!==void 0?o:{version:Xm};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!==Xm){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Xm}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Xm}.`),!0}function Cl(e){var t,n;let r=(t=K1[Y1])===null||t===void 0?void 0:t.version;if(!(!r||!ble(r)))return(n=K1[Y1])===null||n===void 0?void 0:n[e]}function iA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Xm}.`);let n=K1[Y1];n&&delete n[e]}var a7e,Y1,K1,TS=O(()=>{m();f$();vle();a7e=Xm.split(".")[0],Y1=Symbol.for(`opentelemetry.js.api.${a7e}`),K1=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function J1(e,t,n){let r=Cl("diag");if(r)return r[e](t,...n)}var YP,Rle=O(()=>{m();TS();YP=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return J1("debug",this._namespace,t)}error(...t){return J1("error",this._namespace,t)}info(...t){return J1("info",this._namespace,t)}warn(...t){return J1("warn",this._namespace,t)}verbose(...t){return J1("verbose",this._namespace,t)}}});var _a,KP=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"})(_a||(_a={}))});function xle(e,t){e<_a.NONE?e=_a.NONE:e>_a.ALL&&(e=_a.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",_a.ERROR),warn:n("warn",_a.WARN),info:n("info",_a.INFO),debug:n("debug",_a.DEBUG),verbose:n("verbose",_a.VERBOSE)}}var Dle=O(()=>{m();KP()});var s7e,$a,IS=O(()=>{m();Rle();Dle();KP();TS();s7e="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:_a.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=xle((c=i.logLevel)!==null&&c!==void 0?c:_a.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 oA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{iA(s7e,n)},n.createComponentLogger=o=>new YP(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var JP,Ble=O(()=>{m();JP=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 Nle,Ole=O(()=>{m();Nle=Symbol("BaggageEntryMetadata")});function wle(e={}){return new JP(new Map(Object.entries(e)))}function kle(e){return typeof e!="string"&&(u7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Nle,toString(){return e}}}var u7e,A$=O(()=>{m();IS();Ble();Ole();u7e=$a.instance()});function bl(e){return Symbol.for(e)}var m$,LC,Z1=O(()=>{m();m$=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}}},LC=new m$});var g$,h$,ZP,Mle=O(()=>{m();g$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h$[t]=console[t])}ZP=class{constructor(){function t(n){return function(...r){let o=h$[n];if(typeof o!="function"&&(o=h$.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<g$.length;n++)this[g$[n].n]=t(g$[n].c)}}});function Ple(){return v$}var _$,QC,E$,S$,y$,T$,W1,I$,C$,b$,v$,c7e,l7e,d7e,p7e,f7e,A7e,m7e,R$=O(()=>{m();_$=class{constructor(){}createGauge(t,n){return l7e}createHistogram(t,n){return d7e}createCounter(t,n){return c7e}createUpDownCounter(t,n){return p7e}createObservableGauge(t,n){return A7e}createObservableCounter(t,n){return f7e}createObservableUpDownCounter(t,n){return m7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},QC=class{},E$=class extends QC{add(t,n){}},S$=class extends QC{add(t,n){}},y$=class extends QC{record(t,n){}},T$=class extends QC{record(t,n){}},W1=class{addCallback(t){}removeCallback(t){}},I$=class extends W1{},C$=class extends W1{},b$=class extends W1{},v$=new _$,c7e=new E$,l7e=new y$,d7e=new T$,p7e=new S$,f7e=new I$,A7e=new C$,m7e=new b$});var WP,Ule=O(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(WP||(WP={}))});var XP,e2,x$=O(()=>{m();XP={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},e2={set(e,t,n){e!=null&&(e[t]=n)}}});var t2,Lle=O(()=>{m();Z1();t2=class{active(){return LC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D$,g7e,aA,X1=O(()=>{m();Lle();TS();IS();D$="context",g7e=new t2,aA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return oA(D$,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(D$)||g7e}disable(){this._getContextManager().disable(),iA(D$,$a.instance())}}});var Ks,B$=O(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ks||(Ks={}))});var eB,CS,n2,r2=O(()=>{m();B$();eB="0000000000000000",CS="00000000000000000000000000000000",n2={traceId:CS,spanId:eB,traceFlags:Ks.NONE}});var sA,o2=O(()=>{m();r2();sA=class{constructor(t=n2){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 i2(e){return e.getValue(N$)||void 0}function Qle(){return i2(aA.getInstance().active())}function tB(e,t){return e.setValue(N$,t)}function Fle(e){return e.deleteValue(N$)}function Gle(e,t){return tB(e,new sA(t))}function a2(e){var t;return(t=i2(e))===null||t===void 0?void 0:t.spanContext()}var N$,O$=O(()=>{m();Z1();o2();X1();N$=bl("OpenTelemetry Context Key SPAN")});function jle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(s2[e.charCodeAt(r)]|0)+(s2[e.charCodeAt(r+1)]|0)+(s2[e.charCodeAt(r+2)]|0)+(s2[e.charCodeAt(r+3)]|0);return n===t}function w$(e){return jle(e,32)&&e!==CS}function k$(e){return jle(e,16)&&e!==eB}function eg(e){return w$(e.traceId)&&k$(e.spanId)}function Hle(e){return new sA(e)}var s2,u2=O(()=>{m();r2();o2();s2=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 h7e(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 M$,FC,P$=O(()=>{m();X1();O$();o2();u2();M$=aA.getInstance(),FC=class{startSpan(t,n,r=M$.active()){if(!!n?.root)return new sA;let i=r&&a2(r);return h7e(i)&&eg(i)?new sA(i):new sA}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??M$.active(),g=this.startSpan(t,i,d),h=tB(d,g);return M$.with(h,c,void 0,g)}}});var _7e,GC,U$=O(()=>{m();P$();_7e=new FC,GC=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):_7e}}});var c2,zle=O(()=>{m();P$();c2=class{getTracer(t,n,r){return new FC}}});var E7e,bS,L$=O(()=>{m();U$();zle();E7e=new c2,bS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new GC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:E7e}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 l2,$le=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"})(l2||(l2={}))});var oo,Vle=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"})(oo||(oo={}))});var ui,qle=O(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ui||(ui={}))});function Yle(e){return T7e.test(e)}function Kle(e){return I7e.test(e)&&!C7e.test(e)}var Q$,S7e,y7e,T7e,I7e,C7e,Jle=O(()=>{m();Q$="[_0-9a-z-*/]",S7e=`[a-z]${Q$}{0,255}`,y7e=`[a-z0-9]${Q$}{0,240}@[a-z]${Q$}{0,13}`,T7e=new RegExp(`^(?:${S7e}|${y7e})$`),I7e=/^[ -~]{0,255}[!-~]$/,C7e=/,|=/});var Zle,b7e,Wle,Xle,d2,ede=O(()=>{m();Jle();Zle=32,b7e=512,Wle=",",Xle="=",d2=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+Xle+this.get(n)),t),[]).join(Wle)}_parse(t){t.length>b7e||(this._internalState=t.split(Wle).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Xle);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Yle(a)&&Kle(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Zle&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Zle))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function tde(e){return new d2(e)}var nde=O(()=>{m();ede()});var Ke,rde=O(()=>{m();X1();Ke=aA.getInstance()});var vl,ode=O(()=>{m();IS();vl=$a.instance()});var F$,ide,ade=O(()=>{m();R$();F$=class{getMeter(t,n,r){return v$}},ide=new F$});var G$,p2,sde=O(()=>{m();ade();TS();IS();G$="metrics",p2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return oA(G$,t,$a.instance())}getMeterProvider(){return Cl(G$)||ide}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){iA(G$,$a.instance())}}});var j$,ude=O(()=>{m();sde();j$=p2.getInstance()});var f2,cde=O(()=>{m();f2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function z$(e){return e.getValue(H$)||void 0}function lde(){return z$(aA.getInstance().active())}function dde(e,t){return e.setValue(H$,t)}function pde(e){return e.deleteValue(H$)}var H$,fde=O(()=>{m();X1();Z1();H$=bl("OpenTelemetry Baggage Key")});var $$,v7e,A2,Ade=O(()=>{m();TS();cde();x$();fde();A$();IS();$$="propagation",v7e=new f2,A2=class e{constructor(){this.createBaggage=wle,this.getBaggage=z$,this.getActiveBaggage=lde,this.setBaggage=dde,this.deleteBaggage=pde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return oA($$,t,$a.instance())}inject(t,n,r=e2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=XP){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iA($$,$a.instance())}_getGlobalPropagator(){return Cl($$)||v7e}}});var Vp,mde=O(()=>{m();Ade();Vp=A2.getInstance()});var V$,m2,gde=O(()=>{m();TS();L$();u2();O$();IS();V$="trace",m2=class e{constructor(){this._proxyTracerProvider=new bS,this.wrapSpanContext=Hle,this.isSpanContextValid=eg,this.deleteSpan=Fle,this.getSpan=i2,this.getActiveSpan=Qle,this.getSpanContext=a2,this.setSpan=tB,this.setSpanContext=Gle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=oA(V$,this._proxyTracerProvider,$a.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Cl(V$)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){iA(V$,$a.instance()),this._proxyTracerProvider=new bS}}});var Ht,hde=O(()=>{m();gde();Ht=m2.getInstance()});var We={};za(We,{DiagConsoleLogger:()=>ZP,DiagLogLevel:()=>_a,INVALID_SPANID:()=>eB,INVALID_SPAN_CONTEXT:()=>n2,INVALID_TRACEID:()=>CS,ProxyTracer:()=>GC,ProxyTracerProvider:()=>bS,ROOT_CONTEXT:()=>LC,SamplingDecision:()=>l2,SpanKind:()=>oo,SpanStatusCode:()=>ui,TraceFlags:()=>Ks,ValueType:()=>WP,baggageEntryMetadataFromString:()=>kle,context:()=>Ke,createContextKey:()=>bl,createNoopMeter:()=>Ple,createTraceState:()=>tde,default:()=>R7e,defaultTextMapGetter:()=>XP,defaultTextMapSetter:()=>e2,diag:()=>vl,isSpanContextValid:()=>eg,isValidSpanId:()=>k$,isValidTraceId:()=>w$,metrics:()=>j$,propagation:()=>Vp,trace:()=>Ht});var R7e,Ge=O(()=>{m();A$();Z1();Mle();KP();R$();Ule();x$();U$();L$();$le();Vle();qle();B$();nde();u2();r2();rde();ode();ude();mde();hde();R7e={context:Ke,diag:vl,metrics:j$,propagation:Vp,trace:Ht}});var nB=F(Xh=>{"use strict";m();Object.defineProperty(Xh,"__esModule",{value:!0});Xh.isTracingSuppressed=Xh.unsuppressTracing=Xh.suppressTracing=void 0;var x7e=(Ge(),Me(We)),q$=(0,x7e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function D7e(e){return e.setValue(q$,!0)}Xh.suppressTracing=D7e;function B7e(e){return e.deleteValue(q$)}Xh.unsuppressTracing=B7e;function N7e(e){return e.getValue(q$)===!0}Xh.isTracingSuppressed=N7e});var Y$=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 K$=F(uA=>{"use strict";m();Object.defineProperty(uA,"__esModule",{value:!0});uA.parseKeyPairsIntoRecord=uA.parsePairKeyValue=uA.getKeyPairs=uA.serializeKeyPairs=void 0;var O7e=(Ge(),Me(We)),jC=Y$();function w7e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?jC.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>jC.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}uA.serializeKeyPairs=w7e;function k7e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=jC.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}uA.getKeyPairs=k7e;function _de(e){if(!e)return;let t=e.indexOf(jC.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(jC.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,O7e.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}uA.parsePairKeyValue=_de;function M7e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(jC.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=_de(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}uA.parseKeyPairsIntoRecord=M7e});var Ede=F(g2=>{"use strict";m();Object.defineProperty(g2,"__esModule",{value:!0});g2.W3CBaggagePropagator=void 0;var J$=(Ge(),Me(We)),P7e=nB(),vS=Y$(),Z$=K$(),W$=class{inject(t,n,r){let o=J$.propagation.getBaggage(t);if(!o||(0,P7e.isTracingSuppressed)(t))return;let i=(0,Z$.getKeyPairs)(o).filter(c=>c.length<=vS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,vS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,Z$.serializeKeyPairs)(i);a.length>0&&r.set(n,vS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,vS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(vS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(vS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,Z$.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:J$.propagation.setBaggage(t,J$.propagation.createBaggage(a))}fields(){return[vS.BAGGAGE_HEADER]}};g2.W3CBaggagePropagator=W$});var Sde=F(h2=>{"use strict";m();Object.defineProperty(h2,"__esModule",{value:!0});h2.AnchoredClock=void 0;var X$=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}};h2.AnchoredClock=X$});var bde=F(e_=>{"use strict";m();Object.defineProperty(e_,"__esModule",{value:!0});e_.isAttributeValue=e_.isAttributeKey=e_.sanitizeAttributes=void 0;var yde=(Ge(),Me(We));function U7e(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(!Tde(n)){yde.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!Ide(r)){yde.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}e_.sanitizeAttributes=U7e;function Tde(e){return typeof e=="string"&&e!==""}e_.isAttributeKey=Tde;function Ide(e){return e==null?!0:Array.isArray(e)?L7e(e):Cde(typeof e)}e_.isAttributeValue=Ide;function L7e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Cde(r)){t=r;continue}return!1}return!1}}return!0}function Cde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var e5=F(_2=>{"use strict";m();Object.defineProperty(_2,"__esModule",{value:!0});_2.loggingErrorHandler=void 0;var Q7e=(Ge(),Me(We));function F7e(){return e=>{Q7e.diag.error(G7e(e))}}_2.loggingErrorHandler=F7e;function G7e(e){return typeof e=="string"?e:JSON.stringify(j7e(e))}function j7e(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 Rde=F(HC=>{"use strict";m();Object.defineProperty(HC,"__esModule",{value:!0});HC.globalErrorHandler=HC.setGlobalErrorHandler=void 0;var H7e=e5(),vde=(0,H7e.loggingErrorHandler)();function z7e(e){vde=e}HC.setGlobalErrorHandler=z7e;function $7e(e){try{vde(e)}catch{}}HC.globalErrorHandler=$7e});var Nde=F(cA=>{"use strict";m();Object.defineProperty(cA,"__esModule",{value:!0});cA.getStringListFromEnv=cA.getBooleanFromEnv=cA.getStringFromEnv=cA.getNumberFromEnv=void 0;var xde=(Ge(),Me(We)),Dde=Fe("util");function V7e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){xde.diag.warn(`Unknown value ${(0,Dde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}cA.getNumberFromEnv=V7e;function Bde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}cA.getStringFromEnv=Bde;function q7e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||xde.diag.warn(`Unknown value ${(0,Dde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}cA.getBooleanFromEnv=q7e;function Y7e(e){return Bde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}cA.getStringListFromEnv=Y7e});var Ode=F(E2=>{"use strict";m();Object.defineProperty(E2,"__esModule",{value:!0});E2._globalThis=void 0;E2._globalThis=globalThis});var wde=F(S2=>{"use strict";m();Object.defineProperty(S2,"__esModule",{value:!0});S2.VERSION=void 0;S2.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 t5=O(()=>{m()});var kde,Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$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,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$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,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,K7e,n5,J7e,Z7e,W7e,X7e,r5,eYe,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,o5,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,xYe,DYe,i5,BYe,NYe,a5,s5,OYe,wYe,kYe,MYe,PYe,UYe,LYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,YYe,rB,zC,u5,KYe,JYe,RS,ZYe,WYe,XYe,eKe,c5,l5,tKe,d5,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,p5,bKe,vKe,RKe,xKe,DKe,BKe,NKe,OKe,wKe,kKe,MKe,PKe,UKe,LKe,QKe,FKe,GKe,jKe,HKe,f5,zKe,A5,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eAe,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,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,MJe,PJe,UJe,LJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,ome,ime,ame,sme,ume,aZe,sZe,uZe,cZe,lZe,dZe,cme,lme,dme,pZe,fZe,AZe,mZe,pme,fme,Ame,mme,gZe,hZe,_Ze,EZe,SZe,gme,hme,_me,Eme,Sme,yme,Tme,yZe,TZe,IZe,CZe,bZe,vZe,RZe,xZe,Ime,Cme,bme,vme,Rme,DZe,BZe,NZe,OZe,wZe,kZe,xme,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,MZe,PZe,UZe,LZe,QZe,FZe,GZe,jZe,HZe,zZe,$Ze,VZe,qZe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,Kme,Jme,Zme,Wme,Xme,rWe,oWe,iWe,aWe,sWe,uWe,ege,tge,cWe,lWe,dWe,nge,rge,pWe,fWe,AWe,oge,ige,age,sge,uge,cge,lge,dge,pge,fge,Age,mge,gge,hge,_ge,Ege,Sge,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,yge,Tge,wWe,kWe,MWe,Ige=O(()=>{m();t5();kde="aws.lambda.invoked_arn",Mde="db.system",Pde="db.connection_string",Ude="db.user",Lde="db.jdbc.driver_classname",Qde="db.name",Fde="db.statement",Gde="db.operation",jde="db.mssql.instance_name",Hde="db.cassandra.keyspace",zde="db.cassandra.page_size",$de="db.cassandra.consistency_level",Vde="db.cassandra.table",qde="db.cassandra.idempotence",Yde="db.cassandra.speculative_execution_count",Kde="db.cassandra.coordinator.id",Jde="db.cassandra.coordinator.dc",Zde="db.hbase.namespace",Wde="db.redis.database_index",Xde="db.mongodb.collection",epe="db.sql.table",tpe="exception.type",npe="exception.message",rpe="exception.stacktrace",ope="exception.escaped",ipe="faas.trigger",ape="faas.execution",spe="faas.document.collection",upe="faas.document.operation",cpe="faas.document.time",lpe="faas.document.name",dpe="faas.time",ppe="faas.cron",fpe="faas.coldstart",Ape="faas.invoked_name",mpe="faas.invoked_provider",gpe="faas.invoked_region",hpe="net.transport",_pe="net.peer.ip",Epe="net.peer.port",Spe="net.peer.name",ype="net.host.ip",Tpe="net.host.port",Ipe="net.host.name",Cpe="net.host.connection.type",bpe="net.host.connection.subtype",vpe="net.host.carrier.name",Rpe="net.host.carrier.mcc",xpe="net.host.carrier.mnc",Dpe="net.host.carrier.icc",Bpe="peer.service",Npe="enduser.id",Ope="enduser.role",wpe="enduser.scope",kpe="thread.id",Mpe="thread.name",Ppe="code.function",Upe="code.namespace",Lpe="code.filepath",Qpe="code.lineno",Fpe="http.method",Gpe="http.url",jpe="http.target",Hpe="http.host",zpe="http.scheme",$pe="http.status_code",Vpe="http.flavor",qpe="http.user_agent",Ype="http.request_content_length",Kpe="http.request_content_length_uncompressed",Jpe="http.response_content_length",Zpe="http.response_content_length_uncompressed",Wpe="http.server_name",Xpe="http.route",efe="http.client_ip",tfe="aws.dynamodb.table_names",nfe="aws.dynamodb.consumed_capacity",rfe="aws.dynamodb.item_collection_metrics",ofe="aws.dynamodb.provisioned_read_capacity",ife="aws.dynamodb.provisioned_write_capacity",afe="aws.dynamodb.consistent_read",sfe="aws.dynamodb.projection",ufe="aws.dynamodb.limit",cfe="aws.dynamodb.attributes_to_get",lfe="aws.dynamodb.index_name",dfe="aws.dynamodb.select",pfe="aws.dynamodb.global_secondary_indexes",ffe="aws.dynamodb.local_secondary_indexes",Afe="aws.dynamodb.exclusive_start_table",mfe="aws.dynamodb.table_count",gfe="aws.dynamodb.scan_forward",hfe="aws.dynamodb.segment",_fe="aws.dynamodb.total_segments",Efe="aws.dynamodb.count",Sfe="aws.dynamodb.scanned_count",yfe="aws.dynamodb.attribute_definitions",Tfe="aws.dynamodb.global_secondary_index_updates",Ife="messaging.system",Cfe="messaging.destination",bfe="messaging.destination_kind",vfe="messaging.temp_destination",Rfe="messaging.protocol",xfe="messaging.protocol_version",Dfe="messaging.url",Bfe="messaging.message_id",Nfe="messaging.conversation_id",Ofe="messaging.message_payload_size_bytes",wfe="messaging.message_payload_compressed_size_bytes",kfe="messaging.operation",Mfe="messaging.consumer_id",Pfe="messaging.rabbitmq.routing_key",Ufe="messaging.kafka.message_key",Lfe="messaging.kafka.consumer_group",Qfe="messaging.kafka.client_id",Ffe="messaging.kafka.partition",Gfe="messaging.kafka.tombstone",jfe="rpc.system",Hfe="rpc.service",zfe="rpc.method",$fe="rpc.grpc.status_code",Vfe="rpc.jsonrpc.version",qfe="rpc.jsonrpc.request_id",Yfe="rpc.jsonrpc.error_code",Kfe="rpc.jsonrpc.error_message",Jfe="message.type",Zfe="message.id",Wfe="message.compressed_size",Xfe="message.uncompressed_size",K7e=kde,n5=Mde,J7e=Pde,Z7e=Ude,W7e=Lde,X7e=Qde,r5=Fde,eYe=Gde,tYe=jde,nYe=Hde,rYe=zde,oYe=$de,iYe=Vde,aYe=qde,sYe=Yde,uYe=Kde,cYe=Jde,lYe=Zde,dYe=Wde,pYe=Xde,fYe=epe,AYe=tpe,mYe=npe,gYe=rpe,hYe=ope,o5=ipe,_Ye=ape,EYe=spe,SYe=upe,yYe=cpe,TYe=lpe,IYe=dpe,CYe=ppe,bYe=fpe,vYe=Ape,RYe=mpe,xYe=gpe,DYe=hpe,i5=_pe,BYe=Epe,NYe=Spe,a5=ype,s5=Tpe,OYe=Ipe,wYe=Cpe,kYe=bpe,MYe=vpe,PYe=Rpe,UYe=xpe,LYe=Dpe,QYe=Bpe,FYe=Npe,GYe=Ope,jYe=wpe,HYe=kpe,zYe=Mpe,$Ye=Ppe,VYe=Upe,qYe=Lpe,YYe=Qpe,rB=Fpe,zC=Gpe,u5=jpe,KYe=Hpe,JYe=zpe,RS=$pe,ZYe=Vpe,WYe=qpe,XYe=Ype,eKe=Kpe,c5=Jpe,l5=Zpe,tKe=Wpe,d5=Xpe,nKe=efe,rKe=tfe,oKe=nfe,iKe=rfe,aKe=ofe,sKe=ife,uKe=afe,cKe=sfe,lKe=ufe,dKe=cfe,pKe=lfe,fKe=dfe,AKe=pfe,mKe=ffe,gKe=Afe,hKe=mfe,_Ke=gfe,EKe=hfe,SKe=_fe,yKe=Efe,TKe=Sfe,IKe=yfe,CKe=Tfe,p5=Ife,bKe=Cfe,vKe=bfe,RKe=vfe,xKe=Rfe,DKe=xfe,BKe=Dfe,NKe=Bfe,OKe=Nfe,wKe=Ofe,kKe=wfe,MKe=kfe,PKe=Mfe,UKe=Pfe,LKe=Ufe,QKe=Lfe,FKe=Qfe,GKe=Ffe,jKe=Gfe,HKe=jfe,f5=Hfe,zKe=zfe,A5=$fe,$Ke=Vfe,VKe=qfe,qKe=Yfe,YKe=Kfe,KKe=Jfe,JKe=Zfe,ZKe=Wfe,WKe=Xfe,XKe=bi([kde,Mde,Pde,Ude,Lde,Qde,Fde,Gde,jde,Hde,zde,$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,Mpe,Ppe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,Hpe,zpe,$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,Mfe,Pfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe]),eAe="other_sql",tAe="mssql",nAe="mysql",rAe="oracle",oAe="db2",iAe="postgresql",aAe="redshift",sAe="hive",uAe="cloudscape",cAe="hsqldb",lAe="progress",dAe="maxdb",pAe="hanadb",fAe="ingres",AAe="firstsql",mAe="edb",gAe="cache",hAe="adabas",_Ae="firebird",EAe="derby",SAe="filemaker",yAe="informix",TAe="instantdb",IAe="interbase",CAe="mariadb",bAe="netezza",vAe="pervasive",RAe="pointbase",xAe="sqlite",DAe="sybase",BAe="teradata",NAe="vertica",OAe="h2",wAe="coldfusion",kAe="cassandra",MAe="hbase",PAe="mongodb",UAe="redis",LAe="couchbase",QAe="couchdb",FAe="cosmosdb",GAe="dynamodb",jAe="neo4j",HAe="geode",zAe="elasticsearch",$Ae="memcached",VAe="cockroachdb",eJe=eAe,tJe=tAe,nJe=nAe,rJe=rAe,oJe=oAe,iJe=iAe,aJe=aAe,sJe=sAe,uJe=uAe,cJe=cAe,lJe=lAe,dJe=dAe,pJe=pAe,fJe=fAe,AJe=AAe,mJe=mAe,gJe=gAe,hJe=hAe,_Je=_Ae,EJe=EAe,SJe=SAe,yJe=yAe,TJe=TAe,IJe=IAe,CJe=CAe,bJe=bAe,vJe=vAe,RJe=RAe,xJe=xAe,DJe=DAe,BJe=BAe,NJe=NAe,OJe=OAe,wJe=wAe,kJe=kAe,MJe=MAe,PJe=PAe,UJe=UAe,LJe=LAe,QJe=QAe,FJe=FAe,GJe=GAe,jJe=jAe,HJe=HAe,zJe=zAe,$Je=$Ae,VJe=VAe,qJe=bi([eAe,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,MAe,PAe,UAe,LAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe]),qAe="all",YAe="each_quorum",KAe="quorum",JAe="local_quorum",ZAe="one",WAe="two",XAe="three",eme="local_one",tme="any",nme="serial",rme="local_serial",YJe=qAe,KJe=YAe,JJe=KAe,ZJe=JAe,WJe=ZAe,XJe=WAe,eZe=XAe,tZe=eme,nZe=tme,rZe=nme,oZe=rme,iZe=bi([qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme]),ome="datasource",ime="http",ame="pubsub",sme="timer",ume="other",aZe=ome,sZe=ime,uZe=ame,cZe=sme,lZe=ume,dZe=bi([ome,ime,ame,sme,ume]),cme="insert",lme="edit",dme="delete",pZe=cme,fZe=lme,AZe=dme,mZe=bi([cme,lme,dme]),pme="alibaba_cloud",fme="aws",Ame="azure",mme="gcp",gZe=pme,hZe=fme,_Ze=Ame,EZe=mme,SZe=bi([pme,fme,Ame,mme]),gme="ip_tcp",hme="ip_udp",_me="ip",Eme="unix",Sme="pipe",yme="inproc",Tme="other",yZe=gme,TZe=hme,IZe=_me,CZe=Eme,bZe=Sme,vZe=yme,RZe=Tme,xZe=bi([gme,hme,_me,Eme,Sme,yme,Tme]),Ime="wifi",Cme="wired",bme="cell",vme="unavailable",Rme="unknown",DZe=Ime,BZe=Cme,NZe=bme,OZe=vme,wZe=Rme,kZe=bi([Ime,Cme,bme,vme,Rme]),xme="gprs",Dme="edge",Bme="umts",Nme="cdma",Ome="evdo_0",wme="evdo_a",kme="cdma2000_1xrtt",Mme="hsdpa",Pme="hsupa",Ume="hspa",Lme="iden",Qme="evdo_b",Fme="lte",Gme="ehrpd",jme="hspap",Hme="gsm",zme="td_scdma",$me="iwlan",Vme="nr",qme="nrnsa",Yme="lte_ca",MZe=xme,PZe=Dme,UZe=Bme,LZe=Nme,QZe=Ome,FZe=wme,GZe=kme,jZe=Mme,HZe=Pme,zZe=Ume,$Ze=Lme,VZe=Qme,qZe=Fme,YZe=Gme,KZe=jme,JZe=Hme,ZZe=zme,WZe=$me,XZe=Vme,eWe=qme,tWe=Yme,nWe=bi([xme,Dme,Bme,Nme,Ome,wme,kme,Mme,Pme,Ume,Lme,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme]),Kme="1.0",Jme="1.1",Zme="2.0",Wme="SPDY",Xme="QUIC",rWe=Kme,oWe=Jme,iWe=Zme,aWe=Wme,sWe=Xme,uWe={HTTP_1_0:Kme,HTTP_1_1:Jme,HTTP_2_0:Zme,SPDY:Wme,QUIC:Xme},ege="queue",tge="topic",cWe=ege,lWe=tge,dWe=bi([ege,tge]),nge="receive",rge="process",pWe=nge,fWe=rge,AWe=bi([nge,rge]),oge=0,ige=1,age=2,sge=3,uge=4,cge=5,lge=6,dge=7,pge=8,fge=9,Age=10,mge=11,gge=12,hge=13,_ge=14,Ege=15,Sge=16,mWe=oge,gWe=ige,hWe=age,_We=sge,EWe=uge,SWe=cge,yWe=lge,TWe=dge,IWe=pge,CWe=fge,bWe=Age,vWe=mge,RWe=gge,xWe=hge,DWe=_ge,BWe=Ege,NWe=Sge,OWe={OK:oge,CANCELLED:ige,UNKNOWN:age,INVALID_ARGUMENT:sge,DEADLINE_EXCEEDED:uge,NOT_FOUND:cge,ALREADY_EXISTS:lge,PERMISSION_DENIED:dge,RESOURCE_EXHAUSTED:pge,FAILED_PRECONDITION:fge,ABORTED:Age,OUT_OF_RANGE:mge,UNIMPLEMENTED:gge,INTERNAL:hge,UNAVAILABLE:_ge,DATA_LOSS:Ege,UNAUTHENTICATED:Sge},yge="SENT",Tge="RECEIVED",wWe=yge,kWe=Tge,MWe=bi([yge,Tge])});var Cge=O(()=>{m();Ige()});var bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$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,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,PWe,UWe,LWe,QWe,FWe,GWe,jWe,HWe,zWe,$We,VWe,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,MXe,PXe,UXe,LXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,m5,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,Whe,Xhe,e_e,t_e,cet,det,pet,fet,Aet,n_e,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,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,Net,Oet,wet,E_e,S_e,ket,Met,Pet,y_e,T_e,I_e,C_e,b_e,v_e,R_e,Uet,Let,Qet,Fet,Get,jet,Het,zet,x_e,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e,$et,Vet,qet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,K_e=O(()=>{m();t5();bge="cloud.provider",vge="cloud.account.id",Rge="cloud.region",xge="cloud.availability_zone",Dge="cloud.platform",Bge="aws.ecs.container.arn",Nge="aws.ecs.cluster.arn",Oge="aws.ecs.launchtype",wge="aws.ecs.task.arn",kge="aws.ecs.task.family",Mge="aws.ecs.task.revision",Pge="aws.eks.cluster.arn",Uge="aws.log.group.names",Lge="aws.log.group.arns",Qge="aws.log.stream.names",Fge="aws.log.stream.arns",Gge="container.name",jge="container.id",Hge="container.runtime",zge="container.image.name",$ge="container.image.tag",Vge="deployment.environment",qge="device.id",Yge="device.model.identifier",Kge="device.model.name",Jge="faas.name",Zge="faas.id",Wge="faas.version",Xge="faas.instance",ehe="faas.max_memory",the="host.id",nhe="host.name",rhe="host.type",ohe="host.arch",ihe="host.image.name",ahe="host.image.id",she="host.image.version",uhe="k8s.cluster.name",che="k8s.node.name",lhe="k8s.node.uid",dhe="k8s.namespace.name",phe="k8s.pod.uid",fhe="k8s.pod.name",Ahe="k8s.container.name",mhe="k8s.replicaset.uid",ghe="k8s.replicaset.name",hhe="k8s.deployment.uid",_he="k8s.deployment.name",Ehe="k8s.statefulset.uid",She="k8s.statefulset.name",yhe="k8s.daemonset.uid",The="k8s.daemonset.name",Ihe="k8s.job.uid",Che="k8s.job.name",bhe="k8s.cronjob.uid",vhe="k8s.cronjob.name",Rhe="os.type",xhe="os.description",Dhe="os.name",Bhe="os.version",Nhe="process.pid",Ohe="process.executable.name",whe="process.executable.path",khe="process.command",Mhe="process.command_line",Phe="process.command_args",Uhe="process.owner",Lhe="process.runtime.name",Qhe="process.runtime.version",Fhe="process.runtime.description",Ghe="service.name",jhe="service.namespace",Hhe="service.instance.id",zhe="service.version",$he="telemetry.sdk.name",Vhe="telemetry.sdk.language",qhe="telemetry.sdk.version",Yhe="telemetry.auto.version",Khe="webengine.name",Jhe="webengine.version",Zhe="webengine.description",PWe=bge,UWe=vge,LWe=Rge,QWe=xge,FWe=Dge,GWe=Bge,jWe=Nge,HWe=Oge,zWe=wge,$We=kge,VWe=Mge,qWe=Pge,YWe=Uge,KWe=Lge,JWe=Qge,ZWe=Fge,WWe=Gge,XWe=jge,eXe=Hge,tXe=zge,nXe=$ge,rXe=Vge,oXe=qge,iXe=Yge,aXe=Kge,sXe=Jge,uXe=Zge,cXe=Wge,lXe=Xge,dXe=ehe,pXe=the,fXe=nhe,AXe=rhe,mXe=ohe,gXe=ihe,hXe=ahe,_Xe=she,EXe=uhe,SXe=che,yXe=lhe,TXe=dhe,IXe=phe,CXe=fhe,bXe=Ahe,vXe=mhe,RXe=ghe,xXe=hhe,DXe=_he,BXe=Ehe,NXe=She,OXe=yhe,wXe=The,kXe=Ihe,MXe=Che,PXe=bhe,UXe=vhe,LXe=Rhe,QXe=xhe,FXe=Dhe,GXe=Bhe,jXe=Nhe,HXe=Ohe,zXe=whe,$Xe=khe,VXe=Mhe,qXe=Phe,YXe=Uhe,KXe=Lhe,JXe=Qhe,ZXe=Fhe,WXe=Ghe,m5=jhe,XXe=Hhe,eet=zhe,tet=$he,net=Vhe,ret=qhe,oet=Yhe,iet=Khe,aet=Jhe,set=Zhe,uet=bi([bge,vge,Rge,xge,Dge,Bge,Nge,Oge,wge,kge,Mge,Pge,Uge,Lge,Qge,Fge,Gge,jge,Hge,zge,$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,Mhe,Phe,Uhe,Lhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe]),Whe="alibaba_cloud",Xhe="aws",e_e="azure",t_e="gcp",cet=Whe,det=Xhe,pet=e_e,fet=t_e,Aet=bi([Whe,Xhe,e_e,t_e]),n_e="alibaba_cloud_ecs",r_e="alibaba_cloud_fc",o_e="aws_ec2",i_e="aws_ecs",a_e="aws_eks",s_e="aws_lambda",u_e="aws_elastic_beanstalk",c_e="azure_vm",l_e="azure_container_instances",d_e="azure_aks",p_e="azure_functions",f_e="azure_app_service",A_e="gcp_compute_engine",m_e="gcp_cloud_run",g_e="gcp_kubernetes_engine",h_e="gcp_cloud_functions",__e="gcp_app_engine",met=n_e,get=r_e,het=o_e,_et=i_e,Eet=a_e,yet=s_e,Tet=u_e,Iet=c_e,Cet=l_e,bet=d_e,vet=p_e,Ret=f_e,xet=A_e,Det=m_e,Bet=g_e,Net=h_e,Oet=__e,wet=bi([n_e,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="ec2",S_e="fargate",ket=E_e,Met=S_e,Pet=bi([E_e,S_e]),y_e="amd64",T_e="arm32",I_e="arm64",C_e="ia64",b_e="ppc32",v_e="ppc64",R_e="x86",Uet=y_e,Let=T_e,Qet=I_e,Fet=C_e,Get=b_e,jet=v_e,Het=R_e,zet=bi([y_e,T_e,I_e,C_e,b_e,v_e,R_e]),x_e="windows",D_e="linux",B_e="darwin",N_e="freebsd",O_e="netbsd",w_e="openbsd",k_e="dragonflybsd",M_e="hpux",P_e="aix",U_e="solaris",L_e="z_os",$et=x_e,Vet=D_e,qet=B_e,Yet=N_e,Ket=O_e,Jet=w_e,Zet=k_e,Wet=M_e,Xet=P_e,ett=U_e,ttt=L_e,ntt=bi([x_e,D_e,B_e,N_e,O_e,w_e,k_e,M_e,P_e,U_e,L_e]),Q_e="cpp",F_e="dotnet",G_e="erlang",j_e="go",H_e="java",z_e="nodejs",$_e="php",V_e="python",q_e="ruby",Y_e="webjs",rtt=Q_e,ott=F_e,itt=G_e,att=j_e,stt=H_e,utt=z_e,ctt=$_e,ltt=V_e,dtt=q_e,ptt=Y_e,ftt=bi([Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e])});var J_e=O(()=>{m();K_e()});var Att,mtt,gtt,htt,_tt,Ett,Stt,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Mtt,Ptt,Utt,Ltt,g5,h5,Qtt,$C,Ftt,_5,E5,Gtt,xS,jtt,Htt,ztt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,S5,Wtt,Xtt,ent,tnt,nnt,rnt,DS,ont,int,ant,snt,unt,cnt,lnt,dnt,pnt,fnt,Ant,mnt,gnt,tg,ng,hnt,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,Ont,y5,T5,wnt,I5,C5,knt,Mnt,Pnt,Unt,Lnt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,qnt,b5,v5,Ynt,R5,Knt,x5,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,t_,Srt,yrt,Trt,D5,Z_e=O(()=>{m();Att="aspnetcore.diagnostics.exception.result",mtt="aborted",gtt="handled",htt="skipped",_tt="unhandled",Ett="aspnetcore.diagnostics.handler.type",Stt="aspnetcore.rate_limiting.policy",ytt="aspnetcore.rate_limiting.result",Ttt="acquired",Itt="endpoint_limiter",Ctt="global_limiter",btt="request_canceled",vtt="aspnetcore.request.is_unhandled",Rtt="aspnetcore.routing.is_fallback",xtt="aspnetcore.routing.match_status",Dtt="failure",Btt="success",Ntt="aspnetcore.user.is_authenticated",Ott="client.address",wtt="client.port",ktt="code.column.number",Mtt="code.file.path",Ptt="code.function.name",Utt="code.line.number",Ltt="code.stacktrace",g5="db.collection.name",h5="db.namespace",Qtt="db.operation.batch.size",$C="db.operation.name",Ftt="db.query.summary",_5="db.query.text",E5="db.response.status_code",Gtt="db.stored_procedure.name",xS="db.system.name",jtt="mariadb",Htt="microsoft.sql_server",ztt="mysql",$tt="postgresql",Vtt="dotnet.gc.heap.generation",qtt="gen0",Ytt="gen1",Ktt="gen2",Jtt="loh",Ztt="poh",S5="error.type",Wtt="_OTHER",Xtt="exception.escaped",ent="exception.message",tnt="exception.stacktrace",nnt="exception.type",rnt=e=>`http.request.header.${e}`,DS="http.request.method",ont="_OTHER",int="CONNECT",ant="DELETE",snt="GET",unt="HEAD",cnt="OPTIONS",lnt="PATCH",dnt="POST",pnt="PUT",fnt="TRACE",Ant="http.request.method_original",mnt="http.request.resend_count",gnt=e=>`http.response.header.${e}`,tg="http.response.status_code",ng="http.route",hnt="jvm.gc.action",_nt="jvm.gc.name",Ent="jvm.memory.pool.name",Snt="jvm.memory.type",ynt="heap",Tnt="non_heap",Int="jvm.thread.daemon",Cnt="jvm.thread.state",bnt="blocked",vnt="new",Rnt="runnable",xnt="terminated",Dnt="timed_waiting",Bnt="waiting",Nnt="network.local.address",Ont="network.local.port",y5="network.peer.address",T5="network.peer.port",wnt="network.protocol.name",I5="network.protocol.version",C5="network.transport",knt="pipe",Mnt="quic",Pnt="tcp",Unt="udp",Lnt="unix",Qnt="network.type",Fnt="ipv4",Gnt="ipv6",jnt="otel.scope.name",Hnt="otel.scope.version",znt="otel.status_code",$nt="ERROR",Vnt="OK",qnt="otel.status_description",b5="server.address",v5="server.port",Ynt="service.instance.id",R5="service.name",Knt="service.namespace",x5="service.version",Jnt="signalr.connection.status",Znt="app_shutdown",Wnt="normal_closure",Xnt="timeout",ert="signalr.transport",trt="long_polling",nrt="server_sent_events",rrt="web_sockets",ort="telemetry.sdk.language",irt="cpp",art="dotnet",srt="erlang",urt="go",crt="java",lrt="nodejs",drt="php",prt="python",frt="ruby",Art="rust",mrt="swift",grt="webjs",hrt="telemetry.sdk.name",_rt="telemetry.sdk.version",Ert="url.fragment",t_="url.full",Srt="url.path",yrt="url.query",Trt="url.scheme",D5="user_agent.original"});var Irt,Crt,brt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Mrt,Prt,Urt,Lrt,Qrt,Frt,Grt,jrt,Hrt,zrt,$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,W_e=O(()=>{m();Irt="aspnetcore.diagnostics.exceptions",Crt="aspnetcore.rate_limiting.active_request_leases",brt="aspnetcore.rate_limiting.queued_requests",vrt="aspnetcore.rate_limiting.request.time_in_queue",Rrt="aspnetcore.rate_limiting.request_lease.duration",xrt="aspnetcore.rate_limiting.requests",Drt="aspnetcore.routing.match_attempts",Brt="db.client.operation.duration",Nrt="dotnet.assembly.count",Ort="dotnet.exceptions",wrt="dotnet.gc.collections",krt="dotnet.gc.heap.total_allocated",Mrt="dotnet.gc.last_collection.heap.fragmentation.size",Prt="dotnet.gc.last_collection.heap.size",Urt="dotnet.gc.last_collection.memory.committed_size",Lrt="dotnet.gc.pause.time",Qrt="dotnet.jit.compilation.time",Frt="dotnet.jit.compiled_il.size",Grt="dotnet.jit.compiled_methods",jrt="dotnet.monitor.lock_contentions",Hrt="dotnet.process.cpu.count",zrt="dotnet.process.cpu.time",$rt="dotnet.process.memory.working_set",Vrt="dotnet.thread_pool.queue.length",qrt="dotnet.thread_pool.thread.count",Yrt="dotnet.thread_pool.work_item.count",Krt="dotnet.timer.count",Jrt="http.client.request.duration",Zrt="http.server.request.duration",Wrt="jvm.class.count",Xrt="jvm.class.loaded",eot="jvm.class.unloaded",tot="jvm.cpu.count",not="jvm.cpu.recent_utilization",rot="jvm.cpu.time",oot="jvm.gc.duration",iot="jvm.memory.committed",aot="jvm.memory.limit",sot="jvm.memory.used",uot="jvm.memory.used_after_last_gc",cot="jvm.thread.count",lot="kestrel.active_connections",dot="kestrel.active_tls_handshakes",pot="kestrel.connection.duration",fot="kestrel.queued_connections",Aot="kestrel.queued_requests",mot="kestrel.rejected_connections",got="kestrel.tls_handshake.duration",hot="kestrel.upgraded_connections",_ot="signalr.server.active_connections",Eot="signalr.server.connection.duration"});var Sot,X_e=O(()=>{m();Sot="exception"});var Ur={};za(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>mtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>gtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>htt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>_tt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Ttt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Itt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Ctt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>btt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Dtt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>Btt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Att,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Ett,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Stt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>ytt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>vtt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Rtt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>xtt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Ntt,ATTR_CLIENT_ADDRESS:()=>Ott,ATTR_CLIENT_PORT:()=>wtt,ATTR_CODE_COLUMN_NUMBER:()=>ktt,ATTR_CODE_FILE_PATH:()=>Mtt,ATTR_CODE_FUNCTION_NAME:()=>Ptt,ATTR_CODE_LINE_NUMBER:()=>Utt,ATTR_CODE_STACKTRACE:()=>Ltt,ATTR_DB_COLLECTION_NAME:()=>g5,ATTR_DB_NAMESPACE:()=>h5,ATTR_DB_OPERATION_BATCH_SIZE:()=>Qtt,ATTR_DB_OPERATION_NAME:()=>$C,ATTR_DB_QUERY_SUMMARY:()=>Ftt,ATTR_DB_QUERY_TEXT:()=>_5,ATTR_DB_RESPONSE_STATUS_CODE:()=>E5,ATTR_DB_STORED_PROCEDURE_NAME:()=>Gtt,ATTR_DB_SYSTEM_NAME:()=>xS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Vtt,ATTR_ERROR_TYPE:()=>S5,ATTR_EXCEPTION_ESCAPED:()=>Xtt,ATTR_EXCEPTION_MESSAGE:()=>ent,ATTR_EXCEPTION_STACKTRACE:()=>tnt,ATTR_EXCEPTION_TYPE:()=>nnt,ATTR_HTTP_REQUEST_HEADER:()=>rnt,ATTR_HTTP_REQUEST_METHOD:()=>DS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>Ant,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>mnt,ATTR_HTTP_RESPONSE_HEADER:()=>gnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>tg,ATTR_HTTP_ROUTE:()=>ng,ATTR_JVM_GC_ACTION:()=>hnt,ATTR_JVM_GC_NAME:()=>_nt,ATTR_JVM_MEMORY_POOL_NAME:()=>Ent,ATTR_JVM_MEMORY_TYPE:()=>Snt,ATTR_JVM_THREAD_DAEMON:()=>Int,ATTR_JVM_THREAD_STATE:()=>Cnt,ATTR_NETWORK_LOCAL_ADDRESS:()=>Nnt,ATTR_NETWORK_LOCAL_PORT:()=>Ont,ATTR_NETWORK_PEER_ADDRESS:()=>y5,ATTR_NETWORK_PEER_PORT:()=>T5,ATTR_NETWORK_PROTOCOL_NAME:()=>wnt,ATTR_NETWORK_PROTOCOL_VERSION:()=>I5,ATTR_NETWORK_TRANSPORT:()=>C5,ATTR_NETWORK_TYPE:()=>Qnt,ATTR_OTEL_SCOPE_NAME:()=>jnt,ATTR_OTEL_SCOPE_VERSION:()=>Hnt,ATTR_OTEL_STATUS_CODE:()=>znt,ATTR_OTEL_STATUS_DESCRIPTION:()=>qnt,ATTR_SERVER_ADDRESS:()=>b5,ATTR_SERVER_PORT:()=>v5,ATTR_SERVICE_INSTANCE_ID:()=>Ynt,ATTR_SERVICE_NAME:()=>R5,ATTR_SERVICE_NAMESPACE:()=>Knt,ATTR_SERVICE_VERSION:()=>x5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Jnt,ATTR_SIGNALR_TRANSPORT:()=>ert,ATTR_TELEMETRY_SDK_LANGUAGE:()=>ort,ATTR_TELEMETRY_SDK_NAME:()=>hrt,ATTR_TELEMETRY_SDK_VERSION:()=>_rt,ATTR_URL_FRAGMENT:()=>Ert,ATTR_URL_FULL:()=>t_,ATTR_URL_PATH:()=>Srt,ATTR_URL_QUERY:()=>yrt,ATTR_URL_SCHEME:()=>Trt,ATTR_USER_AGENT_ORIGINAL:()=>D5,AWSECSLAUNCHTYPEVALUES_EC2:()=>ket,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Met,AwsEcsLaunchtypeValues:()=>Pet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>met,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>get,CLOUDPLATFORMVALUES_AWS_EC2:()=>het,CLOUDPLATFORMVALUES_AWS_ECS:()=>_et,CLOUDPLATFORMVALUES_AWS_EKS:()=>Eet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Tet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>yet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>bet,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Ret,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Cet,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>vet,CLOUDPLATFORMVALUES_AZURE_VM:()=>Iet,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Oet,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Net,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Det,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>xet,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>Bet,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>cet,CLOUDPROVIDERVALUES_AWS:()=>det,CLOUDPROVIDERVALUES_AZURE:()=>pet,CLOUDPROVIDERVALUES_GCP:()=>fet,CloudPlatformValues:()=>wet,CloudProviderValues:()=>Aet,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>YJe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>nZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>KJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>tZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>ZJe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>oZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>WJe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>JJe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>rZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>eZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>XJe,DBSYSTEMVALUES_ADABAS:()=>hJe,DBSYSTEMVALUES_CACHE:()=>gJe,DBSYSTEMVALUES_CASSANDRA:()=>kJe,DBSYSTEMVALUES_CLOUDSCAPE:()=>uJe,DBSYSTEMVALUES_COCKROACHDB:()=>VJe,DBSYSTEMVALUES_COLDFUSION:()=>wJe,DBSYSTEMVALUES_COSMOSDB:()=>FJe,DBSYSTEMVALUES_COUCHBASE:()=>LJe,DBSYSTEMVALUES_COUCHDB:()=>QJe,DBSYSTEMVALUES_DB2:()=>oJe,DBSYSTEMVALUES_DERBY:()=>EJe,DBSYSTEMVALUES_DYNAMODB:()=>GJe,DBSYSTEMVALUES_EDB:()=>mJe,DBSYSTEMVALUES_ELASTICSEARCH:()=>zJe,DBSYSTEMVALUES_FILEMAKER:()=>SJe,DBSYSTEMVALUES_FIREBIRD:()=>_Je,DBSYSTEMVALUES_FIRSTSQL:()=>AJe,DBSYSTEMVALUES_GEODE:()=>HJe,DBSYSTEMVALUES_H2:()=>OJe,DBSYSTEMVALUES_HANADB:()=>pJe,DBSYSTEMVALUES_HBASE:()=>MJe,DBSYSTEMVALUES_HIVE:()=>sJe,DBSYSTEMVALUES_HSQLDB:()=>cJe,DBSYSTEMVALUES_INFORMIX:()=>yJe,DBSYSTEMVALUES_INGRES:()=>fJe,DBSYSTEMVALUES_INSTANTDB:()=>TJe,DBSYSTEMVALUES_INTERBASE:()=>IJe,DBSYSTEMVALUES_MARIADB:()=>CJe,DBSYSTEMVALUES_MAXDB:()=>dJe,DBSYSTEMVALUES_MEMCACHED:()=>$Je,DBSYSTEMVALUES_MONGODB:()=>PJe,DBSYSTEMVALUES_MSSQL:()=>tJe,DBSYSTEMVALUES_MYSQL:()=>nJe,DBSYSTEMVALUES_NEO4J:()=>jJe,DBSYSTEMVALUES_NETEZZA:()=>bJe,DBSYSTEMVALUES_ORACLE:()=>rJe,DBSYSTEMVALUES_OTHER_SQL:()=>eJe,DBSYSTEMVALUES_PERVASIVE:()=>vJe,DBSYSTEMVALUES_POINTBASE:()=>RJe,DBSYSTEMVALUES_POSTGRESQL:()=>iJe,DBSYSTEMVALUES_PROGRESS:()=>lJe,DBSYSTEMVALUES_REDIS:()=>UJe,DBSYSTEMVALUES_REDSHIFT:()=>aJe,DBSYSTEMVALUES_SQLITE:()=>xJe,DBSYSTEMVALUES_SYBASE:()=>DJe,DBSYSTEMVALUES_TERADATA:()=>BJe,DBSYSTEMVALUES_VERTICA:()=>NJe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>jtt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Htt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>ztt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>$tt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>qtt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Ytt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Ktt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Jtt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Ztt,DbCassandraConsistencyLevelValues:()=>iZe,DbSystemValues:()=>qJe,ERROR_TYPE_VALUE_OTHER:()=>Wtt,EVENT_EXCEPTION:()=>Sot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>AZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>fZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>pZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>gZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>hZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>_Ze,FAASINVOKEDPROVIDERVALUES_GCP:()=>EZe,FAASTRIGGERVALUES_DATASOURCE:()=>aZe,FAASTRIGGERVALUES_HTTP:()=>sZe,FAASTRIGGERVALUES_OTHER:()=>lZe,FAASTRIGGERVALUES_PUBSUB:()=>uZe,FAASTRIGGERVALUES_TIMER:()=>cZe,FaasDocumentOperationValues:()=>mZe,FaasInvokedProviderValues:()=>SZe,FaasTriggerValues:()=>dZe,HOSTARCHVALUES_AMD64:()=>Uet,HOSTARCHVALUES_ARM32:()=>Let,HOSTARCHVALUES_ARM64:()=>Qet,HOSTARCHVALUES_IA64:()=>Fet,HOSTARCHVALUES_PPC32:()=>Get,HOSTARCHVALUES_PPC64:()=>jet,HOSTARCHVALUES_X86:()=>Het,HTTPFLAVORVALUES_HTTP_1_0:()=>rWe,HTTPFLAVORVALUES_HTTP_1_1:()=>oWe,HTTPFLAVORVALUES_HTTP_2_0:()=>iWe,HTTPFLAVORVALUES_QUIC:()=>sWe,HTTPFLAVORVALUES_SPDY:()=>aWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>int,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>ant,HTTP_REQUEST_METHOD_VALUE_GET:()=>snt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>unt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>cnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>ont,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>lnt,HTTP_REQUEST_METHOD_VALUE_POST:()=>dnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>pnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>fnt,HostArchValues:()=>zet,HttpFlavorValues:()=>uWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>ynt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Tnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>bnt,JVM_THREAD_STATE_VALUE_NEW:()=>vnt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Rnt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>xnt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Dnt,JVM_THREAD_STATE_VALUE_WAITING:()=>Bnt,MESSAGETYPEVALUES_RECEIVED:()=>kWe,MESSAGETYPEVALUES_SENT:()=>wWe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>cWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>lWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>fWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>pWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Irt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Crt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>brt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>xrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>Rrt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>vrt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>Drt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Brt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Nrt,METRIC_DOTNET_EXCEPTIONS:()=>Ort,METRIC_DOTNET_GC_COLLECTIONS:()=>wrt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>krt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Mrt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Prt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>Urt,METRIC_DOTNET_GC_PAUSE_TIME:()=>Lrt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Qrt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Frt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>Grt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>jrt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Hrt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>zrt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>$rt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Vrt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>qrt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Yrt,METRIC_DOTNET_TIMER_COUNT:()=>Krt,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Jrt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Zrt,METRIC_JVM_CLASS_COUNT:()=>Wrt,METRIC_JVM_CLASS_LOADED:()=>Xrt,METRIC_JVM_CLASS_UNLOADED:()=>eot,METRIC_JVM_CPU_COUNT:()=>tot,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>not,METRIC_JVM_CPU_TIME:()=>rot,METRIC_JVM_GC_DURATION:()=>oot,METRIC_JVM_MEMORY_COMMITTED:()=>iot,METRIC_JVM_MEMORY_LIMIT:()=>aot,METRIC_JVM_MEMORY_USED:()=>sot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>uot,METRIC_JVM_THREAD_COUNT:()=>cot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>lot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>dot,METRIC_KESTREL_CONNECTION_DURATION:()=>pot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>fot,METRIC_KESTREL_QUEUED_REQUESTS:()=>Aot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>mot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>got,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>hot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>_ot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Eot,MessageTypeValues:()=>MWe,MessagingDestinationKindValues:()=>dWe,MessagingOperationValues:()=>AWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>LZe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>GZe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>PZe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>YZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>QZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>FZe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>VZe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>MZe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>JZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>jZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>zZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>KZe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>HZe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>$Ze,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>WZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>qZe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>tWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>XZe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>eWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>ZZe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>UZe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>NZe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>OZe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>wZe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>DZe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>BZe,NETTRANSPORTVALUES_INPROC:()=>vZe,NETTRANSPORTVALUES_IP:()=>IZe,NETTRANSPORTVALUES_IP_TCP:()=>yZe,NETTRANSPORTVALUES_IP_UDP:()=>TZe,NETTRANSPORTVALUES_OTHER:()=>RZe,NETTRANSPORTVALUES_PIPE:()=>bZe,NETTRANSPORTVALUES_UNIX:()=>CZe,NETWORK_TRANSPORT_VALUE_PIPE:()=>knt,NETWORK_TRANSPORT_VALUE_QUIC:()=>Mnt,NETWORK_TRANSPORT_VALUE_TCP:()=>Pnt,NETWORK_TRANSPORT_VALUE_UDP:()=>Unt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Lnt,NETWORK_TYPE_VALUE_IPV4:()=>Fnt,NETWORK_TYPE_VALUE_IPV6:()=>Gnt,NetHostConnectionSubtypeValues:()=>nWe,NetHostConnectionTypeValues:()=>kZe,NetTransportValues:()=>xZe,OSTYPEVALUES_AIX:()=>Xet,OSTYPEVALUES_DARWIN:()=>qet,OSTYPEVALUES_DRAGONFLYBSD:()=>Zet,OSTYPEVALUES_FREEBSD:()=>Yet,OSTYPEVALUES_HPUX:()=>Wet,OSTYPEVALUES_LINUX:()=>Vet,OSTYPEVALUES_NETBSD:()=>Ket,OSTYPEVALUES_OPENBSD:()=>Jet,OSTYPEVALUES_SOLARIS:()=>ett,OSTYPEVALUES_WINDOWS:()=>$et,OSTYPEVALUES_Z_OS:()=>ttt,OTEL_STATUS_CODE_VALUE_ERROR:()=>$nt,OTEL_STATUS_CODE_VALUE_OK:()=>Vnt,OsTypeValues:()=>ntt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>bWe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>yWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>gWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>BWe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>EWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>CWe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>xWe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>_We,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>SWe,RPCGRPCSTATUSCODEVALUES_OK:()=>mWe,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>vWe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>TWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>IWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>NWe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>DWe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>RWe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>hWe,RpcGrpcStatusCodeValues:()=>OWe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>dKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>IKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>uKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>oKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>yKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>gKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>AKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>CKe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>pKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>iKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>lKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>mKe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>cKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>aKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>sKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>TKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>_Ke,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>EKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>fKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>hKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>rKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>SKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>K7e,SEMATTRS_CODE_FILEPATH:()=>qYe,SEMATTRS_CODE_FUNCTION:()=>$Ye,SEMATTRS_CODE_LINENO:()=>YYe,SEMATTRS_CODE_NAMESPACE:()=>VYe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>oYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>cYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>uYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>aYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>nYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>rYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>sYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>iYe,SEMATTRS_DB_CONNECTION_STRING:()=>J7e,SEMATTRS_DB_HBASE_NAMESPACE:()=>lYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>W7e,SEMATTRS_DB_MONGODB_COLLECTION:()=>pYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>tYe,SEMATTRS_DB_NAME:()=>X7e,SEMATTRS_DB_OPERATION:()=>eYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>dYe,SEMATTRS_DB_SQL_TABLE:()=>fYe,SEMATTRS_DB_STATEMENT:()=>r5,SEMATTRS_DB_SYSTEM:()=>n5,SEMATTRS_DB_USER:()=>Z7e,SEMATTRS_ENDUSER_ID:()=>FYe,SEMATTRS_ENDUSER_ROLE:()=>GYe,SEMATTRS_ENDUSER_SCOPE:()=>jYe,SEMATTRS_EXCEPTION_ESCAPED:()=>hYe,SEMATTRS_EXCEPTION_MESSAGE:()=>mYe,SEMATTRS_EXCEPTION_STACKTRACE:()=>gYe,SEMATTRS_EXCEPTION_TYPE:()=>AYe,SEMATTRS_FAAS_COLDSTART:()=>bYe,SEMATTRS_FAAS_CRON:()=>CYe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>EYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>TYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>SYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>yYe,SEMATTRS_FAAS_EXECUTION:()=>_Ye,SEMATTRS_FAAS_INVOKED_NAME:()=>vYe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>RYe,SEMATTRS_FAAS_INVOKED_REGION:()=>xYe,SEMATTRS_FAAS_TIME:()=>IYe,SEMATTRS_FAAS_TRIGGER:()=>o5,SEMATTRS_HTTP_CLIENT_IP:()=>nKe,SEMATTRS_HTTP_FLAVOR:()=>ZYe,SEMATTRS_HTTP_HOST:()=>KYe,SEMATTRS_HTTP_METHOD:()=>rB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>XYe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>eKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>c5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>l5,SEMATTRS_HTTP_ROUTE:()=>d5,SEMATTRS_HTTP_SCHEME:()=>JYe,SEMATTRS_HTTP_SERVER_NAME:()=>tKe,SEMATTRS_HTTP_STATUS_CODE:()=>RS,SEMATTRS_HTTP_TARGET:()=>u5,SEMATTRS_HTTP_URL:()=>zC,SEMATTRS_HTTP_USER_AGENT:()=>WYe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>ZKe,SEMATTRS_MESSAGE_ID:()=>JKe,SEMATTRS_MESSAGE_TYPE:()=>KKe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>WKe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>PKe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>OKe,SEMATTRS_MESSAGING_DESTINATION:()=>bKe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>vKe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>FKe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>QKe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>LKe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>GKe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>jKe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>NKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>kKe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>wKe,SEMATTRS_MESSAGING_OPERATION:()=>MKe,SEMATTRS_MESSAGING_PROTOCOL:()=>xKe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>DKe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>UKe,SEMATTRS_MESSAGING_SYSTEM:()=>p5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>RKe,SEMATTRS_MESSAGING_URL:()=>BKe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>LYe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>PYe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>UYe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>MYe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>kYe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>wYe,SEMATTRS_NET_HOST_IP:()=>a5,SEMATTRS_NET_HOST_NAME:()=>OYe,SEMATTRS_NET_HOST_PORT:()=>s5,SEMATTRS_NET_PEER_IP:()=>i5,SEMATTRS_NET_PEER_NAME:()=>NYe,SEMATTRS_NET_PEER_PORT:()=>BYe,SEMATTRS_NET_TRANSPORT:()=>DYe,SEMATTRS_PEER_SERVICE:()=>QYe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>A5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>qKe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>YKe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>VKe,SEMATTRS_RPC_JSONRPC_VERSION:()=>$Ke,SEMATTRS_RPC_METHOD:()=>zKe,SEMATTRS_RPC_SERVICE:()=>f5,SEMATTRS_RPC_SYSTEM:()=>HKe,SEMATTRS_THREAD_ID:()=>HYe,SEMATTRS_THREAD_NAME:()=>zYe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>jWe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>GWe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>HWe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>zWe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>$We,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>VWe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>qWe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>KWe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>YWe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>ZWe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>JWe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>UWe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>QWe,SEMRESATTRS_CLOUD_PLATFORM:()=>FWe,SEMRESATTRS_CLOUD_PROVIDER:()=>PWe,SEMRESATTRS_CLOUD_REGION:()=>LWe,SEMRESATTRS_CONTAINER_ID:()=>XWe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>tXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>nXe,SEMRESATTRS_CONTAINER_NAME:()=>WWe,SEMRESATTRS_CONTAINER_RUNTIME:()=>eXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>rXe,SEMRESATTRS_DEVICE_ID:()=>oXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>iXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>aXe,SEMRESATTRS_FAAS_ID:()=>uXe,SEMRESATTRS_FAAS_INSTANCE:()=>lXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>dXe,SEMRESATTRS_FAAS_NAME:()=>sXe,SEMRESATTRS_FAAS_VERSION:()=>cXe,SEMRESATTRS_HOST_ARCH:()=>mXe,SEMRESATTRS_HOST_ID:()=>pXe,SEMRESATTRS_HOST_IMAGE_ID:()=>hXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>gXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>_Xe,SEMRESATTRS_HOST_NAME:()=>fXe,SEMRESATTRS_HOST_TYPE:()=>AXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>EXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>bXe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>UXe,SEMRESATTRS_K8S_CRONJOB_UID:()=>PXe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>wXe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>OXe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>DXe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>xXe,SEMRESATTRS_K8S_JOB_NAME:()=>MXe,SEMRESATTRS_K8S_JOB_UID:()=>kXe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>TXe,SEMRESATTRS_K8S_NODE_NAME:()=>SXe,SEMRESATTRS_K8S_NODE_UID:()=>yXe,SEMRESATTRS_K8S_POD_NAME:()=>CXe,SEMRESATTRS_K8S_POD_UID:()=>IXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>RXe,SEMRESATTRS_K8S_REPLICASET_UID:()=>vXe,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>NXe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>BXe,SEMRESATTRS_OS_DESCRIPTION:()=>QXe,SEMRESATTRS_OS_NAME:()=>FXe,SEMRESATTRS_OS_TYPE:()=>LXe,SEMRESATTRS_OS_VERSION:()=>GXe,SEMRESATTRS_PROCESS_COMMAND:()=>$Xe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>qXe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>VXe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>HXe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>zXe,SEMRESATTRS_PROCESS_OWNER:()=>YXe,SEMRESATTRS_PROCESS_PID:()=>jXe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>ZXe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>KXe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>JXe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>XXe,SEMRESATTRS_SERVICE_NAME:()=>WXe,SEMRESATTRS_SERVICE_NAMESPACE:()=>m5,SEMRESATTRS_SERVICE_VERSION:()=>eet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>oet,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>net,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>tet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>ret,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>set,SEMRESATTRS_WEBENGINE_NAME:()=>iet,SEMRESATTRS_WEBENGINE_VERSION:()=>aet,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Znt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Wnt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Xnt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>trt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>nrt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>rrt,SemanticAttributes:()=>XKe,SemanticResourceAttributes:()=>uet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>rtt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>ott,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>itt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>att,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>stt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>utt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>ctt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ltt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>dtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>ptt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>irt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>art,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>srt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>urt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>crt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>drt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>prt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>frt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Art,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>mrt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>grt,TelemetrySdkLanguageValues:()=>ftt});var Jn=O(()=>{m();Cge();J_e();Z_e();W_e();X_e()});var eEe=F(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.ATTR_PROCESS_RUNTIME_NAME=void 0;y2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var tEe=F(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.SDK_INFO=void 0;var yot=wde(),T2=(Jn(),Me(Ur)),Tot=eEe();I2.SDK_INFO={[T2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Tot.ATTR_PROCESS_RUNTIME_NAME]:"node",[T2.ATTR_TELEMETRY_SDK_LANGUAGE]:T2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[T2.ATTR_TELEMETRY_SDK_VERSION]:yot.VERSION}});var nEe=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 C2=Nde();Object.defineProperty(Zs,"getStringFromEnv",{enumerable:!0,get:function(){return C2.getStringFromEnv}});Object.defineProperty(Zs,"getBooleanFromEnv",{enumerable:!0,get:function(){return C2.getBooleanFromEnv}});Object.defineProperty(Zs,"getNumberFromEnv",{enumerable:!0,get:function(){return C2.getNumberFromEnv}});Object.defineProperty(Zs,"getStringListFromEnv",{enumerable:!0,get:function(){return C2.getStringListFromEnv}});var Iot=Ode();Object.defineProperty(Zs,"_globalThis",{enumerable:!0,get:function(){return Iot._globalThis}});var Cot=tEe();Object.defineProperty(Zs,"SDK_INFO",{enumerable:!0,get:function(){return Cot.SDK_INFO}});Zs.otperformance=performance});var B5=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 BS=nEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return BS.SDK_INFO}});Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return BS._globalThis}});Object.defineProperty(Ws,"otperformance",{enumerable:!0,get:function(){return BS.otperformance}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return BS.getBooleanFromEnv}});Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return BS.getStringFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return BS.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return BS.getStringListFromEnv}})});var aEe=F(io=>{"use strict";m();Object.defineProperty(io,"__esModule",{value:!0});io.addHrTimes=io.isTimeInput=io.isTimeInputHrTime=io.hrTimeToMicroseconds=io.hrTimeToMilliseconds=io.hrTimeToNanoseconds=io.hrTimeToTimeStamp=io.hrTimeDuration=io.timeInputToHrTime=io.hrTime=io.getTimeOrigin=io.millisToHrTime=void 0;var b2=B5(),rEe=9,bot=6,vot=Math.pow(10,bot),v2=Math.pow(10,rEe);function oB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*vot);return[n,r]}io.millisToHrTime=oB;function Rot(){return b2.otperformance.timeOrigin}io.getTimeOrigin=Rot;function oEe(e){let t=oB(b2.otperformance.timeOrigin),n=oB(typeof e=="number"?e:b2.otperformance.now());return iEe(t,n)}io.hrTime=oEe;function xot(e){if(N5(e))return e;if(typeof e=="number")return e<b2.otperformance.timeOrigin?oEe(e):oB(e);if(e instanceof Date)return oB(e.getTime());throw TypeError("Invalid input type")}io.timeInputToHrTime=xot;function Dot(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=v2),[n,r]}io.hrTimeDuration=Dot;function Bot(e){let t=rEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}io.hrTimeToTimeStamp=Bot;function Not(e){return e[0]*v2+e[1]}io.hrTimeToNanoseconds=Not;function Oot(e){return e[0]*1e3+e[1]/1e6}io.hrTimeToMilliseconds=Oot;function wot(e){return e[0]*1e6+e[1]/1e3}io.hrTimeToMicroseconds=wot;function N5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}io.isTimeInputHrTime=N5;function kot(e){return N5(e)||typeof e=="number"||e instanceof Date}io.isTimeInput=kot;function iEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=v2&&(n[1]-=v2,n[0]+=1),n}io.addHrTimes=iEe});var sEe=F(R2=>{"use strict";m();Object.defineProperty(R2,"__esModule",{value:!0});R2.unrefTimer=void 0;function Mot(e){typeof e!="number"&&e.unref()}R2.unrefTimer=Mot});var uEe=F(iB=>{"use strict";m();Object.defineProperty(iB,"__esModule",{value:!0});iB.ExportResultCode=void 0;var Pot;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(Pot=iB.ExportResultCode||(iB.ExportResultCode={}))});var lEe=F(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.CompositePropagator=void 0;var cEe=(Ge(),Me(We)),O5=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){cEe.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){cEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};x2.CompositePropagator=O5});var dEe=F(VC=>{"use strict";m();Object.defineProperty(VC,"__esModule",{value:!0});VC.validateValue=VC.validateKey=void 0;var w5="[_0-9a-z-*/]",Uot=`[a-z]${w5}{0,255}`,Lot=`[a-z0-9]${w5}{0,240}@[a-z]${w5}{0,13}`,Qot=new RegExp(`^(?:${Uot}|${Lot})$`),Fot=/^[ -~]{0,255}[!-~]$/,Got=/,|=/;function jot(e){return Qot.test(e)}VC.validateKey=jot;function Hot(e){return Fot.test(e)&&!Got.test(e)}VC.validateValue=Hot});var M5=F(D2=>{"use strict";m();Object.defineProperty(D2,"__esModule",{value:!0});D2.TraceState=void 0;var pEe=dEe(),fEe=32,zot=512,AEe=",",mEe="=",k5=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+mEe+this.get(n)),t),[]).join(AEe)}_parse(t){t.length>zot||(this._internalState=t.split(AEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(mEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,pEe.validateKey)(a)&&(0,pEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>fEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,fEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};D2.TraceState=k5});var hEe=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 B2=(Ge(),Me(We)),$ot=nB(),Vot=M5();Xs.TRACE_PARENT_HEADER="traceparent";Xs.TRACE_STATE_HEADER="tracestate";var qot="00",Yot="(?!ff)[\\da-f]{2}",Kot="(?![0]{32})[\\da-f]{32}",Jot="(?![0]{16})[\\da-f]{16}",Zot="[\\da-f]{2}",Wot=new RegExp(`^\\s?(${Yot})-(${Kot})-(${Jot})-(${Zot})(-.*)?\\s?$`);function gEe(e){let t=Wot.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Xs.parseTraceParent=gEe;var P5=class{inject(t,n,r){let o=B2.trace.getSpanContext(t);if(!o||(0,$ot.isTracingSuppressed)(t)||!(0,B2.isSpanContextValid)(o))return;let i=`${qot}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||B2.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=gEe(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 Vot.TraceState(typeof d=="string"?d:void 0)}return B2.trace.setSpanContext(t,a)}fields(){return[Xs.TRACE_PARENT_HEADER,Xs.TRACE_STATE_HEADER]}};Xs.W3CTraceContextPropagator=P5});var _Ee=F(qp=>{"use strict";m();Object.defineProperty(qp,"__esModule",{value:!0});qp.getRPCMetadata=qp.deleteRPCMetadata=qp.setRPCMetadata=qp.RPCType=void 0;var Xot=(Ge(),Me(We)),U5=(0,Xot.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),eit;(function(e){e.HTTP="http"})(eit=qp.RPCType||(qp.RPCType={}));function tit(e,t){return e.setValue(U5,t)}qp.setRPCMetadata=tit;function nit(e){return e.deleteValue(U5)}qp.deleteRPCMetadata=nit;function rit(e){return e.getValue(U5)}qp.getRPCMetadata=rit});var IEe=F(N2=>{"use strict";m();Object.defineProperty(N2,"__esModule",{value:!0});N2.isPlainObject=void 0;var oit="[object Object]",iit="[object Null]",ait="[object Undefined]",sit=Function.prototype,EEe=sit.toString,uit=EEe.call(Object),cit=Object.getPrototypeOf,SEe=Object.prototype,yEe=SEe.hasOwnProperty,NS=Symbol?Symbol.toStringTag:void 0,TEe=SEe.toString;function lit(e){if(!dit(e)||pit(e)!==oit)return!1;let t=cit(e);if(t===null)return!0;let n=yEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&EEe.call(n)===uit}N2.isPlainObject=lit;function dit(e){return e!=null&&typeof e=="object"}function pit(e){return e==null?e===void 0?ait:iit:NS&&NS in Object(e)?fit(e):Ait(e)}function fit(e){let t=yEe.call(e,NS),n=e[NS],r=!1;try{e[NS]=void 0,r=!0}catch{}let o=TEe.call(e);return r&&(t?e[NS]=n:delete e[NS]),o}function Ait(e){return TEe.call(e)}});var xEe=F(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.merge=void 0;var CEe=IEe(),mit=20;function git(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=vEe(t,e.shift(),0,n);return t}k2.merge=git;function L5(e){return w2(e)?e.slice():e}function vEe(e,t,n=0,r){let o;if(!(n>mit)){if(n++,O2(e)||O2(t)||REe(t))o=L5(t);else if(w2(e)){if(o=e.slice(),w2(t))for(let i=0,a=t.length;i<a;i++)o.push(L5(t[i]));else if(aB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=L5(t[d])}}}else if(aB(e))if(aB(t)){if(!hit(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(O2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(bEe(e,d,r)||bEe(t,d,r))delete o[d];else{if(aB(h)&&aB(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]=vEe(o[d],g,n,r)}}}}else o=t;return o}}function bEe(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 w2(e){return Array.isArray(e)}function REe(e){return typeof e=="function"}function aB(e){return!O2(e)&&!w2(e)&&!REe(e)&&typeof e=="object"}function O2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function hit(e,t){return!(!(0,CEe.isPlainObject)(e)||!(0,CEe.isPlainObject)(t))}});var DEe=F(qC=>{"use strict";m();Object.defineProperty(qC,"__esModule",{value:!0});qC.callWithTimeout=qC.TimeoutError=void 0;var M2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};qC.TimeoutError=M2;function _it(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new M2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}qC.callWithTimeout=_it});var NEe=F(YC=>{"use strict";m();Object.defineProperty(YC,"__esModule",{value:!0});YC.isUrlIgnored=YC.urlMatches=void 0;function BEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}YC.urlMatches=BEe;function Eit(e,t){if(!t)return!1;for(let n of t)if(BEe(e,n))return!0;return!1}YC.isUrlIgnored=Eit});var OEe=F(P2=>{"use strict";m();Object.defineProperty(P2,"__esModule",{value:!0});P2.Deferred=void 0;var Q5=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=Q5});var wEe=F(U2=>{"use strict";m();Object.defineProperty(U2,"__esModule",{value:!0});U2.BindOnceFuture=void 0;var Sit=OEe(),F5=class{_isCalled=!1;_deferred=new Sit.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}};U2.BindOnceFuture=F5});var MEe=F(L2=>{"use strict";m();Object.defineProperty(L2,"__esModule",{value:!0});L2.diagLogLevelFromString=void 0;var rg=(Ge(),Me(We)),kEe={ALL:rg.DiagLogLevel.ALL,VERBOSE:rg.DiagLogLevel.VERBOSE,DEBUG:rg.DiagLogLevel.DEBUG,INFO:rg.DiagLogLevel.INFO,WARN:rg.DiagLogLevel.WARN,ERROR:rg.DiagLogLevel.ERROR,NONE:rg.DiagLogLevel.NONE};function yit(e){if(e==null)return;let t=kEe[e.toUpperCase()];return t??(rg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(kEe)}, using default`),rg.DiagLogLevel.INFO)}L2.diagLogLevelFromString=yit});var UEe=F(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2._export=void 0;var PEe=(Ge(),Me(We)),Tit=nB();function Iit(e,t){return new Promise(n=>{PEe.context.with((0,Tit.suppressTracing)(PEe.context.active()),()=>{e.export(t,n)})})}Q2._export=Iit});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 Cit=Ede();Object.defineProperty(Oe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Cit.W3CBaggagePropagator}});var bit=Sde();Object.defineProperty(Oe,"AnchoredClock",{enumerable:!0,get:function(){return bit.AnchoredClock}});var LEe=bde();Object.defineProperty(Oe,"isAttributeValue",{enumerable:!0,get:function(){return LEe.isAttributeValue}});Object.defineProperty(Oe,"sanitizeAttributes",{enumerable:!0,get:function(){return LEe.sanitizeAttributes}});var QEe=Rde();Object.defineProperty(Oe,"globalErrorHandler",{enumerable:!0,get:function(){return QEe.globalErrorHandler}});Object.defineProperty(Oe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return QEe.setGlobalErrorHandler}});var vit=e5();Object.defineProperty(Oe,"loggingErrorHandler",{enumerable:!0,get:function(){return vit.loggingErrorHandler}});var Dd=aEe();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 Rit=sEe();Object.defineProperty(Oe,"unrefTimer",{enumerable:!0,get:function(){return Rit.unrefTimer}});var xit=uEe();Object.defineProperty(Oe,"ExportResultCode",{enumerable:!0,get:function(){return xit.ExportResultCode}});var Dit=K$();Object.defineProperty(Oe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Dit.parseKeyPairsIntoRecord}});var OS=B5();Object.defineProperty(Oe,"SDK_INFO",{enumerable:!0,get:function(){return OS.SDK_INFO}});Object.defineProperty(Oe,"_globalThis",{enumerable:!0,get:function(){return OS._globalThis}});Object.defineProperty(Oe,"getStringFromEnv",{enumerable:!0,get:function(){return OS.getStringFromEnv}});Object.defineProperty(Oe,"getBooleanFromEnv",{enumerable:!0,get:function(){return OS.getBooleanFromEnv}});Object.defineProperty(Oe,"getNumberFromEnv",{enumerable:!0,get:function(){return OS.getNumberFromEnv}});Object.defineProperty(Oe,"getStringListFromEnv",{enumerable:!0,get:function(){return OS.getStringListFromEnv}});Object.defineProperty(Oe,"otperformance",{enumerable:!0,get:function(){return OS.otperformance}});var Bit=lEe();Object.defineProperty(Oe,"CompositePropagator",{enumerable:!0,get:function(){return Bit.CompositePropagator}});var F2=hEe();Object.defineProperty(Oe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return F2.TRACE_PARENT_HEADER}});Object.defineProperty(Oe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return F2.TRACE_STATE_HEADER}});Object.defineProperty(Oe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return F2.W3CTraceContextPropagator}});Object.defineProperty(Oe,"parseTraceParent",{enumerable:!0,get:function(){return F2.parseTraceParent}});var G2=_Ee();Object.defineProperty(Oe,"RPCType",{enumerable:!0,get:function(){return G2.RPCType}});Object.defineProperty(Oe,"deleteRPCMetadata",{enumerable:!0,get:function(){return G2.deleteRPCMetadata}});Object.defineProperty(Oe,"getRPCMetadata",{enumerable:!0,get:function(){return G2.getRPCMetadata}});Object.defineProperty(Oe,"setRPCMetadata",{enumerable:!0,get:function(){return G2.setRPCMetadata}});var G5=nB();Object.defineProperty(Oe,"isTracingSuppressed",{enumerable:!0,get:function(){return G5.isTracingSuppressed}});Object.defineProperty(Oe,"suppressTracing",{enumerable:!0,get:function(){return G5.suppressTracing}});Object.defineProperty(Oe,"unsuppressTracing",{enumerable:!0,get:function(){return G5.unsuppressTracing}});var Nit=M5();Object.defineProperty(Oe,"TraceState",{enumerable:!0,get:function(){return Nit.TraceState}});var Oit=xEe();Object.defineProperty(Oe,"merge",{enumerable:!0,get:function(){return Oit.merge}});var FEe=DEe();Object.defineProperty(Oe,"TimeoutError",{enumerable:!0,get:function(){return FEe.TimeoutError}});Object.defineProperty(Oe,"callWithTimeout",{enumerable:!0,get:function(){return FEe.callWithTimeout}});var GEe=NEe();Object.defineProperty(Oe,"isUrlIgnored",{enumerable:!0,get:function(){return GEe.isUrlIgnored}});Object.defineProperty(Oe,"urlMatches",{enumerable:!0,get:function(){return GEe.urlMatches}});var wit=wEe();Object.defineProperty(Oe,"BindOnceFuture",{enumerable:!0,get:function(){return wit.BindOnceFuture}});var kit=MEe();Object.defineProperty(Oe,"diagLogLevelFromString",{enumerable:!0,get:function(){return kit.diagLogLevelFromString}});var Mit=UEe();Oe.internal={_export:Mit._export}});var jEe=F(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.VERSION=void 0;j2.VERSION="0.214.0"});var HEe=F(sB=>{"use strict";m();Object.defineProperty(sB,"__esModule",{value:!0});sB.SeverityNumber=void 0;var Pit;(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"})(Pit=sB.SeverityNumber||(sB.SeverityNumber={}))});var z2=F(KC=>{"use strict";m();Object.defineProperty(KC,"__esModule",{value:!0});KC.NOOP_LOGGER=KC.NoopLogger=void 0;var H2=class{emit(t){}};KC.NoopLogger=H2;KC.NOOP_LOGGER=new H2});var zEe=F(lA=>{"use strict";m();Object.defineProperty(lA,"__esModule",{value:!0});lA.API_BACKWARDS_COMPATIBILITY_VERSION=lA.makeGetter=lA._global=lA.GLOBAL_LOGS_API_KEY=void 0;lA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");lA._global=globalThis;function Uit(e,t,n){return r=>r===e?t:n}lA.makeGetter=Uit;lA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var j5=F(JC=>{"use strict";m();Object.defineProperty(JC,"__esModule",{value:!0});JC.NOOP_LOGGER_PROVIDER=JC.NoopLoggerProvider=void 0;var Lit=z2(),$2=class{getLogger(t,n,r){return new Lit.NoopLogger}};JC.NoopLoggerProvider=$2;JC.NOOP_LOGGER_PROVIDER=new $2});var $Ee=F(V2=>{"use strict";m();Object.defineProperty(V2,"__esModule",{value:!0});V2.ProxyLogger=void 0;var Qit=z2(),H5=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):Qit.NOOP_LOGGER}};V2.ProxyLogger=H5});var VEe=F(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.ProxyLoggerProvider=void 0;var Fit=j5(),Git=$Ee(),z5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Git.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Fit.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)}};q2.ProxyLoggerProvider=z5});var YEe=F(Y2=>{"use strict";m();Object.defineProperty(Y2,"__esModule",{value:!0});Y2.LogsAPI=void 0;var Bd=zEe(),jit=j5(),qEe=VEe(),$5=class e{constructor(){this._proxyLoggerProvider=new qEe.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,jit.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 qEe.ProxyLoggerProvider}};Y2.LogsAPI=$5});var V5=F(dA=>{"use strict";m();Object.defineProperty(dA,"__esModule",{value:!0});dA.logs=dA.NoopLogger=dA.NOOP_LOGGER=dA.SeverityNumber=void 0;var Hit=HEe();Object.defineProperty(dA,"SeverityNumber",{enumerable:!0,get:function(){return Hit.SeverityNumber}});var KEe=z2();Object.defineProperty(dA,"NOOP_LOGGER",{enumerable:!0,get:function(){return KEe.NOOP_LOGGER}});Object.defineProperty(dA,"NoopLogger",{enumerable:!0,get:function(){return KEe.NoopLogger}});var zit=YEe();dA.logs=zit.LogsAPI.getInstance()});var JEe=F(ZC=>{"use strict";m();Object.defineProperty(ZC,"__esModule",{value:!0});ZC.disableInstrumentations=ZC.enableInstrumentations=void 0;function $it(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()}}ZC.enableInstrumentations=$it;function Vit(e){e.forEach(t=>t.disable())}ZC.disableInstrumentations=Vit});var XEe=F(K2=>{"use strict";m();Object.defineProperty(K2,"__esModule",{value:!0});K2.registerInstrumentations=void 0;var ZEe=(Ge(),Me(We)),qit=V5(),WEe=JEe();function Yit(e){let t=e.tracerProvider||ZEe.trace.getTracerProvider(),n=e.meterProvider||ZEe.metrics.getMeterProvider(),r=e.loggerProvider||qit.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,WEe.enableInstrumentations)(o,t,n,r),()=>{(0,WEe.disableInstrumentations)(o)}}K2.registerInstrumentations=Yit});var u0e=F(J2=>{"use strict";m();Object.defineProperty(J2,"__esModule",{value:!0});J2.satisfies=void 0;var J5=(Ge(),Me(We)),o0e=/^(?: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-]+)*))?$/,Kit=/^(?<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-]+)*))?$/,Jit={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Zit(e,t,n){if(!Wit(e))return J5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=nat(e);if(!r)return!1;let o=[],i=i0e(r,t,o,n);return i&&!n?.includePrerelease?eat(r,o):i}J2.satisfies=Zit;function Wit(e){return typeof e=="string"&&o0e.test(e)}function i0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(q5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Iat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!q5(e,i,n,r))return!1;return!0}return q5(e,t,n,r)}function q5(e,t,n,r){if(t=tat(t,r),t.includes(" "))return i0e(e,t,n,r);{let o=rat(t);return n.push(o),Xit(e,o)}}function Xit(e,t){if(t.invalid)return!1;if(!t.version||K5(t.version))return!0;let n=t0e(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=t0e(r,o)}return Jit[t.op]?.includes(n)}function eat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function tat(e,t){return e=e.trim(),e=yat(e,t),e=Sat(e),e=Tat(e,t),e=e.trim(),e}function wu(e){return!e||e.toLowerCase()==="x"||e==="*"}function nat(e){let t=e.match(o0e);if(!t){J5.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 rat(e){if(!e)return{};let t=e.match(Kit);if(!t)return J5.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 K5(e){return e==="*"||e==="x"||e==="X"}function e0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function oat(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 iat(e,t){if(K5(e)||K5(t))return 0;let[n,r]=oat(e0e(e),e0e(t));return n>r?1:n<r?-1:0}function t0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=iat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var a0e="[a-zA-Z0-9-]",s0e="0|[1-9]\\d*",aat=`\\d*[a-zA-Z-]${a0e}*`,sat="((?:<|>)?=?)",n0e=`(?:${s0e}|${aat})`,uat=`(?:-(${n0e}(?:\\.${n0e})*))`,r0e=`${a0e}+`,cat=`(?:\\+(${r0e}(?:\\.${r0e})*))`,Y5=`${s0e}|x|X|\\*`,uB=`[v=\\s]*(${Y5})(?:\\.(${Y5})(?:\\.(${Y5})(?:${uat})?${cat}?)?)?`,lat=`^${sat}\\s*${uB}$`,dat=new RegExp(lat),pat=`^\\s*(${uB})\\s+-\\s+(${uB})\\s*$`,fat=new RegExp(pat),Aat="(?:~>?)",mat=`^${Aat}${uB}$`,gat=new RegExp(mat),hat="(?:\\^)",_at=`^${hat}${uB}$`,Eat=new RegExp(_at);function Sat(e){let t=gat;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 yat(e,t){let n=Eat,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 Tat(e,t){let n=dat;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 Iat(e,t){let n=fat;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 Z5=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 cB(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 Cat=(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 cB(o,"__original",r),cB(o,"__unwrap",()=>{e[t]===o&&cB(e,t,r)}),cB(o,"__wrapped",!0),cB(e,t,o),o};Ts.wrap=Cat;var bat=(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=bat;var vat=(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=vat;var Rat=(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=Rat;function lB(e){e&&e.logger&&(typeof e.logger!="function"?ku("new logger isn't a function, not replacing"):ku=e.logger)}Ts.default=lB;lB.wrap=Ts.wrap;lB.massWrap=Ts.massWrap;lB.unwrap=Ts.unwrap;lB.massUnwrap=Ts.massUnwrap});var c0e=F(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.InstrumentationAbstract=void 0;var W5=(Ge(),Me(We)),xat=V5(),Z2=Z5(),X5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=W5.diag.createComponentLogger({namespace:t}),this._tracer=W5.trace.getTracer(t,n),this._meter=W5.metrics.getMeter(t,n),this._logger=xat.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z2.wrap;_unwrap=Z2.unwrap;_massWrap=Z2.massWrap;_massUnwrap=Z2.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)}}};W2.InstrumentationAbstract=X5});var d0e=F((s7t,l0e)=>{m();var WC=1e3,XC=WC*60,eb=XC*60,wS=eb*24,Dat=wS*7,Bat=wS*365.25;l0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Nat(e);if(n==="number"&&isFinite(e))return t.long?wat(e):Oat(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Nat(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*Bat;case"weeks":case"week":case"w":return n*Dat;case"days":case"day":case"d":return n*wS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*eb;case"minutes":case"minute":case"mins":case"min":case"m":return n*XC;case"seconds":case"second":case"secs":case"sec":case"s":return n*WC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Oat(e){var t=Math.abs(e);return t>=wS?Math.round(e/wS)+"d":t>=eb?Math.round(e/eb)+"h":t>=XC?Math.round(e/XC)+"m":t>=WC?Math.round(e/WC)+"s":e+"ms"}function wat(e){var t=Math.abs(e);return t>=wS?X2(e,t,wS,"day"):t>=eb?X2(e,t,eb,"hour"):t>=XC?X2(e,t,XC,"minute"):t>=WC?X2(e,t,WC,"second"):e+" ms"}function X2(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e9=F((c7t,p0e)=>{m();function kat(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=d0e(),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}p0e.exports=kat});var f0e=F((xc,eU)=>{m();xc.formatArgs=Pat;xc.save=Uat;xc.load=Lat;xc.useColors=Mat;xc.storage=Qat();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 Mat(){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 Pat(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+eU.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 Uat(e){try{e?xc.storage.setItem("debug",e):xc.storage.removeItem("debug")}catch{}}function Lat(){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 Qat(){try{return localStorage}catch{}}eU.exports=e9()(xc);var{formatters:Fat}=eU.exports;Fat.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var m0e=F((p7t,A0e)=>{"use strict";m();A0e.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 _0e=F((A7t,h0e)=>{"use strict";m();var Gat=Fe("os"),g0e=Fe("tty"),Nd=m0e(),{env:Va}=process,n_;Nd("no-color")||Nd("no-colors")||Nd("color=false")||Nd("color=never")?n_=0:(Nd("color")||Nd("colors")||Nd("color=true")||Nd("color=always"))&&(n_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?n_=1:Va.FORCE_COLOR==="false"?n_=0:n_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function t9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n9(e,t){if(n_===0)return 0;if(Nd("color=16m")||Nd("color=full")||Nd("color=truecolor"))return 3;if(Nd("color=256"))return 2;if(e&&!t&&n_===void 0)return 0;let n=n_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Gat.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 jat(e){let t=n9(e,e&&e.isTTY);return t9(t)}h0e.exports={supportsColor:jat,stdout:t9(n9(!0,g0e.isatty(1))),stderr:t9(n9(!0,g0e.isatty(2)))}});var S0e=F((qa,nU)=>{m();var Hat=Fe("tty"),tU=Fe("util");qa.init=Jat;qa.log=qat;qa.formatArgs=$at;qa.save=Yat;qa.load=Kat;qa.useColors=zat;qa.destroy=tU.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=_0e();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 zat(){return"colors"in qa.inspectOpts?!!qa.inspectOpts.colors:Hat.isatty(process.stderr.fd)}function $at(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+"+nU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Vat()+t+" "+e[0]}function Vat(){return qa.inspectOpts.hideDate?"":new Date().toISOString()+" "}function qat(...e){return process.stderr.write(tU.formatWithOptions(qa.inspectOpts,...e)+`
|
|
6
6
|
`)}function Yat(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Kat(){return process.env.DEBUG}function Jat(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]]}nU.exports=e9()(qa);var{formatters:E0e}=nU.exports;E0e.o=function(e){return this.inspectOpts.colors=this.useColors,tU.inspect(e,this.inspectOpts).split(`
|
|
@@ -35,7 +35,7 @@ Url: ${fL(e)}`),!0}return!1}function plt(e,t){return t?.length?uL(e).some(n=>p_(
|
|
|
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,vN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),oe=>oe&&this._diag.error("caught ignoreRequestHook error: ",oe),!0))return;let i=(0,n4.hrTime)(),a;try{a=new ght.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,vN.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=Pl.context.active(),k=Pl.trace.getSpan(N),Q;n.requireParentforSpans&&(!k||!Pl.trace.isSpanContextValid(k.spanContext()))?Q=Pl.trace.wrapSpanContext(Pl.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:Pl.SpanKind.CLIENT,attributes:g},N),(0,vN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),oe=>oe&&this._diag.error("caught requestHook error: ",oe),!0);let j=Pl.trace.setSpan(Pl.context.active(),Q),G={};Pl.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,vN.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?Pl.SpanStatusCode.ERROR:Pl.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:Pl.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,n4.hrTimeToMilliseconds)((0,n4.hrTimeDuration)(n,(0,n4.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"}};r4.UndiciInstrumentation=PY});var Txe=F(o4=>{"use strict";m();Object.defineProperty(o4,"__esModule",{value:!0});o4.UndiciInstrumentation=void 0;var hht=yxe();Object.defineProperty(o4,"UndiciInstrumentation",{enumerable:!0,get:function(){return hht.UndiciInstrumentation}})});function Ixe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function yht(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&xi(t)}function Tht(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=Ixe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=Ixe(n.origin,n.path);if(r.startsWith("data:")){let o=Ob(r);return{[kt]:"auto.http.otel.node_fetch","http.url":o,[h_]:o,[Md]:`${n.method||"GET"} ${o}`}}return{[kt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var Cxe,bxe,_ht,Eht,Sht,vxe,Rxe=O(()=>{m();Cxe=ie(Txe(),1);dt();mr();bxe="NodeFetch",_ht=st(bxe,Cxe.UndiciInstrumentation,e=>Tht(e)),Eht=st(`${bxe}.sentry`,ny,e=>e),Sht=(e={})=>({name:"NodeFetch",setupOnce(){yht(e,gt()?.getOptions())&&_ht(e),Eht(e)}}),vxe=Sht});var i4=F(RN=>{"use strict";m();Object.defineProperty(RN,"__esModule",{value:!0});RN.ExpressLayerType=void 0;var Iht;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Iht=RN.ExpressLayerType||(RN.ExpressLayerType={}))});var a4=F(xN=>{"use strict";m();Object.defineProperty(xN,"__esModule",{value:!0});xN.AttributeNames=void 0;var Cht;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(Cht=xN.AttributeNames||(xN.AttributeNames={}))});var UY=F(cv=>{"use strict";m();Object.defineProperty(cv,"__esModule",{value:!0});cv._LAYERS_STORE_PROPERTY=cv.kLayerPatched=void 0;cv.kLayerPatched=Symbol("express-layer-patched");cv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Bxe=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 LY=i4(),lv=a4(),uy=UY(),bht=(e,t)=>(Array.isArray(e[uy._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,uy._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[uy._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Wi.storeLayerPath=bht;var vht=(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=vht;var Rht=(e,t,n)=>{if(t.name==="router"){let r=(0,Wi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[lv.AttributeNames.EXPRESS_NAME]:o,[lv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[lv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[lv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[lv.AttributeNames.EXPRESS_NAME]:t.name,[lv.AttributeNames.EXPRESS_TYPE]:LY.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Wi.getLayerMetadata=Rht;var xht=(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")},Dht=(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(xht(e,r))return!0}catch{}return!1};Wi.isLayerIgnored=Dht;var Bht=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Wi.asErrorAndMessage=Bht;var Nht=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>xxe(n)||"").join(","):xxe(t)};Wi.getLayerPath=Nht;var xxe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Dxe(e){let n=(Array.isArray(e[uy._LAYERS_STORE_PROPERTY])?e[uy._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Wi.getConstructedRoute=Dxe;function Oht(e){let t=Array.isArray(e[uy._LAYERS_STORE_PROPERTY])?e[uy._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Dxe(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)||wht(r))?r:void 0}Wi.getActualMatchedRoute=Oht;function wht(e){return e.includes(":")||e.includes("*")}});var Nxe=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-express"});var Pxe=F(u4=>{"use strict";m();Object.defineProperty(u4,"__esModule",{value:!0});u4.ExpressInstrumentation=void 0;var Oxe=Tr(),Mc=(Ge(),Me(We)),wxe=i4(),kxe=a4(),NA=Bxe(),Mxe=Nxe(),pv=rn(),kht=(Jn(),Me(Ur)),s4=UY(),QY=class extends pv.InstrumentationBase{constructor(t={}){super(Mxe.PACKAGE_NAME,Mxe.PACKAGE_VERSION,t)}init(){return[new pv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,pv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,pv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,pv.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,NA.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,NA.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,NA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[s4.kLayerPatched]!==!0&&(t[s4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,NA.storeLayerPath)(a,n),g=(0,NA.getConstructedRoute)(a),h=(0,NA.getActualMatchedRoute)(a),S={[kht.ATTR_HTTP_ROUTE]:h},y=(0,NA.getLayerMetadata)(g,t,n),C=y.attributes[kxe.AttributeNames.EXPRESS_TYPE],v=(0,Oxe.getRPCMetadata)(Mc.context.active());if(v?.type===Oxe.RPCType.HTTP&&(v.route=h),(0,NA.isLayerIgnored)(y.name,C,r.getConfig()))return C===wxe.ExpressLayerType.MIDDLEWARE&&a[s4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Mc.trace.getSpan(Mc.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=Mc.context.active(),Q=Mc.trace.setSpan(k,N),{requestHook:j}=r.getConfig();j&&(0,pv.safeExecuteInTheMiddle)(()=>j(N,{request:a,layerType:C,route:g}),ye=>{ye&&Mc.diag.error("express instrumentation: request hook failed",ye)},!0);let G=!1;y.attributes[kxe.AttributeNames.EXPRESS_TYPE]===wxe.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[dn,xe]=(0,NA.asErrorAndMessage)(ye);N.recordException(dn),N.setStatus({code:Mc.SpanStatusCode.ERROR,message:xe})}G===!1&&(G=!0,a.res?.removeListener("finish",q),N.end()),!(a.route&&be)&&d&&a[s4._LAYERS_STORE_PROPERTY].pop();let Xe=oe[ge],wt=Mc.context.active(),nt=Mc.trace.getSpan(k),$t=nt?Mc.trace.setSpan(wt,nt):wt;return Mc.context.bind($t,Xe).apply(this,arguments)});try{return Mc.context.bind(Q,o).apply(this,arguments)}catch(ye){let[be,Xe]=(0,NA.asErrorAndMessage)(ye);throw N.recordException(be),N.setStatus({code:Mc.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 Mc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};u4.ExpressInstrumentation=QY});var Uxe=F(Q_=>{"use strict";m();Object.defineProperty(Q_,"__esModule",{value:!0});Q_.AttributeNames=Q_.ExpressLayerType=Q_.ExpressInstrumentation=void 0;var Mht=Pxe();Object.defineProperty(Q_,"ExpressInstrumentation",{enumerable:!0,get:function(){return Mht.ExpressInstrumentation}});var Pht=i4();Object.defineProperty(Q_,"ExpressLayerType",{enumerable:!0,get:function(){return Pht.ExpressLayerType}});var Uht=a4();Object.defineProperty(Q_,"AttributeNames",{enumerable:!0,get:function(){return Uht.AttributeNames}})});var Ta,cy=O(()=>{m();Ta=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function Lht(e){Lr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Zt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function Qht(e,t){if(Cn()===kd())return Ta&&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";Cn().setTransactionName(`${r} ${e.route}`)}return t}var Lxe,Qxe,Fxe,Fht,Gxe,jxe=O(()=>{m();Lxe=ie(Uxe(),1);dt();mr();cy();Qxe="Express";Fxe=st(Qxe,()=>new Lxe.ExpressInstrumentation({requestHook:e=>Lht(e),spanNameHook:(e,t)=>Qht(e,t)})),Fht=()=>({name:Qxe,setupOnce(){Fxe()}}),Gxe=Fht});var Hxe=F(DN=>{"use strict";m();Object.defineProperty(DN,"__esModule",{value:!0});DN.SeverityNumber=void 0;var Ght;(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"})(Ght=DN.SeverityNumber||(DN.SeverityNumber={}))});var d4=F(fv=>{"use strict";m();Object.defineProperty(fv,"__esModule",{value:!0});fv.NOOP_LOGGER=fv.NoopLogger=void 0;var l4=class{emit(t){}};fv.NoopLogger=l4;fv.NOOP_LOGGER=new l4});var zxe=F(OA=>{"use strict";m();Object.defineProperty(OA,"__esModule",{value:!0});OA.API_BACKWARDS_COMPATIBILITY_VERSION=OA.makeGetter=OA._global=OA.GLOBAL_LOGS_API_KEY=void 0;OA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");OA._global=globalThis;function jht(e,t,n){return r=>r===e?t:n}OA.makeGetter=jht;OA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var FY=F(Av=>{"use strict";m();Object.defineProperty(Av,"__esModule",{value:!0});Av.NOOP_LOGGER_PROVIDER=Av.NoopLoggerProvider=void 0;var Hht=d4(),p4=class{getLogger(t,n,r){return new Hht.NoopLogger}};Av.NoopLoggerProvider=p4;Av.NOOP_LOGGER_PROVIDER=new p4});var $xe=F(f4=>{"use strict";m();Object.defineProperty(f4,"__esModule",{value:!0});f4.ProxyLogger=void 0;var zht=d4(),GY=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):zht.NOOP_LOGGER}};f4.ProxyLogger=GY});var Vxe=F(A4=>{"use strict";m();Object.defineProperty(A4,"__esModule",{value:!0});A4.ProxyLoggerProvider=void 0;var $ht=FY(),Vht=$xe(),jY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Vht.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:$ht.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)}};A4.ProxyLoggerProvider=jY});var Yxe=F(m4=>{"use strict";m();Object.defineProperty(m4,"__esModule",{value:!0});m4.LogsAPI=void 0;var Gd=zxe(),qht=FY(),qxe=Vxe(),HY=class e{constructor(){this._proxyLoggerProvider=new qxe.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,qht.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 qxe.ProxyLoggerProvider}};m4.LogsAPI=HY});var zY=F(wA=>{"use strict";m();Object.defineProperty(wA,"__esModule",{value:!0});wA.logs=wA.NoopLogger=wA.NOOP_LOGGER=wA.SeverityNumber=void 0;var Yht=Hxe();Object.defineProperty(wA,"SeverityNumber",{enumerable:!0,get:function(){return Yht.SeverityNumber}});var Kxe=d4();Object.defineProperty(wA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Kxe.NOOP_LOGGER}});Object.defineProperty(wA,"NoopLogger",{enumerable:!0,get:function(){return Kxe.NoopLogger}});var Kht=Yxe();wA.logs=Kht.LogsAPI.getInstance()});var Jxe=F(mv=>{"use strict";m();Object.defineProperty(mv,"__esModule",{value:!0});mv.disableInstrumentations=mv.enableInstrumentations=void 0;function Jht(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()}}mv.enableInstrumentations=Jht;function Zht(e){e.forEach(t=>t.disable())}mv.disableInstrumentations=Zht});var Xxe=F(g4=>{"use strict";m();Object.defineProperty(g4,"__esModule",{value:!0});g4.registerInstrumentations=void 0;var Zxe=(Ge(),Me(We)),Wht=zY(),Wxe=Jxe();function Xht(e){let t=e.tracerProvider||Zxe.trace.getTracerProvider(),n=e.meterProvider||Zxe.metrics.getMeterProvider(),r=e.loggerProvider||Wht.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Wxe.enableInstrumentations)(o,t,n,r),()=>{(0,Wxe.disableInstrumentations)(o)}}g4.registerInstrumentations=Xht});var uDe=F(h4=>{"use strict";m();Object.defineProperty(h4,"__esModule",{value:!0});h4.satisfies=void 0;var YY=(Ge(),Me(We)),oDe=/^(?: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-]+)*))?$/,e_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-]+)*))?$/,t_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function n_t(e,t,n){if(!r_t(e))return YY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=s_t(e);if(!r)return!1;let o=[],i=iDe(r,t,o,n);return i&&!n?.includePrerelease?i_t(r,o):i}h4.satisfies=n_t;function r_t(e){return typeof e=="string"&&oDe.test(e)}function iDe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if($Y(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=x_t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!$Y(e,i,n,r))return!1;return!0}return $Y(e,t,n,r)}function $Y(e,t,n,r){if(t=a_t(t,r),t.includes(" "))return iDe(e,t,n,r);{let o=u_t(t);return n.push(o),o_t(e,o)}}function o_t(e,t){if(t.invalid)return!1;if(!t.version||qY(t.version))return!0;let n=tDe(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=tDe(r,o)}return t_t[t.op]?.includes(n)}function i_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function a_t(e,t){return e=e.trim(),e=v_t(e,t),e=b_t(e),e=R_t(e,t),e=e.trim(),e}function Gu(e){return!e||e.toLowerCase()==="x"||e==="*"}function s_t(e){let t=e.match(oDe);if(!t){YY.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 u_t(e){if(!e)return{};let t=e.match(e_t);if(!t)return YY.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 qY(e){return e==="*"||e==="x"||e==="X"}function eDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function c_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 l_t(e,t){if(qY(e)||qY(t))return 0;let[n,r]=c_t(eDe(e),eDe(t));return n>r?1:n<r?-1:0}function tDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=l_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var aDe="[a-zA-Z0-9-]",sDe="0|[1-9]\\d*",d_t=`\\d*[a-zA-Z-]${aDe}*`,p_t="((?:<|>)?=?)",nDe=`(?:${sDe}|${d_t})`,f_t=`(?:-(${nDe}(?:\\.${nDe})*))`,rDe=`${aDe}+`,A_t=`(?:\\+(${rDe}(?:\\.${rDe})*))`,VY=`${sDe}|x|X|\\*`,BN=`[v=\\s]*(${VY})(?:\\.(${VY})(?:\\.(${VY})(?:${f_t})?${A_t}?)?)?`,m_t=`^${p_t}\\s*${BN}$`,g_t=new RegExp(m_t),h_t=`^\\s*(${BN})\\s+-\\s+(${BN})\\s*$`,__t=new RegExp(h_t),E_t="(?:~>?)",S_t=`^${E_t}${BN}$`,y_t=new RegExp(S_t),T_t="(?:\\^)",I_t=`^${T_t}${BN}$`,C_t=new RegExp(I_t);function b_t(e){let t=y_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 v_t(e,t){let n=C_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 R_t(e,t){let n=g_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 x_t(e,t){let n=__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 KY=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 NN(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 D_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 NN(o,"__original",r),NN(o,"__unwrap",()=>{e[t]===o&&NN(e,t,r)}),NN(o,"__wrapped",!0),NN(e,t,o),o};Bs.wrap=D_t;var B_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=B_t;var N_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=N_t;var O_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=O_t;function ON(e){e&&e.logger&&(typeof e.logger!="function"?ju("new logger isn't a function, not replacing"):ju=e.logger)}Bs.default=ON;ON.wrap=Bs.wrap;ON.massWrap=Bs.massWrap;ON.unwrap=Bs.unwrap;ON.massUnwrap=Bs.massUnwrap});var cDe=F(E4=>{"use strict";m();Object.defineProperty(E4,"__esModule",{value:!0});E4.InstrumentationAbstract=void 0;var JY=(Ge(),Me(We)),w_t=zY(),_4=KY(),ZY=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=JY.diag.createComponentLogger({namespace:t}),this._tracer=JY.trace.getTracer(t,n),this._meter=JY.metrics.getMeter(t,n),this._logger=w_t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=_4.wrap;_unwrap=_4.unwrap;_massWrap=_4.massWrap;_massUnwrap=_4.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)}}};E4.InstrumentationAbstract=ZY});var lDe=F(F_=>{"use strict";m();Object.defineProperty(F_,"__esModule",{value:!0});F_.ModuleNameTrie=F_.ModuleNameSeparator=void 0;F_.ModuleNameSeparator="/";var S4=class{hooks=[];children=new Map},WY=class{_trie=new S4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(F_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new S4,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(F_.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))}};F_.ModuleNameTrie=WY});var pDe=F(y4=>{"use strict";m();Object.defineProperty(y4,"__esModule",{value:!0});y4.RequireInTheMiddleSingleton=void 0;var k_t=kS(),dDe=Fe("path"),XY=lDe(),M_t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),eK=class e{_moduleNameTrie=new XY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new k_t.Hook(null,{internals:!0},(t,n,r)=>{let o=P_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 M_t?new e:this._instance=this._instance??new e}};y4.RequireInTheMiddleSingleton=eK;function P_t(e){return dDe.sep!==XY.ModuleNameSeparator?e.split(dDe.sep).join(XY.ModuleNameSeparator):e}});var hDe=F(wN=>{m();var fDe=[],tK=new WeakMap,ADe=new WeakMap,mDe=new Map,gDe=[],U_t={set(e,t,n){let r=tK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=ADe.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=tK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function L_t(e,t,n,r,o){mDe.set(e,o),tK.set(t,n),ADe.set(t,r);let i=new Proxy(t,U_t);fDe.forEach(a=>a(e,i,o)),gDe.push([e,i,o])}wN.register=L_t;wN.importHooks=fDe;wN.specifiers=mDe;wN.toHook=gDe});var iK=F((Cmn,hv)=>{m();var _De=Fe("path"),Q_t=rU(),{fileURLToPath:F_t}=Fe("url"),{MessageChannel:G_t}=Fe("worker_threads"),{isBuiltin:nK}=Fe("module");nK||(nK=()=>!0);var{importHooks:rK,specifiers:j_t,toHook:H_t}=hDe();function EDe(e){rK.push(e),H_t.forEach(([t,n,r])=>e(t,n,r))}function SDe(e){let t=rK.indexOf(e);t>-1&&rK.splice(t,1)}function gv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var oK;function z_t(){let{port1:e,port2:t}=new G_t,n=0,r;oK=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 kN(e,t,n){if(!(this instanceof kN))return new kN(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;oK&&Array.isArray(e)&&oK(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),g,h;if(d){let S=o.slice(5);nK(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{g=F_t(o),o=g}catch{}if(Error.stackTraceLimit=S,g){let y=Q_t(g);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(g&&S===g)gv(n,i,g,void 0);else if(S===o){if(!h)gv(n,i,o,h);else if(h.endsWith(j_t.get(c)))gv(n,i,o,h);else if(r){let y=o+_De.sep+_De.relative(h,g);gv(n,i,y,h)}}else S===a&&gv(n,i,a,h);else gv(n,i,o,h)},EDe(this._iitmHook)}kN.prototype.unhook=function(){SDe(this._iitmHook)};hv.exports=kN;hv.exports.Hook=kN;hv.exports.addHook=EDe;hv.exports.removeHook=SDe;hv.exports.createAddHookMessageChannel=z_t});var aK=F(G_=>{"use strict";m();Object.defineProperty(G_,"__esModule",{value:!0});G_.isWrapped=G_.safeExecuteInTheMiddleAsync=G_.safeExecuteInTheMiddle=void 0;function $_t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}G_.safeExecuteInTheMiddle=$_t;async function V_t(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}}G_.safeExecuteInTheMiddleAsync=V_t;function q_t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}G_.isWrapped=q_t});var IDe=F(T4=>{"use strict";m();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationBase=void 0;var MN=Fe("path"),yDe=Fe("util"),Y_t=uDe(),sK=KY(),K_t=cDe(),J_t=pDe(),Z_t=iK(),PN=(Ge(),Me(We)),W_t=kS(),X_t=Fe("fs"),eEt=aK(),uK=class extends K_t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=J_t.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,eEt.isWrapped)(t[n])&&this._unwrap(t,n),yDe.types.isProxy(t)){let o=(0,sK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,sK.wrap)(t,n,r)};_unwrap=(t,n)=>yDe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,sK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{PN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PN.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{PN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){PN.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=Fe.resolve(n);Fe.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,X_t.readFileSync)(MN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{PN.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 TDe(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=MN.normalize(r);return a.filter(g=>g.name===c&&TDe(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&&MN.isAbsolute(c)){let g=MN.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=MN.isAbsolute(t.name)?new W_t.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Z_t.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}};T4.InstrumentationBase=uK;function TDe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Y_t.satisfies)(t,r,{includePrerelease:n}))}});var CDe=F(I4=>{"use strict";m();Object.defineProperty(I4,"__esModule",{value:!0});I4.normalize=void 0;var tEt=Fe("path");Object.defineProperty(I4,"normalize",{enumerable:!0,get:function(){return tEt.normalize}})});var bDe=F(_v=>{"use strict";m();Object.defineProperty(_v,"__esModule",{value:!0});_v.normalize=_v.InstrumentationBase=void 0;var nEt=IDe();Object.defineProperty(_v,"InstrumentationBase",{enumerable:!0,get:function(){return nEt.InstrumentationBase}});var rEt=CDe();Object.defineProperty(_v,"normalize",{enumerable:!0,get:function(){return rEt.normalize}})});var cK=F(Ev=>{"use strict";m();Object.defineProperty(Ev,"__esModule",{value:!0});Ev.normalize=Ev.InstrumentationBase=void 0;var vDe=bDe();Object.defineProperty(Ev,"InstrumentationBase",{enumerable:!0,get:function(){return vDe.InstrumentationBase}});Object.defineProperty(Ev,"normalize",{enumerable:!0,get:function(){return vDe.normalize}})});var RDe=F(C4=>{"use strict";m();Object.defineProperty(C4,"__esModule",{value:!0});C4.InstrumentationNodeModuleDefinition=void 0;var lK=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}};C4.InstrumentationNodeModuleDefinition=lK});var xDe=F(b4=>{"use strict";m();Object.defineProperty(b4,"__esModule",{value:!0});b4.InstrumentationNodeModuleFile=void 0;var oEt=cK(),dK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,oEt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};b4.InstrumentationNodeModuleFile=dK});var DDe=F(ly=>{"use strict";m();Object.defineProperty(ly,"__esModule",{value:!0});ly.semconvStabilityFromStr=ly.SemconvStability=void 0;var v4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(v4=ly.SemconvStability||(ly.SemconvStability={}));function iEt(e,t){let n=v4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=v4.DUPLICATE;break}else o.toLowerCase()===e&&(n=v4.STABLE);return n}ly.semconvStabilityFromStr=iEt});var NDe=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 aEt=Xxe();Object.defineProperty(Xi,"registerInstrumentations",{enumerable:!0,get:function(){return aEt.registerInstrumentations}});var sEt=cK();Object.defineProperty(Xi,"InstrumentationBase",{enumerable:!0,get:function(){return sEt.InstrumentationBase}});var uEt=RDe();Object.defineProperty(Xi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return uEt.InstrumentationNodeModuleDefinition}});var cEt=xDe();Object.defineProperty(Xi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return cEt.InstrumentationNodeModuleFile}});var pK=aK();Object.defineProperty(Xi,"isWrapped",{enumerable:!0,get:function(){return pK.isWrapped}});Object.defineProperty(Xi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return pK.safeExecuteInTheMiddle}});Object.defineProperty(Xi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return pK.safeExecuteInTheMiddleAsync}});var BDe=DDe();Object.defineProperty(Xi,"SemconvStability",{enumerable:!0,get:function(){return BDe.SemconvStability}});Object.defineProperty(Xi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return BDe.semconvStabilityFromStr}})});var ODe=F(($mn,lEt)=>{lEt.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 kDe=F(dy=>{"use strict";m();Object.defineProperty(dy,"__esModule",{value:!0});dy.range=dy.balanced=void 0;var dEt=(e,t,n)=>{let r=e instanceof RegExp?wDe(e,n):e,o=t instanceof RegExp?wDe(t,n):t,i=r!==null&&o!=null&&(0,dy.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)}};dy.balanced=dEt;var wDe=(e,t)=>{let n=t.match(e);return n?n[0]:null},pEt=(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};dy.range=pEt});var GDe=F(Sv=>{"use strict";m();Object.defineProperty(Sv,"__esModule",{value:!0});Sv.EXPANSION_MAX=void 0;Sv.expand=bEt;var MDe=kDe(),PDe="\0SLASH"+Math.random()+"\0",UDe="\0OPEN"+Math.random()+"\0",AK="\0CLOSE"+Math.random()+"\0",LDe="\0COMMA"+Math.random()+"\0",QDe="\0PERIOD"+Math.random()+"\0",fEt=new RegExp(PDe,"g"),AEt=new RegExp(UDe,"g"),mEt=new RegExp(AK,"g"),gEt=new RegExp(LDe,"g"),hEt=new RegExp(QDe,"g"),_Et=/\\\\/g,EEt=/\\{/g,SEt=/\\}/g,yEt=/\\,/g,TEt=/\\\./g;Sv.EXPANSION_MAX=1e5;function fK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function IEt(e){return e.replace(_Et,PDe).replace(EEt,UDe).replace(SEt,AK).replace(yEt,LDe).replace(TEt,QDe)}function CEt(e){return e.replace(fEt,"\\").replace(AEt,"{").replace(mEt,"}").replace(gEt,",").replace(hEt,".")}function FDe(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=FDe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function bEt(e,t={}){if(!e)return[];let{max:n=Sv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),UN(IEt(e),n,!0).map(CEt)}function vEt(e){return"{"+e+"}"}function REt(e){return/^-?0\d/.test(e)}function xEt(e,t){return e<=t}function DEt(e,t){return e>=t}function UN(e,t,n){let r=[],o=(0,MDe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?UN(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+AK+o.post,UN(e,t,!0)):[e];let S;if(g)S=o.body.split(/\.\./);else if(S=FDe(o.body),S.length===1&&S[0]!==void 0&&(S=UN(S[0],t,!1).map(vEt),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=fK(S[0]),v=fK(S[1]),x=Math.max(S[0].length,S[1].length),N=S.length===3&&S[2]!==void 0?Math.abs(fK(S[2])):1,k=xEt;v<C&&(N*=-1,k=DEt);let j=S.some(REt);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,UN(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 jDe=F(R4=>{"use strict";m();Object.defineProperty(R4,"__esModule",{value:!0});R4.assertValidPattern=void 0;var BEt=1024*64,NEt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>BEt)throw new TypeError("pattern is too long")};R4.assertValidPattern=NEt});var zDe=F(x4=>{"use strict";m();Object.defineProperty(x4,"__esModule",{value:!0});x4.parseClass=void 0;var OEt={"[: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]},LN=e=>e.replace(/[[\]\\-]/g,"\\$&"),wEt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),HDe=e=>e.join(""),kEt=(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(OEt))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(LN(S)+"-"+LN(x)):x===S&&r.push(LN(x)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(LN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=x,i+=2;continue}r.push(LN(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[wEt(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]};x4.parseClass=kEt});var B4=F(D4=>{"use strict";m();Object.defineProperty(D4,"__esModule",{value:!0});D4.unescape=void 0;var MEt=(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");D4.unescape=MEt});var hK=F(k4=>{"use strict";m();var Pc;Object.defineProperty(k4,"__esModule",{value:!0});k4.AST=void 0;var PEt=zDe(),N4=B4(),UEt=new Set(["!","?","+","*","@"]),mK=e=>UEt.has(e),$De=e=>mK(e.type),LEt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),QEt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),FEt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),VDe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),GEt="(?!(?:^|/)\\.\\.?(?:$|/))",O4="(?!\\.)",jEt=new Set(["[","."]),HEt=new Set(["..","."]),zEt=new Set("().*{}+?[]^$\\!"),$Et=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gK="[^/]",qDe=gK+"*?",YDe=gK+"+?",VEt=0,w4=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++VEt;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 Pc&&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 Pc&&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 Pc(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&&mK(k)&&t.charAt(x)==="("&&i<=a){n.push(N),N="";let j=new Pc(k,n);x=Pc.#d(t,j,x,o,i+1),n.push(j);continue}N+=k}return n.push(N),x}let S=r+1,y=new Pc(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&&mK(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 Pc(x,y);y.push(Q),S=Pc.#d(t,Q,S,o,i+k);continue}if(x==="|"){y.push(v),v="",C.push(y),y=new Pc(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,QEt)}#A(t,n=LEt){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=FEt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Pc(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!!VDe.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=VDe.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 Pc(null,void 0,n);return Pc.#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()),!$De(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"?Pc.#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&&HEt.has(this.#e[0]))){let v=jEt,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?GEt:N?O4:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+g+S,(0,N4.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,N4.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!O4?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?O4:"")+YDe;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?O4:"")+qDe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,N4.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if($De(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+=(zEt.has(g)?"\\":"")+g;continue}if(g==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?YDe:qDe,n=!0;continue}else c=!1;if(g==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(g==="["){let[h,S,y,C]=(0,PEt.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(g==="?"){i+=gK,n=!0;continue}i+=$Et(g)}return[i,(0,N4.unescape)(t),!!n,a]}};k4.AST=w4;Pc=w4});var _K=F(M4=>{"use strict";m();Object.defineProperty(M4,"__esModule",{value:!0});M4.escape=void 0;var qEt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");M4.escape=qEt});var t1e=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 YEt=GDe(),P4=jDe(),ZDe=hK(),KEt=_K(),JEt=B4(),ZEt=(e,t,n={})=>((0,P4.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new py(t,n).match(e));ft.minimatch=ZEt;var WEt=/^\*+([^+@!?\*\[\(]*)$/,XEt=e=>t=>!t.startsWith(".")&&t.endsWith(e),e0t=e=>t=>t.endsWith(e),t0t=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),n0t=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),r0t=/^\*+\.\*+$/,o0t=e=>!e.startsWith(".")&&e.includes("."),i0t=e=>e!=="."&&e!==".."&&e.includes("."),a0t=/^\.\*+$/,s0t=e=>e!=="."&&e!==".."&&e.startsWith("."),u0t=/^\*+$/,c0t=e=>e.length!==0&&!e.startsWith("."),l0t=e=>e.length!==0&&e!=="."&&e!=="..",d0t=/^\?+([^+@!?\*\[\(]*)?$/,p0t=([e,t=""])=>{let n=WDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},f0t=([e,t=""])=>{let n=XDe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},A0t=([e,t=""])=>{let n=XDe([e]);return t?r=>n(r)&&r.endsWith(t):n},m0t=([e,t=""])=>{let n=WDe([e]);return t?r=>n(r)&&r.endsWith(t):n},WDe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},XDe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},e1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",KDe={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=e1e==="win32"?KDe.win32.sep:KDe.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var g0t="[^/]",h0t=g0t+"*?",_0t="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",E0t="(?:(?!(?:\\/|^)\\.).)*?",S0t=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=S0t;ft.minimatch.filter=ft.filter;var jd=(e,t={})=>Object.assign({},e,t),y0t=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=y0t;ft.minimatch.defaults=ft.defaults;var T0t=(e,t={})=>((0,P4.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,YEt.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=T0t;ft.minimatch.braceExpand=ft.braceExpand;var I0t=(e,t={})=>new py(e,t).makeRe();ft.makeRe=I0t;ft.minimatch.makeRe=ft.makeRe;var C0t=(e,t,n={})=>{let r=new py(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=C0t;ft.minimatch.match=ft.match;var JDe=/[?*]|[+@!]\(.*?\)|\[|\]/,b0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),py=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||e1e,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]==="?"||!JDe.test(i[2]))&&!JDe.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(u0t))?o=n.dot?l0t:c0t:(r=t.match(WEt))?o=(n.nocase?n.dot?n0t:t0t:n.dot?e0t:XEt)(r[1]):(r=t.match(d0t))?o=(n.nocase?n.dot?f0t:p0t:n.dot?A0t:m0t)(r):(r=t.match(r0t))?o=n.dot?i0t:o0t:(r=t.match(a0t))&&(o=s0t);let i=ZDe.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?h0t:n.dot?_0t:E0t,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"?b0t(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=py;var v0t=hK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return v0t.AST}});var R0t=_K();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return R0t.escape}});var x0t=B4();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return x0t.unescape}});ft.minimatch.AST=ZDe.AST;ft.minimatch.Minimatch=py;ft.minimatch.escape=KEt.escape;ft.minimatch.unescape=JEt.unescape});var u1e=F((lgn,yK)=>{"use strict";m();var n1e=Fe("node:diagnostics_channel"),{context:U4,trace:EK,SpanStatusCode:L4,propagation:SK,diag:D0t}=(Ge(),Me(We)),{getRPCMetadata:B0t,RPCType:N0t}=Tr(),{ATTR_HTTP_ROUTE:Q4,ATTR_HTTP_RESPONSE_STATUS_CODE:r1e,ATTR_HTTP_REQUEST_METHOD:O0t,ATTR_URL_PATH:w0t}=(Jn(),Me(Ur)),{InstrumentationBase:k0t}=NDe(),{version:M0t,name:o1e}=ODe(),P0t=">=4.0.0 <6",i1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],_o={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},j_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Ig="anonymous",H_=Symbol("fastify otel instance"),z_=Symbol("fastify otel request spans"),QN=Symbol("fastify otel request context"),a1e=Symbol("fastify otel addhook original"),s1e=Symbol("fastify otel setnotfound original"),FN=Symbol("fastify otel ignore path"),GN=Symbol("fastify otel record exceptions"),F4=class extends k0t{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(o1e,M0t,t),this.logger=D0t.createComponentLogger({namespace:o1e}),this[FN]=null,this[GN]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[GN]=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[FN]=o=>typeof n=="function"?n(o):(r==null&&(r=t1e().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)},n1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(n1e.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:P0t,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(H_,t),r.decorate(a1e,r.addHook),r.decorate(s1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[QN],v=this[z_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:C,inject:(x,N)=>SK.inject(C,x,N),extract:(x,N)=>SK.extract(C,x,N)}}),r.decorateRequest(z_,null),r.decorateRequest(QN,null),r.addHook("onRoute",function(C){if(t[FN]?.(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 i1e)if(C[v]!=null){let x=C[v];if(typeof x=="function")C[v]=S(x,v,{[_o.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[_o.FASTIFY_TYPE]:j_.ROUTE,[Q4]:C.url,[_o.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:Ig});else if(Array.isArray(x)){let N=[];for(let k of x)N.push(S(k,v,{[_o.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[_o.FASTIFY_TYPE]:j_.ROUTE,[Q4]:C.url,[_o.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:Ig}));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",{[_o.HOOK_NAME]:`${this.pluginName} - route-handler`,[_o.FASTIFY_TYPE]:j_.HANDLER,[Q4]:C.url,[_o.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:Ig})}),r.addHook("onRequest",function(C,v,x){if(this[H_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return x();if(this[H_][FN]?.({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=U4.active();EK.getSpan(N)==null&&(N=SK.extract(N,C.headers));let k=B0t(N);C.routeOptions.url!=null&&k?.type===N0t.HTTP&&(k.route=C.routeOptions.url);let Q={[_o.ROOT]:"@fastify/otel",[O0t]:C.method,[w0t]:C.url};C.routeOptions.url!=null&&(Q[Q4]=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[QN]=EK.setSpan(N,j),C[z_]=j,U4.with(C[QN],()=>{x()})}),r.addHook("onResponse",function(C,v,x){let N=C[z_];N!=null&&(N.setAttributes({[r1e]:v.statusCode}),N.end()),C[z_]=null,x()}),r.addHook=d,r.setNotFoundHandler=g,i();function a(y,C,v,x){let N=y[z_];N!=null&&(C.statusCode>=500&&N.setStatus({code:L4.ERROR}),N.setAttributes({[r1e]:C.statusCode}),N.end()),y[z_]=null,x(null,v)}function c(y,C,v,x){let N=y[z_];N!=null&&(N.setStatus({code:L4.ERROR,message:v.message}),t[GN]!==!1&&N.recordException(v)),x()}function d(y,C){let v=this[a1e];return i1e.includes(y)?v.call(this,y,S(C,y,{[_o.HOOK_NAME]:`${this.pluginName} - ${y}`,[_o.FASTIFY_TYPE]:j_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Ig})):v.call(this,y,C)}function g(y,C){let v=this[s1e];typeof y=="function"?(C=S(y,"notFoundHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[_o.FASTIFY_TYPE]:j_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:Ig}),v.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[_o.FASTIFY_TYPE]:j_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:Ig})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[_o.FASTIFY_TYPE]:j_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:Ig})),C=S(C,"notFoundHandler",{[_o.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[_o.FASTIFY_TYPE]:j_.INSTANCE,[_o.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Ig}),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[FN]?.({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[QN]??U4.active(),G=y.name?.length>0?y.name:this.pluginName??Ig,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 U4.with(EK.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:L4.ERROR,message:ge.message}),k[GN]!==!1&&q.recordException(ge),q.end(),Promise.reject(ge))):(q.end(),oe)}catch(oe){throw q.setStatus({code:L4.ERROR,message:oe.message}),k[GN]!==!1&&q.recordException(oe),q.end(),oe}},this)}}}}};yK.exports=F4;yK.exports.FastifyOtelInstrumentation=F4});var Cg,jN,HN,c1e=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})(Cg||(Cg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(jN||(jN={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(HN||(HN={}))});var zN,l1e=O(()=>{m();zN=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function TK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[zN]||[];return i.push(o),Object.defineProperty(e,zN,{enumerable:!1,configurable:!0,value:i}),o}function G4(e,t){let n=e[zN]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:ui.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[zN])}function p1e(e,t,n){let r,o;try{o=e(),d1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!d1e(o)&&(t(r,o),r))throw r;return o}}function d1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var f1e=O(()=>{m();Ge();l1e()});function F0t(){let e=gt();e&&e.on("spanStart",t=>{m1e(t)})}function m1e(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Zt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.fastify",[Zt]:`${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 H4,fy,U0t,L0t,A1e,Q0t,j4,g1e=O(()=>{m();Ge();H4=ie(Tr(),1),fy=ie(rn(),1);Jn();dt();c1e();f1e();U0t="0.1.0",L0t="@sentry/instrumentation-fastify-v3",A1e="anonymous",Q0t=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),j4=class extends fy.InstrumentationBase{constructor(t={}){super(L0t,U0t,t)}init(){return[new fy.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,H4.getRPCMetadata)(Ke.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===H4.RPCType.HTTP&&(c.route=d);let g=r.method||"GET";Cn().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||A1e,d=`${HN.MIDDLEWARE} - ${c}`,g=a[1],h=TK(g,i.tracer,d,{[Cg.FASTIFY_TYPE]:jN.MIDDLEWARE,[Cg.PLUGIN_NAME]:t,[Cg.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){G4(g),S.apply(this,y)}),Ke.with(Ht.setSpan(Ke.active(),h),()=>p1e(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:ui.ERROR,message:y.message}),h.recordException(y)),o||G4(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(!Q0t.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()),F0t(),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,fy.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),G4(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=`${HN.REQUEST_HANDLER} - ${d||this.pluginName||A1e}`,h={[Cg.PLUGIN_NAME]:this.pluginName,[Cg.FASTIFY_TYPE]:jN.REQUEST_HANDLER,[d5]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Cg.FASTIFY_NAME]=d);let S=TK(o,t.tracer,g,h);m1e(S);let{requestHook:y}=t.getConfig();return y&&(0,fy.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 IK from"node:diagnostics_channel";function G0t(){let e=gt();if(e)return e.getIntegrationByName(z4)}function h1e(e,t,n,r){let o=G0t()?.getShouldHandleError()||T1e;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){Ta&&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)&&tn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function T1e(e,t,n){let r=n.statusCode;return r>=500||r<=299}function I1e(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[Zt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[kt]:"auto.http.otel.fastify",[Zt]:`${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 H0t(){let e=gt();e&&e.on("spanStart",t=>{I1e(t)})}function z0t(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&I1e(i)}let r=t.routeOptions?.url,o=t.method||"GET";Cn().setTransactionName(`${o} ${r}`)})}var _1e,z4,E1e,S1e,j0t,y1e,C1e=O(()=>{m();_1e=ie(u1e(),1);dt();mr();cy();g1e();z4="Fastify",E1e=st(`${z4}.v3`,()=>new j4);S1e=st(`${z4}.v5`,()=>{let e=new _1e.FastifyOtelInstrumentation,t=e.plugin();return IK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?Ta&&J.error("Failed to setup Fastify instrumentation",o):(H0t(),r&&z0t(r))})}),IK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;h1e.call(h1e,r,o,i,"diagnostics-channel")}),e}),j0t=({shouldHandleError:e})=>{let t;return{name:z4,setupOnce(){t=e||T1e,E1e(),S1e()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},y1e=(e={})=>j0t(e)});var CK=F(af=>{"use strict";m();Object.defineProperty(af,"__esModule",{value:!0});af.SpanNames=af.TokenKind=af.AllowedOperationTypes=void 0;var $0t;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})($0t=af.AllowedOperationTypes||(af.AllowedOperationTypes={}));var V0t;(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"})(V0t=af.TokenKind||(af.TokenKind={}));var q0t;(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"})(q0t=af.SpanNames||(af.SpanNames={}))});var bK=F($N=>{"use strict";m();Object.defineProperty($N,"__esModule",{value:!0});$N.AttributeNames=void 0;var Y0t;(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"})(Y0t=$N.AttributeNames||($N.AttributeNames={}))});var $4=F(yv=>{"use strict";m();Object.defineProperty(yv,"__esModule",{value:!0});yv.OTEL_GRAPHQL_DATA_SYMBOL=yv.OTEL_PATCHED_SYMBOL=void 0;yv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");yv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var b1e=F(V4=>{"use strict";m();Object.defineProperty(V4,"__esModule",{value:!0});V4.OPERATION_NOT_SUPPORTED=void 0;var Qgn=$4();V4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var Q1e=F(Ia=>{"use strict";m();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.wrapFieldResolver=Ia.wrapFields=Ia.getSourceFromLocation=Ia.getOperation=Ia.endSpan=Ia.addSpanSource=Ia.addInputVariableAttributes=Ia.isPromise=void 0;var Tv=(Ge(),Me(We)),$_=CK(),Ay=bK(),bg=$4(),v1e=Object.values($_.AllowedOperationTypes),K0t=e=>typeof e?.then=="function";Ia.isPromise=K0t;var J0t=e=>typeof e=="object"&&e!==null;function vK(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{vK(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{vK(e,`${t}.${r}`,o)}):e.setAttribute(`${Ay.AttributeNames.VARIABLES}${String(t)}`,n)}function Z0t(e,t){Object.entries(t).forEach(([n,r])=>{vK(e,n,r)})}Ia.addInputVariableAttributes=Z0t;function B1e(e,t,n,r,o){let i=M1e(t,n,r,o);e.setAttribute(Ay.AttributeNames.SOURCE,i)}Ia.addSpanSource=B1e;function W0t(e,t,n,r,o){let i=N1e(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?w1e(n):O1e(n,o);return i={span:X0t(e,t,n,r,o,c)},nSt(n,o,i),{field:i,spanAdded:!0}}function X0t(e,t,n,r,o,i){let a={[Ay.AttributeNames.FIELD_NAME]:r.fieldName,[Ay.AttributeNames.FIELD_PATH]:o.join("."),[Ay.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[Ay.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${$_.SpanNames.RESOLVE} ${a[Ay.AttributeNames.FIELD_PATH]}`,{attributes:a},i?Tv.trace.setSpan(Tv.context.active(),i):void 0),d=n[bg.OTEL_GRAPHQL_DATA_SYMBOL].source,g=r.fieldNodes.find(h=>h.kind==="Field");return g&&B1e(c,d.loc,t().allowValues,g.loc?.start,g.loc?.end),c}function eSt(e,t){t&&e.recordException(t),e.end()}Ia.endSpan=eSt;function tSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>v1e.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>v1e.indexOf(n?.operation)!==-1)}Ia.getOperation=tSt;function nSt(e,t,n){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function N1e(e,t){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function O1e(e,t){for(let n=t.length-1;n>0;n--){let r=N1e(e,t.slice(0,n));if(r)return r.span}return w1e(e)}function w1e(e){return e[bg.OTEL_GRAPHQL_DATA_SYMBOL].span}function rSt(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 oSt(e){return k1e(`
|
|
37
37
|
`,e)}function R1e(e){return k1e(" ",e)}function k1e(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var iSt=[$_.TokenKind.FLOAT,$_.TokenKind.STRING,$_.TokenKind.INT,$_.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&&iSt.indexOf(c.kind)>=0&&(g="*"),c.kind===$_.TokenKind.STRING&&(g=`"${g}"`),c.kind===$_.TokenKind.EOF&&(g=""),c.line>d?(o+=oSt(c.line-d),d=c.line,h=R1e(c.column-1)):c.line===c.prev?.line&&(h=R1e(c.start-(c.prev?.end||0))),o+=h+g,c&&(c=c.next)}}return o}Ia.getSourceFromLocation=M1e;function P1e(e,t,n){if(!e||e[bg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[bg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=L1e(t,n,i.resolve)),i.type)){let a=U1e(i.type);for(let c of a)P1e(c,t,n)}})}Ia.wrapFields=P1e;function U1e(e){return"ofType"in e?U1e(e.ofType):aSt(e)?e.getTypes():sSt(e)?[e]:[]}function aSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function sSt(e){return"getFields"in e&&typeof e.getFields=="function"}var x1e=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:Tv.SpanStatusCode.ERROR,message:t.message}),e.end())},D1e=(e,t)=>{t&&e.end()};function L1e(e,t,n,r=!1){if(o[bg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let g=t();if(g.ignoreTrivialResolveSpans&&r&&(J0t(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[bg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=rSt(g.mergeItems,d&&d.path),S=h.filter(v=>typeof v=="string").length,y,C=!1;if(g.depth>=0&&g.depth<S)y=O1e(c,h);else{let{field:v,spanAdded:x}=W0t(e,t,c,d,h);y=v.span,C=x}return Tv.context.with(Tv.trace.setSpan(Tv.context.active(),y),()=>{try{let v=n.call(this,i,a,c,d);return(0,Ia.isPromise)(v)?v.then(x=>(D1e(y,C),x),x=>{throw x1e(y,x,C),x}):(D1e(y,C),v)}catch(v){throw x1e(y,v,C),v}})}return o[bg.OTEL_PATCHED_SYMBOL]=!0,o}Ia.wrapFieldResolver=L1e});var F1e=F(Iv=>{"use strict";m();Object.defineProperty(Iv,"__esModule",{value:!0});Iv.PACKAGE_NAME=Iv.PACKAGE_VERSION=void 0;Iv.PACKAGE_VERSION="0.62.0";Iv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var H1e=F(K4=>{"use strict";m();Object.defineProperty(K4,"__esModule",{value:!0});K4.GraphQLInstrumentation=void 0;var vg=(Ge(),Me(We)),Hd=rn(),VN=CK(),q4=bK(),RK=$4(),uSt=b1e(),ou=Q1e(),G1e=F1e(),j1e={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},Y4=[">=14.0.0 <17"],xK=class extends Hd.InstrumentationBase{constructor(t={}){super(G1e.PACKAGE_NAME,G1e.PACKAGE_VERSION,{...j1e,...t})}setConfig(t={}){super.setConfig({...j1e,...t})}init(){let t=new Hd.InstrumentationNodeModuleDefinition("graphql",Y4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Hd.InstrumentationNodeModuleFile("graphql/execution/execute.js",Y4,t=>((0,Hd.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 Hd.InstrumentationNodeModuleFile("graphql/language/parser.js",Y4,t=>((0,Hd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Hd.InstrumentationNodeModuleFile("graphql/validation/validate.js",Y4,t=>((0,Hd.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[RK.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[RK.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},vg.context.with(vg.trace.setSpan(vg.context.active(),d),()=>(0,Hd.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,Hd.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(VN.SpanNames.PARSE);return vg.context.with(vg.trace.setSpan(vg.context.active(),a),()=>(0,Hd.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(VN.SpanNames.SCHEMA_PARSE)),(0,ou.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(VN.SpanNames.VALIDATE,{});return vg.context.with(vg.trace.setSpan(vg.context.active(),d),()=>(0,Hd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(g,h)=>{o.loc||d.updateName(VN.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:q4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,ou.endSpan)(d,g)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(VN.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(q4.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(q4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=uSt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(q4.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[RK.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}}};K4.GraphQLInstrumentation=xK});var z1e=F(J4=>{"use strict";m();Object.defineProperty(J4,"__esModule",{value:!0});J4.GraphQLInstrumentation=void 0;var cSt=H1e();Object.defineProperty(J4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return cSt.GraphQLInstrumentation}})});function K1e(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function dSt(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 $1e,V1e,q1e,lSt,Y1e,J1e=O(()=>{m();Ge();$1e=ie(z1e(),1);dt();mr();sv();V1e="Graphql",q1e=st(V1e,$1e.GraphQLInstrumentation,e=>{let t=K1e(e);return{...t,responseHook(n,r){Lr(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[iv]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(iv,h)):typeof h=="string"?d.setAttribute(iv,[h,S]):d.setAttribute(iv,S),Ot(d).data["original-description"]||d.setAttribute("original-description",Ot(d).description),d.updateName(`${Ot(d).data["original-description"]} (${dSt(h)})`)}}}}),lSt=(e={})=>({name:V1e,setupOnce(){q1e(K1e(e))}}),Y1e=lSt});var Z1e=F(Z4=>{"use strict";m();Object.defineProperty(Z4,"__esModule",{value:!0});Z4.EVENT_LISTENERS_SET=void 0;Z4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var W1e=F(W4=>{"use strict";m();Object.defineProperty(W4,"__esModule",{value:!0});W4.bufferTextMapGetter=void 0;W4.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 X1e=F(tr=>{"use strict";m();Object.defineProperty(tr,"__esModule",{value:!0});tr.METRIC_MESSAGING_PROCESS_DURATION=tr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=tr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=tr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=tr.MESSAGING_SYSTEM_VALUE_KAFKA=tr.MESSAGING_OPERATION_TYPE_VALUE_SEND=tr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=tr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=tr.ATTR_MESSAGING_SYSTEM=tr.ATTR_MESSAGING_OPERATION_TYPE=tr.ATTR_MESSAGING_OPERATION_NAME=tr.ATTR_MESSAGING_KAFKA_OFFSET=tr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=tr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=tr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=tr.ATTR_MESSAGING_DESTINATION_NAME=tr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;tr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";tr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";tr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";tr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";tr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";tr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";tr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";tr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";tr.ATTR_MESSAGING_SYSTEM="messaging.system";tr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";tr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";tr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";tr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";tr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";tr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";tr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";tr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var eBe=F(Cv=>{"use strict";m();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.PACKAGE_NAME=Cv.PACKAGE_VERSION=void 0;Cv.PACKAGE_VERSION="0.23.0";Cv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var aBe=F(eF=>{"use strict";m();Object.defineProperty(eF,"__esModule",{value:!0});eF.KafkaJsInstrumentation=void 0;var Qr=(Ge(),Me(We)),zd=rn(),bv=(Jn(),Me(Ur)),tBe=Z1e(),nBe=W1e(),At=X1e(),rBe=eBe();function X4(e,t,n){return r=>{e.add(t,{...n,...r?{[bv.ATTR_ERROR_TYPE]:r}:{}})}}function oBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[bv.ATTR_ERROR_TYPE]:r}:{}})}}var iBe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],DK=class extends zd.InstrumentationBase{constructor(t={}){super(rBe.PACKAGE_NAME,rBe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(At.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:iBe}}),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:iBe}})}init(){let t=r=>{(0,zd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,zd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new zd.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,zd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[tBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[tBe.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}`,[bv.ATTR_SERVER_ADDRESS]:n,[bv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,zd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,zd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,zd.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,zd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,zd.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=Qr.propagation.extract(Qr.ROOT_CONTEXT,i.message.headers,nBe.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=[oBe(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)}),X4(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=Qr.context.with(Qr.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:Qr.ROOT_CONTEXT,attributes:{[At.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Qr.context.with(Qr.trace.setSpan(Qr.context.active(),a),()=>{let c=Date.now(),d=[],g=[X4(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=Qr.propagation.extract(Qr.ROOT_CONTEXT,S.headers,nBe.bufferTextMapGetter),C=Qr.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(oBe(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 Qr.context.with(Qr.trace.setSpan(Qr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(x=>{throw i.setStatus({code:Qr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let g=c.sendBatch;c.sendBatch=function(...C){return Qr.context.with(Qr.trace.setSpan(Qr.context.active(),i),()=>t._getSendBatchPatch()(g).apply(this,C).catch(x=>{throw i.setStatus({code:Qr.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:Qr.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:Qr.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(X4(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=>X4(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=bv.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(bv.ATTR_ERROR_TYPE,a),c.setStatus({code:Qr.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?Qr.SpanKind.CLIENT:Qr.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,zd.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:Qr.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??{},Qr.propagation.inject(Qr.trace.setSpan(Qr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,zd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};eF.KafkaJsInstrumentation=DK});var sBe=F(tF=>{"use strict";m();Object.defineProperty(tF,"__esModule",{value:!0});tF.KafkaJsInstrumentation=void 0;var pSt=aBe();Object.defineProperty(tF,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return pSt.KafkaJsInstrumentation}})});var uBe,cBe,lBe,fSt,dBe,pBe=O(()=>{m();uBe=ie(sBe(),1);mr();cBe="Kafka",lBe=st(cBe,()=>new uBe.KafkaJsInstrumentation({consumerHook(e){Lr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Lr(e,"auto.kafkajs.otel.producer")}})),fSt=()=>({name:cBe,setupOnce(){lBe()}}),dBe=fSt});var fBe=F(vv=>{"use strict";m();Object.defineProperty(vv,"__esModule",{value:!0});vv.PACKAGE_NAME=vv.PACKAGE_VERSION=void 0;vv.PACKAGE_VERSION="0.58.0";vv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var hBe=F(nF=>{"use strict";m();Object.defineProperty(nF,"__esModule",{value:!0});nF.LruMemoizerInstrumentation=void 0;var ABe=(Ge(),Me(We)),mBe=rn(),gBe=fBe(),BK=class extends mBe.InstrumentationBase{constructor(t={}){super(gBe.PACKAGE_NAME,gBe.PACKAGE_VERSION,t)}init(){return[new mBe.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"?ABe.context.bind(ABe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};nF.LruMemoizerInstrumentation=BK});var _Be=F(rF=>{"use strict";m();Object.defineProperty(rF,"__esModule",{value:!0});rF.LruMemoizerInstrumentation=void 0;var ASt=hBe();Object.defineProperty(rF,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return ASt.LruMemoizerInstrumentation}})});var EBe,SBe,yBe,mSt,TBe,IBe=O(()=>{m();EBe=ie(_Be(),1);mr();SBe="LruMemoizer",yBe=st(SBe,()=>new EBe.LruMemoizerInstrumentation),mSt=()=>({name:SBe,setupOnce(){yBe()}}),TBe=mSt});var CBe=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 bBe=F(qN=>{"use strict";m();Object.defineProperty(qN,"__esModule",{value:!0});qN.MongodbCommandType=void 0;var gSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(gSt=qN.MongodbCommandType||(qN.MongodbCommandType={}))});var vBe=F(Rv=>{"use strict";m();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.PACKAGE_NAME=Rv.PACKAGE_VERSION=void 0;Rv.PACKAGE_VERSION="0.67.0";Rv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var DBe=F(oF=>{"use strict";m();Object.defineProperty(oF,"__esModule",{value:!0});oF.MongoDBInstrumentation=void 0;var Yo=(Ge(),Me(We)),nr=rn(),Rg=(Jn(),Me(Ur)),Ul=CBe(),my=bBe(),RBe=vBe(),xBe={requireParentSpan:!0},NK=class e extends nr.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RBe.PACKAGE_NAME,RBe.PACKAGE_VERSION,{...xBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,nr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,nr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xBe,...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 nr.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new nr.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new nr.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new nr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new nr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new nr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,g),new nr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new nr.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,S)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,nr.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,nr.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,nr.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,nr.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,nr.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,nr.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,nr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,nr.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,nr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,nr.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,nr.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,nr.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,nr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,nr.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===my.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?my.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?my.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?my.MongodbCommandType.IS_MASTER:t.count!==void 0?my.MongodbCommandType.COUNT:t.aggregate!==void 0?my.MongodbCommandType.AGGREGATE:my.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&nr.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&nr.SemconvStability.STABLE&&(c[Rg.ATTR_DB_SYSTEM_NAME]=Ul.DB_SYSTEM_NAME_VALUE_MONGODB,c[Rg.ATTR_DB_NAMESPACE]=t,c[Rg.ATTR_DB_OPERATION_NAME]=a,c[Rg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&nr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&nr.SemconvStability.STABLE&&(c[Rg.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&nr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&nr.SemconvStability.STABLE&&(c[Rg.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),g=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,nr.safeExecuteInTheMiddle)(()=>{let h=g(i);this._dbSemconvStability&nr.SemconvStability.OLD&&(c[Ul.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&nr.SemconvStability.STABLE&&(c[Rg.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&nr.SemconvStability.STABLE?n=[t[Rg.ATTR_DB_OPERATION_NAME],t[Rg.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,nr.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}};oF.MongoDBInstrumentation=NK});var BBe=F(YN=>{"use strict";m();Object.defineProperty(YN,"__esModule",{value:!0});YN.MongodbCommandType=void 0;var hSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(hSt=YN.MongodbCommandType||(YN.MongodbCommandType={}))});var NBe=F(xv=>{"use strict";m();Object.defineProperty(xv,"__esModule",{value:!0});xv.MongodbCommandType=xv.MongoDBInstrumentation=void 0;var _St=DBe();Object.defineProperty(xv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return _St.MongoDBInstrumentation}});var ESt=BBe();Object.defineProperty(xv,"MongodbCommandType",{enumerable:!0,get:function(){return ESt.MongodbCommandType}})});function SSt(e){let t=OK(e);return JSON.stringify(t)}function OK(e){if(Array.isArray(e))return e.map(t=>OK(t));if(ySt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,OK(r)]).reduce((n,r)=>(ISt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function ySt(e){return typeof e=="object"&&e!==null&&!TSt(e)}function TSt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function ISt(e){return Array.isArray(e)}var OBe,wBe,kBe,CSt,MBe,PBe=O(()=>{m();OBe=ie(NBe(),1);mr();wBe="Mongo",kBe=st(wBe,()=>new OBe.MongoDBInstrumentation({dbStatementSerializer:SSt,responseHook(e){Lr(e,"auto.db.otel.mongo")}}));CSt=()=>({name:wBe,setupOnce(){kBe()}}),MBe=CSt});var wK=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 QBe=F(V_=>{"use strict";m();Object.defineProperty(V_,"__esModule",{value:!0});V_.handleCallbackResponse=V_.handlePromiseResponse=V_.getAttributesFromCollection=void 0;var UBe=(Ge(),Me(We)),JN=rn(),KN=wK(),iF=(Jn(),Me(Ur));function bSt(e,t,n){let r={};return t&JN.SemconvStability.OLD&&(r[KN.ATTR_DB_MONGODB_COLLECTION]=e.name,r[KN.ATTR_DB_NAME]=e.conn.name,r[KN.ATTR_DB_USER]=e.conn.user),t&JN.SemconvStability.STABLE&&(r[iF.ATTR_DB_COLLECTION_NAME]=e.name,r[iF.ATTR_DB_NAMESPACE]=e.conn.name),n&JN.SemconvStability.OLD&&(r[KN.ATTR_NET_PEER_NAME]=e.conn.host,r[KN.ATTR_NET_PEER_PORT]=e.conn.port),n&JN.SemconvStability.STABLE&&(r[iF.ATTR_SERVER_ADDRESS]=e.conn.host,r[iF.ATTR_SERVER_PORT]=e.conn.port),r}V_.getAttributesFromCollection=bSt;function LBe(e,t={}){e.recordException(t),e.setStatus({code:UBe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
|
|
38
|
-
Mongoose Error Code: ${t.code}`:""}`})}function kK(e,t,n,r=void 0){n&&(0,JN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&UBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function vSt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kK(t,o,n,r),o)).catch(o=>{throw LBe(t,o),o}).finally(()=>t.end()):(kK(t,e,n,r),t.end(),e)}V_.handlePromiseResponse=vSt;function RSt(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?LBe(r,d):kK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}V_.handleCallbackResponse=RSt});var FBe=F(Dv=>{"use strict";m();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.PACKAGE_NAME=Dv.PACKAGE_VERSION=void 0;Dv.PACKAGE_VERSION="0.60.0";Dv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var $Be=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ca=(Ge(),Me(We)),xSt=Tr(),MK=QBe(),Ns=rn(),GBe=FBe(),q_=wK(),gy=(Jn(),Me(Ur)),aF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],DSt=["remove","count","findOneAndRemove",...aF],BSt=["count","findOneAndRemove",...aF],NSt=[...aF];function jBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?DSt:e.startsWith("7.")?BSt:NSt:aF}function HBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function zBe(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(GBe.PACKAGE_NAME,GBe.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)),zBe(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)),jBe(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=jBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._unwrap(r.Model.prototype,"remove"),zBe(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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[gy.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=Ca.trace.getSpan(Ca.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]=Ca.trace.getSpan(Ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,MK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[q_.ATTR_DB_OPERATION]=r,a[q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[gy.ATTR_DB_OPERATION_NAME]=r,a[gy.ATTR_DB_SYSTEM_NAME]=q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ca.SpanKind.CLIENT,attributes:a},i?Ca.trace.setSpan(Ca.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,MK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,MK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ca.context.with((0,xSt.suppressTracing)(Ca.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var VBe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MongooseInstrumentation=void 0;var OSt=$Be();Object.defineProperty(sF,"MongooseInstrumentation",{enumerable:!0,get:function(){return OSt.MongooseInstrumentation}})});var qBe,YBe,KBe,wSt,JBe,ZBe=O(()=>{m();qBe=ie(VBe(),1);mr();YBe="Mongoose",KBe=st(YBe,()=>new qBe.MongooseInstrumentation({responseHook(e){Lr(e,"auto.db.otel.mongoose")}})),wSt=()=>({name:YBe,setupOnce(){KBe()}}),JBe=wSt});var WBe=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 XBe=F(ZN=>{"use strict";m();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.AttributeNames=void 0;var kSt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(kSt=ZN.AttributeNames||(ZN.AttributeNames={}))});var eNe=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 MSt(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=MSt;function PSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=PSt;function USt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=USt;function LSt(e,t){return UK(typeof e=="string"?t:t||e.values)}iu.getDbValues=LSt;function QSt(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=QSt;function UK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=UK;function FSt(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=FSt});var tNe=F(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.PACKAGE_NAME=Bv.PACKAGE_VERSION=void 0;Bv.PACKAGE_VERSION="0.60.0";Bv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var rNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var Lc=(Ge(),Me(We)),$d=rn(),Nv=(Jn(),Me(Ur)),xg=WBe(),GSt=XBe(),hy=eNe(),nNe=tNe(),LK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(nNe.PACKAGE_NAME,nNe.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(xg.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,hy.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,hy.getConfig)(t.config),y=parseInt(g,10),C=(0,hy.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_DB_SYSTEM]=xg.DB_SYSTEM_VALUE_MYSQL,c[xg.ATTR_DB_CONNECTION_STRING]=(0,hy.getJDBCString)(d,g,h),c[xg.ATTR_DB_NAME]=h,c[xg.ATTR_DB_USER]=S,c[xg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Nv.ATTR_DB_SYSTEM_NAME]=Nv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Nv.ATTR_DB_NAMESPACE]=h,c[Nv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Nv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Nv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,hy.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(GSt.AttributeNames.MYSQL_VALUES,(0,hy.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,hy.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")})}};uF.MySQLInstrumentation=LK});var oNe=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.MySQLInstrumentation=void 0;var jSt=rNe();Object.defineProperty(cF,"MySQLInstrumentation",{enumerable:!0,get:function(){return jSt.MySQLInstrumentation}})});var iNe,aNe,sNe,HSt,uNe,cNe=O(()=>{m();iNe=ie(oNe(),1);mr();aNe="Mysql",sNe=st(aNe,()=>new iNe.MySQLInstrumentation({})),HSt=()=>({name:aNe,setupOnce(){sNe()}}),uNe=HSt});var QK=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 GK=F(lF=>{"use strict";m();Object.defineProperty(lF,"__esModule",{value:!0});lF.addSqlCommenterComment=void 0;var FK=(Ge(),Me(We)),zSt=Tr();function $St(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function VSt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function qSt(e,t){if(typeof t!="string"||t.length===0||$St(t))return t;let n=new zSt.W3CTraceContextPropagator,r={};n.inject(FK.trace.setSpan(FK.ROOT_CONTEXT,e),r,FK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=VSt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}lF.addSqlCommenterComment=qSt});var lNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var WN=QK(),dF=rn(),jK=(Jn(),Me(Ur));function YSt(e,t,n){let{host:r,port:o,database:i,user:a}=KSt(e),c={};t&dF.SemconvStability.OLD&&(c[WN.ATTR_DB_CONNECTION_STRING]=JSt(r,o,i),c[WN.ATTR_DB_NAME]=i,c[WN.ATTR_DB_USER]=a),t&dF.SemconvStability.STABLE&&(c[jK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&dF.SemconvStability.OLD&&(c[WN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[WN.ATTR_NET_PEER_PORT]=d)),n&dF.SemconvStability.STABLE&&(c[jK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[jK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=YSt;function KSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function JSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function ZSt(e,t,n,r=!1,o=WSt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,XSt(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=ZSt;function WSt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function XSt(e){return"values"in e}function eyt(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=eyt;var tyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=tyt;function nyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=nyt});var dNe=F(Ov=>{"use strict";m();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.PACKAGE_NAME=Ov.PACKAGE_VERSION=void 0;Ov.PACKAGE_VERSION="0.60.0";Ov.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var mNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var pNe=(Ge(),Me(We)),sf=rn(),HK=QK(),fNe=GK(),wv=lNe(),ANe=dNe(),zK=(Jn(),Me(Ur)),$K=[">=1.4.2 <4"],VK=class extends sf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ANe.PACKAGE_NAME,ANe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sf.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,sf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,sf.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 sf.InstrumentationNodeModuleDefinition("mysql2",$K,i=>(n(i),i),()=>{},[new sf.InstrumentationNodeModuleFile("mysql2/promise.js",$K,i=>(n(i),i),()=>{}),new sf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$K,i=>{let a=(0,wv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,wv.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,wv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,wv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&sf.SemconvStability.OLD&&(y[HK.ATTR_DB_SYSTEM]=HK.DB_SYSTEM_VALUE_MYSQL,y[HK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&sf.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,wv.getSpanName)(i),{kind:pNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,fNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,fNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,wv.once)((N,k)=>{N?v.setStatus({code:pNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,sf.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)}}};pF.MySQL2Instrumentation=VK});var gNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.MySQL2Instrumentation=void 0;var ryt=mNe();Object.defineProperty(fF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return ryt.MySQL2Instrumentation}})});var hNe,_Ne,ENe,oyt,SNe,yNe=O(()=>{m();hNe=ie(gNe(),1);mr();_Ne="Mysql2",ENe=st(_Ne,()=>new hNe.MySQL2Instrumentation({responseHook(e){Lr(e,"auto.db.otel.mysql2")}})),oyt=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=oyt});var TNe=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 INe=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.endSpan=void 0;var iyt=(Ge(),Me(We)),ayt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:iyt.SpanStatusCode.ERROR,message:t.message})),e.end()};AF.endSpan=ayt});var gF=F(mF=>{"use strict";m();Object.defineProperty(mF,"__esModule",{value:!0});mF.defaultDbStatementSerializer=void 0;var syt=[{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}],uyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=syt.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};mF.defaultDbStatementSerializer=uyt});var CNe=F(kv=>{"use strict";m();Object.defineProperty(kv,"__esModule",{value:!0});kv.PACKAGE_NAME=kv.PACKAGE_VERSION=void 0;kv.PACKAGE_VERSION="0.62.0";kv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var xNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var Y_=(Ge(),Me(We)),Qc=rn(),K_=(Jn(),Me(Ur)),Fc=TNe(),bNe=rn(),XN=INe(),cyt=gF(),vNe=CNe(),RNe={requireParentSpan:!0},qK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,{...RNe,...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({...RNe,...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||cyt.defaultDbStatementSerializer,c=Y_.trace.getSpan(Y_.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[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[K_.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[K_.ATTR_SERVER_ADDRESS]=g,d[K_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:Y_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,bNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&Y_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,bNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&Y_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,XN.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,XN.endSpan)(y,k),N(k)},v}catch(v){throw(0,XN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=Y_.trace.getSpan(Y_.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[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[K_.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[K_.ATTR_SERVER_ADDRESS]=i,o[K_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:Y_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,XN.endSpan)(c,null),d}catch(d){throw(0,XN.endSpan)(c,d),d}}}};hF.IORedisInstrumentation=qK});var DNe=F(_F=>{"use strict";m();Object.defineProperty(_F,"__esModule",{value:!0});_F.IORedisInstrumentation=void 0;var lyt=xNe();Object.defineProperty(_F,"IORedisInstrumentation",{enumerable:!0,get:function(){return lyt.IORedisInstrumentation}})});var EF=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.62.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var BNe=F(J_=>{"use strict";m();Object.defineProperty(J_,"__esModule",{value:!0});J_.getTracedCreateStreamTrace=J_.getTracedCreateClient=J_.endSpan=void 0;var eO=(Ge(),Me(We)),dyt=(e,t)=>{t&&e.setStatus({code:eO.SpanStatusCode.ERROR,message:t.message}),e.end()};J_.endSpan=dyt;var pyt=e=>function(){let n=e.apply(this,arguments);return eO.context.bind(eO.context.active(),n)};J_.getTracedCreateClient=pyt;var fyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){eO.context.bind(eO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};J_.getTracedCreateStreamTrace=fyt});var SF=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 ONe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.RedisInstrumentationV2_V3=void 0;var Ll=rn(),yF=BNe(),NNe=EF(),tO=(Ge(),Me(We)),nO=(Jn(),Me(Ur)),_y=SF(),Ayt=gF(),YK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(NNe.PACKAGE_NAME,NNe.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=tO.trace.getSpan(tO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||Ayt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[_y.ATTR_DB_SYSTEM]:_y.DB_SYSTEM_VALUE_REDIS,[_y.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[nO.ATTR_DB_SYSTEM_NAME]:_y.DB_SYSTEM_NAME_VALUE_REDIS,[nO.ATTR_DB_OPERATION_NAME]:i.command,[nO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:tO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[_y.ATTR_NET_PEER_NAME]:this.connection_options.host,[_y.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[nO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[nO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(_y.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=tO.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,yF.endSpan)(h,v),tO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,yF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,yF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,yF.getTracedCreateStreamTrace)(n)}}};TF.RedisInstrumentationV2_V3=YK});var kNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.getClientAttributes=void 0;var KK=(Jn(),Me(Ur)),Pv=SF(),wNe=rn();function myt(e,t,n){let r={};return n&wNe.SemconvStability.OLD&&Object.assign(r,{[Pv.ATTR_DB_SYSTEM]:Pv.DB_SYSTEM_VALUE_REDIS,[Pv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Pv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Pv.ATTR_DB_CONNECTION_STRING]:gyt(e,t?.url)}),n&wNe.SemconvStability.STABLE&&Object.assign(r,{[KK.ATTR_DB_SYSTEM_NAME]:Pv.DB_SYSTEM_NAME_VALUE_REDIS,[KK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KK.ATTR_SERVER_PORT]:t?.socket?.port}),r}IF.getClientAttributes=myt;function gyt(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 LNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentationV4_V5=void 0;var qd=(Ge(),Me(We)),Eo=rn(),MNe=kNe(),hyt=gF(),PNe=EF(),JK=(Jn(),Me(Ur)),_yt=SF(),rO=Symbol("opentelemetry.instrumentation.redis.open_spans"),UNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZK=class e extends Eo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(PNe.PACKAGE_NAME,PNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.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 Eo.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,Eo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,Eo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Eo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Eo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Eo.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,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Eo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Eo.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[rO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[rO];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[UNe]=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[UNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||hyt.defaultDbStatementSerializer,h=(0,MNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Eo.SemconvStability.STABLE&&(h[JK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&Eo.SemconvStability.OLD&&(h[_yt.ATTR_DB_STATEMENT]=C),this._semconvStability&Eo.SemconvStability.STABLE&&(h[JK.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[rO]=C[rO]||[],C[rO].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&Eo.SemconvStability.STABLE&&d.setAttribute(JK.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()}};CF.RedisInstrumentationV4_V5=ZK});var GNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var Eyt=rn(),QNe=EF(),Syt=ONe(),yyt=LNe(),FNe={requireParentSpan:!1},WK=class extends Eyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...FNe,...t};super(QNe.PACKAGE_NAME,QNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Syt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new yyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...FNe,...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())}};bF.RedisInstrumentation=WK});var jNe=F(vF=>{"use strict";m();Object.defineProperty(vF,"__esModule",{value:!0});vF.RedisInstrumentation=void 0;var Tyt=GNe();Object.defineProperty(vF,"RedisInstrumentation",{enumerable:!0,get:function(){return Tyt.RedisInstrumentation}})});function oO(e,t){return e.includes(t.toLowerCase())}function eJ(e){return oO(XK,e)?"cache.get":oO(Cyt,e)?"cache.put":void 0}function byt(e,t){return t.some(n=>e.startsWith(n))}function zNe(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 oO(Iyt,e)&&r!=null?n(r):HNe(t.map(o=>n(o)))}catch{return}}function $Ne(e,t,n){if(!eJ(e))return!1;for(let r of t)if(byt(r,n))return!0;return!1}function VNe(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 Iyt,XK,Cyt,qNe=O(()=>{m();Iyt=["get","set","setex"],XK=["get","mget"],Cyt=["set","setex"]});var YNe,KNe,RF,iO,JNe,vyt,Ryt,ZNe,xyt,WNe,XNe=O(()=>{m();YNe=ie(DNe(),1),KNe=ie(jNe(),1);dt();mr();qNe();RF="Redis",iO={},JNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=zNe(t,n),i=eJ(t);if(!o||!i||!iO.cachePrefixes||!$Ne(t,o,iO.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=VNe(r);d&&e.setAttribute(oV,d),oO(XK,t)&&d!==void 0&&e.setAttribute(nV,d>0),e.setAttributes({[Zt]:i,[rV]:o});let g=o.join(", ");e.updateName(iO.maxCacheKeyLength?d_(g,iO.maxCacheKeyLength):g)},vyt=st(`${RF}.IORedis`,()=>new YNe.IORedisInstrumentation({responseHook:JNe})),Ryt=st(`${RF}.Redis`,()=>new KNe.RedisInstrumentation({responseHook:JNe})),ZNe=Object.assign(()=>{vyt(),Ryt()},{id:RF}),xyt=(e={})=>({name:RF,setupOnce(){iO=e,ZNe()}}),WNe=xyt});var eOe=F(xF=>{"use strict";m();Object.defineProperty(xF,"__esModule",{value:!0});xF.EVENT_LISTENERS_SET=void 0;xF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tJ=F(aO=>{"use strict";m();Object.defineProperty(aO,"__esModule",{value:!0});aO.AttributeNames=void 0;var Dyt;(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"})(Dyt=aO.AttributeNames||(aO.AttributeNames={}))});var nJ=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 rJ=F(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.SpanNames=void 0;var Byt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Byt=sO.SpanNames||(sO.SpanNames={}))});var sOe=F(rr=>{"use strict";m();Object.defineProperty(rr,"__esModule",{value:!0});rr.sanitizedErrorMessage=rr.isObjectWithTextString=rr.getErrorMessage=rr.patchClientConnectCallback=rr.patchCallbackPGPool=rr.updateCounter=rr.getPoolName=rr.patchCallback=rr.handleExecutionResult=rr.handleConfigQuery=rr.shouldSkipInstrumentation=rr.getSemanticAttributesFromPoolConnection=rr.getSemanticAttributesFromConnection=rr.getConnectionString=rr.parseAndMaskConnectionString=rr.parseNormalizedOperationName=rr.getQuerySpanName=void 0;var Z_=(Ge(),Me(We)),DF=tJ(),Yd=(Jn(),Me(Ur)),pi=nJ(),Ey=rn(),tOe=rJ();function nOe(e,t){if(!t)return tOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:rOe(t.text);return`${tOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}rr.getQuerySpanName=nOe;function rOe(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}rr.parseNormalizedOperationName=rOe;function oOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}rr.parseAndMaskConnectionString=oOe;function oJ(e){if("connectionString"in e&&e.connectionString)return oOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}rr.getConnectionString=oJ;function BF(e){if(Number.isInteger(e))return e}function iOe(e,t){let n={};return t&Ey.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:BF(e.port)}),t&Ey.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]:BF(e.port)}),n}rr.getSemanticAttributesFromConnection=iOe;function Nyt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[DF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[DF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Ey.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]:oJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||BF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Ey.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)||BF(e.port)}),r}rr.getSemanticAttributesFromPoolConnection=Nyt;function Oyt(e){return e.requireParentSpan===!0&&Z_.trace.getSpan(Z_.context.active())===void 0}rr.shouldSkipInstrumentation=Oyt;function wyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=nOe(i,r),c=e.startSpan(a,{kind:Z_.SpanKind.CLIENT,attributes:iOe(o,n)});if(!r)return c;if(r.text&&(n&Ey.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Ey.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(DF.AttributeNames.PG_VALUES,d)}catch(d){Z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(DF.AttributeNames.PG_PLAN,r.name),c}rr.handleConfigQuery=wyt;function aOe(e,t,n){typeof e.responseHook=="function"&&(0,Ey.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&Z_.diag.error("Error running response hook",r)},!0)}rr.handleExecutionResult=aOe;function kyt(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(NF(a)),t.setStatus({code:Z_.SpanStatusCode.ERROR,message:a.message})):aOe(e,t,c),o(),t.end(),n.call(this,a,c)}}rr.patchCallback=kyt;function Myt(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()}rr.getPoolName=Myt;function Pyt(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}}rr.updateCounter=Pyt;function Uyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}rr.patchCallbackPGPool=Uyt;function Lyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}rr.patchClientConnectCallback=Lyt;function Qyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}rr.getErrorMessage=Qyt;function Fyt(e){return typeof e=="object"&&typeof e?.text=="string"}rr.isObjectWithTextString=Fyt;function NF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}rr.sanitizedErrorMessage=NF});var uOe=F(Uv=>{"use strict";m();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.66.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var AOe=F(wF=>{"use strict";m();Object.defineProperty(wF,"__esModule",{value:!0});wF.PgInstrumentation=void 0;var Hu=rn(),Fr=(Ge(),Me(We)),cOe=eOe(),Ko=sOe(),lOe=GK(),dOe=uOe(),pOe=rJ(),OF=Tr(),uf=(Jn(),Me(Ur)),uO=nJ();function Lv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iJ=class extends Hu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(dOe.PACKAGE_NAME,dOe.PACKAGE_VERSION,t),this._semconvStability=(0,Hu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(uf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Fr.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(uO.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(uO.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 Hu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Hu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Hu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Lv(c);return this._patchPgClient(d.Client),c},c=>{let d=Lv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Hu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Lv(c);return(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Lv(c);(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Lv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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=Lv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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(pOe.SpanNames.CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return fOe(a,c)}}recordOperationDuration(t,n){let r={},o=[uf.ATTR_DB_NAMESPACE,uf.ATTR_ERROR_TYPE,uf.ATTR_SERVER_PORT,uf.ATTR_SERVER_ADDRESS,uf.ATTR_DB_OPERATION_NAME];this._semconvStability&Hu.SemconvStability.OLD&&o.push(uO.ATTR_DB_SYSTEM),this._semconvStability&Hu.SemconvStability.STABLE&&o.push(uf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,OF.hrTimeToMilliseconds)((0,OF.hrTimeDuration)(n,(0,OF.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,OF.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={[uO.ATTR_DB_SYSTEM]:uO.DB_SYSTEM_VALUE_POSTGRESQL,[uf.ATTR_DB_NAMESPACE]:this.database,[uf.ATTR_SERVER_PORT]:this.connectionParameters.port,[uf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[uf.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,lOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,lOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Fr.trace.getSpan(Fr.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]=Fr.context.bind(Fr.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=Fr.context.bind(Fr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,Hu.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:Fr.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:Fr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[cOe.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[cOe.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(pOe.SpanNames.POOL_CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return fOe(a,c)}}};wF.PgInstrumentation=iJ;function fOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Fr.context.bind(Fr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var mOe=F(Qv=>{"use strict";m();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.AttributeNames=Qv.PgInstrumentation=void 0;var Gyt=AOe();Object.defineProperty(Qv,"PgInstrumentation",{enumerable:!0,get:function(){return Gyt.PgInstrumentation}});var jyt=tJ();Object.defineProperty(Qv,"AttributeNames",{enumerable:!0,get:function(){return jyt.AttributeNames}})});var gOe,hOe,_Oe,Hyt,EOe,SOe=O(()=>{m();gOe=ie(mOe(),1);mr();hOe="Postgres",_Oe=st(hOe,gOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Lr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Hyt=e=>({name:hOe,setupOnce(){_Oe(e)}}),EOe=Hyt});var W_,sJ,yOe,zyt,$yt,TOe,aJ,Vyt,IOe,COe=O(()=>{m();Ge();W_=ie(rn(),1);Jn();dt();mr();cy();sJ="PostgresJs",yOe=[">=3.0.0 <4"],zyt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,$yt=Symbol.for("sentry.query.from.instrumented.sql"),TOe=st(sJ,e=>new aJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),aJ=class extends W_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Zn,t)}init(){let t=new W_.InstrumentationNodeModuleDefinition("postgres",yOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ta&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new W_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,yOe,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 Ta&&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 Ta&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return aq(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:(rN(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($C,r);return}let o=n?.match(zyt);o?.[1]&&t.setAttribute($C,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[$yt])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=>{Lr(c,"auto.db.postgresjs"),c.setAttributes({[xS]:"postgres",[_5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,W_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ta&&J.error(`Error in requestHook for ${sJ} 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){Ta&&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(E5,v?.[0]?.code||"unknown"),c.setAttribute(S5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ta&&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}},Vyt=e=>({name:sJ,setupOnce(){TOe(e)}}),IOe=Vyt});var bOe=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SeverityNumber=void 0;var qyt;(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"})(qyt=cO.SeverityNumber||(cO.SeverityNumber={}))});var MF=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.NOOP_LOGGER=Fv.NoopLogger=void 0;var kF=class{emit(t){}};Fv.NoopLogger=kF;Fv.NOOP_LOGGER=new kF});var UF=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.NOOP_LOGGER_PROVIDER=Gv.NoopLoggerProvider=void 0;var Yyt=MF(),PF=class{getLogger(t,n,r){return new Yyt.NoopLogger}};Gv.NoopLoggerProvider=PF;Gv.NOOP_LOGGER_PROVIDER=new PF});var cJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLogger=void 0;var Kyt=MF(),uJ=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):Kyt.NOOP_LOGGER}};LF.ProxyLogger=uJ});var dJ=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF.ProxyLoggerProvider=void 0;var Jyt=UF(),Zyt=cJ(),lJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Zyt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Jyt.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)}};QF.ProxyLoggerProvider=lJ});var vOe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;FF._globalThis=typeof globalThis=="object"?globalThis:global});var ROe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var Wyt=vOe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return Wyt._globalThis}})});var xOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF._globalThis=void 0;var Xyt=ROe();Object.defineProperty(jF,"_globalThis",{enumerable:!0,get:function(){return Xyt._globalThis}})});var DOe=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;var eTt=xOe();kA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");kA._global=eTt._globalThis;function tTt(e,t,n){return r=>r===e?t:n}kA.makeGetter=tTt;kA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var NOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.LogsAPI=void 0;var Kd=DOe(),nTt=UF(),BOe=dJ(),pJ=class e{constructor(){this._proxyLoggerProvider=new BOe.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,nTt.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 BOe.ProxyLoggerProvider}};HF.LogsAPI=pJ});var fJ=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 rTt=bOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return rTt.SeverityNumber}});var OOe=MF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return OOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return OOe.NoopLogger}});var wOe=UF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return wOe.NoopLoggerProvider}});var oTt=cJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return oTt.ProxyLogger}});var iTt=dJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return iTt.ProxyLoggerProvider}});var aTt=NOe();ns.logs=aTt.LogsAPI.getInstance()});var kOe=F(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.disableInstrumentations=jv.enableInstrumentations=void 0;function sTt(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()}}jv.enableInstrumentations=sTt;function uTt(e){e.forEach(t=>t.disable())}jv.disableInstrumentations=uTt});var UOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var MOe=(Ge(),Me(We)),cTt=fJ(),POe=kOe();function lTt(e){let t=e.tracerProvider||MOe.trace.getTracerProvider(),n=e.meterProvider||MOe.metrics.getMeterProvider(),r=e.loggerProvider||cTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,POe.enableInstrumentations)(o,t,n,r),()=>{(0,POe.disableInstrumentations)(o)}}zF.registerInstrumentations=lTt});var VOe=F($F=>{"use strict";m();Object.defineProperty($F,"__esModule",{value:!0});$F.satisfies=void 0;var hJ=(Ge(),Me(We)),jOe=/^(?: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-]+)*))?$/,dTt=/^(?<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-]+)*))?$/,pTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function fTt(e,t,n){if(!ATt(e))return hJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=_Tt(e);if(!r)return!1;let o=[],i=HOe(r,t,o,n);return i&&!n?.includePrerelease?gTt(r,o):i}$F.satisfies=fTt;function ATt(e){return typeof e=="string"&&jOe.test(e)}function HOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(AJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=QTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!AJ(e,i,n,r))return!1;return!0}return AJ(e,t,n,r)}function AJ(e,t,n,r){if(t=hTt(t,r),t.includes(" "))return HOe(e,t,n,r);{let o=ETt(t);return n.push(o),mTt(e,o)}}function mTt(e,t){if(t.invalid)return!1;if(!t.version||gJ(t.version))return!0;let n=QOe(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=QOe(r,o)}return pTt[t.op]?.includes(n)}function gTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function hTt(e,t){return e=e.trim(),e=UTt(e,t),e=PTt(e),e=LTt(e,t),e=e.trim(),e}function zu(e){return!e||e.toLowerCase()==="x"||e==="*"}function _Tt(e){let t=e.match(jOe);if(!t){hJ.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 ETt(e){if(!e)return{};let t=e.match(dTt);if(!t)return hJ.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 gJ(e){return e==="*"||e==="x"||e==="X"}function LOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function STt(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 yTt(e,t){if(gJ(e)||gJ(t))return 0;let[n,r]=STt(LOe(e),LOe(t));return n>r?1:n<r?-1:0}function QOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=yTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zOe="[a-zA-Z0-9-]",$Oe="0|[1-9]\\d*",TTt=`\\d*[a-zA-Z-]${zOe}*`,ITt="((?:<|>)?=?)",FOe=`(?:${$Oe}|${TTt})`,CTt=`(?:-(${FOe}(?:\\.${FOe})*))`,GOe=`${zOe}+`,bTt=`(?:\\+(${GOe}(?:\\.${GOe})*))`,mJ=`${$Oe}|x|X|\\*`,lO=`[v=\\s]*(${mJ})(?:\\.(${mJ})(?:\\.(${mJ})(?:${CTt})?${bTt}?)?)?`,vTt=`^${ITt}\\s*${lO}$`,RTt=new RegExp(vTt),xTt=`^\\s*(${lO})\\s+-\\s+(${lO})\\s*$`,DTt=new RegExp(xTt),BTt="(?:~>?)",NTt=`^${BTt}${lO}$`,OTt=new RegExp(NTt),wTt="(?:\\^)",kTt=`^${wTt}${lO}$`,MTt=new RegExp(kTt);function PTt(e){let t=OTt;return e.replace(t,(n,r,o,i,a)=>{let c;return zu(r)?c="":zu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:zu(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 UTt(e,t){let n=MTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return zu(i)?g="":zu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:zu(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 LTt(e,t){let n=RTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=zu(i),h=g||zu(a),S=h||zu(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 QTt(e,t){let n=DTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(zu(i)?o="":zu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:zu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,zu(S)?h="":zu(y)?h=`<${+S+1}.0.0-0`:zu(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 _J=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 dO(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 FTt=(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 dO(o,"__original",r),dO(o,"__unwrap",()=>{e[t]===o&&dO(e,t,r)}),dO(o,"__wrapped",!0),dO(e,t,o),o};Os.wrap=FTt;var GTt=(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=GTt;var jTt=(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=jTt;var HTt=(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=HTt;function pO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=pO;pO.wrap=Os.wrap;pO.massWrap=Os.massWrap;pO.unwrap=Os.unwrap;pO.massUnwrap=Os.massUnwrap});var qOe=F(qF=>{"use strict";m();Object.defineProperty(qF,"__esModule",{value:!0});qF.InstrumentationAbstract=void 0;var EJ=(Ge(),Me(We)),zTt=fJ(),VF=_J(),SJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EJ.diag.createComponentLogger({namespace:t}),this._tracer=EJ.trace.getTracer(t,n),this._meter=EJ.metrics.getMeter(t,n),this._logger=zTt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=VF.wrap;_unwrap=VF.unwrap;_massWrap=VF.massWrap;_massUnwrap=VF.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)}}};qF.InstrumentationAbstract=SJ});var YOe=F(X_=>{"use strict";m();Object.defineProperty(X_,"__esModule",{value:!0});X_.ModuleNameTrie=X_.ModuleNameSeparator=void 0;X_.ModuleNameSeparator="/";var YF=class{hooks=[];children=new Map},yJ=class{_trie=new YF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(X_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new YF,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(X_.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))}};X_.ModuleNameTrie=yJ});var JOe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.RequireInTheMiddleSingleton=void 0;var $Tt=kS(),KOe=Fe("path"),TJ=YOe(),VTt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),IJ=class e{_moduleNameTrie=new TJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new $Tt.Hook(null,{internals:!0},(t,n,r)=>{let o=qTt(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 VTt?new e:this._instance=this._instance??new e}};KF.RequireInTheMiddleSingleton=IJ;function qTt(e){return KOe.sep!==TJ.ModuleNameSeparator?e.split(KOe.sep).join(TJ.ModuleNameSeparator):e}});var CJ=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.isWrapped=eE.safeExecuteInTheMiddleAsync=eE.safeExecuteInTheMiddle=void 0;function YTt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}eE.safeExecuteInTheMiddle=YTt;async function KTt(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}}eE.safeExecuteInTheMiddleAsync=KTt;function JTt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}eE.isWrapped=JTt});var XOe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.InstrumentationBase=void 0;var fO=Fe("path"),ZOe=Fe("util"),ZTt=VOe(),bJ=_J(),WTt=qOe(),XTt=JOe(),eIt=iK(),AO=(Ge(),Me(We)),tIt=kS(),nIt=Fe("fs"),rIt=CJ(),vJ=class extends WTt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=XTt.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,rIt.isWrapped)(t[n])&&this._unwrap(t,n),ZOe.types.isProxy(t)){let o=(0,bJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,bJ.wrap)(t,n,r)};_unwrap=(t,n)=>ZOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,bJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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=Fe.resolve(n);Fe.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,nIt.readFileSync)(fO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{AO.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 WOe(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=fO.normalize(r);return a.filter(g=>g.name===c).filter(g=>WOe(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&&fO.isAbsolute(c)){let g=fO.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=fO.isAbsolute(t.name)?new tIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new eIt.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}};JF.InstrumentationBase=vJ;function WOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,ZTt.satisfies)(t,r,{includePrerelease:n}))}});var ewe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.normalize=void 0;var oIt=Fe("path");Object.defineProperty(ZF,"normalize",{enumerable:!0,get:function(){return oIt.normalize}})});var twe=F(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.normalize=Hv.InstrumentationBase=void 0;var iIt=XOe();Object.defineProperty(Hv,"InstrumentationBase",{enumerable:!0,get:function(){return iIt.InstrumentationBase}});var aIt=ewe();Object.defineProperty(Hv,"normalize",{enumerable:!0,get:function(){return aIt.normalize}})});var RJ=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.normalize=zv.InstrumentationBase=void 0;var nwe=twe();Object.defineProperty(zv,"InstrumentationBase",{enumerable:!0,get:function(){return nwe.InstrumentationBase}});Object.defineProperty(zv,"normalize",{enumerable:!0,get:function(){return nwe.normalize}})});var rwe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleDefinition=void 0;var xJ=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||[]}};WF.InstrumentationNodeModuleDefinition=xJ});var owe=F(XF=>{"use strict";m();Object.defineProperty(XF,"__esModule",{value:!0});XF.InstrumentationNodeModuleFile=void 0;var sIt=RJ(),DJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,sIt.normalize)(t)}};XF.InstrumentationNodeModuleFile=DJ});var iwe=F(Sy=>{"use strict";m();Object.defineProperty(Sy,"__esModule",{value:!0});Sy.semconvStabilityFromStr=Sy.SemconvStability=void 0;var e3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(e3=Sy.SemconvStability||(Sy.SemconvStability={}));function uIt(e,t){let n=e3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=e3.DUPLICATE;break}else o.toLowerCase()===e&&(n=e3.STABLE);return n}Sy.semconvStabilityFromStr=uIt});var swe=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 cIt=UOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return cIt.registerInstrumentations}});var lIt=RJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return lIt.InstrumentationBase}});var dIt=rwe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return dIt.InstrumentationNodeModuleDefinition}});var pIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return pIt.InstrumentationNodeModuleFile}});var BJ=CJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return BJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddleAsync}});var awe=iwe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return awe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return awe.semconvStabilityFromStr}})});function mIt(){let e=$v[OJ];return e?.helper?e.helper:$v[NJ]?.helper}function gIt(e){let t={helper:e};$v[OJ]=t,$v[NJ]=t}function hIt(){delete $v[OJ],delete $v[NJ]}function SIt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}function lwe(e,t,n,r,o){if(dwe(t.name,o))return;let i={attributes:t.attributes,kind:SIt(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)lwe(e,d,n,r,o);a.end(t.endTime)})}function uwe(e,t){return TIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function TIt(e){return e!=null&&typeof e.then=="function"}function dwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var t3,fIt,AIt,NJ,OJ,$v,_It,EIt,yIt,pwe,cwe,IIt,CIt,fwe,Awe=O(()=>{m();Ge();t3=ie(swe(),1);Ge();fIt={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"}},AIt=fIt.version.split(".")[0],NJ="PRISMA_INSTRUMENTATION",OJ=`V${AIt}_PRISMA_INSTRUMENTATION`,$v=globalThis;_It=process.env.PRISMA_SHOW_ALL_TRACES==="true",EIt="00-10-10-00";yIt=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}`:EIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)lwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!_It)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(dwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return uwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>uwe(i,t(i,r)))}};pwe={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},cwe=pwe.version,IIt=pwe.name,CIt="@prisma/client",fwe=class extends t3.InstrumentationBase{tracerProvider;constructor(e={}){super(IIt,cwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new t3.InstrumentationNodeModuleDefinition(CIt,[cwe])]}enable(){let e=this._config;gIt(new yIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){hIt()}isEnabled(){return mIt()!==void 0}}});function bIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function gwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function vIt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}var mwe,wJ,RIt,hwe,_we=O(()=>{m();Ge();Awe();dt();mr();mwe="Prisma";wJ=class extends fwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=gwe();bIt(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=vIt(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}})}};RIt=st(mwe,e=>new wJ(e)),hwe=e=>({name:mwe,setupOnce(){RIt(e)},setup(t){gwe()&&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 Ewe=F(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.60.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kJ=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.HapiLifecycleMethodNames=MA.HapiLayerType=MA.handlerPatched=MA.HapiComponentName=void 0;MA.HapiComponentName="@hapi/hapi";MA.handlerPatched=Symbol("hapi-handler-patched");MA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};MA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var Swe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.ATTR_HTTP_METHOD=void 0;n3.ATTR_HTTP_METHOD="http.method"});var MJ=F(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.AttributeNames=void 0;var xIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(xIt=mO.AttributeNames||(mO.AttributeNames={}))});var Iwe=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 ywe=(Jn(),Me(Ur)),DIt=Swe(),gO=kJ(),tE=MJ(),Twe=rn();function BIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=BIt;var NIt=e=>typeof e=="string"&&gO.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=NIt;var OIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=OIt;var wIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=wIt;var kIt=e=>!Array.isArray(e);ra.isPatchableExtMethod=kIt;var MIt=(e,t,n)=>{let r={[ywe.ATTR_HTTP_ROUTE]:e.path};t&Twe.SemconvStability.OLD&&(r[DIt.ATTR_HTTP_METHOD]=e.method),t&Twe.SemconvStability.STABLE&&(r[ywe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.PLUGIN,r[tE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=MIt;var PIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT,[tE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT},name:r}};ra.getExtMetadata=PIt;var UIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=UIt});var vwe=F(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.HapiInstrumentation=void 0;var Ql=(Ge(),Me(We)),Cwe=Tr(),hO=rn(),bwe=Ewe(),_O=kJ(),Dg=Iwe(),PJ=class extends hO.InstrumentationBase{_semconvStability;constructor(t={}){super(bwe.PACKAGE_NAME,bwe.PACKAGE_VERSION,t),this._semconvStability=(0,hO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new hO.InstrumentationNodeModuleDefinition(_O.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,hO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,hO.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,Dg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Dg.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,Dg.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,Dg.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,Dg.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,Dg.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,Dg.isPatchableExtMethod)(t))return t[_O.handlerPatched]===!0?t:(t[_O.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Dg.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[_O.handlerPatched]===!0)return t;t[_O.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,Cwe.getRPCMetadata)(Ql.context.active());c?.type===Cwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Dg.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}};r3.HapiInstrumentation=PJ});var Rwe=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.AttributeNames=qv.HapiInstrumentation=void 0;var LIt=vwe();Object.defineProperty(qv,"HapiInstrumentation",{enumerable:!0,get:function(){return LIt.HapiInstrumentation}});var QIt=MJ();Object.defineProperty(qv,"AttributeNames",{enumerable:!0,get:function(){return QIt.AttributeNames}})});var xwe,Dwe,Bwe,FIt,Nwe,Owe=O(()=>{m();xwe=ie(Rwe(),1);mr();Dwe="Hapi",Bwe=st(Dwe,()=>new xwe.HapiInstrumentation),FIt=()=>({name:Dwe,setupOnce(){Bwe()}}),Nwe=FIt});var nE,EO,UJ=O(()=>{m();nE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},EO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var i3,GIt,jIt,o3,wwe=O(()=>{m();Ge();i3=ie(rn(),1);dt();UJ();GIt="@sentry/instrumentation-hono",jIt="0.0.1",o3=class extends i3.InstrumentationBase{constructor(t={}){super(GIt,jIt,t)}init(){return[new i3.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({[nE.HONO_TYPE]:g,[nE.HONO_NAME]:g===EO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[nE.HONO_TYPE]:d,[nE.HONO_NAME]:d===EO.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?EO.MIDDLEWARE:EO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function HIt(e){let t=Ot(e).data,n=t[nE.HONO_TYPE];if(t[Zt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Zt]:`${n}.hono`});let r=t[nE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ng],i=t[DS];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var kwe,Mwe,zIt,Pwe,Uwe=O(()=>{m();Jn();dt();mr();cy();UJ();wwe();kwe="Hono";Mwe=st(kwe,()=>new o3({responseHook:e=>{HIt(e)}})),zIt=()=>({name:kwe,setupOnce(){Mwe()}}),Pwe=zIt});var a3=F(SO=>{"use strict";m();Object.defineProperty(SO,"__esModule",{value:!0});SO.KoaLayerType=void 0;var $It;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})($It=SO.KoaLayerType||(SO.KoaLayerType={}))});var Lwe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var LJ=F(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var VIt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(VIt=yO.AttributeNames||(yO.AttributeNames={}))});var Fwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.isLayerIgnored=Kv.getMiddlewareMetadata=void 0;var Qwe=a3(),s3=LJ(),qIt=(Jn(),Me(Ur)),YIt=(e,t,n,r)=>n?{attributes:{[s3.AttributeNames.KOA_NAME]:r?.toString(),[s3.AttributeNames.KOA_TYPE]:Qwe.KoaLayerType.ROUTER,[qIt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[s3.AttributeNames.KOA_NAME]:t.name??"middleware",[s3.AttributeNames.KOA_TYPE]:Qwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Kv.getMiddlewareMetadata=YIt;var KIt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Kv.isLayerIgnored=KIt});var Gwe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.kLayerPatched=void 0;u3.kLayerPatched=Symbol("koa-layer-patched")});var qwe=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.KoaInstrumentation=void 0;var PA=(Ge(),Me(We)),TO=rn(),jwe=a3(),Hwe=Lwe(),zwe=Fwe(),$we=Tr(),Vwe=Gwe(),QJ=class extends TO.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return new TO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,TO.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,TO.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){PA.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?jwe.KoaLayerType.ROUTER:jwe.KoaLayerType.MIDDLEWARE;return t[Vwe.kLayerPatched]===!0||(0,zwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(PA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Vwe.kLayerPatched]=!0,PA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(PA.trace.getSpan(PA.context.active())===void 0)return t(i,a);let d=(0,zwe.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,$we.getRPCMetadata)(PA.context.active());h?.type===$we.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,TO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&PA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=PA.trace.setSpan(PA.context.active(),g);return PA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};c3.KoaInstrumentation=QJ});var Ywe=F(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.KoaLayerType=rE.AttributeNames=rE.KoaInstrumentation=void 0;var JIt=qwe();Object.defineProperty(rE,"KoaInstrumentation",{enumerable:!0,get:function(){return JIt.KoaInstrumentation}});var ZIt=LJ();Object.defineProperty(rE,"AttributeNames",{enumerable:!0,get:function(){return ZIt.AttributeNames}});var WIt=a3();Object.defineProperty(rE,"KoaLayerType",{enumerable:!0,get:function(){return WIt.KoaLayerType}})});var Kwe,Jwe,Zwe,XIt,Wwe,Xwe=O(()=>{m();Kwe=ie(Ywe(),1);Jn();dt();mr();cy();Jwe="Koa",Zwe=st(Jwe,Kwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Lr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Zt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ng],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),XIt=(e={})=>({name:Jwe,setupOnce(){Zwe(e)}}),Wwe=XIt});var FJ=F(cf=>{"use strict";m();Object.defineProperty(cf,"__esModule",{value:!0});cf.ConnectNames=cf.ConnectTypes=cf.AttributeNames=void 0;var eCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(eCt=cf.AttributeNames||(cf.AttributeNames={}));var tCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(tCt=cf.ConnectTypes||(cf.ConnectTypes={}));var nCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(nCt=cf.ConnectNames||(cf.ConnectNames={}))});var eke=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.PACKAGE_NAME=Jv.PACKAGE_VERSION=void 0;Jv.PACKAGE_VERSION="0.57.0";Jv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var tke=F(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3._LAYERS_STORE_PROPERTY=void 0;l3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var nke=F(iE=>{"use strict";m();Object.defineProperty(iE,"__esModule",{value:!0});iE.generateRoute=iE.replaceCurrentStackRoute=iE.addNewStackLayer=void 0;var rCt=(Ge(),Me(We)),oE=tke(),oCt=e=>{Array.isArray(e[oE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,oE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[oE._LAYERS_STORE_PROPERTY].push("/");let t=e[oE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[oE._LAYERS_STORE_PROPERTY].length?e[oE._LAYERS_STORE_PROPERTY].pop():rCt.diag.warn("Connect: Trying to pop the stack multiple time")}};iE.addNewStackLayer=oCt;var iCt=(e,t)=>{t&&e[oE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};iE.replaceCurrentStackRoute=iCt;var aCt=e=>e[oE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);iE.generateRoute=aCt});var ike=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.ConnectInstrumentation=aE.ANONYMOUS_NAME=void 0;var sCt=(Ge(),Me(We)),rke=Tr(),Zv=FJ(),oke=eke(),d3=rn(),uCt=(Jn(),Me(Ur)),GJ=nke();aE.ANONYMOUS_NAME="anonymous";var jJ=class extends d3.InstrumentationBase{constructor(t={}){super(oke.PACKAGE_NAME,oke.PACKAGE_VERSION,t)}init(){return[new d3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,d3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,d3.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=Zv.ConnectTypes.REQUEST_HANDLER,i=Zv.ConnectNames.REQUEST_HANDLER,o=t):(r=Zv.ConnectTypes.MIDDLEWARE,i=Zv.ConnectNames.MIDDLEWARE,o=n.name||aE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[uCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Zv.AttributeNames.CONNECT_TYPE]:r,[Zv.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,GJ.replaceCurrentStackRoute)(g,t);let y=(0,rke.getRPCMetadata)(sCt.context.active());t&&y?.type===rke.RPCType.HTTP&&(y.route=(0,GJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||aE.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,GJ.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)}}};aE.ConnectInstrumentation=jJ});var ske=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 ake=ike();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ake.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ake.ANONYMOUS_NAME}});var HJ=FJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return HJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return HJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return HJ.ConnectTypes}})});var uke,cke,lke,cCt,dke,pke=O(()=>{m();uke=ie(ske(),1);mr();cke="Connect",lke=st(cke,()=>new uke.ConnectInstrumentation),cCt=()=>({name:cke,setupOnce(){lke()}}),dke=cCt});var fke=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 Ake=F(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.once=Wv.getSpanName=void 0;function lCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Wv.getSpanName=lCt;var dCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wv.once=dCt});var mke=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.PACKAGE_NAME=Xv.PACKAGE_VERSION=void 0;Xv.PACKAGE_VERSION="0.33.0";Xv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Ske=F(uE=>{"use strict";m();Object.defineProperty(uE,"__esModule",{value:!0});uE.TediousInstrumentation=uE.INJECTED_CTX=void 0;var eR=(Ge(),Me(We)),pCt=Fe("events"),UA=rn(),yy=(Jn(),Me(Ur)),sE=fke(),gke=Ake(),hke=mke(),Eke=Symbol("opentelemetry.instrumentation-tedious.current-database");uE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var _ke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function p3(e){Object.defineProperty(this,Eke,{value:e,writable:!0})}var zJ=class e extends UA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(hke.PACKAGE_NAME,hke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,UA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,UA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new UA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of _ke)(0,UA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,UA.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 _ke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return p3.call(this,this.config?.options?.database),this.removeListener("databaseChange",p3),this.on("databaseChange",p3),this.once("end",()=>{this.removeListener("databaseChange",p3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||eR.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,uE.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?.[uE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof pCt.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[Eke],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_DB_SYSTEM]=sE.DB_SYSTEM_VALUE_MSSQL,C[sE.ATTR_DB_NAME]=S,C[sE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[sE.ATTR_DB_STATEMENT]=y,C[sE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&UA.SemconvStability.STABLE&&(C[yy.ATTR_DB_NAMESPACE]=S,C[yy.ATTR_DB_SYSTEM_NAME]=yy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[yy.ATTR_DB_QUERY_TEXT]=y,C[yy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_NET_PEER_NAME]=this.config?.server,C[sE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&UA.SemconvStability.STABLE&&(C[yy.ATTR_SERVER_ADDRESS]=this.config?.server,C[yy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,gke.getSpanName)(t,S,y,a.table),{kind:eR.SpanKind.CLIENT,attributes:C}),x=(0,gke.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:eR.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=()=>eR.context.with(eR.trace.setSpan(eR.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)}}};uE.TediousInstrumentation=zJ});var yke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.TediousInstrumentation=void 0;var fCt=Ske();Object.defineProperty(f3,"TediousInstrumentation",{enumerable:!0,get:function(){return fCt.TediousInstrumentation}})});var Tke,ACt,Ike,Cke,mCt,bke,vke=O(()=>{m();Tke=ie(yke(),1);dt();mr();ACt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Ike="Tedious",Cke=st(Ike,()=>new Tke.TediousInstrumentation({})),mCt=()=>{let e;return{name:Ike,setupOnce(){let t=Cke();e=iN(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]||"";ACt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},bke=mCt});var Rke=F(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.PACKAGE_NAME=tR.PACKAGE_VERSION=void 0;tR.PACKAGE_VERSION="0.57.0";tR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Dke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var nR=(Ge(),Me(We)),Ty=rn(),xke=Rke(),$J="generic-pool",VJ=class extends Ty.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(xke.PACKAGE_NAME,xke.PACKAGE_VERSION,t)}init(){return[new Ty.InstrumentationNodeModuleDefinition($J,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Ty.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 Ty.InstrumentationNodeModuleDefinition($J,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Ty.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 Ty.InstrumentationNodeModuleDefinition($J,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Ty.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=nR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return nR.context.with(nR.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=nR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return nR.context.with(nR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};A3.GenericPoolInstrumentation=VJ});var Bke=F(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.GenericPoolInstrumentation=void 0;var gCt=Dke();Object.defineProperty(m3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return gCt.GenericPoolInstrumentation}})});var Nke,Oke,wke,hCt,kke,Mke=O(()=>{m();Nke=ie(Bke(),1);dt();mr();Oke="GenericPool",wke=st(Oke,()=>new Nke.GenericPoolInstrumentation({})),hCt=()=>{let e;return{name:Oke,setupOnce(){let t=wke();e=iN(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")}))}}},kke=hCt});var qJ=F(LA=>{"use strict";m();Object.defineProperty(LA,"__esModule",{value:!0});LA.ATTR_NET_PEER_PORT=LA.ATTR_NET_PEER_NAME=LA.ATTR_MESSAGING_SYSTEM=LA.ATTR_MESSAGING_OPERATION=void 0;LA.ATTR_MESSAGING_OPERATION="messaging.operation";LA.ATTR_MESSAGING_SYSTEM="messaging.system";LA.ATTR_NET_PEER_NAME="net.peer.name";LA.ATTR_NET_PEER_PORT="net.peer.port"});var YJ=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 KJ=F(Iy=>{"use strict";m();Object.defineProperty(Iy,"__esModule",{value:!0});Iy.DEFAULT_CONFIG=Iy.EndOperation=void 0;var _Ct;(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"})(_Ct=Iy.EndOperation||(Iy.EndOperation={}));Iy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Qke=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 JJ=(Ge(),Me(We)),cE=rn(),g3=(Jn(),Me(Ur)),IO=qJ(),h3=YJ();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 ZJ=(0,JJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),ECt=e=>e!==""?e:"<default>";Ai.normalizeExchange=ECt;var SCt=e=>e.replace(/:[^:@/]*@/,":***@"),Pke=(e,t)=>e||(t==="AMQP"?5672:5671),Uke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Lke=e=>e||"localhost",QA=(e,t,n,r)=>n?{[t]:n}:(JJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),yCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[IO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=yCt;var TCt=(e,t)=>{let n={[h3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Uke(r?.protocol);Object.assign(n,{...QA(e,h3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Lke(r?.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(e,IO.ATTR_NET_PEER_NAME,i,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(e,g3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Pke(r.port,o);t&cE.SemconvStability.OLD&&Object.assign(n,QA(e,IO.ATTR_NET_PEER_PORT,a,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(e,g3.ATTR_SERVER_PORT,a,"port"))}else{let r=SCt(e);n[h3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Uke(o.protocol);Object.assign(n,{...QA(r,h3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Lke(o.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(r,IO.ATTR_NET_PEER_NAME,a,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(r,g3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Pke(o.port?parseInt(o.port):void 0,i);t&cE.SemconvStability.OLD&&Object.assign(n,QA(r,IO.ATTR_NET_PEER_PORT,c,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(r,g3.ATTR_SERVER_PORT,c,"port"))}catch(o){JJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=TCt;var ICt=e=>e.setValue(ZJ,!0);Ai.markConfirmChannelTracing=ICt;var CCt=e=>e.deleteValue(ZJ);Ai.unmarkConfirmChannelTracing=CCt;var bCt=e=>e.getValue(ZJ)===!0;Ai.isConfirmChannelTracing=bCt});var Fke=F(rR=>{"use strict";m();Object.defineProperty(rR,"__esModule",{value:!0});rR.PACKAGE_NAME=rR.PACKAGE_VERSION=void 0;rR.PACKAGE_VERSION="0.61.0";rR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var jke=F(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.AmqplibInstrumentation=void 0;var Jo=(Ge(),Me(We)),_3=Tr(),Cr=rn(),vCt=qJ(),Fl=YJ(),Vu=KJ(),mi=Qke(),Gke=Fke(),E3=[">=0.5.5 <1"],WJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(Gke.PACKAGE_NAME,Gke.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",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",E3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",E3,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,[vCt.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,_3.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,_3.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,_3.hrTimeDuration)(a.timeOfConsume,n);if((0,_3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};S3.AmqplibInstrumentation=WJ});var zke=F(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.EndOperation=lE.DEFAULT_CONFIG=lE.AmqplibInstrumentation=void 0;var RCt=jke();Object.defineProperty(lE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return RCt.AmqplibInstrumentation}});var Hke=KJ();Object.defineProperty(lE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return Hke.DEFAULT_CONFIG}});Object.defineProperty(lE,"EndOperation",{enumerable:!0,get:function(){return Hke.EndOperation}})});var $ke,Vke,xCt,qke,DCt,Yke,Kke=O(()=>{m();$ke=ie(zke(),1);mr();Vke="Amqplib",xCt={consumeEndHook:e=>{Lr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Lr(e,"auto.amqplib.otel.publisher")}},qke=st(Vke,()=>new $ke.AmqplibInstrumentation(xCt)),DCt=()=>({name:Vke,setupOnce(){qke()}}),Yke=DCt});var CO,XJ=O(()=>{m();CO="VercelAI"});function NCt(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 OCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(wCt(t.content),kCt(t.content))}function wCt(e){for(let t of e){if(!NCt(t))continue;let n=Dq(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"),tn(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"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function kCt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Bq(t.toolCallId)}function MCt(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 T3,BCt,Jke,y3,Zke=O(()=>{m();T3=ie(rn(),1);dt();XJ();BCt=[">=3.0.0 <7"],Jke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];y3=class e extends T3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Zn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new T3.InstrumentationNodeModuleDefinition("ai",BCt,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(CO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=MCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},nf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{OCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Jke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Jke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function PCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Wke,UCt,Xke,eMe=O(()=>{m();dt();mr();XJ();Zke();Wke=st(CO,()=>new y3({}));UCt=(e={})=>{let t;return{name:CO,options:e,setupOnce(){t=Wke()},afterAllSetup(n){e.force??PCt(n)?RL(n):t?.callWhenPatched(()=>RL(n))}}},Xke=UCt});var C3,LCt,I3,tMe=O(()=>{m();C3=ie(rn(),1);dt();LCt=[">=4.0.0 <7"],I3=class extends C3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Zn,t)}init(){return new C3.InstrumentationNodeModuleDefinition("openai",LCt,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(VS(k_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return BL(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 nMe,QCt,rMe,oMe=O(()=>{m();dt();mr();tMe();nMe=st(k_,e=>new I3(e)),QCt=(e={})=>({name:k_,setupOnce(){nMe(e)}}),rMe=QCt});var v3,FCt,b3,iMe=O(()=>{m();v3=ie(rn(),1);dt();FCt=[">=0.19.2 <1.0.0"],b3=class extends v3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Zn,t)}init(){return new v3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",FCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(VS(M_))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)}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 aMe,GCt,sMe,uMe=O(()=>{m();dt();mr();iMe();aMe=st(M_,e=>new b3(e)),GCt=(e={})=>({name:M_,options:e,setupOnce(){aMe(e)}}),sMe=GCt});var oR,cMe,R3,lMe=O(()=>{m();oR=ie(rn(),1);dt();cMe=[">=0.10.0 <2"],R3=class extends oR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Zn,t)}init(){return new oR.InstrumentationNodeModuleDefinition("@google/genai",cMe,n=>this._patch(n),n=>n,[new oR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",cMe,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(VS(P_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return OL(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 rN(t,"GoogleGenAI",o),t}}});var dMe,jCt,pMe,fMe=O(()=>{m();dt();mr();lMe();dMe=st(P_,e=>new R3(e)),jCt=(e={})=>({name:P_,setupOnce(){dMe(e)}}),pMe=jCt});function HCt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function zCt(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=HCt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var dE,x3,D3,AMe=O(()=>{m();dE=ie(rn(),1);dt();x3=[">=0.1.0 <2.0.0"];D3=class extends dE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Zn,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 dE.InstrumentationNodeModuleDefinition(r,x3,this._patch.bind(this),o=>o,[new dE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,x3,this._patch.bind(this),o=>o)]));return t.push(new dE.InstrumentationNodeModuleDefinition("langchain",x3,this._patch.bind(this),r=>r,[new dE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",x3,this._patch.bind(this),r=>r)])),t}_patch(t){VV([k_,M_,P_]);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]=zCt(g,n))}}}});var mMe,$Ct,gMe,hMe=O(()=>{m();dt();mr();AMe();mMe=st(wL,e=>new D3(e)),$Ct=(e={})=>({name:wL,setupOnce(){mMe(e)}}),gMe=$Ct});var iR,_Me,B3,EMe=O(()=>{m();iR=ie(rn(),1);dt();_Me=[">=0.0.0 <2.0.0"],B3=class extends iR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Zn,t)}init(){return new iR.InstrumentationNodeModuleDefinition("@langchain/langgraph",_Me,this._patch.bind(this),n=>n,[new iR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",_Me,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&LL(t.StateGraph.prototype,this.getConfig()),t}}});var SMe,VCt,yMe,TMe=O(()=>{m();dt();mr();EMe();SMe=st(UL,e=>new B3(e)),VCt=(e={})=>({name:UL,setupOnce(){SMe(e)}}),yMe=VCt});import*as CMe from"node:net";function bMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Bg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new Bg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>IMe(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 Bg.InstrumentationNodeModuleFile(h,t,S=>IMe(S,n,r,e,a),S=>vMe(S,r)));return d}function IMe(e,t,n,r,o){return vMe(e,n),t(e,"addDoc",qCt(r,o)),t(e,"getDocs",KCt(r,o)),t(e,"setDoc",JCt(r,o)),t(e,"deleteDoc",YCt(r,o)),e}function vMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Bg.isWrapped)(e[n])&&t(e,n);return e}function qCt(e,t){return function(r){return function(o,i){let a=O3(e,"addDoc",o);return t(a),N3(a,()=>r(o,i))}}}function YCt(e,t){return function(r){return function(o){let i=O3(e,"deleteDoc",o.parent||o);return t(i),N3(i,()=>r(o))}}}function KCt(e,t){return function(r){return function(o){let i=O3(e,"getDocs",o);return t(i),N3(i,()=>r(o))}}}function JCt(e,t){return function(r){return function(o,i,a){let c=O3(e,"setDoc",o.parent||o);return t(c),N3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function N3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,Bg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function O3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:oo.CLIENT});return WCt(r,n),r.setAttribute($C,t),r}function ZCt(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(CMe.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 WCt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[g5]:t.path,[h5]:n.name,[xS]:"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}=ZCt(i);c&&(a[b5]=c),d&&(a[v5]=d),e.setAttributes(a)}var Bg,RMe=O(()=>{m();Ge();Bg=ie(rn(),1);Jn()});function xMe(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,Ng.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Ng.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new Ng.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 Ng.InstrumentationNodeModuleFile(y,t,v=>XCt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>DMe(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:oo.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 XCt(e,t,n,r,o,i){switch(DMe(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 DMe(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,Ng.isWrapped)(e[r])&&t(e,r);return e}var Ng,BMe=O(()=>{m();Ge();Ng=ie(rn(),1)});var OMe,NMe,ebt,tbt,w3,wMe=O(()=>{m();OMe=ie(rn(),1);dt();RMe();BMe();NMe={},ebt=[">=3.0.0 <5"],tbt=[">=6.0.0 <7"],w3=class extends OMe.InstrumentationBase{constructor(t=NMe){super("@sentry/instrumentation-firebase",Zn,t)}setConfig(t={}){super.setConfig({...NMe,...t})}init(){let t=[];return t.push(bMe(this.tracer,ebt,this._wrap,this._unwrap,this.getConfig())),t.push(xMe(this.tracer,tbt,this._wrap,this._unwrap,this.getConfig())),t}}});var kMe,nbt,MMe,rbt,PMe,UMe=O(()=>{m();dt();mr();wMe();kMe="Firebase",nbt={firestoreSpanCreationHook:e=>{Lr(e,"auto.firebase.otel.firestore"),e.setAttribute(Zt,"db.query")},functions:{requestHook:e=>{Lr(e,"auto.firebase.otel.functions"),e.setAttribute(Zt,"http.request")},errorHook:async(e,t)=>{t&&(tn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Db(2e3))}}},MMe=st(kMe,()=>new w3(nbt)),rbt=()=>({name:kMe,setupOnce(){MMe()}}),PMe=rbt});function LMe(){return[Gxe(),y1e(),Y1e(),Pwe(),MBe(),JBe(),uNe(),SNe(),WNe(),EOe(),hwe(),Nwe(),Wwe(),dke(),bke(),kke(),dBe(),Yke(),TBe(),gMe(),yMe(),Xke(),rMe(),sMe(),pMe(),IOe(),PMe()]}var QMe=O(()=>{m();Kke();uMe();pke();jxe();C1e();UMe();Mke();fMe();J1e();Owe();Uwe();pBe();Xwe();hMe();TMe();IBe();PBe();ZBe();cNe();yNe();oMe();SOe();COe();_we();XNe();vke();eMe()});function GMe(e,t={}){e.getOptions().debug&&sY();let[n,r]=obt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function obt(e,t={}){let n=new FMe.BasicTracerProvider({sampler:new zQ(e),resource:(0,k3.defaultResource)().merge((0,k3.resourceFromAttributes)({[R5]:"node",[m5]:"sentry",[x5]:Zn})),forceFlushTimeoutMillis:500,spanProcessors:[new HQ({timeout:ibt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),Vp.setGlobalPropagator(new jQ);let r=new VQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function ibt(e){if(e!=null){if(e>eZ)return Ta&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eZ}`),eZ;if(e<=0||Number.isNaN(e)){Ta&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var k3,FMe,eZ,jMe=O(()=>{m();Ge();k3=ie(S7(),1),FMe=ie(V7(),1);Jn();dt();mr();sv();cy();eZ=1e6});function HMe(){return XQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(hxe(),vxe())}function zMe(e){return[...HMe(),...xi(e)?LMe():[]]}function tZ(e={}){return abt(e,zMe)}function abt(e={},t){qS(e,"node");let n=wY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(GMe(n,{spanProcessors:e.openTelemetrySpanProcessors}),e4()),n}var $Me=O(()=>{m();dt();mr();_xe();Rxe();QMe();jMe()});var aR=O(()=>{m();$Me();dt();mr()});function Ni(){return sbt}function Yu(){return VMe}function qMe(){return ubt}var sbt,VMe,ubt,Gl=O(()=>{"use strict";m();sbt="prod",VMe="0.1.125",ubt=`@tanagram/lore/${VMe}`});function fbt(e=""){if(!dbt.test(e))return e!==e.toLowerCase()}function YMe(e,t){let n=t??pbt,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=fbt(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 Abt(e){return e?e[0].toUpperCase()+e.slice(1):""}function mbt(e){return e?e[0].toLowerCase()+e.slice(1):""}function gbt(e,t){return e?(Array.isArray(e)?e:YMe(e)).map(n=>Abt(t?.normalize?n.toLowerCase():n)).join(""):""}function vO(e,t){return mbt(gbt(e||"",t))}function M3(e,t){return e?(Array.isArray(e)?e:YMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function KMe(e){return M3(e||"","_")}var dbt,pbt,JMe=O(()=>{m();dbt=/\d/,pbt=["-","_","/","."]});import{parseArgs as hbt}from"node:util";function Q3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nZ(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 kK(e,t,n,r=void 0){n&&(0,JN.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&UBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function vSt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kK(t,o,n,r),o)).catch(o=>{throw LBe(t,o),o}).finally(()=>t.end()):(kK(t,e,n,r),t.end(),e)}V_.handlePromiseResponse=vSt;function RSt(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?LBe(r,d):kK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}V_.handleCallbackResponse=RSt});var FBe=F(Dv=>{"use strict";m();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.PACKAGE_NAME=Dv.PACKAGE_VERSION=void 0;Dv.PACKAGE_VERSION="0.60.0";Dv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var $Be=F(Uc=>{"use strict";m();Object.defineProperty(Uc,"__esModule",{value:!0});Uc.MongooseInstrumentation=Uc._ALREADY_INSTRUMENTED=Uc._STORED_PARENT_SPAN=void 0;var Ca=(Ge(),Me(We)),xSt=Tr(),MK=QBe(),Ns=rn(),GBe=FBe(),q_=wK(),gy=(Jn(),Me(Ur)),aF=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],DSt=["remove","count","findOneAndRemove",...aF],BSt=["count","findOneAndRemove",...aF],NSt=[...aF];function jBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?DSt:e.startsWith("7.")?BSt:NSt:aF}function HBe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function zBe(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(GBe.PACKAGE_NAME,GBe.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)),zBe(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)),jBe(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=jBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HBe(n)&&this._unwrap(r.Model.prototype,"remove"),zBe(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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ns.SemconvStability.STABLE&&(c[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(g[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(y[gy.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&&Ca.trace.getSpan(Ca.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[q_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Ns.SemconvStability.STABLE&&(h[gy.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=Ca.trace.getSpan(Ca.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]=Ca.trace.getSpan(Ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,MK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ns.SemconvStability.OLD&&(a[q_.ATTR_DB_OPERATION]=r,a[q_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ns.SemconvStability.STABLE&&(a[gy.ATTR_DB_OPERATION_NAME]=r,a[gy.ATTR_DB_SYSTEM_NAME]=q_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Ns.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:Ca.SpanKind.CLIENT,attributes:a},i?Ca.trace.setSpan(Ca.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,MK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,MK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ca.context.with((0,xSt.suppressTracing)(Ca.context.active()),t):t()}};Uc.MongooseInstrumentation=PK});var VBe=F(sF=>{"use strict";m();Object.defineProperty(sF,"__esModule",{value:!0});sF.MongooseInstrumentation=void 0;var OSt=$Be();Object.defineProperty(sF,"MongooseInstrumentation",{enumerable:!0,get:function(){return OSt.MongooseInstrumentation}})});var qBe,YBe,KBe,wSt,JBe,ZBe=O(()=>{m();qBe=ie(VBe(),1);mr();YBe="Mongoose",KBe=st(YBe,()=>new qBe.MongooseInstrumentation({responseHook(e){Lr(e,"auto.db.otel.mongoose")}})),wSt=()=>({name:YBe,setupOnce(){KBe()}}),JBe=wSt});var WBe=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 XBe=F(ZN=>{"use strict";m();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.AttributeNames=void 0;var kSt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(kSt=ZN.AttributeNames||(ZN.AttributeNames={}))});var eNe=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 MSt(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=MSt;function PSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}iu.getJDBCString=PSt;function USt(e){return typeof e=="string"?e:e.sql}iu.getDbQueryText=USt;function LSt(e,t){return UK(typeof e=="string"?t:t||e.values)}iu.getDbValues=LSt;function QSt(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=QSt;function UK(e){return e?`[${e.toString()}]`:""}iu.arrayStringifyHelper=UK;function FSt(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=FSt});var tNe=F(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.PACKAGE_NAME=Bv.PACKAGE_VERSION=void 0;Bv.PACKAGE_VERSION="0.60.0";Bv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var rNe=F(uF=>{"use strict";m();Object.defineProperty(uF,"__esModule",{value:!0});uF.MySQLInstrumentation=void 0;var Lc=(Ge(),Me(We)),$d=rn(),Nv=(Jn(),Me(Ur)),xg=WBe(),GSt=XBe(),hy=eNe(),nNe=tNe(),LK=class extends $d.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(nNe.PACKAGE_NAME,nNe.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(xg.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,hy.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,hy.getConfig)(t.config),y=parseInt(g,10),C=(0,hy.getDbQueryText)(o);r._dbSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_DB_SYSTEM]=xg.DB_SYSTEM_VALUE_MYSQL,c[xg.ATTR_DB_CONNECTION_STRING]=(0,hy.getJDBCString)(d,g,h),c[xg.ATTR_DB_NAME]=h,c[xg.ATTR_DB_USER]=S,c[xg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&$d.SemconvStability.STABLE&&(c[Nv.ATTR_DB_SYSTEM_NAME]=Nv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Nv.ATTR_DB_NAMESPACE]=h,c[Nv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&$d.SemconvStability.OLD&&(c[xg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[xg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&$d.SemconvStability.STABLE&&(c[Nv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Nv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,hy.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(GSt.AttributeNames.MYSQL_VALUES,(0,hy.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,hy.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")})}};uF.MySQLInstrumentation=LK});var oNe=F(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.MySQLInstrumentation=void 0;var jSt=rNe();Object.defineProperty(cF,"MySQLInstrumentation",{enumerable:!0,get:function(){return jSt.MySQLInstrumentation}})});var iNe,aNe,sNe,HSt,uNe,cNe=O(()=>{m();iNe=ie(oNe(),1);mr();aNe="Mysql",sNe=st(aNe,()=>new iNe.MySQLInstrumentation({})),HSt=()=>({name:aNe,setupOnce(){sNe()}}),uNe=HSt});var QK=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 GK=F(lF=>{"use strict";m();Object.defineProperty(lF,"__esModule",{value:!0});lF.addSqlCommenterComment=void 0;var FK=(Ge(),Me(We)),zSt=Tr();function $St(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function VSt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function qSt(e,t){if(typeof t!="string"||t.length===0||$St(t))return t;let n=new zSt.W3CTraceContextPropagator,r={};n.inject(FK.trace.setSpan(FK.ROOT_CONTEXT,e),r,FK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=VSt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}lF.addSqlCommenterComment=qSt});var lNe=F(Vd=>{"use strict";m();Object.defineProperty(Vd,"__esModule",{value:!0});Vd.getConnectionPrototypeToInstrument=Vd.once=Vd.getSpanName=Vd.getQueryText=Vd.getConnectionAttributes=void 0;var WN=QK(),dF=rn(),jK=(Jn(),Me(Ur));function YSt(e,t,n){let{host:r,port:o,database:i,user:a}=KSt(e),c={};t&dF.SemconvStability.OLD&&(c[WN.ATTR_DB_CONNECTION_STRING]=JSt(r,o,i),c[WN.ATTR_DB_NAME]=i,c[WN.ATTR_DB_USER]=a),t&dF.SemconvStability.STABLE&&(c[jK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&dF.SemconvStability.OLD&&(c[WN.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[WN.ATTR_NET_PEER_PORT]=d)),n&dF.SemconvStability.STABLE&&(c[jK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[jK.ATTR_SERVER_PORT]=d)),c}Vd.getConnectionAttributes=YSt;function KSt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function JSt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function ZSt(e,t,n,r=!1,o=WSt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,XSt(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=ZSt;function WSt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function XSt(e){return"values"in e}function eyt(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=eyt;var tyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Vd.once=tyt;function nyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Vd.getConnectionPrototypeToInstrument=nyt});var dNe=F(Ov=>{"use strict";m();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.PACKAGE_NAME=Ov.PACKAGE_VERSION=void 0;Ov.PACKAGE_VERSION="0.60.0";Ov.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var mNe=F(pF=>{"use strict";m();Object.defineProperty(pF,"__esModule",{value:!0});pF.MySQL2Instrumentation=void 0;var pNe=(Ge(),Me(We)),sf=rn(),HK=QK(),fNe=GK(),wv=lNe(),ANe=dNe(),zK=(Jn(),Me(Ur)),$K=[">=1.4.2 <4"],VK=class extends sf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ANe.PACKAGE_NAME,ANe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sf.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,sf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,sf.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 sf.InstrumentationNodeModuleDefinition("mysql2",$K,i=>(n(i),i),()=>{},[new sf.InstrumentationNodeModuleFile("mysql2/promise.js",$K,i=>(n(i),i),()=>{}),new sf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$K,i=>{let a=(0,wv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,wv.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,wv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,wv.getQueryText)(i,t,d,g,h);o._dbSemconvStability&sf.SemconvStability.OLD&&(y[HK.ATTR_DB_SYSTEM]=HK.DB_SYSTEM_VALUE_MYSQL,y[HK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&sf.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,wv.getSpanName)(i),{kind:pNe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,fNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,fNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,wv.once)((N,k)=>{N?v.setStatus({code:pNe.SpanStatusCode.ERROR,message:N.message}):typeof S=="function"&&(0,sf.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)}}};pF.MySQL2Instrumentation=VK});var gNe=F(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.MySQL2Instrumentation=void 0;var ryt=mNe();Object.defineProperty(fF,"MySQL2Instrumentation",{enumerable:!0,get:function(){return ryt.MySQL2Instrumentation}})});var hNe,_Ne,ENe,oyt,SNe,yNe=O(()=>{m();hNe=ie(gNe(),1);mr();_Ne="Mysql2",ENe=st(_Ne,()=>new hNe.MySQL2Instrumentation({responseHook(e){Lr(e,"auto.db.otel.mysql2")}})),oyt=()=>({name:_Ne,setupOnce(){ENe()}}),SNe=oyt});var TNe=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 INe=F(AF=>{"use strict";m();Object.defineProperty(AF,"__esModule",{value:!0});AF.endSpan=void 0;var iyt=(Ge(),Me(We)),ayt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:iyt.SpanStatusCode.ERROR,message:t.message})),e.end()};AF.endSpan=ayt});var gF=F(mF=>{"use strict";m();Object.defineProperty(mF,"__esModule",{value:!0});mF.defaultDbStatementSerializer=void 0;var syt=[{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}],uyt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=syt.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};mF.defaultDbStatementSerializer=uyt});var CNe=F(kv=>{"use strict";m();Object.defineProperty(kv,"__esModule",{value:!0});kv.PACKAGE_NAME=kv.PACKAGE_VERSION=void 0;kv.PACKAGE_VERSION="0.62.0";kv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var xNe=F(hF=>{"use strict";m();Object.defineProperty(hF,"__esModule",{value:!0});hF.IORedisInstrumentation=void 0;var Y_=(Ge(),Me(We)),Qc=rn(),K_=(Jn(),Me(Ur)),Fc=TNe(),bNe=rn(),XN=INe(),cyt=gF(),vNe=CNe(),RNe={requireParentSpan:!0},qK=class extends Qc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(vNe.PACKAGE_NAME,vNe.PACKAGE_VERSION,{...RNe,...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({...RNe,...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||cyt.defaultDbStatementSerializer,c=Y_.trace.getSpan(Y_.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[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,d[K_.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[K_.ATTR_SERVER_ADDRESS]=g,d[K_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:Y_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,bNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&Y_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,bNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),Q=>{Q&&Y_.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,XN.endSpan)(y,null),x(k)};let N=o.reject;return o.reject=function(k){(0,XN.endSpan)(y,k),N(k)},v}catch(v){throw(0,XN.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=Y_.trace.getSpan(Y_.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[K_.ATTR_DB_SYSTEM_NAME]=Fc.DB_SYSTEM_NAME_VALUE_REDIS,o[K_.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[K_.ATTR_SERVER_ADDRESS]=i,o[K_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:Y_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,XN.endSpan)(c,null),d}catch(d){throw(0,XN.endSpan)(c,d),d}}}};hF.IORedisInstrumentation=qK});var DNe=F(_F=>{"use strict";m();Object.defineProperty(_F,"__esModule",{value:!0});_F.IORedisInstrumentation=void 0;var lyt=xNe();Object.defineProperty(_F,"IORedisInstrumentation",{enumerable:!0,get:function(){return lyt.IORedisInstrumentation}})});var EF=F(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.62.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var BNe=F(J_=>{"use strict";m();Object.defineProperty(J_,"__esModule",{value:!0});J_.getTracedCreateStreamTrace=J_.getTracedCreateClient=J_.endSpan=void 0;var eO=(Ge(),Me(We)),dyt=(e,t)=>{t&&e.setStatus({code:eO.SpanStatusCode.ERROR,message:t.message}),e.end()};J_.endSpan=dyt;var pyt=e=>function(){let n=e.apply(this,arguments);return eO.context.bind(eO.context.active(),n)};J_.getTracedCreateClient=pyt;var fyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){eO.context.bind(eO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};J_.getTracedCreateStreamTrace=fyt});var SF=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 ONe=F(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.RedisInstrumentationV2_V3=void 0;var Ll=rn(),yF=BNe(),NNe=EF(),tO=(Ge(),Me(We)),nO=(Jn(),Me(Ur)),_y=SF(),Ayt=gF(),YK=class e extends Ll.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(NNe.PACKAGE_NAME,NNe.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=tO.trace.getSpan(tO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||Ayt.defaultDbStatementSerializer,g={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(g,{[_y.ATTR_DB_SYSTEM]:_y.DB_SYSTEM_VALUE_REDIS,[_y.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(g,{[nO.ATTR_DB_SYSTEM_NAME]:_y.DB_SYSTEM_NAME_VALUE_REDIS,[nO.ATTR_DB_OPERATION_NAME]:i.command,[nO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:tO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ll.SemconvStability.OLD&&Object.assign(y,{[_y.ATTR_NET_PEER_NAME]:this.connection_options.host,[_y.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ll.SemconvStability.STABLE&&Object.assign(y,{[nO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[nO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ll.SemconvStability.OLD&&h.setAttribute(_y.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=tO.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,yF.endSpan)(h,v),tO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,yF.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,yF.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,yF.getTracedCreateStreamTrace)(n)}}};TF.RedisInstrumentationV2_V3=YK});var kNe=F(IF=>{"use strict";m();Object.defineProperty(IF,"__esModule",{value:!0});IF.getClientAttributes=void 0;var KK=(Jn(),Me(Ur)),Pv=SF(),wNe=rn();function myt(e,t,n){let r={};return n&wNe.SemconvStability.OLD&&Object.assign(r,{[Pv.ATTR_DB_SYSTEM]:Pv.DB_SYSTEM_VALUE_REDIS,[Pv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Pv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Pv.ATTR_DB_CONNECTION_STRING]:gyt(e,t?.url)}),n&wNe.SemconvStability.STABLE&&Object.assign(r,{[KK.ATTR_DB_SYSTEM_NAME]:Pv.DB_SYSTEM_NAME_VALUE_REDIS,[KK.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KK.ATTR_SERVER_PORT]:t?.socket?.port}),r}IF.getClientAttributes=myt;function gyt(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 LNe=F(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.RedisInstrumentationV4_V5=void 0;var qd=(Ge(),Me(We)),Eo=rn(),MNe=kNe(),hyt=gF(),PNe=EF(),JK=(Jn(),Me(Ur)),_yt=SF(),rO=Symbol("opentelemetry.instrumentation.redis.open_spans"),UNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZK=class e extends Eo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(PNe.PACKAGE_NAME,PNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Eo.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 Eo.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,Eo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,Eo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Eo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Eo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Eo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Eo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Eo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Eo.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,Eo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Eo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Eo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Eo.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[rO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[rO];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[UNe]=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[UNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||hyt.defaultDbStatementSerializer,h=(0,MNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Eo.SemconvStability.STABLE&&(h[JK.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&Eo.SemconvStability.OLD&&(h[_yt.ATTR_DB_STATEMENT]=C),this._semconvStability&Eo.SemconvStability.STABLE&&(h[JK.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[rO]=C[rO]||[],C[rO].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&Eo.SemconvStability.STABLE&&d.setAttribute(JK.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()}};CF.RedisInstrumentationV4_V5=ZK});var GNe=F(bF=>{"use strict";m();Object.defineProperty(bF,"__esModule",{value:!0});bF.RedisInstrumentation=void 0;var Eyt=rn(),QNe=EF(),Syt=ONe(),yyt=LNe(),FNe={requireParentSpan:!1},WK=class extends Eyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...FNe,...t};super(QNe.PACKAGE_NAME,QNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Syt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new yyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...FNe,...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())}};bF.RedisInstrumentation=WK});var jNe=F(vF=>{"use strict";m();Object.defineProperty(vF,"__esModule",{value:!0});vF.RedisInstrumentation=void 0;var Tyt=GNe();Object.defineProperty(vF,"RedisInstrumentation",{enumerable:!0,get:function(){return Tyt.RedisInstrumentation}})});function oO(e,t){return e.includes(t.toLowerCase())}function eJ(e){return oO(XK,e)?"cache.get":oO(Cyt,e)?"cache.put":void 0}function byt(e,t){return t.some(n=>e.startsWith(n))}function zNe(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 oO(Iyt,e)&&r!=null?n(r):HNe(t.map(o=>n(o)))}catch{return}}function $Ne(e,t,n){if(!eJ(e))return!1;for(let r of t)if(byt(r,n))return!0;return!1}function VNe(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 Iyt,XK,Cyt,qNe=O(()=>{m();Iyt=["get","set","setex"],XK=["get","mget"],Cyt=["set","setex"]});var YNe,KNe,RF,iO,JNe,vyt,Ryt,ZNe,xyt,WNe,XNe=O(()=>{m();YNe=ie(DNe(),1),KNe=ie(jNe(),1);dt();mr();qNe();RF="Redis",iO={},JNe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=zNe(t,n),i=eJ(t);if(!o||!i||!iO.cachePrefixes||!$Ne(t,o,iO.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=VNe(r);d&&e.setAttribute(oV,d),oO(XK,t)&&d!==void 0&&e.setAttribute(nV,d>0),e.setAttributes({[Zt]:i,[rV]:o});let g=o.join(", ");e.updateName(iO.maxCacheKeyLength?d_(g,iO.maxCacheKeyLength):g)},vyt=st(`${RF}.IORedis`,()=>new YNe.IORedisInstrumentation({responseHook:JNe})),Ryt=st(`${RF}.Redis`,()=>new KNe.RedisInstrumentation({responseHook:JNe})),ZNe=Object.assign(()=>{vyt(),Ryt()},{id:RF}),xyt=(e={})=>({name:RF,setupOnce(){iO=e,ZNe()}}),WNe=xyt});var eOe=F(xF=>{"use strict";m();Object.defineProperty(xF,"__esModule",{value:!0});xF.EVENT_LISTENERS_SET=void 0;xF.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tJ=F(aO=>{"use strict";m();Object.defineProperty(aO,"__esModule",{value:!0});aO.AttributeNames=void 0;var Dyt;(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"})(Dyt=aO.AttributeNames||(aO.AttributeNames={}))});var nJ=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 rJ=F(sO=>{"use strict";m();Object.defineProperty(sO,"__esModule",{value:!0});sO.SpanNames=void 0;var Byt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Byt=sO.SpanNames||(sO.SpanNames={}))});var sOe=F(rr=>{"use strict";m();Object.defineProperty(rr,"__esModule",{value:!0});rr.sanitizedErrorMessage=rr.isObjectWithTextString=rr.getErrorMessage=rr.patchClientConnectCallback=rr.patchCallbackPGPool=rr.updateCounter=rr.getPoolName=rr.patchCallback=rr.handleExecutionResult=rr.handleConfigQuery=rr.shouldSkipInstrumentation=rr.getSemanticAttributesFromPoolConnection=rr.getSemanticAttributesFromConnection=rr.getConnectionString=rr.parseAndMaskConnectionString=rr.parseNormalizedOperationName=rr.getQuerySpanName=void 0;var Z_=(Ge(),Me(We)),DF=tJ(),Yd=(Jn(),Me(Ur)),pi=nJ(),Ey=rn(),tOe=rJ();function nOe(e,t){if(!t)return tOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:rOe(t.text);return`${tOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}rr.getQuerySpanName=nOe;function rOe(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}rr.parseNormalizedOperationName=rOe;function oOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}rr.parseAndMaskConnectionString=oOe;function oJ(e){if("connectionString"in e&&e.connectionString)return oOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}rr.getConnectionString=oJ;function BF(e){if(Number.isInteger(e))return e}function iOe(e,t){let n={};return t&Ey.SemconvStability.OLD&&(n={...n,[pi.ATTR_DB_SYSTEM]:pi.DB_SYSTEM_VALUE_POSTGRESQL,[pi.ATTR_DB_NAME]:e.database,[pi.ATTR_DB_CONNECTION_STRING]:oJ(e),[pi.ATTR_DB_USER]:e.user,[pi.ATTR_NET_PEER_NAME]:e.host,[pi.ATTR_NET_PEER_PORT]:BF(e.port)}),t&Ey.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]:BF(e.port)}),n}rr.getSemanticAttributesFromConnection=iOe;function Nyt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[DF.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[DF.AttributeNames.MAX_CLIENT]:e.maxClient};return t&Ey.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]:oJ(e),[pi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[pi.ATTR_NET_PEER_PORT]:Number(n?.port)||BF(e.port),[pi.ATTR_DB_USER]:n?.username??e.user}),t&Ey.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)||BF(e.port)}),r}rr.getSemanticAttributesFromPoolConnection=Nyt;function Oyt(e){return e.requireParentSpan===!0&&Z_.trace.getSpan(Z_.context.active())===void 0}rr.shouldSkipInstrumentation=Oyt;function wyt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=nOe(i,r),c=e.startSpan(a,{kind:Z_.SpanKind.CLIENT,attributes:iOe(o,n)});if(!r)return c;if(r.text&&(n&Ey.SemconvStability.OLD&&c.setAttribute(pi.ATTR_DB_STATEMENT,r.text),n&Ey.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(DF.AttributeNames.PG_VALUES,d)}catch(d){Z_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(DF.AttributeNames.PG_PLAN,r.name),c}rr.handleConfigQuery=wyt;function aOe(e,t,n){typeof e.responseHook=="function"&&(0,Ey.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&Z_.diag.error("Error running response hook",r)},!0)}rr.handleExecutionResult=aOe;function kyt(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(NF(a)),t.setStatus({code:Z_.SpanStatusCode.ERROR,message:a.message})):aOe(e,t,c),o(),t.end(),n.call(this,a,c)}}rr.patchCallback=kyt;function Myt(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()}rr.getPoolName=Myt;function Pyt(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}}rr.updateCounter=Pyt;function Uyt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}rr.patchCallbackPGPool=Uyt;function Lyt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(NF(r)),e.setStatus({code:Z_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}rr.patchClientConnectCallback=Lyt;function Qyt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}rr.getErrorMessage=Qyt;function Fyt(e){return typeof e=="object"&&typeof e?.text=="string"}rr.isObjectWithTextString=Fyt;function NF(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}rr.sanitizedErrorMessage=NF});var uOe=F(Uv=>{"use strict";m();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.66.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var AOe=F(wF=>{"use strict";m();Object.defineProperty(wF,"__esModule",{value:!0});wF.PgInstrumentation=void 0;var Hu=rn(),Fr=(Ge(),Me(We)),cOe=eOe(),Ko=sOe(),lOe=GK(),dOe=uOe(),pOe=rJ(),OF=Tr(),uf=(Jn(),Me(Ur)),uO=nJ();function Lv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iJ=class extends Hu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(dOe.PACKAGE_NAME,dOe.PACKAGE_VERSION,t),this._semconvStability=(0,Hu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(uf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Fr.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(uO.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(uO.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 Hu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Hu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Hu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Lv(c);return this._patchPgClient(d.Client),c},c=>{let d=Lv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Hu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Lv(c);return(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Lv(c);(0,Hu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Lv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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=Lv(t);return(0,Hu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Hu.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(pOe.SpanNames.CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchClientConnectCallback(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return fOe(a,c)}}recordOperationDuration(t,n){let r={},o=[uf.ATTR_DB_NAMESPACE,uf.ATTR_ERROR_TYPE,uf.ATTR_SERVER_PORT,uf.ATTR_SERVER_ADDRESS,uf.ATTR_DB_OPERATION_NAME];this._semconvStability&Hu.SemconvStability.OLD&&o.push(uO.ATTR_DB_SYSTEM),this._semconvStability&Hu.SemconvStability.STABLE&&o.push(uf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,OF.hrTimeToMilliseconds)((0,OF.hrTimeDuration)(n,(0,OF.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,OF.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={[uO.ATTR_DB_SYSTEM]:uO.DB_SYSTEM_VALUE_POSTGRESQL,[uf.ATTR_DB_NAMESPACE]:this.database,[uf.ATTR_SERVER_PORT]:this.connectionParameters.port,[uf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[uf.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,lOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,lOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let N=Fr.trace.getSpan(Fr.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]=Fr.context.bind(Fr.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=Fr.context.bind(Fr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,Hu.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:Fr.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:Fr.SpanStatusCode.ERROR,message:N.message}),S(),C.end(),Q(N)})):x})}_setPoolConnectEventListeners(t){if(t[cOe.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[cOe.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(pOe.SpanNames.POOL_CONNECT,{kind:Fr.SpanKind.CLIENT,attributes:Ko.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Fr.trace.getSpan(Fr.context.active());o=Ko.patchCallbackPGPool(a,o),d&&(o=Fr.context.bind(Fr.context.active(),o))}let c=Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>n.call(this,o));return fOe(a,c)}}};wF.PgInstrumentation=iJ;function fOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Fr.context.bind(Fr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Ko.sanitizedErrorMessage(r)),e.setStatus({code:Fr.SpanStatusCode.ERROR,message:Ko.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var mOe=F(Qv=>{"use strict";m();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.AttributeNames=Qv.PgInstrumentation=void 0;var Gyt=AOe();Object.defineProperty(Qv,"PgInstrumentation",{enumerable:!0,get:function(){return Gyt.PgInstrumentation}});var jyt=tJ();Object.defineProperty(Qv,"AttributeNames",{enumerable:!0,get:function(){return jyt.AttributeNames}})});var gOe,hOe,_Oe,Hyt,EOe,SOe=O(()=>{m();gOe=ie(mOe(),1);mr();hOe="Postgres",_Oe=st(hOe,gOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Lr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Hyt=e=>({name:hOe,setupOnce(){_Oe(e)}}),EOe=Hyt});var W_,sJ,yOe,zyt,$yt,TOe,aJ,Vyt,IOe,COe=O(()=>{m();Ge();W_=ie(rn(),1);Jn();dt();mr();cy();sJ="PostgresJs",yOe=[">=3.0.0 <4"],zyt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,$yt=Symbol.for("sentry.query.from.instrumented.sql"),TOe=st(sJ,e=>new aJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),aJ=class extends W_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Zn,t)}init(){let t=new W_.InstrumentationNodeModuleDefinition("postgres",yOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ta&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new W_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,yOe,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 Ta&&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 Ta&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return aq(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:(rN(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($C,r);return}let o=n?.match(zyt);o?.[1]&&t.setAttribute($C,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[$yt])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=>{Lr(c,"auto.db.postgresjs"),c.setAttributes({[xS]:"postgres",[_5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,W_.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ta&&J.error(`Error in requestHook for ${sJ} 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){Ta&&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(E5,v?.[0]?.code||"unknown"),c.setAttribute(S5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ta&&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}},Vyt=e=>({name:sJ,setupOnce(){TOe(e)}}),IOe=Vyt});var bOe=F(cO=>{"use strict";m();Object.defineProperty(cO,"__esModule",{value:!0});cO.SeverityNumber=void 0;var qyt;(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"})(qyt=cO.SeverityNumber||(cO.SeverityNumber={}))});var MF=F(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.NOOP_LOGGER=Fv.NoopLogger=void 0;var kF=class{emit(t){}};Fv.NoopLogger=kF;Fv.NOOP_LOGGER=new kF});var UF=F(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.NOOP_LOGGER_PROVIDER=Gv.NoopLoggerProvider=void 0;var Yyt=MF(),PF=class{getLogger(t,n,r){return new Yyt.NoopLogger}};Gv.NoopLoggerProvider=PF;Gv.NOOP_LOGGER_PROVIDER=new PF});var cJ=F(LF=>{"use strict";m();Object.defineProperty(LF,"__esModule",{value:!0});LF.ProxyLogger=void 0;var Kyt=MF(),uJ=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):Kyt.NOOP_LOGGER}};LF.ProxyLogger=uJ});var dJ=F(QF=>{"use strict";m();Object.defineProperty(QF,"__esModule",{value:!0});QF.ProxyLoggerProvider=void 0;var Jyt=UF(),Zyt=cJ(),lJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Zyt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Jyt.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)}};QF.ProxyLoggerProvider=lJ});var vOe=F(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF._globalThis=void 0;FF._globalThis=typeof globalThis=="object"?globalThis:global});var ROe=F(GF=>{"use strict";m();Object.defineProperty(GF,"__esModule",{value:!0});GF._globalThis=void 0;var Wyt=vOe();Object.defineProperty(GF,"_globalThis",{enumerable:!0,get:function(){return Wyt._globalThis}})});var xOe=F(jF=>{"use strict";m();Object.defineProperty(jF,"__esModule",{value:!0});jF._globalThis=void 0;var Xyt=ROe();Object.defineProperty(jF,"_globalThis",{enumerable:!0,get:function(){return Xyt._globalThis}})});var DOe=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;var eTt=xOe();kA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");kA._global=eTt._globalThis;function tTt(e,t,n){return r=>r===e?t:n}kA.makeGetter=tTt;kA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var NOe=F(HF=>{"use strict";m();Object.defineProperty(HF,"__esModule",{value:!0});HF.LogsAPI=void 0;var Kd=DOe(),nTt=UF(),BOe=dJ(),pJ=class e{constructor(){this._proxyLoggerProvider=new BOe.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,nTt.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 BOe.ProxyLoggerProvider}};HF.LogsAPI=pJ});var fJ=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 rTt=bOe();Object.defineProperty(ns,"SeverityNumber",{enumerable:!0,get:function(){return rTt.SeverityNumber}});var OOe=MF();Object.defineProperty(ns,"NOOP_LOGGER",{enumerable:!0,get:function(){return OOe.NOOP_LOGGER}});Object.defineProperty(ns,"NoopLogger",{enumerable:!0,get:function(){return OOe.NoopLogger}});var wOe=UF();Object.defineProperty(ns,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return wOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ns,"NoopLoggerProvider",{enumerable:!0,get:function(){return wOe.NoopLoggerProvider}});var oTt=cJ();Object.defineProperty(ns,"ProxyLogger",{enumerable:!0,get:function(){return oTt.ProxyLogger}});var iTt=dJ();Object.defineProperty(ns,"ProxyLoggerProvider",{enumerable:!0,get:function(){return iTt.ProxyLoggerProvider}});var aTt=NOe();ns.logs=aTt.LogsAPI.getInstance()});var kOe=F(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.disableInstrumentations=jv.enableInstrumentations=void 0;function sTt(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()}}jv.enableInstrumentations=sTt;function uTt(e){e.forEach(t=>t.disable())}jv.disableInstrumentations=uTt});var UOe=F(zF=>{"use strict";m();Object.defineProperty(zF,"__esModule",{value:!0});zF.registerInstrumentations=void 0;var MOe=(Ge(),Me(We)),cTt=fJ(),POe=kOe();function lTt(e){let t=e.tracerProvider||MOe.trace.getTracerProvider(),n=e.meterProvider||MOe.metrics.getMeterProvider(),r=e.loggerProvider||cTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,POe.enableInstrumentations)(o,t,n,r),()=>{(0,POe.disableInstrumentations)(o)}}zF.registerInstrumentations=lTt});var VOe=F($F=>{"use strict";m();Object.defineProperty($F,"__esModule",{value:!0});$F.satisfies=void 0;var hJ=(Ge(),Me(We)),jOe=/^(?: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-]+)*))?$/,dTt=/^(?<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-]+)*))?$/,pTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function fTt(e,t,n){if(!ATt(e))return hJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=_Tt(e);if(!r)return!1;let o=[],i=HOe(r,t,o,n);return i&&!n?.includePrerelease?gTt(r,o):i}$F.satisfies=fTt;function ATt(e){return typeof e=="string"&&jOe.test(e)}function HOe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(AJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=QTt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!AJ(e,i,n,r))return!1;return!0}return AJ(e,t,n,r)}function AJ(e,t,n,r){if(t=hTt(t,r),t.includes(" "))return HOe(e,t,n,r);{let o=ETt(t);return n.push(o),mTt(e,o)}}function mTt(e,t){if(t.invalid)return!1;if(!t.version||gJ(t.version))return!0;let n=QOe(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=QOe(r,o)}return pTt[t.op]?.includes(n)}function gTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function hTt(e,t){return e=e.trim(),e=UTt(e,t),e=PTt(e),e=LTt(e,t),e=e.trim(),e}function zu(e){return!e||e.toLowerCase()==="x"||e==="*"}function _Tt(e){let t=e.match(jOe);if(!t){hJ.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 ETt(e){if(!e)return{};let t=e.match(dTt);if(!t)return hJ.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 gJ(e){return e==="*"||e==="x"||e==="X"}function LOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function STt(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 yTt(e,t){if(gJ(e)||gJ(t))return 0;let[n,r]=STt(LOe(e),LOe(t));return n>r?1:n<r?-1:0}function QOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=yTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var zOe="[a-zA-Z0-9-]",$Oe="0|[1-9]\\d*",TTt=`\\d*[a-zA-Z-]${zOe}*`,ITt="((?:<|>)?=?)",FOe=`(?:${$Oe}|${TTt})`,CTt=`(?:-(${FOe}(?:\\.${FOe})*))`,GOe=`${zOe}+`,bTt=`(?:\\+(${GOe}(?:\\.${GOe})*))`,mJ=`${$Oe}|x|X|\\*`,lO=`[v=\\s]*(${mJ})(?:\\.(${mJ})(?:\\.(${mJ})(?:${CTt})?${bTt}?)?)?`,vTt=`^${ITt}\\s*${lO}$`,RTt=new RegExp(vTt),xTt=`^\\s*(${lO})\\s+-\\s+(${lO})\\s*$`,DTt=new RegExp(xTt),BTt="(?:~>?)",NTt=`^${BTt}${lO}$`,OTt=new RegExp(NTt),wTt="(?:\\^)",kTt=`^${wTt}${lO}$`,MTt=new RegExp(kTt);function PTt(e){let t=OTt;return e.replace(t,(n,r,o,i,a)=>{let c;return zu(r)?c="":zu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:zu(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 UTt(e,t){let n=MTt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return zu(i)?g="":zu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:zu(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 LTt(e,t){let n=RTt;return e.replace(n,(r,o,i,a,c,d)=>{let g=zu(i),h=g||zu(a),S=h||zu(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 QTt(e,t){let n=DTt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(zu(i)?o="":zu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:zu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,zu(S)?h="":zu(y)?h=`<${+S+1}.0.0-0`:zu(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 _J=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 dO(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 FTt=(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 dO(o,"__original",r),dO(o,"__unwrap",()=>{e[t]===o&&dO(e,t,r)}),dO(o,"__wrapped",!0),dO(e,t,o),o};Os.wrap=FTt;var GTt=(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=GTt;var jTt=(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=jTt;var HTt=(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=HTt;function pO(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Os.default=pO;pO.wrap=Os.wrap;pO.massWrap=Os.massWrap;pO.unwrap=Os.unwrap;pO.massUnwrap=Os.massUnwrap});var qOe=F(qF=>{"use strict";m();Object.defineProperty(qF,"__esModule",{value:!0});qF.InstrumentationAbstract=void 0;var EJ=(Ge(),Me(We)),zTt=fJ(),VF=_J(),SJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EJ.diag.createComponentLogger({namespace:t}),this._tracer=EJ.trace.getTracer(t,n),this._meter=EJ.metrics.getMeter(t,n),this._logger=zTt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=VF.wrap;_unwrap=VF.unwrap;_massWrap=VF.massWrap;_massUnwrap=VF.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)}}};qF.InstrumentationAbstract=SJ});var YOe=F(X_=>{"use strict";m();Object.defineProperty(X_,"__esModule",{value:!0});X_.ModuleNameTrie=X_.ModuleNameSeparator=void 0;X_.ModuleNameSeparator="/";var YF=class{hooks=[];children=new Map},yJ=class{_trie=new YF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(X_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new YF,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(X_.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))}};X_.ModuleNameTrie=yJ});var JOe=F(KF=>{"use strict";m();Object.defineProperty(KF,"__esModule",{value:!0});KF.RequireInTheMiddleSingleton=void 0;var $Tt=kS(),KOe=Fe("path"),TJ=YOe(),VTt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),IJ=class e{_moduleNameTrie=new TJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new $Tt.Hook(null,{internals:!0},(t,n,r)=>{let o=qTt(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 VTt?new e:this._instance=this._instance??new e}};KF.RequireInTheMiddleSingleton=IJ;function qTt(e){return KOe.sep!==TJ.ModuleNameSeparator?e.split(KOe.sep).join(TJ.ModuleNameSeparator):e}});var CJ=F(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.isWrapped=eE.safeExecuteInTheMiddleAsync=eE.safeExecuteInTheMiddle=void 0;function YTt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}eE.safeExecuteInTheMiddle=YTt;async function KTt(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}}eE.safeExecuteInTheMiddleAsync=KTt;function JTt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}eE.isWrapped=JTt});var XOe=F(JF=>{"use strict";m();Object.defineProperty(JF,"__esModule",{value:!0});JF.InstrumentationBase=void 0;var fO=Fe("path"),ZOe=Fe("util"),ZTt=VOe(),bJ=_J(),WTt=qOe(),XTt=JOe(),eIt=iK(),AO=(Ge(),Me(We)),tIt=kS(),nIt=Fe("fs"),rIt=CJ(),vJ=class extends WTt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=XTt.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,rIt.isWrapped)(t[n])&&this._unwrap(t,n),ZOe.types.isProxy(t)){let o=(0,bJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,bJ.wrap)(t,n,r)};_unwrap=(t,n)=>ZOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,bJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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{AO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){AO.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=Fe.resolve(n);Fe.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,nIt.readFileSync)(fO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{AO.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 WOe(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=fO.normalize(r);return a.filter(g=>g.name===c).filter(g=>WOe(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&&fO.isAbsolute(c)){let g=fO.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=fO.isAbsolute(t.name)?new tIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new eIt.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}};JF.InstrumentationBase=vJ;function WOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,ZTt.satisfies)(t,r,{includePrerelease:n}))}});var ewe=F(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.normalize=void 0;var oIt=Fe("path");Object.defineProperty(ZF,"normalize",{enumerable:!0,get:function(){return oIt.normalize}})});var twe=F(Hv=>{"use strict";m();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.normalize=Hv.InstrumentationBase=void 0;var iIt=XOe();Object.defineProperty(Hv,"InstrumentationBase",{enumerable:!0,get:function(){return iIt.InstrumentationBase}});var aIt=ewe();Object.defineProperty(Hv,"normalize",{enumerable:!0,get:function(){return aIt.normalize}})});var RJ=F(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.normalize=zv.InstrumentationBase=void 0;var nwe=twe();Object.defineProperty(zv,"InstrumentationBase",{enumerable:!0,get:function(){return nwe.InstrumentationBase}});Object.defineProperty(zv,"normalize",{enumerable:!0,get:function(){return nwe.normalize}})});var rwe=F(WF=>{"use strict";m();Object.defineProperty(WF,"__esModule",{value:!0});WF.InstrumentationNodeModuleDefinition=void 0;var xJ=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||[]}};WF.InstrumentationNodeModuleDefinition=xJ});var owe=F(XF=>{"use strict";m();Object.defineProperty(XF,"__esModule",{value:!0});XF.InstrumentationNodeModuleFile=void 0;var sIt=RJ(),DJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,sIt.normalize)(t)}};XF.InstrumentationNodeModuleFile=DJ});var iwe=F(Sy=>{"use strict";m();Object.defineProperty(Sy,"__esModule",{value:!0});Sy.semconvStabilityFromStr=Sy.SemconvStability=void 0;var e3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(e3=Sy.SemconvStability||(Sy.SemconvStability={}));function uIt(e,t){let n=e3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=e3.DUPLICATE;break}else o.toLowerCase()===e&&(n=e3.STABLE);return n}Sy.semconvStabilityFromStr=uIt});var swe=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 cIt=UOe();Object.defineProperty(na,"registerInstrumentations",{enumerable:!0,get:function(){return cIt.registerInstrumentations}});var lIt=RJ();Object.defineProperty(na,"InstrumentationBase",{enumerable:!0,get:function(){return lIt.InstrumentationBase}});var dIt=rwe();Object.defineProperty(na,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return dIt.InstrumentationNodeModuleDefinition}});var pIt=owe();Object.defineProperty(na,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return pIt.InstrumentationNodeModuleFile}});var BJ=CJ();Object.defineProperty(na,"isWrapped",{enumerable:!0,get:function(){return BJ.isWrapped}});Object.defineProperty(na,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddle}});Object.defineProperty(na,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return BJ.safeExecuteInTheMiddleAsync}});var awe=iwe();Object.defineProperty(na,"SemconvStability",{enumerable:!0,get:function(){return awe.SemconvStability}});Object.defineProperty(na,"semconvStabilityFromStr",{enumerable:!0,get:function(){return awe.semconvStabilityFromStr}})});function mIt(){let e=$v[OJ];return e?.helper?e.helper:$v[NJ]?.helper}function gIt(e){let t={helper:e};$v[OJ]=t,$v[NJ]=t}function hIt(){delete $v[OJ],delete $v[NJ]}function SIt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}function lwe(e,t,n,r,o){if(dwe(t.name,o))return;let i={attributes:t.attributes,kind:SIt(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)lwe(e,d,n,r,o);a.end(t.endTime)})}function uwe(e,t){return TIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function TIt(e){return e!=null&&typeof e.then=="function"}function dwe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var t3,fIt,AIt,NJ,OJ,$v,_It,EIt,yIt,pwe,cwe,IIt,CIt,fwe,Awe=O(()=>{m();Ge();t3=ie(swe(),1);Ge();fIt={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"}},AIt=fIt.version.split(".")[0],NJ="PRISMA_INSTRUMENTATION",OJ=`V${AIt}_PRISMA_INSTRUMENTATION`,$v=globalThis;_It=process.env.PRISMA_SHOW_ALL_TRACES==="true",EIt="00-10-10-00";yIt=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}`:EIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)lwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!_It)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(dwe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return uwe(i,t(i,r))}return n.startActiveSpan(o,e,i=>uwe(i,t(i,r)))}};pwe={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},cwe=pwe.version,IIt=pwe.name,CIt="@prisma/client",fwe=class extends t3.InstrumentationBase{tracerProvider;constructor(e={}){super(IIt,cwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new t3.InstrumentationNodeModuleDefinition(CIt,[cwe])]}enable(){let e=this._config;gIt(new yIt({tracerProvider:this.tracerProvider??Ht.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){hIt()}isEnabled(){return mIt()!==void 0}}});function bIt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function gwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function vIt(e){switch(e){case"client":return oo.CLIENT;case"internal":default:return oo.INTERNAL}}var mwe,wJ,RIt,hwe,_we=O(()=>{m();Ge();Awe();dt();mr();mwe="Prisma";wJ=class extends fwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=gwe();bIt(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=vIt(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}})}};RIt=st(mwe,e=>new wJ(e)),hwe=e=>({name:mwe,setupOnce(){RIt(e)},setup(t){gwe()&&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 Ewe=F(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.60.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kJ=F(MA=>{"use strict";m();Object.defineProperty(MA,"__esModule",{value:!0});MA.HapiLifecycleMethodNames=MA.HapiLayerType=MA.handlerPatched=MA.HapiComponentName=void 0;MA.HapiComponentName="@hapi/hapi";MA.handlerPatched=Symbol("hapi-handler-patched");MA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};MA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var Swe=F(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.ATTR_HTTP_METHOD=void 0;n3.ATTR_HTTP_METHOD="http.method"});var MJ=F(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.AttributeNames=void 0;var xIt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(xIt=mO.AttributeNames||(mO.AttributeNames={}))});var Iwe=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 ywe=(Jn(),Me(Ur)),DIt=Swe(),gO=kJ(),tE=MJ(),Twe=rn();function BIt(e){return e.name?e.name:e.pkg.name}ra.getPluginName=BIt;var NIt=e=>typeof e=="string"&&gO.HapiLifecycleMethodNames.has(e);ra.isLifecycleExtType=NIt;var OIt=e=>{let t=e?.type;return t!==void 0&&(0,ra.isLifecycleExtType)(t)};ra.isLifecycleExtEventObj=OIt;var wIt=e=>Array.isArray(e)&&e.length<=3&&(0,ra.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ra.isDirectExtInput=wIt;var kIt=e=>!Array.isArray(e);ra.isPatchableExtMethod=kIt;var MIt=(e,t,n)=>{let r={[ywe.ATTR_HTTP_ROUTE]:e.path};t&Twe.SemconvStability.OLD&&(r[DIt.ATTR_HTTP_METHOD]=e.method),t&Twe.SemconvStability.STABLE&&(r[ywe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.PLUGIN,r[tE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[tE.AttributeNames.HAPI_TYPE]=gO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ra.getRouteMetadata=MIt;var PIt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT,[tE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[tE.AttributeNames.EXT_TYPE]:e,[tE.AttributeNames.HAPI_TYPE]:gO.HapiLayerType.EXT},name:r}};ra.getExtMetadata=PIt;var UIt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ra.getPluginFromInput=UIt});var vwe=F(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.HapiInstrumentation=void 0;var Ql=(Ge(),Me(We)),Cwe=Tr(),hO=rn(),bwe=Ewe(),_O=kJ(),Dg=Iwe(),PJ=class extends hO.InstrumentationBase{_semconvStability;constructor(t={}){super(bwe.PACKAGE_NAME,bwe.PACKAGE_VERSION,t),this._semconvStability=(0,hO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new hO.InstrumentationNodeModuleDefinition(_O.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,hO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,hO.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,Dg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Dg.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,Dg.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,Dg.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,Dg.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,Dg.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,Dg.isPatchableExtMethod)(t))return t[_O.handlerPatched]===!0?t:(t[_O.handlerPatched]=!0,async function(...a){if(Ql.trace.getSpan(Ql.context.active())===void 0)return await t.apply(this,a);let c=(0,Dg.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[_O.handlerPatched]===!0)return t;t[_O.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,Cwe.getRPCMetadata)(Ql.context.active());c?.type===Cwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Dg.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}};r3.HapiInstrumentation=PJ});var Rwe=F(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.AttributeNames=qv.HapiInstrumentation=void 0;var LIt=vwe();Object.defineProperty(qv,"HapiInstrumentation",{enumerable:!0,get:function(){return LIt.HapiInstrumentation}});var QIt=MJ();Object.defineProperty(qv,"AttributeNames",{enumerable:!0,get:function(){return QIt.AttributeNames}})});var xwe,Dwe,Bwe,FIt,Nwe,Owe=O(()=>{m();xwe=ie(Rwe(),1);mr();Dwe="Hapi",Bwe=st(Dwe,()=>new xwe.HapiInstrumentation),FIt=()=>({name:Dwe,setupOnce(){Bwe()}}),Nwe=FIt});var nE,EO,UJ=O(()=>{m();nE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},EO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var i3,GIt,jIt,o3,wwe=O(()=>{m();Ge();i3=ie(rn(),1);dt();UJ();GIt="@sentry/instrumentation-hono",jIt="0.0.1",o3=class extends i3.InstrumentationBase{constructor(t={}){super(GIt,jIt,t)}init(){return[new i3.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({[nE.HONO_TYPE]:g,[nE.HONO_NAME]:g===EO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[nE.HONO_TYPE]:d,[nE.HONO_NAME]:d===EO.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?EO.MIDDLEWARE:EO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ui.ERROR,message:n.message}),t.recordException(n))}}});function HIt(e){let t=Ot(e).data,n=t[nE.HONO_TYPE];if(t[Zt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Zt]:`${n}.hono`});let r=t[nE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ng],i=t[DS];typeof o=="string"&&typeof i=="string"&&Cn().setTransactionName(`${i} ${o}`)}var kwe,Mwe,zIt,Pwe,Uwe=O(()=>{m();Jn();dt();mr();cy();UJ();wwe();kwe="Hono";Mwe=st(kwe,()=>new o3({responseHook:e=>{HIt(e)}})),zIt=()=>({name:kwe,setupOnce(){Mwe()}}),Pwe=zIt});var a3=F(SO=>{"use strict";m();Object.defineProperty(SO,"__esModule",{value:!0});SO.KoaLayerType=void 0;var $It;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})($It=SO.KoaLayerType||(SO.KoaLayerType={}))});var Lwe=F(Yv=>{"use strict";m();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var LJ=F(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var VIt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(VIt=yO.AttributeNames||(yO.AttributeNames={}))});var Fwe=F(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.isLayerIgnored=Kv.getMiddlewareMetadata=void 0;var Qwe=a3(),s3=LJ(),qIt=(Jn(),Me(Ur)),YIt=(e,t,n,r)=>n?{attributes:{[s3.AttributeNames.KOA_NAME]:r?.toString(),[s3.AttributeNames.KOA_TYPE]:Qwe.KoaLayerType.ROUTER,[qIt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[s3.AttributeNames.KOA_NAME]:t.name??"middleware",[s3.AttributeNames.KOA_TYPE]:Qwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Kv.getMiddlewareMetadata=YIt;var KIt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Kv.isLayerIgnored=KIt});var Gwe=F(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.kLayerPatched=void 0;u3.kLayerPatched=Symbol("koa-layer-patched")});var qwe=F(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.KoaInstrumentation=void 0;var PA=(Ge(),Me(We)),TO=rn(),jwe=a3(),Hwe=Lwe(),zwe=Fwe(),$we=Tr(),Vwe=Gwe(),QJ=class extends TO.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return new TO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,TO.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,TO.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){PA.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?jwe.KoaLayerType.ROUTER:jwe.KoaLayerType.MIDDLEWARE;return t[Vwe.kLayerPatched]===!0||(0,zwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(PA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Vwe.kLayerPatched]=!0,PA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(PA.trace.getSpan(PA.context.active())===void 0)return t(i,a);let d=(0,zwe.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,$we.getRPCMetadata)(PA.context.active());h?.type===$we.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,TO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&PA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=PA.trace.setSpan(PA.context.active(),g);return PA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};c3.KoaInstrumentation=QJ});var Ywe=F(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.KoaLayerType=rE.AttributeNames=rE.KoaInstrumentation=void 0;var JIt=qwe();Object.defineProperty(rE,"KoaInstrumentation",{enumerable:!0,get:function(){return JIt.KoaInstrumentation}});var ZIt=LJ();Object.defineProperty(rE,"AttributeNames",{enumerable:!0,get:function(){return ZIt.AttributeNames}});var WIt=a3();Object.defineProperty(rE,"KoaLayerType",{enumerable:!0,get:function(){return WIt.KoaLayerType}})});var Kwe,Jwe,Zwe,XIt,Wwe,Xwe=O(()=>{m();Kwe=ie(Ywe(),1);Jn();dt();mr();cy();Jwe="Koa",Zwe=st(Jwe,Kwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Lr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Zt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Cn()===kd()){Ta&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ng],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Cn().setTransactionName(`${c} ${a}`)}})),XIt=(e={})=>({name:Jwe,setupOnce(){Zwe(e)}}),Wwe=XIt});var FJ=F(cf=>{"use strict";m();Object.defineProperty(cf,"__esModule",{value:!0});cf.ConnectNames=cf.ConnectTypes=cf.AttributeNames=void 0;var eCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(eCt=cf.AttributeNames||(cf.AttributeNames={}));var tCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(tCt=cf.ConnectTypes||(cf.ConnectTypes={}));var nCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(nCt=cf.ConnectNames||(cf.ConnectNames={}))});var eke=F(Jv=>{"use strict";m();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.PACKAGE_NAME=Jv.PACKAGE_VERSION=void 0;Jv.PACKAGE_VERSION="0.57.0";Jv.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var tke=F(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3._LAYERS_STORE_PROPERTY=void 0;l3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var nke=F(iE=>{"use strict";m();Object.defineProperty(iE,"__esModule",{value:!0});iE.generateRoute=iE.replaceCurrentStackRoute=iE.addNewStackLayer=void 0;var rCt=(Ge(),Me(We)),oE=tke(),oCt=e=>{Array.isArray(e[oE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,oE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[oE._LAYERS_STORE_PROPERTY].push("/");let t=e[oE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[oE._LAYERS_STORE_PROPERTY].length?e[oE._LAYERS_STORE_PROPERTY].pop():rCt.diag.warn("Connect: Trying to pop the stack multiple time")}};iE.addNewStackLayer=oCt;var iCt=(e,t)=>{t&&e[oE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};iE.replaceCurrentStackRoute=iCt;var aCt=e=>e[oE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);iE.generateRoute=aCt});var ike=F(aE=>{"use strict";m();Object.defineProperty(aE,"__esModule",{value:!0});aE.ConnectInstrumentation=aE.ANONYMOUS_NAME=void 0;var sCt=(Ge(),Me(We)),rke=Tr(),Zv=FJ(),oke=eke(),d3=rn(),uCt=(Jn(),Me(Ur)),GJ=nke();aE.ANONYMOUS_NAME="anonymous";var jJ=class extends d3.InstrumentationBase{constructor(t={}){super(oke.PACKAGE_NAME,oke.PACKAGE_VERSION,t)}init(){return[new d3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,d3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,d3.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=Zv.ConnectTypes.REQUEST_HANDLER,i=Zv.ConnectNames.REQUEST_HANDLER,o=t):(r=Zv.ConnectTypes.MIDDLEWARE,i=Zv.ConnectNames.MIDDLEWARE,o=n.name||aE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[uCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Zv.AttributeNames.CONNECT_TYPE]:r,[Zv.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,GJ.replaceCurrentStackRoute)(g,t);let y=(0,rke.getRPCMetadata)(sCt.context.active());t&&y?.type===rke.RPCType.HTTP&&(y.route=(0,GJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||aE.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,GJ.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)}}};aE.ConnectInstrumentation=jJ});var ske=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 ake=ike();Object.defineProperty(Jd,"ConnectInstrumentation",{enumerable:!0,get:function(){return ake.ConnectInstrumentation}});Object.defineProperty(Jd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return ake.ANONYMOUS_NAME}});var HJ=FJ();Object.defineProperty(Jd,"AttributeNames",{enumerable:!0,get:function(){return HJ.AttributeNames}});Object.defineProperty(Jd,"ConnectNames",{enumerable:!0,get:function(){return HJ.ConnectNames}});Object.defineProperty(Jd,"ConnectTypes",{enumerable:!0,get:function(){return HJ.ConnectTypes}})});var uke,cke,lke,cCt,dke,pke=O(()=>{m();uke=ie(ske(),1);mr();cke="Connect",lke=st(cke,()=>new uke.ConnectInstrumentation),cCt=()=>({name:cke,setupOnce(){lke()}}),dke=cCt});var fke=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 Ake=F(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.once=Wv.getSpanName=void 0;function lCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Wv.getSpanName=lCt;var dCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wv.once=dCt});var mke=F(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.PACKAGE_NAME=Xv.PACKAGE_VERSION=void 0;Xv.PACKAGE_VERSION="0.33.0";Xv.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Ske=F(uE=>{"use strict";m();Object.defineProperty(uE,"__esModule",{value:!0});uE.TediousInstrumentation=uE.INJECTED_CTX=void 0;var eR=(Ge(),Me(We)),pCt=Fe("events"),UA=rn(),yy=(Jn(),Me(Ur)),sE=fke(),gke=Ake(),hke=mke(),Eke=Symbol("opentelemetry.instrumentation-tedious.current-database");uE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var _ke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function p3(e){Object.defineProperty(this,Eke,{value:e,writable:!0})}var zJ=class e extends UA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(hke.PACKAGE_NAME,hke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,UA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,UA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new UA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of _ke)(0,UA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,UA.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 _ke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return p3.call(this,this.config?.options?.database),this.removeListener("databaseChange",p3),this.on("databaseChange",p3),this.once("end",()=>{this.removeListener("databaseChange",p3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||eR.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,uE.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?.[uE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof pCt.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[Eke],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_DB_SYSTEM]=sE.DB_SYSTEM_VALUE_MSSQL,C[sE.ATTR_DB_NAME]=S,C[sE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[sE.ATTR_DB_STATEMENT]=y,C[sE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&UA.SemconvStability.STABLE&&(C[yy.ATTR_DB_NAMESPACE]=S,C[yy.ATTR_DB_SYSTEM_NAME]=yy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[yy.ATTR_DB_QUERY_TEXT]=y,C[yy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&UA.SemconvStability.OLD&&(C[sE.ATTR_NET_PEER_NAME]=this.config?.server,C[sE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&UA.SemconvStability.STABLE&&(C[yy.ATTR_SERVER_ADDRESS]=this.config?.server,C[yy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,gke.getSpanName)(t,S,y,a.table),{kind:eR.SpanKind.CLIENT,attributes:C}),x=(0,gke.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:eR.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=()=>eR.context.with(eR.trace.setSpan(eR.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)}}};uE.TediousInstrumentation=zJ});var yke=F(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.TediousInstrumentation=void 0;var fCt=Ske();Object.defineProperty(f3,"TediousInstrumentation",{enumerable:!0,get:function(){return fCt.TediousInstrumentation}})});var Tke,ACt,Ike,Cke,mCt,bke,vke=O(()=>{m();Tke=ie(yke(),1);dt();mr();ACt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),Ike="Tedious",Cke=st(Ike,()=>new Tke.TediousInstrumentation({})),mCt=()=>{let e;return{name:Ike,setupOnce(){let t=Cke();e=iN(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]||"";ACt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},bke=mCt});var Rke=F(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.PACKAGE_NAME=tR.PACKAGE_VERSION=void 0;tR.PACKAGE_VERSION="0.57.0";tR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Dke=F(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.GenericPoolInstrumentation=void 0;var nR=(Ge(),Me(We)),Ty=rn(),xke=Rke(),$J="generic-pool",VJ=class extends Ty.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(xke.PACKAGE_NAME,xke.PACKAGE_VERSION,t)}init(){return[new Ty.InstrumentationNodeModuleDefinition($J,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Ty.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 Ty.InstrumentationNodeModuleDefinition($J,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Ty.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 Ty.InstrumentationNodeModuleDefinition($J,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Ty.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=nR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return nR.context.with(nR.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=nR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return nR.context.with(nR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};A3.GenericPoolInstrumentation=VJ});var Bke=F(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.GenericPoolInstrumentation=void 0;var gCt=Dke();Object.defineProperty(m3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return gCt.GenericPoolInstrumentation}})});var Nke,Oke,wke,hCt,kke,Mke=O(()=>{m();Nke=ie(Bke(),1);dt();mr();Oke="GenericPool",wke=st(Oke,()=>new Nke.GenericPoolInstrumentation({})),hCt=()=>{let e;return{name:Oke,setupOnce(){let t=wke();e=iN(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")}))}}},kke=hCt});var qJ=F(LA=>{"use strict";m();Object.defineProperty(LA,"__esModule",{value:!0});LA.ATTR_NET_PEER_PORT=LA.ATTR_NET_PEER_NAME=LA.ATTR_MESSAGING_SYSTEM=LA.ATTR_MESSAGING_OPERATION=void 0;LA.ATTR_MESSAGING_OPERATION="messaging.operation";LA.ATTR_MESSAGING_SYSTEM="messaging.system";LA.ATTR_NET_PEER_NAME="net.peer.name";LA.ATTR_NET_PEER_PORT="net.peer.port"});var YJ=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 KJ=F(Iy=>{"use strict";m();Object.defineProperty(Iy,"__esModule",{value:!0});Iy.DEFAULT_CONFIG=Iy.EndOperation=void 0;var _Ct;(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"})(_Ct=Iy.EndOperation||(Iy.EndOperation={}));Iy.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Qke=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 JJ=(Ge(),Me(We)),cE=rn(),g3=(Jn(),Me(Ur)),IO=qJ(),h3=YJ();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 ZJ=(0,JJ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),ECt=e=>e!==""?e:"<default>";Ai.normalizeExchange=ECt;var SCt=e=>e.replace(/:[^:@/]*@/,":***@"),Pke=(e,t)=>e||(t==="AMQP"?5672:5671),Uke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Lke=e=>e||"localhost",QA=(e,t,n,r)=>n?{[t]:n}:(JJ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),yCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[IO.ATTR_MESSAGING_SYSTEM]:t}:{}};Ai.getConnectionAttributesFromServer=yCt;var TCt=(e,t)=>{let n={[h3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Uke(r?.protocol);Object.assign(n,{...QA(e,h3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Lke(r?.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(e,IO.ATTR_NET_PEER_NAME,i,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(e,g3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=Pke(r.port,o);t&cE.SemconvStability.OLD&&Object.assign(n,QA(e,IO.ATTR_NET_PEER_PORT,a,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(e,g3.ATTR_SERVER_PORT,a,"port"))}else{let r=SCt(e);n[h3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Uke(o.protocol);Object.assign(n,{...QA(r,h3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Lke(o.hostname);t&cE.SemconvStability.OLD&&Object.assign(n,{...QA(r,IO.ATTR_NET_PEER_NAME,a,"hostname")}),t&cE.SemconvStability.STABLE&&Object.assign(n,{...QA(r,g3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=Pke(o.port?parseInt(o.port):void 0,i);t&cE.SemconvStability.OLD&&Object.assign(n,QA(r,IO.ATTR_NET_PEER_PORT,c,"port")),t&cE.SemconvStability.STABLE&&Object.assign(n,QA(r,g3.ATTR_SERVER_PORT,c,"port"))}catch(o){JJ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Ai.getConnectionAttributesFromUrl=TCt;var ICt=e=>e.setValue(ZJ,!0);Ai.markConfirmChannelTracing=ICt;var CCt=e=>e.deleteValue(ZJ);Ai.unmarkConfirmChannelTracing=CCt;var bCt=e=>e.getValue(ZJ)===!0;Ai.isConfirmChannelTracing=bCt});var Fke=F(rR=>{"use strict";m();Object.defineProperty(rR,"__esModule",{value:!0});rR.PACKAGE_NAME=rR.PACKAGE_VERSION=void 0;rR.PACKAGE_VERSION="0.61.0";rR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var jke=F(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.AmqplibInstrumentation=void 0;var Jo=(Ge(),Me(We)),_3=Tr(),Cr=rn(),vCt=qJ(),Fl=YJ(),Vu=KJ(),mi=Qke(),Gke=Fke(),E3=[">=0.5.5 <1"],WJ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(Gke.PACKAGE_NAME,Gke.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",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",E3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",E3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",E3,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,[vCt.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,_3.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,_3.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,_3.hrTimeDuration)(a.timeOfConsume,n);if((0,_3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Vu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};S3.AmqplibInstrumentation=WJ});var zke=F(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.EndOperation=lE.DEFAULT_CONFIG=lE.AmqplibInstrumentation=void 0;var RCt=jke();Object.defineProperty(lE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return RCt.AmqplibInstrumentation}});var Hke=KJ();Object.defineProperty(lE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return Hke.DEFAULT_CONFIG}});Object.defineProperty(lE,"EndOperation",{enumerable:!0,get:function(){return Hke.EndOperation}})});var $ke,Vke,xCt,qke,DCt,Yke,Kke=O(()=>{m();$ke=ie(zke(),1);mr();Vke="Amqplib",xCt={consumeEndHook:e=>{Lr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Lr(e,"auto.amqplib.otel.publisher")}},qke=st(Vke,()=>new $ke.AmqplibInstrumentation(xCt)),DCt=()=>({name:Vke,setupOnce(){qke()}}),Yke=DCt});var CO,XJ=O(()=>{m();CO="VercelAI"});function NCt(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 OCt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(wCt(t.content),kCt(t.content))}function wCt(e){for(let t of e){if(!NCt(t))continue;let n=Dq(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"),tn(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"),tn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function kCt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Bq(t.toolCallId)}function MCt(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 T3,BCt,Jke,y3,Zke=O(()=>{m();T3=ie(rn(),1);dt();XJ();BCt=[">=3.0.0 <7"],Jke=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];y3=class e extends T3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Zn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new T3.InstrumentationNodeModuleDefinition("ai",BCt,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(CO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=MCt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},nf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Ki(x,"_sentry_active_span",Nc())},()=>{},x=>{OCt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of Jke)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=Jke.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function PCt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var Wke,UCt,Xke,eMe=O(()=>{m();dt();mr();XJ();Zke();Wke=st(CO,()=>new y3({}));UCt=(e={})=>{let t;return{name:CO,options:e,setupOnce(){t=Wke()},afterAllSetup(n){e.force??PCt(n)?RL(n):t?.callWhenPatched(()=>RL(n))}}},Xke=UCt});var C3,LCt,I3,tMe=O(()=>{m();C3=ie(rn(),1);dt();LCt=[">=4.0.0 <7"],I3=class extends C3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Zn,t)}init(){return new C3.InstrumentationNodeModuleDefinition("openai",LCt,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(VS(k_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return BL(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 nMe,QCt,rMe,oMe=O(()=>{m();dt();mr();tMe();nMe=st(k_,e=>new I3(e)),QCt=(e={})=>({name:k_,setupOnce(){nMe(e)}}),rMe=QCt});var v3,FCt,b3,iMe=O(()=>{m();v3=ie(rn(),1);dt();FCt=[">=0.19.2 <1.0.0"],b3=class extends v3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Zn,t)}init(){return new v3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",FCt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(VS(M_))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)}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 aMe,GCt,sMe,uMe=O(()=>{m();dt();mr();iMe();aMe=st(M_,e=>new b3(e)),GCt=(e={})=>({name:M_,options:e,setupOnce(){aMe(e)}}),sMe=GCt});var oR,cMe,R3,lMe=O(()=>{m();oR=ie(rn(),1);dt();cMe=[">=0.10.0 <2"],R3=class extends oR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Zn,t)}init(){return new oR.InstrumentationNodeModuleDefinition("@google/genai",cMe,n=>this._patch(n),n=>n,[new oR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",cMe,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(VS(P_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return OL(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 rN(t,"GoogleGenAI",o),t}}});var dMe,jCt,pMe,fMe=O(()=>{m();dt();mr();lMe();dMe=st(P_,e=>new R3(e)),jCt=(e={})=>({name:P_,setupOnce(){dMe(e)}}),pMe=jCt});function HCt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function zCt(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=HCt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var dE,x3,D3,AMe=O(()=>{m();dE=ie(rn(),1);dt();x3=[">=0.1.0 <2.0.0"];D3=class extends dE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Zn,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 dE.InstrumentationNodeModuleDefinition(r,x3,this._patch.bind(this),o=>o,[new dE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,x3,this._patch.bind(this),o=>o)]));return t.push(new dE.InstrumentationNodeModuleDefinition("langchain",x3,this._patch.bind(this),r=>r,[new dE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",x3,this._patch.bind(this),r=>r)])),t}_patch(t){VV([k_,M_,P_]);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]=zCt(g,n))}}}});var mMe,$Ct,gMe,hMe=O(()=>{m();dt();mr();AMe();mMe=st(wL,e=>new D3(e)),$Ct=(e={})=>({name:wL,setupOnce(){mMe(e)}}),gMe=$Ct});var iR,_Me,B3,EMe=O(()=>{m();iR=ie(rn(),1);dt();_Me=[">=0.0.0 <2.0.0"],B3=class extends iR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Zn,t)}init(){return new iR.InstrumentationNodeModuleDefinition("@langchain/langgraph",_Me,this._patch.bind(this),n=>n,[new iR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",_Me,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&LL(t.StateGraph.prototype,this.getConfig()),t}}});var SMe,VCt,yMe,TMe=O(()=>{m();dt();mr();EMe();SMe=st(UL,e=>new B3(e)),VCt=(e={})=>({name:UL,setupOnce(){SMe(e)}}),yMe=VCt});import*as CMe from"node:net";function bMe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Bg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&vl.error(S?.message)},!0)});let d=new Bg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>IMe(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 Bg.InstrumentationNodeModuleFile(h,t,S=>IMe(S,n,r,e,a),S=>vMe(S,r)));return d}function IMe(e,t,n,r,o){return vMe(e,n),t(e,"addDoc",qCt(r,o)),t(e,"getDocs",KCt(r,o)),t(e,"setDoc",JCt(r,o)),t(e,"deleteDoc",YCt(r,o)),e}function vMe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Bg.isWrapped)(e[n])&&t(e,n);return e}function qCt(e,t){return function(r){return function(o,i){let a=O3(e,"addDoc",o);return t(a),N3(a,()=>r(o,i))}}}function YCt(e,t){return function(r){return function(o){let i=O3(e,"deleteDoc",o.parent||o);return t(i),N3(i,()=>r(o))}}}function KCt(e,t){return function(r){return function(o){let i=O3(e,"getDocs",o);return t(i),N3(i,()=>r(o))}}}function JCt(e,t){return function(r){return function(o,i,a){let c=O3(e,"setDoc",o.parent||o);return t(c),N3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function N3(e,t){return Ke.with(Ht.setSpan(Ke.active(),e),()=>(0,Bg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function O3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:oo.CLIENT});return WCt(r,n),r.setAttribute($C,t),r}function ZCt(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(CMe.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 WCt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[g5]:t.path,[h5]:n.name,[xS]:"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}=ZCt(i);c&&(a[b5]=c),d&&(a[v5]=d),e.setAttributes(a)}var Bg,RMe=O(()=>{m();Ge();Bg=ie(rn(),1);Jn()});function xMe(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,Ng.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&vl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Ng.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&vl.error(C?.message)},!0)});let h=new Ng.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 Ng.InstrumentationNodeModuleFile(y,t,v=>XCt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>DMe(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:oo.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 XCt(e,t,n,r,o,i){switch(DMe(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 DMe(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,Ng.isWrapped)(e[r])&&t(e,r);return e}var Ng,BMe=O(()=>{m();Ge();Ng=ie(rn(),1)});var OMe,NMe,ebt,tbt,w3,wMe=O(()=>{m();OMe=ie(rn(),1);dt();RMe();BMe();NMe={},ebt=[">=3.0.0 <5"],tbt=[">=6.0.0 <7"],w3=class extends OMe.InstrumentationBase{constructor(t=NMe){super("@sentry/instrumentation-firebase",Zn,t)}setConfig(t={}){super.setConfig({...NMe,...t})}init(){let t=[];return t.push(bMe(this.tracer,ebt,this._wrap,this._unwrap,this.getConfig())),t.push(xMe(this.tracer,tbt,this._wrap,this._unwrap,this.getConfig())),t}}});var kMe,nbt,MMe,rbt,PMe,UMe=O(()=>{m();dt();mr();wMe();kMe="Firebase",nbt={firestoreSpanCreationHook:e=>{Lr(e,"auto.firebase.otel.firestore"),e.setAttribute(Zt,"db.query")},functions:{requestHook:e=>{Lr(e,"auto.firebase.otel.functions"),e.setAttribute(Zt,"http.request")},errorHook:async(e,t)=>{t&&(tn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Db(2e3))}}},MMe=st(kMe,()=>new w3(nbt)),rbt=()=>({name:kMe,setupOnce(){MMe()}}),PMe=rbt});function LMe(){return[Gxe(),y1e(),Y1e(),Pwe(),MBe(),JBe(),uNe(),SNe(),WNe(),EOe(),hwe(),Nwe(),Wwe(),dke(),bke(),kke(),dBe(),Yke(),TBe(),gMe(),yMe(),Xke(),rMe(),sMe(),pMe(),IOe(),PMe()]}var QMe=O(()=>{m();Kke();uMe();pke();jxe();C1e();UMe();Mke();fMe();J1e();Owe();Uwe();pBe();Xwe();hMe();TMe();IBe();PBe();ZBe();cNe();yNe();oMe();SOe();COe();_we();XNe();vke();eMe()});function GMe(e,t={}){e.getOptions().debug&&sY();let[n,r]=obt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function obt(e,t={}){let n=new FMe.BasicTracerProvider({sampler:new zQ(e),resource:(0,k3.defaultResource)().merge((0,k3.resourceFromAttributes)({[R5]:"node",[m5]:"sentry",[x5]:Zn})),forceFlushTimeoutMillis:500,spanProcessors:[new HQ({timeout:ibt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ht.setGlobalTracerProvider(n),Vp.setGlobalPropagator(new jQ);let r=new VQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function ibt(e){if(e!=null){if(e>eZ)return Ta&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eZ}`),eZ;if(e<=0||Number.isNaN(e)){Ta&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var k3,FMe,eZ,jMe=O(()=>{m();Ge();k3=ie(S7(),1),FMe=ie(V7(),1);Jn();dt();mr();sv();cy();eZ=1e6});function HMe(){return XQ().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(hxe(),vxe())}function zMe(e){return[...HMe(),...xi(e)?LMe():[]]}function tZ(e={}){return abt(e,zMe)}function abt(e={},t){qS(e,"node");let n=wY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(GMe(n,{spanProcessors:e.openTelemetrySpanProcessors}),e4()),n}var $Me=O(()=>{m();dt();mr();_xe();Rxe();QMe();jMe()});var aR=O(()=>{m();$Me();dt();mr()});function Ni(){return sbt}function Yu(){return VMe}function qMe(){return ubt}var sbt,VMe,ubt,Gl=O(()=>{"use strict";m();sbt="prod",VMe="0.1.126",ubt=`@tanagram/lore/${VMe}`});function fbt(e=""){if(!dbt.test(e))return e!==e.toLowerCase()}function YMe(e,t){let n=t??pbt,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=fbt(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 Abt(e){return e?e[0].toUpperCase()+e.slice(1):""}function mbt(e){return e?e[0].toLowerCase()+e.slice(1):""}function gbt(e,t){return e?(Array.isArray(e)?e:YMe(e)).map(n=>Abt(t?.normalize?n.toLowerCase():n)).join(""):""}function vO(e,t){return mbt(gbt(e||"",t))}function M3(e,t){return e?(Array.isArray(e)?e:YMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function KMe(e){return M3(e||"","_")}var dbt,pbt,JMe=O(()=>{m();dbt=/\d/,pbt=["-","_","/","."]});import{parseArgs as hbt}from"node:util";function Q3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nZ(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 _bt(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=hbt({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 Sbt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=XMe(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=vO(c.name),g=M3(c.name);if(d!==c.name||g!==c.name){let h=Q3(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=_bt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[vO(d)]??c[M3(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 Cy(`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 Cy(`Invalid value for argument: ${lf(`--${c.name}`)} (${lf(d)}). Expected one of: ${g.map(h=>lf(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new Cy(`Missing required argument: --${c.name}`,"EARG");return a}function XMe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:Q3(r.alias)});return t}async function ybt(e){return Promise.all(e.map(t=>jl(t)))}async function by(e,t){let n=await jl(e.args||{}),r=Sbt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await ybt(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=Tbt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await ZMe(g,S);if(!y)throw new Cy(`Unknown command ${lf(S)}`,"E_UNKNOWN_COMMAND");await by(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await jl(e.default);if(y){if(e.run)throw new Cy("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await ZMe(g,y);if(!C)throw new Cy(`Default sub command ${lf(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await by(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new Cy("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 ZMe(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&&Q3(o.alias).includes(t))return r}}function Tbt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Ibt(r,t)&&n++;continue}return n}return-1}function Ibt(e,t){let n=e.replace(/^-{1,2}/,""),r=vO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===vO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function oZ(e,t){let n=await jl(e.meta||{}),r=XMe(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([lf(v+rZ(C)),WMe(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(", ")+rZ(C);if(a.push([lf(x),WMe(C,v)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!Cbt.test(C.name)){let N=[...(C.alias||[]).map(k=>`--no-${k}`),`--no-${C.name}`].join(", ");a.push([lf(N),[C.negativeDescription,v?L3("(Required)"):""].filter(Boolean).join(" ")])}v&&g.push(`--${C.name}`+rZ(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=Q3(k?.alias),j=[x,...Q].join(", ");d.push([lf(j),k?.description||""]),C.push(x,...Q)}g.push(C.join("|"))}let h=[],S=n.version||o.version;h.push(L3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${U3(P3("USAGE"))} ${lf(`${i}${y?" [OPTIONS]":""} ${g.join(" ")}`)}`,""),c.length>0&&(h.push(U3(P3("ARGUMENTS")),""),h.push(nZ(c," ")),h.push("")),a.length>0&&(h.push(U3(P3("OPTIONS")),""),h.push(nZ(a," ")),h.push("")),d.length>0&&(h.push(U3(P3("COMMANDS")),""),h.push(nZ(d," ")),h.push("",`Use ${lf(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
|
|
40
40
|
`)}function rZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${KMe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function WMe(e,t){let n=t?L3("(Required)"):"",r=e.default===void 0?"":L3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var Cy,Ebt,F3,P3,lf,L3,U3,Cbt,iZ=O(()=>{m();JMe();Cy=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Ebt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),F3=(e,t=39)=>n=>Ebt?n:`\x1B[${e}m${n}\x1B[${t}m`,P3=F3(1,22),lf=F3(36),L3=F3(90),U3=F3(4,24);Cbt=/^no[-A-Z]/});function vbt(e){rPe=e}function j3(){return rPe}function ut(e,t){let n=H3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,j3(),RO].filter(r=>!!r)});e.common.issues.push(n)}function bn(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 Ubt(e,t){return!!((t==="v4"||!t)&&kbt.test(e)||(t==="v6"||!t)&&Mbt.test(e))}function Lbt(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 sR(e){if(e instanceof lu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=df.create(sR(r))}return new lu({...e._def,shape:()=>t})}else return e instanceof wg?new wg({...e._def,type:sR(e.element)}):e instanceof df?df.create(sR(e.unwrap())):e instanceof kg?kg.create(sR(e.unwrap())):e instanceof FA?FA.create(e.items.map(t=>sR(t))):e}function dZ(e,t){let n=pE(e),r=pE(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=dZ(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=dZ(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 iPe(e,t){return new Py({values:e,typeName:qt.ZodEnum,...bn(t)})}var _r,uZ,at,pE,$e,bbt,Gc,RO,rPe,H3,Rbt,cu,gn,oPe,Ku,cZ,lZ,xO,z3,Pt,Wd,ePe,vn,xbt,Dbt,Bbt,Nbt,Obt,wbt,kbt,Mbt,Pbt,fE,vy,Ry,xy,Dy,uR,By,Ny,AE,Og,pf,cR,wg,lu,Oy,G3,$3,wy,FA,V3,lR,dR,q3,ky,My,Py,Uy,mE,Hl,df,kg,Ly,pR,fR,Qbt,Y3,DO,AR,aPe,Fbt,qt,Gbt,sPe,uPe,jbt,Hbt,cPe,zbt,$bt,Vbt,qbt,Ybt,Kbt,Jbt,Zbt,Wbt,Xbt,evt,tvt,nvt,rvt,ovt,ivt,avt,svt,uvt,cvt,lvt,dvt,pvt,fvt,tPe,Avt,mvt,gvt,hvt,_vt,Evt,Svt,yvt,Tvt,uu,Ivt,aZ,Cvt,Zd,pZ,GCn,jCn,HCn,lPe,bvt,vvt,Rvt,xvt,dPe,pPe,fPe,sZ,os,Dvt,Bvt,Nvt,Ovt,fZ,AZ,mZ,wvt,nPe,kvt,Mvt,Pvt,Uvt,gZ,ff=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})})(uZ||(uZ={}));at=_r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pE=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}},$e=_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"]),bbt=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);RO=(e,t)=>{let n;switch(e.code){case $e.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case $e.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_r.jsonStringifyReplacer)}`;break;case $e.unrecognized_keys:n=`Unrecognized key(s) in object: ${_r.joinValues(e.keys,", ")}`;break;case $e.invalid_union:n="Invalid input";break;case $e.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_r.joinValues(e.options)}`;break;case $e.invalid_enum_value:n=`Invalid enum value. Expected ${_r.joinValues(e.options)}, received '${e.received}'`;break;case $e.invalid_arguments:n="Invalid function arguments";break;case $e.invalid_return_type:n="Invalid function return type";break;case $e.invalid_date:n="Invalid date";break;case $e.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 $e.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 $e.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 $e.custom:n="Invalid input";break;case $e.invalid_intersection_types:n="Intersection results could not be merged";break;case $e.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case $e.not_finite:n="Number must be finite";break;default:n=t.defaultError,_r.assertNever(e)}return{message:n}},rPe=RO;H3=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}},Rbt=[];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 gn;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 gn;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}}},gn=Object.freeze({status:"aborted"}),oPe=e=>({status:"dirty",value:e}),Ku=e=>({status:"valid",value:e}),cZ=e=>e.status==="aborted",lZ=e=>e.status==="dirty",xO=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})(Pt||(Pt={}));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}},ePe=(e,t)=>{if(xO(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}}};vn=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 pE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pE(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:pE(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:pE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ePe(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:pE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(z3(o)?o:Promise.resolve(o));return ePe(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:$e.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 Hl({schema:this,typeName:qt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return df.create(this,this._def)}nullable(){return kg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return wg.create(this,this._def)}promise(){return mE.create(this,this._def)}or(t){return Oy.create([this,t],this._def)}and(t){return wy.create(this,t,this._def)}transform(t){return new Hl({...bn(this._def),schema:this,typeName:qt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new Ly({...bn(this._def),innerType:this,defaultValue:n,typeName:qt.ZodDefault})}brand(){return new Y3({typeName:qt.ZodBranded,type:this,...bn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new pR({...bn(this._def),innerType:this,catchValue:n,typeName:qt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return DO.create(this,t)}readonly(){return AR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},xbt=/^c[^\s-]{8,}$/i,Dbt=/^[a-z][a-z0-9]*$/,Bbt=/[0-9A-HJKMNP-TV-Z]{26}/,Nbt=/^[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,Obt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,wbt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),kbt=/^(((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}))$/,Mbt=/^(([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})))$/,Pbt=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$");fE=class e extends vn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:$e.invalid_string,...Pt.errToObj(r)}),this.nonempty=t=>this.min(1,Pt.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:$e.invalid_type,expected:at.string,received:i.parsedType}),gn}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:$e.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:$e.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:$e.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:$e.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Obt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")wbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Nbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")xbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Dbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:$e.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Bbt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:$e.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:$e.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:$e.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:$e.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:$e.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:$e.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Pbt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:$e.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?Ubt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:$e.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",...Pt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Pt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Pt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Pt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Pt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Pt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Pt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Pt.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,...Pt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Pt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Pt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Pt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Pt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Pt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Pt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Pt.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}};fE.create=e=>{var t;return new fE({checks:[],typeName:qt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};vy=class e extends vn{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:$e.invalid_type,expected:at.number,received:i.parsedType}),gn}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:$e.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:$e.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:$e.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Lbt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:$e.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:$e.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,Pt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Pt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Pt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Pt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Pt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Pt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Pt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Pt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Pt.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)}};vy.create=e=>new vy({checks:[],typeName:qt.ZodNumber,coerce:e?.coerce||!1,...bn(e)});Ry=class e extends vn{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:$e.invalid_type,expected:at.bigint,received:i.parsedType}),gn}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:$e.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:$e.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:$e.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,Pt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Pt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Pt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Pt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Pt.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:Pt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Pt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Pt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Pt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Pt.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}};Ry.create=e=>{var t;return new Ry({checks:[],typeName:qt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...bn(e)})};xy=class extends vn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.boolean,received:r.parsedType}),gn}return Ku(t.data)}};xy.create=e=>new xy({typeName:qt.ZodBoolean,coerce:e?.coerce||!1,...bn(e)});Dy=class e extends vn{_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:$e.invalid_type,expected:at.date,received:i.parsedType}),gn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:$e.invalid_date}),gn}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:$e.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:$e.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:Pt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Pt.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}};Dy.create=e=>new Dy({checks:[],coerce:e?.coerce||!1,typeName:qt.ZodDate,...bn(e)});uR=class extends vn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.symbol,received:r.parsedType}),gn}return Ku(t.data)}};uR.create=e=>new uR({typeName:qt.ZodSymbol,...bn(e)});By=class extends vn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.undefined,received:r.parsedType}),gn}return Ku(t.data)}};By.create=e=>new By({typeName:qt.ZodUndefined,...bn(e)});Ny=class extends vn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.null,received:r.parsedType}),gn}return Ku(t.data)}};Ny.create=e=>new Ny({typeName:qt.ZodNull,...bn(e)});AE=class extends vn{constructor(){super(...arguments),this._any=!0}_parse(t){return Ku(t.data)}};AE.create=e=>new AE({typeName:qt.ZodAny,...bn(e)});Og=class extends vn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ku(t.data)}};Og.create=e=>new Og({typeName:qt.ZodUnknown,...bn(e)});pf=class extends vn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:$e.invalid_type,expected:at.never,received:n.parsedType}),gn}};pf.create=e=>new pf({typeName:qt.ZodNever,...bn(e)});cR=class extends vn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.void,received:r.parsedType}),gn}return Ku(t.data)}};cR.create=e=>new cR({typeName:qt.ZodVoid,...bn(e)});wg=class e extends vn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return ut(n,{code:$e.invalid_type,expected:at.array,received:n.parsedType}),gn;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?$e.too_big:$e.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:$e.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:$e.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:Pt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Pt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Pt.toString(n)}})}nonempty(t){return this.min(1,t)}};wg.create=(e,t)=>new wg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:qt.ZodArray,...bn(t)});lu=class e extends vn{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:$e.invalid_type,expected:at.object,received:g.parsedType}),gn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof pf&&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 pf){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:$e.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 Pt.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=Pt.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:qt.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 sR(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 df;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return iPe(_r.objectKeys(this.shape))}};lu.create=(e,t)=>new lu({shape:()=>e,unknownKeys:"strip",catchall:pf.create(),typeName:qt.ZodObject,...bn(t)});lu.strictCreate=(e,t)=>new lu({shape:()=>e,unknownKeys:"strict",catchall:pf.create(),typeName:qt.ZodObject,...bn(t)});lu.lazycreate=(e,t)=>new lu({shape:e,unknownKeys:"strip",catchall:pf.create(),typeName:qt.ZodObject,...bn(t)});Oy=class extends vn{_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:$e.invalid_union,unionErrors:a}),gn}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:$e.invalid_union,unionErrors:c}),gn}}get options(){return this._def.options}};Oy.create=(e,t)=>new Oy({options:e,typeName:qt.ZodUnion,...bn(t)});G3=e=>e instanceof ky?G3(e.schema):e instanceof Hl?G3(e.innerType()):e instanceof My?[e.value]:e instanceof Py?e.options:e instanceof Uy?Object.keys(e.enum):e instanceof Ly?G3(e._def.innerType):e instanceof By?[void 0]:e instanceof Ny?[null]:null,$3=class e extends vn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return ut(n,{code:$e.invalid_type,expected:at.object,received:n.parsedType}),gn;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:$e.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),gn)}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=G3(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:qt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...bn(r)})}};wy=class extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(cZ(i)||cZ(a))return gn;let c=dZ(i.value,a.value);return c.valid?((lZ(i)||lZ(a))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:$e.invalid_intersection_types}),gn)};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}))}};wy.create=(e,t,n)=>new wy({left:e,right:t,typeName:qt.ZodIntersection,...bn(n)});FA=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return ut(r,{code:$e.invalid_type,expected:at.array,received:r.parsedType}),gn;if(r.data.length<this._def.items.length)return ut(r,{code:$e.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),gn;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:$e.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})}};FA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new FA({items:e,typeName:qt.ZodTuple,rest:null,...bn(t)})};V3=class e extends vn{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:$e.invalid_type,expected:at.object,received:r.parsedType}),gn;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 vn?new e({keyType:t,valueType:n,typeName:qt.ZodRecord,...bn(r)}):new e({keyType:fE.create(),valueType:t,typeName:qt.ZodRecord,...bn(n)})}},lR=class extends vn{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:$e.invalid_type,expected:at.map,received:r.parsedType}),gn;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 gn;(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 gn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}}}};lR.create=(e,t,n)=>new lR({valueType:t,keyType:e,typeName:qt.ZodMap,...bn(n)});dR=class e extends vn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return ut(r,{code:$e.invalid_type,expected:at.set,received:r.parsedType}),gn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:$e.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:$e.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 gn;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:Pt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Pt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};dR.create=(e,t)=>new dR({valueType:e,minSize:null,maxSize:null,typeName:qt.ZodSet,...bn(t)});q3=class e extends vn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return ut(n,{code:$e.invalid_type,expected:at.function,received:n.parsedType}),gn;function r(c,d){return H3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,j3(),RO].filter(g=>!!g),issueData:{code:$e.invalid_arguments,argumentsError:d}})}function o(c,d){return H3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,j3(),RO].filter(g=>!!g),issueData:{code:$e.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof mE){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:FA.create(t).rest(Og.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||FA.create([]).rest(Og.create()),returns:n||Og.create(),typeName:qt.ZodFunction,...bn(r)})}},ky=class extends vn{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})}};ky.create=(e,t)=>new ky({getter:e,typeName:qt.ZodLazy,...bn(t)});My=class extends vn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:$e.invalid_literal,expected:this._def.value}),gn}return{status:"valid",value:t.data}}get value(){return this._def.value}};My.create=(e,t)=>new My({value:e,typeName:qt.ZodLiteral,...bn(t)});Py=class e extends vn{_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:$e.invalid_type}),gn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:$e.invalid_enum_value,options:r}),gn}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)))}};Py.create=iPe;Uy=class extends vn{_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:$e.invalid_type}),gn}if(n.indexOf(t.data)===-1){let o=_r.objectValues(n);return ut(r,{received:r.data,code:$e.invalid_enum_value,options:o}),gn}return Ku(t.data)}get enum(){return this._def.values}};Uy.create=(e,t)=>new Uy({values:e,typeName:qt.ZodNativeEnum,...bn(t)});mE=class extends vn{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:$e.invalid_type,expected:at.promise,received:n.parsedType}),gn;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})))}};mE.create=(e,t)=>new mE({type:e,typeName:qt.ZodPromise,...bn(t)});Hl=class extends vn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===qt.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"?gn:(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"?gn:(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(!xO(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=>xO(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);_r.assertNever(o)}};Hl.create=(e,t,n)=>new Hl({schema:e,typeName:qt.ZodEffects,effect:t,...bn(n)});Hl.createWithPreprocess=(e,t,n)=>new Hl({schema:t,effect:{type:"preprocess",transform:e},typeName:qt.ZodEffects,...bn(n)});df=class extends vn{_parse(t){return this._getType(t)===at.undefined?Ku(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};df.create=(e,t)=>new df({innerType:e,typeName:qt.ZodOptional,...bn(t)});kg=class extends vn{_parse(t){return this._getType(t)===at.null?Ku(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};kg.create=(e,t)=>new kg({innerType:e,typeName:qt.ZodNullable,...bn(t)});Ly=class extends vn{_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}};Ly.create=(e,t)=>new Ly({innerType:e,typeName:qt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...bn(t)});pR=class extends vn{_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}};pR.create=(e,t)=>new pR({innerType:e,typeName:qt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...bn(t)});fR=class extends vn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:$e.invalid_type,expected:at.nan,received:r.parsedType}),gn}return{status:"valid",value:t.data}}};fR.create=e=>new fR({typeName:qt.ZodNaN,...bn(e)});Qbt=Symbol("zod_brand"),Y3=class extends vn{_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}},DO=class e extends vn{_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"?gn:i.status==="dirty"?(n.dirty(),oPe(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"?gn: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:qt.ZodPipeline})}},AR=class extends vn{_parse(t){let n=this._def.innerType._parse(t);return xO(n)&&(n.value=Object.freeze(n.value)),n}};AR.create=(e,t)=>new AR({innerType:e,typeName:qt.ZodReadonly,...bn(t)});aPe=(e,t={},n)=>e?AE.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})}}):AE.create(),Fbt={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"})(qt||(qt={}));Gbt=(e,t={message:`Input not instance of ${e.name}`})=>aPe(n=>n instanceof e,t),sPe=fE.create,uPe=vy.create,jbt=fR.create,Hbt=Ry.create,cPe=xy.create,zbt=Dy.create,$bt=uR.create,Vbt=By.create,qbt=Ny.create,Ybt=AE.create,Kbt=Og.create,Jbt=pf.create,Zbt=cR.create,Wbt=wg.create,Xbt=lu.create,evt=lu.strictCreate,tvt=Oy.create,nvt=$3.create,rvt=wy.create,ovt=FA.create,ivt=V3.create,avt=lR.create,svt=dR.create,uvt=q3.create,cvt=ky.create,lvt=My.create,dvt=Py.create,pvt=Uy.create,fvt=mE.create,tPe=Hl.create,Avt=df.create,mvt=kg.create,gvt=Hl.createWithPreprocess,hvt=DO.create,_vt=()=>sPe().optional(),Evt=()=>uPe().optional(),Svt=()=>cPe().optional(),yvt={string:e=>fE.create({...e,coerce:!0}),number:e=>vy.create({...e,coerce:!0}),boolean:e=>xy.create({...e,coerce:!0}),bigint:e=>Ry.create({...e,coerce:!0}),date:e=>Dy.create({...e,coerce:!0})},Tvt=gn,uu=Object.freeze({__proto__:null,defaultErrorMap:RO,setErrorMap:vbt,getErrorMap:j3,makeIssue:H3,EMPTY_PATH:Rbt,addIssueToContext:ut,ParseStatus:cu,INVALID:gn,DIRTY:oPe,OK:Ku,isAborted:cZ,isDirty:lZ,isValid:xO,isAsync:z3,get util(){return _r},get objectUtil(){return uZ},ZodParsedType:at,getParsedType:pE,ZodType:vn,ZodString:fE,ZodNumber:vy,ZodBigInt:Ry,ZodBoolean:xy,ZodDate:Dy,ZodSymbol:uR,ZodUndefined:By,ZodNull:Ny,ZodAny:AE,ZodUnknown:Og,ZodNever:pf,ZodVoid:cR,ZodArray:wg,ZodObject:lu,ZodUnion:Oy,ZodDiscriminatedUnion:$3,ZodIntersection:wy,ZodTuple:FA,ZodRecord:V3,ZodMap:lR,ZodSet:dR,ZodFunction:q3,ZodLazy:ky,ZodLiteral:My,ZodEnum:Py,ZodNativeEnum:Uy,ZodPromise:mE,ZodEffects:Hl,ZodTransformer:Hl,ZodOptional:df,ZodNullable:kg,ZodDefault:Ly,ZodCatch:pR,ZodNaN:fR,BRAND:Qbt,ZodBranded:Y3,ZodPipeline:DO,ZodReadonly:AR,custom:aPe,Schema:vn,ZodSchema:vn,late:Fbt,get ZodFirstPartyTypeKind(){return qt},coerce:yvt,any:Ybt,array:Wbt,bigint:Hbt,boolean:cPe,date:zbt,discriminatedUnion:nvt,effect:tPe,enum:dvt,function:uvt,instanceof:Gbt,intersection:rvt,lazy:cvt,literal:lvt,map:avt,nan:jbt,nativeEnum:pvt,never:Jbt,null:qbt,nullable:mvt,number:uPe,object:Xbt,oboolean:Svt,onumber:Evt,optional:Avt,ostring:_vt,pipeline:hvt,preprocess:gvt,promise:fvt,record:ivt,set:svt,strictObject:evt,string:sPe,symbol:$bt,transformer:tPe,tuple:ovt,undefined:Vbt,union:tvt,unknown:Kbt,void:Zbt,NEVER:Tvt,ZodIssueCode:$e,quotelessJson:bbt,ZodError:Gc}),Ivt=e=>typeof e?.safeParse=="function",aZ=e=>typeof e?.passthrough=="function",Cvt=(e,t)=>aZ(e)?aZ(t)?e.merge(t):e:aZ(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()))}),pZ=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}},GCn=uu.object({message:uu.literal("Request validation failed"),pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),jCn=uu.object({pathParameterErrors:Zd.nullable(),headerErrors:Zd.nullable(),queryParameterErrors:Zd.nullable(),bodyErrors:Zd.nullable()}),HCn=uu.object({paramsResult:Zd.nullable(),headersResult:Zd.nullable(),queryResult:Zd.nullable(),bodyResult:Zd.nullable()}),lPe="zod-ts-rest-polyfill",bvt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},vvt=e=>bvt(e)?e:Ivt(e)?(Object.assign(e,{"~standard":{vendor:lPe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,Rvt=(e,t)=>e?t?e instanceof lu&&t instanceof lu?Cvt(e,t):{...e,...t}:e:t,xvt=(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===lPe?{error:new Gc(r.issues)}:{error:new pZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},dPe=Symbol("ContractNoBody"),pPe=e=>"method"in e&&"path"in e,fPe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return pPe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:Rvt(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,fPe(r,t)]})),sZ=Symbol("ContractPlainType"),os=()=>({router:(e,t)=>fPe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>sZ,body:()=>sZ,type:()=>sZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>dPe}),Dvt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},Bvt=(e,t=!1)=>{let n=t?Nvt(e):Ovt(e);return n?.length>0?"?"+n:""},Nvt=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("&"):"",Ovt=e=>e?Object.keys(e).flatMap(t=>fZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",fZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>fZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>fZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],AZ=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}},mZ=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===dPe?void 0:await c.json(),headers:c.headers},S=vvt(g);if(S&&(i??e.validateResponseOnClient)){let y=xvt(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}},wvt=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},nPe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),kvt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,g=n.api||mZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,v])=>typeof v=="function"?[C,v(e)]:[C,v])),S={...h&&nPe(h),...nPe(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:wvt(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})},Mvt=(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:Pvt(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}}},Pvt=(e,t,n,r,o)=>{let i=Dvt({path:r.path,params:n}),a=Bvt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},Uvt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Mvt(e,t,r),i=await kvt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new AZ(i,n)}},gZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>pPe(r)?[n,Uvt(r,t)]:[n,gZ(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(Qy,e),Qy}var APe,hZ,_Z,Af,gE,Qy,Fy=O(()=>{m();hZ=Object.freeze({status:"aborted"});_Z=Symbol("zod_brand"),Af=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},gE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(APe=globalThis).__zod_globalConfig??(APe.__zod_globalConfig={});Qy=globalThis.__zod_globalConfig});var Pe={};za(Pe,{BIGINT_FORMAT_RANGES:()=>xZ,Class:()=>SZ,NUMBER_FORMAT_RANGES:()=>RZ,aborted:()=>SE,allowsEval:()=>IZ,assert:()=>jvt,assertEqual:()=>Lvt,assertIs:()=>Fvt,assertNever:()=>Gvt,assertNotEqual:()=>Qvt,assignProp:()=>_E,base64ToUint8Array:()=>gPe,base64urlToUint8Array:()=>iRt,cached:()=>gR,captureStackTrace:()=>J3,cleanEnum:()=>oRt,cleanRegex:()=>OO,clone:()=>Ju,cloneDef:()=>zvt,createTransparentProxy:()=>Jvt,defineLazy:()=>Fn,esc:()=>K3,escapeRegex:()=>Xd,explicitlyAborted:()=>DZ,extend:()=>Xvt,finalizeIssue:()=>Zu,floatSafeRemainder:()=>yZ,getElementAtPath:()=>$vt,getEnumValues:()=>NO,getLengthableOrigin:()=>MO,getParsedType:()=>Kvt,getSizableOrigin:()=>kO,hexToUint8Array:()=>sRt,isObject:()=>Gy,isPlainObject:()=>EE,issue:()=>hR,joinValues:()=>ue,jsonStringifyReplacer:()=>mR,merge:()=>tRt,mergeDefs:()=>Mg,normalizeParams:()=>He,nullish:()=>hE,numKeys:()=>Yvt,objectClone:()=>Hvt,omit:()=>Wvt,optionalKeys:()=>vZ,parsedType:()=>we,partial:()=>nRt,pick:()=>Zvt,prefixIssues:()=>jc,primitiveTypes:()=>bZ,promiseAllObject:()=>Vvt,propertyKeyTypes:()=>wO,randomString:()=>qvt,required:()=>rRt,safeExtend:()=>eRt,shallowClone:()=>CZ,slugify:()=>TZ,stringifyPrimitive:()=>Ne,uint8ArrayToBase64:()=>hPe,uint8ArrayToBase64url:()=>aRt,uint8ArrayToHex:()=>uRt,unwrapMessage:()=>BO});function Lvt(e){return e}function Qvt(e){return e}function Fvt(e){}function Gvt(e){throw new Error("Unexpected value in exhaustive check")}function jvt(e){}function NO(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 mR(e,t){return typeof t=="bigint"?t.toString():t}function gR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function hE(e){return e==null}function OO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function yZ(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 Fn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==mPe)return r===void 0&&(r=mPe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Hvt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function _E(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Mg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function zvt(e){return Mg(e._zod.def)}function $vt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function Vvt(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 qvt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function K3(e){return JSON.stringify(e)}function TZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Gy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function EE(e){if(Gy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Gy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function CZ(e){return EE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Yvt(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 Jvt(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 vZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Zvt(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=Mg(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 _E(this,"shape",a),a},checks:[]});return Ju(e,i)}function Wvt(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=Mg(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 _E(this,"shape",a),a},checks:[]});return Ju(e,i)}function Xvt(e,t){if(!EE(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=Mg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return _E(this,"shape",i),i}});return Ju(e,o)}function eRt(e,t){if(!EE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Mg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return _E(this,"shape",r),r}});return Ju(e,n)}function tRt(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=Mg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return _E(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ju(e,n)}function nRt(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=Mg(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 _E(this,"shape",d),d},checks:[]});return Ju(t,a)}function rRt(e,t,n){let r=Mg(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 _E(this,"shape",i),i}});return Ju(t,r)}function SE(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 DZ(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 BO(e){return typeof e=="string"?e:e?.message}function Zu(e,t,n){let r=e.message?e.message:BO(e.inst?._zod.def?.error?.(e))??BO(t?.error?.(e))??BO(n.customError?.(e))??BO(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 kO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function MO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function we(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 hR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function oRt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function gPe(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 hPe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function iRt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return gPe(t+n)}function aRt(e){return hPe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function sRt(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 uRt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var mPe,J3,IZ,Kvt,wO,bZ,RZ,xZ,SZ,Et=O(()=>{m();Fy();mPe=Symbol("evaluating");J3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};IZ=gR(()=>{if(Qy.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Kvt=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}`)}},wO=new Set(["string","number","symbol"]),bZ=new Set(["string","number","bigint","boolean","symbol","undefined"]);RZ={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]},xZ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};SZ=class{constructor(...t){}}});function UO(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 LO(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 BZ(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 EPe(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 NZ(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 ${EPe(r.path)}`);return t.join(`
|
|
41
41
|
`)}var _Pe,PO,Hc,OZ=O(()=>{m();Fy();Et();_Pe=(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,mR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},PO=ne("$ZodError",_Pe),Hc=ne("$ZodError",_Pe,{Parent:Error})});var _R,Z3,ER,W3,SR,wZ,yR,kZ,X3,lRt,e6,dRt,t6,pRt,n6,fRt,r6,ARt,o6,mRt,i6,gRt,a6,hRt,MZ=O(()=>{m();Fy();OZ();Et();_R=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 Af;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Zu(d,i,gi())));throw J3(c,o?.callee),c}return a.value},Z3=_R(Hc),ER=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 J3(c,o?.callee),c}return a.value},W3=ER(Hc),SR=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 Af;return i.issues.length?{success:!1,error:new(e??PO)(i.issues.map(a=>Zu(a,o,gi())))}:{success:!0,data:i.value}},wZ=SR(Hc),yR=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}},kZ=yR(Hc),X3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return _R(e)(t,n,o)},lRt=X3(Hc),e6=e=>(t,n,r)=>_R(e)(t,n,r),dRt=e6(Hc),t6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return ER(e)(t,n,o)},pRt=t6(Hc),n6=e=>async(t,n,r)=>ER(e)(t,n,r),fRt=n6(Hc),r6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return SR(e)(t,n,o)},ARt=r6(Hc),o6=e=>(t,n,r)=>SR(e)(t,n,r),mRt=o6(Hc),i6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return yR(e)(t,n,o)},gRt=i6(Hc),a6=e=>async(t,n,r)=>yR(e)(t,n,r),hRt=a6(Hc)});var zl={};za(zl,{base64:()=>ZZ,base64url:()=>s6,bigint:()=>oW,boolean:()=>aW,browserEmail:()=>bRt,cidrv4:()=>KZ,cidrv6:()=>JZ,cuid:()=>PZ,cuid2:()=>UZ,date:()=>eW,datetime:()=>nW,domain:()=>xRt,duration:()=>jZ,e164:()=>XZ,email:()=>zZ,emoji:()=>$Z,extendedDuration:()=>_Rt,guid:()=>HZ,hex:()=>DRt,hostname:()=>RRt,html5Email:()=>TRt,httpProtocol:()=>WZ,idnEmail:()=>CRt,integer:()=>iW,ipv4:()=>VZ,ipv6:()=>qZ,ksuid:()=>FZ,lowercase:()=>cW,mac:()=>YZ,md5_base64:()=>NRt,md5_base64url:()=>ORt,md5_hex:()=>BRt,nanoid:()=>GZ,null:()=>sW,number:()=>u6,rfc5322Email:()=>IRt,sha1_base64:()=>kRt,sha1_base64url:()=>MRt,sha1_hex:()=>wRt,sha256_base64:()=>URt,sha256_base64url:()=>LRt,sha256_hex:()=>PRt,sha384_base64:()=>FRt,sha384_base64url:()=>GRt,sha384_hex:()=>QRt,sha512_base64:()=>HRt,sha512_base64url:()=>zRt,sha512_hex:()=>jRt,string:()=>rW,time:()=>tW,ulid:()=>LZ,undefined:()=>uW,unicodeEmail:()=>SPe,uppercase:()=>lW,uuid:()=>jy,uuid4:()=>ERt,uuid6:()=>SRt,uuid7:()=>yRt,xid:()=>QZ});function $Z(){return new RegExp(vRt,"u")}function TPe(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 tW(e){return new RegExp(`^${TPe(e)}$`)}function nW(e){let t=TPe({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(`^${yPe}T(?:${r})$`)}function QO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function FO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var PZ,UZ,LZ,QZ,FZ,GZ,jZ,_Rt,HZ,jy,ERt,SRt,yRt,zZ,TRt,IRt,SPe,CRt,bRt,vRt,VZ,qZ,YZ,KZ,JZ,ZZ,s6,RRt,xRt,WZ,XZ,yPe,eW,rW,oW,iW,u6,aW,sW,uW,cW,lW,DRt,BRt,NRt,ORt,wRt,kRt,MRt,PRt,URt,LRt,QRt,FRt,GRt,jRt,HRt,zRt,c6=O(()=>{m();Et();PZ=/^[cC][0-9a-z]{6,}$/,UZ=/^[0-9a-z]+$/,LZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,QZ=/^[0-9a-vA-V]{20}$/,FZ=/^[A-Za-z0-9]{27}$/,GZ=/^[a-zA-Z0-9_-]{21}$/,jZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,_Rt=/^[-+]?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)?)??$/,HZ=/^([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})$/,jy=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)$/,ERt=jy(4),SRt=jy(6),yRt=jy(7),zZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,TRt=/^[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])?)*$/,IRt=/^(([^<>()\[\]\\.,;:\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,}))$/,SPe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,CRt=SPe,bRt=/^[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])?)*$/,vRt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";VZ=/^(?:(?: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])$/,qZ=/^(([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}|:))$/,YZ=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}$`)},KZ=/^((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])$/,JZ=/^(([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])$/,ZZ=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,s6=/^[A-Za-z0-9_-]*$/,RRt=/^(?=.{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])?)*\.?$/,xRt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,WZ=/^https?$/,XZ=/^\+[1-9]\d{6,14}$/,yPe="(?:(?:\\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])))",eW=new RegExp(`^${yPe}$`);rW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},oW=/^-?\d+n?$/,iW=/^-?\d+$/,u6=/^-?\d+(?:\.\d+)?$/,aW=/^(?:true|false)$/i,sW=/^null$/i,uW=/^undefined$/i,cW=/^[^A-Z]*$/,lW=/^[^a-z]*$/,DRt=/^[0-9a-fA-F]*$/;BRt=/^[0-9a-fA-F]{32}$/,NRt=QO(22,"=="),ORt=FO(22),wRt=/^[0-9a-fA-F]{40}$/,kRt=QO(27,"="),MRt=FO(27),PRt=/^[0-9a-fA-F]{64}$/,URt=QO(43,"="),LRt=FO(43),QRt=/^[0-9a-fA-F]{96}$/,FRt=QO(64,""),GRt=FO(64),jRt=/^[0-9a-fA-F]{128}$/,HRt=QO(86,"=="),zRt=FO(86)});function IPe(e,t,n){e.issues.length&&t.issues.push(...jc(n,e.issues))}var qr,CPe,l6,d6,dW,pW,fW,AW,mW,gW,hW,_W,EW,TR,SW,yW,TW,IW,CW,bW,vW,RW,xW,p6=O(()=>{m();Fy();c6();Et();qr=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),CPe={number:"number",bigint:"bigint",object:"date"},l6=ne("$ZodCheckLessThan",(e,t)=>{qr.init(e,t);let n=CPe[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})}}),d6=ne("$ZodCheckGreaterThan",(e,t)=>{qr.init(e,t);let n=CPe[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})}}),dW=ne("$ZodCheckMultipleOf",(e,t)=>{qr.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):yZ(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})}}),pW=ne("$ZodCheckNumberFormat",(e,t)=>{qr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=RZ[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=iW)}),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})}}),fW=ne("$ZodCheckBigIntFormat",(e,t)=>{qr.init(e,t);let[n,r]=xZ[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})}}),AW=ne("$ZodCheckMaxSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),mW=ne("$ZodCheckMinSize",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),gW=ne("$ZodCheckSizeEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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:kO(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})}}),hW=ne("$ZodCheckMaxLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_W=ne("$ZodCheckMinLength",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),EW=ne("$ZodCheckLengthEquals",(e,t)=>{var n;qr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!hE(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=MO(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})}}),TR=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;qr.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=()=>{})}),SW=ne("$ZodCheckRegex",(e,t)=>{TR.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})}}),yW=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=cW),TR.init(e,t)}),TW=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=lW),TR.init(e,t)}),IW=ne("$ZodCheckIncludes",(e,t)=>{qr.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})}}),CW=ne("$ZodCheckStartsWith",(e,t)=>{qr.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})}}),bW=ne("$ZodCheckEndsWith",(e,t)=>{qr.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})}});vW=ne("$ZodCheckProperty",(e,t)=>{qr.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=>IPe(o,n,t.property));IPe(r,n,t.property)}}),RW=ne("$ZodCheckMimeType",(e,t)=>{qr.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})}}),xW=ne("$ZodCheckOverwrite",(e,t)=>{qr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var GO,DW=O(()=>{m();GO=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(`
|
|
@@ -488,7 +488,7 @@ exec ${mue(n)} ${mue(e)} "$@"
|
|
|
488
488
|
Authorization expired. Please try again.
|
|
489
489
|
`);return;case"login_failed":console.log(`
|
|
490
490
|
Login failed: ${e.message}
|
|
491
|
-
`);return}}});var D5e={};za(D5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>J9e,getOpenBrowserCommand:()=>rVe,loginCommand:()=>Sue,openBrowser:()=>nVe,pollForTokens:()=>tVe,requestDeviceAuthorization:()=>eVe,runLogin:()=>oVe});import{spawn as hHt}from"node:child_process";function J9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function SHt(e){let n=await Wt({token:e}).whoAmI({headers:{}});n.status===200&&(v4e(`lore_${n.body.user.id}`),D4e(J9e(n.body)))}async function Z9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function W9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function X9e(e,t){return new URL(t,e).toString()}async function yHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function eVe({clientId:e,workosApiOrigin:t}){let n=await fetch(X9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await Z9e(n);if(!n.ok)throw new Error(W9e(r));return r}async function tVe({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(X9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:EHt,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 Z9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await K9e(c*1e3);break;case"slow_down":c+=1,await K9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(W9e(h))}}}async function nVe(e){let{command:t,args:n}=rVe(process.platform,e);await new Promise((r,o)=>{let i=hHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function rVe(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 THt(e){if(!await Kn())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function IHt(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){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function CHt(e){if(ZR(e))return`Could not reach the Lore API at ${WR()}. 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 oVe({client:e=Wt(),enableLaunchAgent:t=Lz,openBrowser:n=nVe,platform:r=process.platform,pollForTokens:o=tVe,requestDeviceAuthorization:i=eVe,getCliAuthConfig:a=yHt,setAccessToken:c=JR,setRefreshToken:d=tj,cacheAnalyticsDistinctId:g=SHt,timeoutMs:h=_Ht,progress:S=q9e}={}){if(await THt(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){_e.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=>{_e.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await IHt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),bw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),bw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),bw());let C=CHt(y);throw C&&(S({kind:"login_failed",message:C}),bw()),y}}var _Ht,EHt,K9e,Sue,Hse=O(async()=>{"use strict";m();So();or();nj();wr();ki();DE();await Fse();await x5e();Hk();tT();Y9e();_Ht=5*60*1e3,EHt="urn:ietf:params:oauth:grant-type:device_code";K9e=e=>new Promise(t=>setTimeout(t,e));Sue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){_e.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 yz({skipIfAlreadyConfigured:!0});return}await oVe({...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]="
|
|
491
|
+
`);return}}});var D5e={};za(D5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>J9e,getOpenBrowserCommand:()=>rVe,loginCommand:()=>Sue,openBrowser:()=>nVe,pollForTokens:()=>tVe,requestDeviceAuthorization:()=>eVe,runLogin:()=>oVe});import{spawn as hHt}from"node:child_process";function J9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function SHt(e){let n=await Wt({token:e}).whoAmI({headers:{}});n.status===200&&(v4e(`lore_${n.body.user.id}`),D4e(J9e(n.body)))}async function Z9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function W9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function X9e(e,t){return new URL(t,e).toString()}async function yHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function eVe({clientId:e,workosApiOrigin:t}){let n=await fetch(X9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await Z9e(n);if(!n.ok)throw new Error(W9e(r));return r}async function tVe({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(X9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:EHt,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 Z9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await K9e(c*1e3);break;case"slow_down":c+=1,await K9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(W9e(h))}}}async function nVe(e){let{command:t,args:n}=rVe(process.platform,e);await new Promise((r,o)=>{let i=hHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function rVe(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 THt(e){if(!await Kn())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function IHt(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){_e.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function CHt(e){if(ZR(e))return`Could not reach the Lore API at ${WR()}. 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 oVe({client:e=Wt(),enableLaunchAgent:t=Lz,openBrowser:n=nVe,platform:r=process.platform,pollForTokens:o=tVe,requestDeviceAuthorization:i=eVe,getCliAuthConfig:a=yHt,setAccessToken:c=JR,setRefreshToken:d=tj,cacheAnalyticsDistinctId:g=SHt,timeoutMs:h=_Ht,progress:S=q9e}={}){if(await THt(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){_e.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=>{_e.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await IHt(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),bw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),bw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),bw());let C=CHt(y);throw C&&(S({kind:"login_failed",message:C}),bw()),y}}var _Ht,EHt,K9e,Sue,Hse=O(async()=>{"use strict";m();So();or();nj();wr();ki();DE();await Fse();await x5e();Hk();tT();Y9e();_Ht=5*60*1e3,EHt="urn:ietf:params:oauth:grant-type:device_code";K9e=e=>new Promise(t=>setTimeout(t,e));Sue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){_e.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 yz({skipIfAlreadyConfigured:!0});return}await oVe({...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]="39f72f66-3b52-44b5-bf09-7c4d7f28e47a",e._sentryDebugIdIdentifier="sentry-dbid-39f72f66-3b52-44b5-bf09-7c4d7f28e47a")}catch{}})();m();m();m();function Tle(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 Ile=Tle();Ile.ok||(process.stderr.write(`lore: ${Ile.message}.
|
|
492
492
|
Upgrade Node (e.g. \`nvm install 20\`) and re-run.
|
|
493
493
|
`),process.exit(1));m();aR();Gl();function cbt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var lbt=cbt();tZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Ni(),release:Yu(),sendDefaultPii:!0,enableLogs:!0,spotlight:lbt,tracesSampleRate:1});WU("service_name","lore-cli");aR();iZ();import{realpathSync as k8t}from"node:fs";import{fileURLToPath as M8t,pathToFileURL as Bqe}from"node:url";m();m();zG();So();or();wr();m();function vw(e){let t=e;return t._def??t.def??{}}function Mkt(e){let t=vw(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Vc(e,t,n){let r=Mkt(e);return r===t||r===n}function Y4e(e){let t=vw(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Pkt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=vw(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=vw(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=vw(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 Ukt(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:Pkt(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}=Ukt(i,t);n[o]=a,r[o]={isArray:c,leafKind:Lkt(i)}}return{args:n,fields:r}}function hre(e,t={}){let n=mre(e);return n?gre(n,t):{args:{},fields:{}}}function Lkt(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 Qkt(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 Fkt(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 Gkt(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 jkt(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=>jkt(n,a))}function Hkt(e,t,n){return e.resource==="threads"&&t==="id"?Gkt(n):n}function J4e(e){let t=Qkt(JG,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}){_e.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.getAccessToken??Kn)())throw new qe("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]=Hkt(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 qe(`Invalid request for \`lore ${e.resource} ${e.op}\`:
|
|
494
494
|
${k.join(`
|