@tanagram/lore 0.1.147 → 0.1.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
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 B7e=Object.create;var WM=Object.defineProperty;var N7e=Object.getOwnPropertyDescriptor;var O7e=Object.getOwnPropertyNames;var w7e=Object.getPrototypeOf,k7e=Object.prototype.hasOwnProperty;var Ge=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$a=(e,t)=>{for(var n in t)WM(e,n,{get:t[n],enumerable:!0})},Ole=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of O7e(t))!k7e.call(e,o)&&o!==n&&WM(e,o,{get:()=>t[o],enumerable:!(r=N7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?B7e(w7e(e)):{},Ole(t||!e||!e.__esModule?WM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Ole(WM({},"__esModule",{value:!0}),e);var m=N(()=>{(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.147"}}catch{}})()});var ig,T$=N(()=>{m();ig="1.9.1"});function P7e(e){let t=new Set([e]),n=new Set,r=e.match(Ple);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(Ple);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 Ple,Mle,Lle=N(()=>{m();T$();Ple=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Mle=P7e(ig)});function cA(e,t,n,r=!1){var o;let i=tB[eB]=(o=tB[eB])!==null&&o!==void 0?o:{version:ig};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!==ig){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ig}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ig}.`),!0}function bl(e){var t,n;let r=(t=tB[eB])===null||t===void 0?void 0:t.version;if(!(!r||!Mle(r)))return(n=tB[eB])===null||n===void 0?void 0:n[e]}function lA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ig}.`);let n=tB[eB];n&&delete n[e]}var M7e,eB,tB,DS=N(()=>{m();T$();Lle();M7e=ig.split(".")[0],eB=Symbol.for(`opentelemetry.js.api.${M7e}`),tB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function nB(e,t,n){let r=bl("diag");if(r)return r[e](t,...n)}var XM,Ule=N(()=>{m();DS();XM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return nB("debug",this._namespace,t)}error(...t){return nB("error",this._namespace,t)}info(...t){return nB("info",this._namespace,t)}warn(...t){return nB("warn",this._namespace,t)}verbose(...t){return nB("verbose",this._namespace,t)}}});var Ea,e2=N(()=>{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"})(Ea||(Ea={}))});function Qle(e,t){e<Ea.NONE?e=Ea.NONE:e>Ea.ALL&&(e=Ea.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",Ea.ERROR),warn:n("warn",Ea.WARN),info:n("info",Ea.INFO),debug:n("debug",Ea.DEBUG),verbose:n("verbose",Ea.VERBOSE)}}var Fle=N(()=>{m();e2()});var L7e,Va,BS=N(()=>{m();Ule();Fle();e2();DS();L7e="diag",Va=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=bl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:Ea.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=bl("diag"),h=Qle((c=i.logLevel)!==null&&c!==void 0?c:Ea.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 cA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{lA(L7e,n)},n.createComponentLogger=o=>new XM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var t2,Gle=N(()=>{m();t2=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 jle,Hle=N(()=>{m();jle=Symbol("BaggageEntryMetadata")});function zle(e={}){return new t2(new Map(Object.entries(e)))}function $le(e){return typeof e!="string"&&(U7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:jle,toString(){return e}}}var U7e,I$=N(()=>{m();BS();Gle();Hle();U7e=Va.instance()});function vl(e){return Symbol.for(e)}var C$,JC,rB=N(()=>{m();C$=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}}},JC=new C$});var b$,v$,n2,Vle=N(()=>{m();b$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],v$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(v$[t]=console[t])}n2=class{constructor(){function t(n){return function(...r){let o=v$[n];if(typeof o!="function"&&(o=v$.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<b$.length;n++)this[b$[n].n]=t(b$[n].c)}}});function qle(){return P$}var R$,ZC,x$,D$,B$,N$,oB,O$,w$,k$,P$,Q7e,F7e,G7e,j7e,H7e,z7e,$7e,M$=N(()=>{m();R$=class{constructor(){}createGauge(t,n){return F7e}createHistogram(t,n){return G7e}createCounter(t,n){return Q7e}createUpDownCounter(t,n){return j7e}createObservableGauge(t,n){return z7e}createObservableCounter(t,n){return H7e}createObservableUpDownCounter(t,n){return $7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},ZC=class{},x$=class extends ZC{add(t,n){}},D$=class extends ZC{add(t,n){}},B$=class extends ZC{record(t,n){}},N$=class extends ZC{record(t,n){}},oB=class{addCallback(t){}removeCallback(t){}},O$=class extends oB{},w$=class extends oB{},k$=class extends oB{},P$=new R$,Q7e=new x$,F7e=new B$,G7e=new N$,j7e=new D$,H7e=new O$,z7e=new w$,$7e=new k$});var r2,Yle=N(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(r2||(r2={}))});var o2,i2,L$=N(()=>{m();o2={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},i2={set(e,t,n){e!=null&&(e[t]=n)}}});var a2,Kle=N(()=>{m();rB();a2=class{active(){return JC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var U$,V7e,dA,iB=N(()=>{m();Kle();DS();BS();U$="context",V7e=new a2,dA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return cA(U$,t,Va.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 bl(U$)||V7e}disable(){this._getContextManager().disable(),lA(U$,Va.instance())}}});var Js,Q$=N(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Js||(Js={}))});var aB,NS,s2,u2=N(()=>{m();Q$();aB="0000000000000000",NS="00000000000000000000000000000000",s2={traceId:NS,spanId:aB,traceFlags:Js.NONE}});var pA,c2=N(()=>{m();u2();pA=class{constructor(t=s2){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 l2(e){return e.getValue(F$)||void 0}function Jle(){return l2(dA.getInstance().active())}function sB(e,t){return e.setValue(F$,t)}function Zle(e){return e.deleteValue(F$)}function Wle(e,t){return sB(e,new pA(t))}function d2(e){var t;return(t=l2(e))===null||t===void 0?void 0:t.spanContext()}var F$,G$=N(()=>{m();rB();c2();iB();F$=vl("OpenTelemetry Context Key SPAN")});function Xle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(p2[e.charCodeAt(r)]|0)+(p2[e.charCodeAt(r+1)]|0)+(p2[e.charCodeAt(r+2)]|0)+(p2[e.charCodeAt(r+3)]|0);return n===t}function j$(e){return Xle(e,32)&&e!==NS}function H$(e){return Xle(e,16)&&e!==aB}function ag(e){return j$(e.traceId)&&H$(e.spanId)}function ede(e){return new pA(e)}var p2,f2=N(()=>{m();u2();c2();p2=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 q7e(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 z$,WC,$$=N(()=>{m();iB();G$();c2();f2();z$=dA.getInstance(),WC=class{startSpan(t,n,r=z$.active()){if(!!n?.root)return new pA;let i=r&&d2(r);return q7e(i)&&ag(i)?new pA(i):new pA}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??z$.active(),g=this.startSpan(t,i,d),h=sB(d,g);return z$.with(h,c,void 0,g)}}});var Y7e,XC,V$=N(()=>{m();$$();Y7e=new WC,XC=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):Y7e}}});var A2,tde=N(()=>{m();$$();A2=class{getTracer(t,n,r){return new WC}}});var K7e,OS,q$=N(()=>{m();V$();tde();K7e=new A2,OS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new XC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:K7e}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 m2,nde=N(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(m2||(m2={}))});var io,rde=N(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(io||(io={}))});var ci,ode=N(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ci||(ci={}))});function ide(e){return W7e.test(e)}function ade(e){return X7e.test(e)&&!eYe.test(e)}var Y$,J7e,Z7e,W7e,X7e,eYe,sde=N(()=>{m();Y$="[_0-9a-z-*/]",J7e=`[a-z]${Y$}{0,255}`,Z7e=`[a-z0-9]${Y$}{0,240}@[a-z]${Y$}{0,13}`,W7e=new RegExp(`^(?:${J7e}|${Z7e})$`),X7e=/^[ -~]{0,255}[!-~]$/,eYe=/,|=/});var ude,tYe,cde,lde,g2,dde=N(()=>{m();sde();ude=32,tYe=512,cde=",",lde="=",g2=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+lde+this.get(n)),t),[]).join(cde)}_parse(t){t.length>tYe||(this._internalState=t.split(cde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(lde);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);ide(a)&&ade(c)&&n.set(a,c)}return n},new Map),this._internalState.size>ude&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ude))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function pde(e){return new g2(e)}var fde=N(()=>{m();dde()});var Ke,Ade=N(()=>{m();iB();Ke=dA.getInstance()});var Rl,mde=N(()=>{m();BS();Rl=Va.instance()});var K$,gde,hde=N(()=>{m();M$();K$=class{getMeter(t,n,r){return P$}},gde=new K$});var J$,h2,_de=N(()=>{m();hde();DS();BS();J$="metrics",h2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return cA(J$,t,Va.instance())}getMeterProvider(){return bl(J$)||gde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){lA(J$,Va.instance())}}});var Z$,Ede=N(()=>{m();_de();Z$=h2.getInstance()});var _2,Sde=N(()=>{m();_2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function X$(e){return e.getValue(W$)||void 0}function yde(){return X$(dA.getInstance().active())}function Tde(e,t){return e.setValue(W$,t)}function Ide(e){return e.deleteValue(W$)}var W$,Cde=N(()=>{m();iB();rB();W$=vl("OpenTelemetry Baggage Key")});var e5,nYe,E2,bde=N(()=>{m();DS();Sde();L$();Cde();I$();BS();e5="propagation",nYe=new _2,E2=class e{constructor(){this.createBaggage=zle,this.getBaggage=X$,this.getActiveBaggage=yde,this.setBaggage=Tde,this.deleteBaggage=Ide}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return cA(e5,t,Va.instance())}inject(t,n,r=i2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=o2){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){lA(e5,Va.instance())}_getGlobalPropagator(){return bl(e5)||nYe}}});var Jp,vde=N(()=>{m();bde();Jp=E2.getInstance()});var t5,S2,Rde=N(()=>{m();DS();q$();f2();G$();BS();t5="trace",S2=class e{constructor(){this._proxyTracerProvider=new OS,this.wrapSpanContext=ede,this.isSpanContextValid=ag,this.deleteSpan=Zle,this.getSpan=l2,this.getActiveSpan=Jle,this.getSpanContext=d2,this.setSpan=sB,this.setSpanContext=Wle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=cA(t5,this._proxyTracerProvider,Va.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return bl(t5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){lA(t5,Va.instance()),this._proxyTracerProvider=new OS}}});var zt,xde=N(()=>{m();Rde();zt=S2.getInstance()});var We={};$a(We,{DiagConsoleLogger:()=>n2,DiagLogLevel:()=>Ea,INVALID_SPANID:()=>aB,INVALID_SPAN_CONTEXT:()=>s2,INVALID_TRACEID:()=>NS,ProxyTracer:()=>XC,ProxyTracerProvider:()=>OS,ROOT_CONTEXT:()=>JC,SamplingDecision:()=>m2,SpanKind:()=>io,SpanStatusCode:()=>ci,TraceFlags:()=>Js,ValueType:()=>r2,baggageEntryMetadataFromString:()=>$le,context:()=>Ke,createContextKey:()=>vl,createNoopMeter:()=>qle,createTraceState:()=>pde,default:()=>rYe,defaultTextMapGetter:()=>o2,defaultTextMapSetter:()=>i2,diag:()=>Rl,isSpanContextValid:()=>ag,isValidSpanId:()=>H$,isValidTraceId:()=>j$,metrics:()=>Z$,propagation:()=>Jp,trace:()=>zt});var rYe,je=N(()=>{m();I$();rB();Vle();e2();M$();Yle();L$();V$();q$();nde();rde();ode();Q$();fde();f2();u2();Ade();mde();Ede();vde();xde();rYe={context:Ke,diag:Rl,metrics:Z$,propagation:Jp,trace:zt}});var uB=Q(r_=>{"use strict";m();Object.defineProperty(r_,"__esModule",{value:!0});r_.isTracingSuppressed=r_.unsuppressTracing=r_.suppressTracing=void 0;var oYe=(je(),Me(We)),n5=(0,oYe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function iYe(e){return e.setValue(n5,!0)}r_.suppressTracing=iYe;function aYe(e){return e.deleteValue(n5)}r_.unsuppressTracing=aYe;function sYe(e){return e.getValue(n5)===!0}r_.isTracingSuppressed=sYe});var r5=Q(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.BAGGAGE_MAX_TOTAL_LENGTH=Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Zs.BAGGAGE_HEADER=Zs.BAGGAGE_ITEMS_SEPARATOR=Zs.BAGGAGE_PROPERTIES_SEPARATOR=Zs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Zs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Zs.BAGGAGE_PROPERTIES_SEPARATOR=";";Zs.BAGGAGE_ITEMS_SEPARATOR=",";Zs.BAGGAGE_HEADER="baggage";Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Zs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var o5=Q(fA=>{"use strict";m();Object.defineProperty(fA,"__esModule",{value:!0});fA.parseKeyPairsIntoRecord=fA.parsePairKeyValue=fA.getKeyPairs=fA.serializeKeyPairs=void 0;var uYe=(je(),Me(We)),eb=r5();function cYe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?eb.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>eb.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}fA.serializeKeyPairs=cYe;function lYe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=eb.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}fA.getKeyPairs=lYe;function Dde(e){if(!e)return;let t=e.indexOf(eb.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(eb.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,uYe.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}fA.parsePairKeyValue=Dde;function dYe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(eb.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Dde(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}fA.parseKeyPairsIntoRecord=dYe});var Bde=Q(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.W3CBaggagePropagator=void 0;var i5=(je(),Me(We)),pYe=uB(),wS=r5(),a5=o5(),s5=class{inject(t,n,r){let o=i5.propagation.getBaggage(t);if(!o||(0,pYe.isTracingSuppressed)(t))return;let i=(0,a5.getKeyPairs)(o).filter(c=>c.length<=wS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,wS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,a5.serializeKeyPairs)(i);a.length>0&&r.set(n,wS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,wS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(wS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(wS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,a5.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:i5.propagation.setBaggage(t,i5.propagation.createBaggage(a))}fields(){return[wS.BAGGAGE_HEADER]}};y2.W3CBaggagePropagator=s5});var Nde=Q(T2=>{"use strict";m();Object.defineProperty(T2,"__esModule",{value:!0});T2.AnchoredClock=void 0;var u5=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}};T2.AnchoredClock=u5});var Mde=Q(o_=>{"use strict";m();Object.defineProperty(o_,"__esModule",{value:!0});o_.isAttributeValue=o_.isAttributeKey=o_.sanitizeAttributes=void 0;var Ode=(je(),Me(We));function fYe(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(!wde(n)){Ode.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!kde(r)){Ode.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}o_.sanitizeAttributes=fYe;function wde(e){return typeof e=="string"&&e!==""}o_.isAttributeKey=wde;function kde(e){return e==null?!0:Array.isArray(e)?AYe(e):Pde(typeof e)}o_.isAttributeValue=kde;function AYe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Pde(r)){t=r;continue}return!1}return!1}}return!0}function Pde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var c5=Q(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.loggingErrorHandler=void 0;var mYe=(je(),Me(We));function gYe(){return e=>{mYe.diag.error(hYe(e))}}I2.loggingErrorHandler=gYe;function hYe(e){return typeof e=="string"?e:JSON.stringify(_Ye(e))}function _Ye(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 Ude=Q(tb=>{"use strict";m();Object.defineProperty(tb,"__esModule",{value:!0});tb.globalErrorHandler=tb.setGlobalErrorHandler=void 0;var EYe=c5(),Lde=(0,EYe.loggingErrorHandler)();function SYe(e){Lde=e}tb.setGlobalErrorHandler=SYe;function yYe(e){try{Lde(e)}catch{}}tb.globalErrorHandler=yYe});var jde=Q(AA=>{"use strict";m();Object.defineProperty(AA,"__esModule",{value:!0});AA.getStringListFromEnv=AA.getBooleanFromEnv=AA.getStringFromEnv=AA.getNumberFromEnv=void 0;var Qde=(je(),Me(We)),Fde=Ge("util");function TYe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Qde.diag.warn(`Unknown value ${(0,Fde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}AA.getNumberFromEnv=TYe;function Gde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}AA.getStringFromEnv=Gde;function IYe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Qde.diag.warn(`Unknown value ${(0,Fde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}AA.getBooleanFromEnv=IYe;function CYe(e){return Gde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}AA.getStringListFromEnv=CYe});var Hde=Q(C2=>{"use strict";m();Object.defineProperty(C2,"__esModule",{value:!0});C2._globalThis=void 0;C2._globalThis=globalThis});var zde=Q(b2=>{"use strict";m();Object.defineProperty(b2,"__esModule",{value:!0});b2.VERSION=void 0;b2.VERSION="2.6.1"});function Ri(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 l5=N(()=>{m()});var $de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,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,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,bYe,d5,vYe,RYe,xYe,DYe,p5,BYe,NYe,OYe,wYe,kYe,PYe,MYe,LYe,UYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,f5,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,A5,aKe,sKe,m5,g5,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,cB,nb,h5,bKe,vKe,kS,RKe,xKe,DKe,BKe,_5,E5,NKe,S5,OKe,wKe,kKe,PKe,MKe,LKe,UKe,QKe,FKe,GKe,jKe,HKe,zKe,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,y5,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,T5,SJe,I5,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,BJe,NJe,OJe,wJe,kJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,hZe,_Ze,EZe,SZe,yZe,TZe,IZe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,CZe,bZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,wZe,kZe,PZe,mme,gme,hme,_me,Eme,MZe,LZe,UZe,QZe,FZe,GZe,Sme,yme,Tme,jZe,HZe,zZe,$Ze,Ime,Cme,bme,vme,VZe,qZe,YZe,KZe,JZe,Rme,xme,Dme,Bme,Nme,Ome,wme,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,kme,Pme,Mme,Lme,Ume,iWe,aWe,sWe,uWe,cWe,lWe,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,age,sge,uge,cge,lge,wWe,kWe,PWe,MWe,LWe,UWe,dge,pge,QWe,FWe,GWe,fge,Age,jWe,HWe,zWe,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,Oge,wge,cXe,lXe,dXe,kge=N(()=>{m();l5();$de="aws.lambda.invoked_arn",Vde="db.system",qde="db.connection_string",Yde="db.user",Kde="db.jdbc.driver_classname",Jde="db.name",Zde="db.statement",Wde="db.operation",Xde="db.mssql.instance_name",epe="db.cassandra.keyspace",tpe="db.cassandra.page_size",npe="db.cassandra.consistency_level",rpe="db.cassandra.table",ope="db.cassandra.idempotence",ipe="db.cassandra.speculative_execution_count",ape="db.cassandra.coordinator.id",spe="db.cassandra.coordinator.dc",upe="db.hbase.namespace",cpe="db.redis.database_index",lpe="db.mongodb.collection",dpe="db.sql.table",ppe="exception.type",fpe="exception.message",Ape="exception.stacktrace",mpe="exception.escaped",gpe="faas.trigger",hpe="faas.execution",_pe="faas.document.collection",Epe="faas.document.operation",Spe="faas.document.time",ype="faas.document.name",Tpe="faas.time",Ipe="faas.cron",Cpe="faas.coldstart",bpe="faas.invoked_name",vpe="faas.invoked_provider",Rpe="faas.invoked_region",xpe="net.transport",Dpe="net.peer.ip",Bpe="net.peer.port",Npe="net.peer.name",Ope="net.host.ip",wpe="net.host.port",kpe="net.host.name",Ppe="net.host.connection.type",Mpe="net.host.connection.subtype",Lpe="net.host.carrier.name",Upe="net.host.carrier.mcc",Qpe="net.host.carrier.mnc",Fpe="net.host.carrier.icc",Gpe="peer.service",jpe="enduser.id",Hpe="enduser.role",zpe="enduser.scope",$pe="thread.id",Vpe="thread.name",qpe="code.function",Ype="code.namespace",Kpe="code.filepath",Jpe="code.lineno",Zpe="http.method",Wpe="http.url",Xpe="http.target",efe="http.host",tfe="http.scheme",nfe="http.status_code",rfe="http.flavor",ofe="http.user_agent",ife="http.request_content_length",afe="http.request_content_length_uncompressed",sfe="http.response_content_length",ufe="http.response_content_length_uncompressed",cfe="http.server_name",lfe="http.route",dfe="http.client_ip",pfe="aws.dynamodb.table_names",ffe="aws.dynamodb.consumed_capacity",Afe="aws.dynamodb.item_collection_metrics",mfe="aws.dynamodb.provisioned_read_capacity",gfe="aws.dynamodb.provisioned_write_capacity",hfe="aws.dynamodb.consistent_read",_fe="aws.dynamodb.projection",Efe="aws.dynamodb.limit",Sfe="aws.dynamodb.attributes_to_get",yfe="aws.dynamodb.index_name",Tfe="aws.dynamodb.select",Ife="aws.dynamodb.global_secondary_indexes",Cfe="aws.dynamodb.local_secondary_indexes",bfe="aws.dynamodb.exclusive_start_table",vfe="aws.dynamodb.table_count",Rfe="aws.dynamodb.scan_forward",xfe="aws.dynamodb.segment",Dfe="aws.dynamodb.total_segments",Bfe="aws.dynamodb.count",Nfe="aws.dynamodb.scanned_count",Ofe="aws.dynamodb.attribute_definitions",wfe="aws.dynamodb.global_secondary_index_updates",kfe="messaging.system",Pfe="messaging.destination",Mfe="messaging.destination_kind",Lfe="messaging.temp_destination",Ufe="messaging.protocol",Qfe="messaging.protocol_version",Ffe="messaging.url",Gfe="messaging.message_id",jfe="messaging.conversation_id",Hfe="messaging.message_payload_size_bytes",zfe="messaging.message_payload_compressed_size_bytes",$fe="messaging.operation",Vfe="messaging.consumer_id",qfe="messaging.rabbitmq.routing_key",Yfe="messaging.kafka.message_key",Kfe="messaging.kafka.consumer_group",Jfe="messaging.kafka.client_id",Zfe="messaging.kafka.partition",Wfe="messaging.kafka.tombstone",Xfe="rpc.system",eAe="rpc.service",tAe="rpc.method",nAe="rpc.grpc.status_code",rAe="rpc.jsonrpc.version",oAe="rpc.jsonrpc.request_id",iAe="rpc.jsonrpc.error_code",aAe="rpc.jsonrpc.error_message",sAe="message.type",uAe="message.id",cAe="message.compressed_size",lAe="message.uncompressed_size",bYe=$de,d5=Vde,vYe=qde,RYe=Yde,xYe=Kde,DYe=Jde,p5=Zde,BYe=Wde,NYe=Xde,OYe=epe,wYe=tpe,kYe=npe,PYe=rpe,MYe=ope,LYe=ipe,UYe=ape,QYe=spe,FYe=upe,GYe=cpe,jYe=lpe,HYe=dpe,zYe=ppe,$Ye=fpe,VYe=Ape,qYe=mpe,f5=gpe,YYe=hpe,KYe=_pe,JYe=Epe,ZYe=Spe,WYe=ype,XYe=Tpe,eKe=Ipe,tKe=Cpe,nKe=bpe,rKe=vpe,oKe=Rpe,iKe=xpe,A5=Dpe,aKe=Bpe,sKe=Npe,m5=Ope,g5=wpe,uKe=kpe,cKe=Ppe,lKe=Mpe,dKe=Lpe,pKe=Upe,fKe=Qpe,AKe=Fpe,mKe=Gpe,gKe=jpe,hKe=Hpe,_Ke=zpe,EKe=$pe,SKe=Vpe,yKe=qpe,TKe=Ype,IKe=Kpe,CKe=Jpe,cB=Zpe,nb=Wpe,h5=Xpe,bKe=efe,vKe=tfe,kS=nfe,RKe=rfe,xKe=ofe,DKe=ife,BKe=afe,_5=sfe,E5=ufe,NKe=cfe,S5=lfe,OKe=dfe,wKe=pfe,kKe=ffe,PKe=Afe,MKe=mfe,LKe=gfe,UKe=hfe,QKe=_fe,FKe=Efe,GKe=Sfe,jKe=yfe,HKe=Tfe,zKe=Ife,$Ke=Cfe,VKe=bfe,qKe=vfe,YKe=Rfe,KKe=xfe,JKe=Dfe,ZKe=Bfe,WKe=Nfe,XKe=Ofe,eJe=wfe,y5=kfe,tJe=Pfe,nJe=Mfe,rJe=Lfe,oJe=Ufe,iJe=Qfe,aJe=Ffe,sJe=Gfe,uJe=jfe,cJe=Hfe,lJe=zfe,dJe=$fe,pJe=Vfe,fJe=qfe,AJe=Yfe,mJe=Kfe,gJe=Jfe,hJe=Zfe,_Je=Wfe,EJe=Xfe,T5=eAe,SJe=tAe,I5=nAe,yJe=rAe,TJe=oAe,IJe=iAe,CJe=aAe,bJe=sAe,vJe=uAe,RJe=cAe,xJe=lAe,DJe=Ri([$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,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,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe]),dAe="other_sql",pAe="mssql",fAe="mysql",AAe="oracle",mAe="db2",gAe="postgresql",hAe="redshift",_Ae="hive",EAe="cloudscape",SAe="hsqldb",yAe="progress",TAe="maxdb",IAe="hanadb",CAe="ingres",bAe="firstsql",vAe="edb",RAe="cache",xAe="adabas",DAe="firebird",BAe="derby",NAe="filemaker",OAe="informix",wAe="instantdb",kAe="interbase",PAe="mariadb",MAe="netezza",LAe="pervasive",UAe="pointbase",QAe="sqlite",FAe="sybase",GAe="teradata",jAe="vertica",HAe="h2",zAe="coldfusion",$Ae="cassandra",VAe="hbase",qAe="mongodb",YAe="redis",KAe="couchbase",JAe="couchdb",ZAe="cosmosdb",WAe="dynamodb",XAe="neo4j",eme="geode",tme="elasticsearch",nme="memcached",rme="cockroachdb",BJe=dAe,NJe=pAe,OJe=fAe,wJe=AAe,kJe=mAe,PJe=gAe,MJe=hAe,LJe=_Ae,UJe=EAe,QJe=SAe,FJe=yAe,GJe=TAe,jJe=IAe,HJe=CAe,zJe=bAe,$Je=vAe,VJe=RAe,qJe=xAe,YJe=DAe,KJe=BAe,JJe=NAe,ZJe=OAe,WJe=wAe,XJe=kAe,eZe=PAe,tZe=MAe,nZe=LAe,rZe=UAe,oZe=QAe,iZe=FAe,aZe=GAe,sZe=jAe,uZe=HAe,cZe=zAe,lZe=$Ae,dZe=VAe,pZe=qAe,fZe=YAe,AZe=KAe,mZe=JAe,gZe=ZAe,hZe=WAe,_Ze=XAe,EZe=eme,SZe=tme,yZe=nme,TZe=rme,IZe=Ri([dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme]),ome="all",ime="each_quorum",ame="quorum",sme="local_quorum",ume="one",cme="two",lme="three",dme="local_one",pme="any",fme="serial",Ame="local_serial",CZe=ome,bZe=ime,vZe=ame,RZe=sme,xZe=ume,DZe=cme,BZe=lme,NZe=dme,OZe=pme,wZe=fme,kZe=Ame,PZe=Ri([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame]),mme="datasource",gme="http",hme="pubsub",_me="timer",Eme="other",MZe=mme,LZe=gme,UZe=hme,QZe=_me,FZe=Eme,GZe=Ri([mme,gme,hme,_me,Eme]),Sme="insert",yme="edit",Tme="delete",jZe=Sme,HZe=yme,zZe=Tme,$Ze=Ri([Sme,yme,Tme]),Ime="alibaba_cloud",Cme="aws",bme="azure",vme="gcp",VZe=Ime,qZe=Cme,YZe=bme,KZe=vme,JZe=Ri([Ime,Cme,bme,vme]),Rme="ip_tcp",xme="ip_udp",Dme="ip",Bme="unix",Nme="pipe",Ome="inproc",wme="other",ZZe=Rme,WZe=xme,XZe=Dme,eWe=Bme,tWe=Nme,nWe=Ome,rWe=wme,oWe=Ri([Rme,xme,Dme,Bme,Nme,Ome,wme]),kme="wifi",Pme="wired",Mme="cell",Lme="unavailable",Ume="unknown",iWe=kme,aWe=Pme,sWe=Mme,uWe=Lme,cWe=Ume,lWe=Ri([kme,Pme,Mme,Lme,Ume]),Qme="gprs",Fme="edge",Gme="umts",jme="cdma",Hme="evdo_0",zme="evdo_a",$me="cdma2000_1xrtt",Vme="hsdpa",qme="hsupa",Yme="hspa",Kme="iden",Jme="evdo_b",Zme="lte",Wme="ehrpd",Xme="hspap",ege="gsm",tge="td_scdma",nge="iwlan",rge="nr",oge="nrnsa",ige="lte_ca",dWe=Qme,pWe=Fme,fWe=Gme,AWe=jme,mWe=Hme,gWe=zme,hWe=$me,_We=Vme,EWe=qme,SWe=Yme,yWe=Kme,TWe=Jme,IWe=Zme,CWe=Wme,bWe=Xme,vWe=ege,RWe=tge,xWe=nge,DWe=rge,BWe=oge,NWe=ige,OWe=Ri([Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,Zme,Wme,Xme,ege,tge,nge,rge,oge,ige]),age="1.0",sge="1.1",uge="2.0",cge="SPDY",lge="QUIC",wWe=age,kWe=sge,PWe=uge,MWe=cge,LWe=lge,UWe={HTTP_1_0:age,HTTP_1_1:sge,HTTP_2_0:uge,SPDY:cge,QUIC:lge},dge="queue",pge="topic",QWe=dge,FWe=pge,GWe=Ri([dge,pge]),fge="receive",Age="process",jWe=fge,HWe=Age,zWe=Ri([fge,Age]),mge=0,gge=1,hge=2,_ge=3,Ege=4,Sge=5,yge=6,Tge=7,Ige=8,Cge=9,bge=10,vge=11,Rge=12,xge=13,Dge=14,Bge=15,Nge=16,$We=mge,VWe=gge,qWe=hge,YWe=_ge,KWe=Ege,JWe=Sge,ZWe=yge,WWe=Tge,XWe=Ige,eXe=Cge,tXe=bge,nXe=vge,rXe=Rge,oXe=xge,iXe=Dge,aXe=Bge,sXe=Nge,uXe={OK:mge,CANCELLED:gge,UNKNOWN:hge,INVALID_ARGUMENT:_ge,DEADLINE_EXCEEDED:Ege,NOT_FOUND:Sge,ALREADY_EXISTS:yge,PERMISSION_DENIED:Tge,RESOURCE_EXHAUSTED:Ige,FAILED_PRECONDITION:Cge,ABORTED:bge,OUT_OF_RANGE:vge,UNIMPLEMENTED:Rge,INTERNAL:xge,UNAVAILABLE:Dge,DATA_LOSS:Bge,UNAUTHENTICATED:Nge},Oge="SENT",wge="RECEIVED",cXe=Oge,lXe=wge,dXe=Ri([Oge,wge])});var Pge=N(()=>{m();kge()});var Mge,Lge,Uge,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,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,cet,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,C5,Net,Oet,wet,ket,Pet,Met,Let,Uet,Qet,Fet,c_e,l_e,d_e,p_e,Get,jet,Het,zet,$et,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,y_e,T_e,I_e,C_e,b_e,v_e,R_e,x_e,D_e,Vet,qet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,utt,ctt,B_e,N_e,ltt,dtt,ptt,O_e,w_e,k_e,P_e,M_e,L_e,U_e,ftt,Att,mtt,gtt,htt,_tt,Ett,Stt,Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,wtt,ktt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,jtt,Htt,aEe=N(()=>{m();l5();Mge="cloud.provider",Lge="cloud.account.id",Uge="cloud.region",Qge="cloud.availability_zone",Fge="cloud.platform",Gge="aws.ecs.container.arn",jge="aws.ecs.cluster.arn",Hge="aws.ecs.launchtype",zge="aws.ecs.task.arn",$ge="aws.ecs.task.family",Vge="aws.ecs.task.revision",qge="aws.eks.cluster.arn",Yge="aws.log.group.names",Kge="aws.log.group.arns",Jge="aws.log.stream.names",Zge="aws.log.stream.arns",Wge="container.name",Xge="container.id",ehe="container.runtime",the="container.image.name",nhe="container.image.tag",rhe="deployment.environment",ohe="device.id",ihe="device.model.identifier",ahe="device.model.name",she="faas.name",uhe="faas.id",che="faas.version",lhe="faas.instance",dhe="faas.max_memory",phe="host.id",fhe="host.name",Ahe="host.type",mhe="host.arch",ghe="host.image.name",hhe="host.image.id",_he="host.image.version",Ehe="k8s.cluster.name",She="k8s.node.name",yhe="k8s.node.uid",The="k8s.namespace.name",Ihe="k8s.pod.uid",Che="k8s.pod.name",bhe="k8s.container.name",vhe="k8s.replicaset.uid",Rhe="k8s.replicaset.name",xhe="k8s.deployment.uid",Dhe="k8s.deployment.name",Bhe="k8s.statefulset.uid",Nhe="k8s.statefulset.name",Ohe="k8s.daemonset.uid",whe="k8s.daemonset.name",khe="k8s.job.uid",Phe="k8s.job.name",Mhe="k8s.cronjob.uid",Lhe="k8s.cronjob.name",Uhe="os.type",Qhe="os.description",Fhe="os.name",Ghe="os.version",jhe="process.pid",Hhe="process.executable.name",zhe="process.executable.path",$he="process.command",Vhe="process.command_line",qhe="process.command_args",Yhe="process.owner",Khe="process.runtime.name",Jhe="process.runtime.version",Zhe="process.runtime.description",Whe="service.name",Xhe="service.namespace",e_e="service.instance.id",t_e="service.version",n_e="telemetry.sdk.name",r_e="telemetry.sdk.language",o_e="telemetry.sdk.version",i_e="telemetry.auto.version",a_e="webengine.name",s_e="webengine.version",u_e="webengine.description",pXe=Mge,fXe=Lge,AXe=Uge,mXe=Qge,gXe=Fge,hXe=Gge,_Xe=jge,EXe=Hge,SXe=zge,yXe=$ge,TXe=Vge,IXe=qge,CXe=Yge,bXe=Kge,vXe=Jge,RXe=Zge,xXe=Wge,DXe=Xge,BXe=ehe,NXe=the,OXe=nhe,wXe=rhe,kXe=ohe,PXe=ihe,MXe=ahe,LXe=she,UXe=uhe,QXe=che,FXe=lhe,GXe=dhe,jXe=phe,HXe=fhe,zXe=Ahe,$Xe=mhe,VXe=ghe,qXe=hhe,YXe=_he,KXe=Ehe,JXe=She,ZXe=yhe,WXe=The,XXe=Ihe,eet=Che,tet=bhe,net=vhe,ret=Rhe,oet=xhe,iet=Dhe,aet=Bhe,set=Nhe,uet=Ohe,cet=whe,det=khe,pet=Phe,fet=Mhe,Aet=Lhe,met=Uhe,get=Qhe,het=Fhe,_et=Ghe,Eet=jhe,yet=Hhe,Tet=zhe,Iet=$he,Cet=Vhe,bet=qhe,vet=Yhe,Ret=Khe,xet=Jhe,Det=Zhe,Bet=Whe,C5=Xhe,Net=e_e,Oet=t_e,wet=n_e,ket=r_e,Pet=o_e,Met=i_e,Let=a_e,Uet=s_e,Qet=u_e,Fet=Ri([Mge,Lge,Uge,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,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e]),c_e="alibaba_cloud",l_e="aws",d_e="azure",p_e="gcp",Get=c_e,jet=l_e,Het=d_e,zet=p_e,$et=Ri([c_e,l_e,d_e,p_e]),f_e="alibaba_cloud_ecs",A_e="alibaba_cloud_fc",m_e="aws_ec2",g_e="aws_ecs",h_e="aws_eks",__e="aws_lambda",E_e="aws_elastic_beanstalk",S_e="azure_vm",y_e="azure_container_instances",T_e="azure_aks",I_e="azure_functions",C_e="azure_app_service",b_e="gcp_compute_engine",v_e="gcp_cloud_run",R_e="gcp_kubernetes_engine",x_e="gcp_cloud_functions",D_e="gcp_app_engine",Vet=f_e,qet=A_e,Yet=m_e,Ket=g_e,Jet=h_e,Zet=__e,Wet=E_e,Xet=S_e,ett=y_e,ttt=T_e,ntt=I_e,rtt=C_e,ott=b_e,itt=v_e,att=R_e,stt=x_e,utt=D_e,ctt=Ri([f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,y_e,T_e,I_e,C_e,b_e,v_e,R_e,x_e,D_e]),B_e="ec2",N_e="fargate",ltt=B_e,dtt=N_e,ptt=Ri([B_e,N_e]),O_e="amd64",w_e="arm32",k_e="arm64",P_e="ia64",M_e="ppc32",L_e="ppc64",U_e="x86",ftt=O_e,Att=w_e,mtt=k_e,gtt=P_e,htt=M_e,_tt=L_e,Ett=U_e,Stt=Ri([O_e,w_e,k_e,P_e,M_e,L_e,U_e]),Q_e="windows",F_e="linux",G_e="darwin",j_e="freebsd",H_e="netbsd",z_e="openbsd",$_e="dragonflybsd",V_e="hpux",q_e="aix",Y_e="solaris",K_e="z_os",ytt=Q_e,Ttt=F_e,Itt=G_e,Ctt=j_e,btt=H_e,vtt=z_e,Rtt=$_e,xtt=V_e,Dtt=q_e,Btt=Y_e,Ntt=K_e,Ott=Ri([Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e]),J_e="cpp",Z_e="dotnet",W_e="erlang",X_e="go",eEe="java",tEe="nodejs",nEe="php",rEe="python",oEe="ruby",iEe="webjs",wtt=J_e,ktt=Z_e,Ptt=W_e,Mtt=X_e,Ltt=eEe,Utt=tEe,Qtt=nEe,Ftt=rEe,Gtt=oEe,jtt=iEe,Htt=Ri([J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe])});var sEe=N(()=>{m();aEe()});var ztt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,cnt,lnt,dnt,pnt,fnt,Ant,b5,v5,mnt,rb,gnt,R5,x5,hnt,PS,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,D5,xnt,Dnt,Bnt,Nnt,Ont,wnt,MS,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,sg,ug,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,B5,N5,crt,O5,w5,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,k5,P5,Crt,M5,brt,L5,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,Hrt,zrt,$rt,Vrt,qrt,Yrt,Krt,i_,Jrt,Zrt,Wrt,U5,uEe=N(()=>{m();ztt="aspnetcore.diagnostics.exception.result",$tt="aborted",Vtt="handled",qtt="skipped",Ytt="unhandled",Ktt="aspnetcore.diagnostics.handler.type",Jtt="aspnetcore.rate_limiting.policy",Ztt="aspnetcore.rate_limiting.result",Wtt="acquired",Xtt="endpoint_limiter",ent="global_limiter",tnt="request_canceled",nnt="aspnetcore.request.is_unhandled",rnt="aspnetcore.routing.is_fallback",ont="aspnetcore.routing.match_status",int="failure",ant="success",snt="aspnetcore.user.is_authenticated",unt="client.address",cnt="client.port",lnt="code.column.number",dnt="code.file.path",pnt="code.function.name",fnt="code.line.number",Ant="code.stacktrace",b5="db.collection.name",v5="db.namespace",mnt="db.operation.batch.size",rb="db.operation.name",gnt="db.query.summary",R5="db.query.text",x5="db.response.status_code",hnt="db.stored_procedure.name",PS="db.system.name",_nt="mariadb",Ent="microsoft.sql_server",Snt="mysql",ynt="postgresql",Tnt="dotnet.gc.heap.generation",Int="gen0",Cnt="gen1",bnt="gen2",vnt="loh",Rnt="poh",D5="error.type",xnt="_OTHER",Dnt="exception.escaped",Bnt="exception.message",Nnt="exception.stacktrace",Ont="exception.type",wnt=e=>`http.request.header.${e}`,MS="http.request.method",knt="_OTHER",Pnt="CONNECT",Mnt="DELETE",Lnt="GET",Unt="HEAD",Qnt="OPTIONS",Fnt="PATCH",Gnt="POST",jnt="PUT",Hnt="TRACE",znt="http.request.method_original",$nt="http.request.resend_count",Vnt=e=>`http.response.header.${e}`,sg="http.response.status_code",ug="http.route",qnt="jvm.gc.action",Ynt="jvm.gc.name",Knt="jvm.memory.pool.name",Jnt="jvm.memory.type",Znt="heap",Wnt="non_heap",Xnt="jvm.thread.daemon",ert="jvm.thread.state",trt="blocked",nrt="new",rrt="runnable",ort="terminated",irt="timed_waiting",art="waiting",srt="network.local.address",urt="network.local.port",B5="network.peer.address",N5="network.peer.port",crt="network.protocol.name",O5="network.protocol.version",w5="network.transport",lrt="pipe",drt="quic",prt="tcp",frt="udp",Art="unix",mrt="network.type",grt="ipv4",hrt="ipv6",_rt="otel.scope.name",Ert="otel.scope.version",Srt="otel.status_code",yrt="ERROR",Trt="OK",Irt="otel.status_description",k5="server.address",P5="server.port",Crt="service.instance.id",M5="service.name",brt="service.namespace",L5="service.version",vrt="signalr.connection.status",Rrt="app_shutdown",xrt="normal_closure",Drt="timeout",Brt="signalr.transport",Nrt="long_polling",Ort="server_sent_events",wrt="web_sockets",krt="telemetry.sdk.language",Prt="cpp",Mrt="dotnet",Lrt="erlang",Urt="go",Qrt="java",Frt="nodejs",Grt="php",jrt="python",Hrt="ruby",zrt="rust",$rt="swift",Vrt="webjs",qrt="telemetry.sdk.name",Yrt="telemetry.sdk.version",Krt="url.fragment",i_="url.full",Jrt="url.path",Zrt="url.query",Wrt="url.scheme",U5="user_agent.original"});var Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,Cot,bot,vot,Rot,xot,Dot,Bot,Not,Oot,wot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,Hot,zot,$ot,Vot,qot,Yot,Kot,cEe=N(()=>{m();Xrt="aspnetcore.diagnostics.exceptions",eot="aspnetcore.rate_limiting.active_request_leases",tot="aspnetcore.rate_limiting.queued_requests",not="aspnetcore.rate_limiting.request.time_in_queue",rot="aspnetcore.rate_limiting.request_lease.duration",oot="aspnetcore.rate_limiting.requests",iot="aspnetcore.routing.match_attempts",aot="db.client.operation.duration",sot="dotnet.assembly.count",uot="dotnet.exceptions",cot="dotnet.gc.collections",lot="dotnet.gc.heap.total_allocated",dot="dotnet.gc.last_collection.heap.fragmentation.size",pot="dotnet.gc.last_collection.heap.size",fot="dotnet.gc.last_collection.memory.committed_size",Aot="dotnet.gc.pause.time",mot="dotnet.jit.compilation.time",got="dotnet.jit.compiled_il.size",hot="dotnet.jit.compiled_methods",_ot="dotnet.monitor.lock_contentions",Eot="dotnet.process.cpu.count",Sot="dotnet.process.cpu.time",yot="dotnet.process.memory.working_set",Tot="dotnet.thread_pool.queue.length",Iot="dotnet.thread_pool.thread.count",Cot="dotnet.thread_pool.work_item.count",bot="dotnet.timer.count",vot="http.client.request.duration",Rot="http.server.request.duration",xot="jvm.class.count",Dot="jvm.class.loaded",Bot="jvm.class.unloaded",Not="jvm.cpu.count",Oot="jvm.cpu.recent_utilization",wot="jvm.cpu.time",kot="jvm.gc.duration",Pot="jvm.memory.committed",Mot="jvm.memory.limit",Lot="jvm.memory.used",Uot="jvm.memory.used_after_last_gc",Qot="jvm.thread.count",Fot="kestrel.active_connections",Got="kestrel.active_tls_handshakes",jot="kestrel.connection.duration",Hot="kestrel.queued_connections",zot="kestrel.queued_requests",$ot="kestrel.rejected_connections",Vot="kestrel.tls_handshake.duration",qot="kestrel.upgraded_connections",Yot="signalr.server.active_connections",Kot="signalr.server.connection.duration"});var Jot,lEe=N(()=>{m();Jot="exception"});var Ur={};$a(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>$tt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Vtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>qtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Ytt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Wtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Xtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>ent,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>tnt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>int,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>ant,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>ztt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Ktt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Jtt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ztt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>nnt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>rnt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>ont,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>snt,ATTR_CLIENT_ADDRESS:()=>unt,ATTR_CLIENT_PORT:()=>cnt,ATTR_CODE_COLUMN_NUMBER:()=>lnt,ATTR_CODE_FILE_PATH:()=>dnt,ATTR_CODE_FUNCTION_NAME:()=>pnt,ATTR_CODE_LINE_NUMBER:()=>fnt,ATTR_CODE_STACKTRACE:()=>Ant,ATTR_DB_COLLECTION_NAME:()=>b5,ATTR_DB_NAMESPACE:()=>v5,ATTR_DB_OPERATION_BATCH_SIZE:()=>mnt,ATTR_DB_OPERATION_NAME:()=>rb,ATTR_DB_QUERY_SUMMARY:()=>gnt,ATTR_DB_QUERY_TEXT:()=>R5,ATTR_DB_RESPONSE_STATUS_CODE:()=>x5,ATTR_DB_STORED_PROCEDURE_NAME:()=>hnt,ATTR_DB_SYSTEM_NAME:()=>PS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Tnt,ATTR_ERROR_TYPE:()=>D5,ATTR_EXCEPTION_ESCAPED:()=>Dnt,ATTR_EXCEPTION_MESSAGE:()=>Bnt,ATTR_EXCEPTION_STACKTRACE:()=>Nnt,ATTR_EXCEPTION_TYPE:()=>Ont,ATTR_HTTP_REQUEST_HEADER:()=>wnt,ATTR_HTTP_REQUEST_METHOD:()=>MS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>znt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>$nt,ATTR_HTTP_RESPONSE_HEADER:()=>Vnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>sg,ATTR_HTTP_ROUTE:()=>ug,ATTR_JVM_GC_ACTION:()=>qnt,ATTR_JVM_GC_NAME:()=>Ynt,ATTR_JVM_MEMORY_POOL_NAME:()=>Knt,ATTR_JVM_MEMORY_TYPE:()=>Jnt,ATTR_JVM_THREAD_DAEMON:()=>Xnt,ATTR_JVM_THREAD_STATE:()=>ert,ATTR_NETWORK_LOCAL_ADDRESS:()=>srt,ATTR_NETWORK_LOCAL_PORT:()=>urt,ATTR_NETWORK_PEER_ADDRESS:()=>B5,ATTR_NETWORK_PEER_PORT:()=>N5,ATTR_NETWORK_PROTOCOL_NAME:()=>crt,ATTR_NETWORK_PROTOCOL_VERSION:()=>O5,ATTR_NETWORK_TRANSPORT:()=>w5,ATTR_NETWORK_TYPE:()=>mrt,ATTR_OTEL_SCOPE_NAME:()=>_rt,ATTR_OTEL_SCOPE_VERSION:()=>Ert,ATTR_OTEL_STATUS_CODE:()=>Srt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Irt,ATTR_SERVER_ADDRESS:()=>k5,ATTR_SERVER_PORT:()=>P5,ATTR_SERVICE_INSTANCE_ID:()=>Crt,ATTR_SERVICE_NAME:()=>M5,ATTR_SERVICE_NAMESPACE:()=>brt,ATTR_SERVICE_VERSION:()=>L5,ATTR_SIGNALR_CONNECTION_STATUS:()=>vrt,ATTR_SIGNALR_TRANSPORT:()=>Brt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>krt,ATTR_TELEMETRY_SDK_NAME:()=>qrt,ATTR_TELEMETRY_SDK_VERSION:()=>Yrt,ATTR_URL_FRAGMENT:()=>Krt,ATTR_URL_FULL:()=>i_,ATTR_URL_PATH:()=>Jrt,ATTR_URL_QUERY:()=>Zrt,ATTR_URL_SCHEME:()=>Wrt,ATTR_USER_AGENT_ORIGINAL:()=>U5,AWSECSLAUNCHTYPEVALUES_EC2:()=>ltt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>dtt,AwsEcsLaunchtypeValues:()=>ptt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Vet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>qet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Yet,CLOUDPLATFORMVALUES_AWS_ECS:()=>Ket,CLOUDPLATFORMVALUES_AWS_EKS:()=>Jet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Wet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Zet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>ttt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>rtt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>ett,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>ntt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Xet,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>utt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>stt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>itt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>ott,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>att,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Get,CLOUDPROVIDERVALUES_AWS:()=>jet,CLOUDPROVIDERVALUES_AZURE:()=>Het,CLOUDPROVIDERVALUES_GCP:()=>zet,CloudPlatformValues:()=>ctt,CloudProviderValues:()=>$et,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>CZe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>OZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>bZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>NZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>RZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>kZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>xZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>vZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>wZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>BZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>DZe,DBSYSTEMVALUES_ADABAS:()=>qJe,DBSYSTEMVALUES_CACHE:()=>VJe,DBSYSTEMVALUES_CASSANDRA:()=>lZe,DBSYSTEMVALUES_CLOUDSCAPE:()=>UJe,DBSYSTEMVALUES_COCKROACHDB:()=>TZe,DBSYSTEMVALUES_COLDFUSION:()=>cZe,DBSYSTEMVALUES_COSMOSDB:()=>gZe,DBSYSTEMVALUES_COUCHBASE:()=>AZe,DBSYSTEMVALUES_COUCHDB:()=>mZe,DBSYSTEMVALUES_DB2:()=>kJe,DBSYSTEMVALUES_DERBY:()=>KJe,DBSYSTEMVALUES_DYNAMODB:()=>hZe,DBSYSTEMVALUES_EDB:()=>$Je,DBSYSTEMVALUES_ELASTICSEARCH:()=>SZe,DBSYSTEMVALUES_FILEMAKER:()=>JJe,DBSYSTEMVALUES_FIREBIRD:()=>YJe,DBSYSTEMVALUES_FIRSTSQL:()=>zJe,DBSYSTEMVALUES_GEODE:()=>EZe,DBSYSTEMVALUES_H2:()=>uZe,DBSYSTEMVALUES_HANADB:()=>jJe,DBSYSTEMVALUES_HBASE:()=>dZe,DBSYSTEMVALUES_HIVE:()=>LJe,DBSYSTEMVALUES_HSQLDB:()=>QJe,DBSYSTEMVALUES_INFORMIX:()=>ZJe,DBSYSTEMVALUES_INGRES:()=>HJe,DBSYSTEMVALUES_INSTANTDB:()=>WJe,DBSYSTEMVALUES_INTERBASE:()=>XJe,DBSYSTEMVALUES_MARIADB:()=>eZe,DBSYSTEMVALUES_MAXDB:()=>GJe,DBSYSTEMVALUES_MEMCACHED:()=>yZe,DBSYSTEMVALUES_MONGODB:()=>pZe,DBSYSTEMVALUES_MSSQL:()=>NJe,DBSYSTEMVALUES_MYSQL:()=>OJe,DBSYSTEMVALUES_NEO4J:()=>_Ze,DBSYSTEMVALUES_NETEZZA:()=>tZe,DBSYSTEMVALUES_ORACLE:()=>wJe,DBSYSTEMVALUES_OTHER_SQL:()=>BJe,DBSYSTEMVALUES_PERVASIVE:()=>nZe,DBSYSTEMVALUES_POINTBASE:()=>rZe,DBSYSTEMVALUES_POSTGRESQL:()=>PJe,DBSYSTEMVALUES_PROGRESS:()=>FJe,DBSYSTEMVALUES_REDIS:()=>fZe,DBSYSTEMVALUES_REDSHIFT:()=>MJe,DBSYSTEMVALUES_SQLITE:()=>oZe,DBSYSTEMVALUES_SYBASE:()=>iZe,DBSYSTEMVALUES_TERADATA:()=>aZe,DBSYSTEMVALUES_VERTICA:()=>sZe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>_nt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Ent,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Snt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>ynt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Int,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Cnt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>bnt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>vnt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Rnt,DbCassandraConsistencyLevelValues:()=>PZe,DbSystemValues:()=>IZe,ERROR_TYPE_VALUE_OTHER:()=>xnt,EVENT_EXCEPTION:()=>Jot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>zZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>HZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>jZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>VZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>qZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>YZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>KZe,FAASTRIGGERVALUES_DATASOURCE:()=>MZe,FAASTRIGGERVALUES_HTTP:()=>LZe,FAASTRIGGERVALUES_OTHER:()=>FZe,FAASTRIGGERVALUES_PUBSUB:()=>UZe,FAASTRIGGERVALUES_TIMER:()=>QZe,FaasDocumentOperationValues:()=>$Ze,FaasInvokedProviderValues:()=>JZe,FaasTriggerValues:()=>GZe,HOSTARCHVALUES_AMD64:()=>ftt,HOSTARCHVALUES_ARM32:()=>Att,HOSTARCHVALUES_ARM64:()=>mtt,HOSTARCHVALUES_IA64:()=>gtt,HOSTARCHVALUES_PPC32:()=>htt,HOSTARCHVALUES_PPC64:()=>_tt,HOSTARCHVALUES_X86:()=>Ett,HTTPFLAVORVALUES_HTTP_1_0:()=>wWe,HTTPFLAVORVALUES_HTTP_1_1:()=>kWe,HTTPFLAVORVALUES_HTTP_2_0:()=>PWe,HTTPFLAVORVALUES_QUIC:()=>LWe,HTTPFLAVORVALUES_SPDY:()=>MWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Pnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Mnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Lnt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Unt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Qnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>knt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Fnt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Gnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>jnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Hnt,HostArchValues:()=>Stt,HttpFlavorValues:()=>UWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Znt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Wnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>trt,JVM_THREAD_STATE_VALUE_NEW:()=>nrt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>rrt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>ort,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>irt,JVM_THREAD_STATE_VALUE_WAITING:()=>art,MESSAGETYPEVALUES_RECEIVED:()=>lXe,MESSAGETYPEVALUES_SENT:()=>cXe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>QWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>FWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>HWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>jWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Xrt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>eot,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>tot,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>oot,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>rot,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>not,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>iot,METRIC_DB_CLIENT_OPERATION_DURATION:()=>aot,METRIC_DOTNET_ASSEMBLY_COUNT:()=>sot,METRIC_DOTNET_EXCEPTIONS:()=>uot,METRIC_DOTNET_GC_COLLECTIONS:()=>cot,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>lot,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>dot,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>pot,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>fot,METRIC_DOTNET_GC_PAUSE_TIME:()=>Aot,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>mot,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>got,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>hot,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>_ot,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Eot,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Sot,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>yot,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Tot,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Iot,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Cot,METRIC_DOTNET_TIMER_COUNT:()=>bot,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>vot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Rot,METRIC_JVM_CLASS_COUNT:()=>xot,METRIC_JVM_CLASS_LOADED:()=>Dot,METRIC_JVM_CLASS_UNLOADED:()=>Bot,METRIC_JVM_CPU_COUNT:()=>Not,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Oot,METRIC_JVM_CPU_TIME:()=>wot,METRIC_JVM_GC_DURATION:()=>kot,METRIC_JVM_MEMORY_COMMITTED:()=>Pot,METRIC_JVM_MEMORY_LIMIT:()=>Mot,METRIC_JVM_MEMORY_USED:()=>Lot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Uot,METRIC_JVM_THREAD_COUNT:()=>Qot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Fot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Got,METRIC_KESTREL_CONNECTION_DURATION:()=>jot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Hot,METRIC_KESTREL_QUEUED_REQUESTS:()=>zot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>$ot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Vot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>qot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Yot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Kot,MessageTypeValues:()=>dXe,MessagingDestinationKindValues:()=>GWe,MessagingOperationValues:()=>zWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>AWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>hWe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>pWe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>CWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>mWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>gWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>TWe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>dWe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>vWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>_We,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>SWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>bWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>EWe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>yWe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>xWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>IWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>NWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>DWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>BWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>RWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>fWe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>sWe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>uWe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>cWe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>iWe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>aWe,NETTRANSPORTVALUES_INPROC:()=>nWe,NETTRANSPORTVALUES_IP:()=>XZe,NETTRANSPORTVALUES_IP_TCP:()=>ZZe,NETTRANSPORTVALUES_IP_UDP:()=>WZe,NETTRANSPORTVALUES_OTHER:()=>rWe,NETTRANSPORTVALUES_PIPE:()=>tWe,NETTRANSPORTVALUES_UNIX:()=>eWe,NETWORK_TRANSPORT_VALUE_PIPE:()=>lrt,NETWORK_TRANSPORT_VALUE_QUIC:()=>drt,NETWORK_TRANSPORT_VALUE_TCP:()=>prt,NETWORK_TRANSPORT_VALUE_UDP:()=>frt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Art,NETWORK_TYPE_VALUE_IPV4:()=>grt,NETWORK_TYPE_VALUE_IPV6:()=>hrt,NetHostConnectionSubtypeValues:()=>OWe,NetHostConnectionTypeValues:()=>lWe,NetTransportValues:()=>oWe,OSTYPEVALUES_AIX:()=>Dtt,OSTYPEVALUES_DARWIN:()=>Itt,OSTYPEVALUES_DRAGONFLYBSD:()=>Rtt,OSTYPEVALUES_FREEBSD:()=>Ctt,OSTYPEVALUES_HPUX:()=>xtt,OSTYPEVALUES_LINUX:()=>Ttt,OSTYPEVALUES_NETBSD:()=>btt,OSTYPEVALUES_OPENBSD:()=>vtt,OSTYPEVALUES_SOLARIS:()=>Btt,OSTYPEVALUES_WINDOWS:()=>ytt,OSTYPEVALUES_Z_OS:()=>Ntt,OTEL_STATUS_CODE_VALUE_ERROR:()=>yrt,OTEL_STATUS_CODE_VALUE_OK:()=>Trt,OsTypeValues:()=>Ott,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>tXe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>ZWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>VWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>aXe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>KWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>eXe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>oXe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>YWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>JWe,RPCGRPCSTATUSCODEVALUES_OK:()=>$We,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>nXe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>WWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>XWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>sXe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>iXe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>rXe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>qWe,RpcGrpcStatusCodeValues:()=>uXe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>GKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>XKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>UKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>kKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>ZKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>VKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>zKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>eJe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>jKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>PKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>FKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>$Ke,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>QKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>MKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>LKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>WKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>YKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>KKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>HKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>qKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>wKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>JKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>bYe,SEMATTRS_CODE_FILEPATH:()=>IKe,SEMATTRS_CODE_FUNCTION:()=>yKe,SEMATTRS_CODE_LINENO:()=>CKe,SEMATTRS_CODE_NAMESPACE:()=>TKe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>kYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>QYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>UYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>MYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>OYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>wYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>LYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>PYe,SEMATTRS_DB_CONNECTION_STRING:()=>vYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>FYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>xYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>jYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>NYe,SEMATTRS_DB_NAME:()=>DYe,SEMATTRS_DB_OPERATION:()=>BYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>GYe,SEMATTRS_DB_SQL_TABLE:()=>HYe,SEMATTRS_DB_STATEMENT:()=>p5,SEMATTRS_DB_SYSTEM:()=>d5,SEMATTRS_DB_USER:()=>RYe,SEMATTRS_ENDUSER_ID:()=>gKe,SEMATTRS_ENDUSER_ROLE:()=>hKe,SEMATTRS_ENDUSER_SCOPE:()=>_Ke,SEMATTRS_EXCEPTION_ESCAPED:()=>qYe,SEMATTRS_EXCEPTION_MESSAGE:()=>$Ye,SEMATTRS_EXCEPTION_STACKTRACE:()=>VYe,SEMATTRS_EXCEPTION_TYPE:()=>zYe,SEMATTRS_FAAS_COLDSTART:()=>tKe,SEMATTRS_FAAS_CRON:()=>eKe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>KYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>WYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>JYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>ZYe,SEMATTRS_FAAS_EXECUTION:()=>YYe,SEMATTRS_FAAS_INVOKED_NAME:()=>nKe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>rKe,SEMATTRS_FAAS_INVOKED_REGION:()=>oKe,SEMATTRS_FAAS_TIME:()=>XYe,SEMATTRS_FAAS_TRIGGER:()=>f5,SEMATTRS_HTTP_CLIENT_IP:()=>OKe,SEMATTRS_HTTP_FLAVOR:()=>RKe,SEMATTRS_HTTP_HOST:()=>bKe,SEMATTRS_HTTP_METHOD:()=>cB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>DKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>BKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>_5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>E5,SEMATTRS_HTTP_ROUTE:()=>S5,SEMATTRS_HTTP_SCHEME:()=>vKe,SEMATTRS_HTTP_SERVER_NAME:()=>NKe,SEMATTRS_HTTP_STATUS_CODE:()=>kS,SEMATTRS_HTTP_TARGET:()=>h5,SEMATTRS_HTTP_URL:()=>nb,SEMATTRS_HTTP_USER_AGENT:()=>xKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>RJe,SEMATTRS_MESSAGE_ID:()=>vJe,SEMATTRS_MESSAGE_TYPE:()=>bJe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>xJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>pJe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>uJe,SEMATTRS_MESSAGING_DESTINATION:()=>tJe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>nJe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>gJe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>mJe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>AJe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>hJe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>_Je,SEMATTRS_MESSAGING_MESSAGE_ID:()=>sJe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>lJe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>cJe,SEMATTRS_MESSAGING_OPERATION:()=>dJe,SEMATTRS_MESSAGING_PROTOCOL:()=>oJe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>iJe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>fJe,SEMATTRS_MESSAGING_SYSTEM:()=>y5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>rJe,SEMATTRS_MESSAGING_URL:()=>aJe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>AKe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>pKe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>fKe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>dKe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>lKe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>cKe,SEMATTRS_NET_HOST_IP:()=>m5,SEMATTRS_NET_HOST_NAME:()=>uKe,SEMATTRS_NET_HOST_PORT:()=>g5,SEMATTRS_NET_PEER_IP:()=>A5,SEMATTRS_NET_PEER_NAME:()=>sKe,SEMATTRS_NET_PEER_PORT:()=>aKe,SEMATTRS_NET_TRANSPORT:()=>iKe,SEMATTRS_PEER_SERVICE:()=>mKe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>I5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>IJe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>CJe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>TJe,SEMATTRS_RPC_JSONRPC_VERSION:()=>yJe,SEMATTRS_RPC_METHOD:()=>SJe,SEMATTRS_RPC_SERVICE:()=>T5,SEMATTRS_RPC_SYSTEM:()=>EJe,SEMATTRS_THREAD_ID:()=>EKe,SEMATTRS_THREAD_NAME:()=>SKe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>_Xe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>hXe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>EXe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>SXe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>yXe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>TXe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>IXe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>bXe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>CXe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>RXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>vXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>fXe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>mXe,SEMRESATTRS_CLOUD_PLATFORM:()=>gXe,SEMRESATTRS_CLOUD_PROVIDER:()=>pXe,SEMRESATTRS_CLOUD_REGION:()=>AXe,SEMRESATTRS_CONTAINER_ID:()=>DXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>NXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>OXe,SEMRESATTRS_CONTAINER_NAME:()=>xXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>BXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>wXe,SEMRESATTRS_DEVICE_ID:()=>kXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>PXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>MXe,SEMRESATTRS_FAAS_ID:()=>UXe,SEMRESATTRS_FAAS_INSTANCE:()=>FXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>GXe,SEMRESATTRS_FAAS_NAME:()=>LXe,SEMRESATTRS_FAAS_VERSION:()=>QXe,SEMRESATTRS_HOST_ARCH:()=>$Xe,SEMRESATTRS_HOST_ID:()=>jXe,SEMRESATTRS_HOST_IMAGE_ID:()=>qXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>VXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>YXe,SEMRESATTRS_HOST_NAME:()=>HXe,SEMRESATTRS_HOST_TYPE:()=>zXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>KXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>tet,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Aet,SEMRESATTRS_K8S_CRONJOB_UID:()=>fet,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>cet,SEMRESATTRS_K8S_DAEMONSET_UID:()=>uet,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>iet,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>oet,SEMRESATTRS_K8S_JOB_NAME:()=>pet,SEMRESATTRS_K8S_JOB_UID:()=>det,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>WXe,SEMRESATTRS_K8S_NODE_NAME:()=>JXe,SEMRESATTRS_K8S_NODE_UID:()=>ZXe,SEMRESATTRS_K8S_POD_NAME:()=>eet,SEMRESATTRS_K8S_POD_UID:()=>XXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>ret,SEMRESATTRS_K8S_REPLICASET_UID:()=>net,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>set,SEMRESATTRS_K8S_STATEFULSET_UID:()=>aet,SEMRESATTRS_OS_DESCRIPTION:()=>get,SEMRESATTRS_OS_NAME:()=>het,SEMRESATTRS_OS_TYPE:()=>met,SEMRESATTRS_OS_VERSION:()=>_et,SEMRESATTRS_PROCESS_COMMAND:()=>Iet,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>bet,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cet,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>yet,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Tet,SEMRESATTRS_PROCESS_OWNER:()=>vet,SEMRESATTRS_PROCESS_PID:()=>Eet,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Det,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Ret,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>xet,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Net,SEMRESATTRS_SERVICE_NAME:()=>Bet,SEMRESATTRS_SERVICE_NAMESPACE:()=>C5,SEMRESATTRS_SERVICE_VERSION:()=>Oet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Met,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>ket,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>wet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Pet,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Qet,SEMRESATTRS_WEBENGINE_NAME:()=>Let,SEMRESATTRS_WEBENGINE_VERSION:()=>Uet,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Rrt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>xrt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Drt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Nrt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Ort,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>wrt,SemanticAttributes:()=>DJe,SemanticResourceAttributes:()=>Fet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>wtt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>ktt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Ptt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Mtt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Ltt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Utt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Qtt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Ftt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Gtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>jtt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Prt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Mrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Lrt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Urt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Qrt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Frt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Grt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>jrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Hrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>zrt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>$rt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Vrt,TelemetrySdkLanguageValues:()=>Htt});var Zn=N(()=>{m();Pge();sEe();uEe();cEe();lEe()});var dEe=Q(v2=>{"use strict";m();Object.defineProperty(v2,"__esModule",{value:!0});v2.ATTR_PROCESS_RUNTIME_NAME=void 0;v2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var pEe=Q(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.SDK_INFO=void 0;var Zot=zde(),R2=(Zn(),Me(Ur)),Wot=dEe();x2.SDK_INFO={[R2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Wot.ATTR_PROCESS_RUNTIME_NAME]:"node",[R2.ATTR_TELEMETRY_SDK_LANGUAGE]:R2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[R2.ATTR_TELEMETRY_SDK_VERSION]:Zot.VERSION}});var fEe=Q(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.otperformance=Ws.SDK_INFO=Ws._globalThis=Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getBooleanFromEnv=Ws.getStringFromEnv=void 0;var D2=jde();Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return D2.getStringFromEnv}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return D2.getBooleanFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return D2.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return D2.getStringListFromEnv}});var Xot=Hde();Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return Xot._globalThis}});var eit=pEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return eit.SDK_INFO}});Ws.otperformance=performance});var Q5=Q(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.getStringListFromEnv=Xs.getNumberFromEnv=Xs.getStringFromEnv=Xs.getBooleanFromEnv=Xs.otperformance=Xs._globalThis=Xs.SDK_INFO=void 0;var LS=fEe();Object.defineProperty(Xs,"SDK_INFO",{enumerable:!0,get:function(){return LS.SDK_INFO}});Object.defineProperty(Xs,"_globalThis",{enumerable:!0,get:function(){return LS._globalThis}});Object.defineProperty(Xs,"otperformance",{enumerable:!0,get:function(){return LS.otperformance}});Object.defineProperty(Xs,"getBooleanFromEnv",{enumerable:!0,get:function(){return LS.getBooleanFromEnv}});Object.defineProperty(Xs,"getStringFromEnv",{enumerable:!0,get:function(){return LS.getStringFromEnv}});Object.defineProperty(Xs,"getNumberFromEnv",{enumerable:!0,get:function(){return LS.getNumberFromEnv}});Object.defineProperty(Xs,"getStringListFromEnv",{enumerable:!0,get:function(){return LS.getStringListFromEnv}})});var hEe=Q(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var B2=Q5(),AEe=9,tit=6,nit=Math.pow(10,tit),N2=Math.pow(10,AEe);function lB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*nit);return[n,r]}ao.millisToHrTime=lB;function rit(){return B2.otperformance.timeOrigin}ao.getTimeOrigin=rit;function mEe(e){let t=lB(B2.otperformance.timeOrigin),n=lB(typeof e=="number"?e:B2.otperformance.now());return gEe(t,n)}ao.hrTime=mEe;function oit(e){if(F5(e))return e;if(typeof e=="number")return e<B2.otperformance.timeOrigin?mEe(e):lB(e);if(e instanceof Date)return lB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=oit;function iit(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=N2),[n,r]}ao.hrTimeDuration=iit;function ait(e){let t=AEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=ait;function sit(e){return e[0]*N2+e[1]}ao.hrTimeToNanoseconds=sit;function uit(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=uit;function cit(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=cit;function F5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=F5;function lit(e){return F5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=lit;function gEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=N2&&(n[1]-=N2,n[0]+=1),n}ao.addHrTimes=gEe});var _Ee=Q(O2=>{"use strict";m();Object.defineProperty(O2,"__esModule",{value:!0});O2.unrefTimer=void 0;function dit(e){typeof e!="number"&&e.unref()}O2.unrefTimer=dit});var EEe=Q(dB=>{"use strict";m();Object.defineProperty(dB,"__esModule",{value:!0});dB.ExportResultCode=void 0;var pit;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(pit=dB.ExportResultCode||(dB.ExportResultCode={}))});var yEe=Q(w2=>{"use strict";m();Object.defineProperty(w2,"__esModule",{value:!0});w2.CompositePropagator=void 0;var SEe=(je(),Me(We)),G5=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){SEe.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){SEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};w2.CompositePropagator=G5});var TEe=Q(ob=>{"use strict";m();Object.defineProperty(ob,"__esModule",{value:!0});ob.validateValue=ob.validateKey=void 0;var j5="[_0-9a-z-*/]",fit=`[a-z]${j5}{0,255}`,Ait=`[a-z0-9]${j5}{0,240}@[a-z]${j5}{0,13}`,mit=new RegExp(`^(?:${fit}|${Ait})$`),git=/^[ -~]{0,255}[!-~]$/,hit=/,|=/;function _it(e){return mit.test(e)}ob.validateKey=_it;function Eit(e){return git.test(e)&&!hit.test(e)}ob.validateValue=Eit});var z5=Q(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.TraceState=void 0;var IEe=TEe(),CEe=32,Sit=512,bEe=",",vEe="=",H5=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+vEe+this.get(n)),t),[]).join(bEe)}_parse(t){t.length>Sit||(this._internalState=t.split(bEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(vEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,IEe.validateKey)(a)&&(0,IEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>CEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,CEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};k2.TraceState=H5});var xEe=Q(eu=>{"use strict";m();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var P2=(je(),Me(We)),yit=uB(),Tit=z5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Iit="00",Cit="(?!ff)[\\da-f]{2}",bit="(?![0]{32})[\\da-f]{32}",vit="(?![0]{16})[\\da-f]{16}",Rit="[\\da-f]{2}",xit=new RegExp(`^\\s?(${Cit})-(${bit})-(${vit})-(${Rit})(-.*)?\\s?$`);function REe(e){let t=xit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=REe;var $5=class{inject(t,n,r){let o=P2.trace.getSpanContext(t);if(!o||(0,yit.isTracingSuppressed)(t)||!(0,P2.isSpanContextValid)(o))return;let i=`${Iit}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||P2.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=REe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Tit.TraceState(typeof d=="string"?d:void 0)}return P2.trace.setSpanContext(t,a)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=$5});var DEe=Q(Zp=>{"use strict";m();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.getRPCMetadata=Zp.deleteRPCMetadata=Zp.setRPCMetadata=Zp.RPCType=void 0;var Dit=(je(),Me(We)),V5=(0,Dit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Bit;(function(e){e.HTTP="http"})(Bit=Zp.RPCType||(Zp.RPCType={}));function Nit(e,t){return e.setValue(V5,t)}Zp.setRPCMetadata=Nit;function Oit(e){return e.deleteValue(V5)}Zp.deleteRPCMetadata=Oit;function wit(e){return e.getValue(V5)}Zp.getRPCMetadata=wit});var kEe=Q(M2=>{"use strict";m();Object.defineProperty(M2,"__esModule",{value:!0});M2.isPlainObject=void 0;var kit="[object Object]",Pit="[object Null]",Mit="[object Undefined]",Lit=Function.prototype,BEe=Lit.toString,Uit=BEe.call(Object),Qit=Object.getPrototypeOf,NEe=Object.prototype,OEe=NEe.hasOwnProperty,US=Symbol?Symbol.toStringTag:void 0,wEe=NEe.toString;function Fit(e){if(!Git(e)||jit(e)!==kit)return!1;let t=Qit(e);if(t===null)return!0;let n=OEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BEe.call(n)===Uit}M2.isPlainObject=Fit;function Git(e){return e!=null&&typeof e=="object"}function jit(e){return e==null?e===void 0?Mit:Pit:US&&US in Object(e)?Hit(e):zit(e)}function Hit(e){let t=OEe.call(e,US),n=e[US],r=!1;try{e[US]=void 0,r=!0}catch{}let o=wEe.call(e);return r&&(t?e[US]=n:delete e[US]),o}function zit(e){return wEe.call(e)}});var QEe=Q(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2.merge=void 0;var PEe=kEe(),$it=20;function Vit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=LEe(t,e.shift(),0,n);return t}Q2.merge=Vit;function q5(e){return U2(e)?e.slice():e}function LEe(e,t,n=0,r){let o;if(!(n>$it)){if(n++,L2(e)||L2(t)||UEe(t))o=q5(t);else if(U2(e)){if(o=e.slice(),U2(t))for(let i=0,a=t.length;i<a;i++)o.push(q5(t[i]));else if(pB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=q5(t[d])}}}else if(pB(e))if(pB(t)){if(!qit(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(L2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(MEe(e,d,r)||MEe(t,d,r))delete o[d];else{if(pB(h)&&pB(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]=LEe(o[d],g,n,r)}}}}else o=t;return o}}function MEe(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 U2(e){return Array.isArray(e)}function UEe(e){return typeof e=="function"}function pB(e){return!L2(e)&&!U2(e)&&!UEe(e)&&typeof e=="object"}function L2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function qit(e,t){return!(!(0,PEe.isPlainObject)(e)||!(0,PEe.isPlainObject)(t))}});var FEe=Q(ib=>{"use strict";m();Object.defineProperty(ib,"__esModule",{value:!0});ib.callWithTimeout=ib.TimeoutError=void 0;var F2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};ib.TimeoutError=F2;function Yit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new F2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}ib.callWithTimeout=Yit});var jEe=Q(ab=>{"use strict";m();Object.defineProperty(ab,"__esModule",{value:!0});ab.isUrlIgnored=ab.urlMatches=void 0;function GEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}ab.urlMatches=GEe;function Kit(e,t){if(!t)return!1;for(let n of t)if(GEe(e,n))return!0;return!1}ab.isUrlIgnored=Kit});var HEe=Q(G2=>{"use strict";m();Object.defineProperty(G2,"__esModule",{value:!0});G2.Deferred=void 0;var Y5=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)}};G2.Deferred=Y5});var zEe=Q(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.BindOnceFuture=void 0;var Jit=HEe(),K5=class{_isCalled=!1;_deferred=new Jit.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}};j2.BindOnceFuture=K5});var VEe=Q(H2=>{"use strict";m();Object.defineProperty(H2,"__esModule",{value:!0});H2.diagLogLevelFromString=void 0;var cg=(je(),Me(We)),$Ee={ALL:cg.DiagLogLevel.ALL,VERBOSE:cg.DiagLogLevel.VERBOSE,DEBUG:cg.DiagLogLevel.DEBUG,INFO:cg.DiagLogLevel.INFO,WARN:cg.DiagLogLevel.WARN,ERROR:cg.DiagLogLevel.ERROR,NONE:cg.DiagLogLevel.NONE};function Zit(e){if(e==null)return;let t=$Ee[e.toUpperCase()];return t??(cg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys($Ee)}, using default`),cg.DiagLogLevel.INFO)}H2.diagLogLevelFromString=Zit});var YEe=Q(z2=>{"use strict";m();Object.defineProperty(z2,"__esModule",{value:!0});z2._export=void 0;var qEe=(je(),Me(We)),Wit=uB();function Xit(e,t){return new Promise(n=>{qEe.context.with((0,Wit.suppressTracing)(qEe.context.active()),()=>{e.export(t,n)})})}z2._export=Xit});var Tr=Q(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});we.internal=we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;var eat=Bde();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return eat.W3CBaggagePropagator}});var tat=Nde();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return tat.AnchoredClock}});var KEe=Mde();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return KEe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return KEe.sanitizeAttributes}});var JEe=Ude();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return JEe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return JEe.setGlobalErrorHandler}});var nat=c5();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return nat.loggingErrorHandler}});var Nd=hEe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Nd.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Nd.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Nd.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Nd.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Nd.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Nd.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Nd.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Nd.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Nd.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Nd.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Nd.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Nd.timeInputToHrTime}});var rat=_Ee();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return rat.unrefTimer}});var oat=EEe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return oat.ExportResultCode}});var iat=o5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return iat.parseKeyPairsIntoRecord}});var QS=Q5();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return QS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return QS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return QS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return QS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return QS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return QS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return QS.otperformance}});var aat=yEe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return aat.CompositePropagator}});var $2=xEe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return $2.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return $2.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return $2.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return $2.parseTraceParent}});var V2=DEe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return V2.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return V2.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return V2.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return V2.setRPCMetadata}});var J5=uB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return J5.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return J5.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return J5.unsuppressTracing}});var sat=z5();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return sat.TraceState}});var uat=QEe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return uat.merge}});var ZEe=FEe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return ZEe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return ZEe.callWithTimeout}});var WEe=jEe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return WEe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return WEe.urlMatches}});var cat=zEe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return cat.BindOnceFuture}});var lat=VEe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return lat.diagLogLevelFromString}});var dat=YEe();we.internal={_export:dat._export}});var XEe=Q(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.VERSION=void 0;q2.VERSION="0.214.0"});var e0e=Q(fB=>{"use strict";m();Object.defineProperty(fB,"__esModule",{value:!0});fB.SeverityNumber=void 0;var pat;(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"})(pat=fB.SeverityNumber||(fB.SeverityNumber={}))});var K2=Q(sb=>{"use strict";m();Object.defineProperty(sb,"__esModule",{value:!0});sb.NOOP_LOGGER=sb.NoopLogger=void 0;var Y2=class{emit(t){}};sb.NoopLogger=Y2;sb.NOOP_LOGGER=new Y2});var t0e=Q(mA=>{"use strict";m();Object.defineProperty(mA,"__esModule",{value:!0});mA.API_BACKWARDS_COMPATIBILITY_VERSION=mA.makeGetter=mA._global=mA.GLOBAL_LOGS_API_KEY=void 0;mA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");mA._global=globalThis;function fat(e,t,n){return r=>r===e?t:n}mA.makeGetter=fat;mA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Z5=Q(ub=>{"use strict";m();Object.defineProperty(ub,"__esModule",{value:!0});ub.NOOP_LOGGER_PROVIDER=ub.NoopLoggerProvider=void 0;var Aat=K2(),J2=class{getLogger(t,n,r){return new Aat.NoopLogger}};ub.NoopLoggerProvider=J2;ub.NOOP_LOGGER_PROVIDER=new J2});var n0e=Q(Z2=>{"use strict";m();Object.defineProperty(Z2,"__esModule",{value:!0});Z2.ProxyLogger=void 0;var mat=K2(),W5=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):mat.NOOP_LOGGER}};Z2.ProxyLogger=W5});var r0e=Q(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.ProxyLoggerProvider=void 0;var gat=Z5(),hat=n0e(),X5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new hat.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:gat.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)}};W2.ProxyLoggerProvider=X5});var i0e=Q(X2=>{"use strict";m();Object.defineProperty(X2,"__esModule",{value:!0});X2.LogsAPI=void 0;var Od=t0e(),_at=Z5(),o0e=r0e(),e9=class e{constructor(){this._proxyLoggerProvider=new o0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Od._global[Od.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Od._global[Od.GLOBAL_LOGS_API_KEY]=(0,Od.makeGetter)(Od.API_BACKWARDS_COMPATIBILITY_VERSION,t,_at.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Od._global[Od.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Od._global,Od.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Od._global[Od.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new o0e.ProxyLoggerProvider}};X2.LogsAPI=e9});var t9=Q(gA=>{"use strict";m();Object.defineProperty(gA,"__esModule",{value:!0});gA.logs=gA.NoopLogger=gA.NOOP_LOGGER=gA.SeverityNumber=void 0;var Eat=e0e();Object.defineProperty(gA,"SeverityNumber",{enumerable:!0,get:function(){return Eat.SeverityNumber}});var a0e=K2();Object.defineProperty(gA,"NOOP_LOGGER",{enumerable:!0,get:function(){return a0e.NOOP_LOGGER}});Object.defineProperty(gA,"NoopLogger",{enumerable:!0,get:function(){return a0e.NoopLogger}});var Sat=i0e();gA.logs=Sat.LogsAPI.getInstance()});var s0e=Q(cb=>{"use strict";m();Object.defineProperty(cb,"__esModule",{value:!0});cb.disableInstrumentations=cb.enableInstrumentations=void 0;function yat(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()}}cb.enableInstrumentations=yat;function Tat(e){e.forEach(t=>t.disable())}cb.disableInstrumentations=Tat});var l0e=Q(eL=>{"use strict";m();Object.defineProperty(eL,"__esModule",{value:!0});eL.registerInstrumentations=void 0;var u0e=(je(),Me(We)),Iat=t9(),c0e=s0e();function Cat(e){let t=e.tracerProvider||u0e.trace.getTracerProvider(),n=e.meterProvider||u0e.metrics.getMeterProvider(),r=e.loggerProvider||Iat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,c0e.enableInstrumentations)(o,t,n,r),()=>{(0,c0e.disableInstrumentations)(o)}}eL.registerInstrumentations=Cat});var E0e=Q(tL=>{"use strict";m();Object.defineProperty(tL,"__esModule",{value:!0});tL.satisfies=void 0;var i9=(je(),Me(We)),m0e=/^(?: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-]+)*))?$/,bat=/^(?<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-]+)*))?$/,vat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Rat(e,t,n){if(!xat(e))return i9.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Oat(e);if(!r)return!1;let o=[],i=g0e(r,t,o,n);return i&&!n?.includePrerelease?Bat(r,o):i}tL.satisfies=Rat;function xat(e){return typeof e=="string"&&m0e.test(e)}function g0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(n9(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Xat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!n9(e,i,n,r))return!1;return!0}return n9(e,t,n,r)}function n9(e,t,n,r){if(t=Nat(t,r),t.includes(" "))return g0e(e,t,n,r);{let o=wat(t);return n.push(o),Dat(e,o)}}function Dat(e,t){if(t.invalid)return!1;if(!t.version||o9(t.version))return!0;let n=p0e(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=p0e(r,o)}return vat[t.op]?.includes(n)}function Bat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Nat(e,t){return e=e.trim(),e=Zat(e,t),e=Jat(e),e=Wat(e,t),e=e.trim(),e}function Pu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Oat(e){let t=e.match(m0e);if(!t){i9.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 wat(e){if(!e)return{};let t=e.match(bat);if(!t)return i9.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 o9(e){return e==="*"||e==="x"||e==="X"}function d0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function kat(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 Pat(e,t){if(o9(e)||o9(t))return 0;let[n,r]=kat(d0e(e),d0e(t));return n>r?1:n<r?-1:0}function p0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Pat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var h0e="[a-zA-Z0-9-]",_0e="0|[1-9]\\d*",Mat=`\\d*[a-zA-Z-]${h0e}*`,Lat="((?:<|>)?=?)",f0e=`(?:${_0e}|${Mat})`,Uat=`(?:-(${f0e}(?:\\.${f0e})*))`,A0e=`${h0e}+`,Qat=`(?:\\+(${A0e}(?:\\.${A0e})*))`,r9=`${_0e}|x|X|\\*`,AB=`[v=\\s]*(${r9})(?:\\.(${r9})(?:\\.(${r9})(?:${Uat})?${Qat}?)?)?`,Fat=`^${Lat}\\s*${AB}$`,Gat=new RegExp(Fat),jat=`^\\s*(${AB})\\s+-\\s+(${AB})\\s*$`,Hat=new RegExp(jat),zat="(?:~>?)",$at=`^${zat}${AB}$`,Vat=new RegExp($at),qat="(?:\\^)",Yat=`^${qat}${AB}$`,Kat=new RegExp(Yat);function Jat(e){let t=Vat;return e.replace(t,(n,r,o,i,a)=>{let c;return Pu(r)?c="":Pu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Pu(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 Zat(e,t){let n=Kat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Pu(i)?g="":Pu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Pu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function Wat(e,t){let n=Gat;return e.replace(n,(r,o,i,a,c,d)=>{let g=Pu(i),h=g||Pu(a),S=h||Pu(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 Xat(e,t){let n=Hat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Pu(i)?o="":Pu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Pu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Pu(S)?h="":Pu(y)?h=`<${+S+1}.0.0-0`:Pu(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 a9=Q(Is=>{"use strict";m();Object.defineProperty(Is,"__esModule",{value:!0});Is.massUnwrap=Is.unwrap=Is.massWrap=Is.wrap=void 0;var Mu=console.error.bind(console);function mB(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 est=(e,t,n)=>{if(!e||!e[t]){Mu("no original function "+String(t)+" to wrap");return}if(!n){Mu("no wrapper function"),Mu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Mu("original object and wrapper must be functions");return}let o=n(r,t);return mB(o,"__original",r),mB(o,"__unwrap",()=>{e[t]===o&&mB(e,t,r)}),mB(o,"__wrapped",!0),mB(e,t,o),o};Is.wrap=est;var tst=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Mu("must provide one or more modules to patch"),Mu(new Error().stack);return}if(!(t&&Array.isArray(t))){Mu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Is.wrap)(r,o,n)})})};Is.massWrap=tst;var nst=(e,t)=>{if(!e||!e[t]){Mu("no function to unwrap."),Mu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Mu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Is.unwrap=nst;var rst=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Mu("must provide one or more modules to patch"),Mu(new Error().stack);return}if(!(t&&Array.isArray(t))){Mu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Is.unwrap)(n,r)})})};Is.massUnwrap=rst;function gB(e){e&&e.logger&&(typeof e.logger!="function"?Mu("new logger isn't a function, not replacing"):Mu=e.logger)}Is.default=gB;gB.wrap=Is.wrap;gB.massWrap=Is.massWrap;gB.unwrap=Is.unwrap;gB.massUnwrap=Is.massUnwrap});var S0e=Q(rL=>{"use strict";m();Object.defineProperty(rL,"__esModule",{value:!0});rL.InstrumentationAbstract=void 0;var s9=(je(),Me(We)),ost=t9(),nL=a9(),u9=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=s9.diag.createComponentLogger({namespace:t}),this._tracer=s9.trace.getTracer(t,n),this._meter=s9.metrics.getMeter(t,n),this._logger=ost.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=nL.wrap;_unwrap=nL.unwrap;_massWrap=nL.massWrap;_massUnwrap=nL.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)}}};rL.InstrumentationAbstract=u9});var T0e=Q((AYt,y0e)=>{m();var lb=1e3,db=lb*60,pb=db*60,FS=pb*24,ist=FS*7,ast=FS*365.25;y0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return sst(e);if(n==="number"&&isFinite(e))return t.long?cst(e):ust(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sst(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*ast;case"weeks":case"week":case"w":return n*ist;case"days":case"day":case"d":return n*FS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*pb;case"minutes":case"minute":case"mins":case"min":case"m":return n*db;case"seconds":case"second":case"secs":case"sec":case"s":return n*lb;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function ust(e){var t=Math.abs(e);return t>=FS?Math.round(e/FS)+"d":t>=pb?Math.round(e/pb)+"h":t>=db?Math.round(e/db)+"m":t>=lb?Math.round(e/lb)+"s":e+"ms"}function cst(e){var t=Math.abs(e);return t>=FS?oL(e,t,FS,"day"):t>=pb?oL(e,t,pb,"hour"):t>=db?oL(e,t,db,"minute"):t>=lb?oL(e,t,lb,"second"):e+" ms"}function oL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var c9=Q((gYt,I0e)=>{m();function lst(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=T0e(),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(...O){if(!x.enabled)return;let k=x,F=Number(new Date),j=F-(S||F);k.diff=j,k.prev=S,k.curr=F,S=F,O[0]=n.coerce(O[0]),typeof O[0]!="string"&&O.unshift("%O");let G=0;O[0]=O[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let be=O[G];oe=Ce.call(k,be),O.splice(G,1),G--}return oe}),n.formatArgs.call(k,O),(k.log||n.log).apply(k,O)}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:O=>{y=O}}),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}I0e.exports=lst});var C0e=Q((Nc,iL)=>{m();Nc.formatArgs=pst;Nc.save=fst;Nc.load=Ast;Nc.useColors=dst;Nc.storage=mst();Nc.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`."))}})();Nc.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 dst(){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 pst(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+iL.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)}Nc.log=console.debug||console.log||(()=>{});function fst(e){try{e?Nc.storage.setItem("debug",e):Nc.storage.removeItem("debug")}catch{}}function Ast(){let e;try{e=Nc.storage.getItem("debug")||Nc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function mst(){try{return localStorage}catch{}}iL.exports=c9()(Nc);var{formatters:gst}=iL.exports;gst.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var v0e=Q((EYt,b0e)=>{"use strict";m();b0e.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 D0e=Q((yYt,x0e)=>{"use strict";m();var hst=Ge("os"),R0e=Ge("tty"),wd=v0e(),{env:qa}=process,a_;wd("no-color")||wd("no-colors")||wd("color=false")||wd("color=never")?a_=0:(wd("color")||wd("colors")||wd("color=true")||wd("color=always"))&&(a_=1);"FORCE_COLOR"in qa&&(qa.FORCE_COLOR==="true"?a_=1:qa.FORCE_COLOR==="false"?a_=0:a_=qa.FORCE_COLOR.length===0?1:Math.min(parseInt(qa.FORCE_COLOR,10),3));function l9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function d9(e,t){if(a_===0)return 0;if(wd("color=16m")||wd("color=full")||wd("color=truecolor"))return 3;if(wd("color=256"))return 2;if(e&&!t&&a_===void 0)return 0;let n=a_||0;if(qa.TERM==="dumb")return n;if(process.platform==="win32"){let r=hst.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in qa)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in qa)||qa.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in qa)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(qa.TEAMCITY_VERSION)?1:0;if(qa.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in qa){let r=parseInt((qa.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(qa.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(qa.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(qa.TERM)||"COLORTERM"in qa?1:n}function _st(e){let t=d9(e,e&&e.isTTY);return l9(t)}x0e.exports={supportsColor:_st,stdout:l9(d9(!0,R0e.isatty(1))),stderr:l9(d9(!0,R0e.isatty(2)))}});var N0e=Q((Ya,sL)=>{m();var Est=Ge("tty"),aL=Ge("util");Ya.init=vst;Ya.log=Ist;Ya.formatArgs=yst;Ya.save=Cst;Ya.load=bst;Ya.useColors=Sst;Ya.destroy=aL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ya.colors=[6,2,3,4,5,1];try{let e=D0e();e&&(e.stderr||e).level>=2&&(Ya.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{}Ya.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 Sst(){return"colors"in Ya.inspectOpts?!!Ya.inspectOpts.colors:Est.isatty(process.stderr.fd)}function yst(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 B7e=Object.create;var WM=Object.defineProperty;var N7e=Object.getOwnPropertyDescriptor;var O7e=Object.getOwnPropertyNames;var w7e=Object.getPrototypeOf,k7e=Object.prototype.hasOwnProperty;var Ge=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$a=(e,t)=>{for(var n in t)WM(e,n,{get:t[n],enumerable:!0})},Ole=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of O7e(t))!k7e.call(e,o)&&o!==n&&WM(e,o,{get:()=>t[o],enumerable:!(r=N7e(t,o))||r.enumerable});return e};var ie=(e,t,n)=>(n=e!=null?B7e(w7e(e)):{},Ole(t||!e||!e.__esModule?WM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>Ole(WM({},"__esModule",{value:!0}),e);var m=N(()=>{(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.148"}}catch{}})()});var ig,T$=N(()=>{m();ig="1.9.1"});function P7e(e){let t=new Set([e]),n=new Set,r=e.match(Ple);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(Ple);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 Ple,Mle,Lle=N(()=>{m();T$();Ple=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Mle=P7e(ig)});function cA(e,t,n,r=!1){var o;let i=tB[eB]=(o=tB[eB])!==null&&o!==void 0?o:{version:ig};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!==ig){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${ig}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${ig}.`),!0}function bl(e){var t,n;let r=(t=tB[eB])===null||t===void 0?void 0:t.version;if(!(!r||!Mle(r)))return(n=tB[eB])===null||n===void 0?void 0:n[e]}function lA(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${ig}.`);let n=tB[eB];n&&delete n[e]}var M7e,eB,tB,DS=N(()=>{m();T$();Lle();M7e=ig.split(".")[0],eB=Symbol.for(`opentelemetry.js.api.${M7e}`),tB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function nB(e,t,n){let r=bl("diag");if(r)return r[e](t,...n)}var XM,Ule=N(()=>{m();DS();XM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return nB("debug",this._namespace,t)}error(...t){return nB("error",this._namespace,t)}info(...t){return nB("info",this._namespace,t)}warn(...t){return nB("warn",this._namespace,t)}verbose(...t){return nB("verbose",this._namespace,t)}}});var Ea,e2=N(()=>{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"})(Ea||(Ea={}))});function Qle(e,t){e<Ea.NONE?e=Ea.NONE:e>Ea.ALL&&(e=Ea.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",Ea.ERROR),warn:n("warn",Ea.WARN),info:n("info",Ea.INFO),debug:n("debug",Ea.DEBUG),verbose:n("verbose",Ea.VERBOSE)}}var Fle=N(()=>{m();e2()});var L7e,Va,BS=N(()=>{m();Ule();Fle();e2();DS();L7e="diag",Va=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=bl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:Ea.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=bl("diag"),h=Qle((c=i.logLevel)!==null&&c!==void 0?c:Ea.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 cA("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{lA(L7e,n)},n.createComponentLogger=o=>new XM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var t2,Gle=N(()=>{m();t2=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 jle,Hle=N(()=>{m();jle=Symbol("BaggageEntryMetadata")});function zle(e={}){return new t2(new Map(Object.entries(e)))}function $le(e){return typeof e!="string"&&(U7e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:jle,toString(){return e}}}var U7e,I$=N(()=>{m();BS();Gle();Hle();U7e=Va.instance()});function vl(e){return Symbol.for(e)}var C$,JC,rB=N(()=>{m();C$=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}}},JC=new C$});var b$,v$,n2,Vle=N(()=>{m();b$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],v$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(v$[t]=console[t])}n2=class{constructor(){function t(n){return function(...r){let o=v$[n];if(typeof o!="function"&&(o=v$.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<b$.length;n++)this[b$[n].n]=t(b$[n].c)}}});function qle(){return P$}var R$,ZC,x$,D$,B$,N$,oB,O$,w$,k$,P$,Q7e,F7e,G7e,j7e,H7e,z7e,$7e,M$=N(()=>{m();R$=class{constructor(){}createGauge(t,n){return F7e}createHistogram(t,n){return G7e}createCounter(t,n){return Q7e}createUpDownCounter(t,n){return j7e}createObservableGauge(t,n){return z7e}createObservableCounter(t,n){return H7e}createObservableUpDownCounter(t,n){return $7e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},ZC=class{},x$=class extends ZC{add(t,n){}},D$=class extends ZC{add(t,n){}},B$=class extends ZC{record(t,n){}},N$=class extends ZC{record(t,n){}},oB=class{addCallback(t){}removeCallback(t){}},O$=class extends oB{},w$=class extends oB{},k$=class extends oB{},P$=new R$,Q7e=new x$,F7e=new B$,G7e=new N$,j7e=new D$,H7e=new O$,z7e=new w$,$7e=new k$});var r2,Yle=N(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(r2||(r2={}))});var o2,i2,L$=N(()=>{m();o2={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},i2={set(e,t,n){e!=null&&(e[t]=n)}}});var a2,Kle=N(()=>{m();rB();a2=class{active(){return JC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var U$,V7e,dA,iB=N(()=>{m();Kle();DS();BS();U$="context",V7e=new a2,dA=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return cA(U$,t,Va.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 bl(U$)||V7e}disable(){this._getContextManager().disable(),lA(U$,Va.instance())}}});var Js,Q$=N(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Js||(Js={}))});var aB,NS,s2,u2=N(()=>{m();Q$();aB="0000000000000000",NS="00000000000000000000000000000000",s2={traceId:NS,spanId:aB,traceFlags:Js.NONE}});var pA,c2=N(()=>{m();u2();pA=class{constructor(t=s2){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 l2(e){return e.getValue(F$)||void 0}function Jle(){return l2(dA.getInstance().active())}function sB(e,t){return e.setValue(F$,t)}function Zle(e){return e.deleteValue(F$)}function Wle(e,t){return sB(e,new pA(t))}function d2(e){var t;return(t=l2(e))===null||t===void 0?void 0:t.spanContext()}var F$,G$=N(()=>{m();rB();c2();iB();F$=vl("OpenTelemetry Context Key SPAN")});function Xle(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(p2[e.charCodeAt(r)]|0)+(p2[e.charCodeAt(r+1)]|0)+(p2[e.charCodeAt(r+2)]|0)+(p2[e.charCodeAt(r+3)]|0);return n===t}function j$(e){return Xle(e,32)&&e!==NS}function H$(e){return Xle(e,16)&&e!==aB}function ag(e){return j$(e.traceId)&&H$(e.spanId)}function ede(e){return new pA(e)}var p2,f2=N(()=>{m();u2();c2();p2=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 q7e(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 z$,WC,$$=N(()=>{m();iB();G$();c2();f2();z$=dA.getInstance(),WC=class{startSpan(t,n,r=z$.active()){if(!!n?.root)return new pA;let i=r&&d2(r);return q7e(i)&&ag(i)?new pA(i):new pA}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??z$.active(),g=this.startSpan(t,i,d),h=sB(d,g);return z$.with(h,c,void 0,g)}}});var Y7e,XC,V$=N(()=>{m();$$();Y7e=new WC,XC=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):Y7e}}});var A2,tde=N(()=>{m();$$();A2=class{getTracer(t,n,r){return new WC}}});var K7e,OS,q$=N(()=>{m();V$();tde();K7e=new A2,OS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new XC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:K7e}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 m2,nde=N(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(m2||(m2={}))});var io,rde=N(()=>{m();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(io||(io={}))});var ci,ode=N(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(ci||(ci={}))});function ide(e){return W7e.test(e)}function ade(e){return X7e.test(e)&&!eYe.test(e)}var Y$,J7e,Z7e,W7e,X7e,eYe,sde=N(()=>{m();Y$="[_0-9a-z-*/]",J7e=`[a-z]${Y$}{0,255}`,Z7e=`[a-z0-9]${Y$}{0,240}@[a-z]${Y$}{0,13}`,W7e=new RegExp(`^(?:${J7e}|${Z7e})$`),X7e=/^[ -~]{0,255}[!-~]$/,eYe=/,|=/});var ude,tYe,cde,lde,g2,dde=N(()=>{m();sde();ude=32,tYe=512,cde=",",lde="=",g2=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+lde+this.get(n)),t),[]).join(cde)}_parse(t){t.length>tYe||(this._internalState=t.split(cde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(lde);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);ide(a)&&ade(c)&&n.set(a,c)}return n},new Map),this._internalState.size>ude&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,ude))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function pde(e){return new g2(e)}var fde=N(()=>{m();dde()});var Ke,Ade=N(()=>{m();iB();Ke=dA.getInstance()});var Rl,mde=N(()=>{m();BS();Rl=Va.instance()});var K$,gde,hde=N(()=>{m();M$();K$=class{getMeter(t,n,r){return P$}},gde=new K$});var J$,h2,_de=N(()=>{m();hde();DS();BS();J$="metrics",h2=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return cA(J$,t,Va.instance())}getMeterProvider(){return bl(J$)||gde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){lA(J$,Va.instance())}}});var Z$,Ede=N(()=>{m();_de();Z$=h2.getInstance()});var _2,Sde=N(()=>{m();_2=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function X$(e){return e.getValue(W$)||void 0}function yde(){return X$(dA.getInstance().active())}function Tde(e,t){return e.setValue(W$,t)}function Ide(e){return e.deleteValue(W$)}var W$,Cde=N(()=>{m();iB();rB();W$=vl("OpenTelemetry Baggage Key")});var e5,nYe,E2,bde=N(()=>{m();DS();Sde();L$();Cde();I$();BS();e5="propagation",nYe=new _2,E2=class e{constructor(){this.createBaggage=zle,this.getBaggage=X$,this.getActiveBaggage=yde,this.setBaggage=Tde,this.deleteBaggage=Ide}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return cA(e5,t,Va.instance())}inject(t,n,r=i2){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=o2){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){lA(e5,Va.instance())}_getGlobalPropagator(){return bl(e5)||nYe}}});var Jp,vde=N(()=>{m();bde();Jp=E2.getInstance()});var t5,S2,Rde=N(()=>{m();DS();q$();f2();G$();BS();t5="trace",S2=class e{constructor(){this._proxyTracerProvider=new OS,this.wrapSpanContext=ede,this.isSpanContextValid=ag,this.deleteSpan=Zle,this.getSpan=l2,this.getActiveSpan=Jle,this.getSpanContext=d2,this.setSpan=sB,this.setSpanContext=Wle}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=cA(t5,this._proxyTracerProvider,Va.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return bl(t5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){lA(t5,Va.instance()),this._proxyTracerProvider=new OS}}});var zt,xde=N(()=>{m();Rde();zt=S2.getInstance()});var We={};$a(We,{DiagConsoleLogger:()=>n2,DiagLogLevel:()=>Ea,INVALID_SPANID:()=>aB,INVALID_SPAN_CONTEXT:()=>s2,INVALID_TRACEID:()=>NS,ProxyTracer:()=>XC,ProxyTracerProvider:()=>OS,ROOT_CONTEXT:()=>JC,SamplingDecision:()=>m2,SpanKind:()=>io,SpanStatusCode:()=>ci,TraceFlags:()=>Js,ValueType:()=>r2,baggageEntryMetadataFromString:()=>$le,context:()=>Ke,createContextKey:()=>vl,createNoopMeter:()=>qle,createTraceState:()=>pde,default:()=>rYe,defaultTextMapGetter:()=>o2,defaultTextMapSetter:()=>i2,diag:()=>Rl,isSpanContextValid:()=>ag,isValidSpanId:()=>H$,isValidTraceId:()=>j$,metrics:()=>Z$,propagation:()=>Jp,trace:()=>zt});var rYe,je=N(()=>{m();I$();rB();Vle();e2();M$();Yle();L$();V$();q$();nde();rde();ode();Q$();fde();f2();u2();Ade();mde();Ede();vde();xde();rYe={context:Ke,diag:Rl,metrics:Z$,propagation:Jp,trace:zt}});var uB=Q(r_=>{"use strict";m();Object.defineProperty(r_,"__esModule",{value:!0});r_.isTracingSuppressed=r_.unsuppressTracing=r_.suppressTracing=void 0;var oYe=(je(),Me(We)),n5=(0,oYe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function iYe(e){return e.setValue(n5,!0)}r_.suppressTracing=iYe;function aYe(e){return e.deleteValue(n5)}r_.unsuppressTracing=aYe;function sYe(e){return e.getValue(n5)===!0}r_.isTracingSuppressed=sYe});var r5=Q(Zs=>{"use strict";m();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.BAGGAGE_MAX_TOTAL_LENGTH=Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Zs.BAGGAGE_HEADER=Zs.BAGGAGE_ITEMS_SEPARATOR=Zs.BAGGAGE_PROPERTIES_SEPARATOR=Zs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Zs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Zs.BAGGAGE_PROPERTIES_SEPARATOR=";";Zs.BAGGAGE_ITEMS_SEPARATOR=",";Zs.BAGGAGE_HEADER="baggage";Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Zs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var o5=Q(fA=>{"use strict";m();Object.defineProperty(fA,"__esModule",{value:!0});fA.parseKeyPairsIntoRecord=fA.parsePairKeyValue=fA.getKeyPairs=fA.serializeKeyPairs=void 0;var uYe=(je(),Me(We)),eb=r5();function cYe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?eb.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>eb.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}fA.serializeKeyPairs=cYe;function lYe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=eb.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}fA.getKeyPairs=lYe;function Dde(e){if(!e)return;let t=e.indexOf(eb.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(eb.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,uYe.baggageEntryMetadataFromString)(g)}return{key:a,value:c,metadata:d}}fA.parsePairKeyValue=Dde;function dYe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(eb.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=Dde(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}fA.parseKeyPairsIntoRecord=dYe});var Bde=Q(y2=>{"use strict";m();Object.defineProperty(y2,"__esModule",{value:!0});y2.W3CBaggagePropagator=void 0;var i5=(je(),Me(We)),pYe=uB(),wS=r5(),a5=o5(),s5=class{inject(t,n,r){let o=i5.propagation.getBaggage(t);if(!o||(0,pYe.isTracingSuppressed)(t))return;let i=(0,a5.getKeyPairs)(o).filter(c=>c.length<=wS.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,wS.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,a5.serializeKeyPairs)(i);a.length>0&&r.set(n,wS.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,wS.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(wS.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(wS.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let g=(0,a5.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:i5.propagation.setBaggage(t,i5.propagation.createBaggage(a))}fields(){return[wS.BAGGAGE_HEADER]}};y2.W3CBaggagePropagator=s5});var Nde=Q(T2=>{"use strict";m();Object.defineProperty(T2,"__esModule",{value:!0});T2.AnchoredClock=void 0;var u5=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}};T2.AnchoredClock=u5});var Mde=Q(o_=>{"use strict";m();Object.defineProperty(o_,"__esModule",{value:!0});o_.isAttributeValue=o_.isAttributeKey=o_.sanitizeAttributes=void 0;var Ode=(je(),Me(We));function fYe(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(!wde(n)){Ode.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!kde(r)){Ode.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}o_.sanitizeAttributes=fYe;function wde(e){return typeof e=="string"&&e!==""}o_.isAttributeKey=wde;function kde(e){return e==null?!0:Array.isArray(e)?AYe(e):Pde(typeof e)}o_.isAttributeValue=kde;function AYe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(Pde(r)){t=r;continue}return!1}return!1}}return!0}function Pde(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var c5=Q(I2=>{"use strict";m();Object.defineProperty(I2,"__esModule",{value:!0});I2.loggingErrorHandler=void 0;var mYe=(je(),Me(We));function gYe(){return e=>{mYe.diag.error(hYe(e))}}I2.loggingErrorHandler=gYe;function hYe(e){return typeof e=="string"?e:JSON.stringify(_Ye(e))}function _Ye(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 Ude=Q(tb=>{"use strict";m();Object.defineProperty(tb,"__esModule",{value:!0});tb.globalErrorHandler=tb.setGlobalErrorHandler=void 0;var EYe=c5(),Lde=(0,EYe.loggingErrorHandler)();function SYe(e){Lde=e}tb.setGlobalErrorHandler=SYe;function yYe(e){try{Lde(e)}catch{}}tb.globalErrorHandler=yYe});var jde=Q(AA=>{"use strict";m();Object.defineProperty(AA,"__esModule",{value:!0});AA.getStringListFromEnv=AA.getBooleanFromEnv=AA.getStringFromEnv=AA.getNumberFromEnv=void 0;var Qde=(je(),Me(We)),Fde=Ge("util");function TYe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Qde.diag.warn(`Unknown value ${(0,Fde.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}AA.getNumberFromEnv=TYe;function Gde(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}AA.getStringFromEnv=Gde;function IYe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Qde.diag.warn(`Unknown value ${(0,Fde.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}AA.getBooleanFromEnv=IYe;function CYe(e){return Gde(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}AA.getStringListFromEnv=CYe});var Hde=Q(C2=>{"use strict";m();Object.defineProperty(C2,"__esModule",{value:!0});C2._globalThis=void 0;C2._globalThis=globalThis});var zde=Q(b2=>{"use strict";m();Object.defineProperty(b2,"__esModule",{value:!0});b2.VERSION=void 0;b2.VERSION="2.6.1"});function Ri(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 l5=N(()=>{m()});var $de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,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,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,bYe,d5,vYe,RYe,xYe,DYe,p5,BYe,NYe,OYe,wYe,kYe,PYe,MYe,LYe,UYe,QYe,FYe,GYe,jYe,HYe,zYe,$Ye,VYe,qYe,f5,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,A5,aKe,sKe,m5,g5,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,cB,nb,h5,bKe,vKe,kS,RKe,xKe,DKe,BKe,_5,E5,NKe,S5,OKe,wKe,kKe,PKe,MKe,LKe,UKe,QKe,FKe,GKe,jKe,HKe,zKe,$Ke,VKe,qKe,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,y5,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,T5,SJe,I5,yJe,TJe,IJe,CJe,bJe,vJe,RJe,xJe,DJe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,BJe,NJe,OJe,wJe,kJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,jJe,HJe,zJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,mZe,gZe,hZe,_Ze,EZe,SZe,yZe,TZe,IZe,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame,CZe,bZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,wZe,kZe,PZe,mme,gme,hme,_me,Eme,MZe,LZe,UZe,QZe,FZe,GZe,Sme,yme,Tme,jZe,HZe,zZe,$Ze,Ime,Cme,bme,vme,VZe,qZe,YZe,KZe,JZe,Rme,xme,Dme,Bme,Nme,Ome,wme,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,kme,Pme,Mme,Lme,Ume,iWe,aWe,sWe,uWe,cWe,lWe,Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,Zme,Wme,Xme,ege,tge,nge,rge,oge,ige,dWe,pWe,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,age,sge,uge,cge,lge,wWe,kWe,PWe,MWe,LWe,UWe,dge,pge,QWe,FWe,GWe,fge,Age,jWe,HWe,zWe,mge,gge,hge,_ge,Ege,Sge,yge,Tge,Ige,Cge,bge,vge,Rge,xge,Dge,Bge,Nge,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,Oge,wge,cXe,lXe,dXe,kge=N(()=>{m();l5();$de="aws.lambda.invoked_arn",Vde="db.system",qde="db.connection_string",Yde="db.user",Kde="db.jdbc.driver_classname",Jde="db.name",Zde="db.statement",Wde="db.operation",Xde="db.mssql.instance_name",epe="db.cassandra.keyspace",tpe="db.cassandra.page_size",npe="db.cassandra.consistency_level",rpe="db.cassandra.table",ope="db.cassandra.idempotence",ipe="db.cassandra.speculative_execution_count",ape="db.cassandra.coordinator.id",spe="db.cassandra.coordinator.dc",upe="db.hbase.namespace",cpe="db.redis.database_index",lpe="db.mongodb.collection",dpe="db.sql.table",ppe="exception.type",fpe="exception.message",Ape="exception.stacktrace",mpe="exception.escaped",gpe="faas.trigger",hpe="faas.execution",_pe="faas.document.collection",Epe="faas.document.operation",Spe="faas.document.time",ype="faas.document.name",Tpe="faas.time",Ipe="faas.cron",Cpe="faas.coldstart",bpe="faas.invoked_name",vpe="faas.invoked_provider",Rpe="faas.invoked_region",xpe="net.transport",Dpe="net.peer.ip",Bpe="net.peer.port",Npe="net.peer.name",Ope="net.host.ip",wpe="net.host.port",kpe="net.host.name",Ppe="net.host.connection.type",Mpe="net.host.connection.subtype",Lpe="net.host.carrier.name",Upe="net.host.carrier.mcc",Qpe="net.host.carrier.mnc",Fpe="net.host.carrier.icc",Gpe="peer.service",jpe="enduser.id",Hpe="enduser.role",zpe="enduser.scope",$pe="thread.id",Vpe="thread.name",qpe="code.function",Ype="code.namespace",Kpe="code.filepath",Jpe="code.lineno",Zpe="http.method",Wpe="http.url",Xpe="http.target",efe="http.host",tfe="http.scheme",nfe="http.status_code",rfe="http.flavor",ofe="http.user_agent",ife="http.request_content_length",afe="http.request_content_length_uncompressed",sfe="http.response_content_length",ufe="http.response_content_length_uncompressed",cfe="http.server_name",lfe="http.route",dfe="http.client_ip",pfe="aws.dynamodb.table_names",ffe="aws.dynamodb.consumed_capacity",Afe="aws.dynamodb.item_collection_metrics",mfe="aws.dynamodb.provisioned_read_capacity",gfe="aws.dynamodb.provisioned_write_capacity",hfe="aws.dynamodb.consistent_read",_fe="aws.dynamodb.projection",Efe="aws.dynamodb.limit",Sfe="aws.dynamodb.attributes_to_get",yfe="aws.dynamodb.index_name",Tfe="aws.dynamodb.select",Ife="aws.dynamodb.global_secondary_indexes",Cfe="aws.dynamodb.local_secondary_indexes",bfe="aws.dynamodb.exclusive_start_table",vfe="aws.dynamodb.table_count",Rfe="aws.dynamodb.scan_forward",xfe="aws.dynamodb.segment",Dfe="aws.dynamodb.total_segments",Bfe="aws.dynamodb.count",Nfe="aws.dynamodb.scanned_count",Ofe="aws.dynamodb.attribute_definitions",wfe="aws.dynamodb.global_secondary_index_updates",kfe="messaging.system",Pfe="messaging.destination",Mfe="messaging.destination_kind",Lfe="messaging.temp_destination",Ufe="messaging.protocol",Qfe="messaging.protocol_version",Ffe="messaging.url",Gfe="messaging.message_id",jfe="messaging.conversation_id",Hfe="messaging.message_payload_size_bytes",zfe="messaging.message_payload_compressed_size_bytes",$fe="messaging.operation",Vfe="messaging.consumer_id",qfe="messaging.rabbitmq.routing_key",Yfe="messaging.kafka.message_key",Kfe="messaging.kafka.consumer_group",Jfe="messaging.kafka.client_id",Zfe="messaging.kafka.partition",Wfe="messaging.kafka.tombstone",Xfe="rpc.system",eAe="rpc.service",tAe="rpc.method",nAe="rpc.grpc.status_code",rAe="rpc.jsonrpc.version",oAe="rpc.jsonrpc.request_id",iAe="rpc.jsonrpc.error_code",aAe="rpc.jsonrpc.error_message",sAe="message.type",uAe="message.id",cAe="message.compressed_size",lAe="message.uncompressed_size",bYe=$de,d5=Vde,vYe=qde,RYe=Yde,xYe=Kde,DYe=Jde,p5=Zde,BYe=Wde,NYe=Xde,OYe=epe,wYe=tpe,kYe=npe,PYe=rpe,MYe=ope,LYe=ipe,UYe=ape,QYe=spe,FYe=upe,GYe=cpe,jYe=lpe,HYe=dpe,zYe=ppe,$Ye=fpe,VYe=Ape,qYe=mpe,f5=gpe,YYe=hpe,KYe=_pe,JYe=Epe,ZYe=Spe,WYe=ype,XYe=Tpe,eKe=Ipe,tKe=Cpe,nKe=bpe,rKe=vpe,oKe=Rpe,iKe=xpe,A5=Dpe,aKe=Bpe,sKe=Npe,m5=Ope,g5=wpe,uKe=kpe,cKe=Ppe,lKe=Mpe,dKe=Lpe,pKe=Upe,fKe=Qpe,AKe=Fpe,mKe=Gpe,gKe=jpe,hKe=Hpe,_Ke=zpe,EKe=$pe,SKe=Vpe,yKe=qpe,TKe=Ype,IKe=Kpe,CKe=Jpe,cB=Zpe,nb=Wpe,h5=Xpe,bKe=efe,vKe=tfe,kS=nfe,RKe=rfe,xKe=ofe,DKe=ife,BKe=afe,_5=sfe,E5=ufe,NKe=cfe,S5=lfe,OKe=dfe,wKe=pfe,kKe=ffe,PKe=Afe,MKe=mfe,LKe=gfe,UKe=hfe,QKe=_fe,FKe=Efe,GKe=Sfe,jKe=yfe,HKe=Tfe,zKe=Ife,$Ke=Cfe,VKe=bfe,qKe=vfe,YKe=Rfe,KKe=xfe,JKe=Dfe,ZKe=Bfe,WKe=Nfe,XKe=Ofe,eJe=wfe,y5=kfe,tJe=Pfe,nJe=Mfe,rJe=Lfe,oJe=Ufe,iJe=Qfe,aJe=Ffe,sJe=Gfe,uJe=jfe,cJe=Hfe,lJe=zfe,dJe=$fe,pJe=Vfe,fJe=qfe,AJe=Yfe,mJe=Kfe,gJe=Jfe,hJe=Zfe,_Je=Wfe,EJe=Xfe,T5=eAe,SJe=tAe,I5=nAe,yJe=rAe,TJe=oAe,IJe=iAe,CJe=aAe,bJe=sAe,vJe=uAe,RJe=cAe,xJe=lAe,DJe=Ri([$de,Vde,qde,Yde,Kde,Jde,Zde,Wde,Xde,epe,tpe,npe,rpe,ope,ipe,ape,spe,upe,cpe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,hpe,_pe,Epe,Spe,ype,Tpe,Ipe,Cpe,bpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,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,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,jfe,Hfe,zfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe]),dAe="other_sql",pAe="mssql",fAe="mysql",AAe="oracle",mAe="db2",gAe="postgresql",hAe="redshift",_Ae="hive",EAe="cloudscape",SAe="hsqldb",yAe="progress",TAe="maxdb",IAe="hanadb",CAe="ingres",bAe="firstsql",vAe="edb",RAe="cache",xAe="adabas",DAe="firebird",BAe="derby",NAe="filemaker",OAe="informix",wAe="instantdb",kAe="interbase",PAe="mariadb",MAe="netezza",LAe="pervasive",UAe="pointbase",QAe="sqlite",FAe="sybase",GAe="teradata",jAe="vertica",HAe="h2",zAe="coldfusion",$Ae="cassandra",VAe="hbase",qAe="mongodb",YAe="redis",KAe="couchbase",JAe="couchdb",ZAe="cosmosdb",WAe="dynamodb",XAe="neo4j",eme="geode",tme="elasticsearch",nme="memcached",rme="cockroachdb",BJe=dAe,NJe=pAe,OJe=fAe,wJe=AAe,kJe=mAe,PJe=gAe,MJe=hAe,LJe=_Ae,UJe=EAe,QJe=SAe,FJe=yAe,GJe=TAe,jJe=IAe,HJe=CAe,zJe=bAe,$Je=vAe,VJe=RAe,qJe=xAe,YJe=DAe,KJe=BAe,JJe=NAe,ZJe=OAe,WJe=wAe,XJe=kAe,eZe=PAe,tZe=MAe,nZe=LAe,rZe=UAe,oZe=QAe,iZe=FAe,aZe=GAe,sZe=jAe,uZe=HAe,cZe=zAe,lZe=$Ae,dZe=VAe,pZe=qAe,fZe=YAe,AZe=KAe,mZe=JAe,gZe=ZAe,hZe=WAe,_Ze=XAe,EZe=eme,SZe=tme,yZe=nme,TZe=rme,IZe=Ri([dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,jAe,HAe,zAe,$Ae,VAe,qAe,YAe,KAe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme]),ome="all",ime="each_quorum",ame="quorum",sme="local_quorum",ume="one",cme="two",lme="three",dme="local_one",pme="any",fme="serial",Ame="local_serial",CZe=ome,bZe=ime,vZe=ame,RZe=sme,xZe=ume,DZe=cme,BZe=lme,NZe=dme,OZe=pme,wZe=fme,kZe=Ame,PZe=Ri([ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,Ame]),mme="datasource",gme="http",hme="pubsub",_me="timer",Eme="other",MZe=mme,LZe=gme,UZe=hme,QZe=_me,FZe=Eme,GZe=Ri([mme,gme,hme,_me,Eme]),Sme="insert",yme="edit",Tme="delete",jZe=Sme,HZe=yme,zZe=Tme,$Ze=Ri([Sme,yme,Tme]),Ime="alibaba_cloud",Cme="aws",bme="azure",vme="gcp",VZe=Ime,qZe=Cme,YZe=bme,KZe=vme,JZe=Ri([Ime,Cme,bme,vme]),Rme="ip_tcp",xme="ip_udp",Dme="ip",Bme="unix",Nme="pipe",Ome="inproc",wme="other",ZZe=Rme,WZe=xme,XZe=Dme,eWe=Bme,tWe=Nme,nWe=Ome,rWe=wme,oWe=Ri([Rme,xme,Dme,Bme,Nme,Ome,wme]),kme="wifi",Pme="wired",Mme="cell",Lme="unavailable",Ume="unknown",iWe=kme,aWe=Pme,sWe=Mme,uWe=Lme,cWe=Ume,lWe=Ri([kme,Pme,Mme,Lme,Ume]),Qme="gprs",Fme="edge",Gme="umts",jme="cdma",Hme="evdo_0",zme="evdo_a",$me="cdma2000_1xrtt",Vme="hsdpa",qme="hsupa",Yme="hspa",Kme="iden",Jme="evdo_b",Zme="lte",Wme="ehrpd",Xme="hspap",ege="gsm",tge="td_scdma",nge="iwlan",rge="nr",oge="nrnsa",ige="lte_ca",dWe=Qme,pWe=Fme,fWe=Gme,AWe=jme,mWe=Hme,gWe=zme,hWe=$me,_We=Vme,EWe=qme,SWe=Yme,yWe=Kme,TWe=Jme,IWe=Zme,CWe=Wme,bWe=Xme,vWe=ege,RWe=tge,xWe=nge,DWe=rge,BWe=oge,NWe=ige,OWe=Ri([Qme,Fme,Gme,jme,Hme,zme,$me,Vme,qme,Yme,Kme,Jme,Zme,Wme,Xme,ege,tge,nge,rge,oge,ige]),age="1.0",sge="1.1",uge="2.0",cge="SPDY",lge="QUIC",wWe=age,kWe=sge,PWe=uge,MWe=cge,LWe=lge,UWe={HTTP_1_0:age,HTTP_1_1:sge,HTTP_2_0:uge,SPDY:cge,QUIC:lge},dge="queue",pge="topic",QWe=dge,FWe=pge,GWe=Ri([dge,pge]),fge="receive",Age="process",jWe=fge,HWe=Age,zWe=Ri([fge,Age]),mge=0,gge=1,hge=2,_ge=3,Ege=4,Sge=5,yge=6,Tge=7,Ige=8,Cge=9,bge=10,vge=11,Rge=12,xge=13,Dge=14,Bge=15,Nge=16,$We=mge,VWe=gge,qWe=hge,YWe=_ge,KWe=Ege,JWe=Sge,ZWe=yge,WWe=Tge,XWe=Ige,eXe=Cge,tXe=bge,nXe=vge,rXe=Rge,oXe=xge,iXe=Dge,aXe=Bge,sXe=Nge,uXe={OK:mge,CANCELLED:gge,UNKNOWN:hge,INVALID_ARGUMENT:_ge,DEADLINE_EXCEEDED:Ege,NOT_FOUND:Sge,ALREADY_EXISTS:yge,PERMISSION_DENIED:Tge,RESOURCE_EXHAUSTED:Ige,FAILED_PRECONDITION:Cge,ABORTED:bge,OUT_OF_RANGE:vge,UNIMPLEMENTED:Rge,INTERNAL:xge,UNAVAILABLE:Dge,DATA_LOSS:Bge,UNAUTHENTICATED:Nge},Oge="SENT",wge="RECEIVED",cXe=Oge,lXe=wge,dXe=Ri([Oge,wge])});var Pge=N(()=>{m();kge()});var Mge,Lge,Uge,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,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,xXe,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,jXe,HXe,zXe,$Xe,VXe,qXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,tet,net,ret,oet,iet,aet,set,uet,cet,det,pet,fet,Aet,met,get,het,_et,Eet,yet,Tet,Iet,Cet,bet,vet,Ret,xet,Det,Bet,C5,Net,Oet,wet,ket,Pet,Met,Let,Uet,Qet,Fet,c_e,l_e,d_e,p_e,Get,jet,Het,zet,$et,f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,y_e,T_e,I_e,C_e,b_e,v_e,R_e,x_e,D_e,Vet,qet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,utt,ctt,B_e,N_e,ltt,dtt,ptt,O_e,w_e,k_e,P_e,M_e,L_e,U_e,ftt,Att,mtt,gtt,htt,_tt,Ett,Stt,Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e,ytt,Ttt,Itt,Ctt,btt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,wtt,ktt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,jtt,Htt,aEe=N(()=>{m();l5();Mge="cloud.provider",Lge="cloud.account.id",Uge="cloud.region",Qge="cloud.availability_zone",Fge="cloud.platform",Gge="aws.ecs.container.arn",jge="aws.ecs.cluster.arn",Hge="aws.ecs.launchtype",zge="aws.ecs.task.arn",$ge="aws.ecs.task.family",Vge="aws.ecs.task.revision",qge="aws.eks.cluster.arn",Yge="aws.log.group.names",Kge="aws.log.group.arns",Jge="aws.log.stream.names",Zge="aws.log.stream.arns",Wge="container.name",Xge="container.id",ehe="container.runtime",the="container.image.name",nhe="container.image.tag",rhe="deployment.environment",ohe="device.id",ihe="device.model.identifier",ahe="device.model.name",she="faas.name",uhe="faas.id",che="faas.version",lhe="faas.instance",dhe="faas.max_memory",phe="host.id",fhe="host.name",Ahe="host.type",mhe="host.arch",ghe="host.image.name",hhe="host.image.id",_he="host.image.version",Ehe="k8s.cluster.name",She="k8s.node.name",yhe="k8s.node.uid",The="k8s.namespace.name",Ihe="k8s.pod.uid",Che="k8s.pod.name",bhe="k8s.container.name",vhe="k8s.replicaset.uid",Rhe="k8s.replicaset.name",xhe="k8s.deployment.uid",Dhe="k8s.deployment.name",Bhe="k8s.statefulset.uid",Nhe="k8s.statefulset.name",Ohe="k8s.daemonset.uid",whe="k8s.daemonset.name",khe="k8s.job.uid",Phe="k8s.job.name",Mhe="k8s.cronjob.uid",Lhe="k8s.cronjob.name",Uhe="os.type",Qhe="os.description",Fhe="os.name",Ghe="os.version",jhe="process.pid",Hhe="process.executable.name",zhe="process.executable.path",$he="process.command",Vhe="process.command_line",qhe="process.command_args",Yhe="process.owner",Khe="process.runtime.name",Jhe="process.runtime.version",Zhe="process.runtime.description",Whe="service.name",Xhe="service.namespace",e_e="service.instance.id",t_e="service.version",n_e="telemetry.sdk.name",r_e="telemetry.sdk.language",o_e="telemetry.sdk.version",i_e="telemetry.auto.version",a_e="webengine.name",s_e="webengine.version",u_e="webengine.description",pXe=Mge,fXe=Lge,AXe=Uge,mXe=Qge,gXe=Fge,hXe=Gge,_Xe=jge,EXe=Hge,SXe=zge,yXe=$ge,TXe=Vge,IXe=qge,CXe=Yge,bXe=Kge,vXe=Jge,RXe=Zge,xXe=Wge,DXe=Xge,BXe=ehe,NXe=the,OXe=nhe,wXe=rhe,kXe=ohe,PXe=ihe,MXe=ahe,LXe=she,UXe=uhe,QXe=che,FXe=lhe,GXe=dhe,jXe=phe,HXe=fhe,zXe=Ahe,$Xe=mhe,VXe=ghe,qXe=hhe,YXe=_he,KXe=Ehe,JXe=She,ZXe=yhe,WXe=The,XXe=Ihe,eet=Che,tet=bhe,net=vhe,ret=Rhe,oet=xhe,iet=Dhe,aet=Bhe,set=Nhe,uet=Ohe,cet=whe,det=khe,pet=Phe,fet=Mhe,Aet=Lhe,met=Uhe,get=Qhe,het=Fhe,_et=Ghe,Eet=jhe,yet=Hhe,Tet=zhe,Iet=$he,Cet=Vhe,bet=qhe,vet=Yhe,Ret=Khe,xet=Jhe,Det=Zhe,Bet=Whe,C5=Xhe,Net=e_e,Oet=t_e,wet=n_e,ket=r_e,Pet=o_e,Met=i_e,Let=a_e,Uet=s_e,Qet=u_e,Fet=Ri([Mge,Lge,Uge,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,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,Hhe,zhe,$he,Vhe,qhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e]),c_e="alibaba_cloud",l_e="aws",d_e="azure",p_e="gcp",Get=c_e,jet=l_e,Het=d_e,zet=p_e,$et=Ri([c_e,l_e,d_e,p_e]),f_e="alibaba_cloud_ecs",A_e="alibaba_cloud_fc",m_e="aws_ec2",g_e="aws_ecs",h_e="aws_eks",__e="aws_lambda",E_e="aws_elastic_beanstalk",S_e="azure_vm",y_e="azure_container_instances",T_e="azure_aks",I_e="azure_functions",C_e="azure_app_service",b_e="gcp_compute_engine",v_e="gcp_cloud_run",R_e="gcp_kubernetes_engine",x_e="gcp_cloud_functions",D_e="gcp_app_engine",Vet=f_e,qet=A_e,Yet=m_e,Ket=g_e,Jet=h_e,Zet=__e,Wet=E_e,Xet=S_e,ett=y_e,ttt=T_e,ntt=I_e,rtt=C_e,ott=b_e,itt=v_e,att=R_e,stt=x_e,utt=D_e,ctt=Ri([f_e,A_e,m_e,g_e,h_e,__e,E_e,S_e,y_e,T_e,I_e,C_e,b_e,v_e,R_e,x_e,D_e]),B_e="ec2",N_e="fargate",ltt=B_e,dtt=N_e,ptt=Ri([B_e,N_e]),O_e="amd64",w_e="arm32",k_e="arm64",P_e="ia64",M_e="ppc32",L_e="ppc64",U_e="x86",ftt=O_e,Att=w_e,mtt=k_e,gtt=P_e,htt=M_e,_tt=L_e,Ett=U_e,Stt=Ri([O_e,w_e,k_e,P_e,M_e,L_e,U_e]),Q_e="windows",F_e="linux",G_e="darwin",j_e="freebsd",H_e="netbsd",z_e="openbsd",$_e="dragonflybsd",V_e="hpux",q_e="aix",Y_e="solaris",K_e="z_os",ytt=Q_e,Ttt=F_e,Itt=G_e,Ctt=j_e,btt=H_e,vtt=z_e,Rtt=$_e,xtt=V_e,Dtt=q_e,Btt=Y_e,Ntt=K_e,Ott=Ri([Q_e,F_e,G_e,j_e,H_e,z_e,$_e,V_e,q_e,Y_e,K_e]),J_e="cpp",Z_e="dotnet",W_e="erlang",X_e="go",eEe="java",tEe="nodejs",nEe="php",rEe="python",oEe="ruby",iEe="webjs",wtt=J_e,ktt=Z_e,Ptt=W_e,Mtt=X_e,Ltt=eEe,Utt=tEe,Qtt=nEe,Ftt=rEe,Gtt=oEe,jtt=iEe,Htt=Ri([J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe])});var sEe=N(()=>{m();aEe()});var ztt,$tt,Vtt,qtt,Ytt,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,cnt,lnt,dnt,pnt,fnt,Ant,b5,v5,mnt,rb,gnt,R5,x5,hnt,PS,_nt,Ent,Snt,ynt,Tnt,Int,Cnt,bnt,vnt,Rnt,D5,xnt,Dnt,Bnt,Nnt,Ont,wnt,MS,knt,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,Hnt,znt,$nt,Vnt,sg,ug,qnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,art,srt,urt,B5,N5,crt,O5,w5,lrt,drt,prt,frt,Art,mrt,grt,hrt,_rt,Ert,Srt,yrt,Trt,Irt,k5,P5,Crt,M5,brt,L5,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,wrt,krt,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,Hrt,zrt,$rt,Vrt,qrt,Yrt,Krt,i_,Jrt,Zrt,Wrt,U5,uEe=N(()=>{m();ztt="aspnetcore.diagnostics.exception.result",$tt="aborted",Vtt="handled",qtt="skipped",Ytt="unhandled",Ktt="aspnetcore.diagnostics.handler.type",Jtt="aspnetcore.rate_limiting.policy",Ztt="aspnetcore.rate_limiting.result",Wtt="acquired",Xtt="endpoint_limiter",ent="global_limiter",tnt="request_canceled",nnt="aspnetcore.request.is_unhandled",rnt="aspnetcore.routing.is_fallback",ont="aspnetcore.routing.match_status",int="failure",ant="success",snt="aspnetcore.user.is_authenticated",unt="client.address",cnt="client.port",lnt="code.column.number",dnt="code.file.path",pnt="code.function.name",fnt="code.line.number",Ant="code.stacktrace",b5="db.collection.name",v5="db.namespace",mnt="db.operation.batch.size",rb="db.operation.name",gnt="db.query.summary",R5="db.query.text",x5="db.response.status_code",hnt="db.stored_procedure.name",PS="db.system.name",_nt="mariadb",Ent="microsoft.sql_server",Snt="mysql",ynt="postgresql",Tnt="dotnet.gc.heap.generation",Int="gen0",Cnt="gen1",bnt="gen2",vnt="loh",Rnt="poh",D5="error.type",xnt="_OTHER",Dnt="exception.escaped",Bnt="exception.message",Nnt="exception.stacktrace",Ont="exception.type",wnt=e=>`http.request.header.${e}`,MS="http.request.method",knt="_OTHER",Pnt="CONNECT",Mnt="DELETE",Lnt="GET",Unt="HEAD",Qnt="OPTIONS",Fnt="PATCH",Gnt="POST",jnt="PUT",Hnt="TRACE",znt="http.request.method_original",$nt="http.request.resend_count",Vnt=e=>`http.response.header.${e}`,sg="http.response.status_code",ug="http.route",qnt="jvm.gc.action",Ynt="jvm.gc.name",Knt="jvm.memory.pool.name",Jnt="jvm.memory.type",Znt="heap",Wnt="non_heap",Xnt="jvm.thread.daemon",ert="jvm.thread.state",trt="blocked",nrt="new",rrt="runnable",ort="terminated",irt="timed_waiting",art="waiting",srt="network.local.address",urt="network.local.port",B5="network.peer.address",N5="network.peer.port",crt="network.protocol.name",O5="network.protocol.version",w5="network.transport",lrt="pipe",drt="quic",prt="tcp",frt="udp",Art="unix",mrt="network.type",grt="ipv4",hrt="ipv6",_rt="otel.scope.name",Ert="otel.scope.version",Srt="otel.status_code",yrt="ERROR",Trt="OK",Irt="otel.status_description",k5="server.address",P5="server.port",Crt="service.instance.id",M5="service.name",brt="service.namespace",L5="service.version",vrt="signalr.connection.status",Rrt="app_shutdown",xrt="normal_closure",Drt="timeout",Brt="signalr.transport",Nrt="long_polling",Ort="server_sent_events",wrt="web_sockets",krt="telemetry.sdk.language",Prt="cpp",Mrt="dotnet",Lrt="erlang",Urt="go",Qrt="java",Frt="nodejs",Grt="php",jrt="python",Hrt="ruby",zrt="rust",$rt="swift",Vrt="webjs",qrt="telemetry.sdk.name",Yrt="telemetry.sdk.version",Krt="url.fragment",i_="url.full",Jrt="url.path",Zrt="url.query",Wrt="url.scheme",U5="user_agent.original"});var Xrt,eot,tot,not,rot,oot,iot,aot,sot,uot,cot,lot,dot,pot,fot,Aot,mot,got,hot,_ot,Eot,Sot,yot,Tot,Iot,Cot,bot,vot,Rot,xot,Dot,Bot,Not,Oot,wot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,Hot,zot,$ot,Vot,qot,Yot,Kot,cEe=N(()=>{m();Xrt="aspnetcore.diagnostics.exceptions",eot="aspnetcore.rate_limiting.active_request_leases",tot="aspnetcore.rate_limiting.queued_requests",not="aspnetcore.rate_limiting.request.time_in_queue",rot="aspnetcore.rate_limiting.request_lease.duration",oot="aspnetcore.rate_limiting.requests",iot="aspnetcore.routing.match_attempts",aot="db.client.operation.duration",sot="dotnet.assembly.count",uot="dotnet.exceptions",cot="dotnet.gc.collections",lot="dotnet.gc.heap.total_allocated",dot="dotnet.gc.last_collection.heap.fragmentation.size",pot="dotnet.gc.last_collection.heap.size",fot="dotnet.gc.last_collection.memory.committed_size",Aot="dotnet.gc.pause.time",mot="dotnet.jit.compilation.time",got="dotnet.jit.compiled_il.size",hot="dotnet.jit.compiled_methods",_ot="dotnet.monitor.lock_contentions",Eot="dotnet.process.cpu.count",Sot="dotnet.process.cpu.time",yot="dotnet.process.memory.working_set",Tot="dotnet.thread_pool.queue.length",Iot="dotnet.thread_pool.thread.count",Cot="dotnet.thread_pool.work_item.count",bot="dotnet.timer.count",vot="http.client.request.duration",Rot="http.server.request.duration",xot="jvm.class.count",Dot="jvm.class.loaded",Bot="jvm.class.unloaded",Not="jvm.cpu.count",Oot="jvm.cpu.recent_utilization",wot="jvm.cpu.time",kot="jvm.gc.duration",Pot="jvm.memory.committed",Mot="jvm.memory.limit",Lot="jvm.memory.used",Uot="jvm.memory.used_after_last_gc",Qot="jvm.thread.count",Fot="kestrel.active_connections",Got="kestrel.active_tls_handshakes",jot="kestrel.connection.duration",Hot="kestrel.queued_connections",zot="kestrel.queued_requests",$ot="kestrel.rejected_connections",Vot="kestrel.tls_handshake.duration",qot="kestrel.upgraded_connections",Yot="signalr.server.active_connections",Kot="signalr.server.connection.duration"});var Jot,lEe=N(()=>{m();Jot="exception"});var Ur={};$a(Ur,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>$tt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>Vtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>qtt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>Ytt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Wtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Xtt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>ent,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>tnt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>int,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>ant,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>ztt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Ktt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Jtt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ztt,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>nnt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>rnt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>ont,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>snt,ATTR_CLIENT_ADDRESS:()=>unt,ATTR_CLIENT_PORT:()=>cnt,ATTR_CODE_COLUMN_NUMBER:()=>lnt,ATTR_CODE_FILE_PATH:()=>dnt,ATTR_CODE_FUNCTION_NAME:()=>pnt,ATTR_CODE_LINE_NUMBER:()=>fnt,ATTR_CODE_STACKTRACE:()=>Ant,ATTR_DB_COLLECTION_NAME:()=>b5,ATTR_DB_NAMESPACE:()=>v5,ATTR_DB_OPERATION_BATCH_SIZE:()=>mnt,ATTR_DB_OPERATION_NAME:()=>rb,ATTR_DB_QUERY_SUMMARY:()=>gnt,ATTR_DB_QUERY_TEXT:()=>R5,ATTR_DB_RESPONSE_STATUS_CODE:()=>x5,ATTR_DB_STORED_PROCEDURE_NAME:()=>hnt,ATTR_DB_SYSTEM_NAME:()=>PS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Tnt,ATTR_ERROR_TYPE:()=>D5,ATTR_EXCEPTION_ESCAPED:()=>Dnt,ATTR_EXCEPTION_MESSAGE:()=>Bnt,ATTR_EXCEPTION_STACKTRACE:()=>Nnt,ATTR_EXCEPTION_TYPE:()=>Ont,ATTR_HTTP_REQUEST_HEADER:()=>wnt,ATTR_HTTP_REQUEST_METHOD:()=>MS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>znt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>$nt,ATTR_HTTP_RESPONSE_HEADER:()=>Vnt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>sg,ATTR_HTTP_ROUTE:()=>ug,ATTR_JVM_GC_ACTION:()=>qnt,ATTR_JVM_GC_NAME:()=>Ynt,ATTR_JVM_MEMORY_POOL_NAME:()=>Knt,ATTR_JVM_MEMORY_TYPE:()=>Jnt,ATTR_JVM_THREAD_DAEMON:()=>Xnt,ATTR_JVM_THREAD_STATE:()=>ert,ATTR_NETWORK_LOCAL_ADDRESS:()=>srt,ATTR_NETWORK_LOCAL_PORT:()=>urt,ATTR_NETWORK_PEER_ADDRESS:()=>B5,ATTR_NETWORK_PEER_PORT:()=>N5,ATTR_NETWORK_PROTOCOL_NAME:()=>crt,ATTR_NETWORK_PROTOCOL_VERSION:()=>O5,ATTR_NETWORK_TRANSPORT:()=>w5,ATTR_NETWORK_TYPE:()=>mrt,ATTR_OTEL_SCOPE_NAME:()=>_rt,ATTR_OTEL_SCOPE_VERSION:()=>Ert,ATTR_OTEL_STATUS_CODE:()=>Srt,ATTR_OTEL_STATUS_DESCRIPTION:()=>Irt,ATTR_SERVER_ADDRESS:()=>k5,ATTR_SERVER_PORT:()=>P5,ATTR_SERVICE_INSTANCE_ID:()=>Crt,ATTR_SERVICE_NAME:()=>M5,ATTR_SERVICE_NAMESPACE:()=>brt,ATTR_SERVICE_VERSION:()=>L5,ATTR_SIGNALR_CONNECTION_STATUS:()=>vrt,ATTR_SIGNALR_TRANSPORT:()=>Brt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>krt,ATTR_TELEMETRY_SDK_NAME:()=>qrt,ATTR_TELEMETRY_SDK_VERSION:()=>Yrt,ATTR_URL_FRAGMENT:()=>Krt,ATTR_URL_FULL:()=>i_,ATTR_URL_PATH:()=>Jrt,ATTR_URL_QUERY:()=>Zrt,ATTR_URL_SCHEME:()=>Wrt,ATTR_USER_AGENT_ORIGINAL:()=>U5,AWSECSLAUNCHTYPEVALUES_EC2:()=>ltt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>dtt,AwsEcsLaunchtypeValues:()=>ptt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>Vet,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>qet,CLOUDPLATFORMVALUES_AWS_EC2:()=>Yet,CLOUDPLATFORMVALUES_AWS_ECS:()=>Ket,CLOUDPLATFORMVALUES_AWS_EKS:()=>Jet,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Wet,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Zet,CLOUDPLATFORMVALUES_AZURE_AKS:()=>ttt,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>rtt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>ett,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>ntt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Xet,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>utt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>stt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>itt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>ott,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>att,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Get,CLOUDPROVIDERVALUES_AWS:()=>jet,CLOUDPROVIDERVALUES_AZURE:()=>Het,CLOUDPROVIDERVALUES_GCP:()=>zet,CloudPlatformValues:()=>ctt,CloudProviderValues:()=>$et,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>CZe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>OZe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>bZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>NZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>RZe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>kZe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>xZe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>vZe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>wZe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>BZe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>DZe,DBSYSTEMVALUES_ADABAS:()=>qJe,DBSYSTEMVALUES_CACHE:()=>VJe,DBSYSTEMVALUES_CASSANDRA:()=>lZe,DBSYSTEMVALUES_CLOUDSCAPE:()=>UJe,DBSYSTEMVALUES_COCKROACHDB:()=>TZe,DBSYSTEMVALUES_COLDFUSION:()=>cZe,DBSYSTEMVALUES_COSMOSDB:()=>gZe,DBSYSTEMVALUES_COUCHBASE:()=>AZe,DBSYSTEMVALUES_COUCHDB:()=>mZe,DBSYSTEMVALUES_DB2:()=>kJe,DBSYSTEMVALUES_DERBY:()=>KJe,DBSYSTEMVALUES_DYNAMODB:()=>hZe,DBSYSTEMVALUES_EDB:()=>$Je,DBSYSTEMVALUES_ELASTICSEARCH:()=>SZe,DBSYSTEMVALUES_FILEMAKER:()=>JJe,DBSYSTEMVALUES_FIREBIRD:()=>YJe,DBSYSTEMVALUES_FIRSTSQL:()=>zJe,DBSYSTEMVALUES_GEODE:()=>EZe,DBSYSTEMVALUES_H2:()=>uZe,DBSYSTEMVALUES_HANADB:()=>jJe,DBSYSTEMVALUES_HBASE:()=>dZe,DBSYSTEMVALUES_HIVE:()=>LJe,DBSYSTEMVALUES_HSQLDB:()=>QJe,DBSYSTEMVALUES_INFORMIX:()=>ZJe,DBSYSTEMVALUES_INGRES:()=>HJe,DBSYSTEMVALUES_INSTANTDB:()=>WJe,DBSYSTEMVALUES_INTERBASE:()=>XJe,DBSYSTEMVALUES_MARIADB:()=>eZe,DBSYSTEMVALUES_MAXDB:()=>GJe,DBSYSTEMVALUES_MEMCACHED:()=>yZe,DBSYSTEMVALUES_MONGODB:()=>pZe,DBSYSTEMVALUES_MSSQL:()=>NJe,DBSYSTEMVALUES_MYSQL:()=>OJe,DBSYSTEMVALUES_NEO4J:()=>_Ze,DBSYSTEMVALUES_NETEZZA:()=>tZe,DBSYSTEMVALUES_ORACLE:()=>wJe,DBSYSTEMVALUES_OTHER_SQL:()=>BJe,DBSYSTEMVALUES_PERVASIVE:()=>nZe,DBSYSTEMVALUES_POINTBASE:()=>rZe,DBSYSTEMVALUES_POSTGRESQL:()=>PJe,DBSYSTEMVALUES_PROGRESS:()=>FJe,DBSYSTEMVALUES_REDIS:()=>fZe,DBSYSTEMVALUES_REDSHIFT:()=>MJe,DBSYSTEMVALUES_SQLITE:()=>oZe,DBSYSTEMVALUES_SYBASE:()=>iZe,DBSYSTEMVALUES_TERADATA:()=>aZe,DBSYSTEMVALUES_VERTICA:()=>sZe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>_nt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Ent,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Snt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>ynt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Int,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>Cnt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>bnt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>vnt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Rnt,DbCassandraConsistencyLevelValues:()=>PZe,DbSystemValues:()=>IZe,ERROR_TYPE_VALUE_OTHER:()=>xnt,EVENT_EXCEPTION:()=>Jot,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>zZe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>HZe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>jZe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>VZe,FAASINVOKEDPROVIDERVALUES_AWS:()=>qZe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>YZe,FAASINVOKEDPROVIDERVALUES_GCP:()=>KZe,FAASTRIGGERVALUES_DATASOURCE:()=>MZe,FAASTRIGGERVALUES_HTTP:()=>LZe,FAASTRIGGERVALUES_OTHER:()=>FZe,FAASTRIGGERVALUES_PUBSUB:()=>UZe,FAASTRIGGERVALUES_TIMER:()=>QZe,FaasDocumentOperationValues:()=>$Ze,FaasInvokedProviderValues:()=>JZe,FaasTriggerValues:()=>GZe,HOSTARCHVALUES_AMD64:()=>ftt,HOSTARCHVALUES_ARM32:()=>Att,HOSTARCHVALUES_ARM64:()=>mtt,HOSTARCHVALUES_IA64:()=>gtt,HOSTARCHVALUES_PPC32:()=>htt,HOSTARCHVALUES_PPC64:()=>_tt,HOSTARCHVALUES_X86:()=>Ett,HTTPFLAVORVALUES_HTTP_1_0:()=>wWe,HTTPFLAVORVALUES_HTTP_1_1:()=>kWe,HTTPFLAVORVALUES_HTTP_2_0:()=>PWe,HTTPFLAVORVALUES_QUIC:()=>LWe,HTTPFLAVORVALUES_SPDY:()=>MWe,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Pnt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Mnt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Lnt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Unt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Qnt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>knt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>Fnt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Gnt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>jnt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Hnt,HostArchValues:()=>Stt,HttpFlavorValues:()=>UWe,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Znt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>Wnt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>trt,JVM_THREAD_STATE_VALUE_NEW:()=>nrt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>rrt,JVM_THREAD_STATE_VALUE_TERMINATED:()=>ort,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>irt,JVM_THREAD_STATE_VALUE_WAITING:()=>art,MESSAGETYPEVALUES_RECEIVED:()=>lXe,MESSAGETYPEVALUES_SENT:()=>cXe,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>QWe,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>FWe,MESSAGINGOPERATIONVALUES_PROCESS:()=>HWe,MESSAGINGOPERATIONVALUES_RECEIVE:()=>jWe,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>Xrt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>eot,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>tot,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>oot,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>rot,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>not,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>iot,METRIC_DB_CLIENT_OPERATION_DURATION:()=>aot,METRIC_DOTNET_ASSEMBLY_COUNT:()=>sot,METRIC_DOTNET_EXCEPTIONS:()=>uot,METRIC_DOTNET_GC_COLLECTIONS:()=>cot,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>lot,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>dot,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>pot,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>fot,METRIC_DOTNET_GC_PAUSE_TIME:()=>Aot,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>mot,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>got,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>hot,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>_ot,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Eot,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Sot,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>yot,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Tot,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Iot,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Cot,METRIC_DOTNET_TIMER_COUNT:()=>bot,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>vot,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Rot,METRIC_JVM_CLASS_COUNT:()=>xot,METRIC_JVM_CLASS_LOADED:()=>Dot,METRIC_JVM_CLASS_UNLOADED:()=>Bot,METRIC_JVM_CPU_COUNT:()=>Not,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Oot,METRIC_JVM_CPU_TIME:()=>wot,METRIC_JVM_GC_DURATION:()=>kot,METRIC_JVM_MEMORY_COMMITTED:()=>Pot,METRIC_JVM_MEMORY_LIMIT:()=>Mot,METRIC_JVM_MEMORY_USED:()=>Lot,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Uot,METRIC_JVM_THREAD_COUNT:()=>Qot,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Fot,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Got,METRIC_KESTREL_CONNECTION_DURATION:()=>jot,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Hot,METRIC_KESTREL_QUEUED_REQUESTS:()=>zot,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>$ot,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Vot,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>qot,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>Yot,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Kot,MessageTypeValues:()=>dXe,MessagingDestinationKindValues:()=>GWe,MessagingOperationValues:()=>zWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>AWe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>hWe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>pWe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>CWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>mWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>gWe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>TWe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>dWe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>vWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>_We,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>SWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>bWe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>EWe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>yWe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>xWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>IWe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>NWe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>DWe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>BWe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>RWe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>fWe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>sWe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>uWe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>cWe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>iWe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>aWe,NETTRANSPORTVALUES_INPROC:()=>nWe,NETTRANSPORTVALUES_IP:()=>XZe,NETTRANSPORTVALUES_IP_TCP:()=>ZZe,NETTRANSPORTVALUES_IP_UDP:()=>WZe,NETTRANSPORTVALUES_OTHER:()=>rWe,NETTRANSPORTVALUES_PIPE:()=>tWe,NETTRANSPORTVALUES_UNIX:()=>eWe,NETWORK_TRANSPORT_VALUE_PIPE:()=>lrt,NETWORK_TRANSPORT_VALUE_QUIC:()=>drt,NETWORK_TRANSPORT_VALUE_TCP:()=>prt,NETWORK_TRANSPORT_VALUE_UDP:()=>frt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Art,NETWORK_TYPE_VALUE_IPV4:()=>grt,NETWORK_TYPE_VALUE_IPV6:()=>hrt,NetHostConnectionSubtypeValues:()=>OWe,NetHostConnectionTypeValues:()=>lWe,NetTransportValues:()=>oWe,OSTYPEVALUES_AIX:()=>Dtt,OSTYPEVALUES_DARWIN:()=>Itt,OSTYPEVALUES_DRAGONFLYBSD:()=>Rtt,OSTYPEVALUES_FREEBSD:()=>Ctt,OSTYPEVALUES_HPUX:()=>xtt,OSTYPEVALUES_LINUX:()=>Ttt,OSTYPEVALUES_NETBSD:()=>btt,OSTYPEVALUES_OPENBSD:()=>vtt,OSTYPEVALUES_SOLARIS:()=>Btt,OSTYPEVALUES_WINDOWS:()=>ytt,OSTYPEVALUES_Z_OS:()=>Ntt,OTEL_STATUS_CODE_VALUE_ERROR:()=>yrt,OTEL_STATUS_CODE_VALUE_OK:()=>Trt,OsTypeValues:()=>Ott,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>tXe,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>ZWe,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>VWe,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>aXe,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>KWe,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>eXe,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>oXe,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>YWe,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>JWe,RPCGRPCSTATUSCODEVALUES_OK:()=>$We,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>nXe,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>WWe,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>XWe,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>sXe,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>iXe,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>rXe,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>qWe,RpcGrpcStatusCodeValues:()=>uXe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>GKe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>XKe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>UKe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>kKe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>ZKe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>VKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>zKe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>eJe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>jKe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>PKe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>FKe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>$Ke,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>QKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>MKe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>LKe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>WKe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>YKe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>KKe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>HKe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>qKe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>wKe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>JKe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>bYe,SEMATTRS_CODE_FILEPATH:()=>IKe,SEMATTRS_CODE_FUNCTION:()=>yKe,SEMATTRS_CODE_LINENO:()=>CKe,SEMATTRS_CODE_NAMESPACE:()=>TKe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>kYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>QYe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>UYe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>MYe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>OYe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>wYe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>LYe,SEMATTRS_DB_CASSANDRA_TABLE:()=>PYe,SEMATTRS_DB_CONNECTION_STRING:()=>vYe,SEMATTRS_DB_HBASE_NAMESPACE:()=>FYe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>xYe,SEMATTRS_DB_MONGODB_COLLECTION:()=>jYe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>NYe,SEMATTRS_DB_NAME:()=>DYe,SEMATTRS_DB_OPERATION:()=>BYe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>GYe,SEMATTRS_DB_SQL_TABLE:()=>HYe,SEMATTRS_DB_STATEMENT:()=>p5,SEMATTRS_DB_SYSTEM:()=>d5,SEMATTRS_DB_USER:()=>RYe,SEMATTRS_ENDUSER_ID:()=>gKe,SEMATTRS_ENDUSER_ROLE:()=>hKe,SEMATTRS_ENDUSER_SCOPE:()=>_Ke,SEMATTRS_EXCEPTION_ESCAPED:()=>qYe,SEMATTRS_EXCEPTION_MESSAGE:()=>$Ye,SEMATTRS_EXCEPTION_STACKTRACE:()=>VYe,SEMATTRS_EXCEPTION_TYPE:()=>zYe,SEMATTRS_FAAS_COLDSTART:()=>tKe,SEMATTRS_FAAS_CRON:()=>eKe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>KYe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>WYe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>JYe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>ZYe,SEMATTRS_FAAS_EXECUTION:()=>YYe,SEMATTRS_FAAS_INVOKED_NAME:()=>nKe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>rKe,SEMATTRS_FAAS_INVOKED_REGION:()=>oKe,SEMATTRS_FAAS_TIME:()=>XYe,SEMATTRS_FAAS_TRIGGER:()=>f5,SEMATTRS_HTTP_CLIENT_IP:()=>OKe,SEMATTRS_HTTP_FLAVOR:()=>RKe,SEMATTRS_HTTP_HOST:()=>bKe,SEMATTRS_HTTP_METHOD:()=>cB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>DKe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>BKe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>_5,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>E5,SEMATTRS_HTTP_ROUTE:()=>S5,SEMATTRS_HTTP_SCHEME:()=>vKe,SEMATTRS_HTTP_SERVER_NAME:()=>NKe,SEMATTRS_HTTP_STATUS_CODE:()=>kS,SEMATTRS_HTTP_TARGET:()=>h5,SEMATTRS_HTTP_URL:()=>nb,SEMATTRS_HTTP_USER_AGENT:()=>xKe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>RJe,SEMATTRS_MESSAGE_ID:()=>vJe,SEMATTRS_MESSAGE_TYPE:()=>bJe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>xJe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>pJe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>uJe,SEMATTRS_MESSAGING_DESTINATION:()=>tJe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>nJe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>gJe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>mJe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>AJe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>hJe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>_Je,SEMATTRS_MESSAGING_MESSAGE_ID:()=>sJe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>lJe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>cJe,SEMATTRS_MESSAGING_OPERATION:()=>dJe,SEMATTRS_MESSAGING_PROTOCOL:()=>oJe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>iJe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>fJe,SEMATTRS_MESSAGING_SYSTEM:()=>y5,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>rJe,SEMATTRS_MESSAGING_URL:()=>aJe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>AKe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>pKe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>fKe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>dKe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>lKe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>cKe,SEMATTRS_NET_HOST_IP:()=>m5,SEMATTRS_NET_HOST_NAME:()=>uKe,SEMATTRS_NET_HOST_PORT:()=>g5,SEMATTRS_NET_PEER_IP:()=>A5,SEMATTRS_NET_PEER_NAME:()=>sKe,SEMATTRS_NET_PEER_PORT:()=>aKe,SEMATTRS_NET_TRANSPORT:()=>iKe,SEMATTRS_PEER_SERVICE:()=>mKe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>I5,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>IJe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>CJe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>TJe,SEMATTRS_RPC_JSONRPC_VERSION:()=>yJe,SEMATTRS_RPC_METHOD:()=>SJe,SEMATTRS_RPC_SERVICE:()=>T5,SEMATTRS_RPC_SYSTEM:()=>EJe,SEMATTRS_THREAD_ID:()=>EKe,SEMATTRS_THREAD_NAME:()=>SKe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>_Xe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>hXe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>EXe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>SXe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>yXe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>TXe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>IXe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>bXe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>CXe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>RXe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>vXe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>fXe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>mXe,SEMRESATTRS_CLOUD_PLATFORM:()=>gXe,SEMRESATTRS_CLOUD_PROVIDER:()=>pXe,SEMRESATTRS_CLOUD_REGION:()=>AXe,SEMRESATTRS_CONTAINER_ID:()=>DXe,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>NXe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>OXe,SEMRESATTRS_CONTAINER_NAME:()=>xXe,SEMRESATTRS_CONTAINER_RUNTIME:()=>BXe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>wXe,SEMRESATTRS_DEVICE_ID:()=>kXe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>PXe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>MXe,SEMRESATTRS_FAAS_ID:()=>UXe,SEMRESATTRS_FAAS_INSTANCE:()=>FXe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>GXe,SEMRESATTRS_FAAS_NAME:()=>LXe,SEMRESATTRS_FAAS_VERSION:()=>QXe,SEMRESATTRS_HOST_ARCH:()=>$Xe,SEMRESATTRS_HOST_ID:()=>jXe,SEMRESATTRS_HOST_IMAGE_ID:()=>qXe,SEMRESATTRS_HOST_IMAGE_NAME:()=>VXe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>YXe,SEMRESATTRS_HOST_NAME:()=>HXe,SEMRESATTRS_HOST_TYPE:()=>zXe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>KXe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>tet,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Aet,SEMRESATTRS_K8S_CRONJOB_UID:()=>fet,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>cet,SEMRESATTRS_K8S_DAEMONSET_UID:()=>uet,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>iet,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>oet,SEMRESATTRS_K8S_JOB_NAME:()=>pet,SEMRESATTRS_K8S_JOB_UID:()=>det,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>WXe,SEMRESATTRS_K8S_NODE_NAME:()=>JXe,SEMRESATTRS_K8S_NODE_UID:()=>ZXe,SEMRESATTRS_K8S_POD_NAME:()=>eet,SEMRESATTRS_K8S_POD_UID:()=>XXe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>ret,SEMRESATTRS_K8S_REPLICASET_UID:()=>net,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>set,SEMRESATTRS_K8S_STATEFULSET_UID:()=>aet,SEMRESATTRS_OS_DESCRIPTION:()=>get,SEMRESATTRS_OS_NAME:()=>het,SEMRESATTRS_OS_TYPE:()=>met,SEMRESATTRS_OS_VERSION:()=>_et,SEMRESATTRS_PROCESS_COMMAND:()=>Iet,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>bet,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>Cet,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>yet,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Tet,SEMRESATTRS_PROCESS_OWNER:()=>vet,SEMRESATTRS_PROCESS_PID:()=>Eet,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Det,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Ret,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>xet,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Net,SEMRESATTRS_SERVICE_NAME:()=>Bet,SEMRESATTRS_SERVICE_NAMESPACE:()=>C5,SEMRESATTRS_SERVICE_VERSION:()=>Oet,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Met,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>ket,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>wet,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Pet,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Qet,SEMRESATTRS_WEBENGINE_NAME:()=>Let,SEMRESATTRS_WEBENGINE_VERSION:()=>Uet,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Rrt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>xrt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Drt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Nrt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>Ort,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>wrt,SemanticAttributes:()=>DJe,SemanticResourceAttributes:()=>Fet,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>wtt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>ktt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Ptt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Mtt,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>Ltt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Utt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Qtt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>Ftt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Gtt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>jtt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Prt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Mrt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Lrt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Urt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Qrt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Frt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Grt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>jrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Hrt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>zrt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>$rt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Vrt,TelemetrySdkLanguageValues:()=>Htt});var Zn=N(()=>{m();Pge();sEe();uEe();cEe();lEe()});var dEe=Q(v2=>{"use strict";m();Object.defineProperty(v2,"__esModule",{value:!0});v2.ATTR_PROCESS_RUNTIME_NAME=void 0;v2.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var pEe=Q(x2=>{"use strict";m();Object.defineProperty(x2,"__esModule",{value:!0});x2.SDK_INFO=void 0;var Zot=zde(),R2=(Zn(),Me(Ur)),Wot=dEe();x2.SDK_INFO={[R2.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Wot.ATTR_PROCESS_RUNTIME_NAME]:"node",[R2.ATTR_TELEMETRY_SDK_LANGUAGE]:R2.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[R2.ATTR_TELEMETRY_SDK_VERSION]:Zot.VERSION}});var fEe=Q(Ws=>{"use strict";m();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.otperformance=Ws.SDK_INFO=Ws._globalThis=Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getBooleanFromEnv=Ws.getStringFromEnv=void 0;var D2=jde();Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return D2.getStringFromEnv}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return D2.getBooleanFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return D2.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return D2.getStringListFromEnv}});var Xot=Hde();Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return Xot._globalThis}});var eit=pEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return eit.SDK_INFO}});Ws.otperformance=performance});var Q5=Q(Xs=>{"use strict";m();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.getStringListFromEnv=Xs.getNumberFromEnv=Xs.getStringFromEnv=Xs.getBooleanFromEnv=Xs.otperformance=Xs._globalThis=Xs.SDK_INFO=void 0;var LS=fEe();Object.defineProperty(Xs,"SDK_INFO",{enumerable:!0,get:function(){return LS.SDK_INFO}});Object.defineProperty(Xs,"_globalThis",{enumerable:!0,get:function(){return LS._globalThis}});Object.defineProperty(Xs,"otperformance",{enumerable:!0,get:function(){return LS.otperformance}});Object.defineProperty(Xs,"getBooleanFromEnv",{enumerable:!0,get:function(){return LS.getBooleanFromEnv}});Object.defineProperty(Xs,"getStringFromEnv",{enumerable:!0,get:function(){return LS.getStringFromEnv}});Object.defineProperty(Xs,"getNumberFromEnv",{enumerable:!0,get:function(){return LS.getNumberFromEnv}});Object.defineProperty(Xs,"getStringListFromEnv",{enumerable:!0,get:function(){return LS.getStringListFromEnv}})});var hEe=Q(ao=>{"use strict";m();Object.defineProperty(ao,"__esModule",{value:!0});ao.addHrTimes=ao.isTimeInput=ao.isTimeInputHrTime=ao.hrTimeToMicroseconds=ao.hrTimeToMilliseconds=ao.hrTimeToNanoseconds=ao.hrTimeToTimeStamp=ao.hrTimeDuration=ao.timeInputToHrTime=ao.hrTime=ao.getTimeOrigin=ao.millisToHrTime=void 0;var B2=Q5(),AEe=9,tit=6,nit=Math.pow(10,tit),N2=Math.pow(10,AEe);function lB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*nit);return[n,r]}ao.millisToHrTime=lB;function rit(){return B2.otperformance.timeOrigin}ao.getTimeOrigin=rit;function mEe(e){let t=lB(B2.otperformance.timeOrigin),n=lB(typeof e=="number"?e:B2.otperformance.now());return gEe(t,n)}ao.hrTime=mEe;function oit(e){if(F5(e))return e;if(typeof e=="number")return e<B2.otperformance.timeOrigin?mEe(e):lB(e);if(e instanceof Date)return lB(e.getTime());throw TypeError("Invalid input type")}ao.timeInputToHrTime=oit;function iit(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=N2),[n,r]}ao.hrTimeDuration=iit;function ait(e){let t=AEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}ao.hrTimeToTimeStamp=ait;function sit(e){return e[0]*N2+e[1]}ao.hrTimeToNanoseconds=sit;function uit(e){return e[0]*1e3+e[1]/1e6}ao.hrTimeToMilliseconds=uit;function cit(e){return e[0]*1e6+e[1]/1e3}ao.hrTimeToMicroseconds=cit;function F5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}ao.isTimeInputHrTime=F5;function lit(e){return F5(e)||typeof e=="number"||e instanceof Date}ao.isTimeInput=lit;function gEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=N2&&(n[1]-=N2,n[0]+=1),n}ao.addHrTimes=gEe});var _Ee=Q(O2=>{"use strict";m();Object.defineProperty(O2,"__esModule",{value:!0});O2.unrefTimer=void 0;function dit(e){typeof e!="number"&&e.unref()}O2.unrefTimer=dit});var EEe=Q(dB=>{"use strict";m();Object.defineProperty(dB,"__esModule",{value:!0});dB.ExportResultCode=void 0;var pit;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(pit=dB.ExportResultCode||(dB.ExportResultCode={}))});var yEe=Q(w2=>{"use strict";m();Object.defineProperty(w2,"__esModule",{value:!0});w2.CompositePropagator=void 0;var SEe=(je(),Me(We)),G5=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){SEe.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){SEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};w2.CompositePropagator=G5});var TEe=Q(ob=>{"use strict";m();Object.defineProperty(ob,"__esModule",{value:!0});ob.validateValue=ob.validateKey=void 0;var j5="[_0-9a-z-*/]",fit=`[a-z]${j5}{0,255}`,Ait=`[a-z0-9]${j5}{0,240}@[a-z]${j5}{0,13}`,mit=new RegExp(`^(?:${fit}|${Ait})$`),git=/^[ -~]{0,255}[!-~]$/,hit=/,|=/;function _it(e){return mit.test(e)}ob.validateKey=_it;function Eit(e){return git.test(e)&&!hit.test(e)}ob.validateValue=Eit});var z5=Q(k2=>{"use strict";m();Object.defineProperty(k2,"__esModule",{value:!0});k2.TraceState=void 0;var IEe=TEe(),CEe=32,Sit=512,bEe=",",vEe="=",H5=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+vEe+this.get(n)),t),[]).join(bEe)}_parse(t){t.length>Sit||(this._internalState=t.split(bEe).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(vEe);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,IEe.validateKey)(a)&&(0,IEe.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>CEe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,CEe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};k2.TraceState=H5});var xEe=Q(eu=>{"use strict";m();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var P2=(je(),Me(We)),yit=uB(),Tit=z5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Iit="00",Cit="(?!ff)[\\da-f]{2}",bit="(?![0]{32})[\\da-f]{32}",vit="(?![0]{16})[\\da-f]{16}",Rit="[\\da-f]{2}",xit=new RegExp(`^\\s?(${Cit})-(${bit})-(${vit})-(${Rit})(-.*)?\\s?$`);function REe(e){let t=xit.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=REe;var $5=class{inject(t,n,r){let o=P2.trace.getSpanContext(t);if(!o||(0,yit.isTracingSuppressed)(t)||!(0,P2.isSpanContextValid)(o))return;let i=`${Iit}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||P2.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=REe(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new Tit.TraceState(typeof d=="string"?d:void 0)}return P2.trace.setSpanContext(t,a)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=$5});var DEe=Q(Zp=>{"use strict";m();Object.defineProperty(Zp,"__esModule",{value:!0});Zp.getRPCMetadata=Zp.deleteRPCMetadata=Zp.setRPCMetadata=Zp.RPCType=void 0;var Dit=(je(),Me(We)),V5=(0,Dit.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Bit;(function(e){e.HTTP="http"})(Bit=Zp.RPCType||(Zp.RPCType={}));function Nit(e,t){return e.setValue(V5,t)}Zp.setRPCMetadata=Nit;function Oit(e){return e.deleteValue(V5)}Zp.deleteRPCMetadata=Oit;function wit(e){return e.getValue(V5)}Zp.getRPCMetadata=wit});var kEe=Q(M2=>{"use strict";m();Object.defineProperty(M2,"__esModule",{value:!0});M2.isPlainObject=void 0;var kit="[object Object]",Pit="[object Null]",Mit="[object Undefined]",Lit=Function.prototype,BEe=Lit.toString,Uit=BEe.call(Object),Qit=Object.getPrototypeOf,NEe=Object.prototype,OEe=NEe.hasOwnProperty,US=Symbol?Symbol.toStringTag:void 0,wEe=NEe.toString;function Fit(e){if(!Git(e)||jit(e)!==kit)return!1;let t=Qit(e);if(t===null)return!0;let n=OEe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&BEe.call(n)===Uit}M2.isPlainObject=Fit;function Git(e){return e!=null&&typeof e=="object"}function jit(e){return e==null?e===void 0?Mit:Pit:US&&US in Object(e)?Hit(e):zit(e)}function Hit(e){let t=OEe.call(e,US),n=e[US],r=!1;try{e[US]=void 0,r=!0}catch{}let o=wEe.call(e);return r&&(t?e[US]=n:delete e[US]),o}function zit(e){return wEe.call(e)}});var QEe=Q(Q2=>{"use strict";m();Object.defineProperty(Q2,"__esModule",{value:!0});Q2.merge=void 0;var PEe=kEe(),$it=20;function Vit(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=LEe(t,e.shift(),0,n);return t}Q2.merge=Vit;function q5(e){return U2(e)?e.slice():e}function LEe(e,t,n=0,r){let o;if(!(n>$it)){if(n++,L2(e)||L2(t)||UEe(t))o=q5(t);else if(U2(e)){if(o=e.slice(),U2(t))for(let i=0,a=t.length;i<a;i++)o.push(q5(t[i]));else if(pB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=q5(t[d])}}}else if(pB(e))if(pB(t)){if(!qit(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(L2(g))typeof g>"u"?delete o[d]:o[d]=g;else{let h=o[d],S=g;if(MEe(e,d,r)||MEe(t,d,r))delete o[d];else{if(pB(h)&&pB(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]=LEe(o[d],g,n,r)}}}}else o=t;return o}}function MEe(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 U2(e){return Array.isArray(e)}function UEe(e){return typeof e=="function"}function pB(e){return!L2(e)&&!U2(e)&&!UEe(e)&&typeof e=="object"}function L2(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function qit(e,t){return!(!(0,PEe.isPlainObject)(e)||!(0,PEe.isPlainObject)(t))}});var FEe=Q(ib=>{"use strict";m();Object.defineProperty(ib,"__esModule",{value:!0});ib.callWithTimeout=ib.TimeoutError=void 0;var F2=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};ib.TimeoutError=F2;function Yit(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new F2("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}ib.callWithTimeout=Yit});var jEe=Q(ab=>{"use strict";m();Object.defineProperty(ab,"__esModule",{value:!0});ab.isUrlIgnored=ab.urlMatches=void 0;function GEe(e,t){return typeof t=="string"?e===t:!!e.match(t)}ab.urlMatches=GEe;function Kit(e,t){if(!t)return!1;for(let n of t)if(GEe(e,n))return!0;return!1}ab.isUrlIgnored=Kit});var HEe=Q(G2=>{"use strict";m();Object.defineProperty(G2,"__esModule",{value:!0});G2.Deferred=void 0;var Y5=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)}};G2.Deferred=Y5});var zEe=Q(j2=>{"use strict";m();Object.defineProperty(j2,"__esModule",{value:!0});j2.BindOnceFuture=void 0;var Jit=HEe(),K5=class{_isCalled=!1;_deferred=new Jit.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}};j2.BindOnceFuture=K5});var VEe=Q(H2=>{"use strict";m();Object.defineProperty(H2,"__esModule",{value:!0});H2.diagLogLevelFromString=void 0;var cg=(je(),Me(We)),$Ee={ALL:cg.DiagLogLevel.ALL,VERBOSE:cg.DiagLogLevel.VERBOSE,DEBUG:cg.DiagLogLevel.DEBUG,INFO:cg.DiagLogLevel.INFO,WARN:cg.DiagLogLevel.WARN,ERROR:cg.DiagLogLevel.ERROR,NONE:cg.DiagLogLevel.NONE};function Zit(e){if(e==null)return;let t=$Ee[e.toUpperCase()];return t??(cg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys($Ee)}, using default`),cg.DiagLogLevel.INFO)}H2.diagLogLevelFromString=Zit});var YEe=Q(z2=>{"use strict";m();Object.defineProperty(z2,"__esModule",{value:!0});z2._export=void 0;var qEe=(je(),Me(We)),Wit=uB();function Xit(e,t){return new Promise(n=>{qEe.context.with((0,Wit.suppressTracing)(qEe.context.active()),()=>{e.export(t,n)})})}z2._export=Xit});var Tr=Q(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});we.internal=we.diagLogLevelFromString=we.BindOnceFuture=we.urlMatches=we.isUrlIgnored=we.callWithTimeout=we.TimeoutError=we.merge=we.TraceState=we.unsuppressTracing=we.suppressTracing=we.isTracingSuppressed=we.setRPCMetadata=we.getRPCMetadata=we.deleteRPCMetadata=we.RPCType=we.parseTraceParent=we.W3CTraceContextPropagator=we.TRACE_STATE_HEADER=we.TRACE_PARENT_HEADER=we.CompositePropagator=we.otperformance=we.getStringListFromEnv=we.getNumberFromEnv=we.getBooleanFromEnv=we.getStringFromEnv=we._globalThis=we.SDK_INFO=we.parseKeyPairsIntoRecord=we.ExportResultCode=we.unrefTimer=we.timeInputToHrTime=we.millisToHrTime=we.isTimeInputHrTime=we.isTimeInput=we.hrTimeToTimeStamp=we.hrTimeToNanoseconds=we.hrTimeToMilliseconds=we.hrTimeToMicroseconds=we.hrTimeDuration=we.hrTime=we.getTimeOrigin=we.addHrTimes=we.loggingErrorHandler=we.setGlobalErrorHandler=we.globalErrorHandler=we.sanitizeAttributes=we.isAttributeValue=we.AnchoredClock=we.W3CBaggagePropagator=void 0;var eat=Bde();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return eat.W3CBaggagePropagator}});var tat=Nde();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return tat.AnchoredClock}});var KEe=Mde();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return KEe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return KEe.sanitizeAttributes}});var JEe=Ude();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return JEe.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return JEe.setGlobalErrorHandler}});var nat=c5();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return nat.loggingErrorHandler}});var Nd=hEe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Nd.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Nd.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Nd.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Nd.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Nd.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Nd.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Nd.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Nd.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Nd.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Nd.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Nd.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Nd.timeInputToHrTime}});var rat=_Ee();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return rat.unrefTimer}});var oat=EEe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return oat.ExportResultCode}});var iat=o5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return iat.parseKeyPairsIntoRecord}});var QS=Q5();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return QS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return QS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return QS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return QS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return QS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return QS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return QS.otperformance}});var aat=yEe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return aat.CompositePropagator}});var $2=xEe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return $2.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return $2.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return $2.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return $2.parseTraceParent}});var V2=DEe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return V2.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return V2.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return V2.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return V2.setRPCMetadata}});var J5=uB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return J5.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return J5.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return J5.unsuppressTracing}});var sat=z5();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return sat.TraceState}});var uat=QEe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return uat.merge}});var ZEe=FEe();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return ZEe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return ZEe.callWithTimeout}});var WEe=jEe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return WEe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return WEe.urlMatches}});var cat=zEe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return cat.BindOnceFuture}});var lat=VEe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return lat.diagLogLevelFromString}});var dat=YEe();we.internal={_export:dat._export}});var XEe=Q(q2=>{"use strict";m();Object.defineProperty(q2,"__esModule",{value:!0});q2.VERSION=void 0;q2.VERSION="0.214.0"});var e0e=Q(fB=>{"use strict";m();Object.defineProperty(fB,"__esModule",{value:!0});fB.SeverityNumber=void 0;var pat;(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"})(pat=fB.SeverityNumber||(fB.SeverityNumber={}))});var K2=Q(sb=>{"use strict";m();Object.defineProperty(sb,"__esModule",{value:!0});sb.NOOP_LOGGER=sb.NoopLogger=void 0;var Y2=class{emit(t){}};sb.NoopLogger=Y2;sb.NOOP_LOGGER=new Y2});var t0e=Q(mA=>{"use strict";m();Object.defineProperty(mA,"__esModule",{value:!0});mA.API_BACKWARDS_COMPATIBILITY_VERSION=mA.makeGetter=mA._global=mA.GLOBAL_LOGS_API_KEY=void 0;mA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");mA._global=globalThis;function fat(e,t,n){return r=>r===e?t:n}mA.makeGetter=fat;mA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Z5=Q(ub=>{"use strict";m();Object.defineProperty(ub,"__esModule",{value:!0});ub.NOOP_LOGGER_PROVIDER=ub.NoopLoggerProvider=void 0;var Aat=K2(),J2=class{getLogger(t,n,r){return new Aat.NoopLogger}};ub.NoopLoggerProvider=J2;ub.NOOP_LOGGER_PROVIDER=new J2});var n0e=Q(Z2=>{"use strict";m();Object.defineProperty(Z2,"__esModule",{value:!0});Z2.ProxyLogger=void 0;var mat=K2(),W5=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):mat.NOOP_LOGGER}};Z2.ProxyLogger=W5});var r0e=Q(W2=>{"use strict";m();Object.defineProperty(W2,"__esModule",{value:!0});W2.ProxyLoggerProvider=void 0;var gat=Z5(),hat=n0e(),X5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new hat.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:gat.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)}};W2.ProxyLoggerProvider=X5});var i0e=Q(X2=>{"use strict";m();Object.defineProperty(X2,"__esModule",{value:!0});X2.LogsAPI=void 0;var Od=t0e(),_at=Z5(),o0e=r0e(),e9=class e{constructor(){this._proxyLoggerProvider=new o0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Od._global[Od.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Od._global[Od.GLOBAL_LOGS_API_KEY]=(0,Od.makeGetter)(Od.API_BACKWARDS_COMPATIBILITY_VERSION,t,_at.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Od._global[Od.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Od._global,Od.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Od._global[Od.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new o0e.ProxyLoggerProvider}};X2.LogsAPI=e9});var t9=Q(gA=>{"use strict";m();Object.defineProperty(gA,"__esModule",{value:!0});gA.logs=gA.NoopLogger=gA.NOOP_LOGGER=gA.SeverityNumber=void 0;var Eat=e0e();Object.defineProperty(gA,"SeverityNumber",{enumerable:!0,get:function(){return Eat.SeverityNumber}});var a0e=K2();Object.defineProperty(gA,"NOOP_LOGGER",{enumerable:!0,get:function(){return a0e.NOOP_LOGGER}});Object.defineProperty(gA,"NoopLogger",{enumerable:!0,get:function(){return a0e.NoopLogger}});var Sat=i0e();gA.logs=Sat.LogsAPI.getInstance()});var s0e=Q(cb=>{"use strict";m();Object.defineProperty(cb,"__esModule",{value:!0});cb.disableInstrumentations=cb.enableInstrumentations=void 0;function yat(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()}}cb.enableInstrumentations=yat;function Tat(e){e.forEach(t=>t.disable())}cb.disableInstrumentations=Tat});var l0e=Q(eL=>{"use strict";m();Object.defineProperty(eL,"__esModule",{value:!0});eL.registerInstrumentations=void 0;var u0e=(je(),Me(We)),Iat=t9(),c0e=s0e();function Cat(e){let t=e.tracerProvider||u0e.trace.getTracerProvider(),n=e.meterProvider||u0e.metrics.getMeterProvider(),r=e.loggerProvider||Iat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,c0e.enableInstrumentations)(o,t,n,r),()=>{(0,c0e.disableInstrumentations)(o)}}eL.registerInstrumentations=Cat});var E0e=Q(tL=>{"use strict";m();Object.defineProperty(tL,"__esModule",{value:!0});tL.satisfies=void 0;var i9=(je(),Me(We)),m0e=/^(?: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-]+)*))?$/,bat=/^(?<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-]+)*))?$/,vat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Rat(e,t,n){if(!xat(e))return i9.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Oat(e);if(!r)return!1;let o=[],i=g0e(r,t,o,n);return i&&!n?.includePrerelease?Bat(r,o):i}tL.satisfies=Rat;function xat(e){return typeof e=="string"&&m0e.test(e)}function g0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(n9(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Xat(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!n9(e,i,n,r))return!1;return!0}return n9(e,t,n,r)}function n9(e,t,n,r){if(t=Nat(t,r),t.includes(" "))return g0e(e,t,n,r);{let o=wat(t);return n.push(o),Dat(e,o)}}function Dat(e,t){if(t.invalid)return!1;if(!t.version||o9(t.version))return!0;let n=p0e(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=p0e(r,o)}return vat[t.op]?.includes(n)}function Bat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Nat(e,t){return e=e.trim(),e=Zat(e,t),e=Jat(e),e=Wat(e,t),e=e.trim(),e}function Pu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Oat(e){let t=e.match(m0e);if(!t){i9.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 wat(e){if(!e)return{};let t=e.match(bat);if(!t)return i9.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 o9(e){return e==="*"||e==="x"||e==="X"}function d0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function kat(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 Pat(e,t){if(o9(e)||o9(t))return 0;let[n,r]=kat(d0e(e),d0e(t));return n>r?1:n<r?-1:0}function p0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Pat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var h0e="[a-zA-Z0-9-]",_0e="0|[1-9]\\d*",Mat=`\\d*[a-zA-Z-]${h0e}*`,Lat="((?:<|>)?=?)",f0e=`(?:${_0e}|${Mat})`,Uat=`(?:-(${f0e}(?:\\.${f0e})*))`,A0e=`${h0e}+`,Qat=`(?:\\+(${A0e}(?:\\.${A0e})*))`,r9=`${_0e}|x|X|\\*`,AB=`[v=\\s]*(${r9})(?:\\.(${r9})(?:\\.(${r9})(?:${Uat})?${Qat}?)?)?`,Fat=`^${Lat}\\s*${AB}$`,Gat=new RegExp(Fat),jat=`^\\s*(${AB})\\s+-\\s+(${AB})\\s*$`,Hat=new RegExp(jat),zat="(?:~>?)",$at=`^${zat}${AB}$`,Vat=new RegExp($at),qat="(?:\\^)",Yat=`^${qat}${AB}$`,Kat=new RegExp(Yat);function Jat(e){let t=Vat;return e.replace(t,(n,r,o,i,a)=>{let c;return Pu(r)?c="":Pu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Pu(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 Zat(e,t){let n=Kat,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Pu(i)?g="":Pu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Pu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function Wat(e,t){let n=Gat;return e.replace(n,(r,o,i,a,c,d)=>{let g=Pu(i),h=g||Pu(a),S=h||Pu(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 Xat(e,t){let n=Hat;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Pu(i)?o="":Pu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Pu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Pu(S)?h="":Pu(y)?h=`<${+S+1}.0.0-0`:Pu(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 a9=Q(Is=>{"use strict";m();Object.defineProperty(Is,"__esModule",{value:!0});Is.massUnwrap=Is.unwrap=Is.massWrap=Is.wrap=void 0;var Mu=console.error.bind(console);function mB(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 est=(e,t,n)=>{if(!e||!e[t]){Mu("no original function "+String(t)+" to wrap");return}if(!n){Mu("no wrapper function"),Mu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Mu("original object and wrapper must be functions");return}let o=n(r,t);return mB(o,"__original",r),mB(o,"__unwrap",()=>{e[t]===o&&mB(e,t,r)}),mB(o,"__wrapped",!0),mB(e,t,o),o};Is.wrap=est;var tst=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Mu("must provide one or more modules to patch"),Mu(new Error().stack);return}if(!(t&&Array.isArray(t))){Mu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Is.wrap)(r,o,n)})})};Is.massWrap=tst;var nst=(e,t)=>{if(!e||!e[t]){Mu("no function to unwrap."),Mu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Mu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Is.unwrap=nst;var rst=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Mu("must provide one or more modules to patch"),Mu(new Error().stack);return}if(!(t&&Array.isArray(t))){Mu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Is.unwrap)(n,r)})})};Is.massUnwrap=rst;function gB(e){e&&e.logger&&(typeof e.logger!="function"?Mu("new logger isn't a function, not replacing"):Mu=e.logger)}Is.default=gB;gB.wrap=Is.wrap;gB.massWrap=Is.massWrap;gB.unwrap=Is.unwrap;gB.massUnwrap=Is.massUnwrap});var S0e=Q(rL=>{"use strict";m();Object.defineProperty(rL,"__esModule",{value:!0});rL.InstrumentationAbstract=void 0;var s9=(je(),Me(We)),ost=t9(),nL=a9(),u9=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=s9.diag.createComponentLogger({namespace:t}),this._tracer=s9.trace.getTracer(t,n),this._meter=s9.metrics.getMeter(t,n),this._logger=ost.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=nL.wrap;_unwrap=nL.unwrap;_massWrap=nL.massWrap;_massUnwrap=nL.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)}}};rL.InstrumentationAbstract=u9});var T0e=Q((AYt,y0e)=>{m();var lb=1e3,db=lb*60,pb=db*60,FS=pb*24,ist=FS*7,ast=FS*365.25;y0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return sst(e);if(n==="number"&&isFinite(e))return t.long?cst(e):ust(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function sst(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*ast;case"weeks":case"week":case"w":return n*ist;case"days":case"day":case"d":return n*FS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*pb;case"minutes":case"minute":case"mins":case"min":case"m":return n*db;case"seconds":case"second":case"secs":case"sec":case"s":return n*lb;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function ust(e){var t=Math.abs(e);return t>=FS?Math.round(e/FS)+"d":t>=pb?Math.round(e/pb)+"h":t>=db?Math.round(e/db)+"m":t>=lb?Math.round(e/lb)+"s":e+"ms"}function cst(e){var t=Math.abs(e);return t>=FS?oL(e,t,FS,"day"):t>=pb?oL(e,t,pb,"hour"):t>=db?oL(e,t,db,"minute"):t>=lb?oL(e,t,lb,"second"):e+" ms"}function oL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var c9=Q((gYt,I0e)=>{m();function lst(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=T0e(),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(...O){if(!x.enabled)return;let k=x,F=Number(new Date),j=F-(S||F);k.diff=j,k.prev=S,k.curr=F,S=F,O[0]=n.coerce(O[0]),typeof O[0]!="string"&&O.unshift("%O");let G=0;O[0]=O[0].replace(/%([a-zA-Z%])/g,(oe,ge)=>{if(oe==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let be=O[G];oe=Ce.call(k,be),O.splice(G,1),G--}return oe}),n.formatArgs.call(k,O),(k.log||n.log).apply(k,O)}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:O=>{y=O}}),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}I0e.exports=lst});var C0e=Q((Nc,iL)=>{m();Nc.formatArgs=pst;Nc.save=fst;Nc.load=Ast;Nc.useColors=dst;Nc.storage=mst();Nc.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`."))}})();Nc.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 dst(){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 pst(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+iL.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)}Nc.log=console.debug||console.log||(()=>{});function fst(e){try{e?Nc.storage.setItem("debug",e):Nc.storage.removeItem("debug")}catch{}}function Ast(){let e;try{e=Nc.storage.getItem("debug")||Nc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function mst(){try{return localStorage}catch{}}iL.exports=c9()(Nc);var{formatters:gst}=iL.exports;gst.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var v0e=Q((EYt,b0e)=>{"use strict";m();b0e.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 D0e=Q((yYt,x0e)=>{"use strict";m();var hst=Ge("os"),R0e=Ge("tty"),wd=v0e(),{env:qa}=process,a_;wd("no-color")||wd("no-colors")||wd("color=false")||wd("color=never")?a_=0:(wd("color")||wd("colors")||wd("color=true")||wd("color=always"))&&(a_=1);"FORCE_COLOR"in qa&&(qa.FORCE_COLOR==="true"?a_=1:qa.FORCE_COLOR==="false"?a_=0:a_=qa.FORCE_COLOR.length===0?1:Math.min(parseInt(qa.FORCE_COLOR,10),3));function l9(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function d9(e,t){if(a_===0)return 0;if(wd("color=16m")||wd("color=full")||wd("color=truecolor"))return 3;if(wd("color=256"))return 2;if(e&&!t&&a_===void 0)return 0;let n=a_||0;if(qa.TERM==="dumb")return n;if(process.platform==="win32"){let r=hst.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in qa)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in qa)||qa.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in qa)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(qa.TEAMCITY_VERSION)?1:0;if(qa.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in qa){let r=parseInt((qa.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(qa.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(qa.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(qa.TERM)||"COLORTERM"in qa?1:n}function _st(e){let t=d9(e,e&&e.isTTY);return l9(t)}x0e.exports={supportsColor:_st,stdout:l9(d9(!0,R0e.isatty(1))),stderr:l9(d9(!0,R0e.isatty(2)))}});var N0e=Q((Ya,sL)=>{m();var Est=Ge("tty"),aL=Ge("util");Ya.init=vst;Ya.log=Ist;Ya.formatArgs=yst;Ya.save=Cst;Ya.load=bst;Ya.useColors=Sst;Ya.destroy=aL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ya.colors=[6,2,3,4,5,1];try{let e=D0e();e&&(e.stderr||e).level>=2&&(Ya.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{}Ya.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 Sst(){return"colors"in Ya.inspectOpts?!!Ya.inspectOpts.colors:Est.isatty(process.stderr.fd)}function yst(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+"+sL.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Tst()+t+" "+e[0]}function Tst(){return Ya.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Ist(...e){return process.stderr.write(aL.formatWithOptions(Ya.inspectOpts,...e)+`
6
6
  `)}function Cst(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function bst(){return process.env.DEBUG}function vst(e){e.inspectOpts={};let t=Object.keys(Ya.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ya.inspectOpts[t[n]]}sL.exports=c9()(Ya);var{formatters:B0e}=sL.exports;B0e.o=function(e){return this.inspectOpts.colors=this.useColors,aL.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${_U(e)}`),!0}return!1}function jlt(e,t){return t?.length?fU(e).some(n=>g_(
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,ON.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),oe=>oe&&this._diag.error("caught ignoreRequestHook error: ",oe),!0))return;let i=(0,sF.hrTime)(),a;try{a=new Vht.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={[Xi.ATTR_HTTP_REQUEST_METHOD]:d,[Xi.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Xi.ATTR_URL_FULL]:a.toString(),[Xi.ATTR_URL_PATH]:a.pathname,[Xi.ATTR_URL_QUERY]:a.search,[Xi.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},S=a.hostname,y=a.port||h[c];g[Xi.ATTR_SERVER_ADDRESS]=S,y&&!isNaN(Number(y))&&(g[Xi.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[Xi.ATTR_USER_AGENT_ORIGINAL]=oe}let x=(0,ON.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 O=Ll.context.active(),k=Ll.trace.getSpan(O),F;n.requireParentforSpans&&(!k||!Ll.trace.isSpanContextValid(k.spanContext()))?F=Ll.trace.wrapSpanContext(Ll.INVALID_SPAN_CONTEXT):F=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:Ll.SpanKind.CLIENT,attributes:g},O),(0,ON.safeExecuteInTheMiddle)(()=>n.requestHook?.(F,t),oe=>oe&&this._diag.error("caught requestHook error: ",oe),!0);let j=Ll.trace.setSpan(Ll.context.active(),F),G={};Ll.propagation.inject(j,G);let q=Object.entries(G);for(let oe=0;oe<q.length;oe++){let[ge,Ce]=q[oe];typeof t.addHeader=="function"?t.addHeader(ge,Ce):typeof t.headers=="string"?t.headers+=`${ge}: ${Ce}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ge,Ce)}this._recordFromReq.set(t,{span:F,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={[Xi.ATTR_NETWORK_PEER_ADDRESS]:a,[Xi.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={[Xi.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,ON.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?Ll.SpanStatusCode.ERROR:Ll.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:Ll.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[Xi.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Xi.ATTR_HTTP_RESPONSE_STATUS_CODE,Xi.ATTR_HTTP_REQUEST_METHOD,Xi.ATTR_SERVER_ADDRESS,Xi.ATTR_SERVER_PORT,Xi.ATTR_URL_SCHEME,Xi.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,sF.hrTimeToMilliseconds)((0,sF.hrTimeDuration)(n,(0,sF.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"}};uF.UndiciInstrumentation=$Y});var wxe=Q(cF=>{"use strict";m();Object.defineProperty(cF,"__esModule",{value:!0});cF.UndiciInstrumentation=void 0;var qht=Oxe();Object.defineProperty(cF,"UndiciInstrumentation",{enumerable:!0,get:function(){return qht.UndiciInstrumentation}})});function kxe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function Zht(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Bi(t)}function Wht(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=kxe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=kxe(n.origin,n.path);if(r.startsWith("data:")){let o=zb(r);return{[kt]:"auto.http.otel.node_fetch","http.url":o,[y_]:o,[Ld]:`${n.method||"GET"} ${o}`}}return{[kt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var Pxe,Mxe,Yht,Kht,Jht,Lxe,Uxe=N(()=>{m();Pxe=ie(wxe(),1);dt();mr();Mxe="NodeFetch",Yht=st(Mxe,Pxe.UndiciInstrumentation,e=>Wht(e)),Kht=st(`${Mxe}.sentry`,cy,e=>e),Jht=(e={})=>({name:"NodeFetch",setupOnce(){Zht(e,gt()?.getOptions())&&Yht(e),Kht(e)}}),Lxe=Jht});var lF=Q(wN=>{"use strict";m();Object.defineProperty(wN,"__esModule",{value:!0});wN.ExpressLayerType=void 0;var Xht;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Xht=wN.ExpressLayerType||(wN.ExpressLayerType={}))});var dF=Q(kN=>{"use strict";m();Object.defineProperty(kN,"__esModule",{value:!0});kN.AttributeNames=void 0;var e_t;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(e_t=kN.AttributeNames||(kN.AttributeNames={}))});var VY=Q(yv=>{"use strict";m();Object.defineProperty(yv,"__esModule",{value:!0});yv._LAYERS_STORE_PROPERTY=yv.kLayerPatched=void 0;yv.kLayerPatched=Symbol("express-layer-patched");yv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Gxe=Q(ea=>{"use strict";m();Object.defineProperty(ea,"__esModule",{value:!0});ea.getActualMatchedRoute=ea.getConstructedRoute=ea.getLayerPath=ea.asErrorAndMessage=ea.isLayerIgnored=ea.getLayerMetadata=ea.getRouterPath=ea.storeLayerPath=void 0;var qY=lF(),Tv=dF(),my=VY(),t_t=(e,t)=>(Array.isArray(e[my._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,my._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[my._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));ea.storeLayerPath=t_t;var n_t=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,ea.getRouterPath)(e,n):e};ea.getRouterPath=n_t;var r_t=(e,t,n)=>{if(t.name==="router"){let r=(0,ea.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[Tv.AttributeNames.EXPRESS_NAME]:o,[Tv.AttributeNames.EXPRESS_TYPE]:qY.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[Tv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[Tv.AttributeNames.EXPRESS_TYPE]:qY.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[Tv.AttributeNames.EXPRESS_NAME]:t.name,[Tv.AttributeNames.EXPRESS_TYPE]:qY.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};ea.getLayerMetadata=r_t;var o_t=(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")},i_t=(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(o_t(e,r))return!0}catch{}return!1};ea.isLayerIgnored=i_t;var a_t=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];ea.asErrorAndMessage=a_t;var s_t=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>Qxe(n)||"").join(","):Qxe(t)};ea.getLayerPath=s_t;var Qxe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Fxe(e){let n=(Array.isArray(e[my._LAYERS_STORE_PROPERTY])?e[my._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}ea.getConstructedRoute=Fxe;function u_t(e){let t=Array.isArray(e[my._LAYERS_STORE_PROPERTY])?e[my._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Fxe(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)||c_t(r))?r:void 0}ea.getActualMatchedRoute=u_t;function c_t(e){return e.includes(":")||e.includes("*")}});var jxe=Q(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-express"});var qxe=Q(fF=>{"use strict";m();Object.defineProperty(fF,"__esModule",{value:!0});fF.ExpressInstrumentation=void 0;var Hxe=Tr(),Uc=(je(),Me(We)),zxe=lF(),$xe=dF(),MA=Gxe(),Vxe=jxe(),Cv=on(),l_t=(Zn(),Me(Ur)),pF=VY(),YY=class extends Cv.InstrumentationBase{constructor(t={}){super(Vxe.PACKAGE_NAME,Vxe.PACKAGE_VERSION,t)}init(){return[new Cv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,Cv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,Cv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,Cv.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,MA.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,MA.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,MA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[pF.kLayerPatched]!==!0&&(t[pF.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,MA.storeLayerPath)(a,n),g=(0,MA.getConstructedRoute)(a),h=(0,MA.getActualMatchedRoute)(a),S={[l_t.ATTR_HTTP_ROUTE]:h},y=(0,MA.getLayerMetadata)(g,t,n),C=y.attributes[$xe.AttributeNames.EXPRESS_TYPE],v=(0,Hxe.getRPCMetadata)(Uc.context.active());if(v?.type===Hxe.RPCType.HTTP&&(v.route=h),(0,MA.isLayerIgnored)(y.name,C,r.getConfig()))return C===zxe.ExpressLayerType.MIDDLEWARE&&a[pF._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Uc.trace.getSpan(Uc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:a,layerType:C,route:g},y.name),O=r.tracer.startSpan(x,{attributes:Object.assign(S,y.attributes)}),k=Uc.context.active(),F=Uc.trace.setSpan(k,O),{requestHook:j}=r.getConfig();j&&(0,Cv.safeExecuteInTheMiddle)(()=>j(O,{request:a,layerType:C,route:g}),Ce=>{Ce&&Uc.diag.error("express instrumentation: request hook failed",Ce)},!0);let G=!1;y.attributes[$xe.AttributeNames.EXPRESS_TYPE]===zxe.ExpressLayerType.ROUTER&&(O.end(),G=!0,F=k);let q=()=>{G===!1&&(G=!0,O.end())},oe=Array.from(arguments),ge=oe.findIndex(Ce=>typeof Ce=="function");ge>=0&&(arguments[ge]=function(){let Ce=arguments[0],be=![void 0,null,"route","router"].includes(Ce);if(!G&&be){let[pn,De]=(0,MA.asErrorAndMessage)(Ce);O.recordException(pn),O.setStatus({code:Uc.SpanStatusCode.ERROR,message:De})}G===!1&&(G=!0,a.res?.removeListener("finish",q),O.end()),!(a.route&&be)&&d&&a[pF._LAYERS_STORE_PROPERTY].pop();let Xe=oe[ge],wt=Uc.context.active(),nt=Uc.trace.getSpan(k),Vt=nt?Uc.trace.setSpan(wt,nt):wt;return Uc.context.bind(Vt,Xe).apply(this,arguments)});try{return Uc.context.bind(F,o).apply(this,arguments)}catch(Ce){let[be,Xe]=(0,MA.asErrorAndMessage)(Ce);throw O.recordException(be),O.setStatus({code:Uc.SpanStatusCode.ERROR,message:Xe}),Ce}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 Uc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};fF.ExpressInstrumentation=YY});var Yxe=Q(H_=>{"use strict";m();Object.defineProperty(H_,"__esModule",{value:!0});H_.AttributeNames=H_.ExpressLayerType=H_.ExpressInstrumentation=void 0;var d_t=qxe();Object.defineProperty(H_,"ExpressInstrumentation",{enumerable:!0,get:function(){return d_t.ExpressInstrumentation}});var p_t=lF();Object.defineProperty(H_,"ExpressLayerType",{enumerable:!0,get:function(){return p_t.ExpressLayerType}});var f_t=dF();Object.defineProperty(H_,"AttributeNames",{enumerable:!0,get:function(){return f_t.AttributeNames}})});var Ia,gy=N(()=>{m();Ia=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function A_t(e){Qr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function m_t(e,t){if(bn()===Md())return Ia&&J.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";bn().setTransactionName(`${r} ${e.route}`)}return t}var Kxe,Jxe,Zxe,g_t,Wxe,Xxe=N(()=>{m();Kxe=ie(Yxe(),1);dt();mr();gy();Jxe="Express";Zxe=st(Jxe,()=>new Kxe.ExpressInstrumentation({requestHook:e=>A_t(e),spanNameHook:(e,t)=>m_t(e,t)})),g_t=()=>({name:Jxe,setupOnce(){Zxe()}}),Wxe=g_t});var eDe=Q(PN=>{"use strict";m();Object.defineProperty(PN,"__esModule",{value:!0});PN.SeverityNumber=void 0;var h_t;(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"})(h_t=PN.SeverityNumber||(PN.SeverityNumber={}))});var gF=Q(bv=>{"use strict";m();Object.defineProperty(bv,"__esModule",{value:!0});bv.NOOP_LOGGER=bv.NoopLogger=void 0;var mF=class{emit(t){}};bv.NoopLogger=mF;bv.NOOP_LOGGER=new mF});var tDe=Q(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 __t(e,t,n){return r=>r===e?t:n}LA.makeGetter=__t;LA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var KY=Q(vv=>{"use strict";m();Object.defineProperty(vv,"__esModule",{value:!0});vv.NOOP_LOGGER_PROVIDER=vv.NoopLoggerProvider=void 0;var E_t=gF(),hF=class{getLogger(t,n,r){return new E_t.NoopLogger}};vv.NoopLoggerProvider=hF;vv.NOOP_LOGGER_PROVIDER=new hF});var nDe=Q(_F=>{"use strict";m();Object.defineProperty(_F,"__esModule",{value:!0});_F.ProxyLogger=void 0;var S_t=gF(),JY=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):S_t.NOOP_LOGGER}};_F.ProxyLogger=JY});var rDe=Q(EF=>{"use strict";m();Object.defineProperty(EF,"__esModule",{value:!0});EF.ProxyLoggerProvider=void 0;var y_t=KY(),T_t=nDe(),ZY=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new T_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:y_t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};EF.ProxyLoggerProvider=ZY});var iDe=Q(SF=>{"use strict";m();Object.defineProperty(SF,"__esModule",{value:!0});SF.LogsAPI=void 0;var Hd=tDe(),I_t=KY(),oDe=rDe(),WY=class e{constructor(){this._proxyLoggerProvider=new oDe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Hd._global[Hd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Hd._global[Hd.GLOBAL_LOGS_API_KEY]=(0,Hd.makeGetter)(Hd.API_BACKWARDS_COMPATIBILITY_VERSION,t,I_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Hd._global[Hd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Hd._global,Hd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Hd._global[Hd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new oDe.ProxyLoggerProvider}};SF.LogsAPI=WY});var XY=Q(UA=>{"use strict";m();Object.defineProperty(UA,"__esModule",{value:!0});UA.logs=UA.NoopLogger=UA.NOOP_LOGGER=UA.SeverityNumber=void 0;var C_t=eDe();Object.defineProperty(UA,"SeverityNumber",{enumerable:!0,get:function(){return C_t.SeverityNumber}});var aDe=gF();Object.defineProperty(UA,"NOOP_LOGGER",{enumerable:!0,get:function(){return aDe.NOOP_LOGGER}});Object.defineProperty(UA,"NoopLogger",{enumerable:!0,get:function(){return aDe.NoopLogger}});var b_t=iDe();UA.logs=b_t.LogsAPI.getInstance()});var sDe=Q(Rv=>{"use strict";m();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.disableInstrumentations=Rv.enableInstrumentations=void 0;function v_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Rv.enableInstrumentations=v_t;function R_t(e){e.forEach(t=>t.disable())}Rv.disableInstrumentations=R_t});var lDe=Q(yF=>{"use strict";m();Object.defineProperty(yF,"__esModule",{value:!0});yF.registerInstrumentations=void 0;var uDe=(je(),Me(We)),x_t=XY(),cDe=sDe();function D_t(e){let t=e.tracerProvider||uDe.trace.getTracerProvider(),n=e.meterProvider||uDe.metrics.getMeterProvider(),r=e.loggerProvider||x_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,cDe.enableInstrumentations)(o,t,n,r),()=>{(0,cDe.disableInstrumentations)(o)}}yF.registerInstrumentations=D_t});var EDe=Q(TF=>{"use strict";m();Object.defineProperty(TF,"__esModule",{value:!0});TF.satisfies=void 0;var rK=(je(),Me(We)),mDe=/^(?: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-]+)*))?$/,B_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-]+)*))?$/,N_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function O_t(e,t,n){if(!w_t(e))return rK.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=L_t(e);if(!r)return!1;let o=[],i=gDe(r,t,o,n);return i&&!n?.includePrerelease?P_t(r,o):i}TF.satisfies=O_t;function w_t(e){return typeof e=="string"&&mDe.test(e)}function gDe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(eK(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=oEt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!eK(e,i,n,r))return!1;return!0}return eK(e,t,n,r)}function eK(e,t,n,r){if(t=M_t(t,r),t.includes(" "))return gDe(e,t,n,r);{let o=U_t(t);return n.push(o),k_t(e,o)}}function k_t(e,t){if(t.invalid)return!1;if(!t.version||nK(t.version))return!0;let n=pDe(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=pDe(r,o)}return N_t[t.op]?.includes(n)}function P_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function M_t(e,t){return e=e.trim(),e=nEt(e,t),e=tEt(e),e=rEt(e,t),e=e.trim(),e}function Hu(e){return!e||e.toLowerCase()==="x"||e==="*"}function L_t(e){let t=e.match(mDe);if(!t){rK.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(B_t);if(!t)return rK.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 nK(e){return e==="*"||e==="x"||e==="X"}function dDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Q_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 F_t(e,t){if(nK(e)||nK(t))return 0;let[n,r]=Q_t(dDe(e),dDe(t));return n>r?1:n<r?-1:0}function pDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=F_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var hDe="[a-zA-Z0-9-]",_De="0|[1-9]\\d*",G_t=`\\d*[a-zA-Z-]${hDe}*`,j_t="((?:<|>)?=?)",fDe=`(?:${_De}|${G_t})`,H_t=`(?:-(${fDe}(?:\\.${fDe})*))`,ADe=`${hDe}+`,z_t=`(?:\\+(${ADe}(?:\\.${ADe})*))`,tK=`${_De}|x|X|\\*`,MN=`[v=\\s]*(${tK})(?:\\.(${tK})(?:\\.(${tK})(?:${H_t})?${z_t}?)?)?`,$_t=`^${j_t}\\s*${MN}$`,V_t=new RegExp($_t),q_t=`^\\s*(${MN})\\s+-\\s+(${MN})\\s*$`,Y_t=new RegExp(q_t),K_t="(?:~>?)",J_t=`^${K_t}${MN}$`,Z_t=new RegExp(J_t),W_t="(?:\\^)",X_t=`^${W_t}${MN}$`,eEt=new RegExp(X_t);function tEt(e){let t=Z_t;return e.replace(t,(n,r,o,i,a)=>{let c;return Hu(r)?c="":Hu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Hu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function nEt(e,t){let n=eEt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Hu(i)?g="":Hu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Hu(c)?i==="0"?g=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?g=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?g=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:g=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:g=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,g})}function rEt(e,t){let n=V_t;return e.replace(n,(r,o,i,a,c,d)=>{let g=Hu(i),h=g||Hu(a),S=h||Hu(c),y=S;return o==="="&&y&&(o=""),d=t?.includePrerelease?"-0":"",g?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&y?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:S&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function oEt(e,t){let n=Y_t;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Hu(i)?o="":Hu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Hu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Hu(S)?h="":Hu(y)?h=`<${+S+1}.0.0-0`:Hu(C)?h=`<${S}.${+y+1}.0-0`:v?h=`<=${S}.${y}.${C}-${v}`:t?.includePrerelease?h=`<${S}.${y}.${+C+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var oK=Q(Ns=>{"use strict";m();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.massUnwrap=Ns.unwrap=Ns.massWrap=Ns.wrap=void 0;var zu=console.error.bind(console);function LN(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 iEt=(e,t,n)=>{if(!e||!e[t]){zu("no original function "+String(t)+" to wrap");return}if(!n){zu("no wrapper function"),zu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){zu("original object and wrapper must be functions");return}let o=n(r,t);return LN(o,"__original",r),LN(o,"__unwrap",()=>{e[t]===o&&LN(e,t,r)}),LN(o,"__wrapped",!0),LN(e,t,o),o};Ns.wrap=iEt;var aEt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{zu("must provide one or more modules to patch"),zu(new Error().stack);return}if(!(t&&Array.isArray(t))){zu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ns.wrap)(r,o,n)})})};Ns.massWrap=aEt;var sEt=(e,t)=>{if(!e||!e[t]){zu("no function to unwrap."),zu(new Error().stack);return}let n=e[t];if(!n.__unwrap)zu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ns.unwrap=sEt;var uEt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{zu("must provide one or more modules to patch"),zu(new Error().stack);return}if(!(t&&Array.isArray(t))){zu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ns.unwrap)(n,r)})})};Ns.massUnwrap=uEt;function UN(e){e&&e.logger&&(typeof e.logger!="function"?zu("new logger isn't a function, not replacing"):zu=e.logger)}Ns.default=UN;UN.wrap=Ns.wrap;UN.massWrap=Ns.massWrap;UN.unwrap=Ns.unwrap;UN.massUnwrap=Ns.massUnwrap});var SDe=Q(CF=>{"use strict";m();Object.defineProperty(CF,"__esModule",{value:!0});CF.InstrumentationAbstract=void 0;var iK=(je(),Me(We)),cEt=XY(),IF=oK(),aK=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=iK.diag.createComponentLogger({namespace:t}),this._tracer=iK.trace.getTracer(t,n),this._meter=iK.metrics.getMeter(t,n),this._logger=cEt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=IF.wrap;_unwrap=IF.unwrap;_massWrap=IF.massWrap;_massUnwrap=IF.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)}}};CF.InstrumentationAbstract=aK});var yDe=Q(z_=>{"use strict";m();Object.defineProperty(z_,"__esModule",{value:!0});z_.ModuleNameTrie=z_.ModuleNameSeparator=void 0;z_.ModuleNameSeparator="/";var bF=class{hooks=[];children=new Map},sK=class{_trie=new bF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(z_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new bF,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(z_.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))}};z_.ModuleNameTrie=sK});var IDe=Q(vF=>{"use strict";m();Object.defineProperty(vF,"__esModule",{value:!0});vF.RequireInTheMiddleSingleton=void 0;var lEt=GS(),TDe=Ge("path"),uK=yDe(),dEt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),cK=class e{_moduleNameTrie=new uK.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new lEt.Hook(null,{internals:!0},(t,n,r)=>{let o=pEt(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 dEt?new e:this._instance=this._instance??new e}};vF.RequireInTheMiddleSingleton=cK;function pEt(e){return TDe.sep!==uK.ModuleNameSeparator?e.split(TDe.sep).join(uK.ModuleNameSeparator):e}});var xDe=Q(QN=>{m();var CDe=[],lK=new WeakMap,bDe=new WeakMap,vDe=new Map,RDe=[],fEt={set(e,t,n){let r=lK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=bDe.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=lK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function AEt(e,t,n,r,o){vDe.set(e,o),lK.set(t,n),bDe.set(t,r);let i=new Proxy(t,fEt);CDe.forEach(a=>a(e,i,o)),RDe.push([e,i,o])}QN.register=AEt;QN.importHooks=CDe;QN.specifiers=vDe;QN.toHook=RDe});var AK=Q((Ngn,Dv)=>{m();var DDe=Ge("path"),mEt=uL(),{fileURLToPath:gEt}=Ge("url"),{MessageChannel:hEt}=Ge("worker_threads"),{isBuiltin:dK}=Ge("module");dK||(dK=()=>!0);var{importHooks:pK,specifiers:_Et,toHook:EEt}=xDe();function BDe(e){pK.push(e),EEt.forEach(([t,n,r])=>e(t,n,r))}function NDe(e){let t=pK.indexOf(e);t>-1&&pK.splice(t,1)}function xv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var fK;function SEt(){let{port1:e,port2:t}=new hEt,n=0,r;fK=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 FN(e,t,n){if(!(this instanceof FN))return new FN(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;fK&&Array.isArray(e)&&fK(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),g,h;if(d){let S=o.slice(5);dK(S)&&(o=S)}else if(c.startsWith("file://")){let S=Error.stackTraceLimit;Error.stackTraceLimit=0;try{g=gEt(o),o=g}catch{}if(Error.stackTraceLimit=S,g){let y=mEt(g);y&&(o=y.name,h=y.basedir)}}if(e)for(let S of e)if(g&&S===g)xv(n,i,g,void 0);else if(S===o){if(!h)xv(n,i,o,h);else if(h.endsWith(_Et.get(c)))xv(n,i,o,h);else if(r){let y=o+DDe.sep+DDe.relative(h,g);xv(n,i,y,h)}}else S===a&&xv(n,i,a,h);else xv(n,i,o,h)},BDe(this._iitmHook)}FN.prototype.unhook=function(){NDe(this._iitmHook)};Dv.exports=FN;Dv.exports.Hook=FN;Dv.exports.addHook=BDe;Dv.exports.removeHook=NDe;Dv.exports.createAddHookMessageChannel=SEt});var mK=Q($_=>{"use strict";m();Object.defineProperty($_,"__esModule",{value:!0});$_.isWrapped=$_.safeExecuteInTheMiddleAsync=$_.safeExecuteInTheMiddle=void 0;function yEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}$_.safeExecuteInTheMiddle=yEt;async function TEt(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}}$_.safeExecuteInTheMiddleAsync=TEt;function IEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}$_.isWrapped=IEt});var kDe=Q(RF=>{"use strict";m();Object.defineProperty(RF,"__esModule",{value:!0});RF.InstrumentationBase=void 0;var GN=Ge("path"),ODe=Ge("util"),CEt=EDe(),gK=oK(),bEt=SDe(),vEt=IDe(),REt=AK(),jN=(je(),Me(We)),xEt=GS(),DEt=Ge("fs"),BEt=mK(),hK=class extends bEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=vEt.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,BEt.isWrapped)(t[n])&&this._unwrap(t,n),ODe.types.isProxy(t)){let o=(0,gK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,gK.wrap)(t,n,r)};_unwrap=(t,n)=>ODe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,gK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{jN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){jN.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{jN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){jN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,DEt.readFileSync)(GN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{jN.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 wDe(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=GN.normalize(r);return a.filter(g=>g.name===c&&wDe(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&&GN.isAbsolute(c)){let g=GN.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=GN.isAbsolute(t.name)?new xEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new REt.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}};RF.InstrumentationBase=hK;function wDe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,CEt.satisfies)(t,r,{includePrerelease:n}))}});var PDe=Q(xF=>{"use strict";m();Object.defineProperty(xF,"__esModule",{value:!0});xF.normalize=void 0;var NEt=Ge("path");Object.defineProperty(xF,"normalize",{enumerable:!0,get:function(){return NEt.normalize}})});var MDe=Q(Bv=>{"use strict";m();Object.defineProperty(Bv,"__esModule",{value:!0});Bv.normalize=Bv.InstrumentationBase=void 0;var OEt=kDe();Object.defineProperty(Bv,"InstrumentationBase",{enumerable:!0,get:function(){return OEt.InstrumentationBase}});var wEt=PDe();Object.defineProperty(Bv,"normalize",{enumerable:!0,get:function(){return wEt.normalize}})});var _K=Q(Nv=>{"use strict";m();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.normalize=Nv.InstrumentationBase=void 0;var LDe=MDe();Object.defineProperty(Nv,"InstrumentationBase",{enumerable:!0,get:function(){return LDe.InstrumentationBase}});Object.defineProperty(Nv,"normalize",{enumerable:!0,get:function(){return LDe.normalize}})});var UDe=Q(DF=>{"use strict";m();Object.defineProperty(DF,"__esModule",{value:!0});DF.InstrumentationNodeModuleDefinition=void 0;var EK=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}};DF.InstrumentationNodeModuleDefinition=EK});var QDe=Q(BF=>{"use strict";m();Object.defineProperty(BF,"__esModule",{value:!0});BF.InstrumentationNodeModuleFile=void 0;var kEt=_K(),SK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,kEt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};BF.InstrumentationNodeModuleFile=SK});var FDe=Q(hy=>{"use strict";m();Object.defineProperty(hy,"__esModule",{value:!0});hy.semconvStabilityFromStr=hy.SemconvStability=void 0;var NF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(NF=hy.SemconvStability||(hy.SemconvStability={}));function PEt(e,t){let n=NF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=NF.DUPLICATE;break}else o.toLowerCase()===e&&(n=NF.STABLE);return n}hy.semconvStabilityFromStr=PEt});var jDe=Q(ta=>{"use strict";m();Object.defineProperty(ta,"__esModule",{value:!0});ta.semconvStabilityFromStr=ta.SemconvStability=ta.safeExecuteInTheMiddleAsync=ta.safeExecuteInTheMiddle=ta.isWrapped=ta.InstrumentationNodeModuleFile=ta.InstrumentationNodeModuleDefinition=ta.InstrumentationBase=ta.registerInstrumentations=void 0;var MEt=lDe();Object.defineProperty(ta,"registerInstrumentations",{enumerable:!0,get:function(){return MEt.registerInstrumentations}});var LEt=_K();Object.defineProperty(ta,"InstrumentationBase",{enumerable:!0,get:function(){return LEt.InstrumentationBase}});var UEt=UDe();Object.defineProperty(ta,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return UEt.InstrumentationNodeModuleDefinition}});var QEt=QDe();Object.defineProperty(ta,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return QEt.InstrumentationNodeModuleFile}});var yK=mK();Object.defineProperty(ta,"isWrapped",{enumerable:!0,get:function(){return yK.isWrapped}});Object.defineProperty(ta,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return yK.safeExecuteInTheMiddle}});Object.defineProperty(ta,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return yK.safeExecuteInTheMiddleAsync}});var GDe=FDe();Object.defineProperty(ta,"SemconvStability",{enumerable:!0,get:function(){return GDe.SemconvStability}});Object.defineProperty(ta,"semconvStabilityFromStr",{enumerable:!0,get:function(){return GDe.semconvStabilityFromStr}})});var HDe=Q((Wgn,FEt)=>{FEt.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 $De=Q(_y=>{"use strict";m();Object.defineProperty(_y,"__esModule",{value:!0});_y.range=_y.balanced=void 0;var GEt=(e,t,n)=>{let r=e instanceof RegExp?zDe(e,n):e,o=t instanceof RegExp?zDe(t,n):t,i=r!==null&&o!=null&&(0,_y.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)}};_y.balanced=GEt;var zDe=(e,t)=>{let n=t.match(e);return n?n[0]:null},jEt=(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};_y.range=jEt});var WDe=Q(Ov=>{"use strict";m();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.EXPANSION_MAX=void 0;Ov.expand=t0t;var VDe=$De(),qDe="\0SLASH"+Math.random()+"\0",YDe="\0OPEN"+Math.random()+"\0",IK="\0CLOSE"+Math.random()+"\0",KDe="\0COMMA"+Math.random()+"\0",JDe="\0PERIOD"+Math.random()+"\0",HEt=new RegExp(qDe,"g"),zEt=new RegExp(YDe,"g"),$Et=new RegExp(IK,"g"),VEt=new RegExp(KDe,"g"),qEt=new RegExp(JDe,"g"),YEt=/\\\\/g,KEt=/\\{/g,JEt=/\\}/g,ZEt=/\\,/g,WEt=/\\\./g;Ov.EXPANSION_MAX=1e5;function TK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function XEt(e){return e.replace(YEt,qDe).replace(KEt,YDe).replace(JEt,IK).replace(ZEt,KDe).replace(WEt,JDe)}function e0t(e){return e.replace(HEt,"\\").replace(zEt,"{").replace($Et,"}").replace(VEt,",").replace(qEt,".")}function ZDe(e){if(!e)return[""];let t=[],n=(0,VDe.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=ZDe(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function t0t(e,t={}){if(!e)return[];let{max:n=Ov.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),HN(XEt(e),n,!0).map(e0t)}function n0t(e){return"{"+e+"}"}function r0t(e){return/^-?0\d/.test(e)}function o0t(e,t){return e<=t}function i0t(e,t){return e>=t}function HN(e,t,n){let r=[],o=(0,VDe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?HN(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+IK+o.post,HN(e,t,!0)):[e];let S;if(g)S=o.body.split(/\.\./);else if(S=ZDe(o.body),S.length===1&&S[0]!==void 0&&(S=HN(S[0],t,!1).map(n0t),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=TK(S[0]),v=TK(S[1]),x=Math.max(S[0].length,S[1].length),O=S.length===3&&S[2]!==void 0?Math.abs(TK(S[2])):1,k=o0t;v<C&&(O*=-1,k=i0t);let j=S.some(r0t);y=[];for(let G=C;k(G,v);G+=O){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,HN(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 XDe=Q(OF=>{"use strict";m();Object.defineProperty(OF,"__esModule",{value:!0});OF.assertValidPattern=void 0;var a0t=1024*64,s0t=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>a0t)throw new TypeError("pattern is too long")};OF.assertValidPattern=s0t});var t1e=Q(wF=>{"use strict";m();Object.defineProperty(wF,"__esModule",{value:!0});wF.parseClass=void 0;var u0t={"[: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]},zN=e=>e.replace(/[[\]\\-]/g,"\\$&"),c0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),e1e=e=>e.join(""),l0t=(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[O,[k,F,j]]of Object.entries(u0t))if(e.startsWith(O,i)){if(S)return["$.",!1,e.length-n,!0];i+=O.length,j?o.push(k):r.push(k),c=c||F;continue e}}if(d=!1,S){x>S?r.push(zN(S)+"-"+zN(x)):x===S&&r.push(zN(x)),S="",i++;continue}if(e.startsWith("-]",i+1)){r.push(zN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){S=x,i+=2;continue}r.push(zN(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[c0t(x),!1,h-n,!1]}let y="["+(g?"^":"")+e1e(r)+"]",C="["+(g?"":"^")+e1e(o)+"]";return[r.length&&o.length?"("+y+"|"+C+")":r.length?y:C,c,h-n,!0]};wF.parseClass=l0t});var PF=Q(kF=>{"use strict";m();Object.defineProperty(kF,"__esModule",{value:!0});kF.unescape=void 0;var d0t=(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");kF.unescape=d0t});var vK=Q(QF=>{"use strict";m();var Qc;Object.defineProperty(QF,"__esModule",{value:!0});QF.AST=void 0;var p0t=t1e(),MF=PF(),f0t=new Set(["!","?","+","*","@"]),CK=e=>f0t.has(e),n1e=e=>CK(e.type),A0t=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),m0t=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),g0t=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),r1e=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),h0t="(?!(?:^|/)\\.\\.?(?:$|/))",LF="(?!\\.)",_0t=new Set(["[","."]),E0t=new Set(["..","."]),S0t=new Set("().*{}+?[]^$\\!"),y0t=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),bK="[^/]",o1e=bK+"*?",i1e=bK+"+?",T0t=0,UF=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++T0t;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 Qc&&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 Qc&&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 Qc(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,O="";for(;x<t.length;){let k=t.charAt(x++);if(c||k==="\\"){c=!c,O+=k;continue}if(d){x===g+1?(k==="^"||k==="!")&&(h=!0):k==="]"&&!(x===g+2&&h)&&(d=!1),O+=k;continue}else if(k==="["){d=!0,g=x,h=!1,O+=k;continue}if(!o.noext&&CK(k)&&t.charAt(x)==="("&&i<=a){n.push(O),O="";let j=new Qc(k,n);x=Qc.#d(t,j,x,o,i+1),n.push(j);continue}O+=k}return n.push(O),x}let S=r+1,y=new Qc(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&&CK(x)&&t.charAt(S)==="("&&(i<=a||n&&n.#p(x))){let k=n&&n.#p(x)?0:1;y.push(v),v="";let F=new Qc(x,y);y.push(F),S=Qc.#d(t,F,S,o,i+k);continue}if(x==="|"){y.push(v),v="",C.push(y),y=new Qc(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,m0t)}#A(t,n=A0t){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=g0t){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Qc(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!!r1e.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=r1e.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 Qc(null,void 0,n);return Qc.#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()),!n1e(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(C=>typeof C!="string"),g=this.#e.map(C=>{let[v,x,O,k]=typeof C=="string"?Qc.#I(C,this.#r,d):C.toRegExpSource(t);return this.#r=this.#r||O,this.#o=this.#o||k,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&E0t.has(this.#e[0]))){let v=_0t,x=n&&v.has(g.charAt(0))||g.startsWith("\\.")&&v.has(g.charAt(2))||g.startsWith("\\.\\.")&&v.has(g.charAt(4)),O=!n&&!t&&v.has(g.charAt(0));h=x?h0t:O?LF:""}let S="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(S="(?:$|\\/)"),[h+g+S,(0,MF.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,MF.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!LF?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?LF:"")+i1e;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?LF:"")+o1e+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,MF.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(n1e(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+=(S0t.has(g)?"\\":"")+g;continue}if(g==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?i1e:o1e,n=!0;continue}else c=!1;if(g==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(g==="["){let[h,S,y,C]=(0,p0t.parseClass)(t,d);if(y){i+=h,a=a||S,d+=y-1,n=n||C;continue}}if(g==="?"){i+=bK,n=!0;continue}i+=y0t(g)}return[i,(0,MF.unescape)(t),!!n,a]}};QF.AST=UF;Qc=UF});var RK=Q(FF=>{"use strict";m();Object.defineProperty(FF,"__esModule",{value:!0});FF.escape=void 0;var I0t=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");FF.escape=I0t});var p1e=Q(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 C0t=WDe(),GF=XDe(),u1e=vK(),b0t=RK(),v0t=PF(),R0t=(e,t,n={})=>((0,GF.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new Ey(t,n).match(e));ft.minimatch=R0t;var x0t=/^\*+([^+@!?\*\[\(]*)$/,D0t=e=>t=>!t.startsWith(".")&&t.endsWith(e),B0t=e=>t=>t.endsWith(e),N0t=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),O0t=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),w0t=/^\*+\.\*+$/,k0t=e=>!e.startsWith(".")&&e.includes("."),P0t=e=>e!=="."&&e!==".."&&e.includes("."),M0t=/^\.\*+$/,L0t=e=>e!=="."&&e!==".."&&e.startsWith("."),U0t=/^\*+$/,Q0t=e=>e.length!==0&&!e.startsWith("."),F0t=e=>e.length!==0&&e!=="."&&e!=="..",G0t=/^\?+([^+@!?\*\[\(]*)?$/,j0t=([e,t=""])=>{let n=c1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},H0t=([e,t=""])=>{let n=l1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},z0t=([e,t=""])=>{let n=l1e([e]);return t?r=>n(r)&&r.endsWith(t):n},$0t=([e,t=""])=>{let n=c1e([e]);return t?r=>n(r)&&r.endsWith(t):n},c1e=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},l1e=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},d1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",a1e={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=d1e==="win32"?a1e.win32.sep:a1e.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var V0t="[^/]",q0t=V0t+"*?",Y0t="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",K0t="(?:(?!(?:\\/|^)\\.).)*?",J0t=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=J0t;ft.minimatch.filter=ft.filter;var zd=(e,t={})=>Object.assign({},e,t),Z0t=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,zd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,zd(e,i))}static defaults(o){return t.defaults(zd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,zd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,zd(e,i))}},unescape:(r,o={})=>t.unescape(r,zd(e,o)),escape:(r,o={})=>t.escape(r,zd(e,o)),filter:(r,o={})=>t.filter(r,zd(e,o)),defaults:r=>t.defaults(zd(e,r)),makeRe:(r,o={})=>t.makeRe(r,zd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,zd(e,o)),match:(r,o,i={})=>t.match(r,o,zd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=Z0t;ft.minimatch.defaults=ft.defaults;var W0t=(e,t={})=>((0,GF.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,C0t.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=W0t;ft.minimatch.braceExpand=ft.braceExpand;var X0t=(e,t={})=>new Ey(e,t).makeRe();ft.makeRe=X0t;ft.minimatch.makeRe=ft.makeRe;var eSt=(e,t,n={})=>{let r=new Ey(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=eSt;ft.minimatch.match=ft.match;var s1e=/[?*]|[+@!]\(.*?\)|\[|\]/,tSt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Ey=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,GF.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||d1e,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]==="?"||!s1e.test(i[2]))&&!s1e.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 F=t.slice(o,o+d.length);if(!this.#o(F,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 F=t.length-h.length;if(this.#o(t,h,r,F,0))S=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(F--,!this.#o(t,h,r,F,0)))return!1;S=h.length+1}}if(!g.length){let F=!!S;for(let j=o;j<t.length-S;j++){let G=String(t[j]);if(F=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||F}let y=[[[],0]],C=y[0],v=0,x=[0];for(let F of g)F===ft.GLOBSTAR?(x.push(v),C=[[],0],y.push(C)):(C[0].push(F),v++);let O=y.length-1,k=t.length-S;for(let F of y)F[1]=k-(x[O--]+F[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,GF.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?F0t:Q0t:(r=t.match(x0t))?o=(n.nocase?n.dot?O0t:N0t:n.dot?B0t:D0t)(r[1]):(r=t.match(G0t))?o=(n.nocase?n.dot?H0t:j0t:n.dot?z0t:$0t)(r):(r=t.match(w0t))?o=n.dot?P0t:k0t:(r=t.match(M0t))&&(o=L0t);let i=u1e.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?q0t:n.dot?Y0t:K0t,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"?tSt(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=Ey;var nSt=vK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return nSt.AST}});var rSt=RK();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return rSt.escape}});var oSt=PF();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return oSt.unescape}});ft.minimatch.AST=u1e.AST;ft.minimatch.Minimatch=Ey;ft.minimatch.escape=b0t.escape;ft.minimatch.unescape=v0t.unescape});var E1e=Q((hhn,BK)=>{"use strict";m();var f1e=Ge("node:diagnostics_channel"),{context:jF,trace:xK,SpanStatusCode:HF,propagation:DK,diag:iSt}=(je(),Me(We)),{getRPCMetadata:aSt,RPCType:sSt}=Tr(),{ATTR_HTTP_ROUTE:zF,ATTR_HTTP_RESPONSE_STATUS_CODE:A1e,ATTR_HTTP_REQUEST_METHOD:uSt,ATTR_URL_PATH:cSt}=(Zn(),Me(Ur)),{InstrumentationBase:lSt}=jDe(),{version:dSt,name:m1e}=HDe(),pSt=">=4.0.0 <6",g1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Eo={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},V_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Dg="anonymous",q_=Symbol("fastify otel instance"),Y_=Symbol("fastify otel request spans"),$N=Symbol("fastify otel request context"),h1e=Symbol("fastify otel addhook original"),_1e=Symbol("fastify otel setnotfound original"),VN=Symbol("fastify otel ignore path"),qN=Symbol("fastify otel record exceptions"),$F=class extends lSt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(m1e,dSt,t),this.logger=iSt.createComponentLogger({namespace:m1e}),this[VN]=null,this[qN]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[qN]=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[VN]=o=>typeof n=="function"?n(o):(r==null&&(r=p1e().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)},f1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(f1e.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:pSt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(q_,t),r.decorate(h1e,r.addHook),r.decorate(_1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let C=this[$N],v=this[Y_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:C,inject:(x,O)=>DK.inject(C,x,O),extract:(x,O)=>DK.extract(C,x,O)}}),r.decorateRequest(Y_,null),r.decorateRequest($N,null),r.addHook("onRoute",function(C){if(t[VN]?.(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 g1e)if(C[v]!=null){let x=C[v];if(typeof x=="function")C[v]=S(x,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:V_.ROUTE,[zF]:C.url,[Eo.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:Dg});else if(Array.isArray(x)){let O=[];for(let k of x)O.push(S(k,v,{[Eo.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Eo.FASTIFY_TYPE]:V_.ROUTE,[zF]:C.url,[Eo.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:Dg}));C[v]=O}}C.onSend!=null?C.onSend=Array.isArray(C.onSend)?[...C.onSend,a]:[C.onSend,a]:C.onSend=a,C.onError!=null?C.onError=Array.isArray(C.onError)?[...C.onError,c]:[C.onError,c]:C.onError=c,C.handler=S(C.handler,"handler",{[Eo.HOOK_NAME]:`${this.pluginName} - route-handler`,[Eo.FASTIFY_TYPE]:V_.HANDLER,[zF]:C.url,[Eo.HOOK_CALLBACK_NAME]:C.handler.name.length>0?C.handler.name:Dg})}),r.addHook("onRequest",function(C,v,x){if(this[q_].isEnabled()===!1||C.routeOptions.config?.otel===!1)return x();if(this[q_][VN]?.({url:C.url,method:C.method})===!0)return this[q_].logger.debug(`Ignoring request ${C.method} ${C.url} because it matches the ignore path`),x();let O=jF.active();xK.getSpan(O)==null&&(O=DK.extract(O,C.headers));let k=aSt(O);C.routeOptions.url!=null&&k?.type===sSt.HTTP&&(k.route=C.routeOptions.url);let F={[Eo.ROOT]:"@fastify/otel",[uSt]:C.method,[cSt]:C.url};C.routeOptions.url!=null&&(F[zF]=C.routeOptions.url);let j=this[q_].tracer.startSpan("request",{attributes:F},O);try{this[q_]._requestHook?.(j,C)}catch(G){this[q_].logger.error({err:G},"requestHook threw")}C[$N]=xK.setSpan(O,j),C[Y_]=j,jF.with(C[$N],()=>{x()})}),r.addHook("onResponse",function(C,v,x){let O=C[Y_];O!=null&&(O.setAttributes({[A1e]:v.statusCode}),O.end()),C[Y_]=null,x()}),r.addHook=d,r.setNotFoundHandler=g,i();function a(y,C,v,x){let O=y[Y_];O!=null&&(C.statusCode>=500&&O.setStatus({code:HF.ERROR}),O.setAttributes({[A1e]:C.statusCode}),O.end()),y[Y_]=null,x(null,v)}function c(y,C,v,x){let O=y[Y_];O!=null&&(O.setStatus({code:HF.ERROR,message:v.message}),t[qN]!==!1&&O.recordException(v)),x()}function d(y,C){let v=this[h1e];return g1e.includes(y)?v.call(this,y,S(C,y,{[Eo.HOOK_NAME]:`${this.pluginName} - ${y}`,[Eo.FASTIFY_TYPE]:V_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Dg})):v.call(this,y,C)}function g(y,C){let v=this[_1e];typeof y=="function"?(C=S(y,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:V_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.name?.length>0?y.name:Dg}),v.call(this,C)):(y.preValidation!=null&&(y.preValidation=S(y.preValidation,"notFoundHandler - preValidation",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Eo.FASTIFY_TYPE]:V_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preValidation.name?.length>0?y.preValidation.name:Dg})),y.preHandler!=null&&(y.preHandler=S(y.preHandler,"notFoundHandler - preHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Eo.FASTIFY_TYPE]:V_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:y.preHandler.name?.length>0?y.preHandler.name:Dg})),C=S(C,"notFoundHandler",{[Eo.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Eo.FASTIFY_TYPE]:V_.INSTANCE,[Eo.HOOK_CALLBACK_NAME]:C.name?.length>0?C.name:Dg}),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(...O){let k=this[q_],F=h(O);if(F===null)return k.logger.debug(`Ignoring route instrumentation because ${C} was called without a Fastify request argument`),y.call(this,...O);if(k.isEnabled()===!1||F.routeOptions.config?.otel===!1)return k.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it is disabled`),y.call(this,...O);if(k[VN]?.({url:F.url,method:F.method})===!0)return k.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it matches the ignore path`),y.call(this,...O);let j=F[$N]??jF.active(),G=y.name?.length>0?y.name:this.pluginName??Dg,q=k.tracer.startSpan(`${C} - ${G}`,{attributes:v},j);if(k._lifecycleHook!=null)try{k._lifecycleHook(q,{hookName:C,request:F,handler:G})}catch(oe){k.logger.error({err:oe},"Execution of lifecycleHook failed")}return jF.with(xK.setSpan(j,q),function(){try{let oe=y.call(this,...O);return typeof oe?.then=="function"?oe.then(ge=>(q.end(),ge),ge=>(q.setStatus({code:HF.ERROR,message:ge.message}),k[qN]!==!1&&q.recordException(ge),q.end(),Promise.reject(ge))):(q.end(),oe)}catch(oe){throw q.setStatus({code:HF.ERROR,message:oe.message}),k[qN]!==!1&&q.recordException(oe),q.end(),oe}},this)}}}}};BK.exports=$F;BK.exports.FastifyOtelInstrumentation=$F});var Bg,YN,KN,S1e=N(()=>{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})(Bg||(Bg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(YN||(YN={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(KN||(KN={}))});var JN,y1e=N(()=>{m();JN=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function NK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[JN]||[];return i.push(o),Object.defineProperty(e,JN,{enumerable:!1,configurable:!0,value:i}),o}function VF(e,t){let n=e[JN]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:ci.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[JN])}function I1e(e,t,n){let r,o;try{o=e(),T1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!T1e(o)&&(t(r,o),r))throw r;return o}}function T1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var C1e=N(()=>{m();je();y1e()});function gSt(){let e=gt();e&&e.on("spanStart",t=>{v1e(t)})}function v1e(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${n}.fastify`});let r=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof r=="string"){let o=r.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(o)}}var YF,Sy,fSt,ASt,b1e,mSt,qF,R1e=N(()=>{m();je();YF=ie(Tr(),1),Sy=ie(on(),1);Zn();dt();S1e();C1e();fSt="0.1.0",ASt="@sentry/instrumentation-fastify-v3",b1e="anonymous",mSt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),qF=class extends Sy.InstrumentationBase{constructor(t={}){super(ASt,fSt,t)}init(){return[new Sy.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,YF.getRPCMetadata)(Ke.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===YF.RPCType.HTTP&&(c.route=d);let g=r.method||"GET";bn().setTransactionName(`${g} ${d}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||b1e,d=`${KN.MIDDLEWARE} - ${c}`,g=a[1],h=NK(g,i.tracer,d,{[Bg.FASTIFY_TYPE]:YN.MIDDLEWARE,[Bg.PLUGIN_NAME]:t,[Bg.HOOK_NAME]:n}),S=o&&a[a.length-1];return S&&(a[a.length-1]=function(...y){VF(g),S.apply(this,y)}),Ke.with(zt.setSpan(Ke.active(),h),()=>I1e(()=>r.apply(this,a),y=>{y instanceof Error&&(h.setStatus({code:ci.ERROR,message:y.message}),h.recordException(y)),o||VF(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(!mSt.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()),gSt(),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,Sy.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),VF(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=`${KN.REQUEST_HANDLER} - ${d||this.pluginName||b1e}`,h={[Bg.PLUGIN_NAME]:this.pluginName,[Bg.FASTIFY_TYPE]:YN.REQUEST_HANDLER,[S5]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Bg.FASTIFY_NAME]=d);let S=NK(o,t.tracer,g,h);v1e(S);let{requestHook:y}=t.getConfig();return y&&(0,Sy.safeExecuteInTheMiddle)(()=>y(S,{request:r}),C=>{C&&t._diag.error("request hook failed",C)},!0),Ke.with(zt.setSpan(Ke.active(),S),()=>{i()})}}}});import*as OK from"node:diagnostics_channel";function hSt(){let e=gt();if(e)return e.getIntegrationByName(KF)}function x1e(e,t,n,r){let o=hSt()?.getShouldHandleError()||w1e;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){Ia&&J.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(e,t,n)&&nn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function w1e(e,t,n){let r=n.statusCode;return r>=500||r<=299}function k1e(e){let t=Ot(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",a=o===n?.startsWith("handler -"),c=n==="request"||o==="request-handler";if(r[Xt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${d}.fastify`});let g=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof g=="string"){let h=g.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function ESt(){let e=gt();e&&e.on("spanStart",t=>{k1e(t)})}function SSt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&k1e(i)}let r=t.routeOptions?.url,o=t.method||"GET";bn().setTransactionName(`${o} ${r}`)})}var D1e,KF,B1e,N1e,_St,O1e,P1e=N(()=>{m();D1e=ie(E1e(),1);dt();mr();gy();R1e();KF="Fastify",B1e=st(`${KF}.v3`,()=>new qF);N1e=st(`${KF}.v5`,()=>{let e=new D1e.FastifyOtelInstrumentation,t=e.plugin();return OK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?Ia&&J.error("Failed to setup Fastify instrumentation",o):(ESt(),r&&SSt(r))})}),OK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;x1e.call(x1e,r,o,i,"diagnostics-channel")}),e}),_St=({shouldHandleError:e})=>{let t;return{name:KF,setupOnce(){t=e||w1e,B1e(),N1e()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},O1e=(e={})=>_St(e)});var wK=Q(lf=>{"use strict";m();Object.defineProperty(lf,"__esModule",{value:!0});lf.SpanNames=lf.TokenKind=lf.AllowedOperationTypes=void 0;var ySt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ySt=lf.AllowedOperationTypes||(lf.AllowedOperationTypes={}));var TSt;(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"})(TSt=lf.TokenKind||(lf.TokenKind={}));var ISt;(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"})(ISt=lf.SpanNames||(lf.SpanNames={}))});var kK=Q(ZN=>{"use strict";m();Object.defineProperty(ZN,"__esModule",{value:!0});ZN.AttributeNames=void 0;var CSt;(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"})(CSt=ZN.AttributeNames||(ZN.AttributeNames={}))});var JF=Q(wv=>{"use strict";m();Object.defineProperty(wv,"__esModule",{value:!0});wv.OTEL_GRAPHQL_DATA_SYMBOL=wv.OTEL_PATCHED_SYMBOL=void 0;wv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");wv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var M1e=Q(ZF=>{"use strict";m();Object.defineProperty(ZF,"__esModule",{value:!0});ZF.OPERATION_NOT_SUPPORTED=void 0;var Vhn=JF();ZF.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var J1e=Q(Ca=>{"use strict";m();Object.defineProperty(Ca,"__esModule",{value:!0});Ca.wrapFieldResolver=Ca.wrapFields=Ca.getSourceFromLocation=Ca.getOperation=Ca.endSpan=Ca.addSpanSource=Ca.addInputVariableAttributes=Ca.isPromise=void 0;var kv=(je(),Me(We)),K_=wK(),yy=kK(),Ng=JF(),L1e=Object.values(K_.AllowedOperationTypes),bSt=e=>typeof e?.then=="function";Ca.isPromise=bSt;var vSt=e=>typeof e=="object"&&e!==null;function PK(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{PK(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{PK(e,`${t}.${r}`,o)}):e.setAttribute(`${yy.AttributeNames.VARIABLES}${String(t)}`,n)}function RSt(e,t){Object.entries(t).forEach(([n,r])=>{PK(e,n,r)})}Ca.addInputVariableAttributes=RSt;function G1e(e,t,n,r,o){let i=V1e(t,n,r,o);e.setAttribute(yy.AttributeNames.SOURCE,i)}Ca.addSpanSource=G1e;function xSt(e,t,n,r,o){let i=j1e(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?z1e(n):H1e(n,o);return i={span:DSt(e,t,n,r,o,c)},OSt(n,o,i),{field:i,spanAdded:!0}}function DSt(e,t,n,r,o,i){let a={[yy.AttributeNames.FIELD_NAME]:r.fieldName,[yy.AttributeNames.FIELD_PATH]:o.join("."),[yy.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[yy.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${K_.SpanNames.RESOLVE} ${a[yy.AttributeNames.FIELD_PATH]}`,{attributes:a},i?kv.trace.setSpan(kv.context.active(),i):void 0),d=n[Ng.OTEL_GRAPHQL_DATA_SYMBOL].source,g=r.fieldNodes.find(h=>h.kind==="Field");return g&&G1e(c,d.loc,t().allowValues,g.loc?.start,g.loc?.end),c}function BSt(e,t){t&&e.recordException(t),e.end()}Ca.endSpan=BSt;function NSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>L1e.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>L1e.indexOf(n?.operation)!==-1)}Ca.getOperation=NSt;function OSt(e,t,n){return e[Ng.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function j1e(e,t){return e[Ng.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function H1e(e,t){for(let n=t.length-1;n>0;n--){let r=j1e(e,t.slice(0,n));if(r)return r.span}return z1e(e)}function z1e(e){return e[Ng.OTEL_GRAPHQL_DATA_SYMBOL].span}function wSt(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 kSt(e){return $1e(`
37
37
  `,e)}function U1e(e){return $1e(" ",e)}function $1e(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var PSt=[K_.TokenKind.FLOAT,K_.TokenKind.STRING,K_.TokenKind.INT,K_.TokenKind.BLOCK_STRING];function V1e(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&&PSt.indexOf(c.kind)>=0&&(g="*"),c.kind===K_.TokenKind.STRING&&(g=`"${g}"`),c.kind===K_.TokenKind.EOF&&(g=""),c.line>d?(o+=kSt(c.line-d),d=c.line,h=U1e(c.column-1)):c.line===c.prev?.line&&(h=U1e(c.start-(c.prev?.end||0))),o+=h+g,c&&(c=c.next)}}return o}Ca.getSourceFromLocation=V1e;function q1e(e,t,n){if(!e||e[Ng.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Ng.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=K1e(t,n,i.resolve)),i.type)){let a=Y1e(i.type);for(let c of a)q1e(c,t,n)}})}Ca.wrapFields=q1e;function Y1e(e){return"ofType"in e?Y1e(e.ofType):MSt(e)?e.getTypes():LSt(e)?[e]:[]}function MSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function LSt(e){return"getFields"in e&&typeof e.getFields=="function"}var Q1e=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:kv.SpanStatusCode.ERROR,message:t.message}),e.end())},F1e=(e,t)=>{t&&e.end()};function K1e(e,t,n,r=!1){if(o[Ng.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let g=t();if(g.ignoreTrivialResolveSpans&&r&&(vSt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[Ng.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=wSt(g.mergeItems,d&&d.path),S=h.filter(v=>typeof v=="string").length,y,C=!1;if(g.depth>=0&&g.depth<S)y=H1e(c,h);else{let{field:v,spanAdded:x}=xSt(e,t,c,d,h);y=v.span,C=x}return kv.context.with(kv.trace.setSpan(kv.context.active(),y),()=>{try{let v=n.call(this,i,a,c,d);return(0,Ca.isPromise)(v)?v.then(x=>(F1e(y,C),x),x=>{throw Q1e(y,x,C),x}):(F1e(y,C),v)}catch(v){throw Q1e(y,v,C),v}})}return o[Ng.OTEL_PATCHED_SYMBOL]=!0,o}Ca.wrapFieldResolver=K1e});var Z1e=Q(Pv=>{"use strict";m();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.PACKAGE_NAME=Pv.PACKAGE_VERSION=void 0;Pv.PACKAGE_VERSION="0.62.0";Pv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var eBe=Q(e4=>{"use strict";m();Object.defineProperty(e4,"__esModule",{value:!0});e4.GraphQLInstrumentation=void 0;var Og=(je(),Me(We)),$d=on(),WN=wK(),WF=kK(),MK=JF(),USt=M1e(),iu=J1e(),W1e=Z1e(),X1e={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},XF=[">=14.0.0 <17"],LK=class extends $d.InstrumentationBase{constructor(t={}){super(W1e.PACKAGE_NAME,W1e.PACKAGE_VERSION,{...X1e,...t})}setConfig(t={}){super.setConfig({...X1e,...t})}init(){let t=new $d.InstrumentationNodeModuleDefinition("graphql",XF);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new $d.InstrumentationNodeModuleFile("graphql/execution/execute.js",XF,t=>((0,$d.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 $d.InstrumentationNodeModuleFile("graphql/language/parser.js",XF,t=>((0,$d.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new $d.InstrumentationNodeModuleFile("graphql/validation/validate.js",XF,t=>((0,$d.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,iu.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[MK.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[MK.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},Og.context.with(Og.trace.setSpan(Og.context.active(),d),()=>(0,$d.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,iu.endSpan)(t,n);return}if((0,iu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,iu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,$d.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,iu.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(WN.SpanNames.PARSE);return Og.context.with(Og.trace.setSpan(Og.context.active(),a),()=>(0,$d.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,iu.getOperation)(d)?d.loc&&(0,iu.addSpanSource)(a,d.loc,i.allowValues):a.updateName(WN.SpanNames.SCHEMA_PARSE)),(0,iu.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(WN.SpanNames.VALIDATE,{});return Og.context.with(Og.trace.setSpan(Og.context.active(),d),()=>(0,$d.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(g,h)=>{o.loc||d.updateName(WN.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:WF.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,iu.endSpan)(d,g)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(WN.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(WF.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(WF.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(WF.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,iu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,iu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,g){if(o||(o={}),o[MK.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,iu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),S,h),t&&((0,iu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,iu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d}}};e4.GraphQLInstrumentation=LK});var tBe=Q(t4=>{"use strict";m();Object.defineProperty(t4,"__esModule",{value:!0});t4.GraphQLInstrumentation=void 0;var QSt=eBe();Object.defineProperty(t4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return QSt.GraphQLInstrumentation}})});function aBe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function GSt(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 nBe,rBe,oBe,FSt,iBe,sBe=N(()=>{m();je();nBe=ie(tBe(),1);dt();mr();Ev();rBe="Graphql",oBe=st(rBe,nBe.GraphQLInstrumentation,e=>{let t=aBe(e);return{...t,responseHook(n,r){Qr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Ot(n).status&&n.setStatus({code:ci.ERROR});let i=Ot(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=li(n),h=Ot(d).data[hv]||[],S=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(S),d.setAttribute(hv,h)):typeof h=="string"?d.setAttribute(hv,[h,S]):d.setAttribute(hv,S),Ot(d).data["original-description"]||d.setAttribute("original-description",Ot(d).description),d.updateName(`${Ot(d).data["original-description"]} (${GSt(h)})`)}}}}),FSt=(e={})=>({name:rBe,setupOnce(){oBe(aBe(e))}}),iBe=FSt});var uBe=Q(n4=>{"use strict";m();Object.defineProperty(n4,"__esModule",{value:!0});n4.EVENT_LISTENERS_SET=void 0;n4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var cBe=Q(r4=>{"use strict";m();Object.defineProperty(r4,"__esModule",{value:!0});r4.bufferTextMapGetter=void 0;r4.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 lBe=Q(nr=>{"use strict";m();Object.defineProperty(nr,"__esModule",{value:!0});nr.METRIC_MESSAGING_PROCESS_DURATION=nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=nr.MESSAGING_SYSTEM_VALUE_KAFKA=nr.MESSAGING_OPERATION_TYPE_VALUE_SEND=nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=nr.ATTR_MESSAGING_SYSTEM=nr.ATTR_MESSAGING_OPERATION_TYPE=nr.ATTR_MESSAGING_OPERATION_NAME=nr.ATTR_MESSAGING_KAFKA_OFFSET=nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=nr.ATTR_MESSAGING_DESTINATION_NAME=nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;nr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";nr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";nr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";nr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";nr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";nr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";nr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";nr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";nr.ATTR_MESSAGING_SYSTEM="messaging.system";nr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";nr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";nr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";nr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";nr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";nr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";nr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";nr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var dBe=Q(Mv=>{"use strict";m();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.23.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var hBe=Q(i4=>{"use strict";m();Object.defineProperty(i4,"__esModule",{value:!0});i4.KafkaJsInstrumentation=void 0;var Fr=(je(),Me(We)),Vd=on(),Lv=(Zn(),Me(Ur)),pBe=uBe(),fBe=cBe(),At=lBe(),ABe=dBe();function o4(e,t,n){return r=>{e.add(t,{...n,...r?{[Lv.ATTR_ERROR_TYPE]:r}:{}})}}function mBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[Lv.ATTR_ERROR_TYPE]:r}:{}})}}var gBe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],UK=class extends Vd.InstrumentationBase{constructor(t={}){super(ABe.PACKAGE_NAME,ABe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(At.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:gBe}}),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:gBe}})}init(){let t=r=>{(0,Vd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Vd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Vd.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,Vd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[pBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[pBe.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}`,[Lv.ATTR_SERVER_ADDRESS]:n,[Lv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Vd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Vd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Vd.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,Vd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Vd.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],a=Fr.propagation.extract(Fr.ROOT_CONTEXT,i.message.headers,fBe.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=[mBe(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)}),o4(t._consumedMessages,1,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],g=Fr.context.with(Fr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,g)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:Fr.ROOT_CONTEXT,attributes:{[At.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),a),()=>{let c=Date.now(),d=[],g=[o4(n._consumedMessages,i.batch.messages.length,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(S=>{let y=Fr.propagation.extract(Fr.ROOT_CONTEXT,S.headers,fBe.bufferTextMapGetter),C=Fr.trace.getSpan(y)?.spanContext(),v;C&&(v={context:C}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:S,operationType:At.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),g.push(mBe(n._processDuration,c,{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_OPERATION_NAME]:"process",[At.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return d.unshift(a),n._endSpansOnPromise(d,g,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let d=c.send;c.send=function(...C){return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),i),()=>t._getSendPatch()(d).apply(this,C).catch(x=>{throw i.setStatus({code:Fr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let g=c.sendBatch;c.sendBatch=function(...C){return Fr.context.with(Fr.trace.setSpan(Fr.context.active(),i),()=>t._getSendBatchPatch()(g).apply(this,C).catch(x=>{throw i.setStatus({code:Fr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let h=c.commit;c.commit=function(...C){let v=h.apply(this,C).then(()=>{i.setStatus({code:Fr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let S=c.abort;c.abort=function(...C){let v=S.apply(this,C);return t._endSpansOnPromise([i],[],v)}}).catch(c=>{i.setStatus({code:Fr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),a}}_getSendBatchPatch(){let t=this;return n=>function(...o){let a=o[0].topicMessages||[],c=[],d=[];a.forEach(h=>{h.messages.forEach(S=>{c.push(t._startProducerSpan(h.topic,S)),d.push(o4(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=>o4(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=Lv.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(Lv.ATTR_ERROR_TYPE,a),c.setStatus({code:Fr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:a}){let c=r===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,d=this.tracer.startSpan(`${c} ${t}`,{kind:r===At.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?Fr.SpanKind.CLIENT:Fr.SpanKind.CONSUMER,attributes:{...a,[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_OPERATION_TYPE]:r,[At.ATTR_MESSAGING_OPERATION_NAME]:c,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:g}=this.getConfig();return g&&n&&(0,Vd.safeExecuteInTheMiddle)(()=>g(d,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),d}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:Fr.SpanKind.PRODUCER,attributes:{[At.ATTR_MESSAGING_SYSTEM]:At.MESSAGING_SYSTEM_VALUE_KAFKA,[At.ATTR_MESSAGING_DESTINATION_NAME]:t,[At.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[At.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[At.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[At.ATTR_MESSAGING_OPERATION_NAME]:"send",[At.ATTR_MESSAGING_OPERATION_TYPE]:At.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},Fr.propagation.inject(Fr.trace.setSpan(Fr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Vd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};i4.KafkaJsInstrumentation=UK});var _Be=Q(a4=>{"use strict";m();Object.defineProperty(a4,"__esModule",{value:!0});a4.KafkaJsInstrumentation=void 0;var jSt=hBe();Object.defineProperty(a4,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return jSt.KafkaJsInstrumentation}})});var EBe,SBe,yBe,HSt,TBe,IBe=N(()=>{m();EBe=ie(_Be(),1);mr();SBe="Kafka",yBe=st(SBe,()=>new EBe.KafkaJsInstrumentation({consumerHook(e){Qr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Qr(e,"auto.kafkajs.otel.producer")}})),HSt=()=>({name:SBe,setupOnce(){yBe()}}),TBe=HSt});var CBe=Q(Uv=>{"use strict";m();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.58.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var xBe=Q(s4=>{"use strict";m();Object.defineProperty(s4,"__esModule",{value:!0});s4.LruMemoizerInstrumentation=void 0;var bBe=(je(),Me(We)),vBe=on(),RBe=CBe(),QK=class extends vBe.InstrumentationBase{constructor(t={}){super(RBe.PACKAGE_NAME,RBe.PACKAGE_VERSION,t)}init(){return[new vBe.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"?bBe.context.bind(bBe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};s4.LruMemoizerInstrumentation=QK});var DBe=Q(u4=>{"use strict";m();Object.defineProperty(u4,"__esModule",{value:!0});u4.LruMemoizerInstrumentation=void 0;var zSt=xBe();Object.defineProperty(u4,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return zSt.LruMemoizerInstrumentation}})});var BBe,NBe,OBe,$St,wBe,kBe=N(()=>{m();BBe=ie(DBe(),1);mr();NBe="LruMemoizer",OBe=st(NBe,()=>new BBe.LruMemoizerInstrumentation),$St=()=>({name:NBe,setupOnce(){OBe()}}),wBe=$St});var PBe=Q(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 MBe=Q(XN=>{"use strict";m();Object.defineProperty(XN,"__esModule",{value:!0});XN.MongodbCommandType=void 0;var VSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(VSt=XN.MongodbCommandType||(XN.MongodbCommandType={}))});var LBe=Q(Qv=>{"use strict";m();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.PACKAGE_NAME=Qv.PACKAGE_VERSION=void 0;Qv.PACKAGE_VERSION="0.67.0";Qv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var FBe=Q(c4=>{"use strict";m();Object.defineProperty(c4,"__esModule",{value:!0});c4.MongoDBInstrumentation=void 0;var Ko=(je(),Me(We)),rr=on(),wg=(Zn(),Me(Ur)),Ul=PBe(),Ty=MBe(),UBe=LBe(),QBe={requireParentSpan:!0},FK=class e extends rr.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(UBe.PACKAGE_NAME,UBe.PACKAGE_VERSION,{...QBe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,rr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,rr.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...QBe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Ul.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:d,v4UnpatchConnectionPool:g}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:S}=this._getV4SessionsPatches();return[new rr.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new rr.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,g),new rr.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new rr.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,S)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,rr.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,rr.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,rr.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,rr.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,rr.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,rr.isWrapped)(t.getMore)&&this._unwrap(t,"getMore"),this._wrap(t,"getMore",this._getV3PatchCursor()),t),v3UnpatchConnection:t=>{t!==void 0&&(this._unwrap(t,"insert"),this._unwrap(t,"remove"),this._unwrap(t,"update"),this._unwrap(t,"command"),this._unwrap(t,"query"),this._unwrap(t,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:t=>((0,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,rr.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,rr.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,rr.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),a=this.sessions.length;return o===a?t._connCountAdd(1,t._poolName,"used"):o-1===a&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,rr.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),t},v4UnpatchConnectionPool:t=>{t!==void 0&&this._unwrap(t.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:t=>((0,rr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=Ko.context.bind(Ko.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,d){if(c||!d){i(c,d);return}t.setPoolName(o),i(c,d)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,rr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,rr.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,d,g){let h=Ko.trace.getSpan(Ko.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:Ko.SpanKind.CLIENT,attributes:C}),O=n._patchEnd(x,y);return typeof d=="function"?r.call(this,i,a,c,O):r.call(this,i,a,c,d,O)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,a,c,d){let g=Ko.trace.getSpan(Ko.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===Ty.MongodbCommandType.UNKNOWN?void 0:y,v=t._getV3SpanAttributes(i,o,a,C),x=t._spanNameFromAttrs(v),O=t.tracer.startSpan(x,{kind:Ko.SpanKind.CLIENT,attributes:v}),k=t._patchEnd(O,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=Ko.trace.getSpan(Ko.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:Ko.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=Ko.trace.getSpan(Ko.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:Ko.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=Ko.trace.getSpan(Ko.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:Ko.SpanKind.CLIENT,attributes:C}),O=t._patchEnd(x,y);return typeof d=="function"?n.call(this,o,i,a,c,O):n.call(this,o,i,a,c,d,O)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,a,c,d,g){let h=Ko.trace.getSpan(Ko.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:Ko.SpanKind.CLIENT,attributes:C}),O=t._patchEnd(x,y);return typeof d=="function"?n.call(this,o,i,a,c,O):n.call(this,o,i,a,c,d,O)}}static _getCommandType(t){return t.createIndexes!==void 0?Ty.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?Ty.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?Ty.MongodbCommandType.IS_MASTER:t.count!==void 0?Ty.MongodbCommandType.COUNT:t.aggregate!==void 0?Ty.MongodbCommandType.AGGREGATE:Ty.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let d=typeof t.address=="string"?t.address.split(":"):"";d.length===2&&(i=d[0],a=d[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let S=h.split(":");i=S[0],a=S[1]}}let[c,d]=t.toString().split("."),g=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,g,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_SYSTEM]=Ul.DB_SYSTEM_VALUE_MONGODB,c[Ul.ATTR_DB_NAME]=t,c[Ul.ATTR_DB_MONGODB_COLLECTION]=n,c[Ul.ATTR_DB_OPERATION]=a,c[Ul.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[wg.ATTR_DB_SYSTEM_NAME]=Ul.DB_SYSTEM_NAME_VALUE_MONGODB,c[wg.ATTR_DB_NAMESPACE]=t,c[wg.ATTR_DB_OPERATION_NAME]=a,c[wg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[wg.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&rr.SemconvStability.STABLE&&(c[wg.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),g=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,rr.safeExecuteInTheMiddle)(()=>{let h=g(i);this._dbSemconvStability&rr.SemconvStability.OLD&&(c[Ul.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&rr.SemconvStability.STABLE&&(c[wg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return c}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&rr.SemconvStability.STABLE?n=[t[wg.ATTR_DB_OPERATION_NAME],t[wg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Ul.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Ul.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,r)=>typeof r!="object"||!r?"?":t.has(r)?"[Circular]":(t.add(r),r)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:r}=this.getConfig();typeof r=="function"&&(0,rr.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Ko.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:Ko.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 Ko.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}};c4.MongoDBInstrumentation=FK});var GBe=Q(eO=>{"use strict";m();Object.defineProperty(eO,"__esModule",{value:!0});eO.MongodbCommandType=void 0;var qSt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(qSt=eO.MongodbCommandType||(eO.MongodbCommandType={}))});var jBe=Q(Fv=>{"use strict";m();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.MongodbCommandType=Fv.MongoDBInstrumentation=void 0;var YSt=FBe();Object.defineProperty(Fv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return YSt.MongoDBInstrumentation}});var KSt=GBe();Object.defineProperty(Fv,"MongodbCommandType",{enumerable:!0,get:function(){return KSt.MongodbCommandType}})});function JSt(e){let t=GK(e);return JSON.stringify(t)}function GK(e){if(Array.isArray(e))return e.map(t=>GK(t));if(ZSt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,GK(r)]).reduce((n,r)=>(XSt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function ZSt(e){return typeof e=="object"&&e!==null&&!WSt(e)}function WSt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function XSt(e){return Array.isArray(e)}var HBe,zBe,$Be,eyt,VBe,qBe=N(()=>{m();HBe=ie(jBe(),1);mr();zBe="Mongo",$Be=st(zBe,()=>new HBe.MongoDBInstrumentation({dbStatementSerializer:JSt,responseHook(e){Qr(e,"auto.db.otel.mongo")}}));eyt=()=>({name:zBe,setupOnce(){$Be()}}),VBe=eyt});var jK=Q(na=>{"use strict";m();Object.defineProperty(na,"__esModule",{value:!0});na.DB_SYSTEM_NAME_VALUE_MONGODB=na.ATTR_NET_PEER_PORT=na.ATTR_NET_PEER_NAME=na.ATTR_DB_USER=na.ATTR_DB_SYSTEM=na.ATTR_DB_STATEMENT=na.ATTR_DB_OPERATION=na.ATTR_DB_NAME=na.ATTR_DB_MONGODB_COLLECTION=void 0;na.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";na.ATTR_DB_NAME="db.name";na.ATTR_DB_OPERATION="db.operation";na.ATTR_DB_STATEMENT="db.statement";na.ATTR_DB_SYSTEM="db.system";na.ATTR_DB_USER="db.user";na.ATTR_NET_PEER_NAME="net.peer.name";na.ATTR_NET_PEER_PORT="net.peer.port";na.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var JBe=Q(J_=>{"use strict";m();Object.defineProperty(J_,"__esModule",{value:!0});J_.handleCallbackResponse=J_.handlePromiseResponse=J_.getAttributesFromCollection=void 0;var YBe=(je(),Me(We)),nO=on(),tO=jK(),l4=(Zn(),Me(Ur));function tyt(e,t,n){let r={};return t&nO.SemconvStability.OLD&&(r[tO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[tO.ATTR_DB_NAME]=e.conn.name,r[tO.ATTR_DB_USER]=e.conn.user),t&nO.SemconvStability.STABLE&&(r[l4.ATTR_DB_COLLECTION_NAME]=e.name,r[l4.ATTR_DB_NAMESPACE]=e.conn.name),n&nO.SemconvStability.OLD&&(r[tO.ATTR_NET_PEER_NAME]=e.conn.host,r[tO.ATTR_NET_PEER_PORT]=e.conn.port),n&nO.SemconvStability.STABLE&&(r[l4.ATTR_SERVER_ADDRESS]=e.conn.host,r[l4.ATTR_SERVER_PORT]=e.conn.port),r}J_.getAttributesFromCollection=tyt;function KBe(e,t={}){e.recordException(t),e.setStatus({code:YBe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function HK(e,t,n,r=void 0){n&&(0,nO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&YBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function nyt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(HK(t,o,n,r),o)).catch(o=>{throw KBe(t,o),o}).finally(()=>t.end()):(HK(t,e,n,r),t.end(),e)}J_.handlePromiseResponse=nyt;function ryt(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?KBe(r,d):HK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}J_.handleCallbackResponse=ryt});var ZBe=Q(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.PACKAGE_NAME=Gv.PACKAGE_VERSION=void 0;Gv.PACKAGE_VERSION="0.60.0";Gv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var nNe=Q(Fc=>{"use strict";m();Object.defineProperty(Fc,"__esModule",{value:!0});Fc.MongooseInstrumentation=Fc._ALREADY_INSTRUMENTED=Fc._STORED_PARENT_SPAN=void 0;var ba=(je(),Me(We)),oyt=Tr(),zK=JBe(),Os=on(),WBe=ZBe(),Z_=jK(),Iy=(Zn(),Me(Ur)),d4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],iyt=["remove","count","findOneAndRemove",...d4],ayt=["count","findOneAndRemove",...d4],syt=[...d4];function XBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?iyt:e.startsWith("7.")?ayt:syt:d4}function eNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function tNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Fc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Fc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var $K=class extends Os.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Os.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Os.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Os.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,eNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),tNe(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)),XBe(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=XBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,eNe(n)&&this._unwrap(r.Model.prototype,"remove"),tNe(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&&ba.trace.getSpan(ba.context.active())===void 0)return r.apply(this,arguments);let a=this[Fc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Os.SemconvStability.OLD&&(c[Z_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[Iy.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[Fc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ba.trace.getSpan(ba.context.active())===void 0)return r.apply(this,arguments);let a=this[Fc._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&Os.SemconvStability.OLD&&(c[Z_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[Iy.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&&ba.trace.getSpan(ba.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&Os.SemconvStability.OLD&&(g[Z_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Os.SemconvStability.STABLE&&(g[Iy.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&&ba.trace.getSpan(ba.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 O=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&Os.SemconvStability.OLD&&(y[Z_.ATTR_DB_STATEMENT]=O),r._dbSemconvStability&Os.SemconvStability.STABLE&&(y[Iy.ATTR_DB_QUERY_TEXT]=O)}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[Fc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ba.trace.getSpan(ba.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&Os.SemconvStability.OLD&&(h[Z_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Os.SemconvStability.STABLE&&(h[Iy.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=ba.trace.getSpan(ba.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Fc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Fc._STORED_PARENT_SPAN]=ba.trace.getSpan(ba.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,zK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Os.SemconvStability.OLD&&(a[Z_.ATTR_DB_OPERATION]=r,a[Z_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Os.SemconvStability.STABLE&&(a[Iy.ATTR_DB_OPERATION_NAME]=r,a[Iy.ATTR_DB_SYSTEM_NAME]=Z_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Os.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ba.SpanKind.CLIENT,attributes:a},i?ba.trace.setSpan(ba.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,zK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,zK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ba.context.with((0,oyt.suppressTracing)(ba.context.active()),t):t()}};Fc.MongooseInstrumentation=$K});var rNe=Q(p4=>{"use strict";m();Object.defineProperty(p4,"__esModule",{value:!0});p4.MongooseInstrumentation=void 0;var uyt=nNe();Object.defineProperty(p4,"MongooseInstrumentation",{enumerable:!0,get:function(){return uyt.MongooseInstrumentation}})});var oNe,iNe,aNe,cyt,sNe,uNe=N(()=>{m();oNe=ie(rNe(),1);mr();iNe="Mongoose",aNe=st(iNe,()=>new oNe.MongooseInstrumentation({responseHook(e){Qr(e,"auto.db.otel.mongoose")}})),cyt=()=>({name:iNe,setupOnce(){aNe()}}),sNe=cyt});var cNe=Q(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ra.DB_SYSTEM_VALUE_MYSQL=ra.ATTR_NET_PEER_PORT=ra.ATTR_NET_PEER_NAME=ra.ATTR_DB_USER=ra.ATTR_DB_SYSTEM=ra.ATTR_DB_STATEMENT=ra.ATTR_DB_NAME=ra.ATTR_DB_CONNECTION_STRING=void 0;ra.ATTR_DB_CONNECTION_STRING="db.connection_string";ra.ATTR_DB_NAME="db.name";ra.ATTR_DB_STATEMENT="db.statement";ra.ATTR_DB_SYSTEM="db.system";ra.ATTR_DB_USER="db.user";ra.ATTR_NET_PEER_NAME="net.peer.name";ra.ATTR_NET_PEER_PORT="net.peer.port";ra.DB_SYSTEM_VALUE_MYSQL="mysql";ra.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var lNe=Q(rO=>{"use strict";m();Object.defineProperty(rO,"__esModule",{value:!0});rO.AttributeNames=void 0;var lyt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(lyt=rO.AttributeNames||(rO.AttributeNames={}))});var dNe=Q(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getPoolNameOld=au.arrayStringifyHelper=au.getSpanName=au.getDbValues=au.getDbQueryText=au.getJDBCString=au.getConfig=void 0;function dyt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}au.getConfig=dyt;function pyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}au.getJDBCString=pyt;function fyt(e){return typeof e=="string"?e:e.sql}au.getDbQueryText=fyt;function Ayt(e,t){return VK(typeof e=="string"?t:t||e.values)}au.getDbValues=Ayt;function myt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}au.getSpanName=myt;function VK(e){return e?`[${e.toString()}]`:""}au.arrayStringifyHelper=VK;function gyt(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()}au.getPoolNameOld=gyt});var pNe=Q(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var ANe=Q(f4=>{"use strict";m();Object.defineProperty(f4,"__esModule",{value:!0});f4.MySQLInstrumentation=void 0;var Gc=(je(),Me(We)),qd=on(),Hv=(Zn(),Me(Ur)),kg=cNe(),hyt=lNe(),Cy=dNe(),fNe=pNe(),qK=class extends qd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(fNe.PACKAGE_NAME,fNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,qd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,qd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(kg.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 qd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,qd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,qd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,qd.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,Cy.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=Gc.context.active();return function(o,i){i&&((0,qd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Gc.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,Cy.getConfig)(t.config),y=parseInt(g,10),C=(0,Cy.getDbQueryText)(o);r._dbSemconvStability&qd.SemconvStability.OLD&&(c[kg.ATTR_DB_SYSTEM]=kg.DB_SYSTEM_VALUE_MYSQL,c[kg.ATTR_DB_CONNECTION_STRING]=(0,Cy.getJDBCString)(d,g,h),c[kg.ATTR_DB_NAME]=h,c[kg.ATTR_DB_USER]=S,c[kg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&qd.SemconvStability.STABLE&&(c[Hv.ATTR_DB_SYSTEM_NAME]=Hv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Hv.ATTR_DB_NAMESPACE]=h,c[Hv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&qd.SemconvStability.OLD&&(c[kg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[kg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&qd.SemconvStability.STABLE&&(c[Hv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Hv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,Cy.getSpanName)(o),{kind:Gc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(hyt.AttributeNames.MYSQL_VALUES,(0,Cy.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),O=Gc.context.active();if(x===-1){let k=Gc.context.with(Gc.trace.setSpan(Gc.context.active(),v),()=>n.apply(t,arguments));return Gc.context.bind(O,k),k.on("error",F=>v.setStatus({code:Gc.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,O)),Gc.context.with(Gc.trace.setSpan(Gc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Gc.SpanStatusCode.ERROR,message:o.message}),t.end(),Gc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,Cy.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")})}};f4.MySQLInstrumentation=qK});var mNe=Q(A4=>{"use strict";m();Object.defineProperty(A4,"__esModule",{value:!0});A4.MySQLInstrumentation=void 0;var _yt=ANe();Object.defineProperty(A4,"MySQLInstrumentation",{enumerable:!0,get:function(){return _yt.MySQLInstrumentation}})});var gNe,hNe,_Ne,Eyt,ENe,SNe=N(()=>{m();gNe=ie(mNe(),1);mr();hNe="Mysql",_Ne=st(hNe,()=>new gNe.MySQLInstrumentation({})),Eyt=()=>({name:hNe,setupOnce(){_Ne()}}),ENe=Eyt});var YK=Q(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.DB_SYSTEM_VALUE_MYSQL=ns.ATTR_NET_PEER_PORT=ns.ATTR_NET_PEER_NAME=ns.ATTR_DB_USER=ns.ATTR_DB_SYSTEM=ns.ATTR_DB_STATEMENT=ns.ATTR_DB_NAME=ns.ATTR_DB_CONNECTION_STRING=void 0;ns.ATTR_DB_CONNECTION_STRING="db.connection_string";ns.ATTR_DB_NAME="db.name";ns.ATTR_DB_STATEMENT="db.statement";ns.ATTR_DB_SYSTEM="db.system";ns.ATTR_DB_USER="db.user";ns.ATTR_NET_PEER_NAME="net.peer.name";ns.ATTR_NET_PEER_PORT="net.peer.port";ns.DB_SYSTEM_VALUE_MYSQL="mysql"});var JK=Q(m4=>{"use strict";m();Object.defineProperty(m4,"__esModule",{value:!0});m4.addSqlCommenterComment=void 0;var KK=(je(),Me(We)),Syt=Tr();function yyt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Tyt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Iyt(e,t){if(typeof t!="string"||t.length===0||yyt(t))return t;let n=new Syt.W3CTraceContextPropagator,r={};n.inject(KK.trace.setSpan(KK.ROOT_CONTEXT,e),r,KK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=Tyt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}m4.addSqlCommenterComment=Iyt});var yNe=Q(Yd=>{"use strict";m();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.getConnectionPrototypeToInstrument=Yd.once=Yd.getSpanName=Yd.getQueryText=Yd.getConnectionAttributes=void 0;var oO=YK(),g4=on(),ZK=(Zn(),Me(Ur));function Cyt(e,t,n){let{host:r,port:o,database:i,user:a}=byt(e),c={};t&g4.SemconvStability.OLD&&(c[oO.ATTR_DB_CONNECTION_STRING]=vyt(r,o,i),c[oO.ATTR_DB_NAME]=i,c[oO.ATTR_DB_USER]=a),t&g4.SemconvStability.STABLE&&(c[ZK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&g4.SemconvStability.OLD&&(c[oO.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[oO.ATTR_NET_PEER_PORT]=d)),n&g4.SemconvStability.STABLE&&(c[ZK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[ZK.ATTR_SERVER_PORT]=d)),c}Yd.getConnectionAttributes=Cyt;function byt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function vyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Ryt(e,t,n,r=!1,o=xyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,Dyt(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"}}Yd.getQueryText=Ryt;function xyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function Dyt(e){return"values"in e}function Byt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Yd.getSpanName=Byt;var Nyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Yd.once=Nyt;function Oyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Yd.getConnectionPrototypeToInstrument=Oyt});var TNe=Q(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.60.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var vNe=Q(h4=>{"use strict";m();Object.defineProperty(h4,"__esModule",{value:!0});h4.MySQL2Instrumentation=void 0;var INe=(je(),Me(We)),df=on(),WK=YK(),CNe=JK(),$v=yNe(),bNe=TNe(),XK=(Zn(),Me(Ur)),eJ=[">=1.4.2 <4"],tJ=class extends df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(bNe.PACKAGE_NAME,bNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,df.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,df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,df.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 df.InstrumentationNodeModuleDefinition("mysql2",eJ,i=>(n(i),i),()=>{},[new df.InstrumentationNodeModuleFile("mysql2/promise.js",eJ,i=>(n(i),i),()=>{}),new df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",eJ,i=>{let a=(0,$v.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,$v.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,$v.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,$v.getQueryText)(i,t,d,g,h);o._dbSemconvStability&df.SemconvStability.OLD&&(y[WK.ATTR_DB_SYSTEM]=WK.DB_SYSTEM_VALUE_MYSQL,y[WK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&df.SemconvStability.STABLE&&(y[XK.ATTR_DB_SYSTEM_NAME]=XK.DB_SYSTEM_NAME_VALUE_MYSQL,y[XK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,$v.getSpanName)(i),{kind:INe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,CNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,CNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,$v.once)((O,k)=>{O?v.setStatus({code:INe.SpanStatusCode.ERROR,message:O.message}):typeof S=="function"&&(0,df.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let O=r.apply(this,arguments);return O.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),O}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)}}};h4.MySQL2Instrumentation=tJ});var RNe=Q(_4=>{"use strict";m();Object.defineProperty(_4,"__esModule",{value:!0});_4.MySQL2Instrumentation=void 0;var wyt=vNe();Object.defineProperty(_4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return wyt.MySQL2Instrumentation}})});var xNe,DNe,BNe,kyt,NNe,ONe=N(()=>{m();xNe=ie(RNe(),1);mr();DNe="Mysql2",BNe=st(DNe,()=>new xNe.MySQL2Instrumentation({responseHook(e){Qr(e,"auto.db.otel.mysql2")}})),kyt=()=>({name:DNe,setupOnce(){BNe()}}),NNe=kyt});var wNe=Q(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 kNe=Q(E4=>{"use strict";m();Object.defineProperty(E4,"__esModule",{value:!0});E4.endSpan=void 0;var Pyt=(je(),Me(We)),Myt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Pyt.SpanStatusCode.ERROR,message:t.message})),e.end()};E4.endSpan=Myt});var y4=Q(S4=>{"use strict";m();Object.defineProperty(S4,"__esModule",{value:!0});S4.defaultDbStatementSerializer=void 0;var Lyt=[{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=Lyt.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};S4.defaultDbStatementSerializer=Uyt});var PNe=Q(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.62.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var QNe=Q(T4=>{"use strict";m();Object.defineProperty(T4,"__esModule",{value:!0});T4.IORedisInstrumentation=void 0;var W_=(je(),Me(We)),jc=on(),X_=(Zn(),Me(Ur)),Hc=wNe(),MNe=on(),iO=kNe(),Qyt=y4(),LNe=PNe(),UNe={requireParentSpan:!0},nJ=class extends jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(LNe.PACKAGE_NAME,LNe.PACKAGE_VERSION,{...UNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...UNe,...t})}init(){return[new jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,jc.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||Qyt.defaultDbStatementSerializer,c=W_.trace.getSpan(W_.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&jc.SemconvStability.OLD&&(d[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,d[Hc.ATTR_DB_STATEMENT]=S,d[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&jc.SemconvStability.STABLE&&(d[X_.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,d[X_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&jc.SemconvStability.OLD&&(d[Hc.ATTR_NET_PEER_NAME]=g,d[Hc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&jc.SemconvStability.STABLE&&(d[X_.ATTR_SERVER_ADDRESS]=g,d[X_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:W_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,MNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&W_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,MNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),F=>{F&&W_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,iO.endSpan)(y,null),x(k)};let O=o.reject;return o.reject=function(k){(0,iO.endSpan)(y,k),O(k)},v}catch(v){throw(0,iO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=W_.trace.getSpan(W_.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&jc.SemconvStability.OLD&&(o[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,o[Hc.ATTR_DB_STATEMENT]="connect",o[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&jc.SemconvStability.STABLE&&(o[X_.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,o[X_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_NET_PEER_NAME]=i,o[Hc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&jc.SemconvStability.STABLE&&(o[X_.ATTR_SERVER_ADDRESS]=i,o[X_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:W_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,iO.endSpan)(c,null),d}catch(d){throw(0,iO.endSpan)(c,d),d}}}};T4.IORedisInstrumentation=nJ});var FNe=Q(I4=>{"use strict";m();Object.defineProperty(I4,"__esModule",{value:!0});I4.IORedisInstrumentation=void 0;var Fyt=QNe();Object.defineProperty(I4,"IORedisInstrumentation",{enumerable:!0,get:function(){return Fyt.IORedisInstrumentation}})});var C4=Q(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.62.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var GNe=Q(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.getTracedCreateStreamTrace=eE.getTracedCreateClient=eE.endSpan=void 0;var aO=(je(),Me(We)),Gyt=(e,t)=>{t&&e.setStatus({code:aO.SpanStatusCode.ERROR,message:t.message}),e.end()};eE.endSpan=Gyt;var jyt=e=>function(){let n=e.apply(this,arguments);return aO.context.bind(aO.context.active(),n)};eE.getTracedCreateClient=jyt;var Hyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){aO.context.bind(aO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};eE.getTracedCreateStreamTrace=Hyt});var b4=Q(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var HNe=Q(R4=>{"use strict";m();Object.defineProperty(R4,"__esModule",{value:!0});R4.RedisInstrumentationV2_V3=void 0;var Ql=on(),v4=GNe(),jNe=C4(),sO=(je(),Me(We)),uO=(Zn(),Me(Ur)),by=b4(),zyt=y4(),rJ=class e extends Ql.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(jNe.PACKAGE_NAME,jNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ql.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ql.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ql.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ql.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,Ql.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ql.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=sO.trace.getSpan(sO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||zyt.defaultDbStatementSerializer,g={};t._semconvStability&Ql.SemconvStability.OLD&&Object.assign(g,{[by.ATTR_DB_SYSTEM]:by.DB_SYSTEM_VALUE_REDIS,[by.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ql.SemconvStability.STABLE&&Object.assign(g,{[uO.ATTR_DB_SYSTEM_NAME]:by.DB_SYSTEM_NAME_VALUE_REDIS,[uO.ATTR_DB_OPERATION_NAME]:i.command,[uO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:sO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ql.SemconvStability.OLD&&Object.assign(y,{[by.ATTR_NET_PEER_NAME]:this.connection_options.host,[by.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ql.SemconvStability.STABLE&&Object.assign(y,{[uO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[uO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ql.SemconvStability.OLD&&h.setAttribute(by.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=sO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let O=a.responseHook;(0,Ql.safeExecuteInTheMiddle)(()=>{O(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,v4.endSpan)(h,v),sO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,v4.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,v4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,v4.getTracedCreateStreamTrace)(n)}}};R4.RedisInstrumentationV2_V3=rJ});var $Ne=Q(x4=>{"use strict";m();Object.defineProperty(x4,"__esModule",{value:!0});x4.getClientAttributes=void 0;var oJ=(Zn(),Me(Ur)),Yv=b4(),zNe=on();function $yt(e,t,n){let r={};return n&zNe.SemconvStability.OLD&&Object.assign(r,{[Yv.ATTR_DB_SYSTEM]:Yv.DB_SYSTEM_VALUE_REDIS,[Yv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Yv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Yv.ATTR_DB_CONNECTION_STRING]:Vyt(e,t?.url)}),n&zNe.SemconvStability.STABLE&&Object.assign(r,{[oJ.ATTR_DB_SYSTEM_NAME]:Yv.DB_SYSTEM_NAME_VALUE_REDIS,[oJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[oJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}x4.getClientAttributes=$yt;function Vyt(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 KNe=Q(D4=>{"use strict";m();Object.defineProperty(D4,"__esModule",{value:!0});D4.RedisInstrumentationV4_V5=void 0;var Kd=(je(),Me(We)),So=on(),VNe=$Ne(),qyt=y4(),qNe=C4(),iJ=(Zn(),Me(Ur)),Yyt=b4(),cO=Symbol("opentelemetry.instrumentation.redis.open_spans"),YNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),aJ=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(qNe.PACKAGE_NAME,qNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,g){let h=t(d,g).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[cO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[cO];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[YNe]=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,VNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Kd.SpanKind.CLIENT,attributes:a});return Kd.context.with(Kd.trace.setSpan(Kd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:Kd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(Kd.trace.getSpan(Kd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[YNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||qyt.defaultDbStatementSerializer,h=(0,VNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[iJ.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Yyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[iJ.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:Kd.SpanKind.CLIENT,attributes:h}),y=Kd.context.with(Kd.trace.setSpan(Kd.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[cO]=C[cO]||[],C[cO].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(iJ.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:Kd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};D4.RedisInstrumentationV4_V5=aJ});var WNe=Q(B4=>{"use strict";m();Object.defineProperty(B4,"__esModule",{value:!0});B4.RedisInstrumentation=void 0;var Kyt=on(),JNe=C4(),Jyt=HNe(),Zyt=KNe(),ZNe={requireParentSpan:!1},sJ=class extends Kyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...ZNe,...t};super(JNe.PACKAGE_NAME,JNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Jyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Zyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...ZNe,...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())}};B4.RedisInstrumentation=sJ});var XNe=Q(N4=>{"use strict";m();Object.defineProperty(N4,"__esModule",{value:!0});N4.RedisInstrumentation=void 0;var Wyt=WNe();Object.defineProperty(N4,"RedisInstrumentation",{enumerable:!0,get:function(){return Wyt.RedisInstrumentation}})});function lO(e,t){return e.includes(t.toLowerCase())}function cJ(e){return lO(uJ,e)?"cache.get":lO(eTt,e)?"cache.put":void 0}function tTt(e,t){return t.some(n=>e.startsWith(n))}function tOe(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)?eOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return lO(Xyt,e)&&r!=null?n(r):eOe(t.map(o=>n(o)))}catch{return}}function nOe(e,t,n){if(!cJ(e))return!1;for(let r of t)if(tTt(r,n))return!0;return!1}function rOe(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 eOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Xyt,uJ,eTt,oOe=N(()=>{m();Xyt=["get","set","setex"],uJ=["get","mget"],eTt=["set","setex"]});var iOe,aOe,O4,dO,sOe,nTt,rTt,uOe,oTt,cOe,lOe=N(()=>{m();iOe=ie(FNe(),1),aOe=ie(XNe(),1);dt();mr();oOe();O4="Redis",dO={},sOe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=tOe(t,n),i=cJ(t);if(!o||!i||!dO.cachePrefixes||!nOe(t,o,dO.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=rOe(r);d&&e.setAttribute(fV,d),lO(uJ,t)&&d!==void 0&&e.setAttribute(dV,d>0),e.setAttributes({[Xt]:i,[pV]:o});let g=o.join(", ");e.updateName(dO.maxCacheKeyLength?m_(g,dO.maxCacheKeyLength):g)},nTt=st(`${O4}.IORedis`,()=>new iOe.IORedisInstrumentation({responseHook:sOe})),rTt=st(`${O4}.Redis`,()=>new aOe.RedisInstrumentation({responseHook:sOe})),uOe=Object.assign(()=>{nTt(),rTt()},{id:O4}),oTt=(e={})=>({name:O4,setupOnce(){dO=e,uOe()}}),cOe=oTt});var dOe=Q(w4=>{"use strict";m();Object.defineProperty(w4,"__esModule",{value:!0});w4.EVENT_LISTENERS_SET=void 0;w4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var lJ=Q(pO=>{"use strict";m();Object.defineProperty(pO,"__esModule",{value:!0});pO.AttributeNames=void 0;var iTt;(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"})(iTt=pO.AttributeNames||(pO.AttributeNames={}))});var dJ=Q(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 pJ=Q(fO=>{"use strict";m();Object.defineProperty(fO,"__esModule",{value:!0});fO.SpanNames=void 0;var aTt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(aTt=fO.SpanNames||(fO.SpanNames={}))});var _Oe=Q(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var tE=(je(),Me(We)),k4=lJ(),Jd=(Zn(),Me(Ur)),fi=dJ(),vy=on(),pOe=pJ();function fOe(e,t){if(!t)return pOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:AOe(t.text);return`${pOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=fOe;function AOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}or.parseNormalizedOperationName=AOe;function mOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=mOe;function fJ(e){if("connectionString"in e&&e.connectionString)return mOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=fJ;function P4(e){if(Number.isInteger(e))return e}function gOe(e,t){let n={};return t&vy.SemconvStability.OLD&&(n={...n,[fi.ATTR_DB_SYSTEM]:fi.DB_SYSTEM_VALUE_POSTGRESQL,[fi.ATTR_DB_NAME]:e.database,[fi.ATTR_DB_CONNECTION_STRING]:fJ(e),[fi.ATTR_DB_USER]:e.user,[fi.ATTR_NET_PEER_NAME]:e.host,[fi.ATTR_NET_PEER_PORT]:P4(e.port)}),t&vy.SemconvStability.STABLE&&(n={...n,[Jd.ATTR_DB_SYSTEM_NAME]:Jd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Jd.ATTR_DB_NAMESPACE]:e.namespace,[Jd.ATTR_SERVER_ADDRESS]:e.host,[Jd.ATTR_SERVER_PORT]:P4(e.port)}),n}or.getSemanticAttributesFromConnection=gOe;function sTt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[k4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[k4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&vy.SemconvStability.OLD&&(r={...r,[fi.ATTR_DB_SYSTEM]:fi.DB_SYSTEM_VALUE_POSTGRESQL,[fi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[fi.ATTR_DB_CONNECTION_STRING]:fJ(e),[fi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[fi.ATTR_NET_PEER_PORT]:Number(n?.port)||P4(e.port),[fi.ATTR_DB_USER]:n?.username??e.user}),t&vy.SemconvStability.STABLE&&(r={...r,[Jd.ATTR_DB_SYSTEM_NAME]:Jd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Jd.ATTR_DB_NAMESPACE]:e.namespace,[Jd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Jd.ATTR_SERVER_PORT]:Number(n?.port)||P4(e.port)}),r}or.getSemanticAttributesFromPoolConnection=sTt;function uTt(e){return e.requireParentSpan===!0&&tE.trace.getSpan(tE.context.active())===void 0}or.shouldSkipInstrumentation=uTt;function cTt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=fOe(i,r),c=e.startSpan(a,{kind:tE.SpanKind.CLIENT,attributes:gOe(o,n)});if(!r)return c;if(r.text&&(n&vy.SemconvStability.OLD&&c.setAttribute(fi.ATTR_DB_STATEMENT,r.text),n&vy.SemconvStability.STABLE&&c.setAttribute(Jd.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(k4.AttributeNames.PG_VALUES,d)}catch(d){tE.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(k4.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=cTt;function hOe(e,t,n){typeof e.responseHook=="function"&&(0,vy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&tE.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=hOe;function lTt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Jd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(M4(a)),t.setStatus({code:tE.SpanStatusCode.ERROR,message:a.message})):hOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=lTt;function dTt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}or.getPoolName=dTt;function pTt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[fi.ATTR_DB_CLIENT_CONNECTION_STATE]:fi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[fi.ATTR_DB_CLIENT_CONNECTION_STATE]:fi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=pTt;function fTt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(M4(r)),e.setStatus({code:tE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=fTt;function ATt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(M4(r)),e.setStatus({code:tE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=ATt;function mTt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=mTt;function gTt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=gTt;function M4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=M4});var EOe=Q(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.66.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var bOe=Q(U4=>{"use strict";m();Object.defineProperty(U4,"__esModule",{value:!0});U4.PgInstrumentation=void 0;var $u=on(),Gr=(je(),Me(We)),SOe=dOe(),Jo=_Oe(),yOe=JK(),TOe=EOe(),IOe=pJ(),L4=Tr(),pf=(Zn(),Me(Ur)),AO=dJ();function Jv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var AJ=class extends $u.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,t),this._semconvStability=(0,$u.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(pf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Gr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(AO.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(AO.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 $u.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new $u.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new $u.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Jv(c);return this._patchPgClient(d.Client),c},c=>{let d=Jv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new $u.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Jv(c);return(0,$u.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Jv(c);(0,$u.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Jv(t);return(0,$u.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,$u.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=Jv(t);return(0,$u.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,$u.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Jo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(IOe.SpanNames.CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Jo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Jo.patchClientConnectCallback(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return COe(a,c)}}recordOperationDuration(t,n){let r={},o=[pf.ATTR_DB_NAMESPACE,pf.ATTR_ERROR_TYPE,pf.ATTR_SERVER_PORT,pf.ATTR_SERVER_ADDRESS,pf.ATTR_DB_OPERATION_NAME];this._semconvStability&$u.SemconvStability.OLD&&o.push(AO.ATTR_DB_SYSTEM),this._semconvStability&$u.SemconvStability.STABLE&&o.push(pf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,L4.hrTimeToMilliseconds)((0,L4.hrTimeDuration)(n,(0,L4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Jo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,L4.hrTime)(),a=o[0],c=typeof a=="string",d=Jo.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={[AO.ATTR_DB_SYSTEM]:AO.DB_SYSTEM_VALUE_POSTGRESQL,[pf.ATTR_DB_NAMESPACE]:this.database,[pf.ATTR_SERVER_PORT]:this.connectionParameters.port,[pf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[pf.ATTR_DB_OPERATION_NAME]=Jo.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Jo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,yOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,yOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let O=Gr.trace.getSpan(Gr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Jo.patchCallback(y,C,o[o.length-1],h,S),O&&(o[o.length-1]=Gr.context.bind(Gr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Jo.patchCallback(t.getConfig(),C,g.callback,h,S);O&&(k=Gr.context.bind(Gr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,$u.safeExecuteInTheMiddle)(()=>{let{database:O,host:k,port:F,user:j}=this.connectionParameters;v(C,{connection:{database:O,host:k,port:F,user:j},query:{text:g.text,values:g.values,name:g.name}})},O=>{O&&t._diag.error("Error running query hook",O)},!0);let x;try{x=n.apply(this,o)}catch(O){throw O instanceof Error&&C.recordException(Jo.sanitizedErrorMessage(O)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:Jo.getErrorMessage(O)}),C.end(),O}return x instanceof Promise?x.then(O=>new Promise(k=>{Jo.handleExecutionResult(t.getConfig(),C,O),S(),C.end(),k(O)})).catch(O=>new Promise((k,F)=>{O instanceof Error&&C.recordException(Jo.sanitizedErrorMessage(O)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:O.message}),S(),C.end(),F(O)})):x})}_setPoolConnectEventListeners(t){if(t[SOe.EVENT_LISTENERS_SET])return;let n=Jo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[SOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Jo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(IOe.SpanNames.POOL_CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Jo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Jo.patchCallbackPGPool(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return COe(a,c)}}};U4.PgInstrumentation=AJ;function COe(e,t){if(!(t instanceof Promise))return t;let n=t;return Gr.context.bind(Gr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Jo.sanitizedErrorMessage(r)),e.setStatus({code:Gr.SpanStatusCode.ERROR,message:Jo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var vOe=Q(Zv=>{"use strict";m();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.AttributeNames=Zv.PgInstrumentation=void 0;var hTt=bOe();Object.defineProperty(Zv,"PgInstrumentation",{enumerable:!0,get:function(){return hTt.PgInstrumentation}});var _Tt=lJ();Object.defineProperty(Zv,"AttributeNames",{enumerable:!0,get:function(){return _Tt.AttributeNames}})});var ROe,xOe,DOe,ETt,BOe,NOe=N(()=>{m();ROe=ie(vOe(),1);mr();xOe="Postgres",DOe=st(xOe,ROe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),ETt=e=>({name:xOe,setupOnce(){DOe(e)}}),BOe=ETt});var nE,gJ,OOe,STt,yTt,wOe,mJ,TTt,kOe,POe=N(()=>{m();je();nE=ie(on(),1);Zn();dt();mr();gy();gJ="PostgresJs",OOe=[">=3.0.0 <4"],STt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,yTt=Symbol.for("sentry.query.from.instrumented.sql"),wOe=st(gJ,e=>new mJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),mJ=class extends nE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new nE.InstrumentationNodeModuleDefinition("postgres",OOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ia&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new nE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,OOe,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 Ia&&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 Ia&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return mq(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:(cN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return zt.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(rb,r);return}let o=n?.match(STt);o?.[1]&&t.setAttribute(rb,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[yTt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Wa({name:a||"postgresjs.query",op:"db"},c=>{Qr(c,"auto.db.postgresjs"),c.setAttributes({[PS]:"postgres",[R5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,nE.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ia&&J.error(`Error in requestHook for ${gJ} 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){Ia&&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(x5,v?.[0]?.code||"unknown"),c.setAttribute(D5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ia&&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}},TTt=e=>({name:gJ,setupOnce(){wOe(e)}}),kOe=TTt});var MOe=Q(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.SeverityNumber=void 0;var ITt;(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"})(ITt=mO.SeverityNumber||(mO.SeverityNumber={}))});var F4=Q(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.NOOP_LOGGER=Wv.NoopLogger=void 0;var Q4=class{emit(t){}};Wv.NoopLogger=Q4;Wv.NOOP_LOGGER=new Q4});var j4=Q(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.NOOP_LOGGER_PROVIDER=Xv.NoopLoggerProvider=void 0;var CTt=F4(),G4=class{getLogger(t,n,r){return new CTt.NoopLogger}};Xv.NoopLoggerProvider=G4;Xv.NOOP_LOGGER_PROVIDER=new G4});var _J=Q(H4=>{"use strict";m();Object.defineProperty(H4,"__esModule",{value:!0});H4.ProxyLogger=void 0;var bTt=F4(),hJ=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):bTt.NOOP_LOGGER}};H4.ProxyLogger=hJ});var SJ=Q(z4=>{"use strict";m();Object.defineProperty(z4,"__esModule",{value:!0});z4.ProxyLoggerProvider=void 0;var vTt=j4(),RTt=_J(),EJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new RTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:vTt.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)}};z4.ProxyLoggerProvider=EJ});var LOe=Q($4=>{"use strict";m();Object.defineProperty($4,"__esModule",{value:!0});$4._globalThis=void 0;$4._globalThis=typeof globalThis=="object"?globalThis:global});var UOe=Q(V4=>{"use strict";m();Object.defineProperty(V4,"__esModule",{value:!0});V4._globalThis=void 0;var xTt=LOe();Object.defineProperty(V4,"_globalThis",{enumerable:!0,get:function(){return xTt._globalThis}})});var QOe=Q(q4=>{"use strict";m();Object.defineProperty(q4,"__esModule",{value:!0});q4._globalThis=void 0;var DTt=UOe();Object.defineProperty(q4,"_globalThis",{enumerable:!0,get:function(){return DTt._globalThis}})});var FOe=Q(QA=>{"use strict";m();Object.defineProperty(QA,"__esModule",{value:!0});QA.API_BACKWARDS_COMPATIBILITY_VERSION=QA.makeGetter=QA._global=QA.GLOBAL_LOGS_API_KEY=void 0;var BTt=QOe();QA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");QA._global=BTt._globalThis;function NTt(e,t,n){return r=>r===e?t:n}QA.makeGetter=NTt;QA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var jOe=Q(Y4=>{"use strict";m();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.LogsAPI=void 0;var Zd=FOe(),OTt=j4(),GOe=SJ(),yJ=class e{constructor(){this._proxyLoggerProvider=new GOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Zd._global[Zd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Zd._global[Zd.GLOBAL_LOGS_API_KEY]=(0,Zd.makeGetter)(Zd.API_BACKWARDS_COMPATIBILITY_VERSION,t,OTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Zd._global[Zd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Zd._global,Zd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Zd._global[Zd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new GOe.ProxyLoggerProvider}};Y4.LogsAPI=yJ});var TJ=Q(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.logs=rs.ProxyLoggerProvider=rs.ProxyLogger=rs.NoopLoggerProvider=rs.NOOP_LOGGER_PROVIDER=rs.NoopLogger=rs.NOOP_LOGGER=rs.SeverityNumber=void 0;var wTt=MOe();Object.defineProperty(rs,"SeverityNumber",{enumerable:!0,get:function(){return wTt.SeverityNumber}});var HOe=F4();Object.defineProperty(rs,"NOOP_LOGGER",{enumerable:!0,get:function(){return HOe.NOOP_LOGGER}});Object.defineProperty(rs,"NoopLogger",{enumerable:!0,get:function(){return HOe.NoopLogger}});var zOe=j4();Object.defineProperty(rs,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return zOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rs,"NoopLoggerProvider",{enumerable:!0,get:function(){return zOe.NoopLoggerProvider}});var kTt=_J();Object.defineProperty(rs,"ProxyLogger",{enumerable:!0,get:function(){return kTt.ProxyLogger}});var PTt=SJ();Object.defineProperty(rs,"ProxyLoggerProvider",{enumerable:!0,get:function(){return PTt.ProxyLoggerProvider}});var MTt=jOe();rs.logs=MTt.LogsAPI.getInstance()});var $Oe=Q(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.disableInstrumentations=eR.enableInstrumentations=void 0;function LTt(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()}}eR.enableInstrumentations=LTt;function UTt(e){e.forEach(t=>t.disable())}eR.disableInstrumentations=UTt});var YOe=Q(K4=>{"use strict";m();Object.defineProperty(K4,"__esModule",{value:!0});K4.registerInstrumentations=void 0;var VOe=(je(),Me(We)),QTt=TJ(),qOe=$Oe();function FTt(e){let t=e.tracerProvider||VOe.trace.getTracerProvider(),n=e.meterProvider||VOe.metrics.getMeterProvider(),r=e.loggerProvider||QTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,qOe.enableInstrumentations)(o,t,n,r),()=>{(0,qOe.disableInstrumentations)(o)}}K4.registerInstrumentations=FTt});var rwe=Q(J4=>{"use strict";m();Object.defineProperty(J4,"__esModule",{value:!0});J4.satisfies=void 0;var vJ=(je(),Me(We)),XOe=/^(?: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-]+)*))?$/,GTt=/^(?<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-]+)*))?$/,jTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function HTt(e,t,n){if(!zTt(e))return vJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=YTt(e);if(!r)return!1;let o=[],i=ewe(r,t,o,n);return i&&!n?.includePrerelease?VTt(r,o):i}J4.satisfies=HTt;function zTt(e){return typeof e=="string"&&XOe.test(e)}function ewe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(IJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=mIt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!IJ(e,i,n,r))return!1;return!0}return IJ(e,t,n,r)}function IJ(e,t,n,r){if(t=qTt(t,r),t.includes(" "))return ewe(e,t,n,r);{let o=KTt(t);return n.push(o),$Tt(e,o)}}function $Tt(e,t){if(t.invalid)return!1;if(!t.version||bJ(t.version))return!0;let n=JOe(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=JOe(r,o)}return jTt[t.op]?.includes(n)}function VTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function qTt(e,t){return e=e.trim(),e=fIt(e,t),e=pIt(e),e=AIt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function YTt(e){let t=e.match(XOe);if(!t){vJ.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 KTt(e){if(!e)return{};let t=e.match(GTt);if(!t)return vJ.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 bJ(e){return e==="*"||e==="x"||e==="X"}function KOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function JTt(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 ZTt(e,t){if(bJ(e)||bJ(t))return 0;let[n,r]=JTt(KOe(e),KOe(t));return n>r?1:n<r?-1:0}function JOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=ZTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var twe="[a-zA-Z0-9-]",nwe="0|[1-9]\\d*",WTt=`\\d*[a-zA-Z-]${twe}*`,XTt="((?:<|>)?=?)",ZOe=`(?:${nwe}|${WTt})`,eIt=`(?:-(${ZOe}(?:\\.${ZOe})*))`,WOe=`${twe}+`,tIt=`(?:\\+(${WOe}(?:\\.${WOe})*))`,CJ=`${nwe}|x|X|\\*`,gO=`[v=\\s]*(${CJ})(?:\\.(${CJ})(?:\\.(${CJ})(?:${eIt})?${tIt}?)?)?`,nIt=`^${XTt}\\s*${gO}$`,rIt=new RegExp(nIt),oIt=`^\\s*(${gO})\\s+-\\s+(${gO})\\s*$`,iIt=new RegExp(oIt),aIt="(?:~>?)",sIt=`^${aIt}${gO}$`,uIt=new RegExp(sIt),cIt="(?:\\^)",lIt=`^${cIt}${gO}$`,dIt=new RegExp(lIt);function pIt(e){let t=uIt;return e.replace(t,(n,r,o,i,a)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(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 fIt(e,t){let n=dIt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Vu(i)?g="":Vu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(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 AIt(e,t){let n=rIt;return e.replace(n,(r,o,i,a,c,d)=>{let g=Vu(i),h=g||Vu(a),S=h||Vu(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 mIt(e,t){let n=iIt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Vu(i)?o="":Vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(S)?h="":Vu(y)?h=`<${+S+1}.0.0-0`:Vu(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 RJ=Q(ws=>{"use strict";m();Object.defineProperty(ws,"__esModule",{value:!0});ws.massUnwrap=ws.unwrap=ws.massWrap=ws.wrap=void 0;var qu=console.error.bind(console);function hO(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 gIt=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return hO(o,"__original",r),hO(o,"__unwrap",()=>{e[t]===o&&hO(e,t,r)}),hO(o,"__wrapped",!0),hO(e,t,o),o};ws.wrap=gIt;var hIt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ws.wrap)(r,o,n)})})};ws.massWrap=hIt;var _It=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ws.unwrap=_It;var EIt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ws.unwrap)(n,r)})})};ws.massUnwrap=EIt;function _O(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}ws.default=_O;_O.wrap=ws.wrap;_O.massWrap=ws.massWrap;_O.unwrap=ws.unwrap;_O.massUnwrap=ws.massUnwrap});var owe=Q(W4=>{"use strict";m();Object.defineProperty(W4,"__esModule",{value:!0});W4.InstrumentationAbstract=void 0;var xJ=(je(),Me(We)),SIt=TJ(),Z4=RJ(),DJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=xJ.diag.createComponentLogger({namespace:t}),this._tracer=xJ.trace.getTracer(t,n),this._meter=xJ.metrics.getMeter(t,n),this._logger=SIt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z4.wrap;_unwrap=Z4.unwrap;_massWrap=Z4.massWrap;_massUnwrap=Z4.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)}}};W4.InstrumentationAbstract=DJ});var iwe=Q(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.ModuleNameTrie=rE.ModuleNameSeparator=void 0;rE.ModuleNameSeparator="/";var X4=class{hooks=[];children=new Map},BJ=class{_trie=new X4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(rE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new X4,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(rE.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))}};rE.ModuleNameTrie=BJ});var swe=Q(e3=>{"use strict";m();Object.defineProperty(e3,"__esModule",{value:!0});e3.RequireInTheMiddleSingleton=void 0;var yIt=GS(),awe=Ge("path"),NJ=iwe(),TIt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),OJ=class e{_moduleNameTrie=new NJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new yIt.Hook(null,{internals:!0},(t,n,r)=>{let o=IIt(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 TIt?new e:this._instance=this._instance??new e}};e3.RequireInTheMiddleSingleton=OJ;function IIt(e){return awe.sep!==NJ.ModuleNameSeparator?e.split(awe.sep).join(NJ.ModuleNameSeparator):e}});var wJ=Q(oE=>{"use strict";m();Object.defineProperty(oE,"__esModule",{value:!0});oE.isWrapped=oE.safeExecuteInTheMiddleAsync=oE.safeExecuteInTheMiddle=void 0;function CIt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}oE.safeExecuteInTheMiddle=CIt;async function bIt(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}}oE.safeExecuteInTheMiddleAsync=bIt;function vIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}oE.isWrapped=vIt});var lwe=Q(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.InstrumentationBase=void 0;var EO=Ge("path"),uwe=Ge("util"),RIt=rwe(),kJ=RJ(),xIt=owe(),DIt=swe(),BIt=AK(),SO=(je(),Me(We)),NIt=GS(),OIt=Ge("fs"),wIt=wJ(),PJ=class extends xIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=DIt.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,wIt.isWrapped)(t[n])&&this._unwrap(t,n),uwe.types.isProxy(t)){let o=(0,kJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,kJ.wrap)(t,n,r)};_unwrap=(t,n)=>uwe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,kJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{SO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){SO.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{SO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){SO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,OIt.readFileSync)(EO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{SO.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 cwe(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=EO.normalize(r);return a.filter(g=>g.name===c).filter(g=>cwe(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&&EO.isAbsolute(c)){let g=EO.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=EO.isAbsolute(t.name)?new NIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new BIt.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}};t3.InstrumentationBase=PJ;function cwe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,RIt.satisfies)(t,r,{includePrerelease:n}))}});var dwe=Q(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.normalize=void 0;var kIt=Ge("path");Object.defineProperty(n3,"normalize",{enumerable:!0,get:function(){return kIt.normalize}})});var pwe=Q(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.normalize=tR.InstrumentationBase=void 0;var PIt=lwe();Object.defineProperty(tR,"InstrumentationBase",{enumerable:!0,get:function(){return PIt.InstrumentationBase}});var MIt=dwe();Object.defineProperty(tR,"normalize",{enumerable:!0,get:function(){return MIt.normalize}})});var MJ=Q(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.normalize=nR.InstrumentationBase=void 0;var fwe=pwe();Object.defineProperty(nR,"InstrumentationBase",{enumerable:!0,get:function(){return fwe.InstrumentationBase}});Object.defineProperty(nR,"normalize",{enumerable:!0,get:function(){return fwe.normalize}})});var Awe=Q(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.InstrumentationNodeModuleDefinition=void 0;var LJ=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||[]}};r3.InstrumentationNodeModuleDefinition=LJ});var mwe=Q(o3=>{"use strict";m();Object.defineProperty(o3,"__esModule",{value:!0});o3.InstrumentationNodeModuleFile=void 0;var LIt=MJ(),UJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,LIt.normalize)(t)}};o3.InstrumentationNodeModuleFile=UJ});var gwe=Q(Ry=>{"use strict";m();Object.defineProperty(Ry,"__esModule",{value:!0});Ry.semconvStabilityFromStr=Ry.SemconvStability=void 0;var i3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(i3=Ry.SemconvStability||(Ry.SemconvStability={}));function UIt(e,t){let n=i3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=i3.DUPLICATE;break}else o.toLowerCase()===e&&(n=i3.STABLE);return n}Ry.semconvStabilityFromStr=UIt});var _we=Q(oa=>{"use strict";m();Object.defineProperty(oa,"__esModule",{value:!0});oa.semconvStabilityFromStr=oa.SemconvStability=oa.safeExecuteInTheMiddleAsync=oa.safeExecuteInTheMiddle=oa.isWrapped=oa.InstrumentationNodeModuleFile=oa.InstrumentationNodeModuleDefinition=oa.InstrumentationBase=oa.registerInstrumentations=void 0;var QIt=YOe();Object.defineProperty(oa,"registerInstrumentations",{enumerable:!0,get:function(){return QIt.registerInstrumentations}});var FIt=MJ();Object.defineProperty(oa,"InstrumentationBase",{enumerable:!0,get:function(){return FIt.InstrumentationBase}});var GIt=Awe();Object.defineProperty(oa,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return GIt.InstrumentationNodeModuleDefinition}});var jIt=mwe();Object.defineProperty(oa,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return jIt.InstrumentationNodeModuleFile}});var QJ=wJ();Object.defineProperty(oa,"isWrapped",{enumerable:!0,get:function(){return QJ.isWrapped}});Object.defineProperty(oa,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return QJ.safeExecuteInTheMiddle}});Object.defineProperty(oa,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return QJ.safeExecuteInTheMiddleAsync}});var hwe=gwe();Object.defineProperty(oa,"SemconvStability",{enumerable:!0,get:function(){return hwe.SemconvStability}});Object.defineProperty(oa,"semconvStabilityFromStr",{enumerable:!0,get:function(){return hwe.semconvStabilityFromStr}})});function $It(){let e=rR[GJ];return e?.helper?e.helper:rR[FJ]?.helper}function VIt(e){let t={helper:e};rR[GJ]=t,rR[FJ]=t}function qIt(){delete rR[GJ],delete rR[FJ]}function JIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function ywe(e,t,n,r,o){if(Twe(t.name,o))return;let i={attributes:t.attributes,kind:JIt(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)ywe(e,d,n,r,o);a.end(t.endTime)})}function Ewe(e,t){return WIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function WIt(e){return e!=null&&typeof e.then=="function"}function Twe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var a3,HIt,zIt,FJ,GJ,rR,YIt,KIt,ZIt,Iwe,Swe,XIt,eCt,Cwe,bwe=N(()=>{m();je();a3=ie(_we(),1);je();HIt={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"}},zIt=HIt.version.split(".")[0],FJ="PRISMA_INSTRUMENTATION",GJ=`V${zIt}_PRISMA_INSTRUMENTATION`,rR=globalThis;YIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",KIt="00-10-10-00";ZIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=zt.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:KIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)ywe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!YIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Twe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return Ewe(i,t(i,r))}return n.startActiveSpan(o,e,i=>Ewe(i,t(i,r)))}};Iwe={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},Swe=Iwe.version,XIt=Iwe.name,eCt="@prisma/client",Cwe=class extends a3.InstrumentationBase{tracerProvider;constructor(e={}){super(XIt,Swe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new a3.InstrumentationNodeModuleDefinition(eCt,[Swe])]}enable(){let e=this._config;VIt(new ZIt({tracerProvider:this.tracerProvider??zt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){qIt()}isEnabled(){return $It()!==void 0}}});function tCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function Rwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function nCt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var vwe,jJ,rCt,xwe,Dwe=N(()=>{m();je();bwe();dt();mr();vwe="Prisma";jJ=class extends Cwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=Rwe();tCt(t)&&(t.createEngineSpan=n=>{let r=zt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){qo(()=>{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=nCt(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:Js.SAMPLED}})),S=zt.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Js.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}})}};rCt=st(vwe,e=>new jJ(e)),xwe=e=>({name:vwe,setupOnce(){rCt(e)},setup(t){Rwe()&&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 Bwe=Q(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.PACKAGE_NAME=oR.PACKAGE_VERSION=void 0;oR.PACKAGE_VERSION="0.60.0";oR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var HJ=Q(FA=>{"use strict";m();Object.defineProperty(FA,"__esModule",{value:!0});FA.HapiLifecycleMethodNames=FA.HapiLayerType=FA.handlerPatched=FA.HapiComponentName=void 0;FA.HapiComponentName="@hapi/hapi";FA.handlerPatched=Symbol("hapi-handler-patched");FA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};FA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var Nwe=Q(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.ATTR_HTTP_METHOD=void 0;s3.ATTR_HTTP_METHOD="http.method"});var zJ=Q(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var oCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(oCt=yO.AttributeNames||(yO.AttributeNames={}))});var kwe=Q(ia=>{"use strict";m();Object.defineProperty(ia,"__esModule",{value:!0});ia.getPluginFromInput=ia.getExtMetadata=ia.getRouteMetadata=ia.isPatchableExtMethod=ia.isDirectExtInput=ia.isLifecycleExtEventObj=ia.isLifecycleExtType=ia.getPluginName=void 0;var Owe=(Zn(),Me(Ur)),iCt=Nwe(),TO=HJ(),iE=zJ(),wwe=on();function aCt(e){return e.name?e.name:e.pkg.name}ia.getPluginName=aCt;var sCt=e=>typeof e=="string"&&TO.HapiLifecycleMethodNames.has(e);ia.isLifecycleExtType=sCt;var uCt=e=>{let t=e?.type;return t!==void 0&&(0,ia.isLifecycleExtType)(t)};ia.isLifecycleExtEventObj=uCt;var cCt=e=>Array.isArray(e)&&e.length<=3&&(0,ia.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ia.isDirectExtInput=cCt;var lCt=e=>!Array.isArray(e);ia.isPatchableExtMethod=lCt;var dCt=(e,t,n)=>{let r={[Owe.ATTR_HTTP_ROUTE]:e.path};t&wwe.SemconvStability.OLD&&(r[iCt.ATTR_HTTP_METHOD]=e.method),t&wwe.SemconvStability.STABLE&&(r[Owe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[iE.AttributeNames.HAPI_TYPE]=TO.HapiLayerType.PLUGIN,r[iE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[iE.AttributeNames.HAPI_TYPE]=TO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ia.getRouteMetadata=dCt;var pCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[iE.AttributeNames.EXT_TYPE]:e,[iE.AttributeNames.HAPI_TYPE]:TO.HapiLayerType.EXT,[iE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[iE.AttributeNames.EXT_TYPE]:e,[iE.AttributeNames.HAPI_TYPE]:TO.HapiLayerType.EXT},name:r}};ia.getExtMetadata=pCt;var fCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ia.getPluginFromInput=fCt});var Lwe=Q(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.HapiInstrumentation=void 0;var Fl=(je(),Me(We)),Pwe=Tr(),IO=on(),Mwe=Bwe(),CO=HJ(),Pg=kwe(),$J=class extends IO.InstrumentationBase{_semconvStability;constructor(t={}){super(Mwe.PACKAGE_NAME,Mwe.PACKAGE_VERSION,t),this._semconvStability=(0,IO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new IO.InstrumentationNodeModuleDefinition(CO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,IO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,IO.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,Pg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Pg.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,Pg.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,Pg.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,Pg.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,Pg.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,Pg.isPatchableExtMethod)(t))return t[CO.handlerPatched]===!0?t:(t[CO.handlerPatched]=!0,async function(...a){if(Fl.trace.getSpan(Fl.context.active())===void 0)return await t.apply(this,a);let c=(0,Pg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Fl.context.with(Fl.trace.setSpan(Fl.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Fl.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[CO.handlerPatched]===!0)return t;t[CO.handlerPatched]=!0;let o=i=>async function(...a){if(Fl.trace.getSpan(Fl.context.active())===void 0)return await i.call(this,...a);let c=(0,Pwe.getRPCMetadata)(Fl.context.active());c?.type===Pwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Pg.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Fl.context.with(Fl.trace.setSpan(Fl.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Fl.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}};u3.HapiInstrumentation=$J});var Uwe=Q(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.AttributeNames=iR.HapiInstrumentation=void 0;var ACt=Lwe();Object.defineProperty(iR,"HapiInstrumentation",{enumerable:!0,get:function(){return ACt.HapiInstrumentation}});var mCt=zJ();Object.defineProperty(iR,"AttributeNames",{enumerable:!0,get:function(){return mCt.AttributeNames}})});var Qwe,Fwe,Gwe,gCt,jwe,Hwe=N(()=>{m();Qwe=ie(Uwe(),1);mr();Fwe="Hapi",Gwe=st(Fwe,()=>new Qwe.HapiInstrumentation),gCt=()=>({name:Fwe,setupOnce(){Gwe()}}),jwe=gCt});var aE,bO,VJ=N(()=>{m();aE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},bO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var l3,hCt,_Ct,c3,zwe=N(()=>{m();je();l3=ie(on(),1);dt();VJ();hCt="@sentry/instrumentation-hono",_Ct="0.0.1",c3=class extends l3.InstrumentationBase{constructor(t={}){super(hCt,_Ct,t)}init(){return[new l3.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(zt.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Cs(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[aE.HONO_TYPE]:g,[aE.HONO_NAME]:g===bO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[aE.HONO_TYPE]:d,[aE.HONO_NAME]:d===bO.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 Cs(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?bO.MIDDLEWARE:bO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ci.ERROR,message:n.message}),t.recordException(n))}}});function ECt(e){let t=Ot(e).data,n=t[aE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[aE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),bn()===Md()){Ia&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ug],i=t[MS];typeof o=="string"&&typeof i=="string"&&bn().setTransactionName(`${i} ${o}`)}var $we,Vwe,SCt,qwe,Ywe=N(()=>{m();Zn();dt();mr();gy();VJ();zwe();$we="Hono";Vwe=st($we,()=>new c3({responseHook:e=>{ECt(e)}})),SCt=()=>({name:$we,setupOnce(){Vwe()}}),qwe=SCt});var d3=Q(vO=>{"use strict";m();Object.defineProperty(vO,"__esModule",{value:!0});vO.KoaLayerType=void 0;var yCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(yCt=vO.KoaLayerType||(vO.KoaLayerType={}))});var Kwe=Q(aR=>{"use strict";m();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.62.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var qJ=Q(RO=>{"use strict";m();Object.defineProperty(RO,"__esModule",{value:!0});RO.AttributeNames=void 0;var TCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(TCt=RO.AttributeNames||(RO.AttributeNames={}))});var Zwe=Q(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.isLayerIgnored=sR.getMiddlewareMetadata=void 0;var Jwe=d3(),p3=qJ(),ICt=(Zn(),Me(Ur)),CCt=(e,t,n,r)=>n?{attributes:{[p3.AttributeNames.KOA_NAME]:r?.toString(),[p3.AttributeNames.KOA_TYPE]:Jwe.KoaLayerType.ROUTER,[ICt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[p3.AttributeNames.KOA_NAME]:t.name??"middleware",[p3.AttributeNames.KOA_TYPE]:Jwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};sR.getMiddlewareMetadata=CCt;var bCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));sR.isLayerIgnored=bCt});var Wwe=Q(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.kLayerPatched=void 0;f3.kLayerPatched=Symbol("koa-layer-patched")});var oke=Q(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.KoaInstrumentation=void 0;var GA=(je(),Me(We)),xO=on(),Xwe=d3(),eke=Kwe(),tke=Zwe(),nke=Tr(),rke=Wwe(),YJ=class extends xO.InstrumentationBase{constructor(t={}){super(eke.PACKAGE_NAME,eke.PACKAGE_VERSION,t)}init(){return new xO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,xO.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,xO.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){GA.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?Xwe.KoaLayerType.ROUTER:Xwe.KoaLayerType.MIDDLEWARE;return t[rke.kLayerPatched]===!0||(0,tke.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(GA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[rke.kLayerPatched]=!0,GA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(GA.trace.getSpan(GA.context.active())===void 0)return t(i,a);let d=(0,tke.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,nke.getRPCMetadata)(GA.context.active());h?.type===nke.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,xO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&GA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=GA.trace.setSpan(GA.context.active(),g);return GA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};A3.KoaInstrumentation=YJ});var ike=Q(sE=>{"use strict";m();Object.defineProperty(sE,"__esModule",{value:!0});sE.KoaLayerType=sE.AttributeNames=sE.KoaInstrumentation=void 0;var vCt=oke();Object.defineProperty(sE,"KoaInstrumentation",{enumerable:!0,get:function(){return vCt.KoaInstrumentation}});var RCt=qJ();Object.defineProperty(sE,"AttributeNames",{enumerable:!0,get:function(){return RCt.AttributeNames}});var xCt=d3();Object.defineProperty(sE,"KoaLayerType",{enumerable:!0,get:function(){return xCt.KoaLayerType}})});var ake,ske,uke,DCt,cke,lke=N(()=>{m();ake=ie(ike(),1);Zn();dt();mr();gy();ske="Koa",uke=st(ske,ake.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Qr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),bn()===Md()){Ia&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ug],c=n.context?.request?.method?.toUpperCase()||"GET";a&&bn().setTransactionName(`${c} ${a}`)}})),DCt=(e={})=>({name:ske,setupOnce(){uke(e)}}),cke=DCt});var KJ=Q(ff=>{"use strict";m();Object.defineProperty(ff,"__esModule",{value:!0});ff.ConnectNames=ff.ConnectTypes=ff.AttributeNames=void 0;var BCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(BCt=ff.AttributeNames||(ff.AttributeNames={}));var NCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(NCt=ff.ConnectTypes||(ff.ConnectTypes={}));var OCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(OCt=ff.ConnectNames||(ff.ConnectNames={}))});var dke=Q(uR=>{"use strict";m();Object.defineProperty(uR,"__esModule",{value:!0});uR.PACKAGE_NAME=uR.PACKAGE_VERSION=void 0;uR.PACKAGE_VERSION="0.57.0";uR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var pke=Q(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3._LAYERS_STORE_PROPERTY=void 0;m3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var fke=Q(cE=>{"use strict";m();Object.defineProperty(cE,"__esModule",{value:!0});cE.generateRoute=cE.replaceCurrentStackRoute=cE.addNewStackLayer=void 0;var wCt=(je(),Me(We)),uE=pke(),kCt=e=>{Array.isArray(e[uE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,uE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[uE._LAYERS_STORE_PROPERTY].push("/");let t=e[uE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[uE._LAYERS_STORE_PROPERTY].length?e[uE._LAYERS_STORE_PROPERTY].pop():wCt.diag.warn("Connect: Trying to pop the stack multiple time")}};cE.addNewStackLayer=kCt;var PCt=(e,t)=>{t&&e[uE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};cE.replaceCurrentStackRoute=PCt;var MCt=e=>e[uE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);cE.generateRoute=MCt});var gke=Q(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.ConnectInstrumentation=lE.ANONYMOUS_NAME=void 0;var LCt=(je(),Me(We)),Ake=Tr(),cR=KJ(),mke=dke(),g3=on(),UCt=(Zn(),Me(Ur)),JJ=fke();lE.ANONYMOUS_NAME="anonymous";var ZJ=class extends g3.InstrumentationBase{constructor(t={}){super(mke.PACKAGE_NAME,mke.PACKAGE_VERSION,t)}init(){return[new g3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,g3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,g3.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=cR.ConnectTypes.REQUEST_HANDLER,i=cR.ConnectNames.REQUEST_HANDLER,o=t):(r=cR.ConnectTypes.MIDDLEWARE,i=cR.ConnectNames.MIDDLEWARE,o=n.name||lE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[UCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[cR.AttributeNames.CONNECT_TYPE]:r,[cR.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,JJ.replaceCurrentStackRoute)(g,t);let y=(0,Ake.getRPCMetadata)(LCt.context.active());t&&y?.type===Ake.RPCType.HTTP&&(y.route=(0,JJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||lE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function O(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",O)}return h.addListener("close",O),arguments[d]=r._patchNext(S,O),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,JJ.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)}}};lE.ConnectInstrumentation=ZJ});var _ke=Q(Wd=>{"use strict";m();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.ConnectTypes=Wd.ConnectNames=Wd.AttributeNames=Wd.ANONYMOUS_NAME=Wd.ConnectInstrumentation=void 0;var hke=gke();Object.defineProperty(Wd,"ConnectInstrumentation",{enumerable:!0,get:function(){return hke.ConnectInstrumentation}});Object.defineProperty(Wd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return hke.ANONYMOUS_NAME}});var WJ=KJ();Object.defineProperty(Wd,"AttributeNames",{enumerable:!0,get:function(){return WJ.AttributeNames}});Object.defineProperty(Wd,"ConnectNames",{enumerable:!0,get:function(){return WJ.ConnectNames}});Object.defineProperty(Wd,"ConnectTypes",{enumerable:!0,get:function(){return WJ.ConnectTypes}})});var Eke,Ske,yke,QCt,Tke,Ike=N(()=>{m();Eke=ie(_ke(),1);mr();Ske="Connect",yke=st(Ske,()=>new Eke.ConnectInstrumentation),QCt=()=>({name:Ske,setupOnce(){yke()}}),Tke=QCt});var Cke=Q(os=>{"use strict";m();Object.defineProperty(os,"__esModule",{value:!0});os.DB_SYSTEM_VALUE_MSSQL=os.ATTR_NET_PEER_PORT=os.ATTR_NET_PEER_NAME=os.ATTR_DB_USER=os.ATTR_DB_SYSTEM=os.ATTR_DB_STATEMENT=os.ATTR_DB_SQL_TABLE=os.ATTR_DB_NAME=void 0;os.ATTR_DB_NAME="db.name";os.ATTR_DB_SQL_TABLE="db.sql.table";os.ATTR_DB_STATEMENT="db.statement";os.ATTR_DB_SYSTEM="db.system";os.ATTR_DB_USER="db.user";os.ATTR_NET_PEER_NAME="net.peer.name";os.ATTR_NET_PEER_PORT="net.peer.port";os.DB_SYSTEM_VALUE_MSSQL="mssql"});var bke=Q(lR=>{"use strict";m();Object.defineProperty(lR,"__esModule",{value:!0});lR.once=lR.getSpanName=void 0;function FCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}lR.getSpanName=FCt;var GCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};lR.once=GCt});var vke=Q(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.PACKAGE_NAME=dR.PACKAGE_VERSION=void 0;dR.PACKAGE_VERSION="0.33.0";dR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Nke=Q(pE=>{"use strict";m();Object.defineProperty(pE,"__esModule",{value:!0});pE.TediousInstrumentation=pE.INJECTED_CTX=void 0;var pR=(je(),Me(We)),jCt=Ge("events"),jA=on(),xy=(Zn(),Me(Ur)),dE=Cke(),Rke=bke(),xke=vke(),Bke=Symbol("opentelemetry.instrumentation-tedious.current-database");pE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Dke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function h3(e){Object.defineProperty(this,Bke,{value:e,writable:!0})}var XJ=class e extends jA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xke.PACKAGE_NAME,xke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new jA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Dke)(0,jA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,jA.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 Dke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return h3.call(this,this.config?.options?.database),this.removeListener("databaseChange",h3),this.on("databaseChange",h3),this.once("end",()=>{this.removeListener("databaseChange",h3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||pR.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,pE.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?.[pE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof jCt.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[Bke],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&jA.SemconvStability.OLD&&(C[dE.ATTR_DB_SYSTEM]=dE.DB_SYSTEM_VALUE_MSSQL,C[dE.ATTR_DB_NAME]=S,C[dE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[dE.ATTR_DB_STATEMENT]=y,C[dE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&jA.SemconvStability.STABLE&&(C[xy.ATTR_DB_NAMESPACE]=S,C[xy.ATTR_DB_SYSTEM_NAME]=xy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[xy.ATTR_DB_QUERY_TEXT]=y,C[xy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&jA.SemconvStability.OLD&&(C[dE.ATTR_NET_PEER_NAME]=this.config?.server,C[dE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&jA.SemconvStability.STABLE&&(C[xy.ATTR_SERVER_ADDRESS]=this.config?.server,C[xy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,Rke.getSpanName)(t,S,y,a.table),{kind:pR.SpanKind.CLIENT,attributes:C}),x=(0,Rke.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:pR.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 O=()=>pR.context.with(pR.trace.setSpan(pR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return O();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(O)}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)}}};pE.TediousInstrumentation=XJ});var Oke=Q(_3=>{"use strict";m();Object.defineProperty(_3,"__esModule",{value:!0});_3.TediousInstrumentation=void 0;var HCt=Nke();Object.defineProperty(_3,"TediousInstrumentation",{enumerable:!0,get:function(){return HCt.TediousInstrumentation}})});var wke,zCt,kke,Pke,$Ct,Mke,Lke=N(()=>{m();wke=ie(Oke(),1);dt();mr();zCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),kke="Tedious",Pke=st(kke,()=>new wke.TediousInstrumentation({})),$Ct=()=>{let e;return{name:kke,setupOnce(){let t=Pke();e=dN(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]||"";zCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},Mke=$Ct});var Uke=Q(fR=>{"use strict";m();Object.defineProperty(fR,"__esModule",{value:!0});fR.PACKAGE_NAME=fR.PACKAGE_VERSION=void 0;fR.PACKAGE_VERSION="0.57.0";fR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Fke=Q(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.GenericPoolInstrumentation=void 0;var AR=(je(),Me(We)),Dy=on(),Qke=Uke(),eZ="generic-pool",tZ=class extends Dy.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Qke.PACKAGE_NAME,Qke.PACKAGE_VERSION,t)}init(){return[new Dy.InstrumentationNodeModuleDefinition(eZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Dy.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 Dy.InstrumentationNodeModuleDefinition(eZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Dy.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 Dy.InstrumentationNodeModuleDefinition(eZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Dy.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=AR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return AR.context.with(AR.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=AR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return AR.context.with(AR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};E3.GenericPoolInstrumentation=tZ});var Gke=Q(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.GenericPoolInstrumentation=void 0;var VCt=Fke();Object.defineProperty(S3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return VCt.GenericPoolInstrumentation}})});var jke,Hke,zke,qCt,$ke,Vke=N(()=>{m();jke=ie(Gke(),1);dt();mr();Hke="GenericPool",zke=st(Hke,()=>new jke.GenericPoolInstrumentation({})),qCt=()=>{let e;return{name:Hke,setupOnce(){let t=zke();e=dN(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")}))}}},$ke=qCt});var nZ=Q(HA=>{"use strict";m();Object.defineProperty(HA,"__esModule",{value:!0});HA.ATTR_NET_PEER_PORT=HA.ATTR_NET_PEER_NAME=HA.ATTR_MESSAGING_SYSTEM=HA.ATTR_MESSAGING_OPERATION=void 0;HA.ATTR_MESSAGING_OPERATION="messaging.operation";HA.ATTR_MESSAGING_SYSTEM="messaging.system";HA.ATTR_NET_PEER_NAME="net.peer.name";HA.ATTR_NET_PEER_PORT="net.peer.port"});var rZ=Q(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ATTR_MESSAGING_CONVERSATION_ID=Ai.OLD_ATTR_MESSAGING_MESSAGE_ID=Ai.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Ai.ATTR_MESSAGING_URL=Ai.ATTR_MESSAGING_PROTOCOL_VERSION=Ai.ATTR_MESSAGING_PROTOCOL=Ai.MESSAGING_OPERATION_VALUE_PROCESS=Ai.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Ai.ATTR_MESSAGING_DESTINATION_KIND=Ai.ATTR_MESSAGING_DESTINATION=void 0;Ai.ATTR_MESSAGING_DESTINATION="messaging.destination";Ai.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Ai.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Ai.MESSAGING_OPERATION_VALUE_PROCESS="process";Ai.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Ai.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Ai.ATTR_MESSAGING_URL="messaging.url";Ai.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Ai.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Ai.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var oZ=Q(By=>{"use strict";m();Object.defineProperty(By,"__esModule",{value:!0});By.DEFAULT_CONFIG=By.EndOperation=void 0;var YCt;(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"})(YCt=By.EndOperation||(By.EndOperation={}));By.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Jke=Q(mi=>{"use strict";m();Object.defineProperty(mi,"__esModule",{value:!0});mi.isConfirmChannelTracing=mi.unmarkConfirmChannelTracing=mi.markConfirmChannelTracing=mi.getConnectionAttributesFromUrl=mi.getConnectionAttributesFromServer=mi.normalizeExchange=mi.CONNECTION_ATTRIBUTES=mi.CHANNEL_CONSUME_TIMEOUT_TIMER=mi.CHANNEL_SPANS_NOT_ENDED=mi.MESSAGE_STORED_SPAN=void 0;var iZ=(je(),Me(We)),fE=on(),y3=(Zn(),Me(Ur)),DO=nZ(),T3=rZ();mi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");mi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");mi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");mi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var aZ=(0,iZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),KCt=e=>e!==""?e:"<default>";mi.normalizeExchange=KCt;var JCt=e=>e.replace(/:[^:@/]*@/,":***@"),qke=(e,t)=>e||(t==="AMQP"?5672:5671),Yke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Kke=e=>e||"localhost",zA=(e,t,n,r)=>n?{[t]:n}:(iZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),ZCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[DO.ATTR_MESSAGING_SYSTEM]:t}:{}};mi.getConnectionAttributesFromServer=ZCt;var WCt=(e,t)=>{let n={[T3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Yke(r?.protocol);Object.assign(n,{...zA(e,T3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Kke(r?.hostname);t&fE.SemconvStability.OLD&&Object.assign(n,{...zA(e,DO.ATTR_NET_PEER_NAME,i,"hostname")}),t&fE.SemconvStability.STABLE&&Object.assign(n,{...zA(e,y3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=qke(r.port,o);t&fE.SemconvStability.OLD&&Object.assign(n,zA(e,DO.ATTR_NET_PEER_PORT,a,"port")),t&fE.SemconvStability.STABLE&&Object.assign(n,zA(e,y3.ATTR_SERVER_PORT,a,"port"))}else{let r=JCt(e);n[T3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Yke(o.protocol);Object.assign(n,{...zA(r,T3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Kke(o.hostname);t&fE.SemconvStability.OLD&&Object.assign(n,{...zA(r,DO.ATTR_NET_PEER_NAME,a,"hostname")}),t&fE.SemconvStability.STABLE&&Object.assign(n,{...zA(r,y3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=qke(o.port?parseInt(o.port):void 0,i);t&fE.SemconvStability.OLD&&Object.assign(n,zA(r,DO.ATTR_NET_PEER_PORT,c,"port")),t&fE.SemconvStability.STABLE&&Object.assign(n,zA(r,y3.ATTR_SERVER_PORT,c,"port"))}catch(o){iZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};mi.getConnectionAttributesFromUrl=WCt;var XCt=e=>e.setValue(aZ,!0);mi.markConfirmChannelTracing=XCt;var ebt=e=>e.deleteValue(aZ);mi.unmarkConfirmChannelTracing=ebt;var tbt=e=>e.getValue(aZ)===!0;mi.isConfirmChannelTracing=tbt});var Zke=Q(mR=>{"use strict";m();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.61.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var Xke=Q(b3=>{"use strict";m();Object.defineProperty(b3,"__esModule",{value:!0});b3.AmqplibInstrumentation=void 0;var Zo=(je(),Me(We)),I3=Tr(),Cr=on(),nbt=nZ(),Gl=rZ(),Yu=oZ(),gi=Jke(),Wke=Zke(),C3=[">=0.5.5 <1"],sZ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(Wke.PACKAGE_NAME,Wke.PACKAGE_VERSION,{...Yu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Yu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",C3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",C3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",C3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",C3,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,Yu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Yu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Yu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Yu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Yu.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,gi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,gi.getConnectionAttributesFromServer)(d);d[gi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Yu.EndOperation.ChannelClosed,void 0);let i=this[gi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[gi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Yu.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===Yu.EndOperation.Reject?c:d,S=g[gi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Yu.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,gi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[gi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[gi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Zo.propagation.extract(Zo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let F=y?Zo.trace.getSpan(y)?.spanContext():void 0;y=void 0,F&&(v=[{context:F}])}let x=r.tracer.startSpan(`${i} process`,{kind:Zo.SpanKind.CONSUMER,attributes:{...d?.connection?.[gi.CONNECTION_ATTRIBUTES],[Gl.ATTR_MESSAGING_DESTINATION]:C,[Gl.ATTR_MESSAGING_DESTINATION_KIND]:Gl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Gl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[nbt.ATTR_MESSAGING_OPERATION]:Gl.MESSAGING_OPERATION_VALUE_PROCESS,[Gl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Gl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:O}=r.getConfig();O&&(0,Cr.safeExecuteInTheMiddle)(()=>O(x,{moduleVersion:t,msg:h}),F=>{F&&Zo.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[gi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,I3.hrTime)()}),h[gi.MESSAGE_STORED_SPAN]=x);let k=y||Zo.ROOT_CONTEXT;Zo.context.with(Zo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Yu.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&&Zo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,F){try{g?.call(this,k,F)}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&&Zo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Zo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,gi.markConfirmChannelTracing)(Zo.context.active()),O=[...arguments];return O[3]=y,O[4]=Zo.context.bind((0,gi.unmarkConfirmChannelTracing)(Zo.trace.setSpan(x,S)),v),Zo.context.with(x,n.bind(this,...O))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,gi.isConfirmChannelTracing)(Zo.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&&Zo.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,gi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Zo.SpanKind.PRODUCER,attributes:{...o.connection[gi.CONNECTION_ATTRIBUTES],[Gl.ATTR_MESSAGING_DESTINATION]:n,[Gl.ATTR_MESSAGING_DESTINATION_KIND]:Gl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Gl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Gl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Gl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Zo.propagation.inject(Zo.trace.setSpan(Zo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[gi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Zo.SpanStatusCode.ERROR,message:r!==Yu.EndOperation.ChannelClosed&&r!==Yu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[gi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[gi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[gi.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&&Zo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,I3.hrTime)(),r=t[gi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,I3.hrTimeDuration)(a.timeOfConsume,n);if((0,I3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Yu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};b3.AmqplibInstrumentation=sZ});var tPe=Q(AE=>{"use strict";m();Object.defineProperty(AE,"__esModule",{value:!0});AE.EndOperation=AE.DEFAULT_CONFIG=AE.AmqplibInstrumentation=void 0;var rbt=Xke();Object.defineProperty(AE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return rbt.AmqplibInstrumentation}});var ePe=oZ();Object.defineProperty(AE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return ePe.DEFAULT_CONFIG}});Object.defineProperty(AE,"EndOperation",{enumerable:!0,get:function(){return ePe.EndOperation}})});var nPe,rPe,obt,oPe,ibt,iPe,aPe=N(()=>{m();nPe=ie(tPe(),1);mr();rPe="Amqplib",obt={consumeEndHook:e=>{Qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Qr(e,"auto.amqplib.otel.publisher")}},oPe=st(rPe,()=>new nPe.AmqplibInstrumentation(obt)),ibt=()=>({name:rPe,setupOnce(){oPe()}}),iPe=ibt});var BO,uZ=N(()=>{m();BO="VercelAI"});function sbt(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 ubt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(cbt(t.content),lbt(t.content))}function cbt(e){for(let t of e){if(!sbt(t))continue;let n=Uq(t.toolCallId);n?Dl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Dl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function lbt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Qq(t.toolCallId)}function dbt(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 R3,abt,sPe,v3,uPe=N(()=>{m();R3=ie(on(),1);dt();uZ();abt=[">=3.0.0 <7"],sPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];v3=class e extends R3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new R3.InstrumentationNodeModuleDefinition("ai",abt,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(BO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=dbt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},sf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Zi(x,"_sentry_active_span",kc())},()=>{},x=>{ubt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of sPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=sPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function pbt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var cPe,fbt,lPe,dPe=N(()=>{m();dt();mr();uZ();uPe();cPe=st(BO,()=>new v3({}));fbt=(e={})=>{let t;return{name:BO,options:e,setupOnce(){t=cPe()},afterAllSetup(n){e.force??pbt(n)?OU(n):t?.callWhenPatched(()=>OU(n))}}},lPe=fbt});var D3,Abt,x3,pPe=N(()=>{m();D3=ie(on(),1);dt();Abt=[">=4.0.0 <7"],x3=class extends D3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new D3.InstrumentationNodeModuleDefinition("openai",Abt,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(XS(U_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return PU(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 fPe,mbt,APe,mPe=N(()=>{m();dt();mr();pPe();fPe=st(U_,e=>new x3(e)),mbt=(e={})=>({name:U_,setupOnce(){fPe(e)}}),APe=mbt});var N3,gbt,B3,gPe=N(()=>{m();N3=ie(on(),1);dt();gbt=[">=0.19.2 <1.0.0"],B3=class extends N3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new N3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",gbt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(XS(Q_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return MU(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 hPe,hbt,_Pe,EPe=N(()=>{m();dt();mr();gPe();hPe=st(Q_,e=>new B3(e)),hbt=(e={})=>({name:Q_,options:e,setupOnce(){hPe(e)}}),_Pe=hbt});var gR,SPe,O3,yPe=N(()=>{m();gR=ie(on(),1);dt();SPe=[">=0.10.0 <2"],O3=class extends gR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new gR.InstrumentationNodeModuleDefinition("@google/genai",SPe,n=>this._patch(n),n=>n,[new gR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",SPe,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(XS(F_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return LU(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 cN(t,"GoogleGenAI",o),t}}});var TPe,_bt,IPe,CPe=N(()=>{m();dt();mr();yPe();TPe=st(F_,e=>new O3(e)),_bt=(e={})=>({name:F_,setupOnce(){TPe(e)}}),IPe=_bt});function Ebt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function Sbt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,g=Ebt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var mE,w3,k3,bPe=N(()=>{m();mE=ie(on(),1);dt();w3=[">=0.1.0 <2.0.0"];k3=class extends mE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new mE.InstrumentationNodeModuleDefinition(r,w3,this._patch.bind(this),o=>o,[new mE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,w3,this._patch.bind(this),o=>o)]));return t.push(new mE.InstrumentationNodeModuleDefinition("langchain",w3,this._patch.bind(this),r=>r,[new mE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",w3,this._patch.bind(this),r=>r)])),t}_patch(t){tq([U_,Q_,F_]);let n=GU(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]=Sbt(g,n))}}}});var vPe,ybt,RPe,xPe=N(()=>{m();dt();mr();bPe();vPe=st(UU,e=>new k3(e)),ybt=(e={})=>({name:UU,setupOnce(){vPe(e)}}),RPe=ybt});var hR,DPe,P3,BPe=N(()=>{m();hR=ie(on(),1);dt();DPe=[">=0.0.0 <2.0.0"],P3=class extends hR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new hR.InstrumentationNodeModuleDefinition("@langchain/langgraph",DPe,this._patch.bind(this),n=>n,[new hR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",DPe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&HU(t.StateGraph.prototype,this.getConfig()),t}}});var NPe,Tbt,OPe,wPe=N(()=>{m();dt();mr();BPe();NPe=st(jU,e=>new P3(e)),Tbt=(e={})=>({name:jU,setupOnce(){NPe(e)}}),OPe=Tbt});import*as PPe from"node:net";function MPe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Mg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&Rl.error(S?.message)},!0)});let d=new Mg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>kPe(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 Mg.InstrumentationNodeModuleFile(h,t,S=>kPe(S,n,r,e,a),S=>LPe(S,r)));return d}function kPe(e,t,n,r,o){return LPe(e,n),t(e,"addDoc",Ibt(r,o)),t(e,"getDocs",bbt(r,o)),t(e,"setDoc",vbt(r,o)),t(e,"deleteDoc",Cbt(r,o)),e}function LPe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Mg.isWrapped)(e[n])&&t(e,n);return e}function Ibt(e,t){return function(r){return function(o,i){let a=L3(e,"addDoc",o);return t(a),M3(a,()=>r(o,i))}}}function Cbt(e,t){return function(r){return function(o){let i=L3(e,"deleteDoc",o.parent||o);return t(i),M3(i,()=>r(o))}}}function bbt(e,t){return function(r){return function(o){let i=L3(e,"getDocs",o);return t(i),M3(i,()=>r(o))}}}function vbt(e,t){return function(r){return function(o,i,a){let c=L3(e,"setDoc",o.parent||o);return t(c),M3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function M3(e,t){return Ke.with(zt.setSpan(Ke.active(),e),()=>(0,Mg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function L3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return xbt(r,n),r.setAttribute(rb,t),r}function Rbt(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(PPe.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 xbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[b5]:t.path,[v5]:n.name,[PS]:"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}=Rbt(i);c&&(a[k5]=c),d&&(a[P5]=d),e.setAttributes(a)}var Mg,UPe=N(()=>{m();je();Mg=ie(on(),1);Zn()});function QPe(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,Lg.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&Rl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Lg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&Rl.error(C?.message)},!0)});let h=new Lg.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 Lg.InstrumentationNodeModuleFile(y,t,v=>Dbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>FPe(v,r)))}),h}function Ku(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),Ke.with(zt.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 Dbt(e,t,n,r,o,i){switch(FPe(e,n),i){case"function":t(e,"onRequest",Ku(r,o,"http.request")),t(e,"onCall",Ku(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ku(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ku(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ku(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ku(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ku(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ku(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ku(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ku(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ku(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ku(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ku(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ku(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ku(r,o,"storage.object.metadataUpdated"));break}return e}function FPe(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,Lg.isWrapped)(e[r])&&t(e,r);return e}var Lg,GPe=N(()=>{m();je();Lg=ie(on(),1)});var HPe,jPe,Bbt,Nbt,U3,zPe=N(()=>{m();HPe=ie(on(),1);dt();UPe();GPe();jPe={},Bbt=[">=3.0.0 <5"],Nbt=[">=6.0.0 <7"],U3=class extends HPe.InstrumentationBase{constructor(t=jPe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...jPe,...t})}init(){let t=[];return t.push(MPe(this.tracer,Bbt,this._wrap,this._unwrap,this.getConfig())),t.push(QPe(this.tracer,Nbt,this._wrap,this._unwrap,this.getConfig())),t}}});var $Pe,Obt,VPe,wbt,qPe,YPe=N(()=>{m();dt();mr();zPe();$Pe="Firebase",Obt={firestoreSpanCreationHook:e=>{Qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Gb(2e3))}}},VPe=st($Pe,()=>new U3(Obt)),wbt=()=>({name:$Pe,setupOnce(){VPe()}}),qPe=wbt});function KPe(){return[Wxe(),O1e(),iBe(),qwe(),VBe(),sNe(),ENe(),NNe(),cOe(),BOe(),xwe(),jwe(),cke(),Tke(),Mke(),$ke(),TBe(),iPe(),wBe(),RPe(),OPe(),lPe(),APe(),_Pe(),IPe(),kOe(),qPe()]}var JPe=N(()=>{m();aPe();EPe();Ike();Xxe();P1e();YPe();Vke();CPe();sBe();Hwe();Ywe();IBe();lke();xPe();wPe();kBe();qBe();uNe();SNe();ONe();mPe();NOe();POe();Dwe();lOe();Lke();dPe()});function WPe(e,t={}){e.getOptions().debug&&gY();let[n,r]=kbt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function kbt(e,t={}){let n=new ZPe.BasicTracerProvider({sampler:new KQ(e),resource:(0,Q3.defaultResource)().merge((0,Q3.resourceFromAttributes)({[M5]:"node",[C5]:"sentry",[L5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new YQ({timeout:Pbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});zt.setGlobalTracerProvider(n),Jp.setGlobalPropagator(new qQ);let r=new ZQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Pbt(e){if(e!=null){if(e>cZ)return Ia&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${cZ}`),cZ;if(e<=0||Number.isNaN(e)){Ia&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var Q3,ZPe,cZ,XPe=N(()=>{m();je();Q3=ie(D7(),1),ZPe=ie(tY(),1);Zn();dt();mr();Ev();gy();cZ=1e6});function eMe(){return oF().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(xxe(),Lxe())}function tMe(e){return[...eMe(),...Bi(e)?KPe():[]]}function lZ(e={}){return Mbt(e,tMe)}function Mbt(e={},t){ey(e,"node");let n=jY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(WPe(n,{spanProcessors:e.openTelemetrySpanProcessors}),iF()),n}var nMe=N(()=>{m();dt();mr();Dxe();Uxe();JPe();XPe()});var _R=N(()=>{m();nMe();dt();mr()});function wi(){return Lbt}function Ju(){return rMe}function oMe(){return Ubt}var Lbt,rMe,Ubt,jl=N(()=>{"use strict";m();Lbt="prod",rMe="0.1.147",Ubt=`@tanagram/lore/${rMe}`});function Hbt(e=""){if(!Gbt.test(e))return e!==e.toLowerCase()}function iMe(e,t){let n=t??jbt,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=Hbt(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 zbt(e){return e?e[0].toUpperCase()+e.slice(1):""}function $bt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Vbt(e,t){return e?(Array.isArray(e)?e:iMe(e)).map(n=>zbt(t?.normalize?n.toLowerCase():n)).join(""):""}function OO(e,t){return $bt(Vbt(e||"",t))}function F3(e,t){return e?(Array.isArray(e)?e:iMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function aMe(e){return F3(e||"","_")}var Gbt,jbt,sMe=N(()=>{m();Gbt=/\d/,jbt=["-","_","/","."]});import{parseArgs as qbt}from"node:util";function z3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function dZ(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 HK(e,t,n,r=void 0){n&&(0,nO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&YBe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function nyt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(HK(t,o,n,r),o)).catch(o=>{throw KBe(t,o),o}).finally(()=>t.end()):(HK(t,e,n,r),t.end(),e)}J_.handlePromiseResponse=nyt;function ryt(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?KBe(r,d):HK(r,g,i,a),r.end(),e(d,g)),t.apply(n,o)}J_.handleCallbackResponse=ryt});var ZBe=Q(Gv=>{"use strict";m();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.PACKAGE_NAME=Gv.PACKAGE_VERSION=void 0;Gv.PACKAGE_VERSION="0.60.0";Gv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var nNe=Q(Fc=>{"use strict";m();Object.defineProperty(Fc,"__esModule",{value:!0});Fc.MongooseInstrumentation=Fc._ALREADY_INSTRUMENTED=Fc._STORED_PARENT_SPAN=void 0;var ba=(je(),Me(We)),oyt=Tr(),zK=JBe(),Os=on(),WBe=ZBe(),Z_=jK(),Iy=(Zn(),Me(Ur)),d4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],iyt=["remove","count","findOneAndRemove",...d4],ayt=["count","findOneAndRemove",...d4],syt=[...d4];function XBe(e){return e?e.startsWith("6.")||e.startsWith("5.")?iyt:e.startsWith("7.")?ayt:syt:d4}function eNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function tNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Fc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Fc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var $K=class extends Os.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(WBe.PACKAGE_NAME,WBe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Os.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Os.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Os.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,eNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),tNe(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)),XBe(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=XBe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,eNe(n)&&this._unwrap(r.Model.prototype,"remove"),tNe(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&&ba.trace.getSpan(ba.context.active())===void 0)return r.apply(this,arguments);let a=this[Fc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Os.SemconvStability.OLD&&(c[Z_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[Iy.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[Fc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ba.trace.getSpan(ba.context.active())===void 0)return r.apply(this,arguments);let a=this[Fc._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&Os.SemconvStability.OLD&&(c[Z_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[Iy.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&&ba.trace.getSpan(ba.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&Os.SemconvStability.OLD&&(g[Z_.ATTR_DB_STATEMENT]=y),r._dbSemconvStability&Os.SemconvStability.STABLE&&(g[Iy.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&&ba.trace.getSpan(ba.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 O=C(t,{condition:{_id:this._id},updates:h,options:S});r._dbSemconvStability&Os.SemconvStability.OLD&&(y[Z_.ATTR_DB_STATEMENT]=O),r._dbSemconvStability&Os.SemconvStability.STABLE&&(y[Iy.ATTR_DB_QUERY_TEXT]=O)}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[Fc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ba.trace.getSpan(ba.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&Os.SemconvStability.OLD&&(h[Z_.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&Os.SemconvStability.STABLE&&(h[Iy.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=ba.trace.getSpan(ba.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Fc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Fc._STORED_PARENT_SPAN]=ba.trace.getSpan(ba.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,zK.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Os.SemconvStability.OLD&&(a[Z_.ATTR_DB_OPERATION]=r,a[Z_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Os.SemconvStability.STABLE&&(a[Iy.ATTR_DB_OPERATION_NAME]=r,a[Iy.ATTR_DB_SYSTEM_NAME]=Z_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Os.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ba.SpanKind.CLIENT,attributes:a},i?ba.trace.setSpan(ba.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,zK.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,zK.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ba.context.with((0,oyt.suppressTracing)(ba.context.active()),t):t()}};Fc.MongooseInstrumentation=$K});var rNe=Q(p4=>{"use strict";m();Object.defineProperty(p4,"__esModule",{value:!0});p4.MongooseInstrumentation=void 0;var uyt=nNe();Object.defineProperty(p4,"MongooseInstrumentation",{enumerable:!0,get:function(){return uyt.MongooseInstrumentation}})});var oNe,iNe,aNe,cyt,sNe,uNe=N(()=>{m();oNe=ie(rNe(),1);mr();iNe="Mongoose",aNe=st(iNe,()=>new oNe.MongooseInstrumentation({responseHook(e){Qr(e,"auto.db.otel.mongoose")}})),cyt=()=>({name:iNe,setupOnce(){aNe()}}),sNe=cyt});var cNe=Q(ra=>{"use strict";m();Object.defineProperty(ra,"__esModule",{value:!0});ra.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ra.DB_SYSTEM_VALUE_MYSQL=ra.ATTR_NET_PEER_PORT=ra.ATTR_NET_PEER_NAME=ra.ATTR_DB_USER=ra.ATTR_DB_SYSTEM=ra.ATTR_DB_STATEMENT=ra.ATTR_DB_NAME=ra.ATTR_DB_CONNECTION_STRING=void 0;ra.ATTR_DB_CONNECTION_STRING="db.connection_string";ra.ATTR_DB_NAME="db.name";ra.ATTR_DB_STATEMENT="db.statement";ra.ATTR_DB_SYSTEM="db.system";ra.ATTR_DB_USER="db.user";ra.ATTR_NET_PEER_NAME="net.peer.name";ra.ATTR_NET_PEER_PORT="net.peer.port";ra.DB_SYSTEM_VALUE_MYSQL="mysql";ra.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var lNe=Q(rO=>{"use strict";m();Object.defineProperty(rO,"__esModule",{value:!0});rO.AttributeNames=void 0;var lyt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(lyt=rO.AttributeNames||(rO.AttributeNames={}))});var dNe=Q(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getPoolNameOld=au.arrayStringifyHelper=au.getSpanName=au.getDbValues=au.getDbQueryText=au.getJDBCString=au.getConfig=void 0;function dyt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}au.getConfig=dyt;function pyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}au.getJDBCString=pyt;function fyt(e){return typeof e=="string"?e:e.sql}au.getDbQueryText=fyt;function Ayt(e,t){return VK(typeof e=="string"?t:t||e.values)}au.getDbValues=Ayt;function myt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}au.getSpanName=myt;function VK(e){return e?`[${e.toString()}]`:""}au.arrayStringifyHelper=VK;function gyt(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()}au.getPoolNameOld=gyt});var pNe=Q(jv=>{"use strict";m();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var ANe=Q(f4=>{"use strict";m();Object.defineProperty(f4,"__esModule",{value:!0});f4.MySQLInstrumentation=void 0;var Gc=(je(),Me(We)),qd=on(),Hv=(Zn(),Me(Ur)),kg=cNe(),hyt=lNe(),Cy=dNe(),fNe=pNe(),qK=class extends qd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(fNe.PACKAGE_NAME,fNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,qd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,qd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(kg.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 qd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,qd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,qd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,qd.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,Cy.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=Gc.context.active();return function(o,i){i&&((0,qd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Gc.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,Cy.getConfig)(t.config),y=parseInt(g,10),C=(0,Cy.getDbQueryText)(o);r._dbSemconvStability&qd.SemconvStability.OLD&&(c[kg.ATTR_DB_SYSTEM]=kg.DB_SYSTEM_VALUE_MYSQL,c[kg.ATTR_DB_CONNECTION_STRING]=(0,Cy.getJDBCString)(d,g,h),c[kg.ATTR_DB_NAME]=h,c[kg.ATTR_DB_USER]=S,c[kg.ATTR_DB_STATEMENT]=C),r._dbSemconvStability&qd.SemconvStability.STABLE&&(c[Hv.ATTR_DB_SYSTEM_NAME]=Hv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Hv.ATTR_DB_NAMESPACE]=h,c[Hv.ATTR_DB_QUERY_TEXT]=C),r._netSemconvStability&qd.SemconvStability.OLD&&(c[kg.ATTR_NET_PEER_NAME]=d,isNaN(y)||(c[kg.ATTR_NET_PEER_PORT]=y)),r._netSemconvStability&qd.SemconvStability.STABLE&&(c[Hv.ATTR_SERVER_ADDRESS]=d,isNaN(y)||(c[Hv.ATTR_SERVER_PORT]=y));let v=r.tracer.startSpan((0,Cy.getSpanName)(o),{kind:Gc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(hyt.AttributeNames.MYSQL_VALUES,(0,Cy.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),O=Gc.context.active();if(x===-1){let k=Gc.context.with(Gc.trace.setSpan(Gc.context.active(),v),()=>n.apply(t,arguments));return Gc.context.bind(O,k),k.on("error",F=>v.setStatus({code:Gc.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,O)),Gc.context.with(Gc.trace.setSpan(Gc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:Gc.SpanStatusCode.ERROR,message:o.message}),t.end(),Gc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,Cy.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")})}};f4.MySQLInstrumentation=qK});var mNe=Q(A4=>{"use strict";m();Object.defineProperty(A4,"__esModule",{value:!0});A4.MySQLInstrumentation=void 0;var _yt=ANe();Object.defineProperty(A4,"MySQLInstrumentation",{enumerable:!0,get:function(){return _yt.MySQLInstrumentation}})});var gNe,hNe,_Ne,Eyt,ENe,SNe=N(()=>{m();gNe=ie(mNe(),1);mr();hNe="Mysql",_Ne=st(hNe,()=>new gNe.MySQLInstrumentation({})),Eyt=()=>({name:hNe,setupOnce(){_Ne()}}),ENe=Eyt});var YK=Q(ns=>{"use strict";m();Object.defineProperty(ns,"__esModule",{value:!0});ns.DB_SYSTEM_VALUE_MYSQL=ns.ATTR_NET_PEER_PORT=ns.ATTR_NET_PEER_NAME=ns.ATTR_DB_USER=ns.ATTR_DB_SYSTEM=ns.ATTR_DB_STATEMENT=ns.ATTR_DB_NAME=ns.ATTR_DB_CONNECTION_STRING=void 0;ns.ATTR_DB_CONNECTION_STRING="db.connection_string";ns.ATTR_DB_NAME="db.name";ns.ATTR_DB_STATEMENT="db.statement";ns.ATTR_DB_SYSTEM="db.system";ns.ATTR_DB_USER="db.user";ns.ATTR_NET_PEER_NAME="net.peer.name";ns.ATTR_NET_PEER_PORT="net.peer.port";ns.DB_SYSTEM_VALUE_MYSQL="mysql"});var JK=Q(m4=>{"use strict";m();Object.defineProperty(m4,"__esModule",{value:!0});m4.addSqlCommenterComment=void 0;var KK=(je(),Me(We)),Syt=Tr();function yyt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Tyt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Iyt(e,t){if(typeof t!="string"||t.length===0||yyt(t))return t;let n=new Syt.W3CTraceContextPropagator,r={};n.inject(KK.trace.setSpan(KK.ROOT_CONTEXT,e),r,KK.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=Tyt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}m4.addSqlCommenterComment=Iyt});var yNe=Q(Yd=>{"use strict";m();Object.defineProperty(Yd,"__esModule",{value:!0});Yd.getConnectionPrototypeToInstrument=Yd.once=Yd.getSpanName=Yd.getQueryText=Yd.getConnectionAttributes=void 0;var oO=YK(),g4=on(),ZK=(Zn(),Me(Ur));function Cyt(e,t,n){let{host:r,port:o,database:i,user:a}=byt(e),c={};t&g4.SemconvStability.OLD&&(c[oO.ATTR_DB_CONNECTION_STRING]=vyt(r,o,i),c[oO.ATTR_DB_NAME]=i,c[oO.ATTR_DB_USER]=a),t&g4.SemconvStability.STABLE&&(c[ZK.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&g4.SemconvStability.OLD&&(c[oO.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[oO.ATTR_NET_PEER_PORT]=d)),n&g4.SemconvStability.STABLE&&(c[ZK.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[ZK.ATTR_SERVER_PORT]=d)),c}Yd.getConnectionAttributes=Cyt;function byt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function vyt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function Ryt(e,t,n,r=!1,o=xyt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,Dyt(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"}}Yd.getQueryText=Ryt;function xyt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function Dyt(e){return"values"in e}function Byt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Yd.getSpanName=Byt;var Nyt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Yd.once=Nyt;function Oyt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Yd.getConnectionPrototypeToInstrument=Oyt});var TNe=Q(zv=>{"use strict";m();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.60.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var vNe=Q(h4=>{"use strict";m();Object.defineProperty(h4,"__esModule",{value:!0});h4.MySQL2Instrumentation=void 0;var INe=(je(),Me(We)),df=on(),WK=YK(),CNe=JK(),$v=yNe(),bNe=TNe(),XK=(Zn(),Me(Ur)),eJ=[">=1.4.2 <4"],tJ=class extends df.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(bNe.PACKAGE_NAME,bNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,df.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,df.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,df.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,df.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 df.InstrumentationNodeModuleDefinition("mysql2",eJ,i=>(n(i),i),()=>{},[new df.InstrumentationNodeModuleFile("mysql2/promise.js",eJ,i=>(n(i),i),()=>{}),new df.InstrumentationNodeModuleFile("mysql2/lib/connection.js",eJ,i=>{let a=(0,$v.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,$v.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,$v.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),C=(0,$v.getQueryText)(i,t,d,g,h);o._dbSemconvStability&df.SemconvStability.OLD&&(y[WK.ATTR_DB_SYSTEM]=WK.DB_SYSTEM_VALUE_MYSQL,y[WK.ATTR_DB_STATEMENT]=C),o._dbSemconvStability&df.SemconvStability.STABLE&&(y[XK.ATTR_DB_SYSTEM_NAME]=XK.DB_SYSTEM_NAME_VALUE_MYSQL,y[XK.ATTR_DB_QUERY_TEXT]=C);let v=o.tracer.startSpan((0,$v.getSpanName)(i),{kind:INe.SpanKind.CLIENT,attributes:y});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,CNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,CNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,$v.once)((O,k)=>{O?v.setStatus({code:INe.SpanStatusCode.ERROR,message:O.message}):typeof S=="function"&&(0,df.safeExecuteInTheMiddle)(()=>{S(v,{queryResults:k})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let O=r.apply(this,arguments);return O.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),O}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)}}};h4.MySQL2Instrumentation=tJ});var RNe=Q(_4=>{"use strict";m();Object.defineProperty(_4,"__esModule",{value:!0});_4.MySQL2Instrumentation=void 0;var wyt=vNe();Object.defineProperty(_4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return wyt.MySQL2Instrumentation}})});var xNe,DNe,BNe,kyt,NNe,ONe=N(()=>{m();xNe=ie(RNe(),1);mr();DNe="Mysql2",BNe=st(DNe,()=>new xNe.MySQL2Instrumentation({responseHook(e){Qr(e,"auto.db.otel.mysql2")}})),kyt=()=>({name:DNe,setupOnce(){BNe()}}),NNe=kyt});var wNe=Q(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 kNe=Q(E4=>{"use strict";m();Object.defineProperty(E4,"__esModule",{value:!0});E4.endSpan=void 0;var Pyt=(je(),Me(We)),Myt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:Pyt.SpanStatusCode.ERROR,message:t.message})),e.end()};E4.endSpan=Myt});var y4=Q(S4=>{"use strict";m();Object.defineProperty(S4,"__esModule",{value:!0});S4.defaultDbStatementSerializer=void 0;var Lyt=[{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=Lyt.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};S4.defaultDbStatementSerializer=Uyt});var PNe=Q(Vv=>{"use strict";m();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.62.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var QNe=Q(T4=>{"use strict";m();Object.defineProperty(T4,"__esModule",{value:!0});T4.IORedisInstrumentation=void 0;var W_=(je(),Me(We)),jc=on(),X_=(Zn(),Me(Ur)),Hc=wNe(),MNe=on(),iO=kNe(),Qyt=y4(),LNe=PNe(),UNe={requireParentSpan:!0},nJ=class extends jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(LNe.PACKAGE_NAME,LNe.PACKAGE_VERSION,{...UNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...UNe,...t})}init(){return[new jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,jc.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||Qyt.defaultDbStatementSerializer,c=W_.trace.getSpan(W_.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&jc.SemconvStability.OLD&&(d[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,d[Hc.ATTR_DB_STATEMENT]=S,d[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${g}:${h}`),r._dbSemconvStability&jc.SemconvStability.STABLE&&(d[X_.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,d[X_.ATTR_DB_QUERY_TEXT]=S),r._netSemconvStability&jc.SemconvStability.OLD&&(d[Hc.ATTR_NET_PEER_NAME]=g,d[Hc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&jc.SemconvStability.STABLE&&(d[X_.ATTR_SERVER_ADDRESS]=g,d[X_.ATTR_SERVER_PORT]=h);let y=r.tracer.startSpan(o.name,{kind:W_.SpanKind.CLIENT,attributes:d}),{requestHook:C}=i;C&&(0,MNe.safeExecuteInTheMiddle)(()=>C(y,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&W_.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,MNe.safeExecuteInTheMiddle)(()=>i.responseHook?.(y,o.name,o.args,k),F=>{F&&W_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,iO.endSpan)(y,null),x(k)};let O=o.reject;return o.reject=function(k){(0,iO.endSpan)(y,k),O(k)},v}catch(v){throw(0,iO.endSpan)(y,v),v}}}_traceConnection(t){let n=this;return function(){let r=W_.trace.getSpan(W_.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&jc.SemconvStability.OLD&&(o[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,o[Hc.ATTR_DB_STATEMENT]="connect",o[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&jc.SemconvStability.STABLE&&(o[X_.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,o[X_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_NET_PEER_NAME]=i,o[Hc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&jc.SemconvStability.STABLE&&(o[X_.ATTR_SERVER_ADDRESS]=i,o[X_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:W_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,iO.endSpan)(c,null),d}catch(d){throw(0,iO.endSpan)(c,d),d}}}};T4.IORedisInstrumentation=nJ});var FNe=Q(I4=>{"use strict";m();Object.defineProperty(I4,"__esModule",{value:!0});I4.IORedisInstrumentation=void 0;var Fyt=QNe();Object.defineProperty(I4,"IORedisInstrumentation",{enumerable:!0,get:function(){return Fyt.IORedisInstrumentation}})});var C4=Q(qv=>{"use strict";m();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.62.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var GNe=Q(eE=>{"use strict";m();Object.defineProperty(eE,"__esModule",{value:!0});eE.getTracedCreateStreamTrace=eE.getTracedCreateClient=eE.endSpan=void 0;var aO=(je(),Me(We)),Gyt=(e,t)=>{t&&e.setStatus({code:aO.SpanStatusCode.ERROR,message:t.message}),e.end()};eE.endSpan=Gyt;var jyt=e=>function(){let n=e.apply(this,arguments);return aO.context.bind(aO.context.active(),n)};eE.getTracedCreateClient=jyt;var Hyt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){aO.context.bind(aO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};eE.getTracedCreateStreamTrace=Hyt});var b4=Q(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var HNe=Q(R4=>{"use strict";m();Object.defineProperty(R4,"__esModule",{value:!0});R4.RedisInstrumentationV2_V3=void 0;var Ql=on(),v4=GNe(),jNe=C4(),sO=(je(),Me(We)),uO=(Zn(),Me(Ur)),by=b4(),zyt=y4(),rJ=class e extends Ql.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(jNe.PACKAGE_NAME,jNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ql.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Ql.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ql.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Ql.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,Ql.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Ql.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=sO.trace.getSpan(sO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||zyt.defaultDbStatementSerializer,g={};t._semconvStability&Ql.SemconvStability.OLD&&Object.assign(g,{[by.ATTR_DB_SYSTEM]:by.DB_SYSTEM_VALUE_REDIS,[by.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&Ql.SemconvStability.STABLE&&Object.assign(g,{[uO.ATTR_DB_SYSTEM_NAME]:by.DB_SYSTEM_NAME_VALUE_REDIS,[uO.ATTR_DB_OPERATION_NAME]:i.command,[uO.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:sO.SpanKind.CLIENT,attributes:g});if(this.connection_options){let y={};t._semconvStability&Ql.SemconvStability.OLD&&Object.assign(y,{[by.ATTR_NET_PEER_NAME]:this.connection_options.host,[by.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Ql.SemconvStability.STABLE&&Object.assign(y,{[uO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[uO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(y)}this.address&&t._semconvStability&Ql.SemconvStability.OLD&&h.setAttribute(by.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let S=arguments[0].callback;if(S){let y=sO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let O=a.responseHook;(0,Ql.safeExecuteInTheMiddle)(()=>{O(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,v4.endSpan)(h,v),sO.context.with(y,S,this,...arguments)}}try{return r.apply(this,arguments)}catch(y){throw(0,v4.endSpan)(h,y),y}}}}_getPatchCreateClient(){return function(n){return(0,v4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,v4.getTracedCreateStreamTrace)(n)}}};R4.RedisInstrumentationV2_V3=rJ});var $Ne=Q(x4=>{"use strict";m();Object.defineProperty(x4,"__esModule",{value:!0});x4.getClientAttributes=void 0;var oJ=(Zn(),Me(Ur)),Yv=b4(),zNe=on();function $yt(e,t,n){let r={};return n&zNe.SemconvStability.OLD&&Object.assign(r,{[Yv.ATTR_DB_SYSTEM]:Yv.DB_SYSTEM_VALUE_REDIS,[Yv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Yv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Yv.ATTR_DB_CONNECTION_STRING]:Vyt(e,t?.url)}),n&zNe.SemconvStability.STABLE&&Object.assign(r,{[oJ.ATTR_DB_SYSTEM_NAME]:Yv.DB_SYSTEM_NAME_VALUE_REDIS,[oJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[oJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}x4.getClientAttributes=$yt;function Vyt(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 KNe=Q(D4=>{"use strict";m();Object.defineProperty(D4,"__esModule",{value:!0});D4.RedisInstrumentationV4_V5=void 0;var Kd=(je(),Me(We)),So=on(),VNe=$Ne(),qyt=y4(),qNe=C4(),iJ=(Zn(),Me(Ur)),Yyt=b4(),cO=Symbol("opentelemetry.instrumentation.redis.open_spans"),YNe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),aJ=class e extends So.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(qNe.PACKAGE_NAME,qNe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,So.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,So.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,So.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,So.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,So.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,So.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new So.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,So.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,So.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,So.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new So.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,g){let h=t(d,g).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[cO];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[cO];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[YNe]=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,VNe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Kd.SpanKind.CLIENT,attributes:a});return Kd.context.with(Kd.trace.setSpan(Kd.context.active(),c),()=>r.apply(this)).then(g=>(c.end(),g)).catch(g=>(c.recordException(g),c.setStatus({code:Kd.SpanStatusCode.ERROR,message:g.message}),c.end(),Promise.reject(g)))}}}_traceClientCommand(t,n,r,o){if(Kd.trace.getSpan(Kd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[YNe],c=o[0],d=o.slice(1),g=this.getConfig().dbStatementSerializer||qyt.defaultDbStatementSerializer,h=(0,VNe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&So.SemconvStability.STABLE&&(h[iJ.ATTR_DB_OPERATION_NAME]=c);try{let C=g(c,d);C!=null&&(this._semconvStability&So.SemconvStability.OLD&&(h[Yyt.ATTR_DB_STATEMENT]=C),this._semconvStability&So.SemconvStability.STABLE&&(h[iJ.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:Kd.SpanKind.CLIENT,attributes:h}),y=Kd.context.with(Kd.trace.setSpan(Kd.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[cO]=C[cO]||[],C[cO].push({span:S,commandName:c,commandArgs:d})}return y}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:d,commandArgs:g}=t[c],h=n[c],[S,y]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&So.SemconvStability.STABLE&&d.setAttribute(iJ.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:Kd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};D4.RedisInstrumentationV4_V5=aJ});var WNe=Q(B4=>{"use strict";m();Object.defineProperty(B4,"__esModule",{value:!0});B4.RedisInstrumentation=void 0;var Kyt=on(),JNe=C4(),Jyt=HNe(),Zyt=KNe(),ZNe={requireParentSpan:!1},sJ=class extends Kyt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...ZNe,...t};super(JNe.PACKAGE_NAME,JNe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Jyt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new Zyt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...ZNe,...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())}};B4.RedisInstrumentation=sJ});var XNe=Q(N4=>{"use strict";m();Object.defineProperty(N4,"__esModule",{value:!0});N4.RedisInstrumentation=void 0;var Wyt=WNe();Object.defineProperty(N4,"RedisInstrumentation",{enumerable:!0,get:function(){return Wyt.RedisInstrumentation}})});function lO(e,t){return e.includes(t.toLowerCase())}function cJ(e){return lO(uJ,e)?"cache.get":lO(eTt,e)?"cache.put":void 0}function tTt(e,t){return t.some(n=>e.startsWith(n))}function tOe(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)?eOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return lO(Xyt,e)&&r!=null?n(r):eOe(t.map(o=>n(o)))}catch{return}}function nOe(e,t,n){if(!cJ(e))return!1;for(let r of t)if(tTt(r,n))return!0;return!1}function rOe(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 eOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Xyt,uJ,eTt,oOe=N(()=>{m();Xyt=["get","set","setex"],uJ=["get","mget"],eTt=["set","setex"]});var iOe,aOe,O4,dO,sOe,nTt,rTt,uOe,oTt,cOe,lOe=N(()=>{m();iOe=ie(FNe(),1),aOe=ie(XNe(),1);dt();mr();oOe();O4="Redis",dO={},sOe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=tOe(t,n),i=cJ(t);if(!o||!i||!dO.cachePrefixes||!nOe(t,o,dO.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=rOe(r);d&&e.setAttribute(fV,d),lO(uJ,t)&&d!==void 0&&e.setAttribute(dV,d>0),e.setAttributes({[Xt]:i,[pV]:o});let g=o.join(", ");e.updateName(dO.maxCacheKeyLength?m_(g,dO.maxCacheKeyLength):g)},nTt=st(`${O4}.IORedis`,()=>new iOe.IORedisInstrumentation({responseHook:sOe})),rTt=st(`${O4}.Redis`,()=>new aOe.RedisInstrumentation({responseHook:sOe})),uOe=Object.assign(()=>{nTt(),rTt()},{id:O4}),oTt=(e={})=>({name:O4,setupOnce(){dO=e,uOe()}}),cOe=oTt});var dOe=Q(w4=>{"use strict";m();Object.defineProperty(w4,"__esModule",{value:!0});w4.EVENT_LISTENERS_SET=void 0;w4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var lJ=Q(pO=>{"use strict";m();Object.defineProperty(pO,"__esModule",{value:!0});pO.AttributeNames=void 0;var iTt;(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"})(iTt=pO.AttributeNames||(pO.AttributeNames={}))});var dJ=Q(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 pJ=Q(fO=>{"use strict";m();Object.defineProperty(fO,"__esModule",{value:!0});fO.SpanNames=void 0;var aTt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(aTt=fO.SpanNames||(fO.SpanNames={}))});var _Oe=Q(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.sanitizedErrorMessage=or.isObjectWithTextString=or.getErrorMessage=or.patchClientConnectCallback=or.patchCallbackPGPool=or.updateCounter=or.getPoolName=or.patchCallback=or.handleExecutionResult=or.handleConfigQuery=or.shouldSkipInstrumentation=or.getSemanticAttributesFromPoolConnection=or.getSemanticAttributesFromConnection=or.getConnectionString=or.parseAndMaskConnectionString=or.parseNormalizedOperationName=or.getQuerySpanName=void 0;var tE=(je(),Me(We)),k4=lJ(),Jd=(Zn(),Me(Ur)),fi=dJ(),vy=on(),pOe=pJ();function fOe(e,t){if(!t)return pOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:AOe(t.text);return`${pOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}or.getQuerySpanName=fOe;function AOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}or.parseNormalizedOperationName=AOe;function mOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}or.parseAndMaskConnectionString=mOe;function fJ(e){if("connectionString"in e&&e.connectionString)return mOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}or.getConnectionString=fJ;function P4(e){if(Number.isInteger(e))return e}function gOe(e,t){let n={};return t&vy.SemconvStability.OLD&&(n={...n,[fi.ATTR_DB_SYSTEM]:fi.DB_SYSTEM_VALUE_POSTGRESQL,[fi.ATTR_DB_NAME]:e.database,[fi.ATTR_DB_CONNECTION_STRING]:fJ(e),[fi.ATTR_DB_USER]:e.user,[fi.ATTR_NET_PEER_NAME]:e.host,[fi.ATTR_NET_PEER_PORT]:P4(e.port)}),t&vy.SemconvStability.STABLE&&(n={...n,[Jd.ATTR_DB_SYSTEM_NAME]:Jd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Jd.ATTR_DB_NAMESPACE]:e.namespace,[Jd.ATTR_SERVER_ADDRESS]:e.host,[Jd.ATTR_SERVER_PORT]:P4(e.port)}),n}or.getSemanticAttributesFromConnection=gOe;function sTt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[k4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[k4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&vy.SemconvStability.OLD&&(r={...r,[fi.ATTR_DB_SYSTEM]:fi.DB_SYSTEM_VALUE_POSTGRESQL,[fi.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[fi.ATTR_DB_CONNECTION_STRING]:fJ(e),[fi.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[fi.ATTR_NET_PEER_PORT]:Number(n?.port)||P4(e.port),[fi.ATTR_DB_USER]:n?.username??e.user}),t&vy.SemconvStability.STABLE&&(r={...r,[Jd.ATTR_DB_SYSTEM_NAME]:Jd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[Jd.ATTR_DB_NAMESPACE]:e.namespace,[Jd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[Jd.ATTR_SERVER_PORT]:Number(n?.port)||P4(e.port)}),r}or.getSemanticAttributesFromPoolConnection=sTt;function uTt(e){return e.requireParentSpan===!0&&tE.trace.getSpan(tE.context.active())===void 0}or.shouldSkipInstrumentation=uTt;function cTt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=fOe(i,r),c=e.startSpan(a,{kind:tE.SpanKind.CLIENT,attributes:gOe(o,n)});if(!r)return c;if(r.text&&(n&vy.SemconvStability.OLD&&c.setAttribute(fi.ATTR_DB_STATEMENT,r.text),n&vy.SemconvStability.STABLE&&c.setAttribute(Jd.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(k4.AttributeNames.PG_VALUES,d)}catch(d){tE.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(k4.AttributeNames.PG_PLAN,r.name),c}or.handleConfigQuery=cTt;function hOe(e,t,n){typeof e.responseHook=="function"&&(0,vy.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&tE.diag.error("Error running response hook",r)},!0)}or.handleExecutionResult=hOe;function lTt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[Jd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(M4(a)),t.setStatus({code:tE.SpanStatusCode.ERROR,message:a.message})):hOe(e,t,c),o(),t.end(),n.call(this,a,c)}}or.patchCallback=lTt;function dTt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}or.getPoolName=dTt;function pTt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[fi.ATTR_DB_CLIENT_CONNECTION_STATE]:fi.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[fi.ATTR_DB_CLIENT_CONNECTION_STATE]:fi.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[fi.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}or.updateCounter=pTt;function fTt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(M4(r)),e.setStatus({code:tE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}or.patchCallbackPGPool=fTt;function ATt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(M4(r)),e.setStatus({code:tE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}or.patchClientConnectCallback=ATt;function mTt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}or.getErrorMessage=mTt;function gTt(e){return typeof e=="object"&&typeof e?.text=="string"}or.isObjectWithTextString=gTt;function M4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}or.sanitizedErrorMessage=M4});var EOe=Q(Kv=>{"use strict";m();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.66.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var bOe=Q(U4=>{"use strict";m();Object.defineProperty(U4,"__esModule",{value:!0});U4.PgInstrumentation=void 0;var $u=on(),Gr=(je(),Me(We)),SOe=dOe(),Jo=_Oe(),yOe=JK(),TOe=EOe(),IOe=pJ(),L4=Tr(),pf=(Zn(),Me(Ur)),AO=dJ();function Jv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var AJ=class extends $u.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,t),this._semconvStability=(0,$u.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(pf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Gr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(AO.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(AO.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 $u.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new $u.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new $u.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Jv(c);return this._patchPgClient(d.Client),c},c=>{let d=Jv(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new $u.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Jv(c);return(0,$u.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Jv(c);(0,$u.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Jv(t);return(0,$u.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,$u.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=Jv(t);return(0,$u.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,$u.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Jo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(IOe.SpanNames.CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Jo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Jo.patchClientConnectCallback(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return COe(a,c)}}recordOperationDuration(t,n){let r={},o=[pf.ATTR_DB_NAMESPACE,pf.ATTR_ERROR_TYPE,pf.ATTR_SERVER_PORT,pf.ATTR_SERVER_ADDRESS,pf.ATTR_DB_OPERATION_NAME];this._semconvStability&$u.SemconvStability.OLD&&o.push(AO.ATTR_DB_SYSTEM),this._semconvStability&$u.SemconvStability.STABLE&&o.push(pf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,L4.hrTimeToMilliseconds)((0,L4.hrTimeDuration)(n,(0,L4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Jo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,L4.hrTime)(),a=o[0],c=typeof a=="string",d=Jo.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={[AO.ATTR_DB_SYSTEM]:AO.DB_SYSTEM_VALUE_POSTGRESQL,[pf.ATTR_DB_NAMESPACE]:this.database,[pf.ATTR_SERVER_PORT]:this.connectionParameters.port,[pf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};g?.text&&(h[pf.ATTR_DB_OPERATION_NAME]=Jo.parseNormalizedOperationName(g?.text));let S=()=>{t.recordOperationDuration(h,i)},y=t.getConfig(),C=Jo.handleConfigQuery.call(this,t.tracer,y,t._semconvStability,g);if(y.addSqlCommenterCommentToQueries&&(c?o[0]=(0,yOe.addSqlCommenterComment)(C,a):d&&!("name"in a)&&(o[0]={...a,text:(0,yOe.addSqlCommenterComment)(C,a.text)})),o.length>0){let O=Gr.trace.getSpan(Gr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Jo.patchCallback(y,C,o[o.length-1],h,S),O&&(o[o.length-1]=Gr.context.bind(Gr.context.active(),o[o.length-1]));else if(typeof g?.callback=="function"){let k=Jo.patchCallback(t.getConfig(),C,g.callback,h,S);O&&(k=Gr.context.bind(Gr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=y;typeof v=="function"&&g&&(0,$u.safeExecuteInTheMiddle)(()=>{let{database:O,host:k,port:F,user:j}=this.connectionParameters;v(C,{connection:{database:O,host:k,port:F,user:j},query:{text:g.text,values:g.values,name:g.name}})},O=>{O&&t._diag.error("Error running query hook",O)},!0);let x;try{x=n.apply(this,o)}catch(O){throw O instanceof Error&&C.recordException(Jo.sanitizedErrorMessage(O)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:Jo.getErrorMessage(O)}),C.end(),O}return x instanceof Promise?x.then(O=>new Promise(k=>{Jo.handleExecutionResult(t.getConfig(),C,O),S(),C.end(),k(O)})).catch(O=>new Promise((k,F)=>{O instanceof Error&&C.recordException(Jo.sanitizedErrorMessage(O)),C.setStatus({code:Gr.SpanStatusCode.ERROR,message:O.message}),S(),C.end(),F(O)})):x})}_setPoolConnectEventListeners(t){if(t[SOe.EVENT_LISTENERS_SET])return;let n=Jo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Jo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[SOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Jo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(IOe.SpanNames.POOL_CONNECT,{kind:Gr.SpanKind.CLIENT,attributes:Jo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Gr.trace.getSpan(Gr.context.active());o=Jo.patchCallbackPGPool(a,o),d&&(o=Gr.context.bind(Gr.context.active(),o))}let c=Gr.context.with(Gr.trace.setSpan(Gr.context.active(),a),()=>n.call(this,o));return COe(a,c)}}};U4.PgInstrumentation=AJ;function COe(e,t){if(!(t instanceof Promise))return t;let n=t;return Gr.context.bind(Gr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Jo.sanitizedErrorMessage(r)),e.setStatus({code:Gr.SpanStatusCode.ERROR,message:Jo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var vOe=Q(Zv=>{"use strict";m();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.AttributeNames=Zv.PgInstrumentation=void 0;var hTt=bOe();Object.defineProperty(Zv,"PgInstrumentation",{enumerable:!0,get:function(){return hTt.PgInstrumentation}});var _Tt=lJ();Object.defineProperty(Zv,"AttributeNames",{enumerable:!0,get:function(){return _Tt.AttributeNames}})});var ROe,xOe,DOe,ETt,BOe,NOe=N(()=>{m();ROe=ie(vOe(),1);mr();xOe="Postgres",DOe=st(xOe,ROe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Qr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),ETt=e=>({name:xOe,setupOnce(){DOe(e)}}),BOe=ETt});var nE,gJ,OOe,STt,yTt,wOe,mJ,TTt,kOe,POe=N(()=>{m();je();nE=ie(on(),1);Zn();dt();mr();gy();gJ="PostgresJs",OOe=[">=3.0.0 <4"],STt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,yTt=Symbol.for("sentry.query.from.instrumented.sql"),wOe=st(gJ,e=>new mJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),mJ=class extends nE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new nE.InstrumentationNodeModuleDefinition("postgres",OOe,n=>{try{return this._patchPostgres(n)}catch(r){return Ia&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new nE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,OOe,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 Ia&&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 Ia&&J.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return mq(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:(cN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return zt.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(rb,r);return}let o=n?.match(STt);o?.[1]&&t.setAttribute(rb,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[yTt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Wa({name:a||"postgresjs.query",op:"db"},c=>{Qr(c,"auto.db.postgresjs"),c.setAttributes({[PS]:"postgres",[R5]:a});let d=n.getConfig(),{requestHook:g}=d;g&&(0,nE.safeExecuteInTheMiddle)(()=>g(c,a,void 0),y=>{y&&(c.setAttribute("sentry.hook.error","requestHook failed"),Ia&&J.error(`Error in requestHook for ${gJ} 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){Ia&&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(x5,v?.[0]?.code||"unknown"),c.setAttribute(D5,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){Ia&&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}},TTt=e=>({name:gJ,setupOnce(){wOe(e)}}),kOe=TTt});var MOe=Q(mO=>{"use strict";m();Object.defineProperty(mO,"__esModule",{value:!0});mO.SeverityNumber=void 0;var ITt;(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"})(ITt=mO.SeverityNumber||(mO.SeverityNumber={}))});var F4=Q(Wv=>{"use strict";m();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.NOOP_LOGGER=Wv.NoopLogger=void 0;var Q4=class{emit(t){}};Wv.NoopLogger=Q4;Wv.NOOP_LOGGER=new Q4});var j4=Q(Xv=>{"use strict";m();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.NOOP_LOGGER_PROVIDER=Xv.NoopLoggerProvider=void 0;var CTt=F4(),G4=class{getLogger(t,n,r){return new CTt.NoopLogger}};Xv.NoopLoggerProvider=G4;Xv.NOOP_LOGGER_PROVIDER=new G4});var _J=Q(H4=>{"use strict";m();Object.defineProperty(H4,"__esModule",{value:!0});H4.ProxyLogger=void 0;var bTt=F4(),hJ=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):bTt.NOOP_LOGGER}};H4.ProxyLogger=hJ});var SJ=Q(z4=>{"use strict";m();Object.defineProperty(z4,"__esModule",{value:!0});z4.ProxyLoggerProvider=void 0;var vTt=j4(),RTt=_J(),EJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new RTt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:vTt.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)}};z4.ProxyLoggerProvider=EJ});var LOe=Q($4=>{"use strict";m();Object.defineProperty($4,"__esModule",{value:!0});$4._globalThis=void 0;$4._globalThis=typeof globalThis=="object"?globalThis:global});var UOe=Q(V4=>{"use strict";m();Object.defineProperty(V4,"__esModule",{value:!0});V4._globalThis=void 0;var xTt=LOe();Object.defineProperty(V4,"_globalThis",{enumerable:!0,get:function(){return xTt._globalThis}})});var QOe=Q(q4=>{"use strict";m();Object.defineProperty(q4,"__esModule",{value:!0});q4._globalThis=void 0;var DTt=UOe();Object.defineProperty(q4,"_globalThis",{enumerable:!0,get:function(){return DTt._globalThis}})});var FOe=Q(QA=>{"use strict";m();Object.defineProperty(QA,"__esModule",{value:!0});QA.API_BACKWARDS_COMPATIBILITY_VERSION=QA.makeGetter=QA._global=QA.GLOBAL_LOGS_API_KEY=void 0;var BTt=QOe();QA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");QA._global=BTt._globalThis;function NTt(e,t,n){return r=>r===e?t:n}QA.makeGetter=NTt;QA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var jOe=Q(Y4=>{"use strict";m();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.LogsAPI=void 0;var Zd=FOe(),OTt=j4(),GOe=SJ(),yJ=class e{constructor(){this._proxyLoggerProvider=new GOe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Zd._global[Zd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Zd._global[Zd.GLOBAL_LOGS_API_KEY]=(0,Zd.makeGetter)(Zd.API_BACKWARDS_COMPATIBILITY_VERSION,t,OTt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Zd._global[Zd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Zd._global,Zd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Zd._global[Zd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new GOe.ProxyLoggerProvider}};Y4.LogsAPI=yJ});var TJ=Q(rs=>{"use strict";m();Object.defineProperty(rs,"__esModule",{value:!0});rs.logs=rs.ProxyLoggerProvider=rs.ProxyLogger=rs.NoopLoggerProvider=rs.NOOP_LOGGER_PROVIDER=rs.NoopLogger=rs.NOOP_LOGGER=rs.SeverityNumber=void 0;var wTt=MOe();Object.defineProperty(rs,"SeverityNumber",{enumerable:!0,get:function(){return wTt.SeverityNumber}});var HOe=F4();Object.defineProperty(rs,"NOOP_LOGGER",{enumerable:!0,get:function(){return HOe.NOOP_LOGGER}});Object.defineProperty(rs,"NoopLogger",{enumerable:!0,get:function(){return HOe.NoopLogger}});var zOe=j4();Object.defineProperty(rs,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return zOe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rs,"NoopLoggerProvider",{enumerable:!0,get:function(){return zOe.NoopLoggerProvider}});var kTt=_J();Object.defineProperty(rs,"ProxyLogger",{enumerable:!0,get:function(){return kTt.ProxyLogger}});var PTt=SJ();Object.defineProperty(rs,"ProxyLoggerProvider",{enumerable:!0,get:function(){return PTt.ProxyLoggerProvider}});var MTt=jOe();rs.logs=MTt.LogsAPI.getInstance()});var $Oe=Q(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR.disableInstrumentations=eR.enableInstrumentations=void 0;function LTt(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()}}eR.enableInstrumentations=LTt;function UTt(e){e.forEach(t=>t.disable())}eR.disableInstrumentations=UTt});var YOe=Q(K4=>{"use strict";m();Object.defineProperty(K4,"__esModule",{value:!0});K4.registerInstrumentations=void 0;var VOe=(je(),Me(We)),QTt=TJ(),qOe=$Oe();function FTt(e){let t=e.tracerProvider||VOe.trace.getTracerProvider(),n=e.meterProvider||VOe.metrics.getMeterProvider(),r=e.loggerProvider||QTt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,qOe.enableInstrumentations)(o,t,n,r),()=>{(0,qOe.disableInstrumentations)(o)}}K4.registerInstrumentations=FTt});var rwe=Q(J4=>{"use strict";m();Object.defineProperty(J4,"__esModule",{value:!0});J4.satisfies=void 0;var vJ=(je(),Me(We)),XOe=/^(?: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-]+)*))?$/,GTt=/^(?<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-]+)*))?$/,jTt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function HTt(e,t,n){if(!zTt(e))return vJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=YTt(e);if(!r)return!1;let o=[],i=ewe(r,t,o,n);return i&&!n?.includePrerelease?VTt(r,o):i}J4.satisfies=HTt;function zTt(e){return typeof e=="string"&&XOe.test(e)}function ewe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(IJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=mIt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!IJ(e,i,n,r))return!1;return!0}return IJ(e,t,n,r)}function IJ(e,t,n,r){if(t=qTt(t,r),t.includes(" "))return ewe(e,t,n,r);{let o=KTt(t);return n.push(o),$Tt(e,o)}}function $Tt(e,t){if(t.invalid)return!1;if(!t.version||bJ(t.version))return!0;let n=JOe(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=JOe(r,o)}return jTt[t.op]?.includes(n)}function VTt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function qTt(e,t){return e=e.trim(),e=fIt(e,t),e=pIt(e),e=AIt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function YTt(e){let t=e.match(XOe);if(!t){vJ.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 KTt(e){if(!e)return{};let t=e.match(GTt);if(!t)return vJ.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 bJ(e){return e==="*"||e==="x"||e==="X"}function KOe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function JTt(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 ZTt(e,t){if(bJ(e)||bJ(t))return 0;let[n,r]=JTt(KOe(e),KOe(t));return n>r?1:n<r?-1:0}function JOe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=ZTt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var twe="[a-zA-Z0-9-]",nwe="0|[1-9]\\d*",WTt=`\\d*[a-zA-Z-]${twe}*`,XTt="((?:<|>)?=?)",ZOe=`(?:${nwe}|${WTt})`,eIt=`(?:-(${ZOe}(?:\\.${ZOe})*))`,WOe=`${twe}+`,tIt=`(?:\\+(${WOe}(?:\\.${WOe})*))`,CJ=`${nwe}|x|X|\\*`,gO=`[v=\\s]*(${CJ})(?:\\.(${CJ})(?:\\.(${CJ})(?:${eIt})?${tIt}?)?)?`,nIt=`^${XTt}\\s*${gO}$`,rIt=new RegExp(nIt),oIt=`^\\s*(${gO})\\s+-\\s+(${gO})\\s*$`,iIt=new RegExp(oIt),aIt="(?:~>?)",sIt=`^${aIt}${gO}$`,uIt=new RegExp(sIt),cIt="(?:\\^)",lIt=`^${cIt}${gO}$`,dIt=new RegExp(lIt);function pIt(e){let t=uIt;return e.replace(t,(n,r,o,i,a)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(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 fIt(e,t){let n=dIt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let g;return Vu(i)?g="":Vu(a)?g=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(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 AIt(e,t){let n=rIt;return e.replace(n,(r,o,i,a,c,d)=>{let g=Vu(i),h=g||Vu(a),S=h||Vu(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 mIt(e,t){let n=iIt;return e.replace(n,(r,o,i,a,c,d,g,h,S,y,C,v)=>(Vu(i)?o="":Vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(S)?h="":Vu(y)?h=`<${+S+1}.0.0-0`:Vu(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 RJ=Q(ws=>{"use strict";m();Object.defineProperty(ws,"__esModule",{value:!0});ws.massUnwrap=ws.unwrap=ws.massWrap=ws.wrap=void 0;var qu=console.error.bind(console);function hO(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 gIt=(e,t,n)=>{if(!e||!e[t]){qu("no original function "+String(t)+" to wrap");return}if(!n){qu("no wrapper function"),qu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){qu("original object and wrapper must be functions");return}let o=n(r,t);return hO(o,"__original",r),hO(o,"__unwrap",()=>{e[t]===o&&hO(e,t,r)}),hO(o,"__wrapped",!0),hO(e,t,o),o};ws.wrap=gIt;var hIt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ws.wrap)(r,o,n)})})};ws.massWrap=hIt;var _It=(e,t)=>{if(!e||!e[t]){qu("no function to unwrap."),qu(new Error().stack);return}let n=e[t];if(!n.__unwrap)qu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ws.unwrap=_It;var EIt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{qu("must provide one or more modules to patch"),qu(new Error().stack);return}if(!(t&&Array.isArray(t))){qu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ws.unwrap)(n,r)})})};ws.massUnwrap=EIt;function _O(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}ws.default=_O;_O.wrap=ws.wrap;_O.massWrap=ws.massWrap;_O.unwrap=ws.unwrap;_O.massUnwrap=ws.massUnwrap});var owe=Q(W4=>{"use strict";m();Object.defineProperty(W4,"__esModule",{value:!0});W4.InstrumentationAbstract=void 0;var xJ=(je(),Me(We)),SIt=TJ(),Z4=RJ(),DJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=xJ.diag.createComponentLogger({namespace:t}),this._tracer=xJ.trace.getTracer(t,n),this._meter=xJ.metrics.getMeter(t,n),this._logger=SIt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=Z4.wrap;_unwrap=Z4.unwrap;_massWrap=Z4.massWrap;_massUnwrap=Z4.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)}}};W4.InstrumentationAbstract=DJ});var iwe=Q(rE=>{"use strict";m();Object.defineProperty(rE,"__esModule",{value:!0});rE.ModuleNameTrie=rE.ModuleNameSeparator=void 0;rE.ModuleNameSeparator="/";var X4=class{hooks=[];children=new Map},BJ=class{_trie=new X4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(rE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new X4,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(rE.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))}};rE.ModuleNameTrie=BJ});var swe=Q(e3=>{"use strict";m();Object.defineProperty(e3,"__esModule",{value:!0});e3.RequireInTheMiddleSingleton=void 0;var yIt=GS(),awe=Ge("path"),NJ=iwe(),TIt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),OJ=class e{_moduleNameTrie=new NJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new yIt.Hook(null,{internals:!0},(t,n,r)=>{let o=IIt(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 TIt?new e:this._instance=this._instance??new e}};e3.RequireInTheMiddleSingleton=OJ;function IIt(e){return awe.sep!==NJ.ModuleNameSeparator?e.split(awe.sep).join(NJ.ModuleNameSeparator):e}});var wJ=Q(oE=>{"use strict";m();Object.defineProperty(oE,"__esModule",{value:!0});oE.isWrapped=oE.safeExecuteInTheMiddleAsync=oE.safeExecuteInTheMiddle=void 0;function CIt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}oE.safeExecuteInTheMiddle=CIt;async function bIt(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}}oE.safeExecuteInTheMiddleAsync=bIt;function vIt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}oE.isWrapped=vIt});var lwe=Q(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.InstrumentationBase=void 0;var EO=Ge("path"),uwe=Ge("util"),RIt=rwe(),kJ=RJ(),xIt=owe(),DIt=swe(),BIt=AK(),SO=(je(),Me(We)),NIt=GS(),OIt=Ge("fs"),wIt=wJ(),PJ=class extends xIt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=DIt.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,wIt.isWrapped)(t[n])&&this._unwrap(t,n),uwe.types.isProxy(t)){let o=(0,kJ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,kJ.wrap)(t,n,r)};_unwrap=(t,n)=>uwe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,kJ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{SO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){SO.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{SO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){SO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Ge.resolve(n);Ge.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,OIt.readFileSync)(EO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{SO.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 cwe(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=EO.normalize(r);return a.filter(g=>g.name===c).filter(g=>cwe(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&&EO.isAbsolute(c)){let g=EO.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=EO.isAbsolute(t.name)?new NIt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new BIt.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}};t3.InstrumentationBase=PJ;function cwe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,RIt.satisfies)(t,r,{includePrerelease:n}))}});var dwe=Q(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.normalize=void 0;var kIt=Ge("path");Object.defineProperty(n3,"normalize",{enumerable:!0,get:function(){return kIt.normalize}})});var pwe=Q(tR=>{"use strict";m();Object.defineProperty(tR,"__esModule",{value:!0});tR.normalize=tR.InstrumentationBase=void 0;var PIt=lwe();Object.defineProperty(tR,"InstrumentationBase",{enumerable:!0,get:function(){return PIt.InstrumentationBase}});var MIt=dwe();Object.defineProperty(tR,"normalize",{enumerable:!0,get:function(){return MIt.normalize}})});var MJ=Q(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.normalize=nR.InstrumentationBase=void 0;var fwe=pwe();Object.defineProperty(nR,"InstrumentationBase",{enumerable:!0,get:function(){return fwe.InstrumentationBase}});Object.defineProperty(nR,"normalize",{enumerable:!0,get:function(){return fwe.normalize}})});var Awe=Q(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.InstrumentationNodeModuleDefinition=void 0;var LJ=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||[]}};r3.InstrumentationNodeModuleDefinition=LJ});var mwe=Q(o3=>{"use strict";m();Object.defineProperty(o3,"__esModule",{value:!0});o3.InstrumentationNodeModuleFile=void 0;var LIt=MJ(),UJ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,LIt.normalize)(t)}};o3.InstrumentationNodeModuleFile=UJ});var gwe=Q(Ry=>{"use strict";m();Object.defineProperty(Ry,"__esModule",{value:!0});Ry.semconvStabilityFromStr=Ry.SemconvStability=void 0;var i3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(i3=Ry.SemconvStability||(Ry.SemconvStability={}));function UIt(e,t){let n=i3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=i3.DUPLICATE;break}else o.toLowerCase()===e&&(n=i3.STABLE);return n}Ry.semconvStabilityFromStr=UIt});var _we=Q(oa=>{"use strict";m();Object.defineProperty(oa,"__esModule",{value:!0});oa.semconvStabilityFromStr=oa.SemconvStability=oa.safeExecuteInTheMiddleAsync=oa.safeExecuteInTheMiddle=oa.isWrapped=oa.InstrumentationNodeModuleFile=oa.InstrumentationNodeModuleDefinition=oa.InstrumentationBase=oa.registerInstrumentations=void 0;var QIt=YOe();Object.defineProperty(oa,"registerInstrumentations",{enumerable:!0,get:function(){return QIt.registerInstrumentations}});var FIt=MJ();Object.defineProperty(oa,"InstrumentationBase",{enumerable:!0,get:function(){return FIt.InstrumentationBase}});var GIt=Awe();Object.defineProperty(oa,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return GIt.InstrumentationNodeModuleDefinition}});var jIt=mwe();Object.defineProperty(oa,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return jIt.InstrumentationNodeModuleFile}});var QJ=wJ();Object.defineProperty(oa,"isWrapped",{enumerable:!0,get:function(){return QJ.isWrapped}});Object.defineProperty(oa,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return QJ.safeExecuteInTheMiddle}});Object.defineProperty(oa,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return QJ.safeExecuteInTheMiddleAsync}});var hwe=gwe();Object.defineProperty(oa,"SemconvStability",{enumerable:!0,get:function(){return hwe.SemconvStability}});Object.defineProperty(oa,"semconvStabilityFromStr",{enumerable:!0,get:function(){return hwe.semconvStabilityFromStr}})});function $It(){let e=rR[GJ];return e?.helper?e.helper:rR[FJ]?.helper}function VIt(e){let t={helper:e};rR[GJ]=t,rR[FJ]=t}function qIt(){delete rR[GJ],delete rR[FJ]}function JIt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}function ywe(e,t,n,r,o){if(Twe(t.name,o))return;let i={attributes:t.attributes,kind:JIt(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)ywe(e,d,n,r,o);a.end(t.endTime)})}function Ewe(e,t){return WIt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function WIt(e){return e!=null&&typeof e.then=="function"}function Twe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var a3,HIt,zIt,FJ,GJ,rR,YIt,KIt,ZIt,Iwe,Swe,XIt,eCt,Cwe,bwe=N(()=>{m();je();a3=ie(_we(),1);je();HIt={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"}},zIt=HIt.version.split(".")[0],FJ="PRISMA_INSTRUMENTATION",GJ=`V${zIt}_PRISMA_INSTRUMENTATION`,rR=globalThis;YIt=process.env.PRISMA_SHOW_ALL_TRACES==="true",KIt="00-10-10-00";ZIt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=zt.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:KIt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)ywe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!YIt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Twe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return Ewe(i,t(i,r))}return n.startActiveSpan(o,e,i=>Ewe(i,t(i,r)))}};Iwe={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},Swe=Iwe.version,XIt=Iwe.name,eCt="@prisma/client",Cwe=class extends a3.InstrumentationBase{tracerProvider;constructor(e={}){super(XIt,Swe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new a3.InstrumentationNodeModuleDefinition(eCt,[Swe])]}enable(){let e=this._config;VIt(new ZIt({tracerProvider:this.tracerProvider??zt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){qIt()}isEnabled(){return $It()!==void 0}}});function tCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function Rwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function nCt(e){switch(e){case"client":return io.CLIENT;case"internal":default:return io.INTERNAL}}var vwe,jJ,rCt,xwe,Dwe=N(()=>{m();je();bwe();dt();mr();vwe="Prisma";jJ=class extends Cwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=Rwe();tCt(t)&&(t.createEngineSpan=n=>{let r=zt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){qo(()=>{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=nCt(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:Js.SAMPLED}})),S=zt.setSpanContext(Ke.active(),{traceId:g,spanId:c,traceFlags:Js.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}})}};rCt=st(vwe,e=>new jJ(e)),xwe=e=>({name:vwe,setupOnce(){rCt(e)},setup(t){Rwe()&&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 Bwe=Q(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.PACKAGE_NAME=oR.PACKAGE_VERSION=void 0;oR.PACKAGE_VERSION="0.60.0";oR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var HJ=Q(FA=>{"use strict";m();Object.defineProperty(FA,"__esModule",{value:!0});FA.HapiLifecycleMethodNames=FA.HapiLayerType=FA.handlerPatched=FA.HapiComponentName=void 0;FA.HapiComponentName="@hapi/hapi";FA.handlerPatched=Symbol("hapi-handler-patched");FA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};FA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var Nwe=Q(s3=>{"use strict";m();Object.defineProperty(s3,"__esModule",{value:!0});s3.ATTR_HTTP_METHOD=void 0;s3.ATTR_HTTP_METHOD="http.method"});var zJ=Q(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var oCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(oCt=yO.AttributeNames||(yO.AttributeNames={}))});var kwe=Q(ia=>{"use strict";m();Object.defineProperty(ia,"__esModule",{value:!0});ia.getPluginFromInput=ia.getExtMetadata=ia.getRouteMetadata=ia.isPatchableExtMethod=ia.isDirectExtInput=ia.isLifecycleExtEventObj=ia.isLifecycleExtType=ia.getPluginName=void 0;var Owe=(Zn(),Me(Ur)),iCt=Nwe(),TO=HJ(),iE=zJ(),wwe=on();function aCt(e){return e.name?e.name:e.pkg.name}ia.getPluginName=aCt;var sCt=e=>typeof e=="string"&&TO.HapiLifecycleMethodNames.has(e);ia.isLifecycleExtType=sCt;var uCt=e=>{let t=e?.type;return t!==void 0&&(0,ia.isLifecycleExtType)(t)};ia.isLifecycleExtEventObj=uCt;var cCt=e=>Array.isArray(e)&&e.length<=3&&(0,ia.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ia.isDirectExtInput=cCt;var lCt=e=>!Array.isArray(e);ia.isPatchableExtMethod=lCt;var dCt=(e,t,n)=>{let r={[Owe.ATTR_HTTP_ROUTE]:e.path};t&wwe.SemconvStability.OLD&&(r[iCt.ATTR_HTTP_METHOD]=e.method),t&wwe.SemconvStability.STABLE&&(r[Owe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[iE.AttributeNames.HAPI_TYPE]=TO.HapiLayerType.PLUGIN,r[iE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[iE.AttributeNames.HAPI_TYPE]=TO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ia.getRouteMetadata=dCt;var pCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[iE.AttributeNames.EXT_TYPE]:e,[iE.AttributeNames.HAPI_TYPE]:TO.HapiLayerType.EXT,[iE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[iE.AttributeNames.EXT_TYPE]:e,[iE.AttributeNames.HAPI_TYPE]:TO.HapiLayerType.EXT},name:r}};ia.getExtMetadata=pCt;var fCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ia.getPluginFromInput=fCt});var Lwe=Q(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.HapiInstrumentation=void 0;var Fl=(je(),Me(We)),Pwe=Tr(),IO=on(),Mwe=Bwe(),CO=HJ(),Pg=kwe(),$J=class extends IO.InstrumentationBase{_semconvStability;constructor(t={}){super(Mwe.PACKAGE_NAME,Mwe.PACKAGE_VERSION,t),this._semconvStability=(0,IO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new IO.InstrumentationNodeModuleDefinition(CO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,IO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,IO.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,Pg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Pg.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,Pg.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,Pg.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,Pg.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,Pg.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,Pg.isPatchableExtMethod)(t))return t[CO.handlerPatched]===!0?t:(t[CO.handlerPatched]=!0,async function(...a){if(Fl.trace.getSpan(Fl.context.active())===void 0)return await t.apply(this,a);let c=(0,Pg.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Fl.context.with(Fl.trace.setSpan(Fl.context.active(),d),t,void 0,...a)}catch(g){throw d.recordException(g),d.setStatus({code:Fl.SpanStatusCode.ERROR,message:g.message}),g}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[CO.handlerPatched]===!0)return t;t[CO.handlerPatched]=!0;let o=i=>async function(...a){if(Fl.trace.getSpan(Fl.context.active())===void 0)return await i.call(this,...a);let c=(0,Pwe.getRPCMetadata)(Fl.context.active());c?.type===Pwe.RPCType.HTTP&&(c.route=t.path);let d=(0,Pg.getRouteMetadata)(t,r._semconvStability,n),g=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await Fl.context.with(Fl.trace.setSpan(Fl.context.active(),g),()=>i.call(this,...a))}catch(h){throw g.recordException(h),g.setStatus({code:Fl.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}};u3.HapiInstrumentation=$J});var Uwe=Q(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.AttributeNames=iR.HapiInstrumentation=void 0;var ACt=Lwe();Object.defineProperty(iR,"HapiInstrumentation",{enumerable:!0,get:function(){return ACt.HapiInstrumentation}});var mCt=zJ();Object.defineProperty(iR,"AttributeNames",{enumerable:!0,get:function(){return mCt.AttributeNames}})});var Qwe,Fwe,Gwe,gCt,jwe,Hwe=N(()=>{m();Qwe=ie(Uwe(),1);mr();Fwe="Hapi",Gwe=st(Fwe,()=>new Qwe.HapiInstrumentation),gCt=()=>({name:Fwe,setupOnce(){Gwe()}}),jwe=gCt});var aE,bO,VJ=N(()=>{m();aE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},bO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var l3,hCt,_Ct,c3,zwe=N(()=>{m();je();l3=ie(on(),1);dt();VJ();hCt="@sentry/instrumentation-hono",_Ct="0.0.1",c3=class extends l3.InstrumentationBase{constructor(t={}){super(hCt,_Ct,t)}init(){return[new l3.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(zt.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(Cs(c))return c.then(d=>{let g=n._determineHandlerType(d);return a.setAttributes({[aE.HONO_TYPE]:g,[aE.HONO_NAME]:g===bO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[aE.HONO_TYPE]:d,[aE.HONO_NAME]:d===bO.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 Cs(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?bO.MIDDLEWARE:bO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:ci.ERROR,message:n.message}),t.recordException(n))}}});function ECt(e){let t=Ot(e).data,n=t[aE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[aE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),bn()===Md()){Ia&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ug],i=t[MS];typeof o=="string"&&typeof i=="string"&&bn().setTransactionName(`${i} ${o}`)}var $we,Vwe,SCt,qwe,Ywe=N(()=>{m();Zn();dt();mr();gy();VJ();zwe();$we="Hono";Vwe=st($we,()=>new c3({responseHook:e=>{ECt(e)}})),SCt=()=>({name:$we,setupOnce(){Vwe()}}),qwe=SCt});var d3=Q(vO=>{"use strict";m();Object.defineProperty(vO,"__esModule",{value:!0});vO.KoaLayerType=void 0;var yCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(yCt=vO.KoaLayerType||(vO.KoaLayerType={}))});var Kwe=Q(aR=>{"use strict";m();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.62.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var qJ=Q(RO=>{"use strict";m();Object.defineProperty(RO,"__esModule",{value:!0});RO.AttributeNames=void 0;var TCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(TCt=RO.AttributeNames||(RO.AttributeNames={}))});var Zwe=Q(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.isLayerIgnored=sR.getMiddlewareMetadata=void 0;var Jwe=d3(),p3=qJ(),ICt=(Zn(),Me(Ur)),CCt=(e,t,n,r)=>n?{attributes:{[p3.AttributeNames.KOA_NAME]:r?.toString(),[p3.AttributeNames.KOA_TYPE]:Jwe.KoaLayerType.ROUTER,[ICt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[p3.AttributeNames.KOA_NAME]:t.name??"middleware",[p3.AttributeNames.KOA_TYPE]:Jwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};sR.getMiddlewareMetadata=CCt;var bCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));sR.isLayerIgnored=bCt});var Wwe=Q(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.kLayerPatched=void 0;f3.kLayerPatched=Symbol("koa-layer-patched")});var oke=Q(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.KoaInstrumentation=void 0;var GA=(je(),Me(We)),xO=on(),Xwe=d3(),eke=Kwe(),tke=Zwe(),nke=Tr(),rke=Wwe(),YJ=class extends xO.InstrumentationBase{constructor(t={}){super(eke.PACKAGE_NAME,eke.PACKAGE_VERSION,t)}init(){return new xO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,xO.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,xO.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){GA.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?Xwe.KoaLayerType.ROUTER:Xwe.KoaLayerType.MIDDLEWARE;return t[rke.kLayerPatched]===!0||(0,tke.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(GA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[rke.kLayerPatched]=!0,GA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(GA.trace.getSpan(GA.context.active())===void 0)return t(i,a);let d=(0,tke.getMiddlewareMetadata)(i,t,n,r),g=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,nke.getRPCMetadata)(GA.context.active());h?.type===nke.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:S}=this.getConfig();S&&(0,xO.safeExecuteInTheMiddle)(()=>S(g,{context:i,middlewareLayer:t,layerType:o}),C=>{C&&GA.diag.error("koa instrumentation: request hook failed",C)},!0);let y=GA.trace.setSpan(GA.context.active(),g);return GA.context.with(y,async()=>{try{return await t(i,a)}catch(C){throw g.recordException(C),C}finally{g.end()}})})}};A3.KoaInstrumentation=YJ});var ike=Q(sE=>{"use strict";m();Object.defineProperty(sE,"__esModule",{value:!0});sE.KoaLayerType=sE.AttributeNames=sE.KoaInstrumentation=void 0;var vCt=oke();Object.defineProperty(sE,"KoaInstrumentation",{enumerable:!0,get:function(){return vCt.KoaInstrumentation}});var RCt=qJ();Object.defineProperty(sE,"AttributeNames",{enumerable:!0,get:function(){return RCt.AttributeNames}});var xCt=d3();Object.defineProperty(sE,"KoaLayerType",{enumerable:!0,get:function(){return xCt.KoaLayerType}})});var ake,ske,uke,DCt,cke,lke=N(()=>{m();ake=ie(ike(),1);Zn();dt();mr();gy();ske="Koa",uke=st(ske,ake.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Qr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),bn()===Md()){Ia&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ug],c=n.context?.request?.method?.toUpperCase()||"GET";a&&bn().setTransactionName(`${c} ${a}`)}})),DCt=(e={})=>({name:ske,setupOnce(){uke(e)}}),cke=DCt});var KJ=Q(ff=>{"use strict";m();Object.defineProperty(ff,"__esModule",{value:!0});ff.ConnectNames=ff.ConnectTypes=ff.AttributeNames=void 0;var BCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(BCt=ff.AttributeNames||(ff.AttributeNames={}));var NCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(NCt=ff.ConnectTypes||(ff.ConnectTypes={}));var OCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(OCt=ff.ConnectNames||(ff.ConnectNames={}))});var dke=Q(uR=>{"use strict";m();Object.defineProperty(uR,"__esModule",{value:!0});uR.PACKAGE_NAME=uR.PACKAGE_VERSION=void 0;uR.PACKAGE_VERSION="0.57.0";uR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var pke=Q(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3._LAYERS_STORE_PROPERTY=void 0;m3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var fke=Q(cE=>{"use strict";m();Object.defineProperty(cE,"__esModule",{value:!0});cE.generateRoute=cE.replaceCurrentStackRoute=cE.addNewStackLayer=void 0;var wCt=(je(),Me(We)),uE=pke(),kCt=e=>{Array.isArray(e[uE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,uE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[uE._LAYERS_STORE_PROPERTY].push("/");let t=e[uE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[uE._LAYERS_STORE_PROPERTY].length?e[uE._LAYERS_STORE_PROPERTY].pop():wCt.diag.warn("Connect: Trying to pop the stack multiple time")}};cE.addNewStackLayer=kCt;var PCt=(e,t)=>{t&&e[uE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};cE.replaceCurrentStackRoute=PCt;var MCt=e=>e[uE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);cE.generateRoute=MCt});var gke=Q(lE=>{"use strict";m();Object.defineProperty(lE,"__esModule",{value:!0});lE.ConnectInstrumentation=lE.ANONYMOUS_NAME=void 0;var LCt=(je(),Me(We)),Ake=Tr(),cR=KJ(),mke=dke(),g3=on(),UCt=(Zn(),Me(Ur)),JJ=fke();lE.ANONYMOUS_NAME="anonymous";var ZJ=class extends g3.InstrumentationBase{constructor(t={}){super(mke.PACKAGE_NAME,mke.PACKAGE_VERSION,t)}init(){return[new g3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,g3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,g3.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=cR.ConnectTypes.REQUEST_HANDLER,i=cR.ConnectNames.REQUEST_HANDLER,o=t):(r=cR.ConnectTypes.MIDDLEWARE,i=cR.ConnectNames.MIDDLEWARE,o=n.name||lE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[UCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[cR.AttributeNames.CONNECT_TYPE]:r,[cR.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,JJ.replaceCurrentStackRoute)(g,t);let y=(0,Ake.getRPCMetadata)(LCt.context.active());t&&y?.type===Ake.RPCType.HTTP&&(y.route=(0,JJ.generateRoute)(g));let C="";t?C=`request handler - ${t}`:C=`middleware - ${n.name||lE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",C);let x=!1;function O(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",O)}return h.addListener("close",O),arguments[d]=r._patchNext(S,O),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,JJ.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)}}};lE.ConnectInstrumentation=ZJ});var _ke=Q(Wd=>{"use strict";m();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.ConnectTypes=Wd.ConnectNames=Wd.AttributeNames=Wd.ANONYMOUS_NAME=Wd.ConnectInstrumentation=void 0;var hke=gke();Object.defineProperty(Wd,"ConnectInstrumentation",{enumerable:!0,get:function(){return hke.ConnectInstrumentation}});Object.defineProperty(Wd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return hke.ANONYMOUS_NAME}});var WJ=KJ();Object.defineProperty(Wd,"AttributeNames",{enumerable:!0,get:function(){return WJ.AttributeNames}});Object.defineProperty(Wd,"ConnectNames",{enumerable:!0,get:function(){return WJ.ConnectNames}});Object.defineProperty(Wd,"ConnectTypes",{enumerable:!0,get:function(){return WJ.ConnectTypes}})});var Eke,Ske,yke,QCt,Tke,Ike=N(()=>{m();Eke=ie(_ke(),1);mr();Ske="Connect",yke=st(Ske,()=>new Eke.ConnectInstrumentation),QCt=()=>({name:Ske,setupOnce(){yke()}}),Tke=QCt});var Cke=Q(os=>{"use strict";m();Object.defineProperty(os,"__esModule",{value:!0});os.DB_SYSTEM_VALUE_MSSQL=os.ATTR_NET_PEER_PORT=os.ATTR_NET_PEER_NAME=os.ATTR_DB_USER=os.ATTR_DB_SYSTEM=os.ATTR_DB_STATEMENT=os.ATTR_DB_SQL_TABLE=os.ATTR_DB_NAME=void 0;os.ATTR_DB_NAME="db.name";os.ATTR_DB_SQL_TABLE="db.sql.table";os.ATTR_DB_STATEMENT="db.statement";os.ATTR_DB_SYSTEM="db.system";os.ATTR_DB_USER="db.user";os.ATTR_NET_PEER_NAME="net.peer.name";os.ATTR_NET_PEER_PORT="net.peer.port";os.DB_SYSTEM_VALUE_MSSQL="mssql"});var bke=Q(lR=>{"use strict";m();Object.defineProperty(lR,"__esModule",{value:!0});lR.once=lR.getSpanName=void 0;function FCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}lR.getSpanName=FCt;var GCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};lR.once=GCt});var vke=Q(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.PACKAGE_NAME=dR.PACKAGE_VERSION=void 0;dR.PACKAGE_VERSION="0.33.0";dR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var Nke=Q(pE=>{"use strict";m();Object.defineProperty(pE,"__esModule",{value:!0});pE.TediousInstrumentation=pE.INJECTED_CTX=void 0;var pR=(je(),Me(We)),jCt=Ge("events"),jA=on(),xy=(Zn(),Me(Ur)),dE=Cke(),Rke=bke(),xke=vke(),Bke=Symbol("opentelemetry.instrumentation-tedious.current-database");pE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var Dke=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function h3(e){Object.defineProperty(this,Bke,{value:e,writable:!0})}var XJ=class e extends jA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(xke.PACKAGE_NAME,xke.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new jA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of Dke)(0,jA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,jA.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 Dke)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return h3.call(this,this.config?.options?.database),this.removeListener("databaseChange",h3),this.on("databaseChange",h3),this.once("end",()=>{this.removeListener("databaseChange",h3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||pR.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,pE.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?.[pE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof jCt.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[Bke],y=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),C={};o._dbSemconvStability&jA.SemconvStability.OLD&&(C[dE.ATTR_DB_SYSTEM]=dE.DB_SYSTEM_VALUE_MSSQL,C[dE.ATTR_DB_NAME]=S,C[dE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,C[dE.ATTR_DB_STATEMENT]=y,C[dE.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&jA.SemconvStability.STABLE&&(C[xy.ATTR_DB_NAMESPACE]=S,C[xy.ATTR_DB_SYSTEM_NAME]=xy.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,C[xy.ATTR_DB_QUERY_TEXT]=y,C[xy.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&jA.SemconvStability.OLD&&(C[dE.ATTR_NET_PEER_NAME]=this.config?.server,C[dE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&jA.SemconvStability.STABLE&&(C[xy.ATTR_SERVER_ADDRESS]=this.config?.server,C[xy.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,Rke.getSpanName)(t,S,y,a.table),{kind:pR.SpanKind.CLIENT,attributes:C}),x=(0,Rke.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:pR.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 O=()=>pR.context.with(pR.trace.setSpan(pR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return O();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(O)}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)}}};pE.TediousInstrumentation=XJ});var Oke=Q(_3=>{"use strict";m();Object.defineProperty(_3,"__esModule",{value:!0});_3.TediousInstrumentation=void 0;var HCt=Nke();Object.defineProperty(_3,"TediousInstrumentation",{enumerable:!0,get:function(){return HCt.TediousInstrumentation}})});var wke,zCt,kke,Pke,$Ct,Mke,Lke=N(()=>{m();wke=ie(Oke(),1);dt();mr();zCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),kke="Tedious",Pke=st(kke,()=>new wke.TediousInstrumentation({})),$Ct=()=>{let e;return{name:kke,setupOnce(){let t=Pke();e=dN(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]||"";zCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}},Mke=$Ct});var Uke=Q(fR=>{"use strict";m();Object.defineProperty(fR,"__esModule",{value:!0});fR.PACKAGE_NAME=fR.PACKAGE_VERSION=void 0;fR.PACKAGE_VERSION="0.57.0";fR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var Fke=Q(E3=>{"use strict";m();Object.defineProperty(E3,"__esModule",{value:!0});E3.GenericPoolInstrumentation=void 0;var AR=(je(),Me(We)),Dy=on(),Qke=Uke(),eZ="generic-pool",tZ=class extends Dy.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(Qke.PACKAGE_NAME,Qke.PACKAGE_VERSION,t)}init(){return[new Dy.InstrumentationNodeModuleDefinition(eZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,Dy.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 Dy.InstrumentationNodeModuleDefinition(eZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,Dy.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 Dy.InstrumentationNodeModuleDefinition(eZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,Dy.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=AR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return AR.context.with(AR.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=AR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return AR.context.with(AR.trace.setSpan(a,c),()=>{t.call(this,(d,g)=>{if(c.end(),o)return o(d,g)},i)})}}};E3.GenericPoolInstrumentation=tZ});var Gke=Q(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.GenericPoolInstrumentation=void 0;var VCt=Fke();Object.defineProperty(S3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return VCt.GenericPoolInstrumentation}})});var jke,Hke,zke,qCt,$ke,Vke=N(()=>{m();jke=ie(Gke(),1);dt();mr();Hke="GenericPool",zke=st(Hke,()=>new jke.GenericPoolInstrumentation({})),qCt=()=>{let e;return{name:Hke,setupOnce(){let t=zke();e=dN(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")}))}}},$ke=qCt});var nZ=Q(HA=>{"use strict";m();Object.defineProperty(HA,"__esModule",{value:!0});HA.ATTR_NET_PEER_PORT=HA.ATTR_NET_PEER_NAME=HA.ATTR_MESSAGING_SYSTEM=HA.ATTR_MESSAGING_OPERATION=void 0;HA.ATTR_MESSAGING_OPERATION="messaging.operation";HA.ATTR_MESSAGING_SYSTEM="messaging.system";HA.ATTR_NET_PEER_NAME="net.peer.name";HA.ATTR_NET_PEER_PORT="net.peer.port"});var rZ=Q(Ai=>{"use strict";m();Object.defineProperty(Ai,"__esModule",{value:!0});Ai.ATTR_MESSAGING_CONVERSATION_ID=Ai.OLD_ATTR_MESSAGING_MESSAGE_ID=Ai.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=Ai.ATTR_MESSAGING_URL=Ai.ATTR_MESSAGING_PROTOCOL_VERSION=Ai.ATTR_MESSAGING_PROTOCOL=Ai.MESSAGING_OPERATION_VALUE_PROCESS=Ai.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=Ai.ATTR_MESSAGING_DESTINATION_KIND=Ai.ATTR_MESSAGING_DESTINATION=void 0;Ai.ATTR_MESSAGING_DESTINATION="messaging.destination";Ai.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";Ai.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";Ai.MESSAGING_OPERATION_VALUE_PROCESS="process";Ai.ATTR_MESSAGING_PROTOCOL="messaging.protocol";Ai.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";Ai.ATTR_MESSAGING_URL="messaging.url";Ai.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";Ai.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";Ai.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var oZ=Q(By=>{"use strict";m();Object.defineProperty(By,"__esModule",{value:!0});By.DEFAULT_CONFIG=By.EndOperation=void 0;var YCt;(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"})(YCt=By.EndOperation||(By.EndOperation={}));By.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var Jke=Q(mi=>{"use strict";m();Object.defineProperty(mi,"__esModule",{value:!0});mi.isConfirmChannelTracing=mi.unmarkConfirmChannelTracing=mi.markConfirmChannelTracing=mi.getConnectionAttributesFromUrl=mi.getConnectionAttributesFromServer=mi.normalizeExchange=mi.CONNECTION_ATTRIBUTES=mi.CHANNEL_CONSUME_TIMEOUT_TIMER=mi.CHANNEL_SPANS_NOT_ENDED=mi.MESSAGE_STORED_SPAN=void 0;var iZ=(je(),Me(We)),fE=on(),y3=(Zn(),Me(Ur)),DO=nZ(),T3=rZ();mi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");mi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");mi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");mi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var aZ=(0,iZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),KCt=e=>e!==""?e:"<default>";mi.normalizeExchange=KCt;var JCt=e=>e.replace(/:[^:@/]*@/,":***@"),qke=(e,t)=>e||(t==="AMQP"?5672:5671),Yke=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},Kke=e=>e||"localhost",zA=(e,t,n,r)=>n?{[t]:n}:(iZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),ZCt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[DO.ATTR_MESSAGING_SYSTEM]:t}:{}};mi.getConnectionAttributesFromServer=ZCt;var WCt=(e,t)=>{let n={[T3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=Yke(r?.protocol);Object.assign(n,{...zA(e,T3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=Kke(r?.hostname);t&fE.SemconvStability.OLD&&Object.assign(n,{...zA(e,DO.ATTR_NET_PEER_NAME,i,"hostname")}),t&fE.SemconvStability.STABLE&&Object.assign(n,{...zA(e,y3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=qke(r.port,o);t&fE.SemconvStability.OLD&&Object.assign(n,zA(e,DO.ATTR_NET_PEER_PORT,a,"port")),t&fE.SemconvStability.STABLE&&Object.assign(n,zA(e,y3.ATTR_SERVER_PORT,a,"port"))}else{let r=JCt(e);n[T3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=Yke(o.protocol);Object.assign(n,{...zA(r,T3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=Kke(o.hostname);t&fE.SemconvStability.OLD&&Object.assign(n,{...zA(r,DO.ATTR_NET_PEER_NAME,a,"hostname")}),t&fE.SemconvStability.STABLE&&Object.assign(n,{...zA(r,y3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=qke(o.port?parseInt(o.port):void 0,i);t&fE.SemconvStability.OLD&&Object.assign(n,zA(r,DO.ATTR_NET_PEER_PORT,c,"port")),t&fE.SemconvStability.STABLE&&Object.assign(n,zA(r,y3.ATTR_SERVER_PORT,c,"port"))}catch(o){iZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};mi.getConnectionAttributesFromUrl=WCt;var XCt=e=>e.setValue(aZ,!0);mi.markConfirmChannelTracing=XCt;var ebt=e=>e.deleteValue(aZ);mi.unmarkConfirmChannelTracing=ebt;var tbt=e=>e.getValue(aZ)===!0;mi.isConfirmChannelTracing=tbt});var Zke=Q(mR=>{"use strict";m();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.61.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var Xke=Q(b3=>{"use strict";m();Object.defineProperty(b3,"__esModule",{value:!0});b3.AmqplibInstrumentation=void 0;var Zo=(je(),Me(We)),I3=Tr(),Cr=on(),nbt=nZ(),Gl=rZ(),Yu=oZ(),gi=Jke(),Wke=Zke(),C3=[">=0.5.5 <1"],sZ=class extends Cr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(Wke.PACKAGE_NAME,Wke.PACKAGE_VERSION,{...Yu.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Cr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Yu.DEFAULT_CONFIG,...t})}init(){let t=new Cr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",C3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new Cr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",C3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new Cr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",C3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new Cr.InstrumentationNodeModuleDefinition("amqplib",C3,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,Yu.EndOperation.Ack)),(0,Cr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Yu.EndOperation.Nack)),(0,Cr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Yu.EndOperation.Reject)),(0,Cr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Yu.EndOperation.AckAll)),(0,Cr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Yu.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,gi.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,gi.getConnectionAttributesFromServer)(d);d[gi.CONNECTION_ATTRIBUTES]={...g,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Yu.EndOperation.ChannelClosed,void 0);let i=this[gi.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[gi.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Yu.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===Yu.EndOperation.Reject?c:d,S=g[gi.CHANNEL_SPANS_NOT_ENDED]??[],y=S.findIndex(C=>C.msg===a);if(y<0)o.endConsumerSpan(a,t,n,h);else if(n!==Yu.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,gi.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let S=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);S.unref(),d[gi.CHANNEL_CONSUME_TIMEOUT_TIMER]=S}d[gi.CHANNEL_SPANS_NOT_ENDED]=[]}let g=function(h){if(!h)return a.call(this,h);let S=h.properties.headers??{},y=Zo.propagation.extract(Zo.ROOT_CONTEXT,S),C=h.fields?.exchange,v;if(r._config.useLinksForConsume){let F=y?Zo.trace.getSpan(y)?.spanContext():void 0;y=void 0,F&&(v=[{context:F}])}let x=r.tracer.startSpan(`${i} process`,{kind:Zo.SpanKind.CONSUMER,attributes:{...d?.connection?.[gi.CONNECTION_ATTRIBUTES],[Gl.ATTR_MESSAGING_DESTINATION]:C,[Gl.ATTR_MESSAGING_DESTINATION_KIND]:Gl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Gl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[nbt.ATTR_MESSAGING_OPERATION]:Gl.MESSAGING_OPERATION_VALUE_PROCESS,[Gl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Gl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},y),{consumeHook:O}=r.getConfig();O&&(0,Cr.safeExecuteInTheMiddle)(()=>O(x,{moduleVersion:t,msg:h}),F=>{F&&Zo.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[gi.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,I3.hrTime)()}),h[gi.MESSAGE_STORED_SPAN]=x);let k=y||Zo.ROOT_CONTEXT;Zo.context.with(Zo.trace.setSpan(k,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Yu.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&&Zo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,F){try{g?.call(this,k,F)}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&&Zo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&S.setStatus({code:Zo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),S.end()}},x=(0,gi.markConfirmChannelTracing)(Zo.context.active()),O=[...arguments];return O[3]=y,O[4]=Zo.context.bind((0,gi.unmarkConfirmChannelTracing)(Zo.trace.setSpan(x,S)),v),Zo.context.with(x,n.bind(this,...O))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,gi.isConfirmChannelTracing)(Zo.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&&Zo.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,gi.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Zo.SpanKind.PRODUCER,attributes:{...o.connection[gi.CONNECTION_ATTRIBUTES],[Gl.ATTR_MESSAGING_DESTINATION]:n,[Gl.ATTR_MESSAGING_DESTINATION_KIND]:Gl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Gl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Gl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Gl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Zo.propagation.inject(Zo.trace.setSpan(Zo.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[gi.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Zo.SpanStatusCode.ERROR,message:r!==Yu.EndOperation.ChannelClosed&&r!==Yu.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[gi.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[gi.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[gi.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&&Zo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,I3.hrTime)(),r=t[gi.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,I3.hrTimeDuration)(a.timeOfConsume,n);if((0,I3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Yu.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};b3.AmqplibInstrumentation=sZ});var tPe=Q(AE=>{"use strict";m();Object.defineProperty(AE,"__esModule",{value:!0});AE.EndOperation=AE.DEFAULT_CONFIG=AE.AmqplibInstrumentation=void 0;var rbt=Xke();Object.defineProperty(AE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return rbt.AmqplibInstrumentation}});var ePe=oZ();Object.defineProperty(AE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return ePe.DEFAULT_CONFIG}});Object.defineProperty(AE,"EndOperation",{enumerable:!0,get:function(){return ePe.EndOperation}})});var nPe,rPe,obt,oPe,ibt,iPe,aPe=N(()=>{m();nPe=ie(tPe(),1);mr();rPe="Amqplib",obt={consumeEndHook:e=>{Qr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Qr(e,"auto.amqplib.otel.publisher")}},oPe=st(rPe,()=>new nPe.AmqplibInstrumentation(obt)),ibt=()=>({name:rPe,setupOnce(){oPe()}}),iPe=ibt});var BO,uZ=N(()=>{m();BO="VercelAI"});function sbt(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 ubt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(cbt(t.content),lbt(t.content))}function cbt(e){for(let t of e){if(!sbt(t))continue;let n=Uq(t.toolCallId);n?Dl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):Dl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function lbt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&Qq(t.toolCallId)}function dbt(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 R3,abt,sPe,v3,uPe=N(()=>{m();R3=ie(on(),1);dt();uZ();abt=[">=3.0.0 <7"],sPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];v3=class e extends R3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new R3.InstrumentationNodeModuleDefinition("ai",abt,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(BO),S=h?.options,y=h?!!g?.getOptions().sendDefaultPii:!1,{recordInputs:C,recordOutputs:v}=dbt(S,c,d,y);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:C,recordOutputs:v},sf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Zi(x,"_sentry_active_span",kc())},()=>{},x=>{ubt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of sPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=sPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function pbt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var cPe,fbt,lPe,dPe=N(()=>{m();dt();mr();uZ();uPe();cPe=st(BO,()=>new v3({}));fbt=(e={})=>{let t;return{name:BO,options:e,setupOnce(){t=cPe()},afterAllSetup(n){e.force??pbt(n)?OU(n):t?.callWhenPatched(()=>OU(n))}}},lPe=fbt});var D3,Abt,x3,pPe=N(()=>{m();D3=ie(on(),1);dt();Abt=[">=4.0.0 <7"],x3=class extends D3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new D3.InstrumentationNodeModuleDefinition("openai",Abt,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(XS(U_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return PU(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 fPe,mbt,APe,mPe=N(()=>{m();dt();mr();pPe();fPe=st(U_,e=>new x3(e)),mbt=(e={})=>({name:U_,setupOnce(){fPe(e)}}),APe=mbt});var N3,gbt,B3,gPe=N(()=>{m();N3=ie(on(),1);dt();gbt=[">=0.19.2 <1.0.0"],B3=class extends N3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new N3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",gbt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(XS(Q_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return MU(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 hPe,hbt,_Pe,EPe=N(()=>{m();dt();mr();gPe();hPe=st(Q_,e=>new B3(e)),hbt=(e={})=>({name:Q_,options:e,setupOnce(){hPe(e)}}),_Pe=hbt});var gR,SPe,O3,yPe=N(()=>{m();gR=ie(on(),1);dt();SPe=[">=0.10.0 <2"],O3=class extends gR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new gR.InstrumentationNodeModuleDefinition("@google/genai",SPe,n=>this._patch(n),n=>n,[new gR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",SPe,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(XS(F_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return LU(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 cN(t,"GoogleGenAI",o),t}}});var TPe,_bt,IPe,CPe=N(()=>{m();dt();mr();yPe();TPe=st(F_,e=>new O3(e)),_bt=(e={})=>({name:F_,setupOnce(){TPe(e)}}),IPe=_bt});function Ebt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function Sbt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,g=Ebt(d,t);return c.callbacks=g,Reflect.apply(r,o,i)}})}var mE,w3,k3,bPe=N(()=>{m();mE=ie(on(),1);dt();w3=[">=0.1.0 <2.0.0"];k3=class extends mE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new mE.InstrumentationNodeModuleDefinition(r,w3,this._patch.bind(this),o=>o,[new mE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,w3,this._patch.bind(this),o=>o)]));return t.push(new mE.InstrumentationNodeModuleDefinition("langchain",w3,this._patch.bind(this),r=>r,[new mE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",w3,this._patch.bind(this),r=>r)])),t}_patch(t){tq([U_,Q_,F_]);let n=GU(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]=Sbt(g,n))}}}});var vPe,ybt,RPe,xPe=N(()=>{m();dt();mr();bPe();vPe=st(UU,e=>new k3(e)),ybt=(e={})=>({name:UU,setupOnce(){vPe(e)}}),RPe=ybt});var hR,DPe,P3,BPe=N(()=>{m();hR=ie(on(),1);dt();DPe=[">=0.0.0 <2.0.0"],P3=class extends hR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new hR.InstrumentationNodeModuleDefinition("@langchain/langgraph",DPe,this._patch.bind(this),n=>n,[new hR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",DPe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&HU(t.StateGraph.prototype,this.getConfig()),t}}});var NPe,Tbt,OPe,wPe=N(()=>{m();dt();mr();BPe();NPe=st(jU,e=>new P3(e)),Tbt=(e={})=>({name:jU,setupOnce(){NPe(e)}}),OPe=Tbt});import*as PPe from"node:net";function MPe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,Mg.safeExecuteInTheMiddle)(()=>c(h),S=>{S&&Rl.error(S?.message)},!0)});let d=new Mg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>kPe(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 Mg.InstrumentationNodeModuleFile(h,t,S=>kPe(S,n,r,e,a),S=>LPe(S,r)));return d}function kPe(e,t,n,r,o){return LPe(e,n),t(e,"addDoc",Ibt(r,o)),t(e,"getDocs",bbt(r,o)),t(e,"setDoc",vbt(r,o)),t(e,"deleteDoc",Cbt(r,o)),e}function LPe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Mg.isWrapped)(e[n])&&t(e,n);return e}function Ibt(e,t){return function(r){return function(o,i){let a=L3(e,"addDoc",o);return t(a),M3(a,()=>r(o,i))}}}function Cbt(e,t){return function(r){return function(o){let i=L3(e,"deleteDoc",o.parent||o);return t(i),M3(i,()=>r(o))}}}function bbt(e,t){return function(r){return function(o){let i=L3(e,"getDocs",o);return t(i),M3(i,()=>r(o))}}}function vbt(e,t){return function(r){return function(o,i,a){let c=L3(e,"setDoc",o.parent||o);return t(c),M3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function M3(e,t){return Ke.with(zt.setSpan(Ke.active(),e),()=>(0,Mg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function L3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:io.CLIENT});return xbt(r,n),r.setAttribute(rb,t),r}function Rbt(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(PPe.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 xbt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[b5]:t.path,[v5]:n.name,[PS]:"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}=Rbt(i);c&&(a[k5]=c),d&&(a[P5]=d),e.setAttributes(a)}var Mg,UPe=N(()=>{m();je();Mg=ie(on(),1);Zn()});function QPe(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,Lg.safeExecuteInTheMiddle)(()=>g(y,C),v=>{v&&Rl.error(v?.message)},!0)}),typeof d=="function"&&(i=y=>{(0,Lg.safeExecuteInTheMiddle)(()=>d(y),C=>{C&&Rl.error(C?.message)},!0)});let h=new Lg.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 Lg.InstrumentationNodeModuleFile(y,t,v=>Dbt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},C),v=>FPe(v,r)))}),h}function Ku(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...g){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",S=e.startSpan(`firebase.function.${n}`,{kind:io.SERVER}),y={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(y["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(y["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),S.setAttributes(y),t?.requestHook?.(S),Ke.with(zt.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 Dbt(e,t,n,r,o,i){switch(FPe(e,n),i){case"function":t(e,"onRequest",Ku(r,o,"http.request")),t(e,"onCall",Ku(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ku(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ku(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ku(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ku(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ku(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ku(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ku(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ku(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ku(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ku(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ku(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ku(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ku(r,o,"storage.object.metadataUpdated"));break}return e}function FPe(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,Lg.isWrapped)(e[r])&&t(e,r);return e}var Lg,GPe=N(()=>{m();je();Lg=ie(on(),1)});var HPe,jPe,Bbt,Nbt,U3,zPe=N(()=>{m();HPe=ie(on(),1);dt();UPe();GPe();jPe={},Bbt=[">=3.0.0 <5"],Nbt=[">=6.0.0 <7"],U3=class extends HPe.InstrumentationBase{constructor(t=jPe){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...jPe,...t})}init(){let t=[];return t.push(MPe(this.tracer,Bbt,this._wrap,this._unwrap,this.getConfig())),t.push(QPe(this.tracer,Nbt,this._wrap,this._unwrap,this.getConfig())),t}}});var $Pe,Obt,VPe,wbt,qPe,YPe=N(()=>{m();dt();mr();zPe();$Pe="Firebase",Obt={firestoreSpanCreationHook:e=>{Qr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Qr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await Gb(2e3))}}},VPe=st($Pe,()=>new U3(Obt)),wbt=()=>({name:$Pe,setupOnce(){VPe()}}),qPe=wbt});function KPe(){return[Wxe(),O1e(),iBe(),qwe(),VBe(),sNe(),ENe(),NNe(),cOe(),BOe(),xwe(),jwe(),cke(),Tke(),Mke(),$ke(),TBe(),iPe(),wBe(),RPe(),OPe(),lPe(),APe(),_Pe(),IPe(),kOe(),qPe()]}var JPe=N(()=>{m();aPe();EPe();Ike();Xxe();P1e();YPe();Vke();CPe();sBe();Hwe();Ywe();IBe();lke();xPe();wPe();kBe();qBe();uNe();SNe();ONe();mPe();NOe();POe();Dwe();lOe();Lke();dPe()});function WPe(e,t={}){e.getOptions().debug&&gY();let[n,r]=kbt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function kbt(e,t={}){let n=new ZPe.BasicTracerProvider({sampler:new KQ(e),resource:(0,Q3.defaultResource)().merge((0,Q3.resourceFromAttributes)({[M5]:"node",[C5]:"sentry",[L5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new YQ({timeout:Pbt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});zt.setGlobalTracerProvider(n),Jp.setGlobalPropagator(new qQ);let r=new ZQ;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Pbt(e){if(e!=null){if(e>cZ)return Ia&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${cZ}`),cZ;if(e<=0||Number.isNaN(e)){Ia&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var Q3,ZPe,cZ,XPe=N(()=>{m();je();Q3=ie(D7(),1),ZPe=ie(tY(),1);Zn();dt();mr();Ev();gy();cZ=1e6});function eMe(){return oF().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(xxe(),Lxe())}function tMe(e){return[...eMe(),...Bi(e)?KPe():[]]}function lZ(e={}){return Mbt(e,tMe)}function Mbt(e={},t){ey(e,"node");let n=jY({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(WPe(n,{spanProcessors:e.openTelemetrySpanProcessors}),iF()),n}var nMe=N(()=>{m();dt();mr();Dxe();Uxe();JPe();XPe()});var _R=N(()=>{m();nMe();dt();mr()});function wi(){return Lbt}function Ju(){return rMe}function oMe(){return Ubt}var Lbt,rMe,Ubt,jl=N(()=>{"use strict";m();Lbt="prod",rMe="0.1.148",Ubt=`@tanagram/lore/${rMe}`});function Hbt(e=""){if(!Gbt.test(e))return e!==e.toLowerCase()}function iMe(e,t){let n=t??jbt,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=Hbt(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 zbt(e){return e?e[0].toUpperCase()+e.slice(1):""}function $bt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Vbt(e,t){return e?(Array.isArray(e)?e:iMe(e)).map(n=>zbt(t?.normalize?n.toLowerCase():n)).join(""):""}function OO(e,t){return $bt(Vbt(e||"",t))}function F3(e,t){return e?(Array.isArray(e)?e:iMe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function aMe(e){return F3(e||"","_")}var Gbt,jbt,sMe=N(()=>{m();Gbt=/\d/,jbt=["-","_","/","."]});import{parseArgs as qbt}from"node:util";function z3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function dZ(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 Hl(e){return typeof e=="function"?e():e}function Ybt(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[O,k]of Object.entries(o)){let F=k;for(let j of F)a.set(O,j),c.has(j)||c.set(j,[]),c.get(j).push(O),a.set(j,O),c.has(O)||c.set(O,[]),c.get(O).push(j)}let d={};function g(O){if(n.has(O))return"boolean";let k=c.get(O)||[];for(let F of k)if(n.has(F))return"boolean";return"string"}function h(O){if(r.has(O))return!0;let k=c.get(O)||[];for(let F of k)if(r.has(F))return!0;return!1}let S=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let O of S)d[O]||(d[O]={type:g(O),default:i[O]});for(let[O,k]of a.entries())O.length===1&&d[k]&&!d[k].short&&(d[k].short=O);let y=[],C={};for(let O=0;O<e.length;O++){let k=e[O];if(k==="--"){y.push(...e.slice(O));break}if(k.startsWith("--no-")){let F=k.slice(5);C[F]=!0;continue}y.push(k)}let v;try{v=qbt({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[O,k]of Object.entries(v.values)){let F=k;g(O)==="boolean"&&typeof k=="string"?F=k!=="false":h(O)&&typeof k=="boolean"&&(F=""),x[O]=F}for(let[O]of Object.entries(C)){x[O]=!1;let k=a.get(O);k&&(x[k]=!1);let F=c.get(O);if(F)for(let j of F)x[j]=!1}for(let[O,k]of a.entries())x[O]!==void 0&&x[k]===void 0&&(x[k]=x[O]),x[k]!==void 0&&x[O]===void 0&&(x[O]=x[k]),x[O]!==x[k]&&i[k]===x[k]&&(x[k]=x[O]);return x}function Jbt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=lMe(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=OO(c.name),g=F3(c.name);if(d!==c.name||g!==c.name){let h=z3(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=Ybt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[OO(d)]??c[F3(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 Ny(`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 Ny(`Invalid value for argument: ${Af(`--${c.name}`)} (${Af(d)}). Expected one of: ${g.map(h=>Af(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new Ny(`Missing required argument: --${c.name}`,"EARG");return a}function lMe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:z3(r.alias)});return t}async function Zbt(e){return Promise.all(e.map(t=>Hl(t)))}async function Oy(e,t){let n=await Hl(e.args||{}),r=Jbt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await Zbt(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 Hl(e.subCommands);if(g&&Object.keys(g).length>0){let h=Wbt(t.rawArgs,n),S=t.rawArgs[h];if(S){let y=await uMe(g,S);if(!y)throw new Ny(`Unknown command ${Af(S)}`,"E_UNKNOWN_COMMAND");await Oy(y,{rawArgs:t.rawArgs.slice(h+1)})}else{let y=await Hl(e.default);if(y){if(e.run)throw new Ny("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let C=await uMe(g,y);if(!C)throw new Ny(`Default sub command ${Af(y)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await Oy(C,{rawArgs:t.rawArgs})}else if(!e.run)throw new Ny("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 uMe(e,t){if(t in e)return Hl(e[t]);for(let n of Object.values(e)){let r=await Hl(n),o=await Hl(r?.meta);if(o?.alias&&z3(o.alias).includes(t))return r}}function Wbt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Xbt(r,t)&&n++;continue}return n}return-1}function Xbt(e,t){let n=e.replace(/^-{1,2}/,""),r=OO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===OO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function fZ(e,t){let n=await Hl(e.meta||{}),r=lMe(await Hl(e.args||{})),o=await Hl(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([Af(v+pZ(C)),cMe(C,x)]),g.push(x?`<${v}>`:`[${v}]`)}else{let v=C.required===!0&&C.default===void 0,x=[...(C.alias||[]).map(O=>`-${O}`),`--${C.name}`].join(", ")+pZ(C);if(a.push([Af(x),cMe(C,v)]),C.type==="boolean"&&(C.default===!0||C.negativeDescription)&&!evt.test(C.name)){let O=[...(C.alias||[]).map(k=>`--no-${k}`),`--no-${C.name}`].join(", ");a.push([Af(O),[C.negativeDescription,v?H3("(Required)"):""].filter(Boolean).join(" ")])}v&&g.push(`--${C.name}`+pZ(C))}if(e.subCommands){let C=[],v=await Hl(e.subCommands);for(let[x,O]of Object.entries(v)){let k=await Hl((await Hl(O))?.meta);if(k?.hidden)continue;let F=z3(k?.alias),j=[x,...F].join(", ");d.push([Af(j),k?.description||""]),C.push(x,...F)}g.push(C.join("|"))}let h=[],S=n.version||o.version;h.push(H3(`${n.description} (${i+(S?` v${S}`:"")})`),"");let y=a.length>0||c.length>0;return h.push(`${j3(G3("USAGE"))} ${Af(`${i}${y?" [OPTIONS]":""} ${g.join(" ")}`)}`,""),c.length>0&&(h.push(j3(G3("ARGUMENTS")),""),h.push(dZ(c," ")),h.push("")),a.length>0&&(h.push(j3(G3("OPTIONS")),""),h.push(dZ(a," ")),h.push("")),d.length>0&&(h.push(j3(G3("COMMANDS")),""),h.push(dZ(d," ")),h.push("",`Use ${Af(`${i} <command> --help`)} for more information about a command.`)),h.filter(C=>typeof C=="string").join(`
40
40
  `)}function pZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${aMe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function cMe(e,t){let n=t?H3("(Required)"):"",r=e.default===void 0?"":H3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var Ny,Kbt,$3,G3,Af,H3,j3,evt,AZ=N(()=>{m();sMe();Ny=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Kbt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),$3=(e,t=39)=>n=>Kbt?n:`\x1B[${e}m${n}\x1B[${t}m`,G3=$3(1,22),Af=$3(36),H3=$3(90),j3=$3(4,24);evt=/^no[-A-Z]/});function nvt(e){AMe=e}function q3(){return AMe}function ut(e,t){let n=Y3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,q3(),wO].filter(r=>!!r)});e.common.issues.push(n)}function vn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,c)=>a.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:r??c.defaultError}:{message:n??c.defaultError},description:o}}function fvt(e,t){return!!((t==="v4"||!t)&&lvt.test(e)||(t==="v6"||!t)&&dvt.test(e))}function Avt(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 ER(e){if(e instanceof du){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=mf.create(ER(r))}return new du({...e._def,shape:()=>t})}else return e instanceof Qg?new Qg({...e._def,type:ER(e.element)}):e instanceof mf?mf.create(ER(e.unwrap())):e instanceof Fg?Fg.create(ER(e.unwrap())):e instanceof $A?$A.create(e.items.map(t=>ER(t))):e}function SZ(e,t){let n=gE(e),r=gE(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=SZ(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=SZ(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 gMe(e,t){return new Hy({values:e,typeName:Yt.ZodEnum,...vn(t)})}var _r,hZ,at,gE,Ve,tvt,zc,wO,AMe,Y3,rvt,lu,hn,mMe,Zu,_Z,EZ,kO,K3,Mt,ep,dMe,Rn,ovt,ivt,avt,svt,uvt,cvt,lvt,dvt,pvt,hE,wy,ky,Py,My,SR,Ly,Uy,_E,Ug,gf,yR,Qg,du,Qy,V3,J3,Fy,$A,Z3,TR,IR,W3,Gy,jy,Hy,zy,EE,zl,mf,Fg,$y,CR,bR,mvt,X3,PO,vR,hMe,gvt,Yt,hvt,_Me,EMe,_vt,Evt,SMe,Svt,yvt,Tvt,Ivt,Cvt,bvt,vvt,Rvt,xvt,Dvt,Bvt,Nvt,Ovt,wvt,kvt,Pvt,Mvt,Lvt,Uvt,Qvt,Fvt,Gvt,jvt,Hvt,pMe,zvt,$vt,Vvt,qvt,Yvt,Kvt,Jvt,Zvt,Wvt,cu,Xvt,mZ,eRt,Xd,yZ,Ybn,Kbn,Jbn,yMe,tRt,nRt,rRt,oRt,TMe,IMe,CMe,gZ,is,iRt,aRt,sRt,uRt,TZ,IZ,CZ,cRt,fMe,lRt,dRt,pRt,fRt,bZ,hf=N(()=>{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})})(hZ||(hZ={}));at=_r.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),gE=e=>{switch(typeof e){case"undefined":return at.undefined;case"string":return at.string;case"number":return isNaN(e)?at.nan:at.number;case"boolean":return at.boolean;case"function":return at.function;case"bigint":return at.bigint;case"symbol":return at.symbol;case"object":return Array.isArray(e)?at.array:e===null?at.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?at.promise:typeof Map<"u"&&e instanceof Map?at.map:typeof Set<"u"&&e instanceof Set?at.set:typeof Date<"u"&&e instanceof Date?at.date:at.object;default:return at.unknown}},Ve=_r.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),tvt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),zc=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()}};zc.create=e=>new zc(e);wO=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,_r.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${_r.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${_r.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${_r.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:_r.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,_r.assertNever(e)}return{message:n}},AMe=wO;Y3=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}},rvt=[];lu=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return hn;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return hn;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}},hn=Object.freeze({status:"aborted"}),mMe=e=>({status:"dirty",value:e}),Zu=e=>({status:"valid",value:e}),_Z=e=>e.status==="aborted",EZ=e=>e.status==="dirty",kO=e=>e.status==="valid",K3=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Mt||(Mt={}));ep=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}},dMe=(e,t)=>{if(kO(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 zc(e.common.issues);return this._error=n,this._error}}};Rn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return gE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:gE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new lu,ctx:{common:t.parent.common,data:t.data,parsedType:gE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(K3(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:gE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return dMe(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:gE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(K3(o)?o:Promise.resolve(o));return dMe(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let a=t(o),c=()=>i.addIssue({code:Ve.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new zl({schema:this,typeName:Yt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return mf.create(this,this._def)}nullable(){return Fg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Qg.create(this,this._def)}promise(){return EE.create(this,this._def)}or(t){return Qy.create([this,t],this._def)}and(t){return Fy.create(this,t,this._def)}transform(t){return new zl({...vn(this._def),schema:this,typeName:Yt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new $y({...vn(this._def),innerType:this,defaultValue:n,typeName:Yt.ZodDefault})}brand(){return new X3({typeName:Yt.ZodBranded,type:this,...vn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new CR({...vn(this._def),innerType:this,catchValue:n,typeName:Yt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return PO.create(this,t)}readonly(){return vR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ovt=/^c[^\s-]{8,}$/i,ivt=/^[a-z][a-z0-9]*$/,avt=/[0-9A-HJKMNP-TV-Z]{26}/,svt=/^[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,uvt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,cvt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),lvt=/^(((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}))$/,dvt=/^(([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})))$/,pvt=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$");hE=class e extends Rn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ve.invalid_string,...Mt.errToObj(r)}),this.nonempty=t=>this.min(1,Mt.errToObj(t)),this.trim=()=>new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==at.string){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.string,received:i.parsedType}),hn}let r=new lu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,c=t.data.length<i.value;(a||c)&&(o=this._getOrReturnCtx(t,o),a?ut(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")uvt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")cvt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")svt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")ovt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")ivt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")avt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ut(o,{validation:"url",code:Ve.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"regex",code:Ve.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?pvt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?fvt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:Ve.invalid_string,message:i.message}),r.dirty()):_r.assertNever(i);return{status:r.value,value:t.data}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Mt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Mt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Mt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Mt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Mt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Mt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Mt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Mt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,...Mt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Mt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Mt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Mt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Mt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Mt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Mt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Mt.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};hE.create=e=>{var t;return new hE({checks:[],typeName:Yt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...vn(e)})};wy=class e extends Rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==at.number){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.number,received:i.parsedType}),hn}let r,o=new lu;for(let i of this._def.checks)i.kind==="int"?_r.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Avt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_finite,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Mt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Mt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Mt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Mt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Mt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Mt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Mt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Mt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Mt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Mt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Mt.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&_r.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};wy.create=e=>new wy({checks:[],typeName:Yt.ZodNumber,coerce:e?.coerce||!1,...vn(e)});ky=class e extends Rn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==at.bigint){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.bigint,received:i.parsedType}),hn}let r,o=new lu;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):_r.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Mt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Mt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Mt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Mt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Mt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Mt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Mt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Mt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Mt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Mt.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ky.create=e=>{var t;return new ky({checks:[],typeName:Yt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...vn(e)})};Py=class extends Rn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.boolean,received:r.parsedType}),hn}return Zu(t.data)}};Py.create=e=>new Py({typeName:Yt.ZodBoolean,coerce:e?.coerce||!1,...vn(e)});My=class e extends Rn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_type,expected:at.date,received:i.parsedType}),hn}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:Ve.invalid_date}),hn}let r=new lu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):_r.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Mt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Mt.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};My.create=e=>new My({checks:[],coerce:e?.coerce||!1,typeName:Yt.ZodDate,...vn(e)});SR=class extends Rn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.symbol,received:r.parsedType}),hn}return Zu(t.data)}};SR.create=e=>new SR({typeName:Yt.ZodSymbol,...vn(e)});Ly=class extends Rn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.undefined,received:r.parsedType}),hn}return Zu(t.data)}};Ly.create=e=>new Ly({typeName:Yt.ZodUndefined,...vn(e)});Uy=class extends Rn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.null,received:r.parsedType}),hn}return Zu(t.data)}};Uy.create=e=>new Uy({typeName:Yt.ZodNull,...vn(e)});_E=class extends Rn{constructor(){super(...arguments),this._any=!0}_parse(t){return Zu(t.data)}};_E.create=e=>new _E({typeName:Yt.ZodAny,...vn(e)});Ug=class extends Rn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zu(t.data)}};Ug.create=e=>new Ug({typeName:Yt.ZodUnknown,...vn(e)});gf=class extends Rn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:Ve.invalid_type,expected:at.never,received:n.parsedType}),hn}};gf.create=e=>new gf({typeName:Yt.ZodNever,...vn(e)});yR=class extends Rn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.void,received:r.parsedType}),hn}return Zu(t.data)}};yR.create=e=>new yR({typeName:Yt.ZodVoid,...vn(e)});Qg=class e extends Rn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return ut(n,{code:Ve.invalid_type,expected:at.array,received:n.parsedType}),hn;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(ut(n,{code:a?Ve.too_big:Ve.too_small,minimum:c?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ut(n,{code:Ve.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ut(n,{code:Ve.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>o.type._parseAsync(new ep(n,a,n.path,c)))).then(a=>lu.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new ep(n,a,n.path,c)));return lu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Mt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Mt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Mt.toString(n)}})}nonempty(t){return this.min(1,t)}};Qg.create=(e,t)=>new Qg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Yt.ZodArray,...vn(t)});du=class e extends Rn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=_r.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let g=this._getOrReturnCtx(t);return ut(g,{code:Ve.invalid_type,expected:at.object,received:g.parsedType}),hn}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof gf&&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 ep(o,S,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof gf){let g=this._def.unknownKeys;if(g==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(g==="strict")c.length>0&&(ut(o,{code:Ve.unrecognized_keys,keys:c}),r.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let g=this._def.catchall;for(let h of c){let S=o.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new ep(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=>lu.mergeObjectSync(r,g)):lu.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Mt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,c;let d=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=Mt.errToObj(t).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Yt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return _r.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return _r.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return ER(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 mf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return gMe(_r.objectKeys(this.shape))}};du.create=(e,t)=>new du({shape:()=>e,unknownKeys:"strip",catchall:gf.create(),typeName:Yt.ZodObject,...vn(t)});du.strictCreate=(e,t)=>new du({shape:()=>e,unknownKeys:"strict",catchall:gf.create(),typeName:Yt.ZodObject,...vn(t)});du.lazycreate=(e,t)=>new du({shape:e,unknownKeys:"strip",catchall:gf.create(),typeName:Yt.ZodObject,...vn(t)});Qy=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new zc(c.ctx.common.issues));return ut(n,{code:Ve.invalid_union,unionErrors:a}),hn}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let d of r){let g={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:g});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:g}),g.common.issues.length&&a.push(g.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new zc(d));return ut(n,{code:Ve.invalid_union,unionErrors:c}),hn}}get options(){return this._def.options}};Qy.create=(e,t)=>new Qy({options:e,typeName:Yt.ZodUnion,...vn(t)});V3=e=>e instanceof Gy?V3(e.schema):e instanceof zl?V3(e.innerType()):e instanceof jy?[e.value]:e instanceof Hy?e.options:e instanceof zy?Object.keys(e.enum):e instanceof $y?V3(e._def.innerType):e instanceof Ly?[void 0]:e instanceof Uy?[null]:null,J3=class e extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return ut(n,{code:Ve.invalid_type,expected:at.object,received:n.parsedType}),hn;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ut(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),hn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let a=V3(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let c of a){if(o.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);o.set(c,i)}}return new e({typeName:Yt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...vn(r)})}};Fy=class extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(_Z(i)||_Z(a))return hn;let c=SZ(i.value,a.value);return c.valid?((EZ(i)||EZ(a))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:Ve.invalid_intersection_types}),hn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};Fy.create=(e,t,n)=>new Fy({left:e,right:t,typeName:Yt.ZodIntersection,...vn(n)});$A=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return ut(r,{code:Ve.invalid_type,expected:at.array,received:r.parsedType}),hn;if(r.data.length<this._def.items.length)return ut(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),hn;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let d=this._def.items[c]||this._def.rest;return d?d._parse(new ep(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>lu.mergeArray(n,a)):lu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};$A.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $A({items:e,typeName:Yt.ZodTuple,rest:null,...vn(t)})};Z3=class e extends Rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.object)return ut(r,{code:Ve.invalid_type,expected:at.object,received:r.parsedType}),hn;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new ep(r,c,r.path,c)),value:a._parse(new ep(r,r.data[c],r.path,c))});return r.common.async?lu.mergeObjectAsync(n,o):lu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Rn?new e({keyType:t,valueType:n,typeName:Yt.ZodRecord,...vn(r)}):new e({keyType:hE.create(),valueType:t,typeName:Yt.ZodRecord,...vn(n)})}},TR=class extends Rn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.map)return ut(r,{code:Ve.invalid_type,expected:at.map,received:r.parsedType}),hn;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],g)=>({key:o._parse(new ep(r,c,r.path,[g,"key"])),value:i._parse(new ep(r,d,r.path,[g,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let g=await d.key,h=await d.value;if(g.status==="aborted"||h.status==="aborted")return hn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let g=d.key,h=d.value;if(g.status==="aborted"||h.status==="aborted")return hn;(g.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(g.value,h.value)}return{status:n.value,value:c}}}};TR.create=(e,t,n)=>new TR({valueType:t,keyType:e,typeName:Yt.ZodMap,...vn(n)});IR=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return ut(r,{code:Ve.invalid_type,expected:at.set,received:r.parsedType}),hn;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:Ve.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ut(r,{code:Ve.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(d){let g=new Set;for(let h of d){if(h.status==="aborted")return hn;h.status==="dirty"&&n.dirty(),g.add(h.value)}return{status:n.value,value:g}}let c=[...r.data.values()].map((d,g)=>i._parse(new ep(r,d,r.path,g)));return r.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:Mt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Mt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};IR.create=(e,t)=>new IR({valueType:e,minSize:null,maxSize:null,typeName:Yt.ZodSet,...vn(t)});W3=class e extends Rn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return ut(n,{code:Ve.invalid_type,expected:at.function,received:n.parsedType}),hn;function r(c,d){return Y3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q3(),wO].filter(g=>!!g),issueData:{code:Ve.invalid_arguments,argumentsError:d}})}function o(c,d){return Y3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,q3(),wO].filter(g=>!!g),issueData:{code:Ve.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof EE){let c=this;return Zu(async function(...d){let g=new zc([]),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 Zu(function(...d){let g=c._def.args.safeParse(d,i);if(!g.success)throw new zc([r(d,g.error)]);let h=Reflect.apply(a,this,g.data),S=c._def.returns.safeParse(h,i);if(!S.success)throw new zc([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:$A.create(t).rest(Ug.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||$A.create([]).rest(Ug.create()),returns:n||Ug.create(),typeName:Yt.ZodFunction,...vn(r)})}},Gy=class extends Rn{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Gy.create=(e,t)=>new Gy({getter:e,typeName:Yt.ZodLazy,...vn(t)});jy=class extends Rn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),hn}return{status:"valid",value:t.data}}get value(){return this._def.value}};jy.create=(e,t)=>new jy({value:e,typeName:Yt.ZodLiteral,...vn(t)});Hy=class e extends Rn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{expected:_r.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),hn}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),hn}return Zu(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)))}};Hy.create=gMe;zy=class extends Rn{_parse(t){let n=_r.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=_r.objectValues(n);return ut(r,{expected:_r.joinValues(o),received:r.parsedType,code:Ve.invalid_type}),hn}if(n.indexOf(t.data)===-1){let o=_r.objectValues(n);return ut(r,{received:r.data,code:Ve.invalid_enum_value,options:o}),hn}return Zu(t.data)}get enum(){return this._def.values}};zy.create=(e,t)=>new zy({values:e,typeName:Yt.ZodNativeEnum,...vn(t)});EE=class extends Rn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return ut(n,{code:Ve.invalid_type,expected:at.promise,received:n.parsedType}),hn;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return Zu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};EE.create=(e,t)=>new EE({type:e,typeName:Yt.ZodPromise,...vn(t)});zl=class extends Rn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Yt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ut(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){let a=c=>{let d=o.refinement(c,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?hn:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?hn:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!kO(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=>kO(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);_r.assertNever(o)}};zl.create=(e,t,n)=>new zl({schema:e,typeName:Yt.ZodEffects,effect:t,...vn(n)});zl.createWithPreprocess=(e,t,n)=>new zl({schema:t,effect:{type:"preprocess",transform:e},typeName:Yt.ZodEffects,...vn(n)});mf=class extends Rn{_parse(t){return this._getType(t)===at.undefined?Zu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};mf.create=(e,t)=>new mf({innerType:e,typeName:Yt.ZodOptional,...vn(t)});Fg=class extends Rn{_parse(t){return this._getType(t)===at.null?Zu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fg.create=(e,t)=>new Fg({innerType:e,typeName:Yt.ZodNullable,...vn(t)});$y=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===at.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};$y.create=(e,t)=>new $y({innerType:e,typeName:Yt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...vn(t)});CR=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return K3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new zc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new zc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};CR.create=(e,t)=>new CR({innerType:e,typeName:Yt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...vn(t)});bR=class extends Rn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:Ve.invalid_type,expected:at.nan,received:r.parsedType}),hn}return{status:"valid",value:t.data}}};bR.create=e=>new bR({typeName:Yt.ZodNaN,...vn(e)});mvt=Symbol("zod_brand"),X3=class extends Rn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},PO=class e extends Rn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?hn:i.status==="dirty"?(n.dirty(),mMe(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?hn:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Yt.ZodPipeline})}},vR=class extends Rn{_parse(t){let n=this._def.innerType._parse(t);return kO(n)&&(n.value=Object.freeze(n.value)),n}};vR.create=(e,t)=>new vR({innerType:e,typeName:Yt.ZodReadonly,...vn(t)});hMe=(e,t={},n)=>e?_E.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})}}):_E.create(),gvt={object:du.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Yt||(Yt={}));hvt=(e,t={message:`Input not instance of ${e.name}`})=>hMe(n=>n instanceof e,t),_Me=hE.create,EMe=wy.create,_vt=bR.create,Evt=ky.create,SMe=Py.create,Svt=My.create,yvt=SR.create,Tvt=Ly.create,Ivt=Uy.create,Cvt=_E.create,bvt=Ug.create,vvt=gf.create,Rvt=yR.create,xvt=Qg.create,Dvt=du.create,Bvt=du.strictCreate,Nvt=Qy.create,Ovt=J3.create,wvt=Fy.create,kvt=$A.create,Pvt=Z3.create,Mvt=TR.create,Lvt=IR.create,Uvt=W3.create,Qvt=Gy.create,Fvt=jy.create,Gvt=Hy.create,jvt=zy.create,Hvt=EE.create,pMe=zl.create,zvt=mf.create,$vt=Fg.create,Vvt=zl.createWithPreprocess,qvt=PO.create,Yvt=()=>_Me().optional(),Kvt=()=>EMe().optional(),Jvt=()=>SMe().optional(),Zvt={string:e=>hE.create({...e,coerce:!0}),number:e=>wy.create({...e,coerce:!0}),boolean:e=>Py.create({...e,coerce:!0}),bigint:e=>ky.create({...e,coerce:!0}),date:e=>My.create({...e,coerce:!0})},Wvt=hn,cu=Object.freeze({__proto__:null,defaultErrorMap:wO,setErrorMap:nvt,getErrorMap:q3,makeIssue:Y3,EMPTY_PATH:rvt,addIssueToContext:ut,ParseStatus:lu,INVALID:hn,DIRTY:mMe,OK:Zu,isAborted:_Z,isDirty:EZ,isValid:kO,isAsync:K3,get util(){return _r},get objectUtil(){return hZ},ZodParsedType:at,getParsedType:gE,ZodType:Rn,ZodString:hE,ZodNumber:wy,ZodBigInt:ky,ZodBoolean:Py,ZodDate:My,ZodSymbol:SR,ZodUndefined:Ly,ZodNull:Uy,ZodAny:_E,ZodUnknown:Ug,ZodNever:gf,ZodVoid:yR,ZodArray:Qg,ZodObject:du,ZodUnion:Qy,ZodDiscriminatedUnion:J3,ZodIntersection:Fy,ZodTuple:$A,ZodRecord:Z3,ZodMap:TR,ZodSet:IR,ZodFunction:W3,ZodLazy:Gy,ZodLiteral:jy,ZodEnum:Hy,ZodNativeEnum:zy,ZodPromise:EE,ZodEffects:zl,ZodTransformer:zl,ZodOptional:mf,ZodNullable:Fg,ZodDefault:$y,ZodCatch:CR,ZodNaN:bR,BRAND:mvt,ZodBranded:X3,ZodPipeline:PO,ZodReadonly:vR,custom:hMe,Schema:Rn,ZodSchema:Rn,late:gvt,get ZodFirstPartyTypeKind(){return Yt},coerce:Zvt,any:Cvt,array:xvt,bigint:Evt,boolean:SMe,date:Svt,discriminatedUnion:Ovt,effect:pMe,enum:Gvt,function:Uvt,instanceof:hvt,intersection:wvt,lazy:Qvt,literal:Fvt,map:Mvt,nan:_vt,nativeEnum:jvt,never:vvt,null:Ivt,nullable:$vt,number:EMe,object:Dvt,oboolean:Jvt,onumber:Kvt,optional:zvt,ostring:Yvt,pipeline:qvt,preprocess:Vvt,promise:Hvt,record:Pvt,set:Lvt,strictObject:Bvt,string:_Me,symbol:yvt,transformer:pMe,tuple:kvt,undefined:Tvt,union:Nvt,unknown:bvt,void:Rvt,NEVER:Wvt,ZodIssueCode:Ve,quotelessJson:tvt,ZodError:zc}),Xvt=e=>typeof e?.safeParse=="function",mZ=e=>typeof e?.passthrough=="function",eRt=(e,t)=>mZ(e)?mZ(t)?e.merge(t):e:mZ(t)?t:Object.assign({},e,t),Xd=cu.object({name:cu.literal("ZodError"),issues:cu.array(cu.object({path:cu.array(cu.union([cu.string(),cu.number()])),message:cu.string().optional(),code:cu.nativeEnum(cu.ZodIssueCode)}).catchall(cu.any()))}),yZ=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}},Ybn=cu.object({message:cu.literal("Request validation failed"),pathParameterErrors:Xd.nullable(),headerErrors:Xd.nullable(),queryParameterErrors:Xd.nullable(),bodyErrors:Xd.nullable()}),Kbn=cu.object({pathParameterErrors:Xd.nullable(),headerErrors:Xd.nullable(),queryParameterErrors:Xd.nullable(),bodyErrors:Xd.nullable()}),Jbn=cu.object({paramsResult:Xd.nullable(),headersResult:Xd.nullable(),queryResult:Xd.nullable(),bodyResult:Xd.nullable()}),yMe="zod-ts-rest-polyfill",tRt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},nRt=e=>tRt(e)?e:Xvt(e)?(Object.assign(e,{"~standard":{vendor:yMe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,rRt=(e,t)=>e?t?e instanceof du&&t instanceof du?eRt(e,t):{...e,...t}:e:t,oRt=(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===yMe?{error:new zc(r.issues)}:{error:new yZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},TMe=Symbol("ContractNoBody"),IMe=e=>"method"in e&&"path"in e,CMe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return IMe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:rRt(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,CMe(r,t)]})),gZ=Symbol("ContractPlainType"),is=()=>({router:(e,t)=>CMe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>gZ,body:()=>gZ,type:()=>gZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>TMe}),iRt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},aRt=(e,t=!1)=>{let n=t?sRt(e):uRt(e);return n?.length>0?"?"+n:""},sRt=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("&"):"",uRt=e=>e?Object.keys(e).flatMap(t=>TZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",TZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>TZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>TZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],IZ=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}},CZ=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===TMe?void 0:await c.json(),headers:c.headers},S=nRt(g);if(S&&(i??e.validateResponseOnClient)){let y=oRt(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}},cRt=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},fMe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),lRt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,g=n.api||CZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([C,v])=>typeof v=="function"?[C,v(e)]:[C,v])),S={...h&&fMe(h),...fMe(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:cRt(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})},dRt=(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(([O,k])=>[O,String(k)])):{};return{path:pRt(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}}},pRt=(e,t,n,r,o)=>{let i=iRt({path:r.path,params:n}),a=aRt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},fRt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=dRt(e,t,r),i=await lRt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new IZ(i,n)}},bZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>IMe(r)?[n,fRt(r,t)]:[n,bZ(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 hi(e){return e&&Object.assign(Vy,e),Vy}var bMe,vZ,RZ,_f,SE,Vy,qy=N(()=>{m();vZ=Object.freeze({status:"aborted"});RZ=Symbol("zod_brand"),_f=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},SE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(bMe=globalThis).__zod_globalConfig??(bMe.__zod_globalConfig={});Vy=globalThis.__zod_globalConfig});var Le={};$a(Le,{BIGINT_FORMAT_RANGES:()=>LZ,Class:()=>DZ,NUMBER_FORMAT_RANGES:()=>MZ,aborted:()=>CE,allowsEval:()=>OZ,assert:()=>_Rt,assertEqual:()=>ARt,assertIs:()=>gRt,assertNever:()=>hRt,assertNotEqual:()=>mRt,assignProp:()=>TE,base64ToUint8Array:()=>RMe,base64urlToUint8Array:()=>PRt,cached:()=>xR,captureStackTrace:()=>t6,cleanEnum:()=>kRt,cleanRegex:()=>UO,clone:()=>Wu,cloneDef:()=>SRt,createTransparentProxy:()=>vRt,defineLazy:()=>jn,esc:()=>e6,escapeRegex:()=>tp,explicitlyAborted:()=>UZ,extend:()=>DRt,finalizeIssue:()=>Xu,floatSafeRemainder:()=>BZ,getElementAtPath:()=>yRt,getEnumValues:()=>LO,getLengthableOrigin:()=>GO,getParsedType:()=>bRt,getSizableOrigin:()=>FO,hexToUint8Array:()=>LRt,isObject:()=>Yy,isPlainObject:()=>IE,issue:()=>DR,joinValues:()=>ue,jsonStringifyReplacer:()=>RR,merge:()=>NRt,mergeDefs:()=>Gg,normalizeParams:()=>ze,nullish:()=>yE,numKeys:()=>CRt,objectClone:()=>ERt,omit:()=>xRt,optionalKeys:()=>PZ,parsedType:()=>ke,partial:()=>ORt,pick:()=>RRt,prefixIssues:()=>$c,primitiveTypes:()=>kZ,promiseAllObject:()=>TRt,propertyKeyTypes:()=>QO,randomString:()=>IRt,required:()=>wRt,safeExtend:()=>BRt,shallowClone:()=>wZ,slugify:()=>NZ,stringifyPrimitive:()=>Oe,uint8ArrayToBase64:()=>xMe,uint8ArrayToBase64url:()=>MRt,uint8ArrayToHex:()=>URt,unwrapMessage:()=>MO});function ARt(e){return e}function mRt(e){return e}function gRt(e){}function hRt(e){throw new Error("Unexpected value in exhaustive check")}function _Rt(e){}function LO(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=>Oe(n)).join(t)}function RR(e,t){return typeof t=="bigint"?t.toString():t}function xR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function yE(e){return e==null}function UO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function BZ(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function jn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==vMe)return r===void 0&&(r=vMe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function ERt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function TE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Gg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function SRt(e){return Gg(e._zod.def)}function yRt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function TRt(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 IRt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function e6(e){return JSON.stringify(e)}function NZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function Yy(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function IE(e){if(Yy(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Yy(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function wZ(e){return IE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function CRt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function tp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wu(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function ze(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 vRt(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 Oe(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function PZ(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function RRt(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=Gg(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 TE(this,"shape",a),a},checks:[]});return Wu(e,i)}function xRt(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=Gg(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 TE(this,"shape",a),a},checks:[]});return Wu(e,i)}function DRt(e,t){if(!IE(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=Gg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return TE(this,"shape",i),i}});return Wu(e,o)}function BRt(e,t){if(!IE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Gg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return TE(this,"shape",r),r}});return Wu(e,n)}function NRt(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=Gg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return TE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Wu(e,n)}function ORt(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=Gg(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 TE(this,"shape",d),d},checks:[]});return Wu(t,a)}function wRt(e,t,n){let r=Gg(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 TE(this,"shape",i),i}});return Wu(t,r)}function CE(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 UZ(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 $c(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function MO(e){return typeof e=="string"?e:e?.message}function Xu(e,t,n){let r=e.message?e.message:MO(e.inst?._zod.def?.error?.(e))??MO(t?.error?.(e))??MO(n.customError?.(e))??MO(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 FO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function GO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ke(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function DR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function kRt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function RMe(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 xMe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function PRt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return RMe(t+n)}function MRt(e){return xMe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function LRt(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 vMe,t6,OZ,bRt,QO,kZ,MZ,LZ,DZ,Et=N(()=>{m();qy();vMe=Symbol("evaluating");t6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};OZ=xR(()=>{if(Vy.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});bRt=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}`)}},QO=new Set(["string","number","symbol"]),kZ=new Set(["string","number","bigint","boolean","symbol","undefined"]);MZ={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]},LZ={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};DZ=class{constructor(...t){}}});function HO(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 zO(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 QZ(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 BMe(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 FZ(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 ${BMe(r.path)}`);return t.join(`
41
41
  `)}var DMe,jO,Vc,GZ=N(()=>{m();qy();Et();DMe=(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,RR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},jO=ne("$ZodError",DMe),Vc=ne("$ZodError",DMe,{Parent:Error})});var BR,n6,NR,r6,OR,jZ,wR,HZ,o6,FRt,i6,GRt,a6,jRt,s6,HRt,u6,zRt,c6,$Rt,l6,VRt,d6,qRt,zZ=N(()=>{m();qy();GZ();Et();BR=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 _f;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Xu(d,i,hi())));throw t6(c,o?.callee),c}return a.value},n6=BR(Vc),NR=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=>Xu(d,i,hi())));throw t6(c,o?.callee),c}return a.value},r6=NR(Vc),OR=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 _f;return i.issues.length?{success:!1,error:new(e??jO)(i.issues.map(a=>Xu(a,o,hi())))}:{success:!0,data:i.value}},jZ=OR(Vc),wR=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=>Xu(a,o,hi())))}:{success:!0,data:i.value}},HZ=wR(Vc),o6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return BR(e)(t,n,o)},FRt=o6(Vc),i6=e=>(t,n,r)=>BR(e)(t,n,r),GRt=i6(Vc),a6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return NR(e)(t,n,o)},jRt=a6(Vc),s6=e=>async(t,n,r)=>NR(e)(t,n,r),HRt=s6(Vc),u6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return OR(e)(t,n,o)},zRt=u6(Vc),c6=e=>(t,n,r)=>OR(e)(t,n,r),$Rt=c6(Vc),l6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return wR(e)(t,n,o)},VRt=l6(Vc),d6=e=>async(t,n,r)=>wR(e)(t,n,r),qRt=d6(Vc)});var $l={};$a($l,{base64:()=>aW,base64url:()=>p6,bigint:()=>fW,boolean:()=>mW,browserEmail:()=>txt,cidrv4:()=>oW,cidrv6:()=>iW,cuid:()=>$Z,cuid2:()=>VZ,date:()=>cW,datetime:()=>dW,domain:()=>oxt,duration:()=>ZZ,e164:()=>uW,email:()=>XZ,emoji:()=>eW,extendedDuration:()=>YRt,guid:()=>WZ,hex:()=>ixt,hostname:()=>rxt,html5Email:()=>WRt,httpProtocol:()=>sW,idnEmail:()=>ext,integer:()=>AW,ipv4:()=>tW,ipv6:()=>nW,ksuid:()=>KZ,lowercase:()=>_W,mac:()=>rW,md5_base64:()=>sxt,md5_base64url:()=>uxt,md5_hex:()=>axt,nanoid:()=>JZ,null:()=>gW,number:()=>f6,rfc5322Email:()=>XRt,sha1_base64:()=>lxt,sha1_base64url:()=>dxt,sha1_hex:()=>cxt,sha256_base64:()=>fxt,sha256_base64url:()=>Axt,sha256_hex:()=>pxt,sha384_base64:()=>gxt,sha384_base64url:()=>hxt,sha384_hex:()=>mxt,sha512_base64:()=>Ext,sha512_base64url:()=>Sxt,sha512_hex:()=>_xt,string:()=>pW,time:()=>lW,ulid:()=>qZ,undefined:()=>hW,unicodeEmail:()=>NMe,uppercase:()=>EW,uuid:()=>Ky,uuid4:()=>KRt,uuid6:()=>JRt,uuid7:()=>ZRt,xid:()=>YZ});function eW(){return new RegExp(nxt,"u")}function wMe(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 lW(e){return new RegExp(`^${wMe(e)}$`)}function dW(e){let t=wMe({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(`^${OMe}T(?:${r})$`)}function $O(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function VO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var $Z,VZ,qZ,YZ,KZ,JZ,ZZ,YRt,WZ,Ky,KRt,JRt,ZRt,XZ,WRt,XRt,NMe,ext,txt,nxt,tW,nW,rW,oW,iW,aW,p6,rxt,oxt,sW,uW,OMe,cW,pW,fW,AW,f6,mW,gW,hW,_W,EW,ixt,axt,sxt,uxt,cxt,lxt,dxt,pxt,fxt,Axt,mxt,gxt,hxt,_xt,Ext,Sxt,A6=N(()=>{m();Et();$Z=/^[cC][0-9a-z]{6,}$/,VZ=/^[0-9a-z]+$/,qZ=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,YZ=/^[0-9a-vA-V]{20}$/,KZ=/^[A-Za-z0-9]{27}$/,JZ=/^[a-zA-Z0-9_-]{21}$/,ZZ=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,YRt=/^[-+]?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)?)??$/,WZ=/^([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})$/,Ky=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)$/,KRt=Ky(4),JRt=Ky(6),ZRt=Ky(7),XZ=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,WRt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,XRt=/^(([^<>()\[\]\\.,;:\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,}))$/,NMe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,ext=NMe,txt=/^[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])?)*$/,nxt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";tW=/^(?:(?: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])$/,nW=/^(([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}|:))$/,rW=e=>{let t=tp(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},oW=/^((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])$/,iW=/^(([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])$/,aW=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,p6=/^[A-Za-z0-9_-]*$/,rxt=/^(?=.{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])?)*\.?$/,oxt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,sW=/^https?$/,uW=/^\+[1-9]\d{6,14}$/,OMe="(?:(?:\\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])))",cW=new RegExp(`^${OMe}$`);pW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},fW=/^-?\d+n?$/,AW=/^-?\d+$/,f6=/^-?\d+(?:\.\d+)?$/,mW=/^(?:true|false)$/i,gW=/^null$/i,hW=/^undefined$/i,_W=/^[^A-Z]*$/,EW=/^[^a-z]*$/,ixt=/^[0-9a-fA-F]*$/;axt=/^[0-9a-fA-F]{32}$/,sxt=$O(22,"=="),uxt=VO(22),cxt=/^[0-9a-fA-F]{40}$/,lxt=$O(27,"="),dxt=VO(27),pxt=/^[0-9a-fA-F]{64}$/,fxt=$O(43,"="),Axt=VO(43),mxt=/^[0-9a-fA-F]{96}$/,gxt=$O(64,""),hxt=VO(64),_xt=/^[0-9a-fA-F]{128}$/,Ext=$O(86,"=="),Sxt=VO(86)});function kMe(e,t,n){e.issues.length&&t.issues.push(...$c(n,e.issues))}var Yr,PMe,m6,g6,SW,yW,TW,IW,CW,bW,vW,RW,xW,kR,DW,BW,NW,OW,wW,kW,PW,MW,LW,h6=N(()=>{m();qy();A6();Et();Yr=ne("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),PMe={number:"number",bigint:"bigint",object:"date"},m6=ne("$ZodCheckLessThan",(e,t)=>{Yr.init(e,t);let n=PMe[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})}}),g6=ne("$ZodCheckGreaterThan",(e,t)=>{Yr.init(e,t);let n=PMe[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})}}),SW=ne("$ZodCheckMultipleOf",(e,t)=>{Yr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):BZ(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})}}),yW=ne("$ZodCheckNumberFormat",(e,t)=>{Yr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=MZ[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=AW)}),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})}}),TW=ne("$ZodCheckBigIntFormat",(e,t)=>{Yr.init(e,t);let[n,r]=LZ[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})}}),IW=ne("$ZodCheckMaxSize",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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:FO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),CW=ne("$ZodCheckMinSize",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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:FO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),bW=ne("$ZodCheckSizeEquals",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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:FO(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})}}),vW=ne("$ZodCheckMaxLength",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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=GO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),RW=ne("$ZodCheckMinLength",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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=GO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),xW=ne("$ZodCheckLengthEquals",(e,t)=>{var n;Yr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!yE(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=GO(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})}}),kR=ne("$ZodCheckStringFormat",(e,t)=>{var n,r;Yr.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),DW=ne("$ZodCheckRegex",(e,t)=>{kR.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})}}),BW=ne("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_W),kR.init(e,t)}),NW=ne("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=EW),kR.init(e,t)}),OW=ne("$ZodCheckIncludes",(e,t)=>{Yr.init(e,t);let n=tp(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})}}),wW=ne("$ZodCheckStartsWith",(e,t)=>{Yr.init(e,t);let n=new RegExp(`^${tp(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})}}),kW=ne("$ZodCheckEndsWith",(e,t)=>{Yr.init(e,t);let n=new RegExp(`.*${tp(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})}});PW=ne("$ZodCheckProperty",(e,t)=>{Yr.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>kMe(o,n,t.property));kMe(r,n,t.property)}}),MW=ne("$ZodCheckMimeType",(e,t)=>{Yr.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),LW=ne("$ZodCheckOverwrite",(e,t)=>{Yr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var qO,UW=N(()=>{m();qO=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(`
@@ -520,7 +520,7 @@ exec ${hue(n)} ${hue(e)} "$@"
520
520
  Authorization expired. Please try again.
521
521
  `);return;case"login_failed":console.log(`
522
522
  Login failed: ${e.message}
523
- `);return}}});var j5e={};$a(j5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>K9e,getOpenBrowserCommand:()=>nVe,loginCommand:()=>Iue,openBrowser:()=>tVe,pollForTokens:()=>eVe,requestDeviceAuthorization:()=>X9e,runLogin:()=>rVe});import{spawn as QHt}from"node:child_process";function K9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function jHt(e){let n=await Ut({token:e}).whoAmI({headers:{}});n.status===200&&(MFe(`lore_${n.body.user.id}`),QFe(K9e(n.body)))}async function J9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function Z9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function W9e(e,t){return new URL(t,e).toString()}async function HHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function X9e({clientId:e,workosApiOrigin:t}){let n=await fetch(W9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await J9e(n);if(!n.ok)throw new Error(Z9e(r));return r}async function eVe({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(W9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:GHt,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 J9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await Y9e(c*1e3);break;case"slow_down":c+=1,await Y9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(Z9e(h))}}}async function tVe(e){let{command:t,args:n}=nVe(process.platform,e);await new Promise((r,o)=>{let i=QHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function nVe(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 zHt(e){if(!await Kt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function $Ht(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:rp()})}catch(r){Ee.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function VHt(e){if(ux(e))return`Could not reach the Lore API at ${WA()}. 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 rVe({client:e=Ut(),enableLaunchAgent:t=Fz,openBrowser:n=tVe,platform:r=process.platform,pollForTokens:o=eVe,requestDeviceAuthorization:i=X9e,getCliAuthConfig:a=HHt,setAccessToken:c=sx,setRefreshToken:d=uj,cacheAnalyticsDistinctId:g=jHt,timeoutMs:h=FHt,progress:S=V9e}={}){if(await zHt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){Ee.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{Ee.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await $Ht(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),Nw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),Nw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),Nw());let C=VHt(y);throw C&&(S({kind:"login_failed",message:C}),Nw()),y}}var FHt,GHt,Y9e,Iue,Xse=N(async()=>{"use strict";m();kr();wn();cj();wr();Mi();kE();await Jse();await G5e();$k();lT();q9e();FHt=5*60*1e3,GHt="urn:ietf:params:oauth:grant-type:device_code";Y9e=e=>new Promise(t=>setTimeout(t,e));Iue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){Ee.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(mu()&&!e?.progress){await F5e(t),await Rz({skipIfAlreadyConfigured:!0});return}await rVe({...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]="453580c3-92d1-40fa-aa7c-6427ca6a31d6",e._sentryDebugIdIdentifier="sentry-dbid-453580c3-92d1-40fa-aa7c-6427ca6a31d6")}catch{}})();m();m();m();function wle(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 kle=wle();kle.ok||(process.stderr.write(`lore: ${kle.message}.
523
+ `);return}}});var j5e={};$a(j5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>K9e,getOpenBrowserCommand:()=>nVe,loginCommand:()=>Iue,openBrowser:()=>tVe,pollForTokens:()=>eVe,requestDeviceAuthorization:()=>X9e,runLogin:()=>rVe});import{spawn as QHt}from"node:child_process";function K9e(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function jHt(e){let n=await Ut({token:e}).whoAmI({headers:{}});n.status===200&&(MFe(`lore_${n.body.user.id}`),QFe(K9e(n.body)))}async function J9e(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function Z9e(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function W9e(e,t){return new URL(t,e).toString()}async function HHt(e){let t=await e.getCliAuthConfig();if(t.status!==200)throw new Error("WorkOS CLI Auth is not configured.");return t.body}async function X9e({clientId:e,workosApiOrigin:t}){let n=await fetch(W9e(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await J9e(n);if(!n.ok)throw new Error(Z9e(r));return r}async function eVe({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(W9e(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:GHt,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 J9e(d);if(d.ok)return g;let h=g;switch(h.error){case"authorization_pending":await Y9e(c*1e3);break;case"slow_down":c+=1,await Y9e(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(Z9e(h))}}}async function tVe(e){let{command:t,args:n}=nVe(process.platform,e);await new Promise((r,o)=>{let i=QHt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function nVe(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 zHt(e){if(!await Kt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function $Ht(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:rp()})}catch(r){Ee.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function VHt(e){if(ux(e))return`Could not reach the Lore API at ${WA()}. 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 rVe({client:e=Ut(),enableLaunchAgent:t=Fz,openBrowser:n=tVe,platform:r=process.platform,pollForTokens:o=eVe,requestDeviceAuthorization:i=X9e,getCliAuthConfig:a=HHt,setAccessToken:c=sx,setRefreshToken:d=uj,cacheAnalyticsDistinctId:g=jHt,timeoutMs:h=FHt,progress:S=V9e}={}){if(await zHt(e)){S({kind:"already_logged_in"});return}try{let y=await a(e),C=await i({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin});S({kind:"device_authorized",userCode:C.user_code,verificationUri:C.verification_uri,verificationUriComplete:C.verification_uri_complete});try{await n(C.verification_uri_complete),S({kind:"browser_opened"})}catch(x){Ee.warn("open_browser_failed",{error:x instanceof Error?x.message:String(x)}),S({kind:"browser_open_failed"})}S({kind:"browser_url",url:C.verification_uri_complete}),S({kind:"waiting_for_authorization"});let v=await o({clientId:y.workos_client_id,workosApiOrigin:y.workos_api_origin,deviceCode:C.device_code,expiresIn:C.expires_in,interval:C.interval,timeoutMs:h});c(v.access_token),v.refresh_token&&d(v.refresh_token),g(v.access_token).catch(x=>{Ee.warn("cache_analytics_distinct_id_failed",{error:x instanceof Error?x.message:String(x)})}),S({kind:"logged_in"}),await $Ht(t,r,S)}catch(y){y instanceof Error&&y.message==="authorization timed out"?(S({kind:"authorization_timed_out"}),Nw()):y instanceof Error&&y.message==="Authorization denied"?(S({kind:"authorization_denied"}),Nw()):y instanceof Error&&y.message==="Authorization expired"&&(S({kind:"authorization_expired"}),Nw());let C=VHt(y);throw C&&(S({kind:"login_failed",message:C}),Nw()),y}}var FHt,GHt,Y9e,Iue,Xse=N(async()=>{"use strict";m();kr();wn();cj();wr();Mi();kE();await Jse();await G5e();$k();lT();q9e();FHt=5*60*1e3,GHt="urn:ietf:params:oauth:grant-type:device_code";Y9e=e=>new Promise(t=>setTimeout(t,e));Iue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){Ee.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,getCliAuthConfig:e?.getCliAuthConfig,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(mu()&&!e?.progress){await F5e(t),await Rz({skipIfAlreadyConfigured:!0});return}await rVe({...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]="f06b4ff2-a23e-4df7-8c21-f7092b7e8efd",e._sentryDebugIdIdentifier="sentry-dbid-f06b4ff2-a23e-4df7-8c21-f7092b7e8efd")}catch{}})();m();m();m();function wle(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 kle=wle();kle.ok||(process.stderr.write(`lore: ${kle.message}.
524
524
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
525
525
  `),process.exit(1));m();_R();jl();function Qbt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Fbt=Qbt();lZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:wi(),release:Ju(),sendDefaultPii:!0,enableLogs:!0,spotlight:Fbt,tracesSampleRate:1});rU("service_name","lore-cli");_R();AZ();import{realpathSync as G$t}from"node:fs";import{fileURLToPath as j$t,pathToFileURL as a7e}from"node:url";m();m();KG();kr();wn();wr();m();function Ow(e){let t=e;return t._def??t.def??{}}function mPt(e){let t=Ow(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Kc(e,t,n){let r=mPt(e);return r===t||r===n}function o4e(e){let t=Ow(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function gPt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=Ow(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function bre(e){if(!e||!Kc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=Ow(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function i4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=Ow(t);if(Kc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Kc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Kc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Kc(t,"ZodEffects","effects"))t=i.schema;else if(Kc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function hPt(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=i4e(e),a=!1,c=n;Kc(c,"ZodArray","array")&&(a=!0,c=o4e(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}:Kc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:gPt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Kc(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 vre(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=hPt(i,t);n[o]=a,r[o]={isArray:c,leafKind:_Pt(i)}}return{args:n,fields:r}}function Rre(e,t={}){let n=bre(e);return n?vre(n,t):{args:{},fields:{}}}function _Pt(e){let{inner:t}=i4e(e),n=t;return Kc(n,"ZodArray","array")&&(n=o4e(n)??n),Kc(n,"ZodNumber","number")?"number":Kc(n,"ZodBoolean","boolean")?"boolean":Kc(n,"ZodEnum","enum")?"enum":Kc(n,"ZodString","string")?"string":"other"}function EPt(e,t){let n=e;for(let r of t){if(n===null||typeof n!="object"||!(r in n))throw new Error(`cliRoutes path [${t.join(".")}] does not resolve in apiContract`);n=n[r]}if(n===null||typeof n!="object"||typeof n.method!="string")throw new Error(`cliRoutes path [${t.join(".")}] is not a leaf route (missing 'method')`);return n}function SPt(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 xre(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 yPt(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 TPt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Dre(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>TPt(n,a))}function IPt(e,t,n){return e.resource==="threads"&&t==="id"?yPt(n):n}function a4e(e){let t=EPt(tj,e.path),n=bre(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=vre(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Rre(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Rre(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},g=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:g},args:d,async run({args:h,data:S}){Ee.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let y=S;if(!await(y?.getAccessToken??Kt)())throw new xe("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let Ce=h[ge],be=xre(Ce,i.fields[ge])??Ce;v[ge]=IPt(e,ge,be)}let x={};for(let[ge,Ce]of Object.entries(a.fields)){let be=xre(h[ge],Ce);be!==void 0&&(x[ge]=be)}let O={};for(let[ge,Ce]of Object.entries(c.fields)){let be=xre(h[ge],Ce);be!==void 0&&(O[ge]=be)}let k=[...Dre(t.pathParams,v,"path"),...Dre(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Dre(t.body,O,"body")];if(k.length>0)throw new xe(`Invalid request for \`lore ${e.resource} ${e.op}\`:
526
526
  ${k.join(`