@tanagram/lore 0.1.188 → 0.1.189

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 +3 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
3
- var htt=Object.create;var OL=Object.defineProperty;var _tt=Object.getOwnPropertyDescriptor;var Ett=Object.getOwnPropertyNames;var ytt=Object.getPrototypeOf,Stt=Object.prototype.hasOwnProperty;var Qe=(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 w=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var P=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Js=(e,t)=>{for(var n in t)OL(e,n,{get:t[n],enumerable:!0})},nAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ett(t))!Stt.call(e,o)&&o!==n&&OL(e,o,{get:()=>t[o],enumerable:!(r=_tt(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?htt(ytt(e)):{},nAe(t||!e||!e.__esModule?OL(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>nAe(OL({},"__esModule",{value:!0}),e);var m=w(()=>{(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.188"}}catch{}})()});var Ig,f5=w(()=>{m();Ig="1.9.1"});function Ttt(e){let t=new Set([e]),n=new Set,r=e.match(iAe);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let p=l.match(iAe);if(!p)return i(l);let h={major:+p[1],minor:+p[2],patch:+p[3],prerelease:p[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var iAe,sAe,aAe=w(()=>{m();f5();iAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;sAe=Ttt(Ig)});function Cm(e,t,n,r=!1){var o;let i=oB[rB]=(o=oB[rB])!==null&&o!==void 0?o:{version:Ig};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function Ml(e){var t,n;let r=(t=oB[rB])===null||t===void 0?void 0:t.version;if(!(!r||!sAe(r)))return(n=oB[rB])===null||n===void 0?void 0:n[e]}function vm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=oB[rB];n&&delete n[e]}var btt,rB,oB,sS=w(()=>{m();f5();aAe();btt=Ig.split(".")[0],rB=Symbol.for(`opentelemetry.js.api.${btt}`),oB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function iB(e,t,n){let r=Ml("diag");if(r)return r[e](t,...n)}var kL,uAe=w(()=>{m();sS();kL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return iB("debug",this._namespace,t)}error(...t){return iB("error",this._namespace,t)}info(...t){return iB("info",this._namespace,t)}warn(...t){return iB("warn",this._namespace,t)}verbose(...t){return iB("verbose",this._namespace,t)}}});var Is,PL=w(()=>{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"})(Is||(Is={}))});function cAe(e,t){e<Is.NONE?e=Is.NONE:e>Is.ALL&&(e=Is.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",Is.ERROR),warn:n("warn",Is.WARN),info:n("info",Is.INFO),debug:n("debug",Is.DEBUG),verbose:n("verbose",Is.VERBOSE)}}var lAe=w(()=>{m();PL()});var Itt,Zs,aS=w(()=>{m();uAe();lAe();PL();sS();Itt="diag",Zs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ml("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Is.INFO})=>{var s,u,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let p=Ml("diag"),h=cAe((u=i.logLevel)!==null&&u!==void 0?u:Is.INFO,o);if(p&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";p.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Cm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{vm(Itt,n)},n.createComponentLogger=o=>new kL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var ML,dAe=w(()=>{m();ML=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 pAe,fAe=w(()=>{m();pAe=Symbol("BaggageEntryMetadata")});function mAe(e={}){return new ML(new Map(Object.entries(e)))}function AAe(e){return typeof e!="string"&&(Ctt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:pAe,toString(){return e}}}var Ctt,m5=w(()=>{m();aS();dAe();fAe();Ctt=Zs.instance()});function Ll(e){return Symbol.for(e)}var A5,NC,sB=w(()=>{m();A5=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}}},NC=new A5});var g5,h5,LL,gAe=w(()=>{m();g5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h5[t]=console[t])}LL=class{constructor(){function t(n){return function(...r){let o=h5[n];if(typeof o!="function"&&(o=h5.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<g5.length;n++)this[g5[n].n]=t(g5[n].c)}}});function hAe(){return v5}var _5,BC,E5,y5,S5,T5,aB,b5,I5,C5,v5,vtt,Rtt,xtt,Dtt,Ntt,Btt,wtt,R5=w(()=>{m();_5=class{constructor(){}createGauge(t,n){return Rtt}createHistogram(t,n){return xtt}createCounter(t,n){return vtt}createUpDownCounter(t,n){return Dtt}createObservableGauge(t,n){return Btt}createObservableCounter(t,n){return Ntt}createObservableUpDownCounter(t,n){return wtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},BC=class{},E5=class extends BC{add(t,n){}},y5=class extends BC{add(t,n){}},S5=class extends BC{record(t,n){}},T5=class extends BC{record(t,n){}},aB=class{addCallback(t){}removeCallback(t){}},b5=class extends aB{},I5=class extends aB{},C5=class extends aB{},v5=new _5,vtt=new E5,Rtt=new S5,xtt=new T5,Dtt=new y5,Ntt=new b5,Btt=new I5,wtt=new C5});var UL,_Ae=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(UL||(UL={}))});var QL,FL,x5=w(()=>{m();QL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},FL={set(e,t,n){e!=null&&(e[t]=n)}}});var GL,EAe=w(()=>{m();sB();GL=class{active(){return NC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D5,Ott,Rm,uB=w(()=>{m();EAe();sS();aS();D5="context",Ott=new GL,Rm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Cm(D5,t,Zs.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 Ml(D5)||Ott}disable(){this._getContextManager().disable(),vm(D5,Zs.instance())}}});var ou,N5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var cB,uS,jL,zL=w(()=>{m();N5();cB="0000000000000000",uS="00000000000000000000000000000000",jL={traceId:uS,spanId:cB,traceFlags:ou.NONE}});var xm,HL=w(()=>{m();zL();xm=class{constructor(t=jL){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 $L(e){return e.getValue(B5)||void 0}function yAe(){return $L(Rm.getInstance().active())}function lB(e,t){return e.setValue(B5,t)}function SAe(e){return e.deleteValue(B5)}function TAe(e,t){return lB(e,new xm(t))}function qL(e){var t;return(t=$L(e))===null||t===void 0?void 0:t.spanContext()}var B5,w5=w(()=>{m();sB();HL();uB();B5=Ll("OpenTelemetry Context Key SPAN")});function bAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(VL[e.charCodeAt(r)]|0)+(VL[e.charCodeAt(r+1)]|0)+(VL[e.charCodeAt(r+2)]|0)+(VL[e.charCodeAt(r+3)]|0);return n===t}function O5(e){return bAe(e,32)&&e!==uS}function k5(e){return bAe(e,16)&&e!==cB}function Cg(e){return O5(e.traceId)&&k5(e.spanId)}function IAe(e){return new xm(e)}var VL,YL=w(()=>{m();zL();HL();VL=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 ktt(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 P5,wC,M5=w(()=>{m();uB();w5();HL();YL();P5=Rm.getInstance(),wC=class{startSpan(t,n,r=P5.active()){if(!!n?.root)return new xm;let i=r&&qL(r);return ktt(i)&&Cg(i)?new xm(i):new xm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??P5.active(),p=this.startSpan(t,i,l),h=lB(l,p);return P5.with(h,u,void 0,p)}}});var Ptt,OC,L5=w(()=>{m();M5();Ptt=new wC,OC=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):Ptt}}});var KL,CAe=w(()=>{m();M5();KL=class{getTracer(t,n,r){return new wC}}});var Mtt,cS,U5=w(()=>{m();L5();CAe();Mtt=new KL,cS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new OC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Mtt}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 JL,vAe=w(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(JL||(JL={}))});var fo,RAe=w(()=>{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"})(fo||(fo={}))});var Ai,xAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function DAe(e){return Qtt.test(e)}function NAe(e){return Ftt.test(e)&&!Gtt.test(e)}var Q5,Ltt,Utt,Qtt,Ftt,Gtt,BAe=w(()=>{m();Q5="[_0-9a-z-*/]",Ltt=`[a-z]${Q5}{0,255}`,Utt=`[a-z0-9]${Q5}{0,240}@[a-z]${Q5}{0,13}`,Qtt=new RegExp(`^(?:${Ltt}|${Utt})$`),Ftt=/^[ -~]{0,255}[!-~]$/,Gtt=/,|=/});var wAe,jtt,OAe,kAe,ZL,PAe=w(()=>{m();BAe();wAe=32,jtt=512,OAe=",",kAe="=",ZL=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+kAe+this.get(n)),t),[]).join(OAe)}_parse(t){t.length>jtt||(this._internalState=t.split(OAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(kAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);DAe(s)&&NAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>wAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,wAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function MAe(e){return new ZL(e)}var LAe=w(()=>{m();PAe()});var Xe,UAe=w(()=>{m();uB();Xe=Rm.getInstance()});var Ul,QAe=w(()=>{m();aS();Ul=Zs.instance()});var F5,FAe,GAe=w(()=>{m();R5();F5=class{getMeter(t,n,r){return v5}},FAe=new F5});var G5,WL,jAe=w(()=>{m();GAe();sS();aS();G5="metrics",WL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Cm(G5,t,Zs.instance())}getMeterProvider(){return Ml(G5)||FAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){vm(G5,Zs.instance())}}});var j5,zAe=w(()=>{m();jAe();j5=WL.getInstance()});var XL,HAe=w(()=>{m();XL=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function H5(e){return e.getValue(z5)||void 0}function $Ae(){return H5(Rm.getInstance().active())}function qAe(e,t){return e.setValue(z5,t)}function VAe(e){return e.deleteValue(z5)}var z5,YAe=w(()=>{m();uB();sB();z5=Ll("OpenTelemetry Baggage Key")});var $5,ztt,eU,KAe=w(()=>{m();sS();HAe();x5();YAe();m5();aS();$5="propagation",ztt=new XL,eU=class e{constructor(){this.createBaggage=mAe,this.getBaggage=H5,this.getActiveBaggage=$Ae,this.setBaggage=qAe,this.deleteBaggage=VAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Cm($5,t,Zs.instance())}inject(t,n,r=FL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=QL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){vm($5,Zs.instance())}_getGlobalPropagator(){return Ml($5)||ztt}}});var pf,JAe=w(()=>{m();KAe();pf=eU.getInstance()});var q5,tU,ZAe=w(()=>{m();sS();U5();YL();w5();aS();q5="trace",tU=class e{constructor(){this._proxyTracerProvider=new cS,this.wrapSpanContext=IAe,this.isSpanContextValid=Cg,this.deleteSpan=SAe,this.getSpan=$L,this.getActiveSpan=yAe,this.getSpanContext=qL,this.setSpan=lB,this.setSpanContext=TAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Cm(q5,this._proxyTracerProvider,Zs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ml(q5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){vm(q5,Zs.instance()),this._proxyTracerProvider=new cS}}});var qt,WAe=w(()=>{m();ZAe();qt=tU.getInstance()});var nt={};Js(nt,{DiagConsoleLogger:()=>LL,DiagLogLevel:()=>Is,INVALID_SPANID:()=>cB,INVALID_SPAN_CONTEXT:()=>jL,INVALID_TRACEID:()=>uS,ProxyTracer:()=>OC,ProxyTracerProvider:()=>cS,ROOT_CONTEXT:()=>NC,SamplingDecision:()=>JL,SpanKind:()=>fo,SpanStatusCode:()=>Ai,TraceFlags:()=>ou,ValueType:()=>UL,baggageEntryMetadataFromString:()=>AAe,context:()=>Xe,createContextKey:()=>Ll,createNoopMeter:()=>hAe,createTraceState:()=>MAe,default:()=>Htt,defaultTextMapGetter:()=>QL,defaultTextMapSetter:()=>FL,diag:()=>Ul,isSpanContextValid:()=>Cg,isValidSpanId:()=>k5,isValidTraceId:()=>O5,metrics:()=>j5,propagation:()=>pf,trace:()=>qt});var Htt,ze=w(()=>{m();m5();sB();gAe();PL();R5();_Ae();x5();L5();U5();vAe();RAe();xAe();N5();LAe();YL();zL();UAe();QAe();zAe();JAe();WAe();Htt={context:Xe,diag:Ul,metrics:j5,propagation:pf,trace:qt}});var dB=P(R_=>{"use strict";m();Object.defineProperty(R_,"__esModule",{value:!0});R_.isTracingSuppressed=R_.unsuppressTracing=R_.suppressTracing=void 0;var $tt=(ze(),Le(nt)),V5=(0,$tt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function qtt(e){return e.setValue(V5,!0)}R_.suppressTracing=qtt;function Vtt(e){return e.deleteValue(V5)}R_.unsuppressTracing=Vtt;function Ytt(e){return e.getValue(V5)===!0}R_.isTracingSuppressed=Ytt});var Y5=P(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var J5=P(Hd=>{"use strict";m();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.parseKeyPairsIntoRecord=Hd.parseBaggageHeaderString=Hd.parsePairKeyValue=Hd.getKeyPairs=Hd.serializeKeyPairs=void 0;var Ktt=(ze(),Le(nt)),Dm=Y5();function Jtt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Dm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Dm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Hd.serializeKeyPairs=Jtt;function Ztt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Dm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Hd.getKeyPairs=Ztt;function K5(e){if(!e)return;let t=e.indexOf(Dm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Dm.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 s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let p=e.substring(t+1);l=(0,Ktt.baggageEntryMetadataFromString)(p)}return{key:s,value:u,metadata:l}}Hd.parsePairKeyValue=K5;function Wtt(e,t,n,r){let o=0;for(;o<e.length&&n<Dm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Dm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Dm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=K5(e.substring(o,s));if(l){let p=(n===0?0:1)+u;if(r+p>Dm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=p}}if(i===-1)break;o=i+1}return[n,r]}Hd.parseBaggageHeaderString=Wtt;function Xtt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Dm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=K5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Hd.parseKeyPairsIntoRecord=Xtt});var XAe=P(rU=>{"use strict";m();Object.defineProperty(rU,"__esModule",{value:!0});rU.W3CBaggagePropagator=void 0;var Z5=(ze(),Le(nt)),ent=dB(),pB=Y5(),nU=J5(),W5=class{inject(t,n,r){let o=Z5.propagation.getBaggage(t);if(!o||(0,ent.isTracingSuppressed)(t))return;let i=(0,nU.getKeyPairs)(o).filter(u=>u.length<=pB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,pB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,nU.serializeKeyPairs)(i);s.length>0&&r.set(n,pB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,pB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,nU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,nU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:Z5.propagation.setBaggage(t,Z5.propagation.createBaggage(i))}fields(){return[pB.BAGGAGE_HEADER]}};rU.W3CBaggagePropagator=W5});var ege=P(oU=>{"use strict";m();Object.defineProperty(oU,"__esModule",{value:!0});oU.AnchoredClock=void 0;var X5=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}};oU.AnchoredClock=X5});var ige=P(x_=>{"use strict";m();Object.defineProperty(x_,"__esModule",{value:!0});x_.isAttributeValue=x_.isAttributeKey=x_.sanitizeAttributes=void 0;var tge=(ze(),Le(nt));function tnt(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(!nge(n)){tge.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!rge(r)){tge.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}x_.sanitizeAttributes=tnt;function nge(e){return typeof e=="string"&&e!==""}x_.isAttributeKey=nge;function rge(e){return e==null?!0:Array.isArray(e)?nnt(e):oge(typeof e)}x_.isAttributeValue=rge;function nnt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(oge(r)){t=r;continue}return!1}return!1}}return!0}function oge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var eV=P(iU=>{"use strict";m();Object.defineProperty(iU,"__esModule",{value:!0});iU.loggingErrorHandler=void 0;var rnt=(ze(),Le(nt));function ont(){return e=>{rnt.diag.error(int(e))}}iU.loggingErrorHandler=ont;function int(e){return typeof e=="string"?e:JSON.stringify(snt(e))}function snt(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 age=P(kC=>{"use strict";m();Object.defineProperty(kC,"__esModule",{value:!0});kC.globalErrorHandler=kC.setGlobalErrorHandler=void 0;var ant=eV(),sge=(0,ant.loggingErrorHandler)();function unt(e){sge=e}kC.setGlobalErrorHandler=unt;function cnt(e){try{sge(e)}catch{}}kC.globalErrorHandler=cnt});var dge=P(Nm=>{"use strict";m();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.getStringListFromEnv=Nm.getBooleanFromEnv=Nm.getStringFromEnv=Nm.getNumberFromEnv=void 0;var uge=(ze(),Le(nt)),cge=Qe("util");function lnt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){uge.diag.warn(`Unknown value ${(0,cge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Nm.getNumberFromEnv=lnt;function lge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Nm.getStringFromEnv=lge;function dnt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||uge.diag.warn(`Unknown value ${(0,cge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Nm.getBooleanFromEnv=dnt;function pnt(e){return lge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Nm.getStringListFromEnv=pnt});var pge=P(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU._globalThis=void 0;sU._globalThis=globalThis});var fge=P(aU=>{"use strict";m();Object.defineProperty(aU,"__esModule",{value:!0});aU.VERSION=void 0;aU.VERSION="2.8.0"});function Oi(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 tV=w(()=>{m()});var mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,O_e,fnt,nV,mnt,Ant,gnt,hnt,rV,_nt,Ent,ynt,Snt,Tnt,bnt,Int,Cnt,vnt,Rnt,xnt,Dnt,Nnt,Bnt,wnt,Ont,knt,Pnt,oV,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,qnt,Vnt,iV,Ynt,Knt,sV,aV,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,urt,crt,lrt,drt,prt,fB,PC,uV,frt,mrt,lS,Art,grt,hrt,_rt,cV,lV,Ert,dV,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,xrt,Drt,Nrt,Brt,wrt,Ort,krt,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,pV,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,sot,aot,fV,uot,mV,cot,lot,dot,pot,fot,mot,Aot,got,hot,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,Oot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,iit,sit,ait,uit,cit,lit,dit,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,LEe,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,UEe,QEe,FEe,GEe,jEe,Iit,Cit,vit,Rit,xit,Dit,zEe,HEe,$Ee,Nit,Bit,wit,Oit,qEe,VEe,YEe,KEe,kit,Pit,Mit,Lit,Uit,JEe,ZEe,WEe,XEe,e0e,t0e,n0e,Qit,Fit,Git,jit,zit,Hit,$it,qit,r0e,o0e,i0e,s0e,a0e,Vit,Yit,Kit,Jit,Zit,Wit,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,D0e,N0e,B0e,w0e,O0e,Sst,Tst,bst,Ist,Cst,vst,k0e,P0e,Rst,xst,Dst,M0e,L0e,Nst,Bst,wst,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,eye,Ost,kst,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,qst,Vst,Yst,Kst,Jst,tye,nye,Zst,Wst,Xst,rye=w(()=>{m();tV();mge="aws.lambda.invoked_arn",Age="db.system",gge="db.connection_string",hge="db.user",_ge="db.jdbc.driver_classname",Ege="db.name",yge="db.statement",Sge="db.operation",Tge="db.mssql.instance_name",bge="db.cassandra.keyspace",Ige="db.cassandra.page_size",Cge="db.cassandra.consistency_level",vge="db.cassandra.table",Rge="db.cassandra.idempotence",xge="db.cassandra.speculative_execution_count",Dge="db.cassandra.coordinator.id",Nge="db.cassandra.coordinator.dc",Bge="db.hbase.namespace",wge="db.redis.database_index",Oge="db.mongodb.collection",kge="db.sql.table",Pge="exception.type",Mge="exception.message",Lge="exception.stacktrace",Uge="exception.escaped",Qge="faas.trigger",Fge="faas.execution",Gge="faas.document.collection",jge="faas.document.operation",zge="faas.document.time",Hge="faas.document.name",$ge="faas.time",qge="faas.cron",Vge="faas.coldstart",Yge="faas.invoked_name",Kge="faas.invoked_provider",Jge="faas.invoked_region",Zge="net.transport",Wge="net.peer.ip",Xge="net.peer.port",ehe="net.peer.name",the="net.host.ip",nhe="net.host.port",rhe="net.host.name",ohe="net.host.connection.type",ihe="net.host.connection.subtype",she="net.host.carrier.name",ahe="net.host.carrier.mcc",uhe="net.host.carrier.mnc",che="net.host.carrier.icc",lhe="peer.service",dhe="enduser.id",phe="enduser.role",fhe="enduser.scope",mhe="thread.id",Ahe="thread.name",ghe="code.function",hhe="code.namespace",_he="code.filepath",Ehe="code.lineno",yhe="http.method",She="http.url",The="http.target",bhe="http.host",Ihe="http.scheme",Che="http.status_code",vhe="http.flavor",Rhe="http.user_agent",xhe="http.request_content_length",Dhe="http.request_content_length_uncompressed",Nhe="http.response_content_length",Bhe="http.response_content_length_uncompressed",whe="http.server_name",Ohe="http.route",khe="http.client_ip",Phe="aws.dynamodb.table_names",Mhe="aws.dynamodb.consumed_capacity",Lhe="aws.dynamodb.item_collection_metrics",Uhe="aws.dynamodb.provisioned_read_capacity",Qhe="aws.dynamodb.provisioned_write_capacity",Fhe="aws.dynamodb.consistent_read",Ghe="aws.dynamodb.projection",jhe="aws.dynamodb.limit",zhe="aws.dynamodb.attributes_to_get",Hhe="aws.dynamodb.index_name",$he="aws.dynamodb.select",qhe="aws.dynamodb.global_secondary_indexes",Vhe="aws.dynamodb.local_secondary_indexes",Yhe="aws.dynamodb.exclusive_start_table",Khe="aws.dynamodb.table_count",Jhe="aws.dynamodb.scan_forward",Zhe="aws.dynamodb.segment",Whe="aws.dynamodb.total_segments",Xhe="aws.dynamodb.count",e_e="aws.dynamodb.scanned_count",t_e="aws.dynamodb.attribute_definitions",n_e="aws.dynamodb.global_secondary_index_updates",r_e="messaging.system",o_e="messaging.destination",i_e="messaging.destination_kind",s_e="messaging.temp_destination",a_e="messaging.protocol",u_e="messaging.protocol_version",c_e="messaging.url",l_e="messaging.message_id",d_e="messaging.conversation_id",p_e="messaging.message_payload_size_bytes",f_e="messaging.message_payload_compressed_size_bytes",m_e="messaging.operation",A_e="messaging.consumer_id",g_e="messaging.rabbitmq.routing_key",h_e="messaging.kafka.message_key",__e="messaging.kafka.consumer_group",E_e="messaging.kafka.client_id",y_e="messaging.kafka.partition",S_e="messaging.kafka.tombstone",T_e="rpc.system",b_e="rpc.service",I_e="rpc.method",C_e="rpc.grpc.status_code",v_e="rpc.jsonrpc.version",R_e="rpc.jsonrpc.request_id",x_e="rpc.jsonrpc.error_code",D_e="rpc.jsonrpc.error_message",N_e="message.type",B_e="message.id",w_e="message.compressed_size",O_e="message.uncompressed_size",fnt=mge,nV=Age,mnt=gge,Ant=hge,gnt=_ge,hnt=Ege,rV=yge,_nt=Sge,Ent=Tge,ynt=bge,Snt=Ige,Tnt=Cge,bnt=vge,Int=Rge,Cnt=xge,vnt=Dge,Rnt=Nge,xnt=Bge,Dnt=wge,Nnt=Oge,Bnt=kge,wnt=Pge,Ont=Mge,knt=Lge,Pnt=Uge,oV=Qge,Mnt=Fge,Lnt=Gge,Unt=jge,Qnt=zge,Fnt=Hge,Gnt=$ge,jnt=qge,znt=Vge,Hnt=Yge,$nt=Kge,qnt=Jge,Vnt=Zge,iV=Wge,Ynt=Xge,Knt=ehe,sV=the,aV=nhe,Jnt=rhe,Znt=ohe,Wnt=ihe,Xnt=she,ert=ahe,trt=uhe,nrt=che,rrt=lhe,ort=dhe,irt=phe,srt=fhe,art=mhe,urt=Ahe,crt=ghe,lrt=hhe,drt=_he,prt=Ehe,fB=yhe,PC=She,uV=The,frt=bhe,mrt=Ihe,lS=Che,Art=vhe,grt=Rhe,hrt=xhe,_rt=Dhe,cV=Nhe,lV=Bhe,Ert=whe,dV=Ohe,yrt=khe,Srt=Phe,Trt=Mhe,brt=Lhe,Irt=Uhe,Crt=Qhe,vrt=Fhe,Rrt=Ghe,xrt=jhe,Drt=zhe,Nrt=Hhe,Brt=$he,wrt=qhe,Ort=Vhe,krt=Yhe,Prt=Khe,Mrt=Jhe,Lrt=Zhe,Urt=Whe,Qrt=Xhe,Frt=e_e,Grt=t_e,jrt=n_e,pV=r_e,zrt=o_e,Hrt=i_e,$rt=s_e,qrt=a_e,Vrt=u_e,Yrt=c_e,Krt=l_e,Jrt=d_e,Zrt=p_e,Wrt=f_e,Xrt=m_e,eot=A_e,tot=g_e,not=h_e,rot=__e,oot=E_e,iot=y_e,sot=S_e,aot=T_e,fV=b_e,uot=I_e,mV=C_e,cot=v_e,lot=R_e,dot=x_e,pot=D_e,fot=N_e,mot=B_e,Aot=w_e,got=O_e,hot=Oi([mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,O_e]),k_e="other_sql",P_e="mssql",M_e="mysql",L_e="oracle",U_e="db2",Q_e="postgresql",F_e="redshift",G_e="hive",j_e="cloudscape",z_e="hsqldb",H_e="progress",$_e="maxdb",q_e="hanadb",V_e="ingres",Y_e="firstsql",K_e="edb",J_e="cache",Z_e="adabas",W_e="firebird",X_e="derby",eEe="filemaker",tEe="informix",nEe="instantdb",rEe="interbase",oEe="mariadb",iEe="netezza",sEe="pervasive",aEe="pointbase",uEe="sqlite",cEe="sybase",lEe="teradata",dEe="vertica",pEe="h2",fEe="coldfusion",mEe="cassandra",AEe="hbase",gEe="mongodb",hEe="redis",_Ee="couchbase",EEe="couchdb",yEe="cosmosdb",SEe="dynamodb",TEe="neo4j",bEe="geode",IEe="elasticsearch",CEe="memcached",vEe="cockroachdb",_ot=k_e,Eot=P_e,yot=M_e,Sot=L_e,Tot=U_e,bot=Q_e,Iot=F_e,Cot=G_e,vot=j_e,Rot=z_e,xot=H_e,Dot=$_e,Not=q_e,Bot=V_e,wot=Y_e,Oot=K_e,kot=J_e,Pot=Z_e,Mot=W_e,Lot=X_e,Uot=eEe,Qot=tEe,Fot=nEe,Got=rEe,jot=oEe,zot=iEe,Hot=sEe,$ot=aEe,qot=uEe,Vot=cEe,Yot=lEe,Kot=dEe,Jot=pEe,Zot=fEe,Wot=mEe,Xot=AEe,eit=gEe,tit=hEe,nit=_Ee,rit=EEe,oit=yEe,iit=SEe,sit=TEe,ait=bEe,uit=IEe,cit=CEe,lit=vEe,dit=Oi([k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe]),REe="all",xEe="each_quorum",DEe="quorum",NEe="local_quorum",BEe="one",wEe="two",OEe="three",kEe="local_one",PEe="any",MEe="serial",LEe="local_serial",pit=REe,fit=xEe,mit=DEe,Ait=NEe,git=BEe,hit=wEe,_it=OEe,Eit=kEe,yit=PEe,Sit=MEe,Tit=LEe,bit=Oi([REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,LEe]),UEe="datasource",QEe="http",FEe="pubsub",GEe="timer",jEe="other",Iit=UEe,Cit=QEe,vit=FEe,Rit=GEe,xit=jEe,Dit=Oi([UEe,QEe,FEe,GEe,jEe]),zEe="insert",HEe="edit",$Ee="delete",Nit=zEe,Bit=HEe,wit=$Ee,Oit=Oi([zEe,HEe,$Ee]),qEe="alibaba_cloud",VEe="aws",YEe="azure",KEe="gcp",kit=qEe,Pit=VEe,Mit=YEe,Lit=KEe,Uit=Oi([qEe,VEe,YEe,KEe]),JEe="ip_tcp",ZEe="ip_udp",WEe="ip",XEe="unix",e0e="pipe",t0e="inproc",n0e="other",Qit=JEe,Fit=ZEe,Git=WEe,jit=XEe,zit=e0e,Hit=t0e,$it=n0e,qit=Oi([JEe,ZEe,WEe,XEe,e0e,t0e,n0e]),r0e="wifi",o0e="wired",i0e="cell",s0e="unavailable",a0e="unknown",Vit=r0e,Yit=o0e,Kit=i0e,Jit=s0e,Zit=a0e,Wit=Oi([r0e,o0e,i0e,s0e,a0e]),u0e="gprs",c0e="edge",l0e="umts",d0e="cdma",p0e="evdo_0",f0e="evdo_a",m0e="cdma2000_1xrtt",A0e="hsdpa",g0e="hsupa",h0e="hspa",_0e="iden",E0e="evdo_b",y0e="lte",S0e="ehrpd",T0e="hspap",b0e="gsm",I0e="td_scdma",C0e="iwlan",v0e="nr",R0e="nrnsa",x0e="lte_ca",Xit=u0e,est=c0e,tst=l0e,nst=d0e,rst=p0e,ost=f0e,ist=m0e,sst=A0e,ast=g0e,ust=h0e,cst=_0e,lst=E0e,dst=y0e,pst=S0e,fst=T0e,mst=b0e,Ast=I0e,gst=C0e,hst=v0e,_st=R0e,Est=x0e,yst=Oi([u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e]),D0e="1.0",N0e="1.1",B0e="2.0",w0e="SPDY",O0e="QUIC",Sst=D0e,Tst=N0e,bst=B0e,Ist=w0e,Cst=O0e,vst={HTTP_1_0:D0e,HTTP_1_1:N0e,HTTP_2_0:B0e,SPDY:w0e,QUIC:O0e},k0e="queue",P0e="topic",Rst=k0e,xst=P0e,Dst=Oi([k0e,P0e]),M0e="receive",L0e="process",Nst=M0e,Bst=L0e,wst=Oi([M0e,L0e]),U0e=0,Q0e=1,F0e=2,G0e=3,j0e=4,z0e=5,H0e=6,$0e=7,q0e=8,V0e=9,Y0e=10,K0e=11,J0e=12,Z0e=13,W0e=14,X0e=15,eye=16,Ost=U0e,kst=Q0e,Pst=F0e,Mst=G0e,Lst=j0e,Ust=z0e,Qst=H0e,Fst=$0e,Gst=q0e,jst=V0e,zst=Y0e,Hst=K0e,$st=J0e,qst=Z0e,Vst=W0e,Yst=X0e,Kst=eye,Jst={OK:U0e,CANCELLED:Q0e,UNKNOWN:F0e,INVALID_ARGUMENT:G0e,DEADLINE_EXCEEDED:j0e,NOT_FOUND:z0e,ALREADY_EXISTS:H0e,PERMISSION_DENIED:$0e,RESOURCE_EXHAUSTED:q0e,FAILED_PRECONDITION:V0e,ABORTED:Y0e,OUT_OF_RANGE:K0e,UNIMPLEMENTED:J0e,INTERNAL:Z0e,UNAVAILABLE:W0e,DATA_LOSS:X0e,UNAUTHENTICATED:eye},tye="SENT",nye="RECEIVED",Zst=tye,Wst=nye,Xst=Oi([tye,nye])});var oye=w(()=>{m();rye()});var iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,BSe,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,Bat,wat,Oat,kat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Yat,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,put,fut,mut,Aut,gut,AV,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,wSe,OSe,kSe,PSe,Rut,xut,Dut,Nut,But,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Yut,Kut,XSe,eTe,Jut,Zut,Wut,tTe,nTe,rTe,oTe,iTe,sTe,aTe,Xut,ect,tct,nct,rct,oct,ict,sct,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,act,uct,cct,lct,dct,pct,fct,mct,Act,gct,hct,_ct,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,DTe=w(()=>{m();tV();iye="cloud.provider",sye="cloud.account.id",aye="cloud.region",uye="cloud.availability_zone",cye="cloud.platform",lye="aws.ecs.container.arn",dye="aws.ecs.cluster.arn",pye="aws.ecs.launchtype",fye="aws.ecs.task.arn",mye="aws.ecs.task.family",Aye="aws.ecs.task.revision",gye="aws.eks.cluster.arn",hye="aws.log.group.names",_ye="aws.log.group.arns",Eye="aws.log.stream.names",yye="aws.log.stream.arns",Sye="container.name",Tye="container.id",bye="container.runtime",Iye="container.image.name",Cye="container.image.tag",vye="deployment.environment",Rye="device.id",xye="device.model.identifier",Dye="device.model.name",Nye="faas.name",Bye="faas.id",wye="faas.version",Oye="faas.instance",kye="faas.max_memory",Pye="host.id",Mye="host.name",Lye="host.type",Uye="host.arch",Qye="host.image.name",Fye="host.image.id",Gye="host.image.version",jye="k8s.cluster.name",zye="k8s.node.name",Hye="k8s.node.uid",$ye="k8s.namespace.name",qye="k8s.pod.uid",Vye="k8s.pod.name",Yye="k8s.container.name",Kye="k8s.replicaset.uid",Jye="k8s.replicaset.name",Zye="k8s.deployment.uid",Wye="k8s.deployment.name",Xye="k8s.statefulset.uid",eSe="k8s.statefulset.name",tSe="k8s.daemonset.uid",nSe="k8s.daemonset.name",rSe="k8s.job.uid",oSe="k8s.job.name",iSe="k8s.cronjob.uid",sSe="k8s.cronjob.name",aSe="os.type",uSe="os.description",cSe="os.name",lSe="os.version",dSe="process.pid",pSe="process.executable.name",fSe="process.executable.path",mSe="process.command",ASe="process.command_line",gSe="process.command_args",hSe="process.owner",_Se="process.runtime.name",ESe="process.runtime.version",ySe="process.runtime.description",SSe="service.name",TSe="service.namespace",bSe="service.instance.id",ISe="service.version",CSe="telemetry.sdk.name",vSe="telemetry.sdk.language",RSe="telemetry.sdk.version",xSe="telemetry.auto.version",DSe="webengine.name",NSe="webengine.version",BSe="webengine.description",eat=iye,tat=sye,nat=aye,rat=uye,oat=cye,iat=lye,sat=dye,aat=pye,uat=fye,cat=mye,lat=Aye,dat=gye,pat=hye,fat=_ye,mat=Eye,Aat=yye,gat=Sye,hat=Tye,_at=bye,Eat=Iye,yat=Cye,Sat=vye,Tat=Rye,bat=xye,Iat=Dye,Cat=Nye,vat=Bye,Rat=wye,xat=Oye,Dat=kye,Nat=Pye,Bat=Mye,wat=Lye,Oat=Uye,kat=Qye,Pat=Fye,Mat=Gye,Lat=jye,Uat=zye,Qat=Hye,Fat=$ye,Gat=qye,jat=Vye,zat=Yye,Hat=Kye,$at=Jye,qat=Zye,Vat=Wye,Yat=Xye,Kat=eSe,Jat=tSe,Zat=nSe,Wat=rSe,Xat=oSe,eut=iSe,tut=sSe,nut=aSe,rut=uSe,out=cSe,iut=lSe,sut=dSe,aut=pSe,uut=fSe,cut=mSe,lut=ASe,dut=gSe,put=hSe,fut=_Se,mut=ESe,Aut=ySe,gut=SSe,AV=TSe,hut=bSe,_ut=ISe,Eut=CSe,yut=vSe,Sut=RSe,Tut=xSe,but=DSe,Iut=NSe,Cut=BSe,vut=Oi([iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,BSe]),wSe="alibaba_cloud",OSe="aws",kSe="azure",PSe="gcp",Rut=wSe,xut=OSe,Dut=kSe,Nut=PSe,But=Oi([wSe,OSe,kSe,PSe]),MSe="alibaba_cloud_ecs",LSe="alibaba_cloud_fc",USe="aws_ec2",QSe="aws_ecs",FSe="aws_eks",GSe="aws_lambda",jSe="aws_elastic_beanstalk",zSe="azure_vm",HSe="azure_container_instances",$Se="azure_aks",qSe="azure_functions",VSe="azure_app_service",YSe="gcp_compute_engine",KSe="gcp_cloud_run",JSe="gcp_kubernetes_engine",ZSe="gcp_cloud_functions",WSe="gcp_app_engine",wut=MSe,Out=LSe,kut=USe,Put=QSe,Mut=FSe,Lut=GSe,Uut=jSe,Qut=zSe,Fut=HSe,Gut=$Se,jut=qSe,zut=VSe,Hut=YSe,$ut=KSe,qut=JSe,Vut=ZSe,Yut=WSe,Kut=Oi([MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe]),XSe="ec2",eTe="fargate",Jut=XSe,Zut=eTe,Wut=Oi([XSe,eTe]),tTe="amd64",nTe="arm32",rTe="arm64",oTe="ia64",iTe="ppc32",sTe="ppc64",aTe="x86",Xut=tTe,ect=nTe,tct=rTe,nct=oTe,rct=iTe,oct=sTe,ict=aTe,sct=Oi([tTe,nTe,rTe,oTe,iTe,sTe,aTe]),uTe="windows",cTe="linux",lTe="darwin",dTe="freebsd",pTe="netbsd",fTe="openbsd",mTe="dragonflybsd",ATe="hpux",gTe="aix",hTe="solaris",_Te="z_os",act=uTe,uct=cTe,cct=lTe,lct=dTe,dct=pTe,pct=fTe,fct=mTe,mct=ATe,Act=gTe,gct=hTe,hct=_Te,_ct=Oi([uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te]),ETe="cpp",yTe="dotnet",STe="erlang",TTe="go",bTe="java",ITe="nodejs",CTe="php",vTe="python",RTe="ruby",xTe="webjs",Ect=ETe,yct=yTe,Sct=STe,Tct=TTe,bct=bTe,Ict=ITe,Cct=CTe,vct=vTe,Rct=RTe,xct=xTe,Dct=Oi([ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe])});var NTe=w(()=>{m();DTe()});var Nct,Bct,wct,Oct,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Yct,Kct,Jct,Zct,Wct,Xct,elt,gV,hV,tlt,MC,nlt,_V,EV,rlt,dS,olt,ilt,slt,alt,ult,clt,llt,dlt,Qin,Fin,yV,plt,flt,mlt,Alt,glt,hlt,pS,_lt,Elt,ylt,Gin,Slt,Tlt,blt,Ilt,jin,Clt,vlt,Rlt,xlt,vg,Rg,Dlt,Nlt,Blt,wlt,Olt,klt,Plt,Mlt,Llt,zin,Ult,Qlt,Flt,Glt,jlt,zlt,SV,TV,Hlt,bV,IV,$lt,qlt,Hin,$in,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Xlt,edt,qin,tdt,CV,vV,ndt,RV,rdt,xV,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,Vin,fdt,mdt,Yin,Adt,gdt,Kin,hdt,_dt,Edt,ydt,Sdt,Tdt,bdt,Idt,D_,Cdt,vdt,Rdt,DV,BTe=w(()=>{m();Nct="aspnetcore.diagnostics.exception.result",Bct="aborted",wct="handled",Oct="skipped",kct="unhandled",Pct="aspnetcore.diagnostics.handler.type",Mct="aspnetcore.rate_limiting.policy",Lct="aspnetcore.rate_limiting.result",Uct="acquired",Qct="endpoint_limiter",Fct="global_limiter",Gct="request_canceled",jct="aspnetcore.request.is_unhandled",zct="aspnetcore.routing.is_fallback",Hct="aspnetcore.routing.match_status",$ct="failure",qct="success",Vct="aspnetcore.user.is_authenticated",Yct="client.address",Kct="client.port",Jct="code.column.number",Zct="code.file.path",Wct="code.function.name",Xct="code.line.number",elt="code.stacktrace",gV="db.collection.name",hV="db.namespace",tlt="db.operation.batch.size",MC="db.operation.name",nlt="db.query.summary",_V="db.query.text",EV="db.response.status_code",rlt="db.stored_procedure.name",dS="db.system.name",olt="mariadb",ilt="microsoft.sql_server",slt="mysql",alt="postgresql",ult="dotnet.gc.heap.generation",clt="gen0",llt="gen1",dlt="gen2",Qin="loh",Fin="poh",yV="error.type",plt="_OTHER",flt="exception.escaped",mlt="exception.message",Alt="exception.stacktrace",glt="exception.type",hlt=e=>`http.request.header.${e}`,pS="http.request.method",_lt="_OTHER",Elt="CONNECT",ylt="DELETE",Gin="GET",Slt="HEAD",Tlt="OPTIONS",blt="PATCH",Ilt="POST",jin="PUT",Clt="TRACE",vlt="http.request.method_original",Rlt="http.request.resend_count",xlt=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Dlt="jvm.gc.action",Nlt="jvm.gc.name",Blt="jvm.memory.pool.name",wlt="jvm.memory.type",Olt="heap",klt="non_heap",Plt="jvm.thread.daemon",Mlt="jvm.thread.state",Llt="blocked",zin="new",Ult="runnable",Qlt="terminated",Flt="timed_waiting",Glt="waiting",jlt="network.local.address",zlt="network.local.port",SV="network.peer.address",TV="network.peer.port",Hlt="network.protocol.name",bV="network.protocol.version",IV="network.transport",$lt="pipe",qlt="quic",Hin="tcp",$in="udp",Vlt="unix",Ylt="network.type",Klt="ipv4",Jlt="ipv6",Zlt="otel.scope.name",Wlt="otel.scope.version",Xlt="otel.status_code",edt="ERROR",qin="OK",tdt="otel.status_description",CV="server.address",vV="server.port",ndt="service.instance.id",RV="service.name",rdt="service.namespace",xV="service.version",odt="signalr.connection.status",idt="app_shutdown",sdt="normal_closure",adt="timeout",udt="signalr.transport",cdt="long_polling",ldt="server_sent_events",ddt="web_sockets",pdt="telemetry.sdk.language",Vin="cpp",fdt="dotnet",mdt="erlang",Yin="go",Adt="java",gdt="nodejs",Kin="php",hdt="python",_dt="ruby",Edt="rust",ydt="swift",Sdt="webjs",Tdt="telemetry.sdk.name",bdt="telemetry.sdk.version",Idt="url.fragment",D_="url.full",Cdt="url.path",vdt="url.query",Rdt="url.scheme",DV="user_agent.original"});var xdt,Ddt,Ndt,Bdt,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,hpt,_pt,Ept,ypt,Spt,Tpt,bpt,Ipt,wTe=w(()=>{m();xdt="aspnetcore.diagnostics.exceptions",Ddt="aspnetcore.rate_limiting.active_request_leases",Ndt="aspnetcore.rate_limiting.queued_requests",Bdt="aspnetcore.rate_limiting.request.time_in_queue",wdt="aspnetcore.rate_limiting.request_lease.duration",Odt="aspnetcore.rate_limiting.requests",kdt="aspnetcore.routing.match_attempts",Pdt="db.client.operation.duration",Mdt="dotnet.assembly.count",Ldt="dotnet.exceptions",Udt="dotnet.gc.collections",Qdt="dotnet.gc.heap.total_allocated",Fdt="dotnet.gc.last_collection.heap.fragmentation.size",Gdt="dotnet.gc.last_collection.heap.size",jdt="dotnet.gc.last_collection.memory.committed_size",zdt="dotnet.gc.pause.time",Hdt="dotnet.jit.compilation.time",$dt="dotnet.jit.compiled_il.size",qdt="dotnet.jit.compiled_methods",Vdt="dotnet.monitor.lock_contentions",Ydt="dotnet.process.cpu.count",Kdt="dotnet.process.cpu.time",Jdt="dotnet.process.memory.working_set",Zdt="dotnet.thread_pool.queue.length",Wdt="dotnet.thread_pool.thread.count",Xdt="dotnet.thread_pool.work_item.count",ept="dotnet.timer.count",tpt="http.client.request.duration",npt="http.server.request.duration",rpt="jvm.class.count",opt="jvm.class.loaded",ipt="jvm.class.unloaded",spt="jvm.cpu.count",apt="jvm.cpu.recent_utilization",upt="jvm.cpu.time",cpt="jvm.gc.duration",lpt="jvm.memory.committed",dpt="jvm.memory.limit",ppt="jvm.memory.used",fpt="jvm.memory.used_after_last_gc",mpt="jvm.thread.count",Apt="kestrel.active_connections",gpt="kestrel.active_tls_handshakes",hpt="kestrel.connection.duration",_pt="kestrel.queued_connections",Ept="kestrel.queued_requests",ypt="kestrel.rejected_connections",Spt="kestrel.tls_handshake.duration",Tpt="kestrel.upgraded_connections",bpt="signalr.server.active_connections",Ipt="signalr.server.connection.duration"});var Cpt,OTe=w(()=>{m();Cpt="exception"});var jr={};Js(jr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Bct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>wct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Oct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Uct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Qct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Fct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Gct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>$ct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>qct,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Nct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Pct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Mct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Lct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>jct,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>zct,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Hct,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Vct,ATTR_CLIENT_ADDRESS:()=>Yct,ATTR_CLIENT_PORT:()=>Kct,ATTR_CODE_COLUMN_NUMBER:()=>Jct,ATTR_CODE_FILE_PATH:()=>Zct,ATTR_CODE_FUNCTION_NAME:()=>Wct,ATTR_CODE_LINE_NUMBER:()=>Xct,ATTR_CODE_STACKTRACE:()=>elt,ATTR_DB_COLLECTION_NAME:()=>gV,ATTR_DB_NAMESPACE:()=>hV,ATTR_DB_OPERATION_BATCH_SIZE:()=>tlt,ATTR_DB_OPERATION_NAME:()=>MC,ATTR_DB_QUERY_SUMMARY:()=>nlt,ATTR_DB_QUERY_TEXT:()=>_V,ATTR_DB_RESPONSE_STATUS_CODE:()=>EV,ATTR_DB_STORED_PROCEDURE_NAME:()=>rlt,ATTR_DB_SYSTEM_NAME:()=>dS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>ult,ATTR_ERROR_TYPE:()=>yV,ATTR_EXCEPTION_ESCAPED:()=>flt,ATTR_EXCEPTION_MESSAGE:()=>mlt,ATTR_EXCEPTION_STACKTRACE:()=>Alt,ATTR_EXCEPTION_TYPE:()=>glt,ATTR_HTTP_REQUEST_HEADER:()=>hlt,ATTR_HTTP_REQUEST_METHOD:()=>pS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>vlt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Rlt,ATTR_HTTP_RESPONSE_HEADER:()=>xlt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Dlt,ATTR_JVM_GC_NAME:()=>Nlt,ATTR_JVM_MEMORY_POOL_NAME:()=>Blt,ATTR_JVM_MEMORY_TYPE:()=>wlt,ATTR_JVM_THREAD_DAEMON:()=>Plt,ATTR_JVM_THREAD_STATE:()=>Mlt,ATTR_NETWORK_LOCAL_ADDRESS:()=>jlt,ATTR_NETWORK_LOCAL_PORT:()=>zlt,ATTR_NETWORK_PEER_ADDRESS:()=>SV,ATTR_NETWORK_PEER_PORT:()=>TV,ATTR_NETWORK_PROTOCOL_NAME:()=>Hlt,ATTR_NETWORK_PROTOCOL_VERSION:()=>bV,ATTR_NETWORK_TRANSPORT:()=>IV,ATTR_NETWORK_TYPE:()=>Ylt,ATTR_OTEL_SCOPE_NAME:()=>Zlt,ATTR_OTEL_SCOPE_VERSION:()=>Wlt,ATTR_OTEL_STATUS_CODE:()=>Xlt,ATTR_OTEL_STATUS_DESCRIPTION:()=>tdt,ATTR_SERVER_ADDRESS:()=>CV,ATTR_SERVER_PORT:()=>vV,ATTR_SERVICE_INSTANCE_ID:()=>ndt,ATTR_SERVICE_NAME:()=>RV,ATTR_SERVICE_NAMESPACE:()=>rdt,ATTR_SERVICE_VERSION:()=>xV,ATTR_SIGNALR_CONNECTION_STATUS:()=>odt,ATTR_SIGNALR_TRANSPORT:()=>udt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>pdt,ATTR_TELEMETRY_SDK_NAME:()=>Tdt,ATTR_TELEMETRY_SDK_VERSION:()=>bdt,ATTR_URL_FRAGMENT:()=>Idt,ATTR_URL_FULL:()=>D_,ATTR_URL_PATH:()=>Cdt,ATTR_URL_QUERY:()=>vdt,ATTR_URL_SCHEME:()=>Rdt,ATTR_USER_AGENT_ORIGINAL:()=>DV,AWSECSLAUNCHTYPEVALUES_EC2:()=>Jut,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Zut,AwsEcsLaunchtypeValues:()=>Wut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>wut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Out,CLOUDPLATFORMVALUES_AWS_EC2:()=>kut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Put,CLOUDPLATFORMVALUES_AWS_EKS:()=>Mut,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Uut,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Lut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Gut,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>zut,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Fut,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>jut,CLOUDPLATFORMVALUES_AZURE_VM:()=>Qut,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Yut,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Vut,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>$ut,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Hut,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>qut,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Rut,CLOUDPROVIDERVALUES_AWS:()=>xut,CLOUDPROVIDERVALUES_AZURE:()=>Dut,CLOUDPROVIDERVALUES_GCP:()=>Nut,CloudPlatformValues:()=>Kut,CloudProviderValues:()=>But,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>pit,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>yit,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>fit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Eit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Ait,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Tit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>git,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>mit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Sit,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>_it,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>hit,DBSYSTEMVALUES_ADABAS:()=>Pot,DBSYSTEMVALUES_CACHE:()=>kot,DBSYSTEMVALUES_CASSANDRA:()=>Wot,DBSYSTEMVALUES_CLOUDSCAPE:()=>vot,DBSYSTEMVALUES_COCKROACHDB:()=>lit,DBSYSTEMVALUES_COLDFUSION:()=>Zot,DBSYSTEMVALUES_COSMOSDB:()=>oit,DBSYSTEMVALUES_COUCHBASE:()=>nit,DBSYSTEMVALUES_COUCHDB:()=>rit,DBSYSTEMVALUES_DB2:()=>Tot,DBSYSTEMVALUES_DERBY:()=>Lot,DBSYSTEMVALUES_DYNAMODB:()=>iit,DBSYSTEMVALUES_EDB:()=>Oot,DBSYSTEMVALUES_ELASTICSEARCH:()=>uit,DBSYSTEMVALUES_FILEMAKER:()=>Uot,DBSYSTEMVALUES_FIREBIRD:()=>Mot,DBSYSTEMVALUES_FIRSTSQL:()=>wot,DBSYSTEMVALUES_GEODE:()=>ait,DBSYSTEMVALUES_H2:()=>Jot,DBSYSTEMVALUES_HANADB:()=>Not,DBSYSTEMVALUES_HBASE:()=>Xot,DBSYSTEMVALUES_HIVE:()=>Cot,DBSYSTEMVALUES_HSQLDB:()=>Rot,DBSYSTEMVALUES_INFORMIX:()=>Qot,DBSYSTEMVALUES_INGRES:()=>Bot,DBSYSTEMVALUES_INSTANTDB:()=>Fot,DBSYSTEMVALUES_INTERBASE:()=>Got,DBSYSTEMVALUES_MARIADB:()=>jot,DBSYSTEMVALUES_MAXDB:()=>Dot,DBSYSTEMVALUES_MEMCACHED:()=>cit,DBSYSTEMVALUES_MONGODB:()=>eit,DBSYSTEMVALUES_MSSQL:()=>Eot,DBSYSTEMVALUES_MYSQL:()=>yot,DBSYSTEMVALUES_NEO4J:()=>sit,DBSYSTEMVALUES_NETEZZA:()=>zot,DBSYSTEMVALUES_ORACLE:()=>Sot,DBSYSTEMVALUES_OTHER_SQL:()=>_ot,DBSYSTEMVALUES_PERVASIVE:()=>Hot,DBSYSTEMVALUES_POINTBASE:()=>$ot,DBSYSTEMVALUES_POSTGRESQL:()=>bot,DBSYSTEMVALUES_PROGRESS:()=>xot,DBSYSTEMVALUES_REDIS:()=>tit,DBSYSTEMVALUES_REDSHIFT:()=>Iot,DBSYSTEMVALUES_SQLITE:()=>qot,DBSYSTEMVALUES_SYBASE:()=>Vot,DBSYSTEMVALUES_TERADATA:()=>Yot,DBSYSTEMVALUES_VERTICA:()=>Kot,DB_SYSTEM_NAME_VALUE_MARIADB:()=>olt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ilt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>slt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>alt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>clt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>llt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>dlt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Qin,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Fin,DbCassandraConsistencyLevelValues:()=>bit,DbSystemValues:()=>dit,ERROR_TYPE_VALUE_OTHER:()=>plt,EVENT_EXCEPTION:()=>Cpt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>wit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Bit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Nit,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>kit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Pit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Mit,FAASINVOKEDPROVIDERVALUES_GCP:()=>Lit,FAASTRIGGERVALUES_DATASOURCE:()=>Iit,FAASTRIGGERVALUES_HTTP:()=>Cit,FAASTRIGGERVALUES_OTHER:()=>xit,FAASTRIGGERVALUES_PUBSUB:()=>vit,FAASTRIGGERVALUES_TIMER:()=>Rit,FaasDocumentOperationValues:()=>Oit,FaasInvokedProviderValues:()=>Uit,FaasTriggerValues:()=>Dit,HOSTARCHVALUES_AMD64:()=>Xut,HOSTARCHVALUES_ARM32:()=>ect,HOSTARCHVALUES_ARM64:()=>tct,HOSTARCHVALUES_IA64:()=>nct,HOSTARCHVALUES_PPC32:()=>rct,HOSTARCHVALUES_PPC64:()=>oct,HOSTARCHVALUES_X86:()=>ict,HTTPFLAVORVALUES_HTTP_1_0:()=>Sst,HTTPFLAVORVALUES_HTTP_1_1:()=>Tst,HTTPFLAVORVALUES_HTTP_2_0:()=>bst,HTTPFLAVORVALUES_QUIC:()=>Cst,HTTPFLAVORVALUES_SPDY:()=>Ist,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Elt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>ylt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Gin,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Slt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Tlt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>_lt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>blt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Ilt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>jin,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Clt,HostArchValues:()=>sct,HttpFlavorValues:()=>vst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Olt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>klt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Llt,JVM_THREAD_STATE_VALUE_NEW:()=>zin,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Ult,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Qlt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Flt,JVM_THREAD_STATE_VALUE_WAITING:()=>Glt,MESSAGETYPEVALUES_RECEIVED:()=>Wst,MESSAGETYPEVALUES_SENT:()=>Zst,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Rst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>xst,MESSAGINGOPERATIONVALUES_PROCESS:()=>Bst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Nst,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>xdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Ddt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Ndt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Odt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>wdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Bdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>kdt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Pdt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Mdt,METRIC_DOTNET_EXCEPTIONS:()=>Ldt,METRIC_DOTNET_GC_COLLECTIONS:()=>Udt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Qdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Fdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Gdt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>jdt,METRIC_DOTNET_GC_PAUSE_TIME:()=>zdt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Hdt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>$dt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>qdt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Vdt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Ydt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Kdt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Jdt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Zdt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Wdt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Xdt,METRIC_DOTNET_TIMER_COUNT:()=>ept,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>tpt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>npt,METRIC_JVM_CLASS_COUNT:()=>rpt,METRIC_JVM_CLASS_LOADED:()=>opt,METRIC_JVM_CLASS_UNLOADED:()=>ipt,METRIC_JVM_CPU_COUNT:()=>spt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>apt,METRIC_JVM_CPU_TIME:()=>upt,METRIC_JVM_GC_DURATION:()=>cpt,METRIC_JVM_MEMORY_COMMITTED:()=>lpt,METRIC_JVM_MEMORY_LIMIT:()=>dpt,METRIC_JVM_MEMORY_USED:()=>ppt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>fpt,METRIC_JVM_THREAD_COUNT:()=>mpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Apt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>gpt,METRIC_KESTREL_CONNECTION_DURATION:()=>hpt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>_pt,METRIC_KESTREL_QUEUED_REQUESTS:()=>Ept,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>ypt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Spt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Tpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>bpt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ipt,MessageTypeValues:()=>Xst,MessagingDestinationKindValues:()=>Dst,MessagingOperationValues:()=>wst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>nst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>ist,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>est,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>pst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>rst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>ost,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>lst,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Xit,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>sst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>ust,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>fst,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>ast,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>cst,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>gst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>dst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Est,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>hst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>_st,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Ast,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>tst,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Kit,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Jit,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Zit,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Vit,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Yit,NETTRANSPORTVALUES_INPROC:()=>Hit,NETTRANSPORTVALUES_IP:()=>Git,NETTRANSPORTVALUES_IP_TCP:()=>Qit,NETTRANSPORTVALUES_IP_UDP:()=>Fit,NETTRANSPORTVALUES_OTHER:()=>$it,NETTRANSPORTVALUES_PIPE:()=>zit,NETTRANSPORTVALUES_UNIX:()=>jit,NETWORK_TRANSPORT_VALUE_PIPE:()=>$lt,NETWORK_TRANSPORT_VALUE_QUIC:()=>qlt,NETWORK_TRANSPORT_VALUE_TCP:()=>Hin,NETWORK_TRANSPORT_VALUE_UDP:()=>$in,NETWORK_TRANSPORT_VALUE_UNIX:()=>Vlt,NETWORK_TYPE_VALUE_IPV4:()=>Klt,NETWORK_TYPE_VALUE_IPV6:()=>Jlt,NetHostConnectionSubtypeValues:()=>yst,NetHostConnectionTypeValues:()=>Wit,NetTransportValues:()=>qit,OSTYPEVALUES_AIX:()=>Act,OSTYPEVALUES_DARWIN:()=>cct,OSTYPEVALUES_DRAGONFLYBSD:()=>fct,OSTYPEVALUES_FREEBSD:()=>lct,OSTYPEVALUES_HPUX:()=>mct,OSTYPEVALUES_LINUX:()=>uct,OSTYPEVALUES_NETBSD:()=>dct,OSTYPEVALUES_OPENBSD:()=>pct,OSTYPEVALUES_SOLARIS:()=>gct,OSTYPEVALUES_WINDOWS:()=>act,OSTYPEVALUES_Z_OS:()=>hct,OTEL_STATUS_CODE_VALUE_ERROR:()=>edt,OTEL_STATUS_CODE_VALUE_OK:()=>qin,OsTypeValues:()=>_ct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>zst,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Qst,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>kst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Yst,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Lst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>jst,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>qst,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Mst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ust,RPCGRPCSTATUSCODEVALUES_OK:()=>Ost,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Hst,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Fst,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Gst,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Kst,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Vst,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>$st,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Pst,RpcGrpcStatusCodeValues:()=>Jst,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Drt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Grt,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>vrt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Trt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Qrt,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>krt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>wrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>jrt,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Nrt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>brt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>xrt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Ort,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Rrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Irt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Crt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Frt,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Mrt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Lrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Brt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Prt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Srt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Urt,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>fnt,SEMATTRS_CODE_FILEPATH:()=>drt,SEMATTRS_CODE_FUNCTION:()=>crt,SEMATTRS_CODE_LINENO:()=>prt,SEMATTRS_CODE_NAMESPACE:()=>lrt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Tnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Rnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>vnt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Int,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>ynt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Snt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Cnt,SEMATTRS_DB_CASSANDRA_TABLE:()=>bnt,SEMATTRS_DB_CONNECTION_STRING:()=>mnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>xnt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>gnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>Nnt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Ent,SEMATTRS_DB_NAME:()=>hnt,SEMATTRS_DB_OPERATION:()=>_nt,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Dnt,SEMATTRS_DB_SQL_TABLE:()=>Bnt,SEMATTRS_DB_STATEMENT:()=>rV,SEMATTRS_DB_SYSTEM:()=>nV,SEMATTRS_DB_USER:()=>Ant,SEMATTRS_ENDUSER_ID:()=>ort,SEMATTRS_ENDUSER_ROLE:()=>irt,SEMATTRS_ENDUSER_SCOPE:()=>srt,SEMATTRS_EXCEPTION_ESCAPED:()=>Pnt,SEMATTRS_EXCEPTION_MESSAGE:()=>Ont,SEMATTRS_EXCEPTION_STACKTRACE:()=>knt,SEMATTRS_EXCEPTION_TYPE:()=>wnt,SEMATTRS_FAAS_COLDSTART:()=>znt,SEMATTRS_FAAS_CRON:()=>jnt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Lnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Fnt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Unt,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Qnt,SEMATTRS_FAAS_EXECUTION:()=>Mnt,SEMATTRS_FAAS_INVOKED_NAME:()=>Hnt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>$nt,SEMATTRS_FAAS_INVOKED_REGION:()=>qnt,SEMATTRS_FAAS_TIME:()=>Gnt,SEMATTRS_FAAS_TRIGGER:()=>oV,SEMATTRS_HTTP_CLIENT_IP:()=>yrt,SEMATTRS_HTTP_FLAVOR:()=>Art,SEMATTRS_HTTP_HOST:()=>frt,SEMATTRS_HTTP_METHOD:()=>fB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>hrt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>_rt,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>cV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>lV,SEMATTRS_HTTP_ROUTE:()=>dV,SEMATTRS_HTTP_SCHEME:()=>mrt,SEMATTRS_HTTP_SERVER_NAME:()=>Ert,SEMATTRS_HTTP_STATUS_CODE:()=>lS,SEMATTRS_HTTP_TARGET:()=>uV,SEMATTRS_HTTP_URL:()=>PC,SEMATTRS_HTTP_USER_AGENT:()=>grt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Aot,SEMATTRS_MESSAGE_ID:()=>mot,SEMATTRS_MESSAGE_TYPE:()=>fot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>got,SEMATTRS_MESSAGING_CONSUMER_ID:()=>eot,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Jrt,SEMATTRS_MESSAGING_DESTINATION:()=>zrt,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Hrt,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>oot,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>rot,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>not,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>iot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>sot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Krt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Wrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Zrt,SEMATTRS_MESSAGING_OPERATION:()=>Xrt,SEMATTRS_MESSAGING_PROTOCOL:()=>qrt,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Vrt,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>tot,SEMATTRS_MESSAGING_SYSTEM:()=>pV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>$rt,SEMATTRS_MESSAGING_URL:()=>Yrt,SEMATTRS_NET_HOST_CARRIER_ICC:()=>nrt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>ert,SEMATTRS_NET_HOST_CARRIER_MNC:()=>trt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Xnt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Wnt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Znt,SEMATTRS_NET_HOST_IP:()=>sV,SEMATTRS_NET_HOST_NAME:()=>Jnt,SEMATTRS_NET_HOST_PORT:()=>aV,SEMATTRS_NET_PEER_IP:()=>iV,SEMATTRS_NET_PEER_NAME:()=>Knt,SEMATTRS_NET_PEER_PORT:()=>Ynt,SEMATTRS_NET_TRANSPORT:()=>Vnt,SEMATTRS_PEER_SERVICE:()=>rrt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>mV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>dot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>pot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>lot,SEMATTRS_RPC_JSONRPC_VERSION:()=>cot,SEMATTRS_RPC_METHOD:()=>uot,SEMATTRS_RPC_SERVICE:()=>fV,SEMATTRS_RPC_SYSTEM:()=>aot,SEMATTRS_THREAD_ID:()=>art,SEMATTRS_THREAD_NAME:()=>urt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>sat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>iat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>aat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>uat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>cat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>lat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>dat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>fat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>pat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Aat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>mat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>tat,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>rat,SEMRESATTRS_CLOUD_PLATFORM:()=>oat,SEMRESATTRS_CLOUD_PROVIDER:()=>eat,SEMRESATTRS_CLOUD_REGION:()=>nat,SEMRESATTRS_CONTAINER_ID:()=>hat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Eat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>yat,SEMRESATTRS_CONTAINER_NAME:()=>gat,SEMRESATTRS_CONTAINER_RUNTIME:()=>_at,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Sat,SEMRESATTRS_DEVICE_ID:()=>Tat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>bat,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Iat,SEMRESATTRS_FAAS_ID:()=>vat,SEMRESATTRS_FAAS_INSTANCE:()=>xat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Dat,SEMRESATTRS_FAAS_NAME:()=>Cat,SEMRESATTRS_FAAS_VERSION:()=>Rat,SEMRESATTRS_HOST_ARCH:()=>Oat,SEMRESATTRS_HOST_ID:()=>Nat,SEMRESATTRS_HOST_IMAGE_ID:()=>Pat,SEMRESATTRS_HOST_IMAGE_NAME:()=>kat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Mat,SEMRESATTRS_HOST_NAME:()=>Bat,SEMRESATTRS_HOST_TYPE:()=>wat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Lat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>zat,SEMRESATTRS_K8S_CRONJOB_NAME:()=>tut,SEMRESATTRS_K8S_CRONJOB_UID:()=>eut,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Zat,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Jat,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Vat,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>qat,SEMRESATTRS_K8S_JOB_NAME:()=>Xat,SEMRESATTRS_K8S_JOB_UID:()=>Wat,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Fat,SEMRESATTRS_K8S_NODE_NAME:()=>Uat,SEMRESATTRS_K8S_NODE_UID:()=>Qat,SEMRESATTRS_K8S_POD_NAME:()=>jat,SEMRESATTRS_K8S_POD_UID:()=>Gat,SEMRESATTRS_K8S_REPLICASET_NAME:()=>$at,SEMRESATTRS_K8S_REPLICASET_UID:()=>Hat,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Kat,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Yat,SEMRESATTRS_OS_DESCRIPTION:()=>rut,SEMRESATTRS_OS_NAME:()=>out,SEMRESATTRS_OS_TYPE:()=>nut,SEMRESATTRS_OS_VERSION:()=>iut,SEMRESATTRS_PROCESS_COMMAND:()=>cut,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>dut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>lut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>aut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>uut,SEMRESATTRS_PROCESS_OWNER:()=>put,SEMRESATTRS_PROCESS_PID:()=>sut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Aut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>fut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>mut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>hut,SEMRESATTRS_SERVICE_NAME:()=>gut,SEMRESATTRS_SERVICE_NAMESPACE:()=>AV,SEMRESATTRS_SERVICE_VERSION:()=>_ut,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Tut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>yut,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Eut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Sut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Cut,SEMRESATTRS_WEBENGINE_NAME:()=>but,SEMRESATTRS_WEBENGINE_VERSION:()=>Iut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>idt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>sdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>adt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>cdt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>ldt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>ddt,SemanticAttributes:()=>hot,SemanticResourceAttributes:()=>vut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Ect,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>yct,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Sct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Tct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>bct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ict,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Cct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>vct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Rct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Vin,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>fdt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>mdt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Yin,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Adt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>gdt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Kin,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>hdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>_dt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Edt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>ydt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Sdt,TelemetrySdkLanguageValues:()=>Dct});var Xn=w(()=>{m();oye();NTe();BTe();wTe();OTe()});var kTe=P(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.ATTR_PROCESS_RUNTIME_NAME=void 0;uU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var PTe=P(lU=>{"use strict";m();Object.defineProperty(lU,"__esModule",{value:!0});lU.SDK_INFO=void 0;var vpt=fge(),cU=(Xn(),Le(jr)),Rpt=kTe();lU.SDK_INFO={[cU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Rpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[cU.ATTR_TELEMETRY_SDK_LANGUAGE]:cU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[cU.ATTR_TELEMETRY_SDK_VERSION]:vpt.VERSION}});var MTe=P(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var dU=dge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return dU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return dU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return dU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return dU.getStringListFromEnv}});var xpt=pge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return xpt._globalThis}});var Dpt=PTe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return Dpt.SDK_INFO}});su.otperformance=performance});var NV=P(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var fS=MTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return fS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return fS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return fS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return fS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return fS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return fS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return fS.getStringListFromEnv}})});var FTe=P(zr=>{"use strict";m();Object.defineProperty(zr,"__esModule",{value:!0});zr.addHrTimes=zr.isTimeInput=zr.isTimeInputHrTime=zr.hrTimeToSeconds=zr.hrTimeToMilliseconds=zr.hrTimeToMicroseconds=zr.hrTimeToNanoseconds=zr.hrTimeToTimeStamp=zr.hrTimeDuration=zr.timeInputToHrTime=zr.hrTime=zr.getTimeOrigin=zr.millisToHrTime=void 0;var pU=NV(),LTe=9,Npt=6,Bpt=Math.pow(10,Npt),mB=Math.pow(10,LTe);function AB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Bpt);return[n,r]}zr.millisToHrTime=AB;function wpt(){return pU.otperformance.timeOrigin}zr.getTimeOrigin=wpt;function UTe(e){let t=AB(pU.otperformance.timeOrigin),n=AB(typeof e=="number"?e:pU.otperformance.now());return QTe(t,n)}zr.hrTime=UTe;function Opt(e){if(BV(e))return e;if(typeof e=="number")return e<pU.otperformance.timeOrigin?UTe(e):AB(e);if(e instanceof Date)return AB(e.getTime());throw TypeError("Invalid input type")}zr.timeInputToHrTime=Opt;function kpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=mB),[n,r]}zr.hrTimeDuration=kpt;function Ppt(e){let t=LTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}zr.hrTimeToTimeStamp=Ppt;function Mpt(e){return e[0]*mB+e[1]}zr.hrTimeToNanoseconds=Mpt;function Lpt(e){return e[0]*1e6+e[1]/1e3}zr.hrTimeToMicroseconds=Lpt;function Upt(e){return e[0]*1e3+e[1]/1e6}zr.hrTimeToMilliseconds=Upt;function Qpt(e){return e[0]+e[1]/mB}zr.hrTimeToSeconds=Qpt;function BV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}zr.isTimeInputHrTime=BV;function Fpt(e){return BV(e)||typeof e=="number"||e instanceof Date}zr.isTimeInput=Fpt;function QTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=mB&&(n[1]-=mB,n[0]+=1),n}zr.addHrTimes=QTe});var GTe=P(fU=>{"use strict";m();Object.defineProperty(fU,"__esModule",{value:!0});fU.unrefTimer=void 0;function Gpt(e){typeof e!="number"&&e.unref()}fU.unrefTimer=Gpt});var jTe=P(gB=>{"use strict";m();Object.defineProperty(gB,"__esModule",{value:!0});gB.ExportResultCode=void 0;var jpt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(jpt=gB.ExportResultCode||(gB.ExportResultCode={}))});var HTe=P(mU=>{"use strict";m();Object.defineProperty(mU,"__esModule",{value:!0});mU.CompositePropagator=void 0;var zTe=(ze(),Le(nt)),wV=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){zTe.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(s){zTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};mU.CompositePropagator=wV});var $Te=P(LC=>{"use strict";m();Object.defineProperty(LC,"__esModule",{value:!0});LC.validateValue=LC.validateKey=void 0;var OV="[_0-9a-z-*/]",zpt=`[a-z]${OV}{0,255}`,Hpt=`[a-z0-9]${OV}{0,240}@[a-z]${OV}{0,13}`,$pt=new RegExp(`^(?:${zpt}|${Hpt})$`),qpt=/^[ -~]{0,255}[!-~]$/,Vpt=/,|=/;function Ypt(e){return $pt.test(e)}LC.validateKey=Ypt;function Kpt(e){return qpt.test(e)&&!Vpt.test(e)}LC.validateValue=Kpt});var PV=P(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.TraceState=void 0;var AU=$Te(),Jpt=32,qTe=512,VTe=",",YTe="=",kV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,AU.validateKey)(t)||!(0,AU.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>qTe)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=VTe+t),t=`${r[0]}${YTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(VTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(YTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,AU.validateKey)(u)||!(0,AU.validateValue)(l))continue;let p=r+i.length+(n.size>0?1:0);if(!(p>qTe)&&(n.set(u,l),r=p,n.size>=Jpt))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};gU.TraceState=kV});var JTe=P(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var hU=(ze(),Le(nt)),Zpt=dB(),Wpt=PV();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Xpt="00",eft="(?!ff)[\\da-f]{2}",tft="(?![0]{32})[\\da-f]{32}",nft="(?![0]{16})[\\da-f]{16}",rft="[\\da-f]{2}",oft=new RegExp(`^\\s?(${eft})-(${tft})-(${nft})-(${rft})(-.*)?\\s?$`);function KTe(e){let t=oft.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=KTe;var MV=class{inject(t,n,r){let o=hU.trace.getSpanContext(t);if(!o||(0,Zpt.isTracingSuppressed)(t)||!(0,hU.isSpanContextValid)(o))return;let i=`${Xpt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||hU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=KTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new Wpt.TraceState(typeof l=="string"?l:void 0)}return hU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=MV});var ZTe=P(ff=>{"use strict";m();Object.defineProperty(ff,"__esModule",{value:!0});ff.getRPCMetadata=ff.deleteRPCMetadata=ff.setRPCMetadata=ff.RPCType=void 0;var ift=(ze(),Le(nt)),LV=(0,ift.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),sft;(function(e){e.HTTP="http"})(sft=ff.RPCType||(ff.RPCType={}));function aft(e,t){return e.setValue(LV,t)}ff.setRPCMetadata=aft;function uft(e){return e.deleteValue(LV)}ff.deleteRPCMetadata=uft;function cft(e){return e.getValue(LV)}ff.getRPCMetadata=cft});var nbe=P(_U=>{"use strict";m();Object.defineProperty(_U,"__esModule",{value:!0});_U.isPlainObject=void 0;var lft="[object Object]",dft="[object Null]",pft="[object Undefined]",fft=Function.prototype,WTe=fft.toString,mft=WTe.call(Object),Aft=Object.getPrototypeOf,XTe=Object.prototype,ebe=XTe.hasOwnProperty,mS=Symbol?Symbol.toStringTag:void 0,tbe=XTe.toString;function gft(e){if(!hft(e)||_ft(e)!==lft)return!1;let t=Aft(e);if(t===null)return!0;let n=ebe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&WTe.call(n)===mft}_U.isPlainObject=gft;function hft(e){return e!=null&&typeof e=="object"}function _ft(e){return e==null?e===void 0?pft:dft:mS&&mS in Object(e)?Eft(e):yft(e)}function Eft(e){let t=ebe.call(e,mS),n=e[mS],r=!1;try{e[mS]=void 0,r=!0}catch{}let o=tbe.call(e);return r&&(t?e[mS]=n:delete e[mS]),o}function yft(e){return tbe.call(e)}});var abe=P(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.merge=void 0;var rbe=nbe(),Sft=20;function Tft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=ibe(t,e.shift(),0,n);return t}SU.merge=Tft;function UV(e){return yU(e)?e.slice():e}function ibe(e,t,n=0,r){let o;if(!(n>Sft)){if(n++,EU(e)||EU(t)||sbe(t))o=UV(t);else if(yU(e)){if(o=e.slice(),yU(t))for(let i=0,s=t.length;i<s;i++)o.push(UV(t[i]));else if(hB(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=UV(t[l]))}}}else if(hB(e))if(hB(t)){if(!bft(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let p=t[l];if(EU(p))typeof p>"u"?delete o[l]:o[l]=p;else{let h=o[l],y=p;if(obe(e,l,r)||obe(t,l,r))delete o[l];else{if(hB(h)&&hB(y)){let S=r.get(h)||[],T=r.get(y)||[];S.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,S),r.set(y,T)}o[l]=ibe(o[l],p,n,r)}}}}else o=t;return o}}function obe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function yU(e){return Array.isArray(e)}function sbe(e){return typeof e=="function"}function hB(e){return!EU(e)&&!yU(e)&&!sbe(e)&&typeof e=="object"}function EU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function bft(e,t){return!(!(0,rbe.isPlainObject)(e)||!(0,rbe.isPlainObject)(t))}});var ube=P(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.callWithTimeout=UC.TimeoutError=void 0;var TU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};UC.TimeoutError=TU;function Ift(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new TU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}UC.callWithTimeout=Ift});var lbe=P(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.isUrlIgnored=QC.urlMatches=void 0;function cbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}QC.urlMatches=cbe;function Cft(e,t){if(!t)return!1;for(let n of t)if(cbe(e,n))return!0;return!1}QC.isUrlIgnored=Cft});var dbe=P(bU=>{"use strict";m();Object.defineProperty(bU,"__esModule",{value:!0});bU.Deferred=void 0;var QV=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)}};bU.Deferred=QV});var pbe=P(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU.BindOnceFuture=void 0;var vft=dbe(),FV=class{_isCalled=!1;_deferred=new vft.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}};IU.BindOnceFuture=FV});var mbe=P(CU=>{"use strict";m();Object.defineProperty(CU,"__esModule",{value:!0});CU.diagLogLevelFromString=void 0;var xg=(ze(),Le(nt)),fbe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function Rft(e){if(e==null)return;let t=fbe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(fbe)}, using default`),xg.DiagLogLevel.INFO)}CU.diagLogLevelFromString=Rft});var gbe=P(vU=>{"use strict";m();Object.defineProperty(vU,"__esModule",{value:!0});vU._export=void 0;var Abe=(ze(),Le(nt)),xft=dB();function Dft(e,t){return new Promise(n=>{Abe.context.with((0,xft.suppressTracing)(Abe.context.active()),()=>{e.export(t,n)})})}vU._export=Dft});var vr=P(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});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.hrTimeToSeconds=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;we.internal=void 0;var Nft=XAe();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Nft.W3CBaggagePropagator}});var Bft=ege();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return Bft.AnchoredClock}});var hbe=ige();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return hbe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return hbe.sanitizeAttributes}});var _be=age();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return _be.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return _be.setGlobalErrorHandler}});var wft=eV();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return wft.loggingErrorHandler}});var Ql=FTe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Ql.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Ql.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Ql.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Ql.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ql.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ql.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ql.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Ql.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ql.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Ql.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Ql.timeInputToHrTime}});var Oft=GTe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return Oft.unrefTimer}});var kft=jTe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return kft.ExportResultCode}});var Pft=J5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Pft.parseKeyPairsIntoRecord}});var AS=NV();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return AS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return AS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return AS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return AS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return AS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return AS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return AS.otperformance}});var Mft=HTe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Mft.CompositePropagator}});var RU=JTe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return RU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return RU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return RU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return RU.parseTraceParent}});var xU=ZTe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return xU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return xU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return xU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return xU.setRPCMetadata}});var GV=dB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return GV.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return GV.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return GV.unsuppressTracing}});var Lft=PV();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return Lft.TraceState}});var Uft=abe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return Uft.merge}});var Ebe=ube();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return Ebe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return Ebe.callWithTimeout}});var ybe=lbe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return ybe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return ybe.urlMatches}});var Qft=pbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return Qft.BindOnceFuture}});var Fft=mbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return Fft.diagLogLevelFromString}});var Gft=gbe();we.internal={_export:Gft._export}});var Sbe=P(DU=>{"use strict";m();Object.defineProperty(DU,"__esModule",{value:!0});DU.VERSION=void 0;DU.VERSION="0.214.0"});var Tbe=P(_B=>{"use strict";m();Object.defineProperty(_B,"__esModule",{value:!0});_B.SeverityNumber=void 0;var jft;(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"})(jft=_B.SeverityNumber||(_B.SeverityNumber={}))});var BU=P(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.NOOP_LOGGER=FC.NoopLogger=void 0;var NU=class{emit(t){}};FC.NoopLogger=NU;FC.NOOP_LOGGER=new NU});var bbe=P(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.API_BACKWARDS_COMPATIBILITY_VERSION=Bm.makeGetter=Bm._global=Bm.GLOBAL_LOGS_API_KEY=void 0;Bm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Bm._global=globalThis;function zft(e,t,n){return r=>r===e?t:n}Bm.makeGetter=zft;Bm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var jV=P(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.NOOP_LOGGER_PROVIDER=GC.NoopLoggerProvider=void 0;var Hft=BU(),wU=class{getLogger(t,n,r){return new Hft.NoopLogger}};GC.NoopLoggerProvider=wU;GC.NOOP_LOGGER_PROVIDER=new wU});var Ibe=P(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.ProxyLogger=void 0;var $ft=BU(),zV=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):$ft.NOOP_LOGGER}};OU.ProxyLogger=zV});var Cbe=P(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.ProxyLoggerProvider=void 0;var qft=jV(),Vft=Ibe(),HV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Vft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:qft.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)}};kU.ProxyLoggerProvider=HV});var Rbe=P(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU.LogsAPI=void 0;var $d=bbe(),Yft=jV(),vbe=Cbe(),$V=class e{constructor(){this._proxyLoggerProvider=new vbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return $d._global[$d.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():($d._global[$d.GLOBAL_LOGS_API_KEY]=(0,$d.makeGetter)($d.API_BACKWARDS_COMPATIBILITY_VERSION,t,Yft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=$d._global[$d.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call($d._global,$d.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete $d._global[$d.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new vbe.ProxyLoggerProvider}};PU.LogsAPI=$V});var qV=P(wm=>{"use strict";m();Object.defineProperty(wm,"__esModule",{value:!0});wm.logs=wm.NoopLogger=wm.NOOP_LOGGER=wm.SeverityNumber=void 0;var Kft=Tbe();Object.defineProperty(wm,"SeverityNumber",{enumerable:!0,get:function(){return Kft.SeverityNumber}});var xbe=BU();Object.defineProperty(wm,"NOOP_LOGGER",{enumerable:!0,get:function(){return xbe.NOOP_LOGGER}});Object.defineProperty(wm,"NoopLogger",{enumerable:!0,get:function(){return xbe.NoopLogger}});var Jft=Rbe();wm.logs=Jft.LogsAPI.getInstance()});var Dbe=P(jC=>{"use strict";m();Object.defineProperty(jC,"__esModule",{value:!0});jC.disableInstrumentations=jC.enableInstrumentations=void 0;function Zft(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}jC.enableInstrumentations=Zft;function Wft(e){e.forEach(t=>t.disable())}jC.disableInstrumentations=Wft});var wbe=P(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.registerInstrumentations=void 0;var Nbe=(ze(),Le(nt)),Xft=qV(),Bbe=Dbe();function emt(e){let t=e.tracerProvider||Nbe.trace.getTracerProvider(),n=e.meterProvider||Nbe.metrics.getMeterProvider(),r=e.loggerProvider||Xft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Bbe.enableInstrumentations)(o,t,n,r),()=>{(0,Bbe.disableInstrumentations)(o)}}MU.registerInstrumentations=emt});var Gbe=P(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.satisfies=void 0;var JV=(ze(),Le(nt)),Lbe=/^(?: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-]+)*))?$/,tmt=/^(?<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-]+)*))?$/,nmt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function rmt(e,t,n){if(!omt(e))return JV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=umt(e);if(!r)return!1;let o=[],i=Ube(r,t,o,n);return i&&!n?.includePrerelease?smt(r,o):i}LU.satisfies=rmt;function omt(e){return typeof e=="string"&&Lbe.test(e)}function Ube(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(VV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Dmt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!VV(e,i,n,r))return!1;return!0}return VV(e,t,n,r)}function VV(e,t,n,r){if(t=amt(t,r),t.includes(" "))return Ube(e,t,n,r);{let o=cmt(t);return n.push(o),imt(e,o)}}function imt(e,t){if(t.invalid)return!1;if(!t.version||KV(t.version))return!0;let n=kbe(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=kbe(r,o)}return nmt[t.op]?.includes(n)}function smt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function amt(e,t){return e=e.trim(),e=Rmt(e,t),e=vmt(e),e=xmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function umt(e){let t=e.match(Lbe);if(!t){JV.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function cmt(e){if(!e)return{};let t=e.match(tmt);if(!t)return JV.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function KV(e){return e==="*"||e==="x"||e==="X"}function Obe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function lmt(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 dmt(e,t){if(KV(e)||KV(t))return 0;let[n,r]=lmt(Obe(e),Obe(t));return n>r?1:n<r?-1:0}function kbe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=dmt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Qbe="[a-zA-Z0-9-]",Fbe="0|[1-9]\\d*",pmt=`\\d*[a-zA-Z-]${Qbe}*`,fmt="((?:<|>)?=?)",Pbe=`(?:${Fbe}|${pmt})`,mmt=`(?:-(${Pbe}(?:\\.${Pbe})*))`,Mbe=`${Qbe}+`,Amt=`(?:\\+(${Mbe}(?:\\.${Mbe})*))`,YV=`${Fbe}|x|X|\\*`,EB=`[v=\\s]*(${YV})(?:\\.(${YV})(?:\\.(${YV})(?:${mmt})?${Amt}?)?)?`,gmt=`^${fmt}\\s*${EB}$`,hmt=new RegExp(gmt),_mt=`^\\s*(${EB})\\s+-\\s+(${EB})\\s*$`,Emt=new RegExp(_mt),ymt="(?:~>?)",Smt=`^${ymt}${EB}$`,Tmt=new RegExp(Smt),bmt="(?:\\^)",Imt=`^${bmt}${EB}$`,Cmt=new RegExp(Imt);function vmt(e){let t=Tmt;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Rmt(e,t){let n=Cmt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return $u(i)?p="":$u(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function xmt(e,t){let n=hmt;return e.replace(n,(r,o,i,s,u,l)=>{let p=$u(i),h=p||$u(s),y=h||$u(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Dmt(e,t){let n=Emt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(y)?h="":$u(S)?h=`<${+y+1}.0.0-0`:$u(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var ZV=P(Ra=>{"use strict";m();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.massUnwrap=Ra.unwrap=Ra.massWrap=Ra.wrap=void 0;var qu=console.error.bind(console);function yB(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 Nmt=(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 yB(o,"__original",r),yB(o,"__unwrap",()=>{e[t]===o&&yB(e,t,r)}),yB(o,"__wrapped",!0),yB(e,t,o),o};Ra.wrap=Nmt;var Bmt=(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,Ra.wrap)(r,o,n)})})};Ra.massWrap=Bmt;var wmt=(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}};Ra.unwrap=wmt;var Omt=(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,Ra.unwrap)(n,r)})})};Ra.massUnwrap=Omt;function SB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Ra.default=SB;SB.wrap=Ra.wrap;SB.massWrap=Ra.massWrap;SB.unwrap=Ra.unwrap;SB.massUnwrap=Ra.massUnwrap});var jbe=P(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.InstrumentationAbstract=void 0;var WV=(ze(),Le(nt)),kmt=qV(),UU=ZV(),XV=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=WV.diag.createComponentLogger({namespace:t}),this._tracer=WV.trace.getTracer(t,n),this._meter=WV.metrics.getMeter(t,n),this._logger=kmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=UU.wrap;_unwrap=UU.unwrap;_massWrap=UU.massWrap;_massUnwrap=UU.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)}}};QU.InstrumentationAbstract=XV});var Hbe=P((Ian,zbe)=>{m();var zC=1e3,HC=zC*60,$C=HC*60,gS=$C*24,Pmt=gS*7,Mmt=gS*365.25;zbe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Lmt(e);if(n==="number"&&isFinite(e))return t.long?Qmt(e):Umt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Lmt(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*Mmt;case"weeks":case"week":case"w":return n*Pmt;case"days":case"day":case"d":return n*gS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*$C;case"minutes":case"minute":case"mins":case"min":case"m":return n*HC;case"seconds":case"second":case"secs":case"sec":case"s":return n*zC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Umt(e){var t=Math.abs(e);return t>=gS?Math.round(e/gS)+"d":t>=$C?Math.round(e/$C)+"h":t>=HC?Math.round(e/HC)+"m":t>=zC?Math.round(e/zC)+"s":e+"ms"}function Qmt(e){var t=Math.abs(e);return t>=gS?FU(e,t,gS,"day"):t>=$C?FU(e,t,$C,"hour"):t>=HC?FU(e,t,HC,"minute"):t>=zC?FU(e,t,zC,"second"):e+" ms"}function FU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e7=P((van,$be)=>{m();function Fmt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=Hbe(),n.destroy=p,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,T,v;function R(...x){if(!R.enabled)return;let O=R,M=Number(new Date),j=M-(y||M);O.diff=j,O.prev=y,O.curr=M,y=M,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let G=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,ae)=>{if(V==="%%")return"%";G++;let se=n.formatters[ae];if(typeof se=="function"){let Ee=x[G];V=se.call(O,Ee),x.splice(G,1),G--}return V}),n.formatArgs.call(O,x),(O.log||n.log).apply(O,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{S=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,T=0,v=-1,R=0;for(;S<h.length;)if(T<y.length&&(y[T]===h[S]||y[T]==="*"))y[T]==="*"?(v=T,R=S,T++):(S++,T++);else if(v!==-1)T=v+1,R++,S=R;else return!1;for(;T<y.length&&y[T]==="*";)T++;return T===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function u(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function p(){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}$be.exports=Fmt});var qbe=P((Fc,GU)=>{m();Fc.formatArgs=jmt;Fc.save=zmt;Fc.load=Hmt;Fc.useColors=Gmt;Fc.storage=$mt();Fc.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`."))}})();Fc.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 Gmt(){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 jmt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+GU.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)}Fc.log=console.debug||console.log||(()=>{});function zmt(e){try{e?Fc.storage.setItem("debug",e):Fc.storage.removeItem("debug")}catch{}}function Hmt(){let e;try{e=Fc.storage.getItem("debug")||Fc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function $mt(){try{return localStorage}catch{}}GU.exports=e7()(Fc);var{formatters:qmt}=GU.exports;qmt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Ybe=P((Dan,Vbe)=>{"use strict";m();Vbe.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 Zbe=P((Ban,Jbe)=>{"use strict";m();var Vmt=Qe("os"),Kbe=Qe("tty"),qd=Ybe(),{env:Ws}=process,N_;qd("no-color")||qd("no-colors")||qd("color=false")||qd("color=never")?N_=0:(qd("color")||qd("colors")||qd("color=true")||qd("color=always"))&&(N_=1);"FORCE_COLOR"in Ws&&(Ws.FORCE_COLOR==="true"?N_=1:Ws.FORCE_COLOR==="false"?N_=0:N_=Ws.FORCE_COLOR.length===0?1:Math.min(parseInt(Ws.FORCE_COLOR,10),3));function t7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n7(e,t){if(N_===0)return 0;if(qd("color=16m")||qd("color=full")||qd("color=truecolor"))return 3;if(qd("color=256"))return 2;if(e&&!t&&N_===void 0)return 0;let n=N_||0;if(Ws.TERM==="dumb")return n;if(process.platform==="win32"){let r=Vmt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ws)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ws)||Ws.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ws)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ws.TEAMCITY_VERSION)?1:0;if(Ws.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ws){let r=parseInt((Ws.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ws.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ws.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ws.TERM)||"COLORTERM"in Ws?1:n}function Ymt(e){let t=n7(e,e&&e.isTTY);return t7(t)}Jbe.exports={supportsColor:Ymt,stdout:t7(n7(!0,Kbe.isatty(1))),stderr:t7(n7(!0,Kbe.isatty(2)))}});var Xbe=P((Xs,zU)=>{m();var Kmt=Qe("tty"),jU=Qe("util");Xs.init=nAt;Xs.log=Xmt;Xs.formatArgs=Zmt;Xs.save=eAt;Xs.load=tAt;Xs.useColors=Jmt;Xs.destroy=jU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Xs.colors=[6,2,3,4,5,1];try{let e=Zbe();e&&(e.stderr||e).level>=2&&(Xs.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{}Xs.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 Jmt(){return"colors"in Xs.inspectOpts?!!Xs.inspectOpts.colors:Kmt.isatty(process.stderr.fd)}function Zmt(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 htt=Object.create;var OL=Object.defineProperty;var _tt=Object.getOwnPropertyDescriptor;var Ett=Object.getOwnPropertyNames;var ytt=Object.getPrototypeOf,Stt=Object.prototype.hasOwnProperty;var Qe=(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 w=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var P=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},Js=(e,t)=>{for(var n in t)OL(e,n,{get:t[n],enumerable:!0})},nAe=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ett(t))!Stt.call(e,o)&&o!==n&&OL(e,o,{get:()=>t[o],enumerable:!(r=_tt(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?htt(ytt(e)):{},nAe(t||!e||!e.__esModule?OL(n,"default",{value:e,enumerable:!0}):n,e)),Le=e=>nAe(OL({},"__esModule",{value:!0}),e);var m=w(()=>{(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.189"}}catch{}})()});var Ig,f5=w(()=>{m();Ig="1.9.1"});function Ttt(e){let t=new Set([e]),n=new Set,r=e.match(iAe);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(u){return n.add(u),!1}function s(u){return t.add(u),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let p=l.match(iAe);if(!p)return i(l);let h={major:+p[1],minor:+p[2],patch:+p[3],prerelease:p[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var iAe,sAe,aAe=w(()=>{m();f5();iAe=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;sAe=Ttt(Ig)});function Cm(e,t,n,r=!1){var o;let i=oB[rB]=(o=oB[rB])!==null&&o!==void 0?o:{version:Ig};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==Ig){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${Ig}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${Ig}.`),!0}function Ml(e){var t,n;let r=(t=oB[rB])===null||t===void 0?void 0:t.version;if(!(!r||!sAe(r)))return(n=oB[rB])===null||n===void 0?void 0:n[e]}function vm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${Ig}.`);let n=oB[rB];n&&delete n[e]}var btt,rB,oB,sS=w(()=>{m();f5();aAe();btt=Ig.split(".")[0],rB=Symbol.for(`opentelemetry.js.api.${btt}`),oB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function iB(e,t,n){let r=Ml("diag");if(r)return r[e](t,...n)}var kL,uAe=w(()=>{m();sS();kL=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return iB("debug",this._namespace,t)}error(...t){return iB("error",this._namespace,t)}info(...t){return iB("info",this._namespace,t)}warn(...t){return iB("warn",this._namespace,t)}verbose(...t){return iB("verbose",this._namespace,t)}}});var Is,PL=w(()=>{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"})(Is||(Is={}))});function cAe(e,t){e<Is.NONE?e=Is.NONE:e>Is.ALL&&(e=Is.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",Is.ERROR),warn:n("warn",Is.WARN),info:n("info",Is.INFO),debug:n("debug",Is.DEBUG),verbose:n("verbose",Is.VERBOSE)}}var lAe=w(()=>{m();PL()});var Itt,Zs,aS=w(()=>{m();uAe();lAe();PL();sS();Itt="diag",Zs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=Ml("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:Is.INFO})=>{var s,u,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let p=Ml("diag"),h=cAe((u=i.logLevel)!==null&&u!==void 0?u:Is.INFO,o);if(p&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";p.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Cm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{vm(Itt,n)},n.createComponentLogger=o=>new kL(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var ML,dAe=w(()=>{m();ML=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 pAe,fAe=w(()=>{m();pAe=Symbol("BaggageEntryMetadata")});function mAe(e={}){return new ML(new Map(Object.entries(e)))}function AAe(e){return typeof e!="string"&&(Ctt.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:pAe,toString(){return e}}}var Ctt,m5=w(()=>{m();aS();dAe();fAe();Ctt=Zs.instance()});function Ll(e){return Symbol.for(e)}var A5,NC,sB=w(()=>{m();A5=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}}},NC=new A5});var g5,h5,LL,gAe=w(()=>{m();g5=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],h5={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(h5[t]=console[t])}LL=class{constructor(){function t(n){return function(...r){let o=h5[n];if(typeof o!="function"&&(o=h5.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<g5.length;n++)this[g5[n].n]=t(g5[n].c)}}});function hAe(){return v5}var _5,BC,E5,y5,S5,T5,aB,b5,I5,C5,v5,vtt,Rtt,xtt,Dtt,Ntt,Btt,wtt,R5=w(()=>{m();_5=class{constructor(){}createGauge(t,n){return Rtt}createHistogram(t,n){return xtt}createCounter(t,n){return vtt}createUpDownCounter(t,n){return Dtt}createObservableGauge(t,n){return Btt}createObservableCounter(t,n){return Ntt}createObservableUpDownCounter(t,n){return wtt}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},BC=class{},E5=class extends BC{add(t,n){}},y5=class extends BC{add(t,n){}},S5=class extends BC{record(t,n){}},T5=class extends BC{record(t,n){}},aB=class{addCallback(t){}removeCallback(t){}},b5=class extends aB{},I5=class extends aB{},C5=class extends aB{},v5=new _5,vtt=new E5,Rtt=new S5,xtt=new T5,Dtt=new y5,Ntt=new b5,Btt=new I5,wtt=new C5});var UL,_Ae=w(()=>{m();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(UL||(UL={}))});var QL,FL,x5=w(()=>{m();QL={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},FL={set(e,t,n){e!=null&&(e[t]=n)}}});var GL,EAe=w(()=>{m();sB();GL=class{active(){return NC}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var D5,Ott,Rm,uB=w(()=>{m();EAe();sS();aS();D5="context",Ott=new GL,Rm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Cm(D5,t,Zs.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 Ml(D5)||Ott}disable(){this._getContextManager().disable(),vm(D5,Zs.instance())}}});var ou,N5=w(()=>{m();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(ou||(ou={}))});var cB,uS,jL,zL=w(()=>{m();N5();cB="0000000000000000",uS="00000000000000000000000000000000",jL={traceId:uS,spanId:cB,traceFlags:ou.NONE}});var xm,HL=w(()=>{m();zL();xm=class{constructor(t=jL){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 $L(e){return e.getValue(B5)||void 0}function yAe(){return $L(Rm.getInstance().active())}function lB(e,t){return e.setValue(B5,t)}function SAe(e){return e.deleteValue(B5)}function TAe(e,t){return lB(e,new xm(t))}function qL(e){var t;return(t=$L(e))===null||t===void 0?void 0:t.spanContext()}var B5,w5=w(()=>{m();sB();HL();uB();B5=Ll("OpenTelemetry Context Key SPAN")});function bAe(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(VL[e.charCodeAt(r)]|0)+(VL[e.charCodeAt(r+1)]|0)+(VL[e.charCodeAt(r+2)]|0)+(VL[e.charCodeAt(r+3)]|0);return n===t}function O5(e){return bAe(e,32)&&e!==uS}function k5(e){return bAe(e,16)&&e!==cB}function Cg(e){return O5(e.traceId)&&k5(e.spanId)}function IAe(e){return new xm(e)}var VL,YL=w(()=>{m();zL();HL();VL=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 ktt(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 P5,wC,M5=w(()=>{m();uB();w5();HL();YL();P5=Rm.getInstance(),wC=class{startSpan(t,n,r=P5.active()){if(!!n?.root)return new xm;let i=r&&qL(r);return ktt(i)&&Cg(i)?new xm(i):new xm}startActiveSpan(t,n,r,o){let i,s,u;if(arguments.length<2)return;arguments.length===2?u=n:arguments.length===3?(i=n,u=r):(i=n,s=r,u=o);let l=s??P5.active(),p=this.startSpan(t,i,l),h=lB(l,p);return P5.with(h,u,void 0,p)}}});var Ptt,OC,L5=w(()=>{m();M5();Ptt=new wC,OC=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):Ptt}}});var KL,CAe=w(()=>{m();M5();KL=class{getTracer(t,n,r){return new wC}}});var Mtt,cS,U5=w(()=>{m();L5();CAe();Mtt=new KL,cS=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new OC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Mtt}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 JL,vAe=w(()=>{m();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(JL||(JL={}))});var fo,RAe=w(()=>{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"})(fo||(fo={}))});var Ai,xAe=w(()=>{m();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Ai||(Ai={}))});function DAe(e){return Qtt.test(e)}function NAe(e){return Ftt.test(e)&&!Gtt.test(e)}var Q5,Ltt,Utt,Qtt,Ftt,Gtt,BAe=w(()=>{m();Q5="[_0-9a-z-*/]",Ltt=`[a-z]${Q5}{0,255}`,Utt=`[a-z0-9]${Q5}{0,240}@[a-z]${Q5}{0,13}`,Qtt=new RegExp(`^(?:${Ltt}|${Utt})$`),Ftt=/^[ -~]{0,255}[!-~]$/,Gtt=/,|=/});var wAe,jtt,OAe,kAe,ZL,PAe=w(()=>{m();BAe();wAe=32,jtt=512,OAe=",",kAe="=",ZL=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+kAe+this.get(n)),t),[]).join(OAe)}_parse(t){t.length>jtt||(this._internalState=t.split(OAe).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(kAe);if(i!==-1){let s=o.slice(0,i),u=o.slice(i+1,r.length);DAe(s)&&NAe(u)&&n.set(s,u)}return n},new Map),this._internalState.size>wAe&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,wAe))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function MAe(e){return new ZL(e)}var LAe=w(()=>{m();PAe()});var Xe,UAe=w(()=>{m();uB();Xe=Rm.getInstance()});var Ul,QAe=w(()=>{m();aS();Ul=Zs.instance()});var F5,FAe,GAe=w(()=>{m();R5();F5=class{getMeter(t,n,r){return v5}},FAe=new F5});var G5,WL,jAe=w(()=>{m();GAe();sS();aS();G5="metrics",WL=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Cm(G5,t,Zs.instance())}getMeterProvider(){return Ml(G5)||FAe}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){vm(G5,Zs.instance())}}});var j5,zAe=w(()=>{m();jAe();j5=WL.getInstance()});var XL,HAe=w(()=>{m();XL=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function H5(e){return e.getValue(z5)||void 0}function $Ae(){return H5(Rm.getInstance().active())}function qAe(e,t){return e.setValue(z5,t)}function VAe(e){return e.deleteValue(z5)}var z5,YAe=w(()=>{m();uB();sB();z5=Ll("OpenTelemetry Baggage Key")});var $5,ztt,eU,KAe=w(()=>{m();sS();HAe();x5();YAe();m5();aS();$5="propagation",ztt=new XL,eU=class e{constructor(){this.createBaggage=mAe,this.getBaggage=H5,this.getActiveBaggage=$Ae,this.setBaggage=qAe,this.deleteBaggage=VAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Cm($5,t,Zs.instance())}inject(t,n,r=FL){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=QL){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){vm($5,Zs.instance())}_getGlobalPropagator(){return Ml($5)||ztt}}});var pf,JAe=w(()=>{m();KAe();pf=eU.getInstance()});var q5,tU,ZAe=w(()=>{m();sS();U5();YL();w5();aS();q5="trace",tU=class e{constructor(){this._proxyTracerProvider=new cS,this.wrapSpanContext=IAe,this.isSpanContextValid=Cg,this.deleteSpan=SAe,this.getSpan=$L,this.getActiveSpan=yAe,this.getSpanContext=qL,this.setSpan=lB,this.setSpanContext=TAe}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Cm(q5,this._proxyTracerProvider,Zs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Ml(q5)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){vm(q5,Zs.instance()),this._proxyTracerProvider=new cS}}});var qt,WAe=w(()=>{m();ZAe();qt=tU.getInstance()});var nt={};Js(nt,{DiagConsoleLogger:()=>LL,DiagLogLevel:()=>Is,INVALID_SPANID:()=>cB,INVALID_SPAN_CONTEXT:()=>jL,INVALID_TRACEID:()=>uS,ProxyTracer:()=>OC,ProxyTracerProvider:()=>cS,ROOT_CONTEXT:()=>NC,SamplingDecision:()=>JL,SpanKind:()=>fo,SpanStatusCode:()=>Ai,TraceFlags:()=>ou,ValueType:()=>UL,baggageEntryMetadataFromString:()=>AAe,context:()=>Xe,createContextKey:()=>Ll,createNoopMeter:()=>hAe,createTraceState:()=>MAe,default:()=>Htt,defaultTextMapGetter:()=>QL,defaultTextMapSetter:()=>FL,diag:()=>Ul,isSpanContextValid:()=>Cg,isValidSpanId:()=>k5,isValidTraceId:()=>O5,metrics:()=>j5,propagation:()=>pf,trace:()=>qt});var Htt,ze=w(()=>{m();m5();sB();gAe();PL();R5();_Ae();x5();L5();U5();vAe();RAe();xAe();N5();LAe();YL();zL();UAe();QAe();zAe();JAe();WAe();Htt={context:Xe,diag:Ul,metrics:j5,propagation:pf,trace:qt}});var dB=P(R_=>{"use strict";m();Object.defineProperty(R_,"__esModule",{value:!0});R_.isTracingSuppressed=R_.unsuppressTracing=R_.suppressTracing=void 0;var $tt=(ze(),Le(nt)),V5=(0,$tt.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function qtt(e){return e.setValue(V5,!0)}R_.suppressTracing=qtt;function Vtt(e){return e.deleteValue(V5)}R_.unsuppressTracing=Vtt;function Ytt(e){return e.getValue(V5)===!0}R_.isTracingSuppressed=Ytt});var Y5=P(iu=>{"use strict";m();Object.defineProperty(iu,"__esModule",{value:!0});iu.BAGGAGE_MAX_TOTAL_LENGTH=iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=iu.BAGGAGE_HEADER=iu.BAGGAGE_ITEMS_SEPARATOR=iu.BAGGAGE_PROPERTIES_SEPARATOR=iu.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;iu.BAGGAGE_KEY_PAIR_SEPARATOR="=";iu.BAGGAGE_PROPERTIES_SEPARATOR=";";iu.BAGGAGE_ITEMS_SEPARATOR=",";iu.BAGGAGE_HEADER="baggage";iu.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;iu.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;iu.BAGGAGE_MAX_TOTAL_LENGTH=8192});var J5=P(Hd=>{"use strict";m();Object.defineProperty(Hd,"__esModule",{value:!0});Hd.parseKeyPairsIntoRecord=Hd.parseBaggageHeaderString=Hd.parsePairKeyValue=Hd.getKeyPairs=Hd.serializeKeyPairs=void 0;var Ktt=(ze(),Le(nt)),Dm=Y5();function Jtt(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Dm.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Dm.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Hd.serializeKeyPairs=Jtt;function Ztt(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Dm.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Hd.getKeyPairs=Ztt;function K5(e){if(!e)return;let t=e.indexOf(Dm.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Dm.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 s,u;try{s=decodeURIComponent(o),u=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let p=e.substring(t+1);l=(0,Ktt.baggageEntryMetadataFromString)(p)}return{key:s,value:u,metadata:l}}Hd.parsePairKeyValue=K5;function Wtt(e,t,n,r){let o=0;for(;o<e.length&&n<Dm.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Dm.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,u=s-o;if(u<=Dm.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=K5(e.substring(o,s));if(l){let p=(n===0?0:1)+u;if(r+p>Dm.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=p}}if(i===-1)break;o=i+1}return[n,r]}Hd.parseBaggageHeaderString=Wtt;function Xtt(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Dm.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=K5(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Hd.parseKeyPairsIntoRecord=Xtt});var XAe=P(rU=>{"use strict";m();Object.defineProperty(rU,"__esModule",{value:!0});rU.W3CBaggagePropagator=void 0;var Z5=(ze(),Le(nt)),ent=dB(),pB=Y5(),nU=J5(),W5=class{inject(t,n,r){let o=Z5.propagation.getBaggage(t);if(!o||(0,ent.isTracingSuppressed)(t))return;let i=(0,nU.getKeyPairs)(o).filter(u=>u.length<=pB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,pB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,nU.serializeKeyPairs)(i);s.length>0&&r.set(n,pB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,pB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,u=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,u]=(0,nU.parseBaggageHeaderString)(o[l],i,s,u);else[s]=(0,nU.parseBaggageHeaderString)(o,i,s,u);return s===0?t:Z5.propagation.setBaggage(t,Z5.propagation.createBaggage(i))}fields(){return[pB.BAGGAGE_HEADER]}};rU.W3CBaggagePropagator=W5});var ege=P(oU=>{"use strict";m();Object.defineProperty(oU,"__esModule",{value:!0});oU.AnchoredClock=void 0;var X5=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}};oU.AnchoredClock=X5});var ige=P(x_=>{"use strict";m();Object.defineProperty(x_,"__esModule",{value:!0});x_.isAttributeValue=x_.isAttributeKey=x_.sanitizeAttributes=void 0;var tge=(ze(),Le(nt));function tnt(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(!nge(n)){tge.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!rge(r)){tge.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}x_.sanitizeAttributes=tnt;function nge(e){return typeof e=="string"&&e!==""}x_.isAttributeKey=nge;function rge(e){return e==null?!0:Array.isArray(e)?nnt(e):oge(typeof e)}x_.isAttributeValue=rge;function nnt(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(oge(r)){t=r;continue}return!1}return!1}}return!0}function oge(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var eV=P(iU=>{"use strict";m();Object.defineProperty(iU,"__esModule",{value:!0});iU.loggingErrorHandler=void 0;var rnt=(ze(),Le(nt));function ont(){return e=>{rnt.diag.error(int(e))}}iU.loggingErrorHandler=ont;function int(e){return typeof e=="string"?e:JSON.stringify(snt(e))}function snt(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 age=P(kC=>{"use strict";m();Object.defineProperty(kC,"__esModule",{value:!0});kC.globalErrorHandler=kC.setGlobalErrorHandler=void 0;var ant=eV(),sge=(0,ant.loggingErrorHandler)();function unt(e){sge=e}kC.setGlobalErrorHandler=unt;function cnt(e){try{sge(e)}catch{}}kC.globalErrorHandler=cnt});var dge=P(Nm=>{"use strict";m();Object.defineProperty(Nm,"__esModule",{value:!0});Nm.getStringListFromEnv=Nm.getBooleanFromEnv=Nm.getStringFromEnv=Nm.getNumberFromEnv=void 0;var uge=(ze(),Le(nt)),cge=Qe("util");function lnt(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){uge.diag.warn(`Unknown value ${(0,cge.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Nm.getNumberFromEnv=lnt;function lge(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Nm.getStringFromEnv=lge;function dnt(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||uge.diag.warn(`Unknown value ${(0,cge.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Nm.getBooleanFromEnv=dnt;function pnt(e){return lge(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Nm.getStringListFromEnv=pnt});var pge=P(sU=>{"use strict";m();Object.defineProperty(sU,"__esModule",{value:!0});sU._globalThis=void 0;sU._globalThis=globalThis});var fge=P(aU=>{"use strict";m();Object.defineProperty(aU,"__esModule",{value:!0});aU.VERSION=void 0;aU.VERSION="2.8.0"});function Oi(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 tV=w(()=>{m()});var mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,O_e,fnt,nV,mnt,Ant,gnt,hnt,rV,_nt,Ent,ynt,Snt,Tnt,bnt,Int,Cnt,vnt,Rnt,xnt,Dnt,Nnt,Bnt,wnt,Ont,knt,Pnt,oV,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,jnt,znt,Hnt,$nt,qnt,Vnt,iV,Ynt,Knt,sV,aV,Jnt,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,urt,crt,lrt,drt,prt,fB,PC,uV,frt,mrt,lS,Art,grt,hrt,_rt,cV,lV,Ert,dV,yrt,Srt,Trt,brt,Irt,Crt,vrt,Rrt,xrt,Drt,Nrt,Brt,wrt,Ort,krt,Prt,Mrt,Lrt,Urt,Qrt,Frt,Grt,jrt,pV,zrt,Hrt,$rt,qrt,Vrt,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,eot,tot,not,rot,oot,iot,sot,aot,fV,uot,mV,cot,lot,dot,pot,fot,mot,Aot,got,hot,k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe,_ot,Eot,yot,Sot,Tot,bot,Iot,Cot,vot,Rot,xot,Dot,Not,Bot,wot,Oot,kot,Pot,Mot,Lot,Uot,Qot,Fot,Got,jot,zot,Hot,$ot,qot,Vot,Yot,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,rit,oit,iit,sit,ait,uit,cit,lit,dit,REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,LEe,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,bit,UEe,QEe,FEe,GEe,jEe,Iit,Cit,vit,Rit,xit,Dit,zEe,HEe,$Ee,Nit,Bit,wit,Oit,qEe,VEe,YEe,KEe,kit,Pit,Mit,Lit,Uit,JEe,ZEe,WEe,XEe,e0e,t0e,n0e,Qit,Fit,Git,jit,zit,Hit,$it,qit,r0e,o0e,i0e,s0e,a0e,Vit,Yit,Kit,Jit,Zit,Wit,u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e,Xit,est,tst,nst,rst,ost,ist,sst,ast,ust,cst,lst,dst,pst,fst,mst,Ast,gst,hst,_st,Est,yst,D0e,N0e,B0e,w0e,O0e,Sst,Tst,bst,Ist,Cst,vst,k0e,P0e,Rst,xst,Dst,M0e,L0e,Nst,Bst,wst,U0e,Q0e,F0e,G0e,j0e,z0e,H0e,$0e,q0e,V0e,Y0e,K0e,J0e,Z0e,W0e,X0e,eye,Ost,kst,Pst,Mst,Lst,Ust,Qst,Fst,Gst,jst,zst,Hst,$st,qst,Vst,Yst,Kst,Jst,tye,nye,Zst,Wst,Xst,rye=w(()=>{m();tV();mge="aws.lambda.invoked_arn",Age="db.system",gge="db.connection_string",hge="db.user",_ge="db.jdbc.driver_classname",Ege="db.name",yge="db.statement",Sge="db.operation",Tge="db.mssql.instance_name",bge="db.cassandra.keyspace",Ige="db.cassandra.page_size",Cge="db.cassandra.consistency_level",vge="db.cassandra.table",Rge="db.cassandra.idempotence",xge="db.cassandra.speculative_execution_count",Dge="db.cassandra.coordinator.id",Nge="db.cassandra.coordinator.dc",Bge="db.hbase.namespace",wge="db.redis.database_index",Oge="db.mongodb.collection",kge="db.sql.table",Pge="exception.type",Mge="exception.message",Lge="exception.stacktrace",Uge="exception.escaped",Qge="faas.trigger",Fge="faas.execution",Gge="faas.document.collection",jge="faas.document.operation",zge="faas.document.time",Hge="faas.document.name",$ge="faas.time",qge="faas.cron",Vge="faas.coldstart",Yge="faas.invoked_name",Kge="faas.invoked_provider",Jge="faas.invoked_region",Zge="net.transport",Wge="net.peer.ip",Xge="net.peer.port",ehe="net.peer.name",the="net.host.ip",nhe="net.host.port",rhe="net.host.name",ohe="net.host.connection.type",ihe="net.host.connection.subtype",she="net.host.carrier.name",ahe="net.host.carrier.mcc",uhe="net.host.carrier.mnc",che="net.host.carrier.icc",lhe="peer.service",dhe="enduser.id",phe="enduser.role",fhe="enduser.scope",mhe="thread.id",Ahe="thread.name",ghe="code.function",hhe="code.namespace",_he="code.filepath",Ehe="code.lineno",yhe="http.method",She="http.url",The="http.target",bhe="http.host",Ihe="http.scheme",Che="http.status_code",vhe="http.flavor",Rhe="http.user_agent",xhe="http.request_content_length",Dhe="http.request_content_length_uncompressed",Nhe="http.response_content_length",Bhe="http.response_content_length_uncompressed",whe="http.server_name",Ohe="http.route",khe="http.client_ip",Phe="aws.dynamodb.table_names",Mhe="aws.dynamodb.consumed_capacity",Lhe="aws.dynamodb.item_collection_metrics",Uhe="aws.dynamodb.provisioned_read_capacity",Qhe="aws.dynamodb.provisioned_write_capacity",Fhe="aws.dynamodb.consistent_read",Ghe="aws.dynamodb.projection",jhe="aws.dynamodb.limit",zhe="aws.dynamodb.attributes_to_get",Hhe="aws.dynamodb.index_name",$he="aws.dynamodb.select",qhe="aws.dynamodb.global_secondary_indexes",Vhe="aws.dynamodb.local_secondary_indexes",Yhe="aws.dynamodb.exclusive_start_table",Khe="aws.dynamodb.table_count",Jhe="aws.dynamodb.scan_forward",Zhe="aws.dynamodb.segment",Whe="aws.dynamodb.total_segments",Xhe="aws.dynamodb.count",e_e="aws.dynamodb.scanned_count",t_e="aws.dynamodb.attribute_definitions",n_e="aws.dynamodb.global_secondary_index_updates",r_e="messaging.system",o_e="messaging.destination",i_e="messaging.destination_kind",s_e="messaging.temp_destination",a_e="messaging.protocol",u_e="messaging.protocol_version",c_e="messaging.url",l_e="messaging.message_id",d_e="messaging.conversation_id",p_e="messaging.message_payload_size_bytes",f_e="messaging.message_payload_compressed_size_bytes",m_e="messaging.operation",A_e="messaging.consumer_id",g_e="messaging.rabbitmq.routing_key",h_e="messaging.kafka.message_key",__e="messaging.kafka.consumer_group",E_e="messaging.kafka.client_id",y_e="messaging.kafka.partition",S_e="messaging.kafka.tombstone",T_e="rpc.system",b_e="rpc.service",I_e="rpc.method",C_e="rpc.grpc.status_code",v_e="rpc.jsonrpc.version",R_e="rpc.jsonrpc.request_id",x_e="rpc.jsonrpc.error_code",D_e="rpc.jsonrpc.error_message",N_e="message.type",B_e="message.id",w_e="message.compressed_size",O_e="message.uncompressed_size",fnt=mge,nV=Age,mnt=gge,Ant=hge,gnt=_ge,hnt=Ege,rV=yge,_nt=Sge,Ent=Tge,ynt=bge,Snt=Ige,Tnt=Cge,bnt=vge,Int=Rge,Cnt=xge,vnt=Dge,Rnt=Nge,xnt=Bge,Dnt=wge,Nnt=Oge,Bnt=kge,wnt=Pge,Ont=Mge,knt=Lge,Pnt=Uge,oV=Qge,Mnt=Fge,Lnt=Gge,Unt=jge,Qnt=zge,Fnt=Hge,Gnt=$ge,jnt=qge,znt=Vge,Hnt=Yge,$nt=Kge,qnt=Jge,Vnt=Zge,iV=Wge,Ynt=Xge,Knt=ehe,sV=the,aV=nhe,Jnt=rhe,Znt=ohe,Wnt=ihe,Xnt=she,ert=ahe,trt=uhe,nrt=che,rrt=lhe,ort=dhe,irt=phe,srt=fhe,art=mhe,urt=Ahe,crt=ghe,lrt=hhe,drt=_he,prt=Ehe,fB=yhe,PC=She,uV=The,frt=bhe,mrt=Ihe,lS=Che,Art=vhe,grt=Rhe,hrt=xhe,_rt=Dhe,cV=Nhe,lV=Bhe,Ert=whe,dV=Ohe,yrt=khe,Srt=Phe,Trt=Mhe,brt=Lhe,Irt=Uhe,Crt=Qhe,vrt=Fhe,Rrt=Ghe,xrt=jhe,Drt=zhe,Nrt=Hhe,Brt=$he,wrt=qhe,Ort=Vhe,krt=Yhe,Prt=Khe,Mrt=Jhe,Lrt=Zhe,Urt=Whe,Qrt=Xhe,Frt=e_e,Grt=t_e,jrt=n_e,pV=r_e,zrt=o_e,Hrt=i_e,$rt=s_e,qrt=a_e,Vrt=u_e,Yrt=c_e,Krt=l_e,Jrt=d_e,Zrt=p_e,Wrt=f_e,Xrt=m_e,eot=A_e,tot=g_e,not=h_e,rot=__e,oot=E_e,iot=y_e,sot=S_e,aot=T_e,fV=b_e,uot=I_e,mV=C_e,cot=v_e,lot=R_e,dot=x_e,pot=D_e,fot=N_e,mot=B_e,Aot=w_e,got=O_e,hot=Oi([mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,bge,Ige,Cge,vge,Rge,xge,Dge,Nge,Bge,wge,Oge,kge,Pge,Mge,Lge,Uge,Qge,Fge,Gge,jge,zge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,she,ahe,uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,bhe,Ihe,Che,vhe,Rhe,xhe,Dhe,Nhe,Bhe,whe,Ohe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,jhe,zhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,b_e,I_e,C_e,v_e,R_e,x_e,D_e,N_e,B_e,w_e,O_e]),k_e="other_sql",P_e="mssql",M_e="mysql",L_e="oracle",U_e="db2",Q_e="postgresql",F_e="redshift",G_e="hive",j_e="cloudscape",z_e="hsqldb",H_e="progress",$_e="maxdb",q_e="hanadb",V_e="ingres",Y_e="firstsql",K_e="edb",J_e="cache",Z_e="adabas",W_e="firebird",X_e="derby",eEe="filemaker",tEe="informix",nEe="instantdb",rEe="interbase",oEe="mariadb",iEe="netezza",sEe="pervasive",aEe="pointbase",uEe="sqlite",cEe="sybase",lEe="teradata",dEe="vertica",pEe="h2",fEe="coldfusion",mEe="cassandra",AEe="hbase",gEe="mongodb",hEe="redis",_Ee="couchbase",EEe="couchdb",yEe="cosmosdb",SEe="dynamodb",TEe="neo4j",bEe="geode",IEe="elasticsearch",CEe="memcached",vEe="cockroachdb",_ot=k_e,Eot=P_e,yot=M_e,Sot=L_e,Tot=U_e,bot=Q_e,Iot=F_e,Cot=G_e,vot=j_e,Rot=z_e,xot=H_e,Dot=$_e,Not=q_e,Bot=V_e,wot=Y_e,Oot=K_e,kot=J_e,Pot=Z_e,Mot=W_e,Lot=X_e,Uot=eEe,Qot=tEe,Fot=nEe,Got=rEe,jot=oEe,zot=iEe,Hot=sEe,$ot=aEe,qot=uEe,Vot=cEe,Yot=lEe,Kot=dEe,Jot=pEe,Zot=fEe,Wot=mEe,Xot=AEe,eit=gEe,tit=hEe,nit=_Ee,rit=EEe,oit=yEe,iit=SEe,sit=TEe,ait=bEe,uit=IEe,cit=CEe,lit=vEe,dit=Oi([k_e,P_e,M_e,L_e,U_e,Q_e,F_e,G_e,j_e,z_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,nEe,rEe,oEe,iEe,sEe,aEe,uEe,cEe,lEe,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,bEe,IEe,CEe,vEe]),REe="all",xEe="each_quorum",DEe="quorum",NEe="local_quorum",BEe="one",wEe="two",OEe="three",kEe="local_one",PEe="any",MEe="serial",LEe="local_serial",pit=REe,fit=xEe,mit=DEe,Ait=NEe,git=BEe,hit=wEe,_it=OEe,Eit=kEe,yit=PEe,Sit=MEe,Tit=LEe,bit=Oi([REe,xEe,DEe,NEe,BEe,wEe,OEe,kEe,PEe,MEe,LEe]),UEe="datasource",QEe="http",FEe="pubsub",GEe="timer",jEe="other",Iit=UEe,Cit=QEe,vit=FEe,Rit=GEe,xit=jEe,Dit=Oi([UEe,QEe,FEe,GEe,jEe]),zEe="insert",HEe="edit",$Ee="delete",Nit=zEe,Bit=HEe,wit=$Ee,Oit=Oi([zEe,HEe,$Ee]),qEe="alibaba_cloud",VEe="aws",YEe="azure",KEe="gcp",kit=qEe,Pit=VEe,Mit=YEe,Lit=KEe,Uit=Oi([qEe,VEe,YEe,KEe]),JEe="ip_tcp",ZEe="ip_udp",WEe="ip",XEe="unix",e0e="pipe",t0e="inproc",n0e="other",Qit=JEe,Fit=ZEe,Git=WEe,jit=XEe,zit=e0e,Hit=t0e,$it=n0e,qit=Oi([JEe,ZEe,WEe,XEe,e0e,t0e,n0e]),r0e="wifi",o0e="wired",i0e="cell",s0e="unavailable",a0e="unknown",Vit=r0e,Yit=o0e,Kit=i0e,Jit=s0e,Zit=a0e,Wit=Oi([r0e,o0e,i0e,s0e,a0e]),u0e="gprs",c0e="edge",l0e="umts",d0e="cdma",p0e="evdo_0",f0e="evdo_a",m0e="cdma2000_1xrtt",A0e="hsdpa",g0e="hsupa",h0e="hspa",_0e="iden",E0e="evdo_b",y0e="lte",S0e="ehrpd",T0e="hspap",b0e="gsm",I0e="td_scdma",C0e="iwlan",v0e="nr",R0e="nrnsa",x0e="lte_ca",Xit=u0e,est=c0e,tst=l0e,nst=d0e,rst=p0e,ost=f0e,ist=m0e,sst=A0e,ast=g0e,ust=h0e,cst=_0e,lst=E0e,dst=y0e,pst=S0e,fst=T0e,mst=b0e,Ast=I0e,gst=C0e,hst=v0e,_st=R0e,Est=x0e,yst=Oi([u0e,c0e,l0e,d0e,p0e,f0e,m0e,A0e,g0e,h0e,_0e,E0e,y0e,S0e,T0e,b0e,I0e,C0e,v0e,R0e,x0e]),D0e="1.0",N0e="1.1",B0e="2.0",w0e="SPDY",O0e="QUIC",Sst=D0e,Tst=N0e,bst=B0e,Ist=w0e,Cst=O0e,vst={HTTP_1_0:D0e,HTTP_1_1:N0e,HTTP_2_0:B0e,SPDY:w0e,QUIC:O0e},k0e="queue",P0e="topic",Rst=k0e,xst=P0e,Dst=Oi([k0e,P0e]),M0e="receive",L0e="process",Nst=M0e,Bst=L0e,wst=Oi([M0e,L0e]),U0e=0,Q0e=1,F0e=2,G0e=3,j0e=4,z0e=5,H0e=6,$0e=7,q0e=8,V0e=9,Y0e=10,K0e=11,J0e=12,Z0e=13,W0e=14,X0e=15,eye=16,Ost=U0e,kst=Q0e,Pst=F0e,Mst=G0e,Lst=j0e,Ust=z0e,Qst=H0e,Fst=$0e,Gst=q0e,jst=V0e,zst=Y0e,Hst=K0e,$st=J0e,qst=Z0e,Vst=W0e,Yst=X0e,Kst=eye,Jst={OK:U0e,CANCELLED:Q0e,UNKNOWN:F0e,INVALID_ARGUMENT:G0e,DEADLINE_EXCEEDED:j0e,NOT_FOUND:z0e,ALREADY_EXISTS:H0e,PERMISSION_DENIED:$0e,RESOURCE_EXHAUSTED:q0e,FAILED_PRECONDITION:V0e,ABORTED:Y0e,OUT_OF_RANGE:K0e,UNIMPLEMENTED:J0e,INTERNAL:Z0e,UNAVAILABLE:W0e,DATA_LOSS:X0e,UNAUTHENTICATED:eye},tye="SENT",nye="RECEIVED",Zst=tye,Wst=nye,Xst=Oi([tye,nye])});var oye=w(()=>{m();rye()});var iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,BSe,eat,tat,nat,rat,oat,iat,sat,aat,uat,cat,lat,dat,pat,fat,mat,Aat,gat,hat,_at,Eat,yat,Sat,Tat,bat,Iat,Cat,vat,Rat,xat,Dat,Nat,Bat,wat,Oat,kat,Pat,Mat,Lat,Uat,Qat,Fat,Gat,jat,zat,Hat,$at,qat,Vat,Yat,Kat,Jat,Zat,Wat,Xat,eut,tut,nut,rut,out,iut,sut,aut,uut,cut,lut,dut,put,fut,mut,Aut,gut,AV,hut,_ut,Eut,yut,Sut,Tut,but,Iut,Cut,vut,wSe,OSe,kSe,PSe,Rut,xut,Dut,Nut,But,MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe,wut,Out,kut,Put,Mut,Lut,Uut,Qut,Fut,Gut,jut,zut,Hut,$ut,qut,Vut,Yut,Kut,XSe,eTe,Jut,Zut,Wut,tTe,nTe,rTe,oTe,iTe,sTe,aTe,Xut,ect,tct,nct,rct,oct,ict,sct,uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te,act,uct,cct,lct,dct,pct,fct,mct,Act,gct,hct,_ct,ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe,Ect,yct,Sct,Tct,bct,Ict,Cct,vct,Rct,xct,Dct,DTe=w(()=>{m();tV();iye="cloud.provider",sye="cloud.account.id",aye="cloud.region",uye="cloud.availability_zone",cye="cloud.platform",lye="aws.ecs.container.arn",dye="aws.ecs.cluster.arn",pye="aws.ecs.launchtype",fye="aws.ecs.task.arn",mye="aws.ecs.task.family",Aye="aws.ecs.task.revision",gye="aws.eks.cluster.arn",hye="aws.log.group.names",_ye="aws.log.group.arns",Eye="aws.log.stream.names",yye="aws.log.stream.arns",Sye="container.name",Tye="container.id",bye="container.runtime",Iye="container.image.name",Cye="container.image.tag",vye="deployment.environment",Rye="device.id",xye="device.model.identifier",Dye="device.model.name",Nye="faas.name",Bye="faas.id",wye="faas.version",Oye="faas.instance",kye="faas.max_memory",Pye="host.id",Mye="host.name",Lye="host.type",Uye="host.arch",Qye="host.image.name",Fye="host.image.id",Gye="host.image.version",jye="k8s.cluster.name",zye="k8s.node.name",Hye="k8s.node.uid",$ye="k8s.namespace.name",qye="k8s.pod.uid",Vye="k8s.pod.name",Yye="k8s.container.name",Kye="k8s.replicaset.uid",Jye="k8s.replicaset.name",Zye="k8s.deployment.uid",Wye="k8s.deployment.name",Xye="k8s.statefulset.uid",eSe="k8s.statefulset.name",tSe="k8s.daemonset.uid",nSe="k8s.daemonset.name",rSe="k8s.job.uid",oSe="k8s.job.name",iSe="k8s.cronjob.uid",sSe="k8s.cronjob.name",aSe="os.type",uSe="os.description",cSe="os.name",lSe="os.version",dSe="process.pid",pSe="process.executable.name",fSe="process.executable.path",mSe="process.command",ASe="process.command_line",gSe="process.command_args",hSe="process.owner",_Se="process.runtime.name",ESe="process.runtime.version",ySe="process.runtime.description",SSe="service.name",TSe="service.namespace",bSe="service.instance.id",ISe="service.version",CSe="telemetry.sdk.name",vSe="telemetry.sdk.language",RSe="telemetry.sdk.version",xSe="telemetry.auto.version",DSe="webengine.name",NSe="webengine.version",BSe="webengine.description",eat=iye,tat=sye,nat=aye,rat=uye,oat=cye,iat=lye,sat=dye,aat=pye,uat=fye,cat=mye,lat=Aye,dat=gye,pat=hye,fat=_ye,mat=Eye,Aat=yye,gat=Sye,hat=Tye,_at=bye,Eat=Iye,yat=Cye,Sat=vye,Tat=Rye,bat=xye,Iat=Dye,Cat=Nye,vat=Bye,Rat=wye,xat=Oye,Dat=kye,Nat=Pye,Bat=Mye,wat=Lye,Oat=Uye,kat=Qye,Pat=Fye,Mat=Gye,Lat=jye,Uat=zye,Qat=Hye,Fat=$ye,Gat=qye,jat=Vye,zat=Yye,Hat=Kye,$at=Jye,qat=Zye,Vat=Wye,Yat=Xye,Kat=eSe,Jat=tSe,Zat=nSe,Wat=rSe,Xat=oSe,eut=iSe,tut=sSe,nut=aSe,rut=uSe,out=cSe,iut=lSe,sut=dSe,aut=pSe,uut=fSe,cut=mSe,lut=ASe,dut=gSe,put=hSe,fut=_Se,mut=ESe,Aut=ySe,gut=SSe,AV=TSe,hut=bSe,_ut=ISe,Eut=CSe,yut=vSe,Sut=RSe,Tut=xSe,but=DSe,Iut=NSe,Cut=BSe,vut=Oi([iye,sye,aye,uye,cye,lye,dye,pye,fye,mye,Aye,gye,hye,_ye,Eye,yye,Sye,Tye,bye,Iye,Cye,vye,Rye,xye,Dye,Nye,Bye,wye,Oye,kye,Pye,Mye,Lye,Uye,Qye,Fye,Gye,jye,zye,Hye,$ye,qye,Vye,Yye,Kye,Jye,Zye,Wye,Xye,eSe,tSe,nSe,rSe,oSe,iSe,sSe,aSe,uSe,cSe,lSe,dSe,pSe,fSe,mSe,ASe,gSe,hSe,_Se,ESe,ySe,SSe,TSe,bSe,ISe,CSe,vSe,RSe,xSe,DSe,NSe,BSe]),wSe="alibaba_cloud",OSe="aws",kSe="azure",PSe="gcp",Rut=wSe,xut=OSe,Dut=kSe,Nut=PSe,But=Oi([wSe,OSe,kSe,PSe]),MSe="alibaba_cloud_ecs",LSe="alibaba_cloud_fc",USe="aws_ec2",QSe="aws_ecs",FSe="aws_eks",GSe="aws_lambda",jSe="aws_elastic_beanstalk",zSe="azure_vm",HSe="azure_container_instances",$Se="azure_aks",qSe="azure_functions",VSe="azure_app_service",YSe="gcp_compute_engine",KSe="gcp_cloud_run",JSe="gcp_kubernetes_engine",ZSe="gcp_cloud_functions",WSe="gcp_app_engine",wut=MSe,Out=LSe,kut=USe,Put=QSe,Mut=FSe,Lut=GSe,Uut=jSe,Qut=zSe,Fut=HSe,Gut=$Se,jut=qSe,zut=VSe,Hut=YSe,$ut=KSe,qut=JSe,Vut=ZSe,Yut=WSe,Kut=Oi([MSe,LSe,USe,QSe,FSe,GSe,jSe,zSe,HSe,$Se,qSe,VSe,YSe,KSe,JSe,ZSe,WSe]),XSe="ec2",eTe="fargate",Jut=XSe,Zut=eTe,Wut=Oi([XSe,eTe]),tTe="amd64",nTe="arm32",rTe="arm64",oTe="ia64",iTe="ppc32",sTe="ppc64",aTe="x86",Xut=tTe,ect=nTe,tct=rTe,nct=oTe,rct=iTe,oct=sTe,ict=aTe,sct=Oi([tTe,nTe,rTe,oTe,iTe,sTe,aTe]),uTe="windows",cTe="linux",lTe="darwin",dTe="freebsd",pTe="netbsd",fTe="openbsd",mTe="dragonflybsd",ATe="hpux",gTe="aix",hTe="solaris",_Te="z_os",act=uTe,uct=cTe,cct=lTe,lct=dTe,dct=pTe,pct=fTe,fct=mTe,mct=ATe,Act=gTe,gct=hTe,hct=_Te,_ct=Oi([uTe,cTe,lTe,dTe,pTe,fTe,mTe,ATe,gTe,hTe,_Te]),ETe="cpp",yTe="dotnet",STe="erlang",TTe="go",bTe="java",ITe="nodejs",CTe="php",vTe="python",RTe="ruby",xTe="webjs",Ect=ETe,yct=yTe,Sct=STe,Tct=TTe,bct=bTe,Ict=ITe,Cct=CTe,vct=vTe,Rct=RTe,xct=xTe,Dct=Oi([ETe,yTe,STe,TTe,bTe,ITe,CTe,vTe,RTe,xTe])});var NTe=w(()=>{m();DTe()});var Nct,Bct,wct,Oct,kct,Pct,Mct,Lct,Uct,Qct,Fct,Gct,jct,zct,Hct,$ct,qct,Vct,Yct,Kct,Jct,Zct,Wct,Xct,elt,gV,hV,tlt,MC,nlt,_V,EV,rlt,dS,olt,ilt,slt,alt,ult,clt,llt,dlt,Qin,Fin,yV,plt,flt,mlt,Alt,glt,hlt,pS,_lt,Elt,ylt,Gin,Slt,Tlt,blt,Ilt,jin,Clt,vlt,Rlt,xlt,vg,Rg,Dlt,Nlt,Blt,wlt,Olt,klt,Plt,Mlt,Llt,zin,Ult,Qlt,Flt,Glt,jlt,zlt,SV,TV,Hlt,bV,IV,$lt,qlt,Hin,$in,Vlt,Ylt,Klt,Jlt,Zlt,Wlt,Xlt,edt,qin,tdt,CV,vV,ndt,RV,rdt,xV,odt,idt,sdt,adt,udt,cdt,ldt,ddt,pdt,Vin,fdt,mdt,Yin,Adt,gdt,Kin,hdt,_dt,Edt,ydt,Sdt,Tdt,bdt,Idt,D_,Cdt,vdt,Rdt,DV,BTe=w(()=>{m();Nct="aspnetcore.diagnostics.exception.result",Bct="aborted",wct="handled",Oct="skipped",kct="unhandled",Pct="aspnetcore.diagnostics.handler.type",Mct="aspnetcore.rate_limiting.policy",Lct="aspnetcore.rate_limiting.result",Uct="acquired",Qct="endpoint_limiter",Fct="global_limiter",Gct="request_canceled",jct="aspnetcore.request.is_unhandled",zct="aspnetcore.routing.is_fallback",Hct="aspnetcore.routing.match_status",$ct="failure",qct="success",Vct="aspnetcore.user.is_authenticated",Yct="client.address",Kct="client.port",Jct="code.column.number",Zct="code.file.path",Wct="code.function.name",Xct="code.line.number",elt="code.stacktrace",gV="db.collection.name",hV="db.namespace",tlt="db.operation.batch.size",MC="db.operation.name",nlt="db.query.summary",_V="db.query.text",EV="db.response.status_code",rlt="db.stored_procedure.name",dS="db.system.name",olt="mariadb",ilt="microsoft.sql_server",slt="mysql",alt="postgresql",ult="dotnet.gc.heap.generation",clt="gen0",llt="gen1",dlt="gen2",Qin="loh",Fin="poh",yV="error.type",plt="_OTHER",flt="exception.escaped",mlt="exception.message",Alt="exception.stacktrace",glt="exception.type",hlt=e=>`http.request.header.${e}`,pS="http.request.method",_lt="_OTHER",Elt="CONNECT",ylt="DELETE",Gin="GET",Slt="HEAD",Tlt="OPTIONS",blt="PATCH",Ilt="POST",jin="PUT",Clt="TRACE",vlt="http.request.method_original",Rlt="http.request.resend_count",xlt=e=>`http.response.header.${e}`,vg="http.response.status_code",Rg="http.route",Dlt="jvm.gc.action",Nlt="jvm.gc.name",Blt="jvm.memory.pool.name",wlt="jvm.memory.type",Olt="heap",klt="non_heap",Plt="jvm.thread.daemon",Mlt="jvm.thread.state",Llt="blocked",zin="new",Ult="runnable",Qlt="terminated",Flt="timed_waiting",Glt="waiting",jlt="network.local.address",zlt="network.local.port",SV="network.peer.address",TV="network.peer.port",Hlt="network.protocol.name",bV="network.protocol.version",IV="network.transport",$lt="pipe",qlt="quic",Hin="tcp",$in="udp",Vlt="unix",Ylt="network.type",Klt="ipv4",Jlt="ipv6",Zlt="otel.scope.name",Wlt="otel.scope.version",Xlt="otel.status_code",edt="ERROR",qin="OK",tdt="otel.status_description",CV="server.address",vV="server.port",ndt="service.instance.id",RV="service.name",rdt="service.namespace",xV="service.version",odt="signalr.connection.status",idt="app_shutdown",sdt="normal_closure",adt="timeout",udt="signalr.transport",cdt="long_polling",ldt="server_sent_events",ddt="web_sockets",pdt="telemetry.sdk.language",Vin="cpp",fdt="dotnet",mdt="erlang",Yin="go",Adt="java",gdt="nodejs",Kin="php",hdt="python",_dt="ruby",Edt="rust",ydt="swift",Sdt="webjs",Tdt="telemetry.sdk.name",bdt="telemetry.sdk.version",Idt="url.fragment",D_="url.full",Cdt="url.path",vdt="url.query",Rdt="url.scheme",DV="user_agent.original"});var xdt,Ddt,Ndt,Bdt,wdt,Odt,kdt,Pdt,Mdt,Ldt,Udt,Qdt,Fdt,Gdt,jdt,zdt,Hdt,$dt,qdt,Vdt,Ydt,Kdt,Jdt,Zdt,Wdt,Xdt,ept,tpt,npt,rpt,opt,ipt,spt,apt,upt,cpt,lpt,dpt,ppt,fpt,mpt,Apt,gpt,hpt,_pt,Ept,ypt,Spt,Tpt,bpt,Ipt,wTe=w(()=>{m();xdt="aspnetcore.diagnostics.exceptions",Ddt="aspnetcore.rate_limiting.active_request_leases",Ndt="aspnetcore.rate_limiting.queued_requests",Bdt="aspnetcore.rate_limiting.request.time_in_queue",wdt="aspnetcore.rate_limiting.request_lease.duration",Odt="aspnetcore.rate_limiting.requests",kdt="aspnetcore.routing.match_attempts",Pdt="db.client.operation.duration",Mdt="dotnet.assembly.count",Ldt="dotnet.exceptions",Udt="dotnet.gc.collections",Qdt="dotnet.gc.heap.total_allocated",Fdt="dotnet.gc.last_collection.heap.fragmentation.size",Gdt="dotnet.gc.last_collection.heap.size",jdt="dotnet.gc.last_collection.memory.committed_size",zdt="dotnet.gc.pause.time",Hdt="dotnet.jit.compilation.time",$dt="dotnet.jit.compiled_il.size",qdt="dotnet.jit.compiled_methods",Vdt="dotnet.monitor.lock_contentions",Ydt="dotnet.process.cpu.count",Kdt="dotnet.process.cpu.time",Jdt="dotnet.process.memory.working_set",Zdt="dotnet.thread_pool.queue.length",Wdt="dotnet.thread_pool.thread.count",Xdt="dotnet.thread_pool.work_item.count",ept="dotnet.timer.count",tpt="http.client.request.duration",npt="http.server.request.duration",rpt="jvm.class.count",opt="jvm.class.loaded",ipt="jvm.class.unloaded",spt="jvm.cpu.count",apt="jvm.cpu.recent_utilization",upt="jvm.cpu.time",cpt="jvm.gc.duration",lpt="jvm.memory.committed",dpt="jvm.memory.limit",ppt="jvm.memory.used",fpt="jvm.memory.used_after_last_gc",mpt="jvm.thread.count",Apt="kestrel.active_connections",gpt="kestrel.active_tls_handshakes",hpt="kestrel.connection.duration",_pt="kestrel.queued_connections",Ept="kestrel.queued_requests",ypt="kestrel.rejected_connections",Spt="kestrel.tls_handshake.duration",Tpt="kestrel.upgraded_connections",bpt="signalr.server.active_connections",Ipt="signalr.server.connection.duration"});var Cpt,OTe=w(()=>{m();Cpt="exception"});var jr={};Js(jr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>Bct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>wct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Oct,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>kct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>Uct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Qct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Fct,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Gct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>$ct,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>qct,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>Nct,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>Pct,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>Mct,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Lct,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>jct,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>zct,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Hct,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Vct,ATTR_CLIENT_ADDRESS:()=>Yct,ATTR_CLIENT_PORT:()=>Kct,ATTR_CODE_COLUMN_NUMBER:()=>Jct,ATTR_CODE_FILE_PATH:()=>Zct,ATTR_CODE_FUNCTION_NAME:()=>Wct,ATTR_CODE_LINE_NUMBER:()=>Xct,ATTR_CODE_STACKTRACE:()=>elt,ATTR_DB_COLLECTION_NAME:()=>gV,ATTR_DB_NAMESPACE:()=>hV,ATTR_DB_OPERATION_BATCH_SIZE:()=>tlt,ATTR_DB_OPERATION_NAME:()=>MC,ATTR_DB_QUERY_SUMMARY:()=>nlt,ATTR_DB_QUERY_TEXT:()=>_V,ATTR_DB_RESPONSE_STATUS_CODE:()=>EV,ATTR_DB_STORED_PROCEDURE_NAME:()=>rlt,ATTR_DB_SYSTEM_NAME:()=>dS,ATTR_DOTNET_GC_HEAP_GENERATION:()=>ult,ATTR_ERROR_TYPE:()=>yV,ATTR_EXCEPTION_ESCAPED:()=>flt,ATTR_EXCEPTION_MESSAGE:()=>mlt,ATTR_EXCEPTION_STACKTRACE:()=>Alt,ATTR_EXCEPTION_TYPE:()=>glt,ATTR_HTTP_REQUEST_HEADER:()=>hlt,ATTR_HTTP_REQUEST_METHOD:()=>pS,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>vlt,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>Rlt,ATTR_HTTP_RESPONSE_HEADER:()=>xlt,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>vg,ATTR_HTTP_ROUTE:()=>Rg,ATTR_JVM_GC_ACTION:()=>Dlt,ATTR_JVM_GC_NAME:()=>Nlt,ATTR_JVM_MEMORY_POOL_NAME:()=>Blt,ATTR_JVM_MEMORY_TYPE:()=>wlt,ATTR_JVM_THREAD_DAEMON:()=>Plt,ATTR_JVM_THREAD_STATE:()=>Mlt,ATTR_NETWORK_LOCAL_ADDRESS:()=>jlt,ATTR_NETWORK_LOCAL_PORT:()=>zlt,ATTR_NETWORK_PEER_ADDRESS:()=>SV,ATTR_NETWORK_PEER_PORT:()=>TV,ATTR_NETWORK_PROTOCOL_NAME:()=>Hlt,ATTR_NETWORK_PROTOCOL_VERSION:()=>bV,ATTR_NETWORK_TRANSPORT:()=>IV,ATTR_NETWORK_TYPE:()=>Ylt,ATTR_OTEL_SCOPE_NAME:()=>Zlt,ATTR_OTEL_SCOPE_VERSION:()=>Wlt,ATTR_OTEL_STATUS_CODE:()=>Xlt,ATTR_OTEL_STATUS_DESCRIPTION:()=>tdt,ATTR_SERVER_ADDRESS:()=>CV,ATTR_SERVER_PORT:()=>vV,ATTR_SERVICE_INSTANCE_ID:()=>ndt,ATTR_SERVICE_NAME:()=>RV,ATTR_SERVICE_NAMESPACE:()=>rdt,ATTR_SERVICE_VERSION:()=>xV,ATTR_SIGNALR_CONNECTION_STATUS:()=>odt,ATTR_SIGNALR_TRANSPORT:()=>udt,ATTR_TELEMETRY_SDK_LANGUAGE:()=>pdt,ATTR_TELEMETRY_SDK_NAME:()=>Tdt,ATTR_TELEMETRY_SDK_VERSION:()=>bdt,ATTR_URL_FRAGMENT:()=>Idt,ATTR_URL_FULL:()=>D_,ATTR_URL_PATH:()=>Cdt,ATTR_URL_QUERY:()=>vdt,ATTR_URL_SCHEME:()=>Rdt,ATTR_USER_AGENT_ORIGINAL:()=>DV,AWSECSLAUNCHTYPEVALUES_EC2:()=>Jut,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Zut,AwsEcsLaunchtypeValues:()=>Wut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>wut,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Out,CLOUDPLATFORMVALUES_AWS_EC2:()=>kut,CLOUDPLATFORMVALUES_AWS_ECS:()=>Put,CLOUDPLATFORMVALUES_AWS_EKS:()=>Mut,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>Uut,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Lut,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Gut,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>zut,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Fut,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>jut,CLOUDPLATFORMVALUES_AZURE_VM:()=>Qut,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Yut,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Vut,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>$ut,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Hut,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>qut,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>Rut,CLOUDPROVIDERVALUES_AWS:()=>xut,CLOUDPROVIDERVALUES_AZURE:()=>Dut,CLOUDPROVIDERVALUES_GCP:()=>Nut,CloudPlatformValues:()=>Kut,CloudProviderValues:()=>But,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>pit,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>yit,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>fit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Eit,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>Ait,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Tit,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>git,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>mit,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Sit,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>_it,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>hit,DBSYSTEMVALUES_ADABAS:()=>Pot,DBSYSTEMVALUES_CACHE:()=>kot,DBSYSTEMVALUES_CASSANDRA:()=>Wot,DBSYSTEMVALUES_CLOUDSCAPE:()=>vot,DBSYSTEMVALUES_COCKROACHDB:()=>lit,DBSYSTEMVALUES_COLDFUSION:()=>Zot,DBSYSTEMVALUES_COSMOSDB:()=>oit,DBSYSTEMVALUES_COUCHBASE:()=>nit,DBSYSTEMVALUES_COUCHDB:()=>rit,DBSYSTEMVALUES_DB2:()=>Tot,DBSYSTEMVALUES_DERBY:()=>Lot,DBSYSTEMVALUES_DYNAMODB:()=>iit,DBSYSTEMVALUES_EDB:()=>Oot,DBSYSTEMVALUES_ELASTICSEARCH:()=>uit,DBSYSTEMVALUES_FILEMAKER:()=>Uot,DBSYSTEMVALUES_FIREBIRD:()=>Mot,DBSYSTEMVALUES_FIRSTSQL:()=>wot,DBSYSTEMVALUES_GEODE:()=>ait,DBSYSTEMVALUES_H2:()=>Jot,DBSYSTEMVALUES_HANADB:()=>Not,DBSYSTEMVALUES_HBASE:()=>Xot,DBSYSTEMVALUES_HIVE:()=>Cot,DBSYSTEMVALUES_HSQLDB:()=>Rot,DBSYSTEMVALUES_INFORMIX:()=>Qot,DBSYSTEMVALUES_INGRES:()=>Bot,DBSYSTEMVALUES_INSTANTDB:()=>Fot,DBSYSTEMVALUES_INTERBASE:()=>Got,DBSYSTEMVALUES_MARIADB:()=>jot,DBSYSTEMVALUES_MAXDB:()=>Dot,DBSYSTEMVALUES_MEMCACHED:()=>cit,DBSYSTEMVALUES_MONGODB:()=>eit,DBSYSTEMVALUES_MSSQL:()=>Eot,DBSYSTEMVALUES_MYSQL:()=>yot,DBSYSTEMVALUES_NEO4J:()=>sit,DBSYSTEMVALUES_NETEZZA:()=>zot,DBSYSTEMVALUES_ORACLE:()=>Sot,DBSYSTEMVALUES_OTHER_SQL:()=>_ot,DBSYSTEMVALUES_PERVASIVE:()=>Hot,DBSYSTEMVALUES_POINTBASE:()=>$ot,DBSYSTEMVALUES_POSTGRESQL:()=>bot,DBSYSTEMVALUES_PROGRESS:()=>xot,DBSYSTEMVALUES_REDIS:()=>tit,DBSYSTEMVALUES_REDSHIFT:()=>Iot,DBSYSTEMVALUES_SQLITE:()=>qot,DBSYSTEMVALUES_SYBASE:()=>Vot,DBSYSTEMVALUES_TERADATA:()=>Yot,DBSYSTEMVALUES_VERTICA:()=>Kot,DB_SYSTEM_NAME_VALUE_MARIADB:()=>olt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>ilt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>slt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>alt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>clt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>llt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>dlt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>Qin,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>Fin,DbCassandraConsistencyLevelValues:()=>bit,DbSystemValues:()=>dit,ERROR_TYPE_VALUE_OTHER:()=>plt,EVENT_EXCEPTION:()=>Cpt,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>wit,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Bit,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Nit,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>kit,FAASINVOKEDPROVIDERVALUES_AWS:()=>Pit,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Mit,FAASINVOKEDPROVIDERVALUES_GCP:()=>Lit,FAASTRIGGERVALUES_DATASOURCE:()=>Iit,FAASTRIGGERVALUES_HTTP:()=>Cit,FAASTRIGGERVALUES_OTHER:()=>xit,FAASTRIGGERVALUES_PUBSUB:()=>vit,FAASTRIGGERVALUES_TIMER:()=>Rit,FaasDocumentOperationValues:()=>Oit,FaasInvokedProviderValues:()=>Uit,FaasTriggerValues:()=>Dit,HOSTARCHVALUES_AMD64:()=>Xut,HOSTARCHVALUES_ARM32:()=>ect,HOSTARCHVALUES_ARM64:()=>tct,HOSTARCHVALUES_IA64:()=>nct,HOSTARCHVALUES_PPC32:()=>rct,HOSTARCHVALUES_PPC64:()=>oct,HOSTARCHVALUES_X86:()=>ict,HTTPFLAVORVALUES_HTTP_1_0:()=>Sst,HTTPFLAVORVALUES_HTTP_1_1:()=>Tst,HTTPFLAVORVALUES_HTTP_2_0:()=>bst,HTTPFLAVORVALUES_QUIC:()=>Cst,HTTPFLAVORVALUES_SPDY:()=>Ist,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Elt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>ylt,HTTP_REQUEST_METHOD_VALUE_GET:()=>Gin,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Slt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>Tlt,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>_lt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>blt,HTTP_REQUEST_METHOD_VALUE_POST:()=>Ilt,HTTP_REQUEST_METHOD_VALUE_PUT:()=>jin,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>Clt,HostArchValues:()=>sct,HttpFlavorValues:()=>vst,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Olt,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>klt,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Llt,JVM_THREAD_STATE_VALUE_NEW:()=>zin,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>Ult,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Qlt,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Flt,JVM_THREAD_STATE_VALUE_WAITING:()=>Glt,MESSAGETYPEVALUES_RECEIVED:()=>Wst,MESSAGETYPEVALUES_SENT:()=>Zst,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>Rst,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>xst,MESSAGINGOPERATIONVALUES_PROCESS:()=>Bst,MESSAGINGOPERATIONVALUES_RECEIVE:()=>Nst,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>xdt,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>Ddt,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>Ndt,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Odt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>wdt,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>Bdt,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>kdt,METRIC_DB_CLIENT_OPERATION_DURATION:()=>Pdt,METRIC_DOTNET_ASSEMBLY_COUNT:()=>Mdt,METRIC_DOTNET_EXCEPTIONS:()=>Ldt,METRIC_DOTNET_GC_COLLECTIONS:()=>Udt,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Qdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Fdt,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Gdt,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>jdt,METRIC_DOTNET_GC_PAUSE_TIME:()=>zdt,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Hdt,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>$dt,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>qdt,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Vdt,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Ydt,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Kdt,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Jdt,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Zdt,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Wdt,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Xdt,METRIC_DOTNET_TIMER_COUNT:()=>ept,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>tpt,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>npt,METRIC_JVM_CLASS_COUNT:()=>rpt,METRIC_JVM_CLASS_LOADED:()=>opt,METRIC_JVM_CLASS_UNLOADED:()=>ipt,METRIC_JVM_CPU_COUNT:()=>spt,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>apt,METRIC_JVM_CPU_TIME:()=>upt,METRIC_JVM_GC_DURATION:()=>cpt,METRIC_JVM_MEMORY_COMMITTED:()=>lpt,METRIC_JVM_MEMORY_LIMIT:()=>dpt,METRIC_JVM_MEMORY_USED:()=>ppt,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>fpt,METRIC_JVM_THREAD_COUNT:()=>mpt,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Apt,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>gpt,METRIC_KESTREL_CONNECTION_DURATION:()=>hpt,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>_pt,METRIC_KESTREL_QUEUED_REQUESTS:()=>Ept,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>ypt,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Spt,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>Tpt,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>bpt,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>Ipt,MessageTypeValues:()=>Xst,MessagingDestinationKindValues:()=>Dst,MessagingOperationValues:()=>wst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>nst,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>ist,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>est,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>pst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>rst,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>ost,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>lst,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>Xit,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>mst,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>sst,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>ust,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>fst,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>ast,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>cst,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>gst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>dst,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>Est,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>hst,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>_st,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>Ast,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>tst,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Kit,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Jit,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Zit,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Vit,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Yit,NETTRANSPORTVALUES_INPROC:()=>Hit,NETTRANSPORTVALUES_IP:()=>Git,NETTRANSPORTVALUES_IP_TCP:()=>Qit,NETTRANSPORTVALUES_IP_UDP:()=>Fit,NETTRANSPORTVALUES_OTHER:()=>$it,NETTRANSPORTVALUES_PIPE:()=>zit,NETTRANSPORTVALUES_UNIX:()=>jit,NETWORK_TRANSPORT_VALUE_PIPE:()=>$lt,NETWORK_TRANSPORT_VALUE_QUIC:()=>qlt,NETWORK_TRANSPORT_VALUE_TCP:()=>Hin,NETWORK_TRANSPORT_VALUE_UDP:()=>$in,NETWORK_TRANSPORT_VALUE_UNIX:()=>Vlt,NETWORK_TYPE_VALUE_IPV4:()=>Klt,NETWORK_TYPE_VALUE_IPV6:()=>Jlt,NetHostConnectionSubtypeValues:()=>yst,NetHostConnectionTypeValues:()=>Wit,NetTransportValues:()=>qit,OSTYPEVALUES_AIX:()=>Act,OSTYPEVALUES_DARWIN:()=>cct,OSTYPEVALUES_DRAGONFLYBSD:()=>fct,OSTYPEVALUES_FREEBSD:()=>lct,OSTYPEVALUES_HPUX:()=>mct,OSTYPEVALUES_LINUX:()=>uct,OSTYPEVALUES_NETBSD:()=>dct,OSTYPEVALUES_OPENBSD:()=>pct,OSTYPEVALUES_SOLARIS:()=>gct,OSTYPEVALUES_WINDOWS:()=>act,OSTYPEVALUES_Z_OS:()=>hct,OTEL_STATUS_CODE_VALUE_ERROR:()=>edt,OTEL_STATUS_CODE_VALUE_OK:()=>qin,OsTypeValues:()=>_ct,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>zst,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>Qst,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>kst,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Yst,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>Lst,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>jst,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>qst,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>Mst,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Ust,RPCGRPCSTATUSCODEVALUES_OK:()=>Ost,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Hst,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Fst,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Gst,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Kst,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Vst,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>$st,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>Pst,RpcGrpcStatusCodeValues:()=>Jst,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>Drt,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>Grt,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>vrt,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>Trt,SEMATTRS_AWS_DYNAMODB_COUNT:()=>Qrt,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>krt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>wrt,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>jrt,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>Nrt,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>brt,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>xrt,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>Ort,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>Rrt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>Irt,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>Crt,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>Frt,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>Mrt,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>Lrt,SEMATTRS_AWS_DYNAMODB_SELECT:()=>Brt,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>Prt,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>Srt,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Urt,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>fnt,SEMATTRS_CODE_FILEPATH:()=>drt,SEMATTRS_CODE_FUNCTION:()=>crt,SEMATTRS_CODE_LINENO:()=>prt,SEMATTRS_CODE_NAMESPACE:()=>lrt,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>Tnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>Rnt,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>vnt,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>Int,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>ynt,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>Snt,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>Cnt,SEMATTRS_DB_CASSANDRA_TABLE:()=>bnt,SEMATTRS_DB_CONNECTION_STRING:()=>mnt,SEMATTRS_DB_HBASE_NAMESPACE:()=>xnt,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>gnt,SEMATTRS_DB_MONGODB_COLLECTION:()=>Nnt,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>Ent,SEMATTRS_DB_NAME:()=>hnt,SEMATTRS_DB_OPERATION:()=>_nt,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>Dnt,SEMATTRS_DB_SQL_TABLE:()=>Bnt,SEMATTRS_DB_STATEMENT:()=>rV,SEMATTRS_DB_SYSTEM:()=>nV,SEMATTRS_DB_USER:()=>Ant,SEMATTRS_ENDUSER_ID:()=>ort,SEMATTRS_ENDUSER_ROLE:()=>irt,SEMATTRS_ENDUSER_SCOPE:()=>srt,SEMATTRS_EXCEPTION_ESCAPED:()=>Pnt,SEMATTRS_EXCEPTION_MESSAGE:()=>Ont,SEMATTRS_EXCEPTION_STACKTRACE:()=>knt,SEMATTRS_EXCEPTION_TYPE:()=>wnt,SEMATTRS_FAAS_COLDSTART:()=>znt,SEMATTRS_FAAS_CRON:()=>jnt,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>Lnt,SEMATTRS_FAAS_DOCUMENT_NAME:()=>Fnt,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Unt,SEMATTRS_FAAS_DOCUMENT_TIME:()=>Qnt,SEMATTRS_FAAS_EXECUTION:()=>Mnt,SEMATTRS_FAAS_INVOKED_NAME:()=>Hnt,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>$nt,SEMATTRS_FAAS_INVOKED_REGION:()=>qnt,SEMATTRS_FAAS_TIME:()=>Gnt,SEMATTRS_FAAS_TRIGGER:()=>oV,SEMATTRS_HTTP_CLIENT_IP:()=>yrt,SEMATTRS_HTTP_FLAVOR:()=>Art,SEMATTRS_HTTP_HOST:()=>frt,SEMATTRS_HTTP_METHOD:()=>fB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>hrt,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>_rt,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>cV,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>lV,SEMATTRS_HTTP_ROUTE:()=>dV,SEMATTRS_HTTP_SCHEME:()=>mrt,SEMATTRS_HTTP_SERVER_NAME:()=>Ert,SEMATTRS_HTTP_STATUS_CODE:()=>lS,SEMATTRS_HTTP_TARGET:()=>uV,SEMATTRS_HTTP_URL:()=>PC,SEMATTRS_HTTP_USER_AGENT:()=>grt,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>Aot,SEMATTRS_MESSAGE_ID:()=>mot,SEMATTRS_MESSAGE_TYPE:()=>fot,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>got,SEMATTRS_MESSAGING_CONSUMER_ID:()=>eot,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Jrt,SEMATTRS_MESSAGING_DESTINATION:()=>zrt,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>Hrt,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>oot,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>rot,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>not,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>iot,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>sot,SEMATTRS_MESSAGING_MESSAGE_ID:()=>Krt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>Wrt,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>Zrt,SEMATTRS_MESSAGING_OPERATION:()=>Xrt,SEMATTRS_MESSAGING_PROTOCOL:()=>qrt,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Vrt,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>tot,SEMATTRS_MESSAGING_SYSTEM:()=>pV,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>$rt,SEMATTRS_MESSAGING_URL:()=>Yrt,SEMATTRS_NET_HOST_CARRIER_ICC:()=>nrt,SEMATTRS_NET_HOST_CARRIER_MCC:()=>ert,SEMATTRS_NET_HOST_CARRIER_MNC:()=>trt,SEMATTRS_NET_HOST_CARRIER_NAME:()=>Xnt,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>Wnt,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>Znt,SEMATTRS_NET_HOST_IP:()=>sV,SEMATTRS_NET_HOST_NAME:()=>Jnt,SEMATTRS_NET_HOST_PORT:()=>aV,SEMATTRS_NET_PEER_IP:()=>iV,SEMATTRS_NET_PEER_NAME:()=>Knt,SEMATTRS_NET_PEER_PORT:()=>Ynt,SEMATTRS_NET_TRANSPORT:()=>Vnt,SEMATTRS_PEER_SERVICE:()=>rrt,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>mV,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>dot,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>pot,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>lot,SEMATTRS_RPC_JSONRPC_VERSION:()=>cot,SEMATTRS_RPC_METHOD:()=>uot,SEMATTRS_RPC_SERVICE:()=>fV,SEMATTRS_RPC_SYSTEM:()=>aot,SEMATTRS_THREAD_ID:()=>art,SEMATTRS_THREAD_NAME:()=>urt,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>sat,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>iat,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>aat,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>uat,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>cat,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>lat,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>dat,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>fat,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>pat,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Aat,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>mat,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>tat,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>rat,SEMRESATTRS_CLOUD_PLATFORM:()=>oat,SEMRESATTRS_CLOUD_PROVIDER:()=>eat,SEMRESATTRS_CLOUD_REGION:()=>nat,SEMRESATTRS_CONTAINER_ID:()=>hat,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Eat,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>yat,SEMRESATTRS_CONTAINER_NAME:()=>gat,SEMRESATTRS_CONTAINER_RUNTIME:()=>_at,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Sat,SEMRESATTRS_DEVICE_ID:()=>Tat,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>bat,SEMRESATTRS_DEVICE_MODEL_NAME:()=>Iat,SEMRESATTRS_FAAS_ID:()=>vat,SEMRESATTRS_FAAS_INSTANCE:()=>xat,SEMRESATTRS_FAAS_MAX_MEMORY:()=>Dat,SEMRESATTRS_FAAS_NAME:()=>Cat,SEMRESATTRS_FAAS_VERSION:()=>Rat,SEMRESATTRS_HOST_ARCH:()=>Oat,SEMRESATTRS_HOST_ID:()=>Nat,SEMRESATTRS_HOST_IMAGE_ID:()=>Pat,SEMRESATTRS_HOST_IMAGE_NAME:()=>kat,SEMRESATTRS_HOST_IMAGE_VERSION:()=>Mat,SEMRESATTRS_HOST_NAME:()=>Bat,SEMRESATTRS_HOST_TYPE:()=>wat,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Lat,SEMRESATTRS_K8S_CONTAINER_NAME:()=>zat,SEMRESATTRS_K8S_CRONJOB_NAME:()=>tut,SEMRESATTRS_K8S_CRONJOB_UID:()=>eut,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Zat,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Jat,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Vat,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>qat,SEMRESATTRS_K8S_JOB_NAME:()=>Xat,SEMRESATTRS_K8S_JOB_UID:()=>Wat,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Fat,SEMRESATTRS_K8S_NODE_NAME:()=>Uat,SEMRESATTRS_K8S_NODE_UID:()=>Qat,SEMRESATTRS_K8S_POD_NAME:()=>jat,SEMRESATTRS_K8S_POD_UID:()=>Gat,SEMRESATTRS_K8S_REPLICASET_NAME:()=>$at,SEMRESATTRS_K8S_REPLICASET_UID:()=>Hat,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Kat,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Yat,SEMRESATTRS_OS_DESCRIPTION:()=>rut,SEMRESATTRS_OS_NAME:()=>out,SEMRESATTRS_OS_TYPE:()=>nut,SEMRESATTRS_OS_VERSION:()=>iut,SEMRESATTRS_PROCESS_COMMAND:()=>cut,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>dut,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>lut,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>aut,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>uut,SEMRESATTRS_PROCESS_OWNER:()=>put,SEMRESATTRS_PROCESS_PID:()=>sut,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Aut,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>fut,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>mut,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>hut,SEMRESATTRS_SERVICE_NAME:()=>gut,SEMRESATTRS_SERVICE_NAMESPACE:()=>AV,SEMRESATTRS_SERVICE_VERSION:()=>_ut,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>Tut,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>yut,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Eut,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Sut,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>Cut,SEMRESATTRS_WEBENGINE_NAME:()=>but,SEMRESATTRS_WEBENGINE_VERSION:()=>Iut,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>idt,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>sdt,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>adt,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>cdt,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>ldt,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>ddt,SemanticAttributes:()=>hot,SemanticResourceAttributes:()=>vut,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Ect,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>yct,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Sct,TELEMETRYSDKLANGUAGEVALUES_GO:()=>Tct,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>bct,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>Ict,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>Cct,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>vct,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>Rct,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xct,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>Vin,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>fdt,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>mdt,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>Yin,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Adt,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>gdt,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>Kin,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>hdt,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>_dt,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Edt,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>ydt,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Sdt,TelemetrySdkLanguageValues:()=>Dct});var Xn=w(()=>{m();oye();NTe();BTe();wTe();OTe()});var kTe=P(uU=>{"use strict";m();Object.defineProperty(uU,"__esModule",{value:!0});uU.ATTR_PROCESS_RUNTIME_NAME=void 0;uU.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var PTe=P(lU=>{"use strict";m();Object.defineProperty(lU,"__esModule",{value:!0});lU.SDK_INFO=void 0;var vpt=fge(),cU=(Xn(),Le(jr)),Rpt=kTe();lU.SDK_INFO={[cU.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[Rpt.ATTR_PROCESS_RUNTIME_NAME]:"node",[cU.ATTR_TELEMETRY_SDK_LANGUAGE]:cU.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[cU.ATTR_TELEMETRY_SDK_VERSION]:vpt.VERSION}});var MTe=P(su=>{"use strict";m();Object.defineProperty(su,"__esModule",{value:!0});su.otperformance=su.SDK_INFO=su._globalThis=su.getStringListFromEnv=su.getNumberFromEnv=su.getBooleanFromEnv=su.getStringFromEnv=void 0;var dU=dge();Object.defineProperty(su,"getStringFromEnv",{enumerable:!0,get:function(){return dU.getStringFromEnv}});Object.defineProperty(su,"getBooleanFromEnv",{enumerable:!0,get:function(){return dU.getBooleanFromEnv}});Object.defineProperty(su,"getNumberFromEnv",{enumerable:!0,get:function(){return dU.getNumberFromEnv}});Object.defineProperty(su,"getStringListFromEnv",{enumerable:!0,get:function(){return dU.getStringListFromEnv}});var xpt=pge();Object.defineProperty(su,"_globalThis",{enumerable:!0,get:function(){return xpt._globalThis}});var Dpt=PTe();Object.defineProperty(su,"SDK_INFO",{enumerable:!0,get:function(){return Dpt.SDK_INFO}});su.otperformance=performance});var NV=P(au=>{"use strict";m();Object.defineProperty(au,"__esModule",{value:!0});au.getStringListFromEnv=au.getNumberFromEnv=au.getStringFromEnv=au.getBooleanFromEnv=au.otperformance=au._globalThis=au.SDK_INFO=void 0;var fS=MTe();Object.defineProperty(au,"SDK_INFO",{enumerable:!0,get:function(){return fS.SDK_INFO}});Object.defineProperty(au,"_globalThis",{enumerable:!0,get:function(){return fS._globalThis}});Object.defineProperty(au,"otperformance",{enumerable:!0,get:function(){return fS.otperformance}});Object.defineProperty(au,"getBooleanFromEnv",{enumerable:!0,get:function(){return fS.getBooleanFromEnv}});Object.defineProperty(au,"getStringFromEnv",{enumerable:!0,get:function(){return fS.getStringFromEnv}});Object.defineProperty(au,"getNumberFromEnv",{enumerable:!0,get:function(){return fS.getNumberFromEnv}});Object.defineProperty(au,"getStringListFromEnv",{enumerable:!0,get:function(){return fS.getStringListFromEnv}})});var FTe=P(zr=>{"use strict";m();Object.defineProperty(zr,"__esModule",{value:!0});zr.addHrTimes=zr.isTimeInput=zr.isTimeInputHrTime=zr.hrTimeToSeconds=zr.hrTimeToMilliseconds=zr.hrTimeToMicroseconds=zr.hrTimeToNanoseconds=zr.hrTimeToTimeStamp=zr.hrTimeDuration=zr.timeInputToHrTime=zr.hrTime=zr.getTimeOrigin=zr.millisToHrTime=void 0;var pU=NV(),LTe=9,Npt=6,Bpt=Math.pow(10,Npt),mB=Math.pow(10,LTe);function AB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*Bpt);return[n,r]}zr.millisToHrTime=AB;function wpt(){return pU.otperformance.timeOrigin}zr.getTimeOrigin=wpt;function UTe(e){let t=AB(pU.otperformance.timeOrigin),n=AB(typeof e=="number"?e:pU.otperformance.now());return QTe(t,n)}zr.hrTime=UTe;function Opt(e){if(BV(e))return e;if(typeof e=="number")return e<pU.otperformance.timeOrigin?UTe(e):AB(e);if(e instanceof Date)return AB(e.getTime());throw TypeError("Invalid input type")}zr.timeInputToHrTime=Opt;function kpt(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=mB),[n,r]}zr.hrTimeDuration=kpt;function Ppt(e){let t=LTe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}zr.hrTimeToTimeStamp=Ppt;function Mpt(e){return e[0]*mB+e[1]}zr.hrTimeToNanoseconds=Mpt;function Lpt(e){return e[0]*1e6+e[1]/1e3}zr.hrTimeToMicroseconds=Lpt;function Upt(e){return e[0]*1e3+e[1]/1e6}zr.hrTimeToMilliseconds=Upt;function Qpt(e){return e[0]+e[1]/mB}zr.hrTimeToSeconds=Qpt;function BV(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}zr.isTimeInputHrTime=BV;function Fpt(e){return BV(e)||typeof e=="number"||e instanceof Date}zr.isTimeInput=Fpt;function QTe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=mB&&(n[1]-=mB,n[0]+=1),n}zr.addHrTimes=QTe});var GTe=P(fU=>{"use strict";m();Object.defineProperty(fU,"__esModule",{value:!0});fU.unrefTimer=void 0;function Gpt(e){typeof e!="number"&&e.unref()}fU.unrefTimer=Gpt});var jTe=P(gB=>{"use strict";m();Object.defineProperty(gB,"__esModule",{value:!0});gB.ExportResultCode=void 0;var jpt;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(jpt=gB.ExportResultCode||(gB.ExportResultCode={}))});var HTe=P(mU=>{"use strict";m();Object.defineProperty(mU,"__esModule",{value:!0});mU.CompositePropagator=void 0;var zTe=(ze(),Le(nt)),wV=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){zTe.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(s){zTe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};mU.CompositePropagator=wV});var $Te=P(LC=>{"use strict";m();Object.defineProperty(LC,"__esModule",{value:!0});LC.validateValue=LC.validateKey=void 0;var OV="[_0-9a-z-*/]",zpt=`[a-z]${OV}{0,255}`,Hpt=`[a-z0-9]${OV}{0,240}@[a-z]${OV}{0,13}`,$pt=new RegExp(`^(?:${zpt}|${Hpt})$`),qpt=/^[ -~]{0,255}[!-~]$/,Vpt=/,|=/;function Ypt(e){return $pt.test(e)}LC.validateKey=Ypt;function Kpt(e){return qpt.test(e)&&!Vpt.test(e)}LC.validateValue=Kpt});var PV=P(gU=>{"use strict";m();Object.defineProperty(gU,"__esModule",{value:!0});gU.TraceState=void 0;var AU=$Te(),Jpt=32,qTe=512,VTe=",",YTe="=",kV=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,AU.validateKey)(t)||!(0,AU.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>qTe)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=VTe+t),t=`${r[0]}${YTe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(VTe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(YTe);if(s===-1)continue;let u=i.slice(0,s),l=i.slice(s+1);if(!(0,AU.validateKey)(u)||!(0,AU.validateValue)(l))continue;let p=r+i.length+(n.size>0?1:0);if(!(p>qTe)&&(n.set(u,l),r=p,n.size>=Jpt))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};gU.TraceState=kV});var JTe=P(uu=>{"use strict";m();Object.defineProperty(uu,"__esModule",{value:!0});uu.W3CTraceContextPropagator=uu.parseTraceParent=uu.TRACE_STATE_HEADER=uu.TRACE_PARENT_HEADER=void 0;var hU=(ze(),Le(nt)),Zpt=dB(),Wpt=PV();uu.TRACE_PARENT_HEADER="traceparent";uu.TRACE_STATE_HEADER="tracestate";var Xpt="00",eft="(?!ff)[\\da-f]{2}",tft="(?![0]{32})[\\da-f]{32}",nft="(?![0]{16})[\\da-f]{16}",rft="[\\da-f]{2}",oft=new RegExp(`^\\s?(${eft})-(${tft})-(${nft})-(${rft})(-.*)?\\s?$`);function KTe(e){let t=oft.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}uu.parseTraceParent=KTe;var MV=class{inject(t,n,r){let o=hU.trace.getSpanContext(t);if(!o||(0,Zpt.isTracingSuppressed)(t)||!(0,hU.isSpanContextValid)(o))return;let i=`${Xpt}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||hU.TraceFlags.NONE).toString(16)}`;r.set(n,uu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,uu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,uu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=KTe(i);if(!s)return t;s.isRemote=!0;let u=r.get(n,uu.TRACE_STATE_HEADER);if(u){let l=Array.isArray(u)?u.join(","):u;s.traceState=new Wpt.TraceState(typeof l=="string"?l:void 0)}return hU.trace.setSpanContext(t,s)}fields(){return[uu.TRACE_PARENT_HEADER,uu.TRACE_STATE_HEADER]}};uu.W3CTraceContextPropagator=MV});var ZTe=P(ff=>{"use strict";m();Object.defineProperty(ff,"__esModule",{value:!0});ff.getRPCMetadata=ff.deleteRPCMetadata=ff.setRPCMetadata=ff.RPCType=void 0;var ift=(ze(),Le(nt)),LV=(0,ift.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),sft;(function(e){e.HTTP="http"})(sft=ff.RPCType||(ff.RPCType={}));function aft(e,t){return e.setValue(LV,t)}ff.setRPCMetadata=aft;function uft(e){return e.deleteValue(LV)}ff.deleteRPCMetadata=uft;function cft(e){return e.getValue(LV)}ff.getRPCMetadata=cft});var nbe=P(_U=>{"use strict";m();Object.defineProperty(_U,"__esModule",{value:!0});_U.isPlainObject=void 0;var lft="[object Object]",dft="[object Null]",pft="[object Undefined]",fft=Function.prototype,WTe=fft.toString,mft=WTe.call(Object),Aft=Object.getPrototypeOf,XTe=Object.prototype,ebe=XTe.hasOwnProperty,mS=Symbol?Symbol.toStringTag:void 0,tbe=XTe.toString;function gft(e){if(!hft(e)||_ft(e)!==lft)return!1;let t=Aft(e);if(t===null)return!0;let n=ebe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&WTe.call(n)===mft}_U.isPlainObject=gft;function hft(e){return e!=null&&typeof e=="object"}function _ft(e){return e==null?e===void 0?pft:dft:mS&&mS in Object(e)?Eft(e):yft(e)}function Eft(e){let t=ebe.call(e,mS),n=e[mS],r=!1;try{e[mS]=void 0,r=!0}catch{}let o=tbe.call(e);return r&&(t?e[mS]=n:delete e[mS]),o}function yft(e){return tbe.call(e)}});var abe=P(SU=>{"use strict";m();Object.defineProperty(SU,"__esModule",{value:!0});SU.merge=void 0;var rbe=nbe(),Sft=20;function Tft(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=ibe(t,e.shift(),0,n);return t}SU.merge=Tft;function UV(e){return yU(e)?e.slice():e}function ibe(e,t,n=0,r){let o;if(!(n>Sft)){if(n++,EU(e)||EU(t)||sbe(t))o=UV(t);else if(yU(e)){if(o=e.slice(),yU(t))for(let i=0,s=t.length;i<s;i++)o.push(UV(t[i]));else if(hB(t)){let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=UV(t[l]))}}}else if(hB(e))if(hB(t)){if(!bft(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,u=i.length;s<u;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let p=t[l];if(EU(p))typeof p>"u"?delete o[l]:o[l]=p;else{let h=o[l],y=p;if(obe(e,l,r)||obe(t,l,r))delete o[l];else{if(hB(h)&&hB(y)){let S=r.get(h)||[],T=r.get(y)||[];S.push({obj:e,key:l}),T.push({obj:t,key:l}),r.set(h,S),r.set(y,T)}o[l]=ibe(o[l],p,n,r)}}}}else o=t;return o}}function obe(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function yU(e){return Array.isArray(e)}function sbe(e){return typeof e=="function"}function hB(e){return!EU(e)&&!yU(e)&&!sbe(e)&&typeof e=="object"}function EU(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function bft(e,t){return!(!(0,rbe.isPlainObject)(e)||!(0,rbe.isPlainObject)(t))}});var ube=P(UC=>{"use strict";m();Object.defineProperty(UC,"__esModule",{value:!0});UC.callWithTimeout=UC.TimeoutError=void 0;var TU=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};UC.TimeoutError=TU;function Ift(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new TU("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}UC.callWithTimeout=Ift});var lbe=P(QC=>{"use strict";m();Object.defineProperty(QC,"__esModule",{value:!0});QC.isUrlIgnored=QC.urlMatches=void 0;function cbe(e,t){return typeof t=="string"?e===t:!!e.match(t)}QC.urlMatches=cbe;function Cft(e,t){if(!t)return!1;for(let n of t)if(cbe(e,n))return!0;return!1}QC.isUrlIgnored=Cft});var dbe=P(bU=>{"use strict";m();Object.defineProperty(bU,"__esModule",{value:!0});bU.Deferred=void 0;var QV=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)}};bU.Deferred=QV});var pbe=P(IU=>{"use strict";m();Object.defineProperty(IU,"__esModule",{value:!0});IU.BindOnceFuture=void 0;var vft=dbe(),FV=class{_isCalled=!1;_deferred=new vft.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}};IU.BindOnceFuture=FV});var mbe=P(CU=>{"use strict";m();Object.defineProperty(CU,"__esModule",{value:!0});CU.diagLogLevelFromString=void 0;var xg=(ze(),Le(nt)),fbe={ALL:xg.DiagLogLevel.ALL,VERBOSE:xg.DiagLogLevel.VERBOSE,DEBUG:xg.DiagLogLevel.DEBUG,INFO:xg.DiagLogLevel.INFO,WARN:xg.DiagLogLevel.WARN,ERROR:xg.DiagLogLevel.ERROR,NONE:xg.DiagLogLevel.NONE};function Rft(e){if(e==null)return;let t=fbe[e.toUpperCase()];return t??(xg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(fbe)}, using default`),xg.DiagLogLevel.INFO)}CU.diagLogLevelFromString=Rft});var gbe=P(vU=>{"use strict";m();Object.defineProperty(vU,"__esModule",{value:!0});vU._export=void 0;var Abe=(ze(),Le(nt)),xft=dB();function Dft(e,t){return new Promise(n=>{Abe.context.with((0,xft.suppressTracing)(Abe.context.active()),()=>{e.export(t,n)})})}vU._export=Dft});var vr=P(we=>{"use strict";m();Object.defineProperty(we,"__esModule",{value:!0});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.hrTimeToSeconds=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;we.internal=void 0;var Nft=XAe();Object.defineProperty(we,"W3CBaggagePropagator",{enumerable:!0,get:function(){return Nft.W3CBaggagePropagator}});var Bft=ege();Object.defineProperty(we,"AnchoredClock",{enumerable:!0,get:function(){return Bft.AnchoredClock}});var hbe=ige();Object.defineProperty(we,"isAttributeValue",{enumerable:!0,get:function(){return hbe.isAttributeValue}});Object.defineProperty(we,"sanitizeAttributes",{enumerable:!0,get:function(){return hbe.sanitizeAttributes}});var _be=age();Object.defineProperty(we,"globalErrorHandler",{enumerable:!0,get:function(){return _be.globalErrorHandler}});Object.defineProperty(we,"setGlobalErrorHandler",{enumerable:!0,get:function(){return _be.setGlobalErrorHandler}});var wft=eV();Object.defineProperty(we,"loggingErrorHandler",{enumerable:!0,get:function(){return wft.loggingErrorHandler}});var Ql=FTe();Object.defineProperty(we,"addHrTimes",{enumerable:!0,get:function(){return Ql.addHrTimes}});Object.defineProperty(we,"getTimeOrigin",{enumerable:!0,get:function(){return Ql.getTimeOrigin}});Object.defineProperty(we,"hrTime",{enumerable:!0,get:function(){return Ql.hrTime}});Object.defineProperty(we,"hrTimeDuration",{enumerable:!0,get:function(){return Ql.hrTimeDuration}});Object.defineProperty(we,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMicroseconds}});Object.defineProperty(we,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ql.hrTimeToMilliseconds}});Object.defineProperty(we,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ql.hrTimeToNanoseconds}});Object.defineProperty(we,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ql.hrTimeToSeconds}});Object.defineProperty(we,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ql.hrTimeToTimeStamp}});Object.defineProperty(we,"isTimeInput",{enumerable:!0,get:function(){return Ql.isTimeInput}});Object.defineProperty(we,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ql.isTimeInputHrTime}});Object.defineProperty(we,"millisToHrTime",{enumerable:!0,get:function(){return Ql.millisToHrTime}});Object.defineProperty(we,"timeInputToHrTime",{enumerable:!0,get:function(){return Ql.timeInputToHrTime}});var Oft=GTe();Object.defineProperty(we,"unrefTimer",{enumerable:!0,get:function(){return Oft.unrefTimer}});var kft=jTe();Object.defineProperty(we,"ExportResultCode",{enumerable:!0,get:function(){return kft.ExportResultCode}});var Pft=J5();Object.defineProperty(we,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Pft.parseKeyPairsIntoRecord}});var AS=NV();Object.defineProperty(we,"SDK_INFO",{enumerable:!0,get:function(){return AS.SDK_INFO}});Object.defineProperty(we,"_globalThis",{enumerable:!0,get:function(){return AS._globalThis}});Object.defineProperty(we,"getStringFromEnv",{enumerable:!0,get:function(){return AS.getStringFromEnv}});Object.defineProperty(we,"getBooleanFromEnv",{enumerable:!0,get:function(){return AS.getBooleanFromEnv}});Object.defineProperty(we,"getNumberFromEnv",{enumerable:!0,get:function(){return AS.getNumberFromEnv}});Object.defineProperty(we,"getStringListFromEnv",{enumerable:!0,get:function(){return AS.getStringListFromEnv}});Object.defineProperty(we,"otperformance",{enumerable:!0,get:function(){return AS.otperformance}});var Mft=HTe();Object.defineProperty(we,"CompositePropagator",{enumerable:!0,get:function(){return Mft.CompositePropagator}});var RU=JTe();Object.defineProperty(we,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return RU.TRACE_PARENT_HEADER}});Object.defineProperty(we,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return RU.TRACE_STATE_HEADER}});Object.defineProperty(we,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return RU.W3CTraceContextPropagator}});Object.defineProperty(we,"parseTraceParent",{enumerable:!0,get:function(){return RU.parseTraceParent}});var xU=ZTe();Object.defineProperty(we,"RPCType",{enumerable:!0,get:function(){return xU.RPCType}});Object.defineProperty(we,"deleteRPCMetadata",{enumerable:!0,get:function(){return xU.deleteRPCMetadata}});Object.defineProperty(we,"getRPCMetadata",{enumerable:!0,get:function(){return xU.getRPCMetadata}});Object.defineProperty(we,"setRPCMetadata",{enumerable:!0,get:function(){return xU.setRPCMetadata}});var GV=dB();Object.defineProperty(we,"isTracingSuppressed",{enumerable:!0,get:function(){return GV.isTracingSuppressed}});Object.defineProperty(we,"suppressTracing",{enumerable:!0,get:function(){return GV.suppressTracing}});Object.defineProperty(we,"unsuppressTracing",{enumerable:!0,get:function(){return GV.unsuppressTracing}});var Lft=PV();Object.defineProperty(we,"TraceState",{enumerable:!0,get:function(){return Lft.TraceState}});var Uft=abe();Object.defineProperty(we,"merge",{enumerable:!0,get:function(){return Uft.merge}});var Ebe=ube();Object.defineProperty(we,"TimeoutError",{enumerable:!0,get:function(){return Ebe.TimeoutError}});Object.defineProperty(we,"callWithTimeout",{enumerable:!0,get:function(){return Ebe.callWithTimeout}});var ybe=lbe();Object.defineProperty(we,"isUrlIgnored",{enumerable:!0,get:function(){return ybe.isUrlIgnored}});Object.defineProperty(we,"urlMatches",{enumerable:!0,get:function(){return ybe.urlMatches}});var Qft=pbe();Object.defineProperty(we,"BindOnceFuture",{enumerable:!0,get:function(){return Qft.BindOnceFuture}});var Fft=mbe();Object.defineProperty(we,"diagLogLevelFromString",{enumerable:!0,get:function(){return Fft.diagLogLevelFromString}});var Gft=gbe();we.internal={_export:Gft._export}});var Sbe=P(DU=>{"use strict";m();Object.defineProperty(DU,"__esModule",{value:!0});DU.VERSION=void 0;DU.VERSION="0.214.0"});var Tbe=P(_B=>{"use strict";m();Object.defineProperty(_B,"__esModule",{value:!0});_B.SeverityNumber=void 0;var jft;(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"})(jft=_B.SeverityNumber||(_B.SeverityNumber={}))});var BU=P(FC=>{"use strict";m();Object.defineProperty(FC,"__esModule",{value:!0});FC.NOOP_LOGGER=FC.NoopLogger=void 0;var NU=class{emit(t){}};FC.NoopLogger=NU;FC.NOOP_LOGGER=new NU});var bbe=P(Bm=>{"use strict";m();Object.defineProperty(Bm,"__esModule",{value:!0});Bm.API_BACKWARDS_COMPATIBILITY_VERSION=Bm.makeGetter=Bm._global=Bm.GLOBAL_LOGS_API_KEY=void 0;Bm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Bm._global=globalThis;function zft(e,t,n){return r=>r===e?t:n}Bm.makeGetter=zft;Bm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var jV=P(GC=>{"use strict";m();Object.defineProperty(GC,"__esModule",{value:!0});GC.NOOP_LOGGER_PROVIDER=GC.NoopLoggerProvider=void 0;var Hft=BU(),wU=class{getLogger(t,n,r){return new Hft.NoopLogger}};GC.NoopLoggerProvider=wU;GC.NOOP_LOGGER_PROVIDER=new wU});var Ibe=P(OU=>{"use strict";m();Object.defineProperty(OU,"__esModule",{value:!0});OU.ProxyLogger=void 0;var $ft=BU(),zV=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):$ft.NOOP_LOGGER}};OU.ProxyLogger=zV});var Cbe=P(kU=>{"use strict";m();Object.defineProperty(kU,"__esModule",{value:!0});kU.ProxyLoggerProvider=void 0;var qft=jV(),Vft=Ibe(),HV=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Vft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:qft.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)}};kU.ProxyLoggerProvider=HV});var Rbe=P(PU=>{"use strict";m();Object.defineProperty(PU,"__esModule",{value:!0});PU.LogsAPI=void 0;var $d=bbe(),Yft=jV(),vbe=Cbe(),$V=class e{constructor(){this._proxyLoggerProvider=new vbe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return $d._global[$d.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():($d._global[$d.GLOBAL_LOGS_API_KEY]=(0,$d.makeGetter)($d.API_BACKWARDS_COMPATIBILITY_VERSION,t,Yft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=$d._global[$d.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call($d._global,$d.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete $d._global[$d.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new vbe.ProxyLoggerProvider}};PU.LogsAPI=$V});var qV=P(wm=>{"use strict";m();Object.defineProperty(wm,"__esModule",{value:!0});wm.logs=wm.NoopLogger=wm.NOOP_LOGGER=wm.SeverityNumber=void 0;var Kft=Tbe();Object.defineProperty(wm,"SeverityNumber",{enumerable:!0,get:function(){return Kft.SeverityNumber}});var xbe=BU();Object.defineProperty(wm,"NOOP_LOGGER",{enumerable:!0,get:function(){return xbe.NOOP_LOGGER}});Object.defineProperty(wm,"NoopLogger",{enumerable:!0,get:function(){return xbe.NoopLogger}});var Jft=Rbe();wm.logs=Jft.LogsAPI.getInstance()});var Dbe=P(jC=>{"use strict";m();Object.defineProperty(jC,"__esModule",{value:!0});jC.disableInstrumentations=jC.enableInstrumentations=void 0;function Zft(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}jC.enableInstrumentations=Zft;function Wft(e){e.forEach(t=>t.disable())}jC.disableInstrumentations=Wft});var wbe=P(MU=>{"use strict";m();Object.defineProperty(MU,"__esModule",{value:!0});MU.registerInstrumentations=void 0;var Nbe=(ze(),Le(nt)),Xft=qV(),Bbe=Dbe();function emt(e){let t=e.tracerProvider||Nbe.trace.getTracerProvider(),n=e.meterProvider||Nbe.metrics.getMeterProvider(),r=e.loggerProvider||Xft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Bbe.enableInstrumentations)(o,t,n,r),()=>{(0,Bbe.disableInstrumentations)(o)}}MU.registerInstrumentations=emt});var Gbe=P(LU=>{"use strict";m();Object.defineProperty(LU,"__esModule",{value:!0});LU.satisfies=void 0;var JV=(ze(),Le(nt)),Lbe=/^(?: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-]+)*))?$/,tmt=/^(?<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-]+)*))?$/,nmt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function rmt(e,t,n){if(!omt(e))return JV.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=umt(e);if(!r)return!1;let o=[],i=Ube(r,t,o,n);return i&&!n?.includePrerelease?smt(r,o):i}LU.satisfies=rmt;function omt(e){return typeof e=="string"&&Lbe.test(e)}function Ube(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(VV(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Dmt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!VV(e,i,n,r))return!1;return!0}return VV(e,t,n,r)}function VV(e,t,n,r){if(t=amt(t,r),t.includes(" "))return Ube(e,t,n,r);{let o=cmt(t);return n.push(o),imt(e,o)}}function imt(e,t){if(t.invalid)return!1;if(!t.version||KV(t.version))return!0;let n=kbe(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=kbe(r,o)}return nmt[t.op]?.includes(n)}function smt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function amt(e,t){return e=e.trim(),e=Rmt(e,t),e=vmt(e),e=xmt(e,t),e=e.trim(),e}function $u(e){return!e||e.toLowerCase()==="x"||e==="*"}function umt(e){let t=e.match(Lbe);if(!t){JV.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function cmt(e){if(!e)return{};let t=e.match(tmt);if(!t)return JV.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function KV(e){return e==="*"||e==="x"||e==="X"}function Obe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function lmt(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 dmt(e,t){if(KV(e)||KV(t))return 0;let[n,r]=lmt(Obe(e),Obe(t));return n>r?1:n<r?-1:0}function kbe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=dmt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Qbe="[a-zA-Z0-9-]",Fbe="0|[1-9]\\d*",pmt=`\\d*[a-zA-Z-]${Qbe}*`,fmt="((?:<|>)?=?)",Pbe=`(?:${Fbe}|${pmt})`,mmt=`(?:-(${Pbe}(?:\\.${Pbe})*))`,Mbe=`${Qbe}+`,Amt=`(?:\\+(${Mbe}(?:\\.${Mbe})*))`,YV=`${Fbe}|x|X|\\*`,EB=`[v=\\s]*(${YV})(?:\\.(${YV})(?:\\.(${YV})(?:${mmt})?${Amt}?)?)?`,gmt=`^${fmt}\\s*${EB}$`,hmt=new RegExp(gmt),_mt=`^\\s*(${EB})\\s+-\\s+(${EB})\\s*$`,Emt=new RegExp(_mt),ymt="(?:~>?)",Smt=`^${ymt}${EB}$`,Tmt=new RegExp(Smt),bmt="(?:\\^)",Imt=`^${bmt}${EB}$`,Cmt=new RegExp(Imt);function vmt(e){let t=Tmt;return e.replace(t,(n,r,o,i,s)=>{let u;return $u(r)?u="":$u(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:$u(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function Rmt(e,t){let n=Cmt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return $u(i)?p="":$u(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:$u(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function xmt(e,t){let n=hmt;return e.replace(n,(r,o,i,s,u,l)=>{let p=$u(i),h=p||$u(s),y=h||$u(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Dmt(e,t){let n=Emt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>($u(i)?o="":$u(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:$u(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,$u(y)?h="":$u(S)?h=`<${+y+1}.0.0-0`:$u(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var ZV=P(Ra=>{"use strict";m();Object.defineProperty(Ra,"__esModule",{value:!0});Ra.massUnwrap=Ra.unwrap=Ra.massWrap=Ra.wrap=void 0;var qu=console.error.bind(console);function yB(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 Nmt=(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 yB(o,"__original",r),yB(o,"__unwrap",()=>{e[t]===o&&yB(e,t,r)}),yB(o,"__wrapped",!0),yB(e,t,o),o};Ra.wrap=Nmt;var Bmt=(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,Ra.wrap)(r,o,n)})})};Ra.massWrap=Bmt;var wmt=(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}};Ra.unwrap=wmt;var Omt=(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,Ra.unwrap)(n,r)})})};Ra.massUnwrap=Omt;function SB(e){e&&e.logger&&(typeof e.logger!="function"?qu("new logger isn't a function, not replacing"):qu=e.logger)}Ra.default=SB;SB.wrap=Ra.wrap;SB.massWrap=Ra.massWrap;SB.unwrap=Ra.unwrap;SB.massUnwrap=Ra.massUnwrap});var jbe=P(QU=>{"use strict";m();Object.defineProperty(QU,"__esModule",{value:!0});QU.InstrumentationAbstract=void 0;var WV=(ze(),Le(nt)),kmt=qV(),UU=ZV(),XV=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=WV.diag.createComponentLogger({namespace:t}),this._tracer=WV.trace.getTracer(t,n),this._meter=WV.metrics.getMeter(t,n),this._logger=kmt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=UU.wrap;_unwrap=UU.unwrap;_massWrap=UU.massWrap;_massUnwrap=UU.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)}}};QU.InstrumentationAbstract=XV});var Hbe=P((Ian,zbe)=>{m();var zC=1e3,HC=zC*60,$C=HC*60,gS=$C*24,Pmt=gS*7,Mmt=gS*365.25;zbe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Lmt(e);if(n==="number"&&isFinite(e))return t.long?Qmt(e):Umt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Lmt(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*Mmt;case"weeks":case"week":case"w":return n*Pmt;case"days":case"day":case"d":return n*gS;case"hours":case"hour":case"hrs":case"hr":case"h":return n*$C;case"minutes":case"minute":case"mins":case"min":case"m":return n*HC;case"seconds":case"second":case"secs":case"sec":case"s":return n*zC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Umt(e){var t=Math.abs(e);return t>=gS?Math.round(e/gS)+"d":t>=$C?Math.round(e/$C)+"h":t>=HC?Math.round(e/HC)+"m":t>=zC?Math.round(e/zC)+"s":e+"ms"}function Qmt(e){var t=Math.abs(e);return t>=gS?FU(e,t,gS,"day"):t>=$C?FU(e,t,$C,"hour"):t>=HC?FU(e,t,HC,"minute"):t>=zC?FU(e,t,zC,"second"):e+" ms"}function FU(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var e7=P((van,$be)=>{m();function Fmt(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=u,n.humanize=Hbe(),n.destroy=p,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,T,v;function R(...x){if(!R.enabled)return;let O=R,M=Number(new Date),j=M-(y||M);O.diff=j,O.prev=y,O.curr=M,y=M,x[0]=n.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let G=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(V,ae)=>{if(V==="%%")return"%";G++;let se=n.formatters[ae];if(typeof se=="function"){let Ee=x[G];V=se.call(O,Ee),x.splice(G,1),G--}return V}),n.formatArgs.call(O,x),(O.log||n.log).apply(O,x)}return R.namespace=h,R.useColors=n.useColors(),R.color=n.selectColor(h),R.extend=r,R.destroy=n.destroy,Object.defineProperty(R,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(T!==n.namespaces&&(T=n.namespaces,v=n.enabled(h)),v),set:x=>{S=x}}),typeof n.init=="function"&&n.init(R),R}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,T=0,v=-1,R=0;for(;S<h.length;)if(T<y.length&&(y[T]===h[S]||y[T]==="*"))y[T]==="*"?(v=T,R=S,T++):(S++,T++);else if(v!==-1)T=v+1,R++,S=R;else return!1;for(;T<y.length&&y[T]==="*";)T++;return T===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function u(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function p(){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}$be.exports=Fmt});var qbe=P((Fc,GU)=>{m();Fc.formatArgs=jmt;Fc.save=zmt;Fc.load=Hmt;Fc.useColors=Gmt;Fc.storage=$mt();Fc.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`."))}})();Fc.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 Gmt(){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 jmt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+GU.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)}Fc.log=console.debug||console.log||(()=>{});function zmt(e){try{e?Fc.storage.setItem("debug",e):Fc.storage.removeItem("debug")}catch{}}function Hmt(){let e;try{e=Fc.storage.getItem("debug")||Fc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function $mt(){try{return localStorage}catch{}}GU.exports=e7()(Fc);var{formatters:qmt}=GU.exports;qmt.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Ybe=P((Dan,Vbe)=>{"use strict";m();Vbe.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 Zbe=P((Ban,Jbe)=>{"use strict";m();var Vmt=Qe("os"),Kbe=Qe("tty"),qd=Ybe(),{env:Ws}=process,N_;qd("no-color")||qd("no-colors")||qd("color=false")||qd("color=never")?N_=0:(qd("color")||qd("colors")||qd("color=true")||qd("color=always"))&&(N_=1);"FORCE_COLOR"in Ws&&(Ws.FORCE_COLOR==="true"?N_=1:Ws.FORCE_COLOR==="false"?N_=0:N_=Ws.FORCE_COLOR.length===0?1:Math.min(parseInt(Ws.FORCE_COLOR,10),3));function t7(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function n7(e,t){if(N_===0)return 0;if(qd("color=16m")||qd("color=full")||qd("color=truecolor"))return 3;if(qd("color=256"))return 2;if(e&&!t&&N_===void 0)return 0;let n=N_||0;if(Ws.TERM==="dumb")return n;if(process.platform==="win32"){let r=Vmt.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ws)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ws)||Ws.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ws)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ws.TEAMCITY_VERSION)?1:0;if(Ws.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ws){let r=parseInt((Ws.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ws.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ws.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ws.TERM)||"COLORTERM"in Ws?1:n}function Ymt(e){let t=n7(e,e&&e.isTTY);return t7(t)}Jbe.exports={supportsColor:Ymt,stdout:t7(n7(!0,Kbe.isatty(1))),stderr:t7(n7(!0,Kbe.isatty(2)))}});var Xbe=P((Xs,zU)=>{m();var Kmt=Qe("tty"),jU=Qe("util");Xs.init=nAt;Xs.log=Xmt;Xs.formatArgs=Zmt;Xs.save=eAt;Xs.load=tAt;Xs.useColors=Jmt;Xs.destroy=jU.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Xs.colors=[6,2,3,4,5,1];try{let e=Zbe();e&&(e.stderr||e).level>=2&&(Xs.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{}Xs.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 Jmt(){return"colors"in Xs.inspectOpts?!!Xs.inspectOpts.colors:Kmt.isatty(process.stderr.fd)}function Zmt(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+"+zU.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=Wmt()+t+" "+e[0]}function Wmt(){return Xs.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Xmt(...e){return process.stderr.write(jU.formatWithOptions(Xs.inspectOpts,...e)+`
6
6
  `)}function eAt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function tAt(){return process.env.DEBUG}function nAt(e){e.inspectOpts={};let t=Object.keys(Xs.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Xs.inspectOpts[t[n]]}zU.exports=e7()(Xs);var{formatters:Wbe}=zU.exports;Wbe.o=function(e){return this.inspectOpts.colors=this.useColors,jU.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${XQ(e)}`),!0}return!1}function __t(e,t){return t?.length?YQ(e).some(n=>F_(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let s=o.substring(0,i).toLowerCase(),u=o.substring(i+1).trim(),l=n.get(s);l&&Array.isArray(l)?l.push(u):l?n.set(s,[l,u]):n.set(s,u)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,Lw.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),V=>V&&this._diag.error("caught ignoreRequestHook error: ",V),!0))return;let i=(0,j4.hrTime)(),s;try{s=new TIt.URL(t.path,t.origin)}catch(V){this._diag.warn("could not determine url.full:",V);return}let u=s.protocol.replace(":",""),l=this.getRequestMethod(t.method),p={[os.ATTR_HTTP_REQUEST_METHOD]:l,[os.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[os.ATTR_URL_FULL]:s.toString(),[os.ATTR_URL_PATH]:s.pathname,[os.ATTR_URL_QUERY]:s.search,[os.ATTR_URL_SCHEME]:u},h={https:"443",http:"80"},y=s.hostname,S=s.port||h[u];p[os.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(p[os.ATTR_SERVER_PORT]=Number(S));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let V=Array.isArray(v)?v[v.length-1]:v;p[os.ATTR_USER_AGENT_ORIGINAL]=V}let R=(0,Lw.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),V=>V&&this._diag.error("caught startSpanHook error: ",V),!0);R&&Object.entries(R).forEach(([V,ae])=>{p[V]=ae});let x=Kl.context.active(),O=Kl.trace.getSpan(x),M;n.requireParentforSpans&&(!O||!Kl.trace.isSpanContextValid(O.spanContext()))?M=Kl.trace.wrapSpanContext(Kl.INVALID_SPAN_CONTEXT):M=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:Kl.SpanKind.CLIENT,attributes:p},x),(0,Lw.safeExecuteInTheMiddle)(()=>n.requestHook?.(M,t),V=>V&&this._diag.error("caught requestHook error: ",V),!0);let j=Kl.trace.setSpan(Kl.context.active(),M),G={};Kl.propagation.inject(j,G);let H=Object.entries(G);for(let V=0;V<H.length;V++){let[ae,se]=H[V];typeof t.addHeader=="function"?t.addHeader(ae,se):typeof t.headers=="string"?t.headers+=`${ae}: ${se}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ae,se)}this._recordFromReq.set(t,{span:M,attributes:p,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:s,remotePort:u}=n,l={[os.ATTR_NETWORK_PEER_ADDRESS]:s,[os.ATTR_NETWORK_PEER_PORT]:u};if(o.headersToSpanAttributes?.requestHeaders){let p=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(p.has(y)){let T=Array.isArray(S)?S:[S];l[`http.request.header.${y}`]=T}}i.setAttributes(l)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,s={[os.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},u=this.getConfig();if((0,Lw.safeExecuteInTheMiddle)(()=>u.responseHook?.(o,{request:t,response:n}),l=>l&&this._diag.error("caught responseHook error: ",l),!0),u.headersToSpanAttributes?.responseHeaders){let l=new Set;u.headersToSpanAttributes?.responseHeaders.forEach(p=>l.add(p.toLowerCase()));for(let p=0;p<n.headers.length;p=p+2){let h=n.headers[p].toString().toLowerCase(),y=n.headers[p+1];if(l.has(h)){let S=`http.response.header.${h}`;Object.hasOwn(s,S)?s[S].push(y.toString()):s[S]=[y.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?Kl.SpanStatusCode.ERROR:Kl.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,s)}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:s}=r;o.recordException(n),o.setStatus({code:Kl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[os.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let r={};[os.ATTR_HTTP_RESPONSE_STATUS_CODE,os.ATTR_HTTP_REQUEST_METHOD,os.ATTR_SERVER_ADDRESS,os.ATTR_SERVER_PORT,os.ATTR_URL_SCHEME,os.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,j4.hrTimeToMilliseconds)((0,j4.hrTimeDuration)(n,(0,j4.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"}};z4.UndiciInstrumentation=MZ});var nwe=P(H4=>{"use strict";m();Object.defineProperty(H4,"__esModule",{value:!0});H4.UndiciInstrumentation=void 0;var bIt=twe();Object.defineProperty(H4,"UndiciInstrumentation",{enumerable:!0,get:function(){return bIt.UndiciInstrumentation}})});function rwe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function RIt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Mi(t)}function xIt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=rwe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=rwe(n.origin,n.path);if(r.startsWith("data:")){let o=bv(r);return{[Pt]:"auto.http.otel.node_fetch","http.url":o,[$_]:o,[Jd]:`${n.method||"GET"} ${o}`}}return{[Pt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var owe,iwe,IIt,CIt,vIt,swe,awe=w(()=>{m();owe=ue(nwe(),1);mt();_r();iwe="NodeFetch",IIt=ut(iwe,owe.UndiciInstrumentation,e=>xIt(e)),CIt=ut(`${iwe}.sentry`,QS,e=>e),vIt=((e={})=>({name:"NodeFetch",setupOnce(){RIt(e,_t()?.getOptions())&&IIt(e),CIt(e)}})),swe=vIt});var $4=P(Uw=>{"use strict";m();Object.defineProperty(Uw,"__esModule",{value:!0});Uw.ExpressLayerType=void 0;var DIt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(DIt=Uw.ExpressLayerType||(Uw.ExpressLayerType={}))});var q4=P(Qw=>{"use strict";m();Object.defineProperty(Qw,"__esModule",{value:!0});Qw.AttributeNames=void 0;var NIt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(NIt=Qw.AttributeNames||(Qw.AttributeNames={}))});var LZ=P(eR=>{"use strict";m();Object.defineProperty(eR,"__esModule",{value:!0});eR._LAYERS_STORE_PROPERTY=eR.kLayerPatched=void 0;eR.kLayerPatched=Symbol("express-layer-patched");eR._LAYERS_STORE_PROPERTY="__ot_middlewares"});var lwe=P(is=>{"use strict";m();Object.defineProperty(is,"__esModule",{value:!0});is.getActualMatchedRoute=is.getConstructedRoute=is.getLayerPath=is.asErrorAndMessage=is.isLayerIgnored=is.getLayerMetadata=is.getRouterPath=is.storeLayerPath=void 0;var UZ=$4(),tR=q4(),$S=LZ(),BIt=(e,t)=>(Array.isArray(e[$S._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,$S._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[$S._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));is.storeLayerPath=BIt;var wIt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,is.getRouterPath)(e,n):e};is.getRouterPath=wIt;var OIt=(e,t,n)=>{if(t.name==="router"){let r=(0,is.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[tR.AttributeNames.EXPRESS_NAME]:o,[tR.AttributeNames.EXPRESS_TYPE]:UZ.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[tR.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[tR.AttributeNames.EXPRESS_TYPE]:UZ.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[tR.AttributeNames.EXPRESS_NAME]:t.name,[tR.AttributeNames.EXPRESS_TYPE]:UZ.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};is.getLayerMetadata=OIt;var kIt=(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")},PIt=(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(kIt(e,r))return!0}catch{}return!1};is.isLayerIgnored=PIt;var MIt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];is.asErrorAndMessage=MIt;var LIt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>uwe(n)||"").join(","):uwe(t)};is.getLayerPath=LIt;var uwe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function cwe(e){let n=(Array.isArray(e[$S._LAYERS_STORE_PROPERTY])?e[$S._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}is.getConstructedRoute=cwe;function UIt(e){let t=Array.isArray(e[$S._LAYERS_STORE_PROPERTY])?e[$S._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=cwe(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)||QIt(r))?r:void 0}is.getActualMatchedRoute=UIt;function QIt(e){return e.includes(":")||e.includes("*")}});var dwe=P(nR=>{"use strict";m();Object.defineProperty(nR,"__esModule",{value:!0});nR.PACKAGE_NAME=nR.PACKAGE_VERSION=void 0;nR.PACKAGE_VERSION="0.62.0";nR.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var gwe=P(Y4=>{"use strict";m();Object.defineProperty(Y4,"__esModule",{value:!0});Y4.ExpressInstrumentation=void 0;var pwe=vr(),Vc=(ze(),Le(nt)),fwe=$4(),mwe=q4(),Wm=lwe(),Awe=dwe(),rR=sn(),FIt=(Xn(),Le(jr)),V4=LZ(),QZ=class extends rR.InstrumentationBase{constructor(t={}){super(Awe.PACKAGE_NAME,Awe.PACKAGE_VERSION,t)}init(){return[new rR.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,rR.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,rR.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,rR.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),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Wm.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Wm.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let s=t?this.router:this._router,u=r.apply(this,i);if(s){let l=s.stack[s.stack.length-1];n._applyPatch(l,(0,Wm.getLayerPath)(i))}return u}}}_applyPatch(t,n){let r=this;t[V4.kLayerPatched]!==!0&&(t[V4.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(s,u){let{isLayerPathStored:l}=(0,Wm.storeLayerPath)(s,n),p=(0,Wm.getConstructedRoute)(s),h=(0,Wm.getActualMatchedRoute)(s),y={[FIt.ATTR_HTTP_ROUTE]:h},S=(0,Wm.getLayerMetadata)(p,t,n),T=S.attributes[mwe.AttributeNames.EXPRESS_TYPE],v=(0,pwe.getRPCMetadata)(Vc.context.active());if(v?.type===pwe.RPCType.HTTP&&(v.route=h),(0,Wm.isLayerIgnored)(S.name,T,r.getConfig()))return T===fwe.ExpressLayerType.MIDDLEWARE&&s[V4._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Vc.trace.getSpan(Vc.context.active())===void 0)return o.apply(this,arguments);let R=r._getSpanName({request:s,layerType:T,route:p},S.name),x=r.tracer.startSpan(R,{attributes:Object.assign(y,S.attributes)}),O=Vc.context.active(),M=Vc.trace.setSpan(O,x),{requestHook:j}=r.getConfig();j&&(0,rR.safeExecuteInTheMiddle)(()=>j(x,{request:s,layerType:T,route:p}),se=>{se&&Vc.diag.error("express instrumentation: request hook failed",se)},!0);let G=!1;S.attributes[mwe.AttributeNames.EXPRESS_TYPE]===fwe.ExpressLayerType.ROUTER&&(x.end(),G=!0,M=O);let H=()=>{G===!1&&(G=!0,x.end())},V=Array.from(arguments),ae=V.findIndex(se=>typeof se=="function");ae>=0&&(arguments[ae]=function(){let se=arguments[0],Ee=![void 0,null,"route","router"].includes(se);if(!G&&Ee){let[Ft,ve]=(0,Wm.asErrorAndMessage)(se);x.recordException(Ft),x.setStatus({code:Vc.SpanStatusCode.ERROR,message:ve})}G===!1&&(G=!0,s.res?.removeListener("finish",H),x.end()),!(s.route&&Ee)&&l&&s[V4._LAYERS_STORE_PROPERTY].pop();let Ke=V[ae],Ze=Vc.context.active(),xe=Vc.trace.getSpan(O),St=xe?Vc.trace.setSpan(Ze,xe):Ze;return Vc.context.bind(St,Ke).apply(this,arguments)});try{return Vc.context.bind(M,o).apply(this,arguments)}catch(se){let[Ee,Ke]=(0,Wm.asErrorAndMessage)(se);throw x.recordException(Ee),x.setStatus({code:Vc.SpanStatusCode.ERROR,message:Ke}),se}finally{G||u.once("finish",H)}};for(let s in o)Object.defineProperty(i,s,{get(){return o[s]},set(u){o[s]=u}});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 Vc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};Y4.ExpressInstrumentation=QZ});var hwe=P(fE=>{"use strict";m();Object.defineProperty(fE,"__esModule",{value:!0});fE.AttributeNames=fE.ExpressLayerType=fE.ExpressInstrumentation=void 0;var GIt=gwe();Object.defineProperty(fE,"ExpressInstrumentation",{enumerable:!0,get:function(){return GIt.ExpressInstrumentation}});var jIt=$4();Object.defineProperty(fE,"ExpressLayerType",{enumerable:!0,get:function(){return jIt.ExpressLayerType}});var zIt=q4();Object.defineProperty(fE,"AttributeNames",{enumerable:!0,get:function(){return zIt.AttributeNames}})});var xs,qS=w(()=>{m();xs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function HIt(e){Hr(e,"auto.http.otel.express");let t=kt(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function $It(e,t){if(Rn()===Kd())return xs&&W.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";Rn().setTransactionName(`${r} ${e.route}`)}return t}var _we,Ewe,ywe,qIt,Swe,Twe=w(()=>{m();_we=ue(hwe(),1);mt();_r();qS();Ewe="Express";ywe=ut(Ewe,()=>new _we.ExpressInstrumentation({requestHook:e=>HIt(e),spanNameHook:(e,t)=>$It(e,t)})),qIt=(()=>({name:Ewe,setupOnce(){ywe()}})),Swe=qIt});var bwe=P(Fw=>{"use strict";m();Object.defineProperty(Fw,"__esModule",{value:!0});Fw.SeverityNumber=void 0;var VIt;(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"})(VIt=Fw.SeverityNumber||(Fw.SeverityNumber={}))});var Z4=P(oR=>{"use strict";m();Object.defineProperty(oR,"__esModule",{value:!0});oR.NOOP_LOGGER=oR.NoopLogger=void 0;var J4=class{emit(t){}};oR.NoopLogger=J4;oR.NOOP_LOGGER=new J4});var Iwe=P(Xm=>{"use strict";m();Object.defineProperty(Xm,"__esModule",{value:!0});Xm.API_BACKWARDS_COMPATIBILITY_VERSION=Xm.makeGetter=Xm._global=Xm.GLOBAL_LOGS_API_KEY=void 0;Xm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Xm._global=globalThis;function YIt(e,t,n){return r=>r===e?t:n}Xm.makeGetter=YIt;Xm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var FZ=P(iR=>{"use strict";m();Object.defineProperty(iR,"__esModule",{value:!0});iR.NOOP_LOGGER_PROVIDER=iR.NoopLoggerProvider=void 0;var KIt=Z4(),W4=class{getLogger(t,n,r){return new KIt.NoopLogger}};iR.NoopLoggerProvider=W4;iR.NOOP_LOGGER_PROVIDER=new W4});var Cwe=P(X4=>{"use strict";m();Object.defineProperty(X4,"__esModule",{value:!0});X4.ProxyLogger=void 0;var JIt=Z4(),GZ=class{constructor(t,n,r,o){this._provider=t,this.name=n,this.version=r,this.options=o}emit(t){this._getLogger().emit(t)}_getLogger(){if(this._delegate)return this._delegate;let t=this._provider._getDelegateLogger(this.name,this.version,this.options);return t?(this._delegate=t,this._delegate):JIt.NOOP_LOGGER}};X4.ProxyLogger=GZ});var vwe=P(e3=>{"use strict";m();Object.defineProperty(e3,"__esModule",{value:!0});e3.ProxyLoggerProvider=void 0;var ZIt=FZ(),WIt=Cwe(),jZ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new WIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:ZIt.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};e3.ProxyLoggerProvider=jZ});var xwe=P(t3=>{"use strict";m();Object.defineProperty(t3,"__esModule",{value:!0});t3.LogsAPI=void 0;var np=Iwe(),XIt=FZ(),Rwe=vwe(),zZ=class e{constructor(){this._proxyLoggerProvider=new Rwe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return np._global[np.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(np._global[np.GLOBAL_LOGS_API_KEY]=(0,np.makeGetter)(np.API_BACKWARDS_COMPATIBILITY_VERSION,t,XIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=np._global[np.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(np._global,np.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete np._global[np.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Rwe.ProxyLoggerProvider}};t3.LogsAPI=zZ});var HZ=P(eA=>{"use strict";m();Object.defineProperty(eA,"__esModule",{value:!0});eA.logs=eA.NoopLogger=eA.NOOP_LOGGER=eA.SeverityNumber=void 0;var eCt=bwe();Object.defineProperty(eA,"SeverityNumber",{enumerable:!0,get:function(){return eCt.SeverityNumber}});var Dwe=Z4();Object.defineProperty(eA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Dwe.NOOP_LOGGER}});Object.defineProperty(eA,"NoopLogger",{enumerable:!0,get:function(){return Dwe.NoopLogger}});var tCt=xwe();eA.logs=tCt.LogsAPI.getInstance()});var Nwe=P(sR=>{"use strict";m();Object.defineProperty(sR,"__esModule",{value:!0});sR.disableInstrumentations=sR.enableInstrumentations=void 0;function nCt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}sR.enableInstrumentations=nCt;function rCt(e){e.forEach(t=>t.disable())}sR.disableInstrumentations=rCt});var Owe=P(n3=>{"use strict";m();Object.defineProperty(n3,"__esModule",{value:!0});n3.registerInstrumentations=void 0;var Bwe=(ze(),Le(nt)),oCt=HZ(),wwe=Nwe();function iCt(e){let t=e.tracerProvider||Bwe.trace.getTracerProvider(),n=e.meterProvider||Bwe.metrics.getMeterProvider(),r=e.loggerProvider||oCt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,wwe.enableInstrumentations)(o,t,n,r),()=>{(0,wwe.disableInstrumentations)(o)}}n3.registerInstrumentations=iCt});var jwe=P(r3=>{"use strict";m();Object.defineProperty(r3,"__esModule",{value:!0});r3.satisfies=void 0;var YZ=(ze(),Le(nt)),Uwe=/^(?: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-]+)*))?$/,sCt=/^(?<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-]+)*))?$/,aCt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function uCt(e,t,n){if(!cCt(e))return YZ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=fCt(e);if(!r)return!1;let o=[],i=Qwe(r,t,o,n);return i&&!n?.includePrerelease?dCt(r,o):i}r3.satisfies=uCt;function cCt(e){return typeof e=="string"&&Uwe.test(e)}function Qwe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if($Z(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=kCt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!$Z(e,i,n,r))return!1;return!0}return $Z(e,t,n,r)}function $Z(e,t,n,r){if(t=pCt(t,r),t.includes(" "))return Qwe(e,t,n,r);{let o=mCt(t);return n.push(o),lCt(e,o)}}function lCt(e,t){if(t.invalid)return!1;if(!t.version||VZ(t.version))return!0;let n=Pwe(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=Pwe(r,o)}return aCt[t.op]?.includes(n)}function dCt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function pCt(e,t){return e=e.trim(),e=wCt(e,t),e=BCt(e),e=OCt(e,t),e=e.trim(),e}function Xu(e){return!e||e.toLowerCase()==="x"||e==="*"}function fCt(e){let t=e.match(Uwe);if(!t){YZ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function mCt(e){if(!e)return{};let t=e.match(sCt);if(!t)return YZ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function VZ(e){return e==="*"||e==="x"||e==="X"}function kwe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function ACt(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 gCt(e,t){if(VZ(e)||VZ(t))return 0;let[n,r]=ACt(kwe(e),kwe(t));return n>r?1:n<r?-1:0}function Pwe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=gCt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Fwe="[a-zA-Z0-9-]",Gwe="0|[1-9]\\d*",hCt=`\\d*[a-zA-Z-]${Fwe}*`,_Ct="((?:<|>)?=?)",Mwe=`(?:${Gwe}|${hCt})`,ECt=`(?:-(${Mwe}(?:\\.${Mwe})*))`,Lwe=`${Fwe}+`,yCt=`(?:\\+(${Lwe}(?:\\.${Lwe})*))`,qZ=`${Gwe}|x|X|\\*`,Gw=`[v=\\s]*(${qZ})(?:\\.(${qZ})(?:\\.(${qZ})(?:${ECt})?${yCt}?)?)?`,SCt=`^${_Ct}\\s*${Gw}$`,TCt=new RegExp(SCt),bCt=`^\\s*(${Gw})\\s+-\\s+(${Gw})\\s*$`,ICt=new RegExp(bCt),CCt="(?:~>?)",vCt=`^${CCt}${Gw}$`,RCt=new RegExp(vCt),xCt="(?:\\^)",DCt=`^${xCt}${Gw}$`,NCt=new RegExp(DCt);function BCt(e){let t=RCt;return e.replace(t,(n,r,o,i,s)=>{let u;return Xu(r)?u="":Xu(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:Xu(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function wCt(e,t){let n=NCt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return Xu(i)?p="":Xu(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Xu(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function OCt(e,t){let n=TCt;return e.replace(n,(r,o,i,s,u,l)=>{let p=Xu(i),h=p||Xu(s),y=h||Xu(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function kCt(e,t){let n=ICt;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(Xu(i)?o="":Xu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Xu(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Xu(y)?h="":Xu(S)?h=`<${+y+1}.0.0-0`:Xu(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var KZ=P(Pa=>{"use strict";m();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.massUnwrap=Pa.unwrap=Pa.massWrap=Pa.wrap=void 0;var ec=console.error.bind(console);function jw(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 PCt=(e,t,n)=>{if(!e||!e[t]){ec("no original function "+String(t)+" to wrap");return}if(!n){ec("no wrapper function"),ec(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){ec("original object and wrapper must be functions");return}let o=n(r,t);return jw(o,"__original",r),jw(o,"__unwrap",()=>{e[t]===o&&jw(e,t,r)}),jw(o,"__wrapped",!0),jw(e,t,o),o};Pa.wrap=PCt;var MCt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Pa.wrap)(r,o,n)})})};Pa.massWrap=MCt;var LCt=(e,t)=>{if(!e||!e[t]){ec("no function to unwrap."),ec(new Error().stack);return}let n=e[t];if(!n.__unwrap)ec("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Pa.unwrap=LCt;var UCt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{ec("must provide one or more modules to patch"),ec(new Error().stack);return}if(!(t&&Array.isArray(t))){ec("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Pa.unwrap)(n,r)})})};Pa.massUnwrap=UCt;function zw(e){e&&e.logger&&(typeof e.logger!="function"?ec("new logger isn't a function, not replacing"):ec=e.logger)}Pa.default=zw;zw.wrap=Pa.wrap;zw.massWrap=Pa.massWrap;zw.unwrap=Pa.unwrap;zw.massUnwrap=Pa.massUnwrap});var zwe=P(i3=>{"use strict";m();Object.defineProperty(i3,"__esModule",{value:!0});i3.InstrumentationAbstract=void 0;var JZ=(ze(),Le(nt)),QCt=HZ(),o3=KZ(),ZZ=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=JZ.diag.createComponentLogger({namespace:t}),this._tracer=JZ.trace.getTracer(t,n),this._meter=JZ.metrics.getMeter(t,n),this._logger=QCt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=o3.wrap;_unwrap=o3.unwrap;_massWrap=o3.massWrap;_massUnwrap=o3.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)}}};i3.InstrumentationAbstract=ZZ});var Hwe=P(mE=>{"use strict";m();Object.defineProperty(mE,"__esModule",{value:!0});mE.ModuleNameTrie=mE.ModuleNameSeparator=void 0;mE.ModuleNameSeparator="/";var s3=class{hooks=[];children=new Map},WZ=class{_trie=new s3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(mE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new s3,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=[],s=!0;for(let u of t.split(mE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};mE.ModuleNameTrie=WZ});var qwe=P(a3=>{"use strict";m();Object.defineProperty(a3,"__esModule",{value:!0});a3.RequireInTheMiddleSingleton=void 0;var FCt=hS(),$we=Qe("path"),XZ=Hwe(),GCt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),eW=class e{_moduleNameTrie=new XZ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new FCt.Hook(null,{internals:!0},(t,n,r)=>{let o=jCt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return GCt?new e:this._instance=this._instance??new e}};a3.RequireInTheMiddleSingleton=eW;function jCt(e){return $we.sep!==XZ.ModuleNameSeparator?e.split($we.sep).join(XZ.ModuleNameSeparator):e}});var Zwe=P(Hw=>{m();var Vwe=[],tW=new WeakMap,Ywe=new WeakMap,Kwe=new Map,Jwe=[],zCt={set(e,t,n){let r=tW.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=Ywe.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=tW.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function HCt(e,t,n,r,o){Kwe.set(e,o),tW.set(t,n),Ywe.set(t,r);let i=new Proxy(t,zCt);Vwe.forEach(s=>s(e,i,o)),Jwe.push([e,i,o])}Hw.register=HCt;Hw.importHooks=Vwe;Hw.specifiers=Kwe;Hw.toHook=Jwe});var iW=P((Gxn,uR)=>{m();var Wwe=Qe("path"),$Ct=HU(),{fileURLToPath:qCt}=Qe("url"),{MessageChannel:VCt}=Qe("worker_threads"),{isBuiltin:nW}=Qe("module");nW||(nW=()=>!0);var{importHooks:rW,specifiers:YCt,toHook:KCt}=Zwe();function Xwe(e){rW.push(e),KCt.forEach(([t,n,r])=>e(t,n,r))}function eOe(e){let t=rW.indexOf(e);t>-1&&rW.splice(t,1)}function aR(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var oW;function JCt(){let{port1:e,port2:t}=new VCt,n=0,r;oW=u=>{n++,e.postMessage(u)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let u=setInterval(()=>{},1e3),l=new Promise(p=>{r=p}).then(()=>{clearInterval(u)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function $w(e,t,n){if(!(this instanceof $w))return new $w(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;oW&&Array.isArray(e)&&oW(e),this._iitmHook=(o,i,s)=>{let u=o,l=u.startsWith("node:"),p,h;if(l){let y=o.slice(5);nW(y)&&(o=y)}else if(u.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{p=qCt(o),o=p}catch{}if(Error.stackTraceLimit=y,p){let S=$Ct(p);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(p&&y===p)aR(n,i,p,void 0);else if(y===o){if(!h)aR(n,i,o,h);else if(h.endsWith(YCt.get(u)))aR(n,i,o,h);else if(r){let S=o+Wwe.sep+Wwe.relative(h,p);aR(n,i,S,h)}}else y===s&&aR(n,i,s,h);else aR(n,i,o,h)},Xwe(this._iitmHook)}$w.prototype.unhook=function(){eOe(this._iitmHook)};uR.exports=$w;uR.exports.Hook=$w;uR.exports.addHook=Xwe;uR.exports.removeHook=eOe;uR.exports.createAddHookMessageChannel=JCt});var sW=P(AE=>{"use strict";m();Object.defineProperty(AE,"__esModule",{value:!0});AE.isWrapped=AE.safeExecuteInTheMiddleAsync=AE.safeExecuteInTheMiddle=void 0;function ZCt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}AE.safeExecuteInTheMiddle=ZCt;async function WCt(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}}AE.safeExecuteInTheMiddleAsync=WCt;function XCt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}AE.isWrapped=XCt});var rOe=P(u3=>{"use strict";m();Object.defineProperty(u3,"__esModule",{value:!0});u3.InstrumentationBase=void 0;var qw=Qe("path"),tOe=Qe("util"),evt=jwe(),aW=KZ(),tvt=zwe(),nvt=qwe(),rvt=iW(),Vw=(ze(),Le(nt)),ovt=hS(),ivt=Qe("fs"),svt=sW(),uW=class extends tvt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=nvt.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,svt.isWrapped)(t[n])&&this._unwrap(t,n),tOe.types.isProxy(t)){let o=(0,aW.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,aW.wrap)(t,n,r)};_unwrap=(t,n)=>tOe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,aW.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{Vw.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Vw.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{Vw.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){Vw.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=Qe.resolve(n);Qe.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,ivt.readFileSync)(qw.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{Vw.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 nOe(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 s=t.files??[],u=qw.normalize(r);return s.filter(p=>p.name===u&&nOe(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,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(p,t.moduleVersion)):p),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=(s,u,l)=>{if(!l&&qw.isAbsolute(u)){let p=qw.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=qw.isAbsolute(t.name)?new ovt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new rvt.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}};u3.InstrumentationBase=uW;function nOe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,evt.satisfies)(t,r,{includePrerelease:n}))}});var oOe=P(c3=>{"use strict";m();Object.defineProperty(c3,"__esModule",{value:!0});c3.normalize=void 0;var avt=Qe("path");Object.defineProperty(c3,"normalize",{enumerable:!0,get:function(){return avt.normalize}})});var iOe=P(cR=>{"use strict";m();Object.defineProperty(cR,"__esModule",{value:!0});cR.normalize=cR.InstrumentationBase=void 0;var uvt=rOe();Object.defineProperty(cR,"InstrumentationBase",{enumerable:!0,get:function(){return uvt.InstrumentationBase}});var cvt=oOe();Object.defineProperty(cR,"normalize",{enumerable:!0,get:function(){return cvt.normalize}})});var cW=P(lR=>{"use strict";m();Object.defineProperty(lR,"__esModule",{value:!0});lR.normalize=lR.InstrumentationBase=void 0;var sOe=iOe();Object.defineProperty(lR,"InstrumentationBase",{enumerable:!0,get:function(){return sOe.InstrumentationBase}});Object.defineProperty(lR,"normalize",{enumerable:!0,get:function(){return sOe.normalize}})});var aOe=P(l3=>{"use strict";m();Object.defineProperty(l3,"__esModule",{value:!0});l3.InstrumentationNodeModuleDefinition=void 0;var lW=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}};l3.InstrumentationNodeModuleDefinition=lW});var uOe=P(d3=>{"use strict";m();Object.defineProperty(d3,"__esModule",{value:!0});d3.InstrumentationNodeModuleFile=void 0;var lvt=cW(),dW=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,lvt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};d3.InstrumentationNodeModuleFile=dW});var cOe=P(VS=>{"use strict";m();Object.defineProperty(VS,"__esModule",{value:!0});VS.semconvStabilityFromStr=VS.SemconvStability=void 0;var p3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(p3=VS.SemconvStability||(VS.SemconvStability={}));function dvt(e,t){let n=p3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=p3.DUPLICATE;break}else o.toLowerCase()===e&&(n=p3.STABLE);return n}VS.semconvStabilityFromStr=dvt});var dOe=P(ss=>{"use strict";m();Object.defineProperty(ss,"__esModule",{value:!0});ss.semconvStabilityFromStr=ss.SemconvStability=ss.safeExecuteInTheMiddleAsync=ss.safeExecuteInTheMiddle=ss.isWrapped=ss.InstrumentationNodeModuleFile=ss.InstrumentationNodeModuleDefinition=ss.InstrumentationBase=ss.registerInstrumentations=void 0;var pvt=Owe();Object.defineProperty(ss,"registerInstrumentations",{enumerable:!0,get:function(){return pvt.registerInstrumentations}});var fvt=cW();Object.defineProperty(ss,"InstrumentationBase",{enumerable:!0,get:function(){return fvt.InstrumentationBase}});var mvt=aOe();Object.defineProperty(ss,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return mvt.InstrumentationNodeModuleDefinition}});var Avt=uOe();Object.defineProperty(ss,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Avt.InstrumentationNodeModuleFile}});var pW=sW();Object.defineProperty(ss,"isWrapped",{enumerable:!0,get:function(){return pW.isWrapped}});Object.defineProperty(ss,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return pW.safeExecuteInTheMiddle}});Object.defineProperty(ss,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return pW.safeExecuteInTheMiddleAsync}});var lOe=cOe();Object.defineProperty(ss,"SemconvStability",{enumerable:!0,get:function(){return lOe.SemconvStability}});Object.defineProperty(ss,"semconvStabilityFromStr",{enumerable:!0,get:function(){return lOe.semconvStabilityFromStr}})});var pOe=P((uDn,gvt)=>{gvt.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 mOe=P(YS=>{"use strict";m();Object.defineProperty(YS,"__esModule",{value:!0});YS.range=YS.balanced=void 0;var hvt=(e,t,n)=>{let r=e instanceof RegExp?fOe(e,n):e,o=t instanceof RegExp?fOe(t,n):t,i=r!==null&&o!=null&&(0,YS.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)}};YS.balanced=hvt;var fOe=(e,t)=>{let n=t.match(e);return n?n[0]:null},_vt=(e,t,n)=>{let r,o,i,s,u,l=n.indexOf(e),p=n.indexOf(t,l+1),h=l;if(l>=0&&p>0){if(e===t)return[l,p];for(r=[],i=n.length;h>=0&&!u;){if(h===l)r.push(h),l=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(u=[y,p])}else o=r.pop(),o!==void 0&&o<i&&(i=o,s=p),p=n.indexOf(t,h+1);h=l<p&&l>=0?l:p}r.length&&s!==void 0&&(u=[i,s])}return u};YS.range=_vt});var SOe=P(dR=>{"use strict";m();Object.defineProperty(dR,"__esModule",{value:!0});dR.EXPANSION_MAX=void 0;dR.expand=Bvt;var AOe=mOe(),gOe="\0SLASH"+Math.random()+"\0",hOe="\0OPEN"+Math.random()+"\0",mW="\0CLOSE"+Math.random()+"\0",_Oe="\0COMMA"+Math.random()+"\0",EOe="\0PERIOD"+Math.random()+"\0",Evt=new RegExp(gOe,"g"),yvt=new RegExp(hOe,"g"),Svt=new RegExp(mW,"g"),Tvt=new RegExp(_Oe,"g"),bvt=new RegExp(EOe,"g"),Ivt=/\\\\/g,Cvt=/\\{/g,vvt=/\\}/g,Rvt=/\\,/g,xvt=/\\\./g;dR.EXPANSION_MAX=1e5;function fW(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Dvt(e){return e.replace(Ivt,gOe).replace(Cvt,hOe).replace(vvt,mW).replace(Rvt,_Oe).replace(xvt,EOe)}function Nvt(e){return e.replace(Evt,"\\").replace(yvt,"{").replace(Svt,"}").replace(Tvt,",").replace(bvt,".")}function yOe(e){if(!e)return[""];let t=[],n=(0,AOe.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,s=r.split(",");s[s.length-1]+="{"+o+"}";let u=yOe(i);return i.length&&(s[s.length-1]+=u.shift(),s.push.apply(s,u)),t.push.apply(t,s),t}function Bvt(e,t={}){if(!e)return[];let{max:n=dR.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Yw(Dvt(e),n,!0).map(Nvt)}function wvt(e){return"{"+e+"}"}function Ovt(e){return/^-?0\d/.test(e)}function kvt(e,t){return e<=t}function Pvt(e,t){return e>=t}function Yw(e,t,n){let r=[],o=(0,AOe.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?Yw(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let u=0;u<s.length&&u<t;u++){let l=i+"{"+o.body+"}"+s[u];r.push(l)}else{let u=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),p=u||l,h=o.body.indexOf(",")>=0;if(!p&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+mW+o.post,Yw(e,t,!0)):[e];let y;if(p)y=o.body.split(/\.\./);else if(y=yOe(o.body),y.length===1&&y[0]!==void 0&&(y=Yw(y[0],t,!1).map(wvt),y.length===1))return s.map(T=>o.pre+y[0]+T);let S;if(p&&y[0]!==void 0&&y[1]!==void 0){let T=fW(y[0]),v=fW(y[1]),R=Math.max(y[0].length,y[1].length),x=y.length===3&&y[2]!==void 0?Math.max(Math.abs(fW(y[2])),1):1,O=kvt;v<T&&(x*=-1,O=Pvt);let j=y.some(Ovt);S=[];for(let G=T;O(G,v)&&S.length<t;G+=x){let H;if(l)H=String.fromCharCode(G),H==="\\"&&(H="");else if(H=String(G),j){let V=R-H.length;if(V>0){let ae=new Array(V+1).join("0");G<0?H="-"+ae+H.slice(1):H=ae+H}}S.push(H)}}else{S=[];for(let T=0;T<y.length;T++)S.push.apply(S,Yw(y[T],t,!1))}for(let T=0;T<S.length;T++)for(let v=0;v<s.length&&r.length<t;v++){let R=i+S[T]+s[v];(!n||p||R)&&r.push(R)}}return r}});var TOe=P(f3=>{"use strict";m();Object.defineProperty(f3,"__esModule",{value:!0});f3.assertValidPattern=void 0;var Mvt=1024*64,Lvt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>Mvt)throw new TypeError("pattern is too long")};f3.assertValidPattern=Lvt});var IOe=P(m3=>{"use strict";m();Object.defineProperty(m3,"__esModule",{value:!0});m3.parseClass=void 0;var Uvt={"[: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]},Kw=e=>e.replace(/[[\]\\-]/g,"\\$&"),Qvt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),bOe=e=>e.join(""),Fvt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,s=!1,u=!1,l=!1,p=!1,h=n,y="";e:for(;i<e.length;){let R=e.charAt(i);if((R==="!"||R==="^")&&i===n+1){p=!0,i++;continue}if(R==="]"&&s&&!l){h=i+1;break}if(s=!0,R==="\\"&&!l){l=!0,i++;continue}if(R==="["&&!l){for(let[x,[O,M,j]]of Object.entries(Uvt))if(e.startsWith(x,i)){if(y)return["$.",!1,e.length-n,!0];i+=x.length,j?o.push(O):r.push(O),u=u||M;continue e}}if(l=!1,y){R>y?r.push(Kw(y)+"-"+Kw(R)):R===y&&r.push(Kw(R)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(Kw(R+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=R,i+=2;continue}r.push(Kw(R)),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])&&!p){let R=r[0].length===2?r[0].slice(-1):r[0];return[Qvt(R),!1,h-n,!1]}let S="["+(p?"^":"")+bOe(r)+"]",T="["+(p?"":"^")+bOe(o)+"]";return[r.length&&o.length?"("+S+"|"+T+")":r.length?S:T,u,h-n,!0]};m3.parseClass=Fvt});var g3=P(A3=>{"use strict";m();Object.defineProperty(A3,"__esModule",{value:!0});A3.unescape=void 0;var Gvt=(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");A3.unescape=Gvt});var hW=P(y3=>{"use strict";m();var Yc;Object.defineProperty(y3,"__esModule",{value:!0});y3.AST=void 0;var jvt=IOe(),h3=g3(),zvt=new Set(["!","?","+","*","@"]),AW=e=>zvt.has(e),COe=e=>AW(e.type),Hvt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),$vt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),qvt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),vOe=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Vvt="(?!(?:^|/)\\.\\.?(?:$|/))",_3="(?!\\.)",Yvt=new Set(["[","."]),Kvt=new Set(["..","."]),Jvt=new Set("().*{}+?[]^$\\!"),Zvt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),gW="[^/]",ROe=gW+"*?",xOe=gW+"+?",Wvt=0,E3=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++Wvt;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.#a=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.#s!==void 0?this.#s:this.type?this.#s=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#s=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.#a+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 Yc&&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.#a===0)return!0;let t=this.#t;for(let n=0;n<this.#a;n++){let r=t.#e[n];if(!(r instanceof Yc&&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.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Yc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let s=o.maxExtglobRecursion??2,u=!1,l=!1,p=-1,h=!1;if(n.type===null){let R=r,x="";for(;R<t.length;){let O=t.charAt(R++);if(u||O==="\\"){u=!u,x+=O;continue}if(l){R===p+1?(O==="^"||O==="!")&&(h=!0):O==="]"&&!(R===p+2&&h)&&(l=!1),x+=O;continue}else if(O==="["){l=!0,p=R,h=!1,x+=O;continue}if(!o.noext&&AW(O)&&t.charAt(R)==="("&&i<=s){n.push(x),x="";let j=new Yc(O,n);R=Yc.#d(t,j,R,o,i+1),n.push(j);continue}x+=O}return n.push(x),R}let y=r+1,S=new Yc(null,n),T=[],v="";for(;y<t.length;){let R=t.charAt(y++);if(u||R==="\\"){u=!u,v+=R;continue}if(l){y===p+1?(R==="^"||R==="!")&&(h=!0):R==="]"&&!(y===p+2&&h)&&(l=!1),v+=R;continue}else if(R==="["){l=!0,p=y,h=!1,v+=R;continue}if(!o.noext&&AW(R)&&t.charAt(y)==="("&&(i<=s||n&&n.#p(R))){let O=n&&n.#p(R)?0:1;S.push(v),v="";let M=new Yc(R,S);S.push(M),y=Yc.#d(t,M,y,o,i+O);continue}if(R==="|"){S.push(v),v="",T.push(S),S=new Yc(null,n);continue}if(R===")")return v===""&&n.#e.length===0&&(n.#l=!0),S.push(v),v="",n.push(...T,S),y;v+=R}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#m(t,$vt)}#m(t,n=Hvt){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=qvt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Yc(null,r,this.options);o.#e.push(""),r.push(o),this.#A(t,n)}#A(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.#s=void 0}#y(t){return!!vOe.get(this.type)?.has(t)}#S(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.#y(n.type)}#T(t){let n=vOe.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.#s=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new Yc(null,void 0,n);return Yc.#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 u=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,u),{_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()),!COe(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(T=>typeof T!="string"),p=this.#e.map(T=>{let[v,R,x,O]=typeof T=="string"?Yc.#b(T,this.#r,l):T.toRegExpSource(t);return this.#r=this.#r||x,this.#o=this.#o||O,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Kvt.has(this.#e[0]))){let v=Yvt,R=n&&v.has(p.charAt(0))||p.startsWith("\\.")&&v.has(p.charAt(2))||p.startsWith("\\.\\.")&&v.has(p.charAt(4)),x=!n&&!t&&v.has(p.charAt(0));h=R?Vvt:x?_3:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+p+y,(0,h3.unescape)(p),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 l=this.toString(),p=this;return p.#e=[l],p.type=null,p.#r=void 0,[l,(0,h3.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!_3?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let u="";if(this.type==="!"&&this.#l)u=(this.isStart()&&!n?_3:"")+xOe;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?_3:"")+ROe+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;u=o+i+l}return[u,(0,h3.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(COe(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.#m(o)?(n=!1,this.#A(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#S(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#s=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,s]=n.toRegExpSource(t);return this.#o=this.#o||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#b(t,n,r=!1){let o=!1,i="",s=!1,u=!1;for(let l=0;l<t.length;l++){let p=t.charAt(l);if(o){o=!1,i+=(Jvt.has(p)?"\\":"")+p;continue}if(p==="*"){if(u)continue;u=!0,i+=r&&/^[*]+$/.test(t)?xOe:ROe,n=!0;continue}else u=!1;if(p==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(p==="["){let[h,y,S,T]=(0,jvt.parseClass)(t,l);if(S){i+=h,s=s||y,l+=S-1,n=n||T;continue}}if(p==="?"){i+=gW,n=!0;continue}i+=Zvt(p)}return[i,(0,h3.unescape)(t),!!n,s]}};y3.AST=E3;Yc=E3});var _W=P(S3=>{"use strict";m();Object.defineProperty(S3,"__esModule",{value:!0});S3.escape=void 0;var Xvt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");S3.escape=Xvt});var POe=P(At=>{"use strict";m();Object.defineProperty(At,"__esModule",{value:!0});At.unescape=At.escape=At.AST=At.Minimatch=At.match=At.makeRe=At.braceExpand=At.defaults=At.filter=At.GLOBSTAR=At.sep=At.minimatch=void 0;var eRt=SOe(),T3=TOe(),BOe=hW(),tRt=_W(),nRt=g3(),rRt=(e,t,n={})=>((0,T3.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new KS(t,n).match(e));At.minimatch=rRt;var oRt=/^\*+([^+@!?\*\[\(]*)$/,iRt=e=>t=>!t.startsWith(".")&&t.endsWith(e),sRt=e=>t=>t.endsWith(e),aRt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),uRt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),cRt=/^\*+\.\*+$/,lRt=e=>!e.startsWith(".")&&e.includes("."),dRt=e=>e!=="."&&e!==".."&&e.includes("."),pRt=/^\.\*+$/,fRt=e=>e!=="."&&e!==".."&&e.startsWith("."),mRt=/^\*+$/,ARt=e=>e.length!==0&&!e.startsWith("."),gRt=e=>e.length!==0&&e!=="."&&e!=="..",hRt=/^\?+([^+@!?\*\[\(]*)?$/,_Rt=([e,t=""])=>{let n=wOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},ERt=([e,t=""])=>{let n=OOe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},yRt=([e,t=""])=>{let n=OOe([e]);return t?r=>n(r)&&r.endsWith(t):n},SRt=([e,t=""])=>{let n=wOe([e]);return t?r=>n(r)&&r.endsWith(t):n},wOe=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},OOe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},kOe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",DOe={win32:{sep:"\\"},posix:{sep:"/"}};At.sep=kOe==="win32"?DOe.win32.sep:DOe.posix.sep;At.minimatch.sep=At.sep;At.GLOBSTAR=Symbol("globstar **");At.minimatch.GLOBSTAR=At.GLOBSTAR;var TRt="[^/]",bRt=TRt+"*?",IRt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",CRt="(?:(?!(?:\\/|^)\\.).)*?",vRt=(e,t={})=>n=>(0,At.minimatch)(n,e,t);At.filter=vRt;At.minimatch.filter=At.filter;var rp=(e,t={})=>Object.assign({},e,t),RRt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return At.minimatch;let t=At.minimatch;return Object.assign((r,o,i={})=>t(r,o,rp(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,rp(e,i))}static defaults(o){return t.defaults(rp(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,rp(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,rp(e,i))}},unescape:(r,o={})=>t.unescape(r,rp(e,o)),escape:(r,o={})=>t.escape(r,rp(e,o)),filter:(r,o={})=>t.filter(r,rp(e,o)),defaults:r=>t.defaults(rp(e,r)),makeRe:(r,o={})=>t.makeRe(r,rp(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,rp(e,o)),match:(r,o,i={})=>t.match(r,o,rp(e,i)),sep:t.sep,GLOBSTAR:At.GLOBSTAR})};At.defaults=RRt;At.minimatch.defaults=At.defaults;var xRt=(e,t={})=>((0,T3.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,eRt.expand)(e,{max:t.braceExpandMax}));At.braceExpand=xRt;At.minimatch.braceExpand=At.braceExpand;var DRt=(e,t={})=>new KS(e,t).makeRe();At.makeRe=DRt;At.minimatch.makeRe=At.makeRe;var NRt=(e,t,n={})=>{let r=new KS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};At.match=NRt;At.minimatch.match=At.match;var NOe=/[?*]|[+@!]\(.*?\)|\[|\]/,BRt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),KS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,T3.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||kOe,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,s,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!NOe.test(i[2]))&&!NOe.test(i[3]),p=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(p)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(l=>this.parse(l))});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 s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[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 s=o;for(;r[s+1]==="**";)s++;s>o&&r.splice(o+1,s-o);let u=r[o+1],l=r[o+2],p=r[o+3];if(u!==".."||!l||l==="."||l===".."||!p||p==="."||p==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let u=r[s];s===1&&u===""&&r[0]===""||(u==="."||u==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let s=r[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let l=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...l),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,s=[],u="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])s.push(u==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])s.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])s.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(u==="b")return!1;u="a",s.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(u==="a")return!1;u="b",s.push(n[i]),o++,i++}else return!1;return t.length===n.length&&s}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 u=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!u&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),p=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!p&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=l?3:u?0:void 0,S=h?3:p?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[T,v]=[t[y],n[S]];T.toLowerCase()===v.toLowerCase()&&(n[S]=T,i=S,o=y)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(At.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let s=n.indexOf(At.GLOBSTAR,i),u=n.lastIndexOf(At.GLOBSTAR),[l,p,h]=r?[n.slice(i,s),n.slice(s+1),[]]:[n.slice(i,s),n.slice(s+1,u),n.slice(u+1)];if(l.length){let M=t.slice(o,o+l.length);if(!this.#o(M,l,r,0,0))return!1;o+=l.length,i+=l.length}let y=0;if(h.length){if(h.length+o>t.length)return!1;let M=t.length-h.length;if(this.#o(t,h,r,M,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(M--,!this.#o(t,h,r,M,0)))return!1;y=h.length+1}}if(!p.length){let M=!!y;for(let j=o;j<t.length-y;j++){let G=String(t[j]);if(M=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||M}let S=[[[],0]],T=S[0],v=0,R=[0];for(let M of p)M===At.GLOBSTAR?(R.push(v),T=[[],0],S.push(T)):(T[0].push(M),v++);let x=S.length-1,O=t.length-y;for(let M of S)M[1]=O-(R[x--]+M[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,s,u){let l=n[o];if(!l){for(let y=r;y<t.length;y++){u=!0;let S=t[y];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return u}let[p,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+p.length),p,i,r,0)&&s<this.maxGlobstarRecursion){let T=this.#r(t,n,r+p.length,o+1,i,s+1,u);if(T!==!1)return T}let S=t[r];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1;r++}return i||null}#o(t,n,r,o,i){let s,u,l,p;for(s=o,u=i,p=t.length,l=n.length;s<p&&u<l;s++,u++){this.debug("matchOne loop");let h=n[u],y=t[s];if(this.debug(n,h,y),h===!1||h===At.GLOBSTAR)return!1;let S;if(typeof h=="string"?(S=y===h,this.debug("string match",h,y,S)):(S=h.test(y),this.debug("pattern match",h,y,S)),!S)return!1}if(s===p&&u===l)return!0;if(s===p)return r;if(u===l)return s===p-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,At.braceExpand)(this.pattern,this.options)}parse(t){(0,T3.assertValidPattern)(t);let n=this.options;if(t==="**")return At.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(mRt))?o=n.dot?gRt:ARt:(r=t.match(oRt))?o=(n.nocase?n.dot?uRt:aRt:n.dot?sRt:iRt)(r[1]):(r=t.match(hRt))?o=(n.nocase?n.dot?ERt:_Rt:n.dot?yRt:SRt)(r):(r=t.match(cRt))?o=n.dot?dRt:lRt:(r=t.match(pRt))&&(o=fRt);let i=BOe.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?bRt:n.dot?IRt:CRt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let p=l.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?BRt(y):y===At.GLOBSTAR?At.GLOBSTAR:y._src});p.forEach((y,S)=>{let T=p[S+1],v=p[S-1];y!==At.GLOBSTAR||v===At.GLOBSTAR||(v===void 0?T!==void 0&&T!==At.GLOBSTAR?p[S+1]="(?:\\/|"+r+"\\/)?"+T:p[S]=r:T===void 0?p[S-1]=v+"(?:\\/|\\/"+r+")?":T!==At.GLOBSTAR&&(p[S-1]=v+"(?:\\/|\\/"+r+"\\/)"+T,p[S+1]=At.GLOBSTAR))});let h=p.filter(y=>y!==At.GLOBSTAR);if(this.partial&&h.length>=1){let y=[];for(let S=1;S<=h.length;S++)y.push(h.slice(0,S).join("/"));return"(?:"+y.join("|")+")"}return h.join("/")}).join("|"),[s,u]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+u+"$",this.partial&&(i="^(?:\\/|"+s+i.slice(1,-1)+u+")$"),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 s=o[o.length-1];if(!s)for(let u=o.length-2;!s&&u>=0;u--)s=o[u];for(let u=0;u<i.length;u++){let l=i[u],p=o;if(r.matchBase&&l.length===1&&(p=[s]),this.matchOne(p,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return At.minimatch.defaults(t).Minimatch}};At.Minimatch=KS;var wRt=hW();Object.defineProperty(At,"AST",{enumerable:!0,get:function(){return wRt.AST}});var ORt=_W();Object.defineProperty(At,"escape",{enumerable:!0,get:function(){return ORt.escape}});var kRt=g3();Object.defineProperty(At,"unescape",{enumerable:!0,get:function(){return kRt.unescape}});At.minimatch.AST=BOe.AST;At.minimatch.Minimatch=KS;At.minimatch.escape=tRt.escape;At.minimatch.unescape=nRt.unescape});var jOe=P((RDn,SW)=>{"use strict";m();var MOe=Qe("node:diagnostics_channel"),{context:b3,trace:EW,SpanStatusCode:I3,propagation:yW,diag:PRt}=(ze(),Le(nt)),{getRPCMetadata:MRt,RPCType:LRt}=vr(),{ATTR_HTTP_ROUTE:C3,ATTR_HTTP_RESPONSE_STATUS_CODE:LOe,ATTR_HTTP_REQUEST_METHOD:URt,ATTR_URL_PATH:QRt}=(Xn(),Le(jr)),{InstrumentationBase:FRt}=dOe(),{version:GRt,name:UOe}=pOe(),jRt=">=4.0.0 <6",QOe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],Io={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},gE={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Yg="anonymous",hE=Symbol("fastify otel instance"),_E=Symbol("fastify otel request spans"),Jw=Symbol("fastify otel request context"),FOe=Symbol("fastify otel addhook original"),GOe=Symbol("fastify otel setnotfound original"),Zw=Symbol("fastify otel ignore path"),Ww=Symbol("fastify otel record exceptions"),v3=class extends FRt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(UOe,GRt,t),this.logger=PRt.createComponentLogger({namespace:UOe}),this[Zw]=null,this[Ww]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[Ww]=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[Zw]=o=>typeof n=="function"?n(o):(r==null&&(r=POe().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)},MOe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(MOe.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:jRt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(hE,t),r.decorate(FOe,r.addHook),r.decorate(GOe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let T=this[Jw],v=this[_E];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:T,inject:(R,x)=>yW.inject(T,R,x),extract:(R,x)=>yW.extract(T,R,x)}}),r.decorateRequest(_E,null),r.decorateRequest(Jw,null),r.addHook("onRoute",function(T){if(t[Zw]?.(T)===!0){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it matches the ignore path`);return}if(T.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${T.method} ${T.url} because it is disabled`);return}for(let v of QOe)if(T[v]!=null){let R=T[v];if(typeof R=="function")T[v]=y(R,v,{[Io.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Io.FASTIFY_TYPE]:gE.ROUTE,[C3]:T.url,[Io.HOOK_CALLBACK_NAME]:R.name?.length>0?R.name:Yg});else if(Array.isArray(R)){let x=[];for(let O of R)x.push(y(O,v,{[Io.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[Io.FASTIFY_TYPE]:gE.ROUTE,[C3]:T.url,[Io.HOOK_CALLBACK_NAME]:O.name?.length>0?O.name:Yg}));T[v]=x}}T.onSend!=null?T.onSend=Array.isArray(T.onSend)?[...T.onSend,s]:[T.onSend,s]:T.onSend=s,T.onError!=null?T.onError=Array.isArray(T.onError)?[...T.onError,u]:[T.onError,u]:T.onError=u,T.handler=y(T.handler,"handler",{[Io.HOOK_NAME]:`${this.pluginName} - route-handler`,[Io.FASTIFY_TYPE]:gE.HANDLER,[C3]:T.url,[Io.HOOK_CALLBACK_NAME]:T.handler.name.length>0?T.handler.name:Yg})}),r.addHook("onRequest",function(T,v,R){if(this[hE].isEnabled()===!1||T.routeOptions.config?.otel===!1)return R();if(this[hE][Zw]?.({url:T.url,method:T.method})===!0)return this[hE].logger.debug(`Ignoring request ${T.method} ${T.url} because it matches the ignore path`),R();let x=b3.active();EW.getSpan(x)==null&&(x=yW.extract(x,T.headers));let O=MRt(x);T.routeOptions.url!=null&&O?.type===LRt.HTTP&&(O.route=T.routeOptions.url);let M={[Io.ROOT]:"@fastify/otel",[URt]:T.method,[QRt]:T.url};T.routeOptions.url!=null&&(M[C3]=T.routeOptions.url);let j=this[hE].tracer.startSpan("request",{attributes:M},x);try{this[hE]._requestHook?.(j,T)}catch(G){this[hE].logger.error({err:G},"requestHook threw")}T[Jw]=EW.setSpan(x,j),T[_E]=j,b3.with(T[Jw],()=>{R()})}),r.addHook("onResponse",function(T,v,R){let x=T[_E];x!=null&&(x.setAttributes({[LOe]:v.statusCode}),x.end()),T[_E]=null,R()}),r.addHook=l,r.setNotFoundHandler=p,i();function s(S,T,v,R){let x=S[_E];x!=null&&(T.statusCode>=500&&x.setStatus({code:I3.ERROR}),x.setAttributes({[LOe]:T.statusCode}),x.end()),S[_E]=null,R(null,v)}function u(S,T,v,R){let x=S[_E];x!=null&&(x.setStatus({code:I3.ERROR,message:v.message}),t[Ww]!==!1&&x.recordException(v)),R()}function l(S,T){let v=this[FOe];return QOe.includes(S)?v.call(this,S,y(T,S,{[Io.HOOK_NAME]:`${this.pluginName} - ${S}`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Yg})):v.call(this,S,T)}function p(S,T){let v=this[GOe];typeof S=="function"?(T=y(S,"notFoundHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:Yg}),v.call(this,T)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:Yg})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:Yg})),T=y(T,"notFoundHandler",{[Io.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[Io.FASTIFY_TYPE]:gE.INSTANCE,[Io.HOOK_CALLBACK_NAME]:T.name?.length>0?T.name:Yg}),v.call(this,S,T))}function h(S){for(let T of S)if(T?.routeOptions&&T.url&&T.method)return T;return null}function y(S,T,v={}){return function(...x){let O=this[hE],M=h(x);if(M===null)return O.logger.debug(`Ignoring route instrumentation because ${T} was called without a Fastify request argument`),S.call(this,...x);if(O.isEnabled()===!1||M.routeOptions.config?.otel===!1)return O.logger.debug(`Ignoring route instrumentation ${M.routeOptions.method} ${M.routeOptions.url} because it is disabled`),S.call(this,...x);if(O[Zw]?.({url:M.url,method:M.method})===!0)return O.logger.debug(`Ignoring route instrumentation ${M.routeOptions.method} ${M.routeOptions.url} because it matches the ignore path`),S.call(this,...x);let j=M[Jw]??b3.active(),G=S.name?.length>0?S.name:this.pluginName??Yg,H=O.tracer.startSpan(`${T} - ${G}`,{attributes:v},j);if(O._lifecycleHook!=null)try{O._lifecycleHook(H,{hookName:T,request:M,handler:G})}catch(V){O.logger.error({err:V},"Execution of lifecycleHook failed")}return b3.with(EW.setSpan(j,H),function(){try{let V=S.call(this,...x);return typeof V?.then=="function"?V.then(ae=>(H.end(),ae),ae=>(H.setStatus({code:I3.ERROR,message:ae.message}),O[Ww]!==!1&&H.recordException(ae),H.end(),Promise.reject(ae))):(H.end(),V)}catch(V){throw H.setStatus({code:I3.ERROR,message:V.message}),O[Ww]!==!1&&H.recordException(V),H.end(),V}},this)}}}}};SW.exports=v3;SW.exports.FastifyOtelInstrumentation=v3});var Kg,Xw,eO,zOe=w(()=>{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})(Kg||(Kg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(Xw||(Xw={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(eO||(eO={}))});var tO,HOe=w(()=>{m();tO=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function TW(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[tO]||[];return i.push(o),Object.defineProperty(e,tO,{enumerable:!1,configurable:!0,value:i}),o}function R3(e,t){let n=e[tO]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:Ai.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[tO])}function qOe(e,t,n){let r,o;try{o=e(),$Oe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!$Oe(o)&&(t(r,o),r))throw r;return o}}function $Oe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var VOe=w(()=>{m();ze();HOe()});function qRt(){let e=_t();e&&e.on("spanStart",t=>{KOe(t)})}function KOe(e){let t=kt(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"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 D3,JS,zRt,HRt,YOe,$Rt,x3,JOe=w(()=>{m();ze();D3=ue(vr(),1),JS=ue(sn(),1);Xn();mt();zOe();VOe();zRt="0.1.0",HRt="@sentry/instrumentation-fastify-v3",YOe="anonymous",$Rt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),x3=class extends JS.InstrumentationBase{constructor(t={}){super(HRt,zRt,t)}init(){return[new JS.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 s=r,u=(0,D3.getRPCMetadata)(Xe.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&u?.type===D3.RPCType.HTTP&&(u.route=l);let p=r.method||"GET";Rn().setTransactionName(`${p} ${l}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let u=r.name||t||YOe,l=`${eO.MIDDLEWARE} - ${u}`,p=s[1],h=TW(p,i.tracer,l,{[Kg.FASTIFY_TYPE]:Xw.MIDDLEWARE,[Kg.PLUGIN_NAME]:t,[Kg.HOOK_NAME]:n}),y=o&&s[s.length-1];return y&&(s[s.length-1]=function(...S){R3(p),y.apply(this,S)}),Xe.with(qt.setSpan(Xe.active(),h),()=>qOe(()=>r.apply(this,s),S=>{S instanceof Error&&(h.setStatus({code:Ai.ERROR,message:S.message}),h.recordException(S)),o||R3(p)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],u=this.pluginName;if(!$Rt.has(i))return n.apply(this,o);let l=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(u,i,s,l)])}}}_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()),qRt(),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 s=i[0];return t.isEnabled()?(0,JS.safeExecuteInTheMiddle)(()=>r.apply(this,i),u=>{!u&&s instanceof Error&&(u=s),R3(this,u)}):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 s=r,u=s.routeOptions?.handler||s.context?.handler,l=u?.name.startsWith("bound ")?u.name.substring(6):u?.name,p=`${eO.REQUEST_HANDLER} - ${l||this.pluginName||YOe}`,h={[Kg.PLUGIN_NAME]:this.pluginName,[Kg.FASTIFY_TYPE]:Xw.REQUEST_HANDLER,[dV]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Kg.FASTIFY_NAME]=l);let y=TW(o,t.tracer,p,h);KOe(y);let{requestHook:S}=t.getConfig();return S&&(0,JS.safeExecuteInTheMiddle)(()=>S(y,{request:r}),T=>{T&&t._diag.error("request hook failed",T)},!0),Xe.with(qt.setSpan(Xe.active(),y),()=>{i()})}}}});import*as bW from"node:diagnostics_channel";function VRt(){let e=_t();if(e)return e.getIntegrationByName(N3)}function ZOe(e,t,n,r){let o=VRt()?.getShouldHandleError()||nke;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){xs&&W.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 nke(e,t,n){let r=n.statusCode;return r>=500||r<=299}function rke(e){let t=kt(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",s=o===n?.startsWith("handler -"),u=n==="request"||o==="request-handler";if(r[Xt]||!s&&!u&&!i)return;let l=i?"hook":s?"middleware":u?"request_handler":"<unknown>";e.setAttributes({[Pt]:"auto.http.otel.fastify",[Xt]:`${l}.fastify`});let p=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof p=="string"){let h=p.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function KRt(){let e=_t();e&&e.on("spanStart",t=>{rke(t)})}function JRt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&rke(i)}let r=t.routeOptions?.url,o=t.method||"GET";Rn().setTransactionName(`${o} ${r}`)})}var WOe,N3,XOe,eke,YRt,tke,oke=w(()=>{m();WOe=ue(jOe(),1);mt();_r();qS();JOe();N3="Fastify",XOe=ut(`${N3}.v3`,()=>new x3);eke=ut(`${N3}.v5`,()=>{let e=new WOe.FastifyOtelInstrumentation,t=e.plugin();return bW.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?xs&&W.error("Failed to setup Fastify instrumentation",o):(KRt(),r&&JRt(r))})}),bW.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;ZOe.call(ZOe,r,o,i,"diagnostics-channel")}),e}),YRt=(({shouldHandleError:e})=>{let t;return{name:N3,setupOnce(){t=e||nke,XOe(),eke()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),tke=(e={})=>YRt(e)});var IW=P(Cf=>{"use strict";m();Object.defineProperty(Cf,"__esModule",{value:!0});Cf.SpanNames=Cf.TokenKind=Cf.AllowedOperationTypes=void 0;var ZRt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ZRt=Cf.AllowedOperationTypes||(Cf.AllowedOperationTypes={}));var WRt;(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"})(WRt=Cf.TokenKind||(Cf.TokenKind={}));var XRt;(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"})(XRt=Cf.SpanNames||(Cf.SpanNames={}))});var CW=P(nO=>{"use strict";m();Object.defineProperty(nO,"__esModule",{value:!0});nO.AttributeNames=void 0;var ext;(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"})(ext=nO.AttributeNames||(nO.AttributeNames={}))});var B3=P(pR=>{"use strict";m();Object.defineProperty(pR,"__esModule",{value:!0});pR.OTEL_GRAPHQL_DATA_SYMBOL=pR.OTEL_PATCHED_SYMBOL=void 0;pR.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");pR.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var ike=P(w3=>{"use strict";m();Object.defineProperty(w3,"__esModule",{value:!0});w3.OPERATION_NOT_SUPPORTED=void 0;var n1n=B3();w3.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var Eke=P(Ds=>{"use strict";m();Object.defineProperty(Ds,"__esModule",{value:!0});Ds.wrapFieldResolver=Ds.wrapFields=Ds.getSourceFromLocation=Ds.getOperation=Ds.endSpan=Ds.addSpanSource=Ds.addInputVariableAttributes=Ds.isPromise=void 0;var fR=(ze(),Le(nt)),EE=IW(),ZS=CW(),Jg=B3(),ske=Object.values(EE.AllowedOperationTypes),txt=e=>typeof e?.then=="function";Ds.isPromise=txt;var nxt=e=>typeof e=="object"&&e!==null;function vW(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{vW(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{vW(e,`${t}.${r}`,o)}):e.setAttribute(`${ZS.AttributeNames.VARIABLES}${String(t)}`,n)}function rxt(e,t){Object.entries(t).forEach(([n,r])=>{vW(e,n,r)})}Ds.addInputVariableAttributes=rxt;function lke(e,t,n,r,o){let i=Ake(t,n,r,o);e.setAttribute(ZS.AttributeNames.SOURCE,i)}Ds.addSpanSource=lke;function oxt(e,t,n,r,o){let i=dke(n,o);if(i)return{field:i,spanAdded:!1};let u=t().flatResolveSpans?fke(n):pke(n,o);return i={span:ixt(e,t,n,r,o,u)},uxt(n,o,i),{field:i,spanAdded:!0}}function ixt(e,t,n,r,o,i){let s={[ZS.AttributeNames.FIELD_NAME]:r.fieldName,[ZS.AttributeNames.FIELD_PATH]:o.join("."),[ZS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[ZS.AttributeNames.PARENT_NAME]:r.parentType.name},u=e.startSpan(`${EE.SpanNames.RESOLVE} ${s[ZS.AttributeNames.FIELD_PATH]}`,{attributes:s},i?fR.trace.setSpan(fR.context.active(),i):void 0),l=n[Jg.OTEL_GRAPHQL_DATA_SYMBOL].source,p=r.fieldNodes.find(h=>h.kind==="Field");return p&&lke(u,l.loc,t().allowValues,p.loc?.start,p.loc?.end),u}function sxt(e,t){t&&e.recordException(t),e.end()}Ds.endSpan=sxt;function axt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>ske.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>ske.indexOf(n?.operation)!==-1)}Ds.getOperation=axt;function uxt(e,t,n){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function dke(e,t){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function pke(e,t){for(let n=t.length-1;n>0;n--){let r=dke(e,t.slice(0,n));if(r)return r.span}return fke(e)}function fke(e){return e[Jg.OTEL_GRAPHQL_DATA_SYMBOL].span}function cxt(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 lxt(e){return mke(`
37
37
  `,e)}function ake(e){return mke(" ",e)}function mke(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var dxt=[EE.TokenKind.FLOAT,EE.TokenKind.STRING,EE.TokenKind.INT,EE.TokenKind.BLOCK_STRING];function Ake(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,s=typeof r=="number"?r:e.end,u=e.startToken.next,l=1;for(;u;){if(u.start<i){u=u.next,l=u?.line;continue}if(u.end>s){u=u.next,l=u?.line;continue}let p=u.value||u.kind,h="";!t&&dxt.indexOf(u.kind)>=0&&(p="*"),u.kind===EE.TokenKind.STRING&&(p=`"${p}"`),u.kind===EE.TokenKind.EOF&&(p=""),u.line>l?(o+=lxt(u.line-l),l=u.line,h=ake(u.column-1)):u.line===u.prev?.line&&(h=ake(u.start-(u.prev?.end||0))),o+=h+p,u&&(u=u.next)}}return o}Ds.getSourceFromLocation=Ake;function gke(e,t,n){if(!e||e[Jg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Jg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=_ke(t,n,i.resolve)),i.type)){let s=hke(i.type);for(let u of s)gke(u,t,n)}})}Ds.wrapFields=gke;function hke(e){return"ofType"in e?hke(e.ofType):pxt(e)?e.getTypes():fxt(e)?[e]:[]}function pxt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function fxt(e){return"getFields"in e&&typeof e.getFields=="function"}var uke=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:fR.SpanStatusCode.ERROR,message:t.message}),e.end())},cke=(e,t)=>{t&&e.end()};function _ke(e,t,n,r=!1){if(o[Jg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,u,l){if(!n)return;let p=t();if(p.ignoreTrivialResolveSpans&&r&&(nxt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,u,l);if(!u[Jg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,u,l);let h=cxt(p.mergeItems,l&&l.path),y=h.filter(v=>typeof v=="string").length,S,T=!1;if(p.depth>=0&&p.depth<y)S=pke(u,h);else{let{field:v,spanAdded:R}=oxt(e,t,u,l,h);S=v.span,T=R}return fR.context.with(fR.trace.setSpan(fR.context.active(),S),()=>{try{let v=n.call(this,i,s,u,l);return(0,Ds.isPromise)(v)?v.then(R=>(cke(S,T),R),R=>{throw uke(S,R,T),R}):(cke(S,T),v)}catch(v){throw uke(S,v,T),v}})}return o[Jg.OTEL_PATCHED_SYMBOL]=!0,o}Ds.wrapFieldResolver=_ke});var yke=P(mR=>{"use strict";m();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.62.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var bke=P(P3=>{"use strict";m();Object.defineProperty(P3,"__esModule",{value:!0});P3.GraphQLInstrumentation=void 0;var Zg=(ze(),Le(nt)),op=sn(),rO=IW(),O3=CW(),RW=B3(),mxt=ike(),fu=Eke(),Ske=yke(),Tke={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},k3=[">=14.0.0 <17"],xW=class extends op.InstrumentationBase{constructor(t={}){super(Ske.PACKAGE_NAME,Ske.PACKAGE_VERSION,{...Tke,...t})}setConfig(t={}){super.setConfig({...Tke,...t})}init(){let t=new op.InstrumentationNodeModuleDefinition("graphql",k3);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new op.InstrumentationNodeModuleFile("graphql/execution/execute.js",k3,t=>((0,op.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 op.InstrumentationNodeModuleFile("graphql/language/parser.js",k3,t=>((0,op.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new op.InstrumentationNodeModuleFile("graphql/validation/validate.js",k3,t=>((0,op.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 s;if(arguments.length>=2){let p=arguments;s=n._wrapExecuteArgs(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],t)}else{let p=arguments[0];s=n._wrapExecuteArgs(p.schema,p.document,p.rootValue,p.contextValue,p.variableValues,p.operationName,p.fieldResolver,p.typeResolver,t)}let u=(0,fu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(u,s);return s.contextValue[RW.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[RW.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,op.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(p,h)=>{n._handleExecutionResult(l,p,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,fu.endSpan)(t,n);return}if((0,fu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,fu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,fu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,op.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,fu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,s){return t._parse(this,r,i,s)}}}_patchValidate(){let t=this;return function(r){return function(i,s,u,l,p){return t._validate(this,r,i,s,u,p,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(rO.SpanNames.PARSE);return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),s),()=>(0,op.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(u,l)=>{l&&((0,fu.getOperation)(l)?l.loc&&(0,fu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(rO.SpanNames.SCHEMA_PARSE)),(0,fu.endSpan)(s,u)}))}_validate(t,n,r,o,i,s,u){let l=this.tracer.startSpan(rO.SpanNames.VALIDATE,{});return Zg.context.with(Zg.trace.setSpan(Zg.context.active(),l),()=>(0,op.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,u,s),(p,h)=>{o.loc||l.updateName(rO.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:O3.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,fu.endSpan)(l,p)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(rO.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(O3.AttributeNames.OPERATION_TYPE,i);let u=s?.value;u?(o.setAttribute(O3.AttributeNames.OPERATION_NAME,u),o.updateName(`${i} ${u}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=mxt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(O3.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,fu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,fu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,u,l,p){if(o||(o={}),o[RW.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l};let h=u==null,y=u??p;return u=(0,fu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,fu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,fu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:u,typeResolver:l}}};P3.GraphQLInstrumentation=xW});var Ike=P(M3=>{"use strict";m();Object.defineProperty(M3,"__esModule",{value:!0});M3.GraphQLInstrumentation=void 0;var Axt=bke();Object.defineProperty(M3,"GraphQLInstrumentation",{enumerable:!0,get:function(){return Axt.GraphQLInstrumentation}})});function Dke(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function hxt(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 Cke,vke,Rke,gxt,xke,Nke=w(()=>{m();ze();Cke=ue(Ike(),1);mt();_r();Wv();vke="Graphql",Rke=ut(vke,Cke.GraphQLInstrumentation,e=>{let t=Dke(e);return{...t,responseHook(n,r){Hr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!kt(n).status&&n.setStatus({code:Ai.ERROR});let i=kt(n).data,s=i["graphql.operation.type"],u=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let l=gi(n),h=kt(l).data[Jv]||[],y=u?`${s} ${u}`:`${s}`;Array.isArray(h)?(h.push(y),l.setAttribute(Jv,h)):typeof h=="string"?l.setAttribute(Jv,[h,y]):l.setAttribute(Jv,y),kt(l).data["original-description"]||l.setAttribute("original-description",kt(l).description),l.updateName(`${kt(l).data["original-description"]} (${hxt(h)})`)}}}}),gxt=((e={})=>({name:vke,setupOnce(){Rke(Dke(e))}})),xke=gxt});var Bke=P(L3=>{"use strict";m();Object.defineProperty(L3,"__esModule",{value:!0});L3.EVENT_LISTENERS_SET=void 0;L3.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var wke=P(U3=>{"use strict";m();Object.defineProperty(U3,"__esModule",{value:!0});U3.bufferTextMapGetter=void 0;U3.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 Oke=P(or=>{"use strict";m();Object.defineProperty(or,"__esModule",{value:!0});or.METRIC_MESSAGING_PROCESS_DURATION=or.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=or.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=or.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=or.MESSAGING_SYSTEM_VALUE_KAFKA=or.MESSAGING_OPERATION_TYPE_VALUE_SEND=or.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=or.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=or.ATTR_MESSAGING_SYSTEM=or.ATTR_MESSAGING_OPERATION_TYPE=or.ATTR_MESSAGING_OPERATION_NAME=or.ATTR_MESSAGING_KAFKA_OFFSET=or.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=or.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=or.ATTR_MESSAGING_DESTINATION_PARTITION_ID=or.ATTR_MESSAGING_DESTINATION_NAME=or.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;or.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";or.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";or.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";or.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";or.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";or.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";or.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";or.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";or.ATTR_MESSAGING_SYSTEM="messaging.system";or.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";or.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";or.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";or.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";or.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";or.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";or.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";or.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var kke=P(AR=>{"use strict";m();Object.defineProperty(AR,"__esModule",{value:!0});AR.PACKAGE_NAME=AR.PACKAGE_VERSION=void 0;AR.PACKAGE_VERSION="0.23.0";AR.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var Fke=P(F3=>{"use strict";m();Object.defineProperty(F3,"__esModule",{value:!0});F3.KafkaJsInstrumentation=void 0;var $r=(ze(),Le(nt)),ip=sn(),gR=(Xn(),Le(jr)),Pke=Bke(),Mke=wke(),gt=Oke(),Lke=kke();function Q3(e,t,n){return r=>{e.add(t,{...n,...r?{[gR.ATTR_ERROR_TYPE]:r}:{}})}}function Uke(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[gR.ATTR_ERROR_TYPE]:r}:{}})}}var Qke=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],DW=class extends ip.InstrumentationBase{constructor(t={}){super(Lke.PACKAGE_NAME,Lke.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(gt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:Qke}}),this._sentMessages=this.meter.createCounter(gt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(gt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(gt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:Qke}})}init(){let t=r=>{(0,ip.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,ip.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new ip.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,ip.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[Pke.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[Pke.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[gR.ATTR_SERVER_ADDRESS]:n,[gR.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,ip.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,ip.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,ip.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,ip.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,ip.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],s=$r.propagation.extract($r.ROOT_CONTEXT,i.message.headers,Mke.bufferTextMapGetter),u=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[Uke(t._processDuration,Date.now(),{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),Q3(t._consumedMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],p=$r.context.with($r.trace.setSpan(s,u),()=>n.apply(this,o));return t._endSpansOnPromise([u],l,p)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],s=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:$r.ROOT_CONTEXT,attributes:{[gt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return $r.context.with($r.trace.setSpan($r.context.active(),s),()=>{let u=Date.now(),l=[],p=[Q3(n._consumedMessages,i.batch.messages.length,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=$r.propagation.extract($r.ROOT_CONTEXT,y.headers,Mke.bufferTextMapGetter),T=$r.trace.getSpan(S)?.spanContext(),v;T&&(v={context:T}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:gt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),p.push(Uke(n._processDuration,u,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"process",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return l.unshift(s),n._endSpansOnPromise(l,p,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),s=n.apply(this,o);return s.then(u=>{let l=u.send;u.send=function(...T){return $r.context.with($r.trace.setSpan($r.context.active(),i),()=>t._getSendPatch()(l).apply(this,T).catch(R=>{throw i.setStatus({code:$r.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let p=u.sendBatch;u.sendBatch=function(...T){return $r.context.with($r.trace.setSpan($r.context.active(),i),()=>t._getSendBatchPatch()(p).apply(this,T).catch(R=>{throw i.setStatus({code:$r.SpanStatusCode.ERROR,message:R?.message}),i.recordException(R),R}))};let h=u.commit;u.commit=function(...T){let v=h.apply(this,T).then(()=>{i.setStatus({code:$r.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let y=u.abort;u.abort=function(...T){let v=y.apply(this,T);return t._endSpansOnPromise([i],[],v)}}).catch(u=>{i.setStatus({code:$r.SpanStatusCode.ERROR,message:u?.message}),i.recordException(u),i.end()}),s}}_getSendBatchPatch(){let t=this;return n=>function(...o){let s=o[0].topicMessages||[],u=[],l=[];s.forEach(h=>{h.messages.forEach(y=>{u.push(t._startProducerSpan(h.topic,y)),l.push(Q3(t._sentMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let p=n.apply(this,o);return t._endSpansOnPromise(u,l,p)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],s=i.messages.map(p=>t._startProducerSpan(i.topic,p)),u=i.messages.map(p=>Q3(t._sentMessages,1,{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...p.partition!==void 0?{[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(p.partition)}:{}})),l=n.apply(this,o);return t._endSpansOnPromise(s,u,l)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,s=gR.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,s=o.constructor.name),n.forEach(u=>u(s)),t.forEach(u=>{u.setAttribute(gR.ATTR_ERROR_TYPE,s),u.setStatus({code:$r.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:s}){let u=r===gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${u} ${t}`,{kind:r===gt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?$r.SpanKind.CLIENT:$r.SpanKind.CONSUMER,attributes:{...s,[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_DESTINATION_NAME]:t,[gt.ATTR_MESSAGING_OPERATION_TYPE]:r,[gt.ATTR_MESSAGING_OPERATION_NAME]:u,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[gt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:p}=this.getConfig();return p&&n&&(0,ip.safeExecuteInTheMiddle)(()=>p(l,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),l}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:$r.SpanKind.PRODUCER,attributes:{[gt.ATTR_MESSAGING_SYSTEM]:gt.MESSAGING_SYSTEM_VALUE_KAFKA,[gt.ATTR_MESSAGING_DESTINATION_NAME]:t,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[gt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[gt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[gt.ATTR_MESSAGING_OPERATION_NAME]:"send",[gt.ATTR_MESSAGING_OPERATION_TYPE]:gt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},$r.propagation.inject($r.trace.setSpan($r.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,ip.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};F3.KafkaJsInstrumentation=DW});var Gke=P(G3=>{"use strict";m();Object.defineProperty(G3,"__esModule",{value:!0});G3.KafkaJsInstrumentation=void 0;var _xt=Fke();Object.defineProperty(G3,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return _xt.KafkaJsInstrumentation}})});var jke,zke,Hke,Ext,$ke,qke=w(()=>{m();jke=ue(Gke(),1);_r();zke="Kafka",Hke=ut(zke,()=>new jke.KafkaJsInstrumentation({consumerHook(e){Hr(e,"auto.kafkajs.otel.consumer")},producerHook(e){Hr(e,"auto.kafkajs.otel.producer")}})),Ext=(()=>({name:zke,setupOnce(){Hke()}})),$ke=Ext});var Vke=P(hR=>{"use strict";m();Object.defineProperty(hR,"__esModule",{value:!0});hR.PACKAGE_NAME=hR.PACKAGE_VERSION=void 0;hR.PACKAGE_VERSION="0.58.0";hR.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var Zke=P(j3=>{"use strict";m();Object.defineProperty(j3,"__esModule",{value:!0});j3.LruMemoizerInstrumentation=void 0;var Yke=(ze(),Le(nt)),Kke=sn(),Jke=Vke(),NW=class extends Kke.InstrumentationBase{constructor(t={}){super(Jke.PACKAGE_NAME,Jke.PACKAGE_VERSION,t)}init(){return[new Kke.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),s=typeof i=="function"?Yke.context.bind(Yke.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};j3.LruMemoizerInstrumentation=NW});var Wke=P(z3=>{"use strict";m();Object.defineProperty(z3,"__esModule",{value:!0});z3.LruMemoizerInstrumentation=void 0;var yxt=Zke();Object.defineProperty(z3,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return yxt.LruMemoizerInstrumentation}})});var Xke,ePe,tPe,Sxt,nPe,rPe=w(()=>{m();Xke=ue(Wke(),1);_r();ePe="LruMemoizer",tPe=ut(ePe,()=>new Xke.LruMemoizerInstrumentation),Sxt=(()=>({name:ePe,setupOnce(){tPe()}})),nPe=Sxt});var oPe=P(Po=>{"use strict";m();Object.defineProperty(Po,"__esModule",{value:!0});Po.METRIC_DB_CLIENT_CONNECTIONS_USAGE=Po.DB_SYSTEM_VALUE_MONGODB=Po.DB_SYSTEM_NAME_VALUE_MONGODB=Po.ATTR_NET_PEER_PORT=Po.ATTR_NET_PEER_NAME=Po.ATTR_DB_SYSTEM=Po.ATTR_DB_STATEMENT=Po.ATTR_DB_OPERATION=Po.ATTR_DB_NAME=Po.ATTR_DB_MONGODB_COLLECTION=Po.ATTR_DB_CONNECTION_STRING=void 0;Po.ATTR_DB_CONNECTION_STRING="db.connection_string";Po.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Po.ATTR_DB_NAME="db.name";Po.ATTR_DB_OPERATION="db.operation";Po.ATTR_DB_STATEMENT="db.statement";Po.ATTR_DB_SYSTEM="db.system";Po.ATTR_NET_PEER_NAME="net.peer.name";Po.ATTR_NET_PEER_PORT="net.peer.port";Po.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";Po.DB_SYSTEM_VALUE_MONGODB="mongodb";Po.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var iPe=P(oO=>{"use strict";m();Object.defineProperty(oO,"__esModule",{value:!0});oO.MongodbCommandType=void 0;var Txt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(Txt=oO.MongodbCommandType||(oO.MongodbCommandType={}))});var sPe=P(_R=>{"use strict";m();Object.defineProperty(_R,"__esModule",{value:!0});_R.PACKAGE_NAME=_R.PACKAGE_VERSION=void 0;_R.PACKAGE_VERSION="0.67.0";_R.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var cPe=P(H3=>{"use strict";m();Object.defineProperty(H3,"__esModule",{value:!0});H3.MongoDBInstrumentation=void 0;var ti=(ze(),Le(nt)),ir=sn(),Wg=(Xn(),Le(jr)),Jl=oPe(),WS=iPe(),aPe=sPe(),uPe={requireParentSpan:!0},BW=class e extends ir.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(aPe.PACKAGE_NAME,aPe.PACKAGE_VERSION,{...uPe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,ir.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,ir.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...uPe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(Jl.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:s,v4UnpatchConnection:u}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:l,v4UnpatchConnectionPool:p}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new ir.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new ir.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new ir.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,u),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],s,u),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],l,p),new ir.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new ir.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,ir.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,ir.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,ir.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,ir.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,ir.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,ir.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,ir.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,ir.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,ir.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,ir.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),s=this.sessions.length;return o===s?t._connCountAdd(1,t._poolName,"used"):o-1===s&&(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,ir.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,ir.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=ti.context.bind(ti.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let u=n.call(this,o);return u&&typeof u.then=="function"&&u.then(()=>t.setPoolName(o),()=>{}),u}let s=function(u,l){if(u||!l){i(u,l);return}t.setPoolName(o),i(u,l)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,ir.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,ir.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,s,u,l,p){let h=ti.trace.getSpan(ti.context.active()),y=n._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function"||typeof u!="object")return typeof l=="function"?r.call(this,i,s,u,l):r.call(this,i,s,u,l,p);let T=n._getV3SpanAttributes(s,i,u[0],t),v=n._spanNameFromAttrs(T),R=n.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=n._patchEnd(R,S);return typeof l=="function"?r.call(this,i,s,u,x):r.call(this,i,s,u,l,x)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,s,u,l){let p=ti.trace.getSpan(ti.context.active()),h=t._checkSkipInstrumentation(p),y=typeof u=="function"?u:l;if(h||typeof y!="function"||typeof s!="object")return typeof u=="function"?n.call(this,o,i,s,u):n.call(this,o,i,s,u,l);let S=e._getCommandType(s),T=S===WS.MongodbCommandType.UNKNOWN?void 0:S,v=t._getV3SpanAttributes(i,o,s,T),R=t._spanNameFromAttrs(v),x=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v}),O=t._patchEnd(x,y);return typeof u=="function"?n.call(this,o,i,s,O):n.call(this,o,i,s,u,O)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,s,u){let l=ti.trace.getSpan(ti.context.active()),p=t._checkSkipInstrumentation(l),h=u,y=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,u);let S;if(!p){let v=t._getV4SpanAttributes(this,o,i,y),R=t._spanNameFromAttrs(v);S=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v})}let T=t._patchEnd(S,h,this.id,y);return n.call(this,o,i,s,T)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,u=ti.trace.getSpan(ti.context.active()),l=t._checkSkipInstrumentation(u),p=Object.keys(s)[0],h=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let y;if(!l){let v=t._getV4SpanAttributes(this,i,s,p),R=t._spanNameFromAttrs(v);y=t.tracer.startSpan(R,{kind:ti.SpanKind.CLIENT,attributes:v})}let S=t._patchEnd(y,h,this.id,p),T=n.apply(this,o);return T.then(v=>S(null,v),v=>S(v)),T}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,u,l,p){let h=ti.trace.getSpan(ti.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function"||typeof s!="object")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,p);let T=t._getV3SpanAttributes(i,o,s,"find"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,S);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,s,u,l,p){let h=ti.trace.getSpan(ti.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:p;if(y||typeof S!="function")return typeof l=="function"?n.call(this,o,i,s,u,l):n.call(this,o,i,s,u,l,p);let T=t._getV3SpanAttributes(i,o,s.cmd,"getMore"),v=t._spanNameFromAttrs(T),R=t.tracer.startSpan(v,{kind:ti.SpanKind.CLIENT,attributes:T}),x=t._patchEnd(R,S);return typeof l=="function"?n.call(this,o,i,s,u,x):n.call(this,o,i,s,u,l,x)}}static _getCommandType(t){return t.createIndexes!==void 0?WS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?WS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?WS.MongodbCommandType.IS_MASTER:t.count!==void 0?WS.MongodbCommandType.COUNT:t.aggregate!==void 0?WS.MongodbCommandType.AGGREGATE:WS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,s;if(t){let l=typeof t.address=="string"?t.address.split(":"):"";l.length===2&&(i=l[0],s=l[1])}let u;return r?.documents&&r.documents[0]?u=r.documents[0]:r?.cursors?u=r.cursors:u=r,this._getSpanAttributes(n.db,n.collection,i,s,u,o)}_getV3SpanAttributes(t,n,r,o){let i,s;if(n&&n.s&&(i=n.s.options?.host??n.s.host,s=(n.s.options?.port??n.s.port)?.toString(),i==null||s==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],s=y[1]}}let[u,l]=t.toString().split("."),p=r?.query??r?.q??r;return this._getSpanAttributes(u,l,i,s,p,o)}_getSpanAttributes(t,n,r,o,i,s){let u={};if(this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_DB_SYSTEM]=Jl.DB_SYSTEM_VALUE_MONGODB,u[Jl.ATTR_DB_NAME]=t,u[Jl.ATTR_DB_MONGODB_COLLECTION]=n,u[Jl.ATTR_DB_OPERATION]=s,u[Jl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_DB_SYSTEM_NAME]=Jl.DB_SYSTEM_NAME_VALUE_MONGODB,u[Wg.ATTR_DB_NAMESPACE]=t,u[Wg.ATTR_DB_OPERATION_NAME]=s,u[Wg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),p=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,ir.safeExecuteInTheMiddle)(()=>{let h=p(i);this._dbSemconvStability&ir.SemconvStability.OLD&&(u[Jl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&ir.SemconvStability.STABLE&&(u[Wg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return u}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&ir.SemconvStability.STABLE?n=[t[Wg.ATTR_DB_OPERATION_NAME],t[Wg.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||Jl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[Jl.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,ir.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=ti.context.active(),s=this,u=!1;return function(...p){if(!u){u=!0;let h=p[0];if(t){if(h instanceof Error)t.setStatus({code:ti.SpanStatusCode.ERROR,message:h.message});else{let y=p[1];s._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return ti.context.with(i,()=>n.apply(this,p))}}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}};H3.MongoDBInstrumentation=BW});var lPe=P(iO=>{"use strict";m();Object.defineProperty(iO,"__esModule",{value:!0});iO.MongodbCommandType=void 0;var bxt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(bxt=iO.MongodbCommandType||(iO.MongodbCommandType={}))});var dPe=P(ER=>{"use strict";m();Object.defineProperty(ER,"__esModule",{value:!0});ER.MongodbCommandType=ER.MongoDBInstrumentation=void 0;var Ixt=cPe();Object.defineProperty(ER,"MongoDBInstrumentation",{enumerable:!0,get:function(){return Ixt.MongoDBInstrumentation}});var Cxt=lPe();Object.defineProperty(ER,"MongodbCommandType",{enumerable:!0,get:function(){return Cxt.MongodbCommandType}})});function vxt(e){let t=wW(e);return JSON.stringify(t)}function wW(e){if(Array.isArray(e))return e.map(t=>wW(t));if(Rxt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,wW(r)]).reduce((n,r)=>(Dxt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function Rxt(e){return typeof e=="object"&&e!==null&&!xxt(e)}function xxt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function Dxt(e){return Array.isArray(e)}var pPe,fPe,mPe,Nxt,APe,gPe=w(()=>{m();pPe=ue(dPe(),1);_r();fPe="Mongo",mPe=ut(fPe,()=>new pPe.MongoDBInstrumentation({dbStatementSerializer:vxt,responseHook(e){Hr(e,"auto.db.otel.mongo")}}));Nxt=(()=>({name:fPe,setupOnce(){mPe()}})),APe=Nxt});var OW=P(as=>{"use strict";m();Object.defineProperty(as,"__esModule",{value:!0});as.DB_SYSTEM_NAME_VALUE_MONGODB=as.ATTR_NET_PEER_PORT=as.ATTR_NET_PEER_NAME=as.ATTR_DB_USER=as.ATTR_DB_SYSTEM=as.ATTR_DB_STATEMENT=as.ATTR_DB_OPERATION=as.ATTR_DB_NAME=as.ATTR_DB_MONGODB_COLLECTION=void 0;as.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";as.ATTR_DB_NAME="db.name";as.ATTR_DB_OPERATION="db.operation";as.ATTR_DB_STATEMENT="db.statement";as.ATTR_DB_SYSTEM="db.system";as.ATTR_DB_USER="db.user";as.ATTR_NET_PEER_NAME="net.peer.name";as.ATTR_NET_PEER_PORT="net.peer.port";as.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var EPe=P(yE=>{"use strict";m();Object.defineProperty(yE,"__esModule",{value:!0});yE.handleCallbackResponse=yE.handlePromiseResponse=yE.getAttributesFromCollection=void 0;var hPe=(ze(),Le(nt)),aO=sn(),sO=OW(),$3=(Xn(),Le(jr));function Bxt(e,t,n){let r={};return t&aO.SemconvStability.OLD&&(r[sO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[sO.ATTR_DB_NAME]=e.conn.name,r[sO.ATTR_DB_USER]=e.conn.user),t&aO.SemconvStability.STABLE&&(r[$3.ATTR_DB_COLLECTION_NAME]=e.name,r[$3.ATTR_DB_NAMESPACE]=e.conn.name),n&aO.SemconvStability.OLD&&(r[sO.ATTR_NET_PEER_NAME]=e.conn.host,r[sO.ATTR_NET_PEER_PORT]=e.conn.port),n&aO.SemconvStability.STABLE&&(r[$3.ATTR_SERVER_ADDRESS]=e.conn.host,r[$3.ATTR_SERVER_PORT]=e.conn.port),r}yE.getAttributesFromCollection=Bxt;function _Pe(e,t={}){e.recordException(t),e.setStatus({code:hPe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function kW(e,t,n,r=void 0){n&&(0,aO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&hPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function wxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kW(t,o,n,r),o)).catch(o=>{throw _Pe(t,o),o}).finally(()=>t.end()):(kW(t,e,n,r),t.end(),e)}yE.handlePromiseResponse=wxt;function Oxt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,p)=>(l?_Pe(r,l):kW(r,p,i,s),r.end(),e(l,p)),t.apply(n,o)}yE.handleCallbackResponse=Oxt});var yPe=P(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.PACKAGE_NAME=yR.PACKAGE_VERSION=void 0;yR.PACKAGE_VERSION="0.60.0";yR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var CPe=P(Kc=>{"use strict";m();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.MongooseInstrumentation=Kc._ALREADY_INSTRUMENTED=Kc._STORED_PARENT_SPAN=void 0;var Ns=(ze(),Le(nt)),kxt=vr(),PW=EPe(),Ma=sn(),SPe=yPe(),SE=OW(),XS=(Xn(),Le(jr)),q3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Pxt=["remove","count","findOneAndRemove",...q3],Mxt=["count","findOneAndRemove",...q3],Lxt=[...q3];function TPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Pxt:e.startsWith("7.")?Mxt:Lxt:q3}function bPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function IPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Kc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Kc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var MW=class extends Ma.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(SPe.PACKAGE_NAME,SPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ma.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ma.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ma.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,bPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),IPe(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)),TPe(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=TPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,bPe(n)&&this._unwrap(r.Model.prototype,"remove"),IPe(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&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Kc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[XS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Kc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Kc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[XS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let p={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Ma.SemconvStability.OLD&&(p[SE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(p[XS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,p);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(y,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let p=l,h=s,y=u;typeof s=="function"?(p=s,h=void 0,y=void 0):typeof u=="function"&&(p=u,y=void 0);let S={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Ma.SemconvStability.OLD&&(S[SE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(S[XS.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),R=r._handleResponse(v,o,this,arguments,p,n);return R&&typeof R=="object"&&(R[Kc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let p={};switch(t){case"insertMany":p.documents=s;break;case"bulkWrite":p.operations=s;break;default:p.document=s;break}u!==void 0&&(p.options=u);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let T=y(t,p);r._dbSemconvStability&Ma.SemconvStability.OLD&&(h[SE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(h[XS.ATTR_DB_QUERY_TEXT]=T)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ns.trace.getSpan(Ns.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Kc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Kc._STORED_PARENT_SPAN]=Ns.trace.getSpan(Ns.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,PW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ma.SemconvStability.OLD&&(s[SE.ATTR_DB_OPERATION]=r,s[SE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ma.SemconvStability.STABLE&&(s[XS.ATTR_DB_OPERATION_NAME]=r,s[XS.ATTR_DB_SYSTEM_NAME]=SE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Ma.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Ns.SpanKind.CLIENT,attributes:s},i?Ns.trace.setSpan(Ns.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,PW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,PW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ns.context.with((0,kxt.suppressTracing)(Ns.context.active()),t):t()}};Kc.MongooseInstrumentation=MW});var vPe=P(V3=>{"use strict";m();Object.defineProperty(V3,"__esModule",{value:!0});V3.MongooseInstrumentation=void 0;var Uxt=CPe();Object.defineProperty(V3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Uxt.MongooseInstrumentation}})});var RPe,xPe,DPe,Qxt,NPe,BPe=w(()=>{m();RPe=ue(vPe(),1);_r();xPe="Mongoose",DPe=ut(xPe,()=>new RPe.MongooseInstrumentation({responseHook(e){Hr(e,"auto.db.otel.mongoose")}})),Qxt=(()=>({name:xPe,setupOnce(){DPe()}})),NPe=Qxt});var wPe=P(us=>{"use strict";m();Object.defineProperty(us,"__esModule",{value:!0});us.METRIC_DB_CLIENT_CONNECTIONS_USAGE=us.DB_SYSTEM_VALUE_MYSQL=us.ATTR_NET_PEER_PORT=us.ATTR_NET_PEER_NAME=us.ATTR_DB_USER=us.ATTR_DB_SYSTEM=us.ATTR_DB_STATEMENT=us.ATTR_DB_NAME=us.ATTR_DB_CONNECTION_STRING=void 0;us.ATTR_DB_CONNECTION_STRING="db.connection_string";us.ATTR_DB_NAME="db.name";us.ATTR_DB_STATEMENT="db.statement";us.ATTR_DB_SYSTEM="db.system";us.ATTR_DB_USER="db.user";us.ATTR_NET_PEER_NAME="net.peer.name";us.ATTR_NET_PEER_PORT="net.peer.port";us.DB_SYSTEM_VALUE_MYSQL="mysql";us.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var OPe=P(uO=>{"use strict";m();Object.defineProperty(uO,"__esModule",{value:!0});uO.AttributeNames=void 0;var Fxt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(Fxt=uO.AttributeNames||(uO.AttributeNames={}))});var kPe=P(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function Gxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=Gxt;function jxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=jxt;function zxt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=zxt;function Hxt(e,t){return LW(typeof e=="string"?t:t||e.values)}mu.getDbValues=Hxt;function $xt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=$xt;function LW(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=LW;function qxt(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()}mu.getPoolNameOld=qxt});var PPe=P(SR=>{"use strict";m();Object.defineProperty(SR,"__esModule",{value:!0});SR.PACKAGE_NAME=SR.PACKAGE_VERSION=void 0;SR.PACKAGE_VERSION="0.60.0";SR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var LPe=P(Y3=>{"use strict";m();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.MySQLInstrumentation=void 0;var Jc=(ze(),Le(nt)),sp=sn(),TR=(Xn(),Le(jr)),Xg=wPe(),Vxt=OPe(),eT=kPe(),MPe=PPe(),UW=class extends sp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(MPe.PACKAGE_NAME,MPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new sp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,sp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,sp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,sp.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 s=t._allConnections.length,u=t._freeConnections.length,l=s-u,p=(0,eT.getPoolNameOld)(t);r._connCountAdd(-l,p,"used"),r._connCountAdd(-u,p,"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,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),p=u[l].pool;r._setPoolCallbacks(p,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Jc.context.active();return function(o,i){i&&((0,sp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Jc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:p,database:h,user:y}=(0,eT.getConfig)(t.config),S=parseInt(p,10),T=(0,eT.getDbQueryText)(o);r._dbSemconvStability&sp.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,eT.getJDBCString)(l,p,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=y,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&sp.SemconvStability.STABLE&&(u[TR.ATTR_DB_SYSTEM_NAME]=TR.DB_SYSTEM_NAME_VALUE_MYSQL,u[TR.ATTR_DB_NAMESPACE]=h,u[TR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&sp.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(u[Xg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&sp.SemconvStability.STABLE&&(u[TR.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(u[TR.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,eT.getSpanName)(o),{kind:Jc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(Vxt.AttributeNames.MYSQL_VALUES,(0,eT.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Jc.context.active();if(R===-1){let O=Jc.context.with(Jc.trace.setSpan(Jc.context.active(),v),()=>n.apply(t,arguments));return Jc.context.bind(x,O),O.on("error",M=>v.setStatus({code:Jc.SpanStatusCode.ERROR,message:M.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Jc.context.with(Jc.trace.setSpan(Jc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Jc.SpanStatusCode.ERROR,message:o.message}),t.end(),Jc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,eT.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")})}};Y3.MySQLInstrumentation=UW});var UPe=P(K3=>{"use strict";m();Object.defineProperty(K3,"__esModule",{value:!0});K3.MySQLInstrumentation=void 0;var Yxt=LPe();Object.defineProperty(K3,"MySQLInstrumentation",{enumerable:!0,get:function(){return Yxt.MySQLInstrumentation}})});var QPe,FPe,GPe,Kxt,jPe,zPe=w(()=>{m();QPe=ue(UPe(),1);_r();FPe="Mysql",GPe=ut(FPe,()=>new QPe.MySQLInstrumentation({})),Kxt=(()=>({name:FPe,setupOnce(){GPe()}})),jPe=Kxt});var QW=P(aa=>{"use strict";m();Object.defineProperty(aa,"__esModule",{value:!0});aa.DB_SYSTEM_VALUE_MYSQL=aa.ATTR_NET_PEER_PORT=aa.ATTR_NET_PEER_NAME=aa.ATTR_DB_USER=aa.ATTR_DB_SYSTEM=aa.ATTR_DB_STATEMENT=aa.ATTR_DB_NAME=aa.ATTR_DB_CONNECTION_STRING=void 0;aa.ATTR_DB_CONNECTION_STRING="db.connection_string";aa.ATTR_DB_NAME="db.name";aa.ATTR_DB_STATEMENT="db.statement";aa.ATTR_DB_SYSTEM="db.system";aa.ATTR_DB_USER="db.user";aa.ATTR_NET_PEER_NAME="net.peer.name";aa.ATTR_NET_PEER_PORT="net.peer.port";aa.DB_SYSTEM_VALUE_MYSQL="mysql"});var GW=P(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.addSqlCommenterComment=void 0;var FW=(ze(),Le(nt)),Jxt=vr();function Zxt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Wxt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Xxt(e,t){if(typeof t!="string"||t.length===0||Zxt(t))return t;let n=new Jxt.W3CTraceContextPropagator,r={};n.inject(FW.trace.setSpan(FW.ROOT_CONTEXT,e),r,FW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=Wxt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}J3.addSqlCommenterComment=Xxt});var HPe=P(ap=>{"use strict";m();Object.defineProperty(ap,"__esModule",{value:!0});ap.getConnectionPrototypeToInstrument=ap.once=ap.getSpanName=ap.getQueryText=ap.getConnectionAttributes=void 0;var cO=QW(),Z3=sn(),jW=(Xn(),Le(jr));function eDt(e,t,n){let{host:r,port:o,database:i,user:s}=tDt(e),u={};t&Z3.SemconvStability.OLD&&(u[cO.ATTR_DB_CONNECTION_STRING]=nDt(r,o,i),u[cO.ATTR_DB_NAME]=i,u[cO.ATTR_DB_USER]=s),t&Z3.SemconvStability.STABLE&&(u[jW.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&Z3.SemconvStability.OLD&&(u[cO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[cO.ATTR_NET_PEER_PORT]=l)),n&Z3.SemconvStability.STABLE&&(u[jW.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[jW.ATTR_SERVER_PORT]=l)),u}ap.getConnectionAttributes=eDt;function tDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function nDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function rDt(e,t,n,r=!1,o=oDt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,iDt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}ap.getQueryText=rDt;function oDt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function iDt(e){return"values"in e}function sDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}ap.getSpanName=sDt;var aDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};ap.once=aDt;function uDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}ap.getConnectionPrototypeToInstrument=uDt});var $Pe=P(bR=>{"use strict";m();Object.defineProperty(bR,"__esModule",{value:!0});bR.PACKAGE_NAME=bR.PACKAGE_VERSION=void 0;bR.PACKAGE_VERSION="0.60.0";bR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var KPe=P(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.MySQL2Instrumentation=void 0;var qPe=(ze(),Le(nt)),vf=sn(),zW=QW(),VPe=GW(),IR=HPe(),YPe=$Pe(),HW=(Xn(),Le(jr)),$W=[">=1.4.2 <4"],qW=class extends vf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(YPe.PACKAGE_NAME,YPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vf.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,vf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,vf.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 vf.InstrumentationNodeModuleDefinition("mysql2",$W,i=>(n(i),i),()=>{},[new vf.InstrumentationNodeModuleFile("mysql2/promise.js",$W,i=>(n(i),i),()=>{}),new vf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$W,i=>{let s=(0,IR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,IR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:p,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,IR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,IR.getQueryText)(i,t,l,p,h);o._dbSemconvStability&vf.SemconvStability.OLD&&(S[zW.ATTR_DB_SYSTEM]=zW.DB_SYSTEM_VALUE_MYSQL,S[zW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&vf.SemconvStability.STABLE&&(S[HW.ATTR_DB_SYSTEM_NAME]=HW.DB_SYSTEM_NAME_VALUE_MYSQL,S[HW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,IR.getSpanName)(i),{kind:qPe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,VPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,VPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,IR.once)((x,O)=>{x?v.setStatus({code:qPe.SpanStatusCode.ERROR,message:x.message}):typeof y=="function"&&(0,vf.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:O})},M=>{M&&o._diag.warn("Failed executing responseHook",M)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",O=>{R(O)}).once("result",O=>{R(void 0,O)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};W3.MySQL2Instrumentation=qW});var JPe=P(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.MySQL2Instrumentation=void 0;var cDt=KPe();Object.defineProperty(X3,"MySQL2Instrumentation",{enumerable:!0,get:function(){return cDt.MySQL2Instrumentation}})});var ZPe,WPe,XPe,lDt,eMe,tMe=w(()=>{m();ZPe=ue(JPe(),1);_r();WPe="Mysql2",XPe=ut(WPe,()=>new ZPe.MySQL2Instrumentation({responseHook(e){Hr(e,"auto.db.otel.mysql2")}})),lDt=(()=>({name:WPe,setupOnce(){XPe()}})),eMe=lDt});var nMe=P(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var rMe=P(e6=>{"use strict";m();Object.defineProperty(e6,"__esModule",{value:!0});e6.endSpan=void 0;var dDt=(ze(),Le(nt)),pDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:dDt.SpanStatusCode.ERROR,message:t.message})),e.end()};e6.endSpan=pDt});var n6=P(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.defaultDbStatementSerializer=void 0;var fDt=[{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}],mDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=fDt.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};t6.defaultDbStatementSerializer=mDt});var oMe=P(CR=>{"use strict";m();Object.defineProperty(CR,"__esModule",{value:!0});CR.PACKAGE_NAME=CR.PACKAGE_VERSION=void 0;CR.PACKAGE_VERSION="0.62.0";CR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var uMe=P(r6=>{"use strict";m();Object.defineProperty(r6,"__esModule",{value:!0});r6.IORedisInstrumentation=void 0;var TE=(ze(),Le(nt)),Zc=sn(),bE=(Xn(),Le(jr)),Wc=nMe(),iMe=sn(),lO=rMe(),ADt=n6(),sMe=oMe(),aMe={requireParentSpan:!0},VW=class extends Zc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(sMe.PACKAGE_NAME,sMe.PACKAGE_VERSION,{...aMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Zc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Zc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...aMe,...t})}init(){return[new Zc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Zc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Zc.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(),s=i.dbStatementSerializer||ADt.defaultDbStatementSerializer,u=TE.trace.getSpan(TE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:p,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&Zc.SemconvStability.OLD&&(l[Wc.ATTR_DB_SYSTEM]=Wc.DB_SYSTEM_VALUE_REDIS,l[Wc.ATTR_DB_STATEMENT]=y,l[Wc.ATTR_DB_CONNECTION_STRING]=`redis://${p}:${h}`),r._dbSemconvStability&Zc.SemconvStability.STABLE&&(l[bE.ATTR_DB_SYSTEM_NAME]=Wc.DB_SYSTEM_NAME_VALUE_REDIS,l[bE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Zc.SemconvStability.OLD&&(l[Wc.ATTR_NET_PEER_NAME]=p,l[Wc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Zc.SemconvStability.STABLE&&(l[bE.ATTR_SERVER_ADDRESS]=p,l[bE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:TE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,iMe.safeExecuteInTheMiddle)(()=>T(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&TE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,iMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,O),M=>{M&&TE.diag.error("ioredis instrumentation: response hook failed",M)},!0),(0,lO.endSpan)(S,null),R(O)};let x=o.reject;return o.reject=function(O){(0,lO.endSpan)(S,O),x(O)},v}catch(v){throw(0,lO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=TE.trace.getSpan(TE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Zc.SemconvStability.OLD&&(o[Wc.ATTR_DB_SYSTEM]=Wc.DB_SYSTEM_VALUE_REDIS,o[Wc.ATTR_DB_STATEMENT]="connect",o[Wc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Zc.SemconvStability.STABLE&&(o[bE.ATTR_DB_SYSTEM_NAME]=Wc.DB_SYSTEM_NAME_VALUE_REDIS,o[bE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Zc.SemconvStability.OLD&&(o[Wc.ATTR_NET_PEER_NAME]=i,o[Wc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Zc.SemconvStability.STABLE&&(o[bE.ATTR_SERVER_ADDRESS]=i,o[bE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:TE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,lO.endSpan)(u,null),l}catch(l){throw(0,lO.endSpan)(u,l),l}}}};r6.IORedisInstrumentation=VW});var cMe=P(o6=>{"use strict";m();Object.defineProperty(o6,"__esModule",{value:!0});o6.IORedisInstrumentation=void 0;var gDt=uMe();Object.defineProperty(o6,"IORedisInstrumentation",{enumerable:!0,get:function(){return gDt.IORedisInstrumentation}})});var i6=P(vR=>{"use strict";m();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.62.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var lMe=P(IE=>{"use strict";m();Object.defineProperty(IE,"__esModule",{value:!0});IE.getTracedCreateStreamTrace=IE.getTracedCreateClient=IE.endSpan=void 0;var dO=(ze(),Le(nt)),hDt=(e,t)=>{t&&e.setStatus({code:dO.SpanStatusCode.ERROR,message:t.message}),e.end()};IE.endSpan=hDt;var _Dt=e=>function(){let n=e.apply(this,arguments);return dO.context.bind(dO.context.active(),n)};IE.getTracedCreateClient=_Dt;var EDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){dO.context.bind(dO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};IE.getTracedCreateStreamTrace=EDt});var s6=P(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var pMe=P(u6=>{"use strict";m();Object.defineProperty(u6,"__esModule",{value:!0});u6.RedisInstrumentationV2_V3=void 0;var Zl=sn(),a6=lMe(),dMe=i6(),pO=(ze(),Le(nt)),fO=(Xn(),Le(jr)),tT=s6(),yDt=n6(),YW=class e extends Zl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(dMe.PACKAGE_NAME,dMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Zl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Zl.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,Zl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Zl.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 s=t.getConfig(),u=pO.trace.getSpan(pO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||yDt.defaultDbStatementSerializer,p={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(p,{[tT.ATTR_DB_SYSTEM]:tT.DB_SYSTEM_VALUE_REDIS,[tT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(p,{[fO.ATTR_DB_SYSTEM_NAME]:tT.DB_SYSTEM_NAME_VALUE_REDIS,[fO.ATTR_DB_OPERATION_NAME]:i.command,[fO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:pO.SpanKind.CLIENT,attributes:p});if(this.connection_options){let S={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(S,{[tT.ATTR_NET_PEER_NAME]:this.connection_options.host,[tT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(S,{[fO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[fO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Zl.SemconvStability.OLD&&h.setAttribute(tT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=pO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Zl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,a6.endSpan)(h,v),pO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,a6.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,a6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,a6.getTracedCreateStreamTrace)(n)}}};u6.RedisInstrumentationV2_V3=YW});var mMe=P(c6=>{"use strict";m();Object.defineProperty(c6,"__esModule",{value:!0});c6.getClientAttributes=void 0;var KW=(Xn(),Le(jr)),RR=s6(),fMe=sn();function SDt(e,t,n){let r={};return n&fMe.SemconvStability.OLD&&Object.assign(r,{[RR.ATTR_DB_SYSTEM]:RR.DB_SYSTEM_VALUE_REDIS,[RR.ATTR_NET_PEER_NAME]:t?.socket?.host,[RR.ATTR_NET_PEER_PORT]:t?.socket?.port,[RR.ATTR_DB_CONNECTION_STRING]:TDt(e,t?.url)}),n&fMe.SemconvStability.STABLE&&Object.assign(r,{[KW.ATTR_DB_SYSTEM_NAME]:RR.DB_SYSTEM_NAME_VALUE_REDIS,[KW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KW.ATTR_SERVER_PORT]:t?.socket?.port}),r}c6.getClientAttributes=SDt;function TDt(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 _Me=P(l6=>{"use strict";m();Object.defineProperty(l6,"__esModule",{value:!0});l6.RedisInstrumentationV4_V5=void 0;var up=(ze(),Le(nt)),Co=sn(),AMe=mMe(),bDt=n6(),gMe=i6(),JW=(Xn(),Le(jr)),IDt=s6(),mO=Symbol("opentelemetry.instrumentation.redis.open_spans"),hMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZW=class e extends Co.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(gMe.PACKAGE_NAME,gMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.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 Co.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Co.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Co.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Co.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Co.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Co.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let h=t(l,p).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[mO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[mO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let p=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,p,t)}return Promise.reject(u)})}}}_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[hMe]=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,s=(0,AMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:up.SpanKind.CLIENT,attributes:s});return up.context.with(up.trace.setSpan(up.context.active(),u),()=>r.apply(this)).then(p=>(u.end(),p)).catch(p=>(u.recordException(p),u.setStatus({code:up.SpanStatusCode.ERROR,message:p.message}),u.end(),Promise.reject(p)))}}}_traceClientCommand(t,n,r,o){if(up.trace.getSpan(up.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[hMe],u=o[0],l=o.slice(1),p=this.getConfig().dbStatementSerializer||bDt.defaultDbStatementSerializer,h=(0,AMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Co.SemconvStability.STABLE&&(h[JW.ATTR_DB_OPERATION_NAME]=u);try{let T=p(u,l);T!=null&&(this._semconvStability&Co.SemconvStability.OLD&&(h[IDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Co.SemconvStability.STABLE&&(h[JW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let y=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:up.SpanKind.CLIENT,attributes:h}),S=up.context.with(up.trace.setSpan(up.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(T=>{this._endSpanWithResponse(y,u,l,T,void 0)},T=>{this._endSpanWithResponse(y,u,l,null,T)});else{let T=S;T[mO]=T[mO]||[],T[mO].push({span:y,commandName:u,commandArgs:l})}return S}_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(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:p}=t[u],h=n[u],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Co.SemconvStability.STABLE&&l.setAttribute(JW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],p,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:up.SpanStatusCode.ERROR,message:i?.message})),t.end()}};l6.RedisInstrumentationV4_V5=ZW});var SMe=P(d6=>{"use strict";m();Object.defineProperty(d6,"__esModule",{value:!0});d6.RedisInstrumentation=void 0;var CDt=sn(),EMe=i6(),vDt=pMe(),RDt=_Me(),yMe={requireParentSpan:!1},WW=class extends CDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...yMe,...t};super(EMe.PACKAGE_NAME,EMe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new vDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new RDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...yMe,...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())}};d6.RedisInstrumentation=WW});var TMe=P(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.RedisInstrumentation=void 0;var xDt=SMe();Object.defineProperty(p6,"RedisInstrumentation",{enumerable:!0,get:function(){return xDt.RedisInstrumentation}})});function AO(e,t){return e.includes(t.toLowerCase())}function eX(e){return AO(XW,e)?"cache.get":AO(NDt,e)?"cache.put":void 0}function BDt(e,t){return t.some(n=>e.startsWith(n))}function IMe(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)?bMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return AO(DDt,e)&&r!=null?n(r):bMe(t.map(o=>n(o)))}catch{return}}function CMe(e,t,n){if(!eX(e))return!1;for(let r of t)if(BDt(r,n))return!0;return!1}function vMe(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 bMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var DDt,XW,NDt,RMe=w(()=>{m();DDt=["get","set","setex"],XW=["get","mget"],NDt=["set","setex"]});var xMe,DMe,f6,gO,NMe,wDt,ODt,BMe,kDt,wMe,OMe=w(()=>{m();xMe=ue(cMe(),1),DMe=ue(TMe(),1);mt();_r();RMe();f6="Redis",gO={},NMe=(e,t,n,r)=>{e.setAttribute(Pt,"auto.db.otel.redis");let o=IMe(t,n),i=eX(t);if(!o||!i||!gO.cachePrefixes||!CMe(t,o,gO.cachePrefixes))return;let s=kt(e).data["net.peer.name"],u=kt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=vMe(r);l&&e.setAttribute(oY,l),AO(XW,t)&&l!==void 0&&e.setAttribute(nY,l>0),e.setAttributes({[Xt]:i,[rY]:o});let p=o.join(", ");e.updateName(gO.maxCacheKeyLength?Q_(p,gO.maxCacheKeyLength):p)},wDt=ut(`${f6}.IORedis`,()=>new xMe.IORedisInstrumentation({responseHook:NMe})),ODt=ut(`${f6}.Redis`,()=>new DMe.RedisInstrumentation({responseHook:NMe})),BMe=Object.assign(()=>{wDt(),ODt()},{id:f6}),kDt=((e={})=>({name:f6,setupOnce(){gO=e,BMe()}})),wMe=kDt});var kMe=P(m6=>{"use strict";m();Object.defineProperty(m6,"__esModule",{value:!0});m6.EVENT_LISTENERS_SET=void 0;m6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tX=P(hO=>{"use strict";m();Object.defineProperty(hO,"__esModule",{value:!0});hO.AttributeNames=void 0;var PDt;(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"})(PDt=hO.AttributeNames||(hO.AttributeNames={}))});var nX=P(wr=>{"use strict";m();Object.defineProperty(wr,"__esModule",{value:!0});wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=wr.METRIC_DB_CLIENT_CONNECTION_COUNT=wr.DB_SYSTEM_VALUE_POSTGRESQL=wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=wr.ATTR_NET_PEER_PORT=wr.ATTR_NET_PEER_NAME=wr.ATTR_DB_USER=wr.ATTR_DB_SYSTEM=wr.ATTR_DB_STATEMENT=wr.ATTR_DB_NAME=wr.ATTR_DB_CONNECTION_STRING=wr.ATTR_DB_CLIENT_CONNECTION_STATE=wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";wr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";wr.ATTR_DB_CONNECTION_STRING="db.connection_string";wr.ATTR_DB_NAME="db.name";wr.ATTR_DB_STATEMENT="db.statement";wr.ATTR_DB_SYSTEM="db.system";wr.ATTR_DB_USER="db.user";wr.ATTR_NET_PEER_NAME="net.peer.name";wr.ATTR_NET_PEER_PORT="net.peer.port";wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";wr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";wr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var rX=P(_O=>{"use strict";m();Object.defineProperty(_O,"__esModule",{value:!0});_O.SpanNames=void 0;var MDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(MDt=_O.SpanNames||(_O.SpanNames={}))});var GMe=P(sr=>{"use strict";m();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var CE=(ze(),Le(nt)),A6=tX(),cp=(Xn(),Le(jr)),Ei=nX(),nT=sn(),PMe=rX();function MMe(e,t){if(!t)return PMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:LMe(t.text);return`${PMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=MMe;function LMe(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}sr.parseNormalizedOperationName=LMe;function UMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=UMe;function oX(e){if("connectionString"in e&&e.connectionString)return UMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=oX;function g6(e){if(Number.isInteger(e))return e}function QMe(e,t){let n={};return t&nT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:oX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:g6(e.port)}),t&nT.SemconvStability.STABLE&&(n={...n,[cp.ATTR_DB_SYSTEM_NAME]:cp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[cp.ATTR_DB_NAMESPACE]:e.namespace,[cp.ATTR_SERVER_ADDRESS]:e.host,[cp.ATTR_SERVER_PORT]:g6(e.port)}),n}sr.getSemanticAttributesFromConnection=QMe;function LDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[A6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[A6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&nT.SemconvStability.OLD&&(r={...r,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ei.ATTR_DB_CONNECTION_STRING]:oX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||g6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&nT.SemconvStability.STABLE&&(r={...r,[cp.ATTR_DB_SYSTEM_NAME]:cp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[cp.ATTR_DB_NAMESPACE]:e.namespace,[cp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[cp.ATTR_SERVER_PORT]:Number(n?.port)||g6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=LDt;function UDt(e){return e.requireParentSpan===!0&&CE.trace.getSpan(CE.context.active())===void 0}sr.shouldSkipInstrumentation=UDt;function QDt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=MMe(i,r),u=e.startSpan(s,{kind:CE.SpanKind.CLIENT,attributes:QMe(o,n)});if(!r)return u;if(r.text&&(n&nT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&nT.SemconvStability.STABLE&&u.setAttribute(cp.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(p=>p==null?"null":p instanceof Buffer?p.toString():typeof p=="object"?typeof p.toPostgres=="function"?p.toPostgres():JSON.stringify(p):p.toString());u.setAttribute(A6.AttributeNames.PG_VALUES,l)}catch(l){CE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(A6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=QDt;function FMe(e,t,n){typeof e.responseHook=="function"&&(0,nT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&CE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=FMe;function FDt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[cp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(h6(s)),t.setStatus({code:CE.SpanStatusCode.ERROR,message:s.message})):FMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=FDt;function GDt(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()}sr.getPoolName=GDt;function jDt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=jDt;function zDt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(h6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=zDt;function HDt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(h6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=HDt;function $Dt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=$Dt;function qDt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=qDt;function h6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=h6});var jMe=P(xR=>{"use strict";m();Object.defineProperty(xR,"__esModule",{value:!0});xR.PACKAGE_NAME=xR.PACKAGE_VERSION=void 0;xR.PACKAGE_VERSION="0.66.0";xR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var YMe=P(E6=>{"use strict";m();Object.defineProperty(E6,"__esModule",{value:!0});E6.PgInstrumentation=void 0;var tc=sn(),qr=(ze(),Le(nt)),zMe=kMe(),ni=GMe(),HMe=GW(),$Me=jMe(),qMe=rX(),_6=vr(),Rf=(Xn(),Le(jr)),EO=nX();function DR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super($Me.PACKAGE_NAME,$Me.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Rf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:qr.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(EO.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(EO.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 tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=DR(u);return this._patchPgClient(l.Client),u},u=>{let l=DR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=DR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=DR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=DR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.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=DR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(qMe.SpanNames.CONNECT,{kind:qr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=qr.trace.getSpan(qr.context.active());o=ni.patchClientConnectCallback(s,o),l&&(o=qr.context.bind(qr.context.active(),o))}let u=qr.context.with(qr.trace.setSpan(qr.context.active(),s),()=>n.call(this,o));return VMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Rf.ATTR_DB_NAMESPACE,Rf.ATTR_ERROR_TYPE,Rf.ATTR_SERVER_PORT,Rf.ATTR_SERVER_ADDRESS,Rf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(EO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Rf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,_6.hrTimeToMilliseconds)((0,_6.hrTimeDuration)(n,(0,_6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ni.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,_6.hrTime)(),s=o[0],u=typeof s=="string",l=ni.isObjectWithTextString(s),p=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[EO.ATTR_DB_SYSTEM]:EO.DB_SYSTEM_VALUE_POSTGRESQL,[Rf.ATTR_DB_NAMESPACE]:this.database,[Rf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Rf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};p?.text&&(h[Rf.ATTR_DB_OPERATION_NAME]=ni.parseNormalizedOperationName(p?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),T=ni.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,p);if(S.addSqlCommenterCommentToQueries&&(u?o[0]=(0,HMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,HMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=qr.trace.getSpan(qr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ni.patchCallback(S,T,o[o.length-1],h,y),x&&(o[o.length-1]=qr.context.bind(qr.context.active(),o[o.length-1]));else if(typeof p?.callback=="function"){let O=ni.patchCallback(t.getConfig(),T,p.callback,h,y);x&&(O=qr.context.bind(qr.context.active(),O)),o[0].callback=O}}let{requestHook:v}=S;typeof v=="function"&&p&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:M,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:M,user:j},query:{text:p.text,values:p.values,name:p.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:qr.SpanStatusCode.ERROR,message:ni.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ni.handleExecutionResult(t.getConfig(),T,x),y(),T.end(),O(x)})).catch(x=>new Promise((O,M)=>{x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:qr.SpanStatusCode.ERROR,message:x.message}),y(),T.end(),M(x)})):R})}_setPoolConnectEventListeners(t){if(t[zMe.EVENT_LISTENERS_SET])return;let n=ni.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[zMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(qMe.SpanNames.POOL_CONNECT,{kind:qr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=qr.trace.getSpan(qr.context.active());o=ni.patchCallbackPGPool(s,o),l&&(o=qr.context.bind(qr.context.active(),o))}let u=qr.context.with(qr.trace.setSpan(qr.context.active(),s),()=>n.call(this,o));return VMe(s,u)}}};E6.PgInstrumentation=iX;function VMe(e,t){if(!(t instanceof Promise))return t;let n=t;return qr.context.bind(qr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ni.sanitizedErrorMessage(r)),e.setStatus({code:qr.SpanStatusCode.ERROR,message:ni.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var KMe=P(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.AttributeNames=NR.PgInstrumentation=void 0;var VDt=YMe();Object.defineProperty(NR,"PgInstrumentation",{enumerable:!0,get:function(){return VDt.PgInstrumentation}});var YDt=tX();Object.defineProperty(NR,"AttributeNames",{enumerable:!0,get:function(){return YDt.AttributeNames}})});var JMe,ZMe,WMe,KDt,XMe,e2e=w(()=>{m();JMe=ue(KMe(),1);_r();ZMe="Postgres",WMe=ut(ZMe,JMe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Hr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),KDt=(e=>({name:ZMe,setupOnce(){WMe(e)}})),XMe=KDt});var vE,aX,t2e,JDt,ZDt,n2e,sX,WDt,r2e,o2e=w(()=>{m();ze();vE=ue(sn(),1);Xn();mt();_r();qS();aX="PostgresJs",t2e=[">=3.0.0 <4"],JDt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,ZDt=Symbol.for("sentry.query.from.instrumented.sql"),n2e=ut(aX,e=>new sX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),sX=class extends vE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new vE.InstrumentationNodeModuleDefinition("postgres",t2e,n=>{try{return this._patchPostgres(n)}catch(r){return xs&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new vE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,t2e,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 xs&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return xs&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return sK(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(mw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return qt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(MC,r);return}let o=n?.match(JDt);o?.[1]&&t.setAttribute(MC,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[ZDt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ra({name:s||"postgresjs.query",op:"db"},u=>{Hr(u,"auto.db.postgresjs"),u.setAttributes({[dS]:"postgres",[_V]:s});let l=n.getConfig(),{requestHook:p}=l;p&&(0,vE.safeExecuteInTheMiddle)(()=>p(u,s,void 0),S=>{S&&(u.setAttribute("sentry.hook.error","requestHook failed"),xs&&W.error(`Error in requestHook for ${aX} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){xs&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(S,T,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(EV,v?.[0]?.code||"unknown"),u.setAttribute(yV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){xs&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(S,T,v)}});try{return r.apply(this,o)}catch(S){throw u.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),u.end(),S}})},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}},WDt=(e=>({name:aX,setupOnce(){n2e(e)}})),r2e=WDt});var i2e=P(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.SeverityNumber=void 0;var XDt;(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"})(XDt=yO.SeverityNumber||(yO.SeverityNumber={}))});var S6=P(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.NOOP_LOGGER=BR.NoopLogger=void 0;var y6=class{emit(t){}};BR.NoopLogger=y6;BR.NOOP_LOGGER=new y6});var b6=P(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.NOOP_LOGGER_PROVIDER=wR.NoopLoggerProvider=void 0;var e1t=S6(),T6=class{getLogger(t,n,r){return new e1t.NoopLogger}};wR.NoopLoggerProvider=T6;wR.NOOP_LOGGER_PROVIDER=new T6});var cX=P(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6.ProxyLogger=void 0;var t1t=S6(),uX=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):t1t.NOOP_LOGGER}};I6.ProxyLogger=uX});var dX=P(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6.ProxyLoggerProvider=void 0;var n1t=b6(),r1t=cX(),lX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new r1t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:n1t.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)}};C6.ProxyLoggerProvider=lX});var s2e=P(v6=>{"use strict";m();Object.defineProperty(v6,"__esModule",{value:!0});v6._globalThis=void 0;v6._globalThis=typeof globalThis=="object"?globalThis:global});var a2e=P(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6._globalThis=void 0;var o1t=s2e();Object.defineProperty(R6,"_globalThis",{enumerable:!0,get:function(){return o1t._globalThis}})});var u2e=P(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6._globalThis=void 0;var i1t=a2e();Object.defineProperty(x6,"_globalThis",{enumerable:!0,get:function(){return i1t._globalThis}})});var c2e=P(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.API_BACKWARDS_COMPATIBILITY_VERSION=tA.makeGetter=tA._global=tA.GLOBAL_LOGS_API_KEY=void 0;var s1t=u2e();tA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");tA._global=s1t._globalThis;function a1t(e,t,n){return r=>r===e?t:n}tA.makeGetter=a1t;tA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var d2e=P(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.LogsAPI=void 0;var lp=c2e(),u1t=b6(),l2e=dX(),pX=class e{constructor(){this._proxyLoggerProvider=new l2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return lp._global[lp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(lp._global[lp.GLOBAL_LOGS_API_KEY]=(0,lp.makeGetter)(lp.API_BACKWARDS_COMPATIBILITY_VERSION,t,u1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=lp._global[lp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(lp._global,lp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete lp._global[lp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new l2e.ProxyLoggerProvider}};D6.LogsAPI=pX});var fX=P(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.logs=ua.ProxyLoggerProvider=ua.ProxyLogger=ua.NoopLoggerProvider=ua.NOOP_LOGGER_PROVIDER=ua.NoopLogger=ua.NOOP_LOGGER=ua.SeverityNumber=void 0;var c1t=i2e();Object.defineProperty(ua,"SeverityNumber",{enumerable:!0,get:function(){return c1t.SeverityNumber}});var p2e=S6();Object.defineProperty(ua,"NOOP_LOGGER",{enumerable:!0,get:function(){return p2e.NOOP_LOGGER}});Object.defineProperty(ua,"NoopLogger",{enumerable:!0,get:function(){return p2e.NoopLogger}});var f2e=b6();Object.defineProperty(ua,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return f2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ua,"NoopLoggerProvider",{enumerable:!0,get:function(){return f2e.NoopLoggerProvider}});var l1t=cX();Object.defineProperty(ua,"ProxyLogger",{enumerable:!0,get:function(){return l1t.ProxyLogger}});var d1t=dX();Object.defineProperty(ua,"ProxyLoggerProvider",{enumerable:!0,get:function(){return d1t.ProxyLoggerProvider}});var p1t=d2e();ua.logs=p1t.LogsAPI.getInstance()});var m2e=P(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.disableInstrumentations=OR.enableInstrumentations=void 0;function f1t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}OR.enableInstrumentations=f1t;function m1t(e){e.forEach(t=>t.disable())}OR.disableInstrumentations=m1t});var h2e=P(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6.registerInstrumentations=void 0;var A2e=(ze(),Le(nt)),A1t=fX(),g2e=m2e();function g1t(e){let t=e.tracerProvider||A2e.trace.getTracerProvider(),n=e.meterProvider||A2e.metrics.getMeterProvider(),r=e.loggerProvider||A1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,g2e.enableInstrumentations)(o,t,n,r),()=>{(0,g2e.disableInstrumentations)(o)}}N6.registerInstrumentations=g1t});var v2e=P(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.satisfies=void 0;var hX=(ze(),Le(nt)),T2e=/^(?: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-]+)*))?$/,h1t=/^(?<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-]+)*))?$/,_1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function E1t(e,t,n){if(!y1t(e))return hX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=I1t(e);if(!r)return!1;let o=[],i=b2e(r,t,o,n);return i&&!n?.includePrerelease?T1t(r,o):i}B6.satisfies=E1t;function y1t(e){return typeof e=="string"&&T2e.test(e)}function b2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(mX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=$1t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!mX(e,i,n,r))return!1;return!0}return mX(e,t,n,r)}function mX(e,t,n,r){if(t=b1t(t,r),t.includes(" "))return b2e(e,t,n,r);{let o=C1t(t);return n.push(o),S1t(e,o)}}function S1t(e,t){if(t.invalid)return!1;if(!t.version||gX(t.version))return!0;let n=E2e(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=E2e(r,o)}return _1t[t.op]?.includes(n)}function T1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function b1t(e,t){return e=e.trim(),e=z1t(e,t),e=j1t(e),e=H1t(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function I1t(e){let t=e.match(T2e);if(!t){hX.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function C1t(e){if(!e)return{};let t=e.match(h1t);if(!t)return hX.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function gX(e){return e==="*"||e==="x"||e==="X"}function _2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function v1t(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 R1t(e,t){if(gX(e)||gX(t))return 0;let[n,r]=v1t(_2e(e),_2e(t));return n>r?1:n<r?-1:0}function E2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=R1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var I2e="[a-zA-Z0-9-]",C2e="0|[1-9]\\d*",x1t=`\\d*[a-zA-Z-]${I2e}*`,D1t="((?:<|>)?=?)",y2e=`(?:${C2e}|${x1t})`,N1t=`(?:-(${y2e}(?:\\.${y2e})*))`,S2e=`${I2e}+`,B1t=`(?:\\+(${S2e}(?:\\.${S2e})*))`,AX=`${C2e}|x|X|\\*`,SO=`[v=\\s]*(${AX})(?:\\.(${AX})(?:\\.(${AX})(?:${N1t})?${B1t}?)?)?`,w1t=`^${D1t}\\s*${SO}$`,O1t=new RegExp(w1t),k1t=`^\\s*(${SO})\\s+-\\s+(${SO})\\s*$`,P1t=new RegExp(k1t),M1t="(?:~>?)",L1t=`^${M1t}${SO}$`,U1t=new RegExp(L1t),Q1t="(?:\\^)",F1t=`^${Q1t}${SO}$`,G1t=new RegExp(F1t);function j1t(e){let t=U1t;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function z1t(e,t){let n=G1t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return nc(i)?p="":nc(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function H1t(e,t){let n=O1t;return e.replace(n,(r,o,i,s,u,l)=>{let p=nc(i),h=p||nc(s),y=h||nc(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function $1t(e,t){let n=P1t;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(y)?h="":nc(S)?h=`<${+y+1}.0.0-0`:nc(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var _X=P(La=>{"use strict";m();Object.defineProperty(La,"__esModule",{value:!0});La.massUnwrap=La.unwrap=La.massWrap=La.wrap=void 0;var rc=console.error.bind(console);function TO(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 q1t=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return TO(o,"__original",r),TO(o,"__unwrap",()=>{e[t]===o&&TO(e,t,r)}),TO(o,"__wrapped",!0),TO(e,t,o),o};La.wrap=q1t;var V1t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,La.wrap)(r,o,n)})})};La.massWrap=V1t;var Y1t=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};La.unwrap=Y1t;var K1t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,La.unwrap)(n,r)})})};La.massUnwrap=K1t;function bO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}La.default=bO;bO.wrap=La.wrap;bO.massWrap=La.massWrap;bO.unwrap=La.unwrap;bO.massUnwrap=La.massUnwrap});var R2e=P(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.InstrumentationAbstract=void 0;var EX=(ze(),Le(nt)),J1t=fX(),w6=_X(),yX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EX.diag.createComponentLogger({namespace:t}),this._tracer=EX.trace.getTracer(t,n),this._meter=EX.metrics.getMeter(t,n),this._logger=J1t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=w6.wrap;_unwrap=w6.unwrap;_massWrap=w6.massWrap;_massUnwrap=w6.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)}}};O6.InstrumentationAbstract=yX});var x2e=P(RE=>{"use strict";m();Object.defineProperty(RE,"__esModule",{value:!0});RE.ModuleNameTrie=RE.ModuleNameSeparator=void 0;RE.ModuleNameSeparator="/";var k6=class{hooks=[];children=new Map},SX=class{_trie=new k6;_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 k6,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=[],s=!0;for(let u of t.split(RE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};RE.ModuleNameTrie=SX});var N2e=P(P6=>{"use strict";m();Object.defineProperty(P6,"__esModule",{value:!0});P6.RequireInTheMiddleSingleton=void 0;var Z1t=hS(),D2e=Qe("path"),TX=x2e(),W1t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),bX=class e{_moduleNameTrie=new TX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Z1t.Hook(null,{internals:!0},(t,n,r)=>{let o=X1t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return W1t?new e:this._instance=this._instance??new e}};P6.RequireInTheMiddleSingleton=bX;function X1t(e){return D2e.sep!==TX.ModuleNameSeparator?e.split(D2e.sep).join(TX.ModuleNameSeparator):e}});var IX=P(xE=>{"use strict";m();Object.defineProperty(xE,"__esModule",{value:!0});xE.isWrapped=xE.safeExecuteInTheMiddleAsync=xE.safeExecuteInTheMiddle=void 0;function eNt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}xE.safeExecuteInTheMiddle=eNt;async function tNt(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}}xE.safeExecuteInTheMiddleAsync=tNt;function nNt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}xE.isWrapped=nNt});var O2e=P(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationBase=void 0;var IO=Qe("path"),B2e=Qe("util"),rNt=v2e(),CX=_X(),oNt=R2e(),iNt=N2e(),sNt=iW(),CO=(ze(),Le(nt)),aNt=hS(),uNt=Qe("fs"),cNt=IX(),vX=class extends oNt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=iNt.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,cNt.isWrapped)(t[n])&&this._unwrap(t,n),B2e.types.isProxy(t)){let o=(0,CX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,CX.wrap)(t,n,r)};_unwrap=(t,n)=>B2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,CX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{CO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){CO.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{CO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){CO.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=Qe.resolve(n);Qe.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,uNt.readFileSync)(IO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{CO.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 w2e(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 s=t.files??[],u=IO.normalize(r);return s.filter(p=>p.name===u).filter(p=>w2e(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,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(p,t.moduleVersion)):p),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=(s,u,l)=>{if(!l&&IO.isAbsolute(u)){let p=IO.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=IO.isAbsolute(t.name)?new aNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new sNt.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}};M6.InstrumentationBase=vX;function w2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,rNt.satisfies)(t,r,{includePrerelease:n}))}});var k2e=P(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.normalize=void 0;var lNt=Qe("path");Object.defineProperty(L6,"normalize",{enumerable:!0,get:function(){return lNt.normalize}})});var P2e=P(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.normalize=kR.InstrumentationBase=void 0;var dNt=O2e();Object.defineProperty(kR,"InstrumentationBase",{enumerable:!0,get:function(){return dNt.InstrumentationBase}});var pNt=k2e();Object.defineProperty(kR,"normalize",{enumerable:!0,get:function(){return pNt.normalize}})});var RX=P(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.normalize=PR.InstrumentationBase=void 0;var M2e=P2e();Object.defineProperty(PR,"InstrumentationBase",{enumerable:!0,get:function(){return M2e.InstrumentationBase}});Object.defineProperty(PR,"normalize",{enumerable:!0,get:function(){return M2e.normalize}})});var L2e=P(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.InstrumentationNodeModuleDefinition=void 0;var xX=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||[]}};U6.InstrumentationNodeModuleDefinition=xX});var U2e=P(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.InstrumentationNodeModuleFile=void 0;var fNt=RX(),DX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,fNt.normalize)(t)}};Q6.InstrumentationNodeModuleFile=DX});var Q2e=P(rT=>{"use strict";m();Object.defineProperty(rT,"__esModule",{value:!0});rT.semconvStabilityFromStr=rT.SemconvStability=void 0;var F6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(F6=rT.SemconvStability||(rT.SemconvStability={}));function mNt(e,t){let n=F6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=F6.DUPLICATE;break}else o.toLowerCase()===e&&(n=F6.STABLE);return n}rT.semconvStabilityFromStr=mNt});var G2e=P(cs=>{"use strict";m();Object.defineProperty(cs,"__esModule",{value:!0});cs.semconvStabilityFromStr=cs.SemconvStability=cs.safeExecuteInTheMiddleAsync=cs.safeExecuteInTheMiddle=cs.isWrapped=cs.InstrumentationNodeModuleFile=cs.InstrumentationNodeModuleDefinition=cs.InstrumentationBase=cs.registerInstrumentations=void 0;var ANt=h2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return ANt.registerInstrumentations}});var gNt=RX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return gNt.InstrumentationBase}});var hNt=L2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return hNt.InstrumentationNodeModuleDefinition}});var _Nt=U2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return _Nt.InstrumentationNodeModuleFile}});var NX=IX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return NX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return NX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return NX.safeExecuteInTheMiddleAsync}});var F2e=Q2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return F2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return F2e.semconvStabilityFromStr}})});function SNt(){let e=MR[wX];return e?.helper?e.helper:MR[BX]?.helper}function TNt(e){let t={helper:e};MR[wX]=t,MR[BX]=t}function bNt(){delete MR[wX],delete MR[BX]}function vNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}function H2e(e,t,n,r,o){if($2e(t.name,o))return;let i={attributes:t.attributes,kind:vNt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let p=r.get(l);return p?{context:{spanId:p,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)H2e(e,l,n,r,o);s.end(t.endTime)})}function j2e(e,t){return xNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function xNt(e){return e!=null&&typeof e.then=="function"}function $2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var G6,ENt,yNt,BX,wX,MR,INt,CNt,RNt,q2e,z2e,DNt,NNt,V2e,Y2e=w(()=>{m();ze();G6=ue(G2e(),1);ze();ENt={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"}},yNt=ENt.version.split(".")[0],BX="PRISMA_INSTRUMENTATION",wX=`V${yNt}_PRISMA_INSTRUMENTATION`,MR=globalThis;INt=process.env.PRISMA_SHOW_ALL_TRACES==="true",CNt="00-10-10-00";RNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=qt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:CNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)H2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!INt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if($2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return j2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>j2e(i,t(i,r)))}};q2e={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},z2e=q2e.version,DNt=q2e.name,NNt="@prisma/client",V2e=class extends G6.InstrumentationBase{tracerProvider;constructor(e={}){super(DNt,z2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new G6.InstrumentationNodeModuleDefinition(NNt,[z2e])]}enable(){let e=this._config;TNt(new RNt({tracerProvider:this.tracerProvider??qt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){bNt()}isEnabled(){return SNt()!==void 0}}});function BNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function J2e(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function wNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}var K2e,OX,ONt,Z2e,W2e=w(()=>{m();ze();Y2e();mt();_r();K2e="Prisma";OX=class extends V2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=J2e();BNt(t)&&(t.createEngineSpan=n=>{let r=qt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Xo(()=>{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 s=wNt(i.kind),u=i.parent_span_id,l=i.span_id,p=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:ou.SAMPLED}})),y=qt.setSpanContext(Xe.active(),{traceId:p,spanId:u,traceFlags:ou.SAMPLED});Xe.with(y,()=>{let S={generateTraceId:()=>p,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};ONt=ut(K2e,e=>new OX(e)),Z2e=e=>({name:K2e,setupOnce(){ONt(e)},setup(t){J2e()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Pt,"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 X2e=P(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.PACKAGE_NAME=LR.PACKAGE_VERSION=void 0;LR.PACKAGE_VERSION="0.60.0";LR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kX=P(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.HapiLifecycleMethodNames=nA.HapiLayerType=nA.handlerPatched=nA.HapiComponentName=void 0;nA.HapiComponentName="@hapi/hapi";nA.handlerPatched=Symbol("hapi-handler-patched");nA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};nA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var eLe=P(j6=>{"use strict";m();Object.defineProperty(j6,"__esModule",{value:!0});j6.ATTR_HTTP_METHOD=void 0;j6.ATTR_HTTP_METHOD="http.method"});var PX=P(vO=>{"use strict";m();Object.defineProperty(vO,"__esModule",{value:!0});vO.AttributeNames=void 0;var kNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(kNt=vO.AttributeNames||(vO.AttributeNames={}))});var rLe=P(ls=>{"use strict";m();Object.defineProperty(ls,"__esModule",{value:!0});ls.getPluginFromInput=ls.getExtMetadata=ls.getRouteMetadata=ls.isPatchableExtMethod=ls.isDirectExtInput=ls.isLifecycleExtEventObj=ls.isLifecycleExtType=ls.getPluginName=void 0;var tLe=(Xn(),Le(jr)),PNt=eLe(),RO=kX(),DE=PX(),nLe=sn();function MNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=MNt;var LNt=e=>typeof e=="string"&&RO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=LNt;var UNt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=UNt;var QNt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=QNt;var FNt=e=>!Array.isArray(e);ls.isPatchableExtMethod=FNt;var GNt=(e,t,n)=>{let r={[tLe.ATTR_HTTP_ROUTE]:e.path};t&nLe.SemconvStability.OLD&&(r[PNt.ATTR_HTTP_METHOD]=e.method),t&nLe.SemconvStability.STABLE&&(r[tLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[DE.AttributeNames.HAPI_TYPE]=RO.HapiLayerType.PLUGIN,r[DE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[DE.AttributeNames.HAPI_TYPE]=RO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=GNt;var jNt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:RO.HapiLayerType.EXT,[DE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:RO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=jNt;var zNt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=zNt});var sLe=P(z6=>{"use strict";m();Object.defineProperty(z6,"__esModule",{value:!0});z6.HapiInstrumentation=void 0;var Wl=(ze(),Le(nt)),oLe=vr(),xO=sn(),iLe=X2e(),DO=kX(),eh=rLe(),MX=class extends xO.InstrumentationBase{_semconvStability;constructor(t={}){super(iLe.PACKAGE_NAME,iLe.PACKAGE_VERSION,t),this._semconvStability=(0,xO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new xO.InstrumentationNodeModuleDefinition(DO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,xO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,xO.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 s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,eh.isLifecycleExtType)(l.type)){let p=l,h=r._wrapExtMethods(p.method,l.type,n);p.method=h,s[u]=p}}return t.apply(this,i)}else if((0,eh.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,eh.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}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 s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",p=>n._getServerRoutePatch.bind(n)(p,r)),i._wrap(u,"ext",p=>n._getServerExtPatch.bind(n)(p,r)),o.call(this,u,l)};t.register=s}_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,eh.isPatchableExtMethod)(t))return t[DO.handlerPatched]===!0?t:(t[DO.handlerPatched]=!0,async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),l),t,void 0,...s)}catch(p){throw l.recordException(p),l.setStatus({code:Wl.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[DO.handlerPatched]===!0)return t;t[DO.handlerPatched]=!0;let o=i=>async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await i.call(this,...s);let u=(0,oLe.getRPCMetadata)(Wl.context.active());u?.type===oLe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),p=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),p),()=>i.call(this,...s))}catch(h){throw p.recordException(h),p.setStatus({code:Wl.SpanStatusCode.ERROR,message:h.message}),h}finally{p.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};z6.HapiInstrumentation=MX});var aLe=P(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.AttributeNames=UR.HapiInstrumentation=void 0;var HNt=sLe();Object.defineProperty(UR,"HapiInstrumentation",{enumerable:!0,get:function(){return HNt.HapiInstrumentation}});var $Nt=PX();Object.defineProperty(UR,"AttributeNames",{enumerable:!0,get:function(){return $Nt.AttributeNames}})});var uLe,cLe,lLe,qNt,dLe,pLe=w(()=>{m();uLe=ue(aLe(),1);_r();cLe="Hapi",lLe=ut(cLe,()=>new uLe.HapiInstrumentation),qNt=(()=>({name:cLe,setupOnce(){lLe()}})),dLe=qNt});var NE,NO,LX=w(()=>{m();NE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},NO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var $6,VNt,YNt,H6,fLe=w(()=>{m();ze();$6=ue(sn(),1);mt();LX();VNt="@sentry/instrumentation-hono",YNt="0.0.1",H6=class extends $6.InstrumentationBase{constructor(t={}){super(VNt,YNt,t)}init(){return[new $6.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 s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}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(s=>t._wrapHandler(s))])}}}_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 s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}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,s=n.tracer.startSpan(i);return Xe.with(qt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(xa(u))return u.then(l=>{let p=n._determineHandlerType(l);return s.setAttributes({[NE.HONO_TYPE]:p,[NE.HONO_NAME]:p===NO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[NE.HONO_TYPE]:l,[NE.HONO_NAME]:l===NO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return xa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?NO.MIDDLEWARE:NO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function KNt(e){let t=kt(e).data,n=t[NE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[NE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Kd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[pS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var mLe,ALe,JNt,gLe,hLe=w(()=>{m();Xn();mt();_r();qS();LX();fLe();mLe="Hono";ALe=ut(mLe,()=>new H6({responseHook:e=>{KNt(e)}})),JNt=(()=>({name:mLe,setupOnce(){ALe()}})),gLe=JNt});var q6=P(BO=>{"use strict";m();Object.defineProperty(BO,"__esModule",{value:!0});BO.KoaLayerType=void 0;var ZNt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(ZNt=BO.KoaLayerType||(BO.KoaLayerType={}))});var _Le=P(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.PACKAGE_NAME=QR.PACKAGE_VERSION=void 0;QR.PACKAGE_VERSION="0.62.0";QR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var UX=P(wO=>{"use strict";m();Object.defineProperty(wO,"__esModule",{value:!0});wO.AttributeNames=void 0;var WNt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(WNt=wO.AttributeNames||(wO.AttributeNames={}))});var yLe=P(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.isLayerIgnored=FR.getMiddlewareMetadata=void 0;var ELe=q6(),V6=UX(),XNt=(Xn(),Le(jr)),eBt=(e,t,n,r)=>n?{attributes:{[V6.AttributeNames.KOA_NAME]:r?.toString(),[V6.AttributeNames.KOA_TYPE]:ELe.KoaLayerType.ROUTER,[XNt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[V6.AttributeNames.KOA_NAME]:t.name??"middleware",[V6.AttributeNames.KOA_TYPE]:ELe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};FR.getMiddlewareMetadata=eBt;var tBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));FR.isLayerIgnored=tBt});var SLe=P(Y6=>{"use strict";m();Object.defineProperty(Y6,"__esModule",{value:!0});Y6.kLayerPatched=void 0;Y6.kLayerPatched=Symbol("koa-layer-patched")});var RLe=P(K6=>{"use strict";m();Object.defineProperty(K6,"__esModule",{value:!0});K6.KoaInstrumentation=void 0;var rA=(ze(),Le(nt)),OO=sn(),TLe=q6(),bLe=_Le(),ILe=yLe(),CLe=vr(),vLe=SLe(),QX=class extends OO.InstrumentationBase{constructor(t={}){super(bLe.PACKAGE_NAME,bLe.PACKAGE_VERSION,t)}init(){return new OO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,OO.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,OO.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){rA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?TLe.KoaLayerType.ROUTER:TLe.KoaLayerType.MIDDLEWARE;return t[vLe.kLayerPatched]===!0||(0,ILe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(rA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[vLe.kLayerPatched]=!0,rA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(rA.trace.getSpan(rA.context.active())===void 0)return t(i,s);let l=(0,ILe.getMiddlewareMetadata)(i,t,n,r),p=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,CLe.getRPCMetadata)(rA.context.active());h?.type===CLe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,OO.safeExecuteInTheMiddle)(()=>y(p,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&rA.diag.error("koa instrumentation: request hook failed",T)},!0);let S=rA.trace.setSpan(rA.context.active(),p);return rA.context.with(S,async()=>{try{return await t(i,s)}catch(T){throw p.recordException(T),T}finally{p.end()}})})}};K6.KoaInstrumentation=QX});var xLe=P(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var nBt=RLe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return nBt.KoaInstrumentation}});var rBt=UX();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return rBt.AttributeNames}});var oBt=q6();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return oBt.KoaLayerType}})});var DLe,NLe,BLe,iBt,wLe,OLe=w(()=>{m();DLe=ue(xLe(),1);Xn();mt();_r();qS();NLe="Koa",BLe=ut(NLe,DLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Hr(t,"auto.http.otel.koa");let r=kt(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 >"),Rn()===Kd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),iBt=((e={})=>({name:NLe,setupOnce(){BLe(e)}})),wLe=iBt});var FX=P(xf=>{"use strict";m();Object.defineProperty(xf,"__esModule",{value:!0});xf.ConnectNames=xf.ConnectTypes=xf.AttributeNames=void 0;var sBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(sBt=xf.AttributeNames||(xf.AttributeNames={}));var aBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(aBt=xf.ConnectTypes||(xf.ConnectTypes={}));var uBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(uBt=xf.ConnectNames||(xf.ConnectNames={}))});var kLe=P(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.PACKAGE_NAME=GR.PACKAGE_VERSION=void 0;GR.PACKAGE_VERSION="0.57.0";GR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var PLe=P(J6=>{"use strict";m();Object.defineProperty(J6,"__esModule",{value:!0});J6._LAYERS_STORE_PROPERTY=void 0;J6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var MLe=P(OE=>{"use strict";m();Object.defineProperty(OE,"__esModule",{value:!0});OE.generateRoute=OE.replaceCurrentStackRoute=OE.addNewStackLayer=void 0;var cBt=(ze(),Le(nt)),wE=PLe(),lBt=e=>{Array.isArray(e[wE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,wE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[wE._LAYERS_STORE_PROPERTY].push("/");let t=e[wE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[wE._LAYERS_STORE_PROPERTY].length?e[wE._LAYERS_STORE_PROPERTY].pop():cBt.diag.warn("Connect: Trying to pop the stack multiple time")}};OE.addNewStackLayer=lBt;var dBt=(e,t)=>{t&&e[wE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};OE.replaceCurrentStackRoute=dBt;var pBt=e=>e[wE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);OE.generateRoute=pBt});var QLe=P(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.ConnectInstrumentation=kE.ANONYMOUS_NAME=void 0;var fBt=(ze(),Le(nt)),LLe=vr(),jR=FX(),ULe=kLe(),Z6=sn(),mBt=(Xn(),Le(jr)),GX=MLe();kE.ANONYMOUS_NAME="anonymous";var jX=class extends Z6.InstrumentationBase{constructor(t={}){super(ULe.PACKAGE_NAME,ULe.PACKAGE_VERSION,t)}init(){return[new Z6.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,Z6.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,Z6.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=jR.ConnectTypes.REQUEST_HANDLER,i=jR.ConnectNames.REQUEST_HANDLER,o=t):(r=jR.ConnectTypes.MIDDLEWARE,i=jR.ConnectNames.MIDDLEWARE,o=n.name||kE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[mBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[jR.AttributeNames.CONNECT_TYPE]:r,[jR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],p=arguments[s],h=arguments[u],y=arguments[l];(0,GX.replaceCurrentStackRoute)(p,t);let S=(0,LLe.getRPCMetadata)(fBt.context.active());t&&S?.type===LLe.RPCType.HTTP&&(S.route=(0,GX.generateRoute)(p));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||kE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(y,x),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],s=arguments[o],u=(0,GX.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};kE.ConnectInstrumentation=jX});var GLe=P(dp=>{"use strict";m();Object.defineProperty(dp,"__esModule",{value:!0});dp.ConnectTypes=dp.ConnectNames=dp.AttributeNames=dp.ANONYMOUS_NAME=dp.ConnectInstrumentation=void 0;var FLe=QLe();Object.defineProperty(dp,"ConnectInstrumentation",{enumerable:!0,get:function(){return FLe.ConnectInstrumentation}});Object.defineProperty(dp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return FLe.ANONYMOUS_NAME}});var zX=FX();Object.defineProperty(dp,"AttributeNames",{enumerable:!0,get:function(){return zX.AttributeNames}});Object.defineProperty(dp,"ConnectNames",{enumerable:!0,get:function(){return zX.ConnectNames}});Object.defineProperty(dp,"ConnectTypes",{enumerable:!0,get:function(){return zX.ConnectTypes}})});var jLe,zLe,HLe,ABt,$Le,qLe=w(()=>{m();jLe=ue(GLe(),1);_r();zLe="Connect",HLe=ut(zLe,()=>new jLe.ConnectInstrumentation),ABt=(()=>({name:zLe,setupOnce(){HLe()}})),$Le=ABt});var VLe=P(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MSSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_SQL_TABLE=ca.ATTR_DB_NAME=void 0;ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_SQL_TABLE="db.sql.table";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MSSQL="mssql"});var YLe=P(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.once=zR.getSpanName=void 0;function gBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}zR.getSpanName=gBt;var hBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};zR.once=hBt});var KLe=P(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.PACKAGE_NAME=HR.PACKAGE_VERSION=void 0;HR.PACKAGE_VERSION="0.33.0";HR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var eUe=P(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.TediousInstrumentation=ME.INJECTED_CTX=void 0;var $R=(ze(),Le(nt)),_Bt=Qe("events"),oA=sn(),oT=(Xn(),Le(jr)),PE=VLe(),JLe=YLe(),ZLe=KLe(),XLe=Symbol("opentelemetry.instrumentation-tedious.current-database");ME.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var WLe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function W6(e){Object.defineProperty(this,XLe,{value:e,writable:!0})}var HX=class e extends oA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ZLe.PACKAGE_NAME,ZLe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,oA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,oA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new oA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of WLe)(0,oA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,oA.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 WLe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return W6.call(this,this.config?.options?.database),this.removeListener("databaseChange",W6),this.on("databaseChange",W6),this.once("end",()=>{this.removeListener("databaseChange",W6)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||$R.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,ME.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[ME.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof _Bt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,p=()=>l++,h=()=>u++,y=this[XLe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&oA.SemconvStability.OLD&&(T[PE.ATTR_DB_SYSTEM]=PE.DB_SYSTEM_VALUE_MSSQL,T[PE.ATTR_DB_NAME]=y,T[PE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[PE.ATTR_DB_STATEMENT]=S,T[PE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&oA.SemconvStability.STABLE&&(T[oT.ATTR_DB_NAMESPACE]=y,T[oT.ATTR_DB_SYSTEM_NAME]=oT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[oT.ATTR_DB_QUERY_TEXT]=S,T[oT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&oA.SemconvStability.OLD&&(T[PE.ATTR_NET_PEER_NAME]=this.config?.server,T[PE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&oA.SemconvStability.STABLE&&(T[oT.ATTR_SERVER_ADDRESS]=this.config?.server,T[oT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,JLe.getSpanName)(t,y,S,s.table),{kind:$R.SpanKind.CLIENT,attributes:T}),R=(0,JLe.once)(G=>{s.removeListener("done",p),s.removeListener("doneInProc",p),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:$R.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",p),s.on("doneInProc",p),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>$R.context.with($R.trace.setSpan($R.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(x)}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)}}};ME.TediousInstrumentation=HX});var tUe=P(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.TediousInstrumentation=void 0;var EBt=eUe();Object.defineProperty(X6,"TediousInstrumentation",{enumerable:!0,get:function(){return EBt.TediousInstrumentation}})});var nUe,yBt,rUe,oUe,SBt,iUe,sUe=w(()=>{m();nUe=ue(tUe(),1);mt();_r();yBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),rUe="Tedious",oUe=ut(rUe,()=>new nUe.TediousInstrumentation({})),SBt=(()=>{let e;return{name:rUe,setupOnce(){let t=oUe();e=gw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=kt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";yBt.has(i)&&n.setAttribute(Pt,"auto.db.otel.tedious")}))}}}),iUe=SBt});var aUe=P(qR=>{"use strict";m();Object.defineProperty(qR,"__esModule",{value:!0});qR.PACKAGE_NAME=qR.PACKAGE_VERSION=void 0;qR.PACKAGE_VERSION="0.57.0";qR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var cUe=P(eG=>{"use strict";m();Object.defineProperty(eG,"__esModule",{value:!0});eG.GenericPoolInstrumentation=void 0;var VR=(ze(),Le(nt)),iT=sn(),uUe=aUe(),$X="generic-pool",qX=class extends iT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(uUe.PACKAGE_NAME,uUe.PACKAGE_VERSION,t)}init(){return[new iT.InstrumentationNodeModuleDefinition($X,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,iT.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 iT.InstrumentationNodeModuleDefinition($X,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,iT.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 iT.InstrumentationNodeModuleDefinition($X,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,iT.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=VR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return VR.context.with(VR.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_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 s=VR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return VR.context.with(VR.trace.setSpan(s,u),()=>{t.call(this,(l,p)=>{if(u.end(),o)return o(l,p)},i)})}}};eG.GenericPoolInstrumentation=qX});var lUe=P(tG=>{"use strict";m();Object.defineProperty(tG,"__esModule",{value:!0});tG.GenericPoolInstrumentation=void 0;var TBt=cUe();Object.defineProperty(tG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return TBt.GenericPoolInstrumentation}})});var dUe,pUe,fUe,bBt,mUe,AUe=w(()=>{m();dUe=ue(lUe(),1);mt();_r();pUe="GenericPool",fUe=ut(pUe,()=>new dUe.GenericPoolInstrumentation({})),bBt=(()=>{let e;return{name:pUe,setupOnce(){let t=fUe();e=gw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Pt,"auto.db.otel.generic_pool")}))}}}),mUe=bBt});var VX=P(iA=>{"use strict";m();Object.defineProperty(iA,"__esModule",{value:!0});iA.ATTR_NET_PEER_PORT=iA.ATTR_NET_PEER_NAME=iA.ATTR_MESSAGING_SYSTEM=iA.ATTR_MESSAGING_OPERATION=void 0;iA.ATTR_MESSAGING_OPERATION="messaging.operation";iA.ATTR_MESSAGING_SYSTEM="messaging.system";iA.ATTR_NET_PEER_NAME="net.peer.name";iA.ATTR_NET_PEER_PORT="net.peer.port"});var YX=P(yi=>{"use strict";m();Object.defineProperty(yi,"__esModule",{value:!0});yi.ATTR_MESSAGING_CONVERSATION_ID=yi.OLD_ATTR_MESSAGING_MESSAGE_ID=yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=yi.ATTR_MESSAGING_URL=yi.ATTR_MESSAGING_PROTOCOL_VERSION=yi.ATTR_MESSAGING_PROTOCOL=yi.MESSAGING_OPERATION_VALUE_PROCESS=yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=yi.ATTR_MESSAGING_DESTINATION_KIND=yi.ATTR_MESSAGING_DESTINATION=void 0;yi.ATTR_MESSAGING_DESTINATION="messaging.destination";yi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";yi.MESSAGING_OPERATION_VALUE_PROCESS="process";yi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";yi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";yi.ATTR_MESSAGING_URL="messaging.url";yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";yi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";yi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var KX=P(sT=>{"use strict";m();Object.defineProperty(sT,"__esModule",{value:!0});sT.DEFAULT_CONFIG=sT.EndOperation=void 0;var IBt;(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"})(IBt=sT.EndOperation||(sT.EndOperation={}));sT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var EUe=P(Si=>{"use strict";m();Object.defineProperty(Si,"__esModule",{value:!0});Si.isConfirmChannelTracing=Si.unmarkConfirmChannelTracing=Si.markConfirmChannelTracing=Si.getConnectionAttributesFromUrl=Si.getConnectionAttributesFromServer=Si.normalizeExchange=Si.CONNECTION_ATTRIBUTES=Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Si.CHANNEL_SPANS_NOT_ENDED=Si.MESSAGE_STORED_SPAN=void 0;var JX=(ze(),Le(nt)),LE=sn(),nG=(Xn(),Le(jr)),kO=VX(),rG=YX();Si.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Si.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Si.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var ZX=(0,JX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),CBt=e=>e!==""?e:"<default>";Si.normalizeExchange=CBt;var vBt=e=>e.replace(/:[^:@/]*@/,":***@"),gUe=(e,t)=>e||(t==="AMQP"?5672:5671),hUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},_Ue=e=>e||"localhost",sA=(e,t,n,r)=>n?{[t]:n}:(JX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),RBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[kO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=RBt;var xBt=(e,t)=>{let n={[rG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=hUe(r?.protocol);Object.assign(n,{...sA(e,rG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=_Ue(r?.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...sA(e,kO.ATTR_NET_PEER_NAME,i,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...sA(e,nG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=gUe(r.port,o);t&LE.SemconvStability.OLD&&Object.assign(n,sA(e,kO.ATTR_NET_PEER_PORT,s,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,sA(e,nG.ATTR_SERVER_PORT,s,"port"))}else{let r=vBt(e);n[rG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=hUe(o.protocol);Object.assign(n,{...sA(r,rG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=_Ue(o.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...sA(r,kO.ATTR_NET_PEER_NAME,s,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...sA(r,nG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=gUe(o.port?parseInt(o.port):void 0,i);t&LE.SemconvStability.OLD&&Object.assign(n,sA(r,kO.ATTR_NET_PEER_PORT,u,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,sA(r,nG.ATTR_SERVER_PORT,u,"port"))}catch(o){JX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=xBt;var DBt=e=>e.setValue(ZX,!0);Si.markConfirmChannelTracing=DBt;var NBt=e=>e.deleteValue(ZX);Si.unmarkConfirmChannelTracing=NBt;var BBt=e=>e.getValue(ZX)===!0;Si.isConfirmChannelTracing=BBt});var yUe=P(YR=>{"use strict";m();Object.defineProperty(YR,"__esModule",{value:!0});YR.PACKAGE_NAME=YR.PACKAGE_VERSION=void 0;YR.PACKAGE_VERSION="0.61.0";YR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var TUe=P(sG=>{"use strict";m();Object.defineProperty(sG,"__esModule",{value:!0});sG.AmqplibInstrumentation=void 0;var ri=(ze(),Le(nt)),oG=vr(),xr=sn(),wBt=VX(),Xl=YX(),oc=KX(),Ti=EUe(),SUe=yUe(),iG=[">=0.5.5 <1"],WX=class extends xr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(SUe.PACKAGE_NAME,SUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new xr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",iG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new xr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",iG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new xr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",iG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new xr.InstrumentationNodeModuleDefinition("amqplib",iG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,xr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,xr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,xr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,xr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,xr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,xr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,xr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,xr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,xr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,xr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,xr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,xr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,xr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,xr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,xr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,xr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let p=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...p,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let p=this,h=n===oc.EndOperation.Reject?u:l,y=p[Ti.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(T=>T.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=S;T++)o.endConsumerSpan(y[T].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ti.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let p=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=ri.propagation.extract(ri.ROOT_CONTEXT,y),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let M=S?ri.trace.getSpan(S)?.spanContext():void 0;S=void 0,M&&(v=[{context:M}])}let R=r.tracer.startSpan(`${i} process`,{kind:ri.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:T,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[wBt.ATTR_MESSAGING_OPERATION]:Xl.MESSAGING_OPERATION_VALUE_PROCESS,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:x}=r.getConfig();x&&(0,xr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),M=>{M&&ri.diag.error("amqplib instrumentation: consumerHook error",M)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,oG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=S||ri.ROOT_CONTEXT;ri.context.with(ri.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=p,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,p){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,xr.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:S,isConfirmChannel:!0}),O=>{O&&ri.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,M){try{p?.call(this,O,M)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,xr.safeExecuteInTheMiddle)(()=>j(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ri.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&y.setStatus({code:ri.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},R=(0,Ti.markConfirmChannelTracing)(ri.context.active()),x=[...arguments];return x[3]=S,x[4]=ri.context.bind((0,Ti.unmarkConfirmChannelTracing)(ri.trace.setSpan(R,y)),v),ri.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ri.context.active()))return n.apply(this,arguments);{let p=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,p,l),{publishHook:S}=r.getConfig();S&&(0,xr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!1}),R=>{R&&ri.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=y;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ti.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ri.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:n,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ri.propagation.inject(ri.trace.setSpan(ri.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ti.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ri.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ti.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ti.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,xr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ri.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,oG.hrTime)(),r=t[Ti.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,oG.hrTimeDuration)(s.timeOfConsume,n);if((0,oG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};sG.AmqplibInstrumentation=WX});var IUe=P(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.EndOperation=UE.DEFAULT_CONFIG=UE.AmqplibInstrumentation=void 0;var OBt=TUe();Object.defineProperty(UE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return OBt.AmqplibInstrumentation}});var bUe=KX();Object.defineProperty(UE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return bUe.DEFAULT_CONFIG}});Object.defineProperty(UE,"EndOperation",{enumerable:!0,get:function(){return bUe.EndOperation}})});var CUe,vUe,kBt,RUe,PBt,xUe,DUe=w(()=>{m();CUe=ue(IUe(),1);_r();vUe="Amqplib",kBt={consumeEndHook:e=>{Hr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Hr(e,"auto.amqplib.otel.publisher")}},RUe=ut(vUe,()=>new CUe.AmqplibInstrumentation(kBt)),PBt=(()=>({name:vUe,setupOnce(){RUe()}})),xUe=PBt});var PO,XX=w(()=>{m();PO="VercelAI"});function LBt(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)&&(QBt(t.content),FBt(t.content))}function QBt(e){for(let t of e){if(!LBt(t))continue;let n=DK(t.toolCallId);n?Gl(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}})}):Gl(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 FBt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&NK(t.toolCallId)}function GBt(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 uG,MBt,NUe,aG,BUe=w(()=>{m();uG=ue(sn(),1);mt();XX();MBt=[">=3.0.0 <7"],NUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];aG=class e extends uG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",er,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new uG.InstrumentationNodeModuleDefinition("ai",MBt,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,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,p=_t(),h=p?.getIntegrationByName(PO),y=h?.options,S=h?!!p?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=GBt(y,u,l,S);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Tf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",zc())},()=>{},R=>{UBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of NUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=NUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function jBt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var wUe,zBt,OUe,kUe=w(()=>{m();mt();_r();XX();BUe();wUe=ut(PO,()=>new aG({}));zBt=((e={})=>{let t;return{name:PO,options:e,setupOnce(){t=wUe()},afterAllSetup(n){e.force??jBt(n)?fF(n):t?.callWhenPatched(()=>fF(n))}}}),OUe=zBt});var lG,HBt,cG,PUe=w(()=>{m();lG=ue(sn(),1);mt();HBt=[">=4.0.0 <7"],cG=class extends lG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new lG.InstrumentationNodeModuleDefinition("openai",HBt,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(...s){if(DS(uE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return gF(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}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 MUe,$Bt,LUe,UUe=w(()=>{m();mt();_r();PUe();MUe=ut(uE,e=>new cG(e)),$Bt=((e={})=>({name:uE,setupOnce(){MUe(e)}})),LUe=$Bt});var pG,qBt,dG,QUe=w(()=>{m();pG=ue(sn(),1);mt();qBt=[">=0.19.2 <1.0.0"],dG=class extends pG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new pG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",qBt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(DS(cE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return hF(s,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 s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}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 FUe,VBt,GUe,jUe=w(()=>{m();mt();_r();QUe();FUe=ut(cE,e=>new dG(e)),VBt=((e={})=>({name:cE,options:e,setupOnce(){FUe(e)}})),GUe=VBt});var KR,zUe,fG,HUe=w(()=>{m();KR=ue(sn(),1);mt();zUe=[">=0.10.0 <2"],fG=class extends KR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new KR.InstrumentationNodeModuleDefinition("@google/genai",zUe,n=>this._patch(n),n=>n,[new KR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",zUe,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(DS(lE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return _F(s,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 s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return mw(t,"GoogleGenAI",o),t}}});var $Ue,YBt,qUe,VUe=w(()=>{m();mt();_r();HUe();$Ue=ut(lE,e=>new fG(e)),YBt=((e={})=>({name:lE,setupOnce(){$Ue(e)}})),qUe=YBt});function KBt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function JBt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,p=KBt(l,t);return u.callbacks=p,Reflect.apply(r,o,i)}})}var QE,mG,AG,YUe=w(()=>{m();QE=ue(sn(),1);mt();mG=[">=0.1.0 <2.0.0"];AG=class extends QE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,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 QE.InstrumentationNodeModuleDefinition(r,mG,this._patch.bind(this),o=>o,[new QE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,mG,this._patch.bind(this),o=>o)]));return t.push(new QE.InstrumentationNodeModuleDefinition("langchain",mG,this._patch.bind(this),r=>r,[new QE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",mG,this._patch.bind(this),r=>r)])),t}_patch(t){qY([uE,cE,lE]);let n=TF(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(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let p=s[l];typeof p=="function"&&(s[l]=JBt(p,n))}}}});var KUe,ZBt,JUe,ZUe=w(()=>{m();mt();_r();YUe();KUe=ut(EF,e=>new AG(e)),ZBt=((e={})=>({name:EF,setupOnce(){KUe(e)}})),JUe=ZBt});var JR,WUe,gG,XUe=w(()=>{m();JR=ue(sn(),1);mt();WUe=[">=0.0.0 <2.0.0"],gG=class extends JR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new JR.InstrumentationNodeModuleDefinition("@langchain/langgraph",WUe,this._patch.bind(this),n=>n,[new JR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",WUe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&IF(t.StateGraph.prototype,this.getConfig()),t}}});var eQe,WBt,tQe,nQe=w(()=>{m();mt();_r();XUe();eQe=ut(bF,e=>new gG(e)),WBt=((e={})=>({name:bF,setupOnce(){eQe(e)}})),tQe=WBt});import*as oQe from"node:net";function iQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),y=>{y&&Ul.error(y?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>rQe(h,n,r,e,s)),p=["@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 p)l.files.push(new th.InstrumentationNodeModuleFile(h,t,y=>rQe(y,n,r,e,s),y=>sQe(y,r)));return l}function rQe(e,t,n,r,o){return sQe(e,n),t(e,"addDoc",XBt(r,o)),t(e,"getDocs",twt(r,o)),t(e,"setDoc",nwt(r,o)),t(e,"deleteDoc",ewt(r,o)),e}function sQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function XBt(e,t){return function(r){return function(o,i){let s=_G(e,"addDoc",o);return t(s),hG(s,()=>r(o,i))}}}function ewt(e,t){return function(r){return function(o){let i=_G(e,"deleteDoc",o.parent||o);return t(i),hG(i,()=>r(o))}}}function twt(e,t){return function(r){return function(o){let i=_G(e,"getDocs",o);return t(i),hG(i,()=>r(o))}}}function nwt(e,t){return function(r){return function(o,i,s){let u=_G(e,"setDoc",o.parent||o);return t(u),hG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function hG(e,t){return Xe.with(qt.setSpan(Xe.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function _G(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:fo.CLIENT});return owt(r,n),r.setAttribute(MC,t),r}function rwt(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(oQe.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 owt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[gV]:t.path,[hV]:n.name,[dS]:"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:u,port:l}=rwt(i);u&&(s[CV]=u),l&&(s[vV]=l),e.setAttributes(s)}var th,aQe=w(()=>{m();ze();th=ue(sn(),1);Xn()});function uQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,p=o.functions?.responseHook;typeof p=="function"&&(s=(S,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>p(S,T),v=>{v&&Ul.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,nh.safeExecuteInTheMiddle)(()=>l(S),T=>{T&&Ul.error(T?.message)},!0)});let h=new nh.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:S,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(S,t,v=>iwt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>cQe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...p){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:fo.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Xe.with(qt.setSpan(Xe.active(),y),async()=>{let T,v;try{v=await s.apply(this,p)}catch(R){T=R}if(t?.responseHook?.(y,T),T&&y.recordException(T),y.end(),T)throw await t?.errorHook?.(y,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function iwt(e,t,n,r,o,i){switch(cQe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function cQe(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,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,lQe=w(()=>{m();ze();nh=ue(sn(),1)});var pQe,dQe,swt,awt,EG,fQe=w(()=>{m();pQe=ue(sn(),1);mt();aQe();lQe();dQe={},swt=[">=3.0.0 <5"],awt=[">=6.0.0 <7"],EG=class extends pQe.InstrumentationBase{constructor(t=dQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...dQe,...t})}init(){let t=[];return t.push(iQe(this.tracer,swt,this._wrap,this._unwrap,this.getConfig())),t.push(uQe(this.tracer,awt,this._wrap,this._unwrap,this.getConfig())),t}}});var mQe,uwt,AQe,cwt,gQe,hQe=w(()=>{m();mt();_r();fQe();mQe="Firebase",uwt={firestoreSpanCreationHook:e=>{Hr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Hr(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 yv(2e3))}}},AQe=ut(mQe,()=>new EG(uwt)),cwt=(()=>({name:mQe,setupOnce(){AQe()}})),gQe=cwt});function _Qe(){return[Swe(),tke(),xke(),gLe(),APe(),NPe(),jPe(),eMe(),wMe(),XMe(),Z2e(),dLe(),wLe(),$Le(),iUe(),mUe(),$ke(),xUe(),nPe(),JUe(),tQe(),OUe(),LUe(),GUe(),qUe(),r2e(),gQe()]}var EQe=w(()=>{m();DUe();jUe();qLe();Twe();oke();hQe();AUe();VUe();Nke();pLe();hLe();qke();OLe();ZUe();nQe();rPe();gPe();BPe();zPe();tMe();UUe();e2e();o2e();W2e();OMe();sUe();kUe()});function SQe(e,t={}){e.getOptions().debug&&aZ();let[n,r]=lwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function lwt(e,t={}){let n=new yQe.BasicTracerProvider({sampler:new N4(e),resource:(0,yG.defaultResource)().merge((0,yG.resourceFromAttributes)({[RV]:"node",[AV]:"sentry",[xV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new D4({timeout:dwt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});qt.setGlobalTracerProvider(n),pf.setGlobalPropagator(new x4);let r=new w4;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function dwt(e){if(e!=null){if(e>eee)return xs&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eee}`),eee;if(e<=0||Number.isNaN(e)){xs&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var yG,yQe,eee,TQe=w(()=>{m();ze();yG=ue(yJ(),1),yQe=ue(qJ(),1);Xn();mt();_r();Wv();qS();eee=1e6});function bQe(){return Q4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(ZBe(),swe())}function IQe(e){return[...bQe(),...Mi(e)?_Qe():[]]}function tee(e={}){return pwt(e,IQe)}function pwt(e={},t){NS(e,"node");let n=OZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(SQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),F4()),n}var CQe=w(()=>{m();mt();_r();WBe();awe();EQe();TQe()});var ZR=w(()=>{m();CQe();mt();_r()});function eo(){return fwt}function hu(){return vQe}function RQe(){return mwt}var fwt,vQe,mwt,sc=w(()=>{"use strict";m();fwt="prod",vQe="0.1.188",mwt=`@loredotlink/cli/${vQe}`});function Ewt(e=""){if(!hwt.test(e))return e!==e.toLowerCase()}function xQe(e,t){let n=t??_wt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let p=Ewt(u);if(s===!1){if(i===!1&&p===!0){r.push(o),o=u,i=p;continue}if(i===!0&&p===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=p;continue}}o+=u,i=p,s=l}return r.push(o),r}function ywt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Swt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Twt(e,t){return e?(Array.isArray(e)?e:xQe(e)).map(n=>ywt(t?.normalize?n.toLowerCase():n)).join(""):""}function LO(e,t){return Swt(Twt(e||"",t))}function SG(e,t){return e?(Array.isArray(e)?e:xQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function DQe(e){return SG(e||"","_")}var hwt,_wt,NQe=w(()=>{m();hwt=/\d/,_wt=["-","_","/","."]});import{parseArgs as bwt}from"node:util";function CG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nee(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 kW(e,t,n,r=void 0){n&&(0,aO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&hPe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function wxt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(kW(t,o,n,r),o)).catch(o=>{throw _Pe(t,o),o}).finally(()=>t.end()):(kW(t,e,n,r),t.end(),e)}yE.handlePromiseResponse=wxt;function Oxt(e,t,n,r,o,i,s=void 0){let u=0;return o.length===2?u=1:o.length===3&&(u=2),o[u]=(l,p)=>(l?_Pe(r,l):kW(r,p,i,s),r.end(),e(l,p)),t.apply(n,o)}yE.handleCallbackResponse=Oxt});var yPe=P(yR=>{"use strict";m();Object.defineProperty(yR,"__esModule",{value:!0});yR.PACKAGE_NAME=yR.PACKAGE_VERSION=void 0;yR.PACKAGE_VERSION="0.60.0";yR.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var CPe=P(Kc=>{"use strict";m();Object.defineProperty(Kc,"__esModule",{value:!0});Kc.MongooseInstrumentation=Kc._ALREADY_INSTRUMENTED=Kc._STORED_PARENT_SPAN=void 0;var Ns=(ze(),Le(nt)),kxt=vr(),PW=EPe(),Ma=sn(),SPe=yPe(),SE=OW(),XS=(Xn(),Le(jr)),q3=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Pxt=["remove","count","findOneAndRemove",...q3],Mxt=["count","findOneAndRemove",...q3],Lxt=[...q3];function TPe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Pxt:e.startsWith("7.")?Mxt:Lxt:q3}function bPe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function IPe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Kc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Kc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var MW=class extends Ma.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(SPe.PACKAGE_NAME,SPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ma.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ma.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Ma.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,bPe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),IPe(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)),TPe(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=TPe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,bPe(n)&&this._unwrap(r.Model.prototype,"remove"),IPe(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&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Kc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[XS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Kc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return r.apply(this,arguments);let s=this[Kc._STORED_PARENT_SPAN],u={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Ma.SemconvStability.OLD&&(u[SE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Ma.SemconvStability.STABLE&&(u[XS.ATTR_DB_QUERY_TEXT]=h)}let p=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,u,s);return n._handleResponse(p,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,u){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let p={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Ma.SemconvStability.OLD&&(p[SE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(p[XS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,p);return s instanceof Function&&(u=s,s=void 0),r._handleResponse(y,o,this,arguments,u,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);let p=l,h=s,y=u;typeof s=="function"?(p=s,h=void 0,y=void 0):typeof u=="function"&&(p=u,y=void 0);let S={},T=r.getConfig().dbStatementSerializer;if(T){let x=T(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Ma.SemconvStability.OLD&&(S[SE.ATTR_DB_STATEMENT]=x),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(S[XS.ATTR_DB_QUERY_TEXT]=x)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),R=r._handleResponse(v,o,this,arguments,p,n);return R&&typeof R=="object"&&(R[Kc._ALREADY_INSTRUMENTED]=!0),R}}patchModelStatic(t,n){let r=this;return o=>function(s,u,l){if(r.getConfig().requireParentSpan&&Ns.trace.getSpan(Ns.context.active())===void 0)return o.apply(this,arguments);typeof u=="function"&&(l=u,u=void 0);let p={};switch(t){case"insertMany":p.documents=s;break;case"bulkWrite":p.operations=s;break;default:p.document=s;break}u!==void 0&&(p.options=u);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let T=y(t,p);r._dbSemconvStability&Ma.SemconvStability.OLD&&(h[SE.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&Ma.SemconvStability.STABLE&&(h[XS.ATTR_DB_QUERY_TEXT]=T)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=Ns.trace.getSpan(Ns.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Kc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Kc._STORED_PARENT_SPAN]=Ns.trace.getSpan(Ns.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,PW.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Ma.SemconvStability.OLD&&(s[SE.ATTR_DB_OPERATION]=r,s[SE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Ma.SemconvStability.STABLE&&(s[XS.ATTR_DB_OPERATION_NAME]=r,s[XS.ATTR_DB_SYSTEM_NAME]=SE.DB_SYSTEM_NAME_VALUE_MONGODB);let u=this._dbSemconvStability&Ma.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(u,{kind:Ns.SpanKind.CLIENT,attributes:s},i?Ns.trace.setSpan(Ns.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let u=this;if(i instanceof Function)return u._callOriginalFunction(()=>(0,PW.handleCallbackResponse)(i,n,r,t,o,u.getConfig().responseHook,s));{let l=u._callOriginalFunction(()=>n.apply(r,o));return(0,PW.handlePromiseResponse)(l,t,u.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?Ns.context.with((0,kxt.suppressTracing)(Ns.context.active()),t):t()}};Kc.MongooseInstrumentation=MW});var vPe=P(V3=>{"use strict";m();Object.defineProperty(V3,"__esModule",{value:!0});V3.MongooseInstrumentation=void 0;var Uxt=CPe();Object.defineProperty(V3,"MongooseInstrumentation",{enumerable:!0,get:function(){return Uxt.MongooseInstrumentation}})});var RPe,xPe,DPe,Qxt,NPe,BPe=w(()=>{m();RPe=ue(vPe(),1);_r();xPe="Mongoose",DPe=ut(xPe,()=>new RPe.MongooseInstrumentation({responseHook(e){Hr(e,"auto.db.otel.mongoose")}})),Qxt=(()=>({name:xPe,setupOnce(){DPe()}})),NPe=Qxt});var wPe=P(us=>{"use strict";m();Object.defineProperty(us,"__esModule",{value:!0});us.METRIC_DB_CLIENT_CONNECTIONS_USAGE=us.DB_SYSTEM_VALUE_MYSQL=us.ATTR_NET_PEER_PORT=us.ATTR_NET_PEER_NAME=us.ATTR_DB_USER=us.ATTR_DB_SYSTEM=us.ATTR_DB_STATEMENT=us.ATTR_DB_NAME=us.ATTR_DB_CONNECTION_STRING=void 0;us.ATTR_DB_CONNECTION_STRING="db.connection_string";us.ATTR_DB_NAME="db.name";us.ATTR_DB_STATEMENT="db.statement";us.ATTR_DB_SYSTEM="db.system";us.ATTR_DB_USER="db.user";us.ATTR_NET_PEER_NAME="net.peer.name";us.ATTR_NET_PEER_PORT="net.peer.port";us.DB_SYSTEM_VALUE_MYSQL="mysql";us.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var OPe=P(uO=>{"use strict";m();Object.defineProperty(uO,"__esModule",{value:!0});uO.AttributeNames=void 0;var Fxt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(Fxt=uO.AttributeNames||(uO.AttributeNames={}))});var kPe=P(mu=>{"use strict";m();Object.defineProperty(mu,"__esModule",{value:!0});mu.getPoolNameOld=mu.arrayStringifyHelper=mu.getSpanName=mu.getDbValues=mu.getDbQueryText=mu.getJDBCString=mu.getConfig=void 0;function Gxt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}mu.getConfig=Gxt;function jxt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}mu.getJDBCString=jxt;function zxt(e){return typeof e=="string"?e:e.sql}mu.getDbQueryText=zxt;function Hxt(e,t){return LW(typeof e=="string"?t:t||e.values)}mu.getDbValues=Hxt;function $xt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}mu.getSpanName=$xt;function LW(e){return e?`[${e.toString()}]`:""}mu.arrayStringifyHelper=LW;function qxt(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()}mu.getPoolNameOld=qxt});var PPe=P(SR=>{"use strict";m();Object.defineProperty(SR,"__esModule",{value:!0});SR.PACKAGE_NAME=SR.PACKAGE_VERSION=void 0;SR.PACKAGE_VERSION="0.60.0";SR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var LPe=P(Y3=>{"use strict";m();Object.defineProperty(Y3,"__esModule",{value:!0});Y3.MySQLInstrumentation=void 0;var Jc=(ze(),Le(nt)),sp=sn(),TR=(Xn(),Le(jr)),Xg=wPe(),Vxt=OPe(),eT=kPe(),MPe=PPe(),UW=class extends sp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(MPe.PACKAGE_NAME,MPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,sp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,sp.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Xg.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsageOld?.add(t,{state:r,name:n})}init(){return[new sp.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,sp.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,sp.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,sp.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 s=t._allConnections.length,u=t._freeConnections.length,l=s-u,p=(0,eT.getPoolNameOld)(t);r._connCountAdd(-l,p,"used"),r._connCountAdd(-u,p,"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,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let u=t._nodes;if(u){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),p=u[l].pool;r._setPoolCallbacks(p,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,u){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof u=="function"){let l=r._getConnectionCallbackPatchFn(u);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=Jc.context.active();return function(o,i){i&&((0,sp.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&Jc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let u={},{host:l,port:p,database:h,user:y}=(0,eT.getConfig)(t.config),S=parseInt(p,10),T=(0,eT.getDbQueryText)(o);r._dbSemconvStability&sp.SemconvStability.OLD&&(u[Xg.ATTR_DB_SYSTEM]=Xg.DB_SYSTEM_VALUE_MYSQL,u[Xg.ATTR_DB_CONNECTION_STRING]=(0,eT.getJDBCString)(l,p,h),u[Xg.ATTR_DB_NAME]=h,u[Xg.ATTR_DB_USER]=y,u[Xg.ATTR_DB_STATEMENT]=T),r._dbSemconvStability&sp.SemconvStability.STABLE&&(u[TR.ATTR_DB_SYSTEM_NAME]=TR.DB_SYSTEM_NAME_VALUE_MYSQL,u[TR.ATTR_DB_NAMESPACE]=h,u[TR.ATTR_DB_QUERY_TEXT]=T),r._netSemconvStability&sp.SemconvStability.OLD&&(u[Xg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(u[Xg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&sp.SemconvStability.STABLE&&(u[TR.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(u[TR.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,eT.getSpanName)(o),{kind:Jc.SpanKind.CLIENT,attributes:u});if(r.getConfig().enhancedDatabaseReporting){let O;Array.isArray(i)?O=i:arguments[2]&&(O=[i]),v.setAttribute(Vxt.AttributeNames.MYSQL_VALUES,(0,eT.getDbValues)(o,O))}let R=Array.from(arguments).findIndex(O=>typeof O=="function"),x=Jc.context.active();if(R===-1){let O=Jc.context.with(Jc.trace.setSpan(Jc.context.active(),v),()=>n.apply(t,arguments));return Jc.context.bind(x,O),O.on("error",M=>v.setStatus({code:Jc.SpanStatusCode.ERROR,message:M.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,R,r._patchCallbackQuery(v,x)),Jc.context.with(Jc.trace.setSpan(Jc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:Jc.SpanStatusCode.ERROR,message:o.message}),t.end(),Jc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,eT.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")})}};Y3.MySQLInstrumentation=UW});var UPe=P(K3=>{"use strict";m();Object.defineProperty(K3,"__esModule",{value:!0});K3.MySQLInstrumentation=void 0;var Yxt=LPe();Object.defineProperty(K3,"MySQLInstrumentation",{enumerable:!0,get:function(){return Yxt.MySQLInstrumentation}})});var QPe,FPe,GPe,Kxt,jPe,zPe=w(()=>{m();QPe=ue(UPe(),1);_r();FPe="Mysql",GPe=ut(FPe,()=>new QPe.MySQLInstrumentation({})),Kxt=(()=>({name:FPe,setupOnce(){GPe()}})),jPe=Kxt});var QW=P(aa=>{"use strict";m();Object.defineProperty(aa,"__esModule",{value:!0});aa.DB_SYSTEM_VALUE_MYSQL=aa.ATTR_NET_PEER_PORT=aa.ATTR_NET_PEER_NAME=aa.ATTR_DB_USER=aa.ATTR_DB_SYSTEM=aa.ATTR_DB_STATEMENT=aa.ATTR_DB_NAME=aa.ATTR_DB_CONNECTION_STRING=void 0;aa.ATTR_DB_CONNECTION_STRING="db.connection_string";aa.ATTR_DB_NAME="db.name";aa.ATTR_DB_STATEMENT="db.statement";aa.ATTR_DB_SYSTEM="db.system";aa.ATTR_DB_USER="db.user";aa.ATTR_NET_PEER_NAME="net.peer.name";aa.ATTR_NET_PEER_PORT="net.peer.port";aa.DB_SYSTEM_VALUE_MYSQL="mysql"});var GW=P(J3=>{"use strict";m();Object.defineProperty(J3,"__esModule",{value:!0});J3.addSqlCommenterComment=void 0;var FW=(ze(),Le(nt)),Jxt=vr();function Zxt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function Wxt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function Xxt(e,t){if(typeof t!="string"||t.length===0||Zxt(t))return t;let n=new Jxt.W3CTraceContextPropagator,r={};n.inject(FW.trace.setSpan(FW.ROOT_CONTEXT,e),r,FW.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let u=Wxt(r[s]);return`${s}='${u}'`}).join(",");return`${t} /*${i}*/`}J3.addSqlCommenterComment=Xxt});var HPe=P(ap=>{"use strict";m();Object.defineProperty(ap,"__esModule",{value:!0});ap.getConnectionPrototypeToInstrument=ap.once=ap.getSpanName=ap.getQueryText=ap.getConnectionAttributes=void 0;var cO=QW(),Z3=sn(),jW=(Xn(),Le(jr));function eDt(e,t,n){let{host:r,port:o,database:i,user:s}=tDt(e),u={};t&Z3.SemconvStability.OLD&&(u[cO.ATTR_DB_CONNECTION_STRING]=nDt(r,o,i),u[cO.ATTR_DB_NAME]=i,u[cO.ATTR_DB_USER]=s),t&Z3.SemconvStability.STABLE&&(u[jW.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&Z3.SemconvStability.OLD&&(u[cO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(u[cO.ATTR_NET_PEER_PORT]=l)),n&Z3.SemconvStability.STABLE&&(u[jW.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(u[jW.ATTR_SERVER_PORT]=l)),u}ap.getConnectionAttributes=eDt;function tDt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function nDt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function rDt(e,t,n,r=!1,o=oDt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,iDt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}ap.getQueryText=rDt;function oDt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function iDt(e){return"values"in e}function sDt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}ap.getSpanName=sDt;var aDt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};ap.once=aDt;function uDt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}ap.getConnectionPrototypeToInstrument=uDt});var $Pe=P(bR=>{"use strict";m();Object.defineProperty(bR,"__esModule",{value:!0});bR.PACKAGE_NAME=bR.PACKAGE_VERSION=void 0;bR.PACKAGE_VERSION="0.60.0";bR.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var KPe=P(W3=>{"use strict";m();Object.defineProperty(W3,"__esModule",{value:!0});W3.MySQL2Instrumentation=void 0;var qPe=(ze(),Le(nt)),vf=sn(),zW=QW(),VPe=GW(),IR=HPe(),YPe=$Pe(),HW=(Xn(),Le(jr)),$W=[">=1.4.2 <4"],qW=class extends vf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(YPe.PACKAGE_NAME,YPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vf.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,vf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,vf.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 vf.InstrumentationNodeModuleDefinition("mysql2",$W,i=>(n(i),i),()=>{},[new vf.InstrumentationNodeModuleFile("mysql2/promise.js",$W,i=>(n(i),i),()=>{}),new vf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",$W,i=>{let s=(0,IR.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,IR.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,u){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:p,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,IR.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),T=(0,IR.getQueryText)(i,t,l,p,h);o._dbSemconvStability&vf.SemconvStability.OLD&&(S[zW.ATTR_DB_SYSTEM]=zW.DB_SYSTEM_VALUE_MYSQL,S[zW.ATTR_DB_STATEMENT]=T),o._dbSemconvStability&vf.SemconvStability.STABLE&&(S[HW.ATTR_DB_SYSTEM_NAME]=HW.DB_SYSTEM_NAME_VALUE_MYSQL,S[HW.ATTR_DB_QUERY_TEXT]=T);let v=o.tracer.startSpan((0,IR.getSpanName)(i),{kind:qPe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,VPe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,VPe.addSqlCommenterComment)(v,i.sql)}));let R=(0,IR.once)((x,O)=>{x?v.setStatus({code:qPe.SpanStatusCode.ERROR,message:x.message}):typeof y=="function"&&(0,vf.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:O})},M=>{M&&o._diag.warn("Failed executing responseHook",M)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(R));let x=r.apply(this,arguments);return x.once("error",O=>{R(O)}).once("result",O=>{R(void 0,O)}),x}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(R)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(R)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};W3.MySQL2Instrumentation=qW});var JPe=P(X3=>{"use strict";m();Object.defineProperty(X3,"__esModule",{value:!0});X3.MySQL2Instrumentation=void 0;var cDt=KPe();Object.defineProperty(X3,"MySQL2Instrumentation",{enumerable:!0,get:function(){return cDt.MySQL2Instrumentation}})});var ZPe,WPe,XPe,lDt,eMe,tMe=w(()=>{m();ZPe=ue(JPe(),1);_r();WPe="Mysql2",XPe=ut(WPe,()=>new ZPe.MySQL2Instrumentation({responseHook(e){Hr(e,"auto.db.otel.mysql2")}})),lDt=(()=>({name:WPe,setupOnce(){XPe()}})),eMe=lDt});var nMe=P(Au=>{"use strict";m();Object.defineProperty(Au,"__esModule",{value:!0});Au.DB_SYSTEM_VALUE_REDIS=Au.DB_SYSTEM_NAME_VALUE_REDIS=Au.ATTR_NET_PEER_PORT=Au.ATTR_NET_PEER_NAME=Au.ATTR_DB_SYSTEM=Au.ATTR_DB_STATEMENT=Au.ATTR_DB_CONNECTION_STRING=void 0;Au.ATTR_DB_CONNECTION_STRING="db.connection_string";Au.ATTR_DB_STATEMENT="db.statement";Au.ATTR_DB_SYSTEM="db.system";Au.ATTR_NET_PEER_NAME="net.peer.name";Au.ATTR_NET_PEER_PORT="net.peer.port";Au.DB_SYSTEM_NAME_VALUE_REDIS="redis";Au.DB_SYSTEM_VALUE_REDIS="redis"});var rMe=P(e6=>{"use strict";m();Object.defineProperty(e6,"__esModule",{value:!0});e6.endSpan=void 0;var dDt=(ze(),Le(nt)),pDt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:dDt.SpanStatusCode.ERROR,message:t.message})),e.end()};e6.endSpan=pDt});var n6=P(t6=>{"use strict";m();Object.defineProperty(t6,"__esModule",{value:!0});t6.defaultDbStatementSerializer=void 0;var fDt=[{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}],mDt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=fDt.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};t6.defaultDbStatementSerializer=mDt});var oMe=P(CR=>{"use strict";m();Object.defineProperty(CR,"__esModule",{value:!0});CR.PACKAGE_NAME=CR.PACKAGE_VERSION=void 0;CR.PACKAGE_VERSION="0.62.0";CR.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var uMe=P(r6=>{"use strict";m();Object.defineProperty(r6,"__esModule",{value:!0});r6.IORedisInstrumentation=void 0;var TE=(ze(),Le(nt)),Zc=sn(),bE=(Xn(),Le(jr)),Wc=nMe(),iMe=sn(),lO=rMe(),ADt=n6(),sMe=oMe(),aMe={requireParentSpan:!0},VW=class extends Zc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(sMe.PACKAGE_NAME,sMe.PACKAGE_VERSION,{...aMe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Zc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Zc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...aMe,...t})}init(){return[new Zc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Zc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Zc.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(),s=i.dbStatementSerializer||ADt.defaultDbStatementSerializer,u=TE.trace.getSpan(TE.context.active())===void 0;if(i.requireParentSpan===!0&&u)return t.apply(this,arguments);let l={},{host:p,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&Zc.SemconvStability.OLD&&(l[Wc.ATTR_DB_SYSTEM]=Wc.DB_SYSTEM_VALUE_REDIS,l[Wc.ATTR_DB_STATEMENT]=y,l[Wc.ATTR_DB_CONNECTION_STRING]=`redis://${p}:${h}`),r._dbSemconvStability&Zc.SemconvStability.STABLE&&(l[bE.ATTR_DB_SYSTEM_NAME]=Wc.DB_SYSTEM_NAME_VALUE_REDIS,l[bE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Zc.SemconvStability.OLD&&(l[Wc.ATTR_NET_PEER_NAME]=p,l[Wc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Zc.SemconvStability.STABLE&&(l[bE.ATTR_SERVER_ADDRESS]=p,l[bE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:TE.SpanKind.CLIENT,attributes:l}),{requestHook:T}=i;T&&(0,iMe.safeExecuteInTheMiddle)(()=>T(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&TE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),R=o.resolve;o.resolve=function(O){(0,iMe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,O),M=>{M&&TE.diag.error("ioredis instrumentation: response hook failed",M)},!0),(0,lO.endSpan)(S,null),R(O)};let x=o.reject;return o.reject=function(O){(0,lO.endSpan)(S,O),x(O)},v}catch(v){throw(0,lO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=TE.trace.getSpan(TE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&Zc.SemconvStability.OLD&&(o[Wc.ATTR_DB_SYSTEM]=Wc.DB_SYSTEM_VALUE_REDIS,o[Wc.ATTR_DB_STATEMENT]="connect",o[Wc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&Zc.SemconvStability.STABLE&&(o[bE.ATTR_DB_SYSTEM_NAME]=Wc.DB_SYSTEM_NAME_VALUE_REDIS,o[bE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Zc.SemconvStability.OLD&&(o[Wc.ATTR_NET_PEER_NAME]=i,o[Wc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&Zc.SemconvStability.STABLE&&(o[bE.ATTR_SERVER_ADDRESS]=i,o[bE.ATTR_SERVER_PORT]=s);let u=n.tracer.startSpan("connect",{kind:TE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,lO.endSpan)(u,null),l}catch(l){throw(0,lO.endSpan)(u,l),l}}}};r6.IORedisInstrumentation=VW});var cMe=P(o6=>{"use strict";m();Object.defineProperty(o6,"__esModule",{value:!0});o6.IORedisInstrumentation=void 0;var gDt=uMe();Object.defineProperty(o6,"IORedisInstrumentation",{enumerable:!0,get:function(){return gDt.IORedisInstrumentation}})});var i6=P(vR=>{"use strict";m();Object.defineProperty(vR,"__esModule",{value:!0});vR.PACKAGE_NAME=vR.PACKAGE_VERSION=void 0;vR.PACKAGE_VERSION="0.62.0";vR.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var lMe=P(IE=>{"use strict";m();Object.defineProperty(IE,"__esModule",{value:!0});IE.getTracedCreateStreamTrace=IE.getTracedCreateClient=IE.endSpan=void 0;var dO=(ze(),Le(nt)),hDt=(e,t)=>{t&&e.setStatus({code:dO.SpanStatusCode.ERROR,message:t.message}),e.end()};IE.endSpan=hDt;var _Dt=e=>function(){let n=e.apply(this,arguments);return dO.context.bind(dO.context.active(),n)};IE.getTracedCreateClient=_Dt;var EDt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){dO.context.bind(dO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};IE.getTracedCreateStreamTrace=EDt});var s6=P(gu=>{"use strict";m();Object.defineProperty(gu,"__esModule",{value:!0});gu.DB_SYSTEM_VALUE_REDIS=gu.DB_SYSTEM_NAME_VALUE_REDIS=gu.ATTR_NET_PEER_PORT=gu.ATTR_NET_PEER_NAME=gu.ATTR_DB_SYSTEM=gu.ATTR_DB_STATEMENT=gu.ATTR_DB_CONNECTION_STRING=void 0;gu.ATTR_DB_CONNECTION_STRING="db.connection_string";gu.ATTR_DB_STATEMENT="db.statement";gu.ATTR_DB_SYSTEM="db.system";gu.ATTR_NET_PEER_NAME="net.peer.name";gu.ATTR_NET_PEER_PORT="net.peer.port";gu.DB_SYSTEM_NAME_VALUE_REDIS="redis";gu.DB_SYSTEM_VALUE_REDIS="redis"});var pMe=P(u6=>{"use strict";m();Object.defineProperty(u6,"__esModule",{value:!0});u6.RedisInstrumentationV2_V3=void 0;var Zl=sn(),a6=lMe(),dMe=i6(),pO=(ze(),Le(nt)),fO=(Xn(),Le(jr)),tT=s6(),yDt=n6(),YW=class e extends Zl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(dMe.PACKAGE_NAME,dMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Zl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Zl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Zl.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,Zl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Zl.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 s=t.getConfig(),u=pO.trace.getSpan(pO.context.active())===void 0;if(s.requireParentSpan===!0&&u)return r.apply(this,arguments);let l=s?.dbStatementSerializer||yDt.defaultDbStatementSerializer,p={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(p,{[tT.ATTR_DB_SYSTEM]:tT.DB_SYSTEM_VALUE_REDIS,[tT.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(p,{[fO.ATTR_DB_SYSTEM_NAME]:tT.DB_SYSTEM_NAME_VALUE_REDIS,[fO.ATTR_DB_OPERATION_NAME]:i.command,[fO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:pO.SpanKind.CLIENT,attributes:p});if(this.connection_options){let S={};t._semconvStability&Zl.SemconvStability.OLD&&Object.assign(S,{[tT.ATTR_NET_PEER_NAME]:this.connection_options.host,[tT.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Zl.SemconvStability.STABLE&&Object.assign(S,{[fO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[fO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Zl.SemconvStability.OLD&&h.setAttribute(tT.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=pO.context.active();arguments[0].callback=function(v,R){if(s?.responseHook){let x=s.responseHook;(0,Zl.safeExecuteInTheMiddle)(()=>{x(h,i.command,i.args,R)},O=>{O&&t._diag.error("Error executing responseHook",O)},!0)}return(0,a6.endSpan)(h,v),pO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,a6.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,a6.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,a6.getTracedCreateStreamTrace)(n)}}};u6.RedisInstrumentationV2_V3=YW});var mMe=P(c6=>{"use strict";m();Object.defineProperty(c6,"__esModule",{value:!0});c6.getClientAttributes=void 0;var KW=(Xn(),Le(jr)),RR=s6(),fMe=sn();function SDt(e,t,n){let r={};return n&fMe.SemconvStability.OLD&&Object.assign(r,{[RR.ATTR_DB_SYSTEM]:RR.DB_SYSTEM_VALUE_REDIS,[RR.ATTR_NET_PEER_NAME]:t?.socket?.host,[RR.ATTR_NET_PEER_PORT]:t?.socket?.port,[RR.ATTR_DB_CONNECTION_STRING]:TDt(e,t?.url)}),n&fMe.SemconvStability.STABLE&&Object.assign(r,{[KW.ATTR_DB_SYSTEM_NAME]:RR.DB_SYSTEM_NAME_VALUE_REDIS,[KW.ATTR_SERVER_ADDRESS]:t?.socket?.host,[KW.ATTR_SERVER_PORT]:t?.socket?.port}),r}c6.getClientAttributes=SDt;function TDt(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 _Me=P(l6=>{"use strict";m();Object.defineProperty(l6,"__esModule",{value:!0});l6.RedisInstrumentationV4_V5=void 0;var up=(ze(),Le(nt)),Co=sn(),AMe=mMe(),bDt=n6(),gMe=i6(),JW=(Xn(),Le(jr)),IDt=s6(),mO=Symbol("opentelemetry.instrumentation.redis.open_spans"),hMe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),ZW=class e extends Co.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(gMe.PACKAGE_NAME,gMe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Co.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 Co.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let u=i.transformCommandArguments;if(!u)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Co.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(u)),i},i=>{(0,Co.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Co.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Co.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Co.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Co.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Co.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Co.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Co.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Co.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let u=s.executor;return s.executor=function(l,p){let h=t(l,p).args;return n._traceClientCommand(u,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(u=>{let l=this[mO];return n._endSpansWithRedisReplies(l,u,t),u}).catch(u=>{let l=this[mO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let p=u.constructor.name==="MultiErrorReply"?u.replies:new Array(l.length).fill(u);n._endSpansWithRedisReplies(l,p,t)}return Promise.reject(u)})}}}_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[hMe]=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,s=(0,AMe.getClientAttributes)(t._diag,i,t._semconvStability),u=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:up.SpanKind.CLIENT,attributes:s});return up.context.with(up.trace.setSpan(up.context.active(),u),()=>r.apply(this)).then(p=>(u.end(),p)).catch(p=>(u.recordException(p),u.setStatus({code:up.SpanStatusCode.ERROR,message:p.message}),u.end(),Promise.reject(p)))}}}_traceClientCommand(t,n,r,o){if(up.trace.getSpan(up.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[hMe],u=o[0],l=o.slice(1),p=this.getConfig().dbStatementSerializer||bDt.defaultDbStatementSerializer,h=(0,AMe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Co.SemconvStability.STABLE&&(h[JW.ATTR_DB_OPERATION_NAME]=u);try{let T=p(u,l);T!=null&&(this._semconvStability&Co.SemconvStability.OLD&&(h[IDt.ATTR_DB_STATEMENT]=T),this._semconvStability&Co.SemconvStability.STABLE&&(h[JW.ATTR_DB_QUERY_TEXT]=T))}catch(T){this._diag.error("dbStatementSerializer throw an exception",T,{commandName:u})}let y=this.tracer.startSpan(`${e.COMPONENT}-${u}`,{kind:up.SpanKind.CLIENT,attributes:h}),S=up.context.with(up.trace.setSpan(up.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(T=>{this._endSpanWithResponse(y,u,l,T,void 0)},T=>{this._endSpanWithResponse(y,u,l,null,T)});else{let T=S;T[mO]=T[mO]||[],T[mO].push({span:y,commandName:u,commandArgs:l})}return S}_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(u=>u.commandName),s=o.every(u=>u===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let u=0;u<t.length;u++){let{span:l,commandArgs:p}=t[u],h=n[u],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Co.SemconvStability.STABLE&&l.setAttribute(JW.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[u],p,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(u){this._diag.error("responseHook throw an exception",u)}i&&(t.recordException(i),t.setStatus({code:up.SpanStatusCode.ERROR,message:i?.message})),t.end()}};l6.RedisInstrumentationV4_V5=ZW});var SMe=P(d6=>{"use strict";m();Object.defineProperty(d6,"__esModule",{value:!0});d6.RedisInstrumentation=void 0;var CDt=sn(),EMe=i6(),vDt=pMe(),RDt=_Me(),yMe={requireParentSpan:!1},WW=class extends CDt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...yMe,...t};super(EMe.PACKAGE_NAME,EMe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new vDt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new RDt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...yMe,...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())}};d6.RedisInstrumentation=WW});var TMe=P(p6=>{"use strict";m();Object.defineProperty(p6,"__esModule",{value:!0});p6.RedisInstrumentation=void 0;var xDt=SMe();Object.defineProperty(p6,"RedisInstrumentation",{enumerable:!0,get:function(){return xDt.RedisInstrumentation}})});function AO(e,t){return e.includes(t.toLowerCase())}function eX(e){return AO(XW,e)?"cache.get":AO(NDt,e)?"cache.put":void 0}function BDt(e,t){return t.some(n=>e.startsWith(n))}function IMe(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)?bMe(o.map(i=>n(i))):["<unknown>"],r=t[0];return AO(DDt,e)&&r!=null?n(r):bMe(t.map(o=>n(o)))}catch{return}}function CMe(e,t,n){if(!eX(e))return!1;for(let r of t)if(BDt(r,n))return!0;return!1}function vMe(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 bMe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var DDt,XW,NDt,RMe=w(()=>{m();DDt=["get","set","setex"],XW=["get","mget"],NDt=["set","setex"]});var xMe,DMe,f6,gO,NMe,wDt,ODt,BMe,kDt,wMe,OMe=w(()=>{m();xMe=ue(cMe(),1),DMe=ue(TMe(),1);mt();_r();RMe();f6="Redis",gO={},NMe=(e,t,n,r)=>{e.setAttribute(Pt,"auto.db.otel.redis");let o=IMe(t,n),i=eX(t);if(!o||!i||!gO.cachePrefixes||!CMe(t,o,gO.cachePrefixes))return;let s=kt(e).data["net.peer.name"],u=kt(e).data["net.peer.port"];u&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":u});let l=vMe(r);l&&e.setAttribute(oY,l),AO(XW,t)&&l!==void 0&&e.setAttribute(nY,l>0),e.setAttributes({[Xt]:i,[rY]:o});let p=o.join(", ");e.updateName(gO.maxCacheKeyLength?Q_(p,gO.maxCacheKeyLength):p)},wDt=ut(`${f6}.IORedis`,()=>new xMe.IORedisInstrumentation({responseHook:NMe})),ODt=ut(`${f6}.Redis`,()=>new DMe.RedisInstrumentation({responseHook:NMe})),BMe=Object.assign(()=>{wDt(),ODt()},{id:f6}),kDt=((e={})=>({name:f6,setupOnce(){gO=e,BMe()}})),wMe=kDt});var kMe=P(m6=>{"use strict";m();Object.defineProperty(m6,"__esModule",{value:!0});m6.EVENT_LISTENERS_SET=void 0;m6.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var tX=P(hO=>{"use strict";m();Object.defineProperty(hO,"__esModule",{value:!0});hO.AttributeNames=void 0;var PDt;(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"})(PDt=hO.AttributeNames||(hO.AttributeNames={}))});var nX=P(wr=>{"use strict";m();Object.defineProperty(wr,"__esModule",{value:!0});wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=wr.METRIC_DB_CLIENT_CONNECTION_COUNT=wr.DB_SYSTEM_VALUE_POSTGRESQL=wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=wr.ATTR_NET_PEER_PORT=wr.ATTR_NET_PEER_NAME=wr.ATTR_DB_USER=wr.ATTR_DB_SYSTEM=wr.ATTR_DB_STATEMENT=wr.ATTR_DB_NAME=wr.ATTR_DB_CONNECTION_STRING=wr.ATTR_DB_CLIENT_CONNECTION_STATE=wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;wr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";wr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";wr.ATTR_DB_CONNECTION_STRING="db.connection_string";wr.ATTR_DB_NAME="db.name";wr.ATTR_DB_STATEMENT="db.statement";wr.ATTR_DB_SYSTEM="db.system";wr.ATTR_DB_USER="db.user";wr.ATTR_NET_PEER_NAME="net.peer.name";wr.ATTR_NET_PEER_PORT="net.peer.port";wr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";wr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";wr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";wr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";wr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var rX=P(_O=>{"use strict";m();Object.defineProperty(_O,"__esModule",{value:!0});_O.SpanNames=void 0;var MDt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(MDt=_O.SpanNames||(_O.SpanNames={}))});var GMe=P(sr=>{"use strict";m();Object.defineProperty(sr,"__esModule",{value:!0});sr.sanitizedErrorMessage=sr.isObjectWithTextString=sr.getErrorMessage=sr.patchClientConnectCallback=sr.patchCallbackPGPool=sr.updateCounter=sr.getPoolName=sr.patchCallback=sr.handleExecutionResult=sr.handleConfigQuery=sr.shouldSkipInstrumentation=sr.getSemanticAttributesFromPoolConnection=sr.getSemanticAttributesFromConnection=sr.getConnectionString=sr.parseAndMaskConnectionString=sr.parseNormalizedOperationName=sr.getQuerySpanName=void 0;var CE=(ze(),Le(nt)),A6=tX(),cp=(Xn(),Le(jr)),Ei=nX(),nT=sn(),PMe=rX();function MMe(e,t){if(!t)return PMe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:LMe(t.text);return`${PMe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}sr.getQuerySpanName=MMe;function LMe(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}sr.parseNormalizedOperationName=LMe;function UMe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}sr.parseAndMaskConnectionString=UMe;function oX(e){if("connectionString"in e&&e.connectionString)return UMe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}sr.getConnectionString=oX;function g6(e){if(Number.isInteger(e))return e}function QMe(e,t){let n={};return t&nT.SemconvStability.OLD&&(n={...n,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:e.database,[Ei.ATTR_DB_CONNECTION_STRING]:oX(e),[Ei.ATTR_DB_USER]:e.user,[Ei.ATTR_NET_PEER_NAME]:e.host,[Ei.ATTR_NET_PEER_PORT]:g6(e.port)}),t&nT.SemconvStability.STABLE&&(n={...n,[cp.ATTR_DB_SYSTEM_NAME]:cp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[cp.ATTR_DB_NAMESPACE]:e.namespace,[cp.ATTR_SERVER_ADDRESS]:e.host,[cp.ATTR_SERVER_PORT]:g6(e.port)}),n}sr.getSemanticAttributesFromConnection=QMe;function LDt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[A6.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[A6.AttributeNames.MAX_CLIENT]:e.maxClient};return t&nT.SemconvStability.OLD&&(r={...r,[Ei.ATTR_DB_SYSTEM]:Ei.DB_SYSTEM_VALUE_POSTGRESQL,[Ei.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ei.ATTR_DB_CONNECTION_STRING]:oX(e),[Ei.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ei.ATTR_NET_PEER_PORT]:Number(n?.port)||g6(e.port),[Ei.ATTR_DB_USER]:n?.username??e.user}),t&nT.SemconvStability.STABLE&&(r={...r,[cp.ATTR_DB_SYSTEM_NAME]:cp.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[cp.ATTR_DB_NAMESPACE]:e.namespace,[cp.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[cp.ATTR_SERVER_PORT]:Number(n?.port)||g6(e.port)}),r}sr.getSemanticAttributesFromPoolConnection=LDt;function UDt(e){return e.requireParentSpan===!0&&CE.trace.getSpan(CE.context.active())===void 0}sr.shouldSkipInstrumentation=UDt;function QDt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=MMe(i,r),u=e.startSpan(s,{kind:CE.SpanKind.CLIENT,attributes:QMe(o,n)});if(!r)return u;if(r.text&&(n&nT.SemconvStability.OLD&&u.setAttribute(Ei.ATTR_DB_STATEMENT,r.text),n&nT.SemconvStability.STABLE&&u.setAttribute(cp.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(p=>p==null?"null":p instanceof Buffer?p.toString():typeof p=="object"?typeof p.toPostgres=="function"?p.toPostgres():JSON.stringify(p):p.toString());u.setAttribute(A6.AttributeNames.PG_VALUES,l)}catch(l){CE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&u.setAttribute(A6.AttributeNames.PG_PLAN,r.name),u}sr.handleConfigQuery=QDt;function FMe(e,t,n){typeof e.responseHook=="function"&&(0,nT.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&CE.diag.error("Error running response hook",r)},!0)}sr.handleExecutionResult=FMe;function FDt(e,t,n,r,o){return function(s,u){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[cp.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(h6(s)),t.setStatus({code:CE.SpanStatusCode.ERROR,message:s.message})):FMe(e,t,u),o(),t.end(),n.call(this,s,u)}}sr.patchCallback=FDt;function GDt(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()}sr.getPoolName=GDt;function jDt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,u=t.idleCount,l=i-u;return n.add(l-o.used,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(u-o.idle,{[Ei.ATTR_DB_CLIENT_CONNECTION_STATE]:Ei.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ei.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:u,pending:s}}sr.updateCounter=jDt;function zDt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(h6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}sr.patchCallbackPGPool=zDt;function HDt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(h6(r)),e.setStatus({code:CE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}sr.patchClientConnectCallback=HDt;function $Dt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}sr.getErrorMessage=$Dt;function qDt(e){return typeof e=="object"&&typeof e?.text=="string"}sr.isObjectWithTextString=qDt;function h6(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}sr.sanitizedErrorMessage=h6});var jMe=P(xR=>{"use strict";m();Object.defineProperty(xR,"__esModule",{value:!0});xR.PACKAGE_NAME=xR.PACKAGE_VERSION=void 0;xR.PACKAGE_VERSION="0.66.0";xR.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var YMe=P(E6=>{"use strict";m();Object.defineProperty(E6,"__esModule",{value:!0});E6.PgInstrumentation=void 0;var tc=sn(),qr=(ze(),Le(nt)),zMe=kMe(),ni=GMe(),HMe=GW(),$Me=jMe(),qMe=rX(),_6=vr(),Rf=(Xn(),Le(jr)),EO=nX();function DR(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var iX=class extends tc.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super($Me.PACKAGE_NAME,$Me.PACKAGE_VERSION,t),this._semconvStability=(0,tc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Rf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:qr.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(EO.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(EO.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 tc.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new tc.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new tc.InstrumentationNodeModuleDefinition("pg",t,u=>{let l=DR(u);return this._patchPgClient(l.Client),u},u=>{let l=DR(u);return this._unpatchPgClient(l.Client),u},[o,r]),s=new tc.InstrumentationNodeModuleDefinition("pg-pool",n,u=>{let l=DR(u);return(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},u=>{let l=DR(u);(0,tc.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=DR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.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=DR(t);return(0,tc.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,tc.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(qMe.SpanNames.CONNECT,{kind:qr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=qr.trace.getSpan(qr.context.active());o=ni.patchClientConnectCallback(s,o),l&&(o=qr.context.bind(qr.context.active(),o))}let u=qr.context.with(qr.trace.setSpan(qr.context.active(),s),()=>n.call(this,o));return VMe(s,u)}}recordOperationDuration(t,n){let r={},o=[Rf.ATTR_DB_NAMESPACE,Rf.ATTR_ERROR_TYPE,Rf.ATTR_SERVER_PORT,Rf.ATTR_SERVER_ADDRESS,Rf.ATTR_DB_OPERATION_NAME];this._semconvStability&tc.SemconvStability.OLD&&o.push(EO.ATTR_DB_SYSTEM),this._semconvStability&tc.SemconvStability.STABLE&&o.push(Rf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,_6.hrTimeToMilliseconds)((0,_6.hrTimeDuration)(n,(0,_6.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(ni.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,_6.hrTime)(),s=o[0],u=typeof s=="string",l=ni.isObjectWithTextString(s),p=u?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[EO.ATTR_DB_SYSTEM]:EO.DB_SYSTEM_VALUE_POSTGRESQL,[Rf.ATTR_DB_NAMESPACE]:this.database,[Rf.ATTR_SERVER_PORT]:this.connectionParameters.port,[Rf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};p?.text&&(h[Rf.ATTR_DB_OPERATION_NAME]=ni.parseNormalizedOperationName(p?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),T=ni.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,p);if(S.addSqlCommenterCommentToQueries&&(u?o[0]=(0,HMe.addSqlCommenterComment)(T,s):l&&!("name"in s)&&(o[0]={...s,text:(0,HMe.addSqlCommenterComment)(T,s.text)})),o.length>0){let x=qr.trace.getSpan(qr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=ni.patchCallback(S,T,o[o.length-1],h,y),x&&(o[o.length-1]=qr.context.bind(qr.context.active(),o[o.length-1]));else if(typeof p?.callback=="function"){let O=ni.patchCallback(t.getConfig(),T,p.callback,h,y);x&&(O=qr.context.bind(qr.context.active(),O)),o[0].callback=O}}let{requestHook:v}=S;typeof v=="function"&&p&&(0,tc.safeExecuteInTheMiddle)(()=>{let{database:x,host:O,port:M,user:j}=this.connectionParameters;v(T,{connection:{database:x,host:O,port:M,user:j},query:{text:p.text,values:p.values,name:p.name}})},x=>{x&&t._diag.error("Error running query hook",x)},!0);let R;try{R=n.apply(this,o)}catch(x){throw x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:qr.SpanStatusCode.ERROR,message:ni.getErrorMessage(x)}),T.end(),x}return R instanceof Promise?R.then(x=>new Promise(O=>{ni.handleExecutionResult(t.getConfig(),T,x),y(),T.end(),O(x)})).catch(x=>new Promise((O,M)=>{x instanceof Error&&T.recordException(ni.sanitizedErrorMessage(x)),T.setStatus({code:qr.SpanStatusCode.ERROR,message:x.message}),y(),T.end(),M(x)})):R})}_setPoolConnectEventListeners(t){if(t[zMe.EVENT_LISTENERS_SET])return;let n=ni.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=ni.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[zMe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(ni.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(qMe.SpanNames.POOL_CONNECT,{kind:qr.SpanKind.CLIENT,attributes:ni.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=qr.trace.getSpan(qr.context.active());o=ni.patchCallbackPGPool(s,o),l&&(o=qr.context.bind(qr.context.active(),o))}let u=qr.context.with(qr.trace.setSpan(qr.context.active(),s),()=>n.call(this,o));return VMe(s,u)}}};E6.PgInstrumentation=iX;function VMe(e,t){if(!(t instanceof Promise))return t;let n=t;return qr.context.bind(qr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(ni.sanitizedErrorMessage(r)),e.setStatus({code:qr.SpanStatusCode.ERROR,message:ni.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var KMe=P(NR=>{"use strict";m();Object.defineProperty(NR,"__esModule",{value:!0});NR.AttributeNames=NR.PgInstrumentation=void 0;var VDt=YMe();Object.defineProperty(NR,"PgInstrumentation",{enumerable:!0,get:function(){return VDt.PgInstrumentation}});var YDt=tX();Object.defineProperty(NR,"AttributeNames",{enumerable:!0,get:function(){return YDt.AttributeNames}})});var JMe,ZMe,WMe,KDt,XMe,e2e=w(()=>{m();JMe=ue(KMe(),1);_r();ZMe="Postgres",WMe=ut(ZMe,JMe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Hr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),KDt=(e=>({name:ZMe,setupOnce(){WMe(e)}})),XMe=KDt});var vE,aX,t2e,JDt,ZDt,n2e,sX,WDt,r2e,o2e=w(()=>{m();ze();vE=ue(sn(),1);Xn();mt();_r();qS();aX="PostgresJs",t2e=[">=3.0.0 <4"],JDt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,ZDt=Symbol.for("sentry.query.from.instrumented.sql"),n2e=ut(aX,e=>new sX({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),sX=class extends vE.InstrumentationBase{constructor(t){super("sentry-postgres-js",er,t)}init(){let t=new vE.InstrumentationNodeModuleDefinition("postgres",t2e,n=>{try{return this._patchPostgres(n)}catch(r){return xs&&W.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new vE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,t2e,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 xs&&W.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let u=Reflect.construct(r,s);if(!u||typeof u!="function")return xs&&W.warn("postgres() did not return a valid instance"),u;let l=o.getConfig();return sK(u,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}return n?i:(mw(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return qt.getSpan(Xe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(MC,r);return}let o=n?.match(JDt);o?.[1]&&t.setAttribute(MC,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[ZDt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return ra({name:s||"postgresjs.query",op:"db"},u=>{Hr(u,"auto.db.postgresjs"),u.setAttributes({[dS]:"postgres",[_V]:s});let l=n.getConfig(),{requestHook:p}=l;p&&(0,vE.safeExecuteInTheMiddle)(()=>p(u,s,void 0),S=>{S&&(u.setAttribute("sentry.hook.error","requestHook failed"),xs&&W.error(`Error in requestHook for ${aX} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,T,v)=>{try{n._setOperationName(u,s,v?.[0]?.command),u.end()}catch(R){xs&&W.error("Error ending span in resolve callback:",R)}return Reflect.apply(S,T,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,T,v)=>{try{u.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),u.setAttribute(EV,v?.[0]?.code||"unknown"),u.setAttribute(yV,v?.[0]?.name||"unknown"),n._setOperationName(u,s),u.end()}catch(R){xs&&W.error("Error ending span in reject callback:",R)}return Reflect.apply(S,T,v)}});try{return r.apply(this,o)}catch(S){throw u.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),u.end(),S}})},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}},WDt=(e=>({name:aX,setupOnce(){n2e(e)}})),r2e=WDt});var i2e=P(yO=>{"use strict";m();Object.defineProperty(yO,"__esModule",{value:!0});yO.SeverityNumber=void 0;var XDt;(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"})(XDt=yO.SeverityNumber||(yO.SeverityNumber={}))});var S6=P(BR=>{"use strict";m();Object.defineProperty(BR,"__esModule",{value:!0});BR.NOOP_LOGGER=BR.NoopLogger=void 0;var y6=class{emit(t){}};BR.NoopLogger=y6;BR.NOOP_LOGGER=new y6});var b6=P(wR=>{"use strict";m();Object.defineProperty(wR,"__esModule",{value:!0});wR.NOOP_LOGGER_PROVIDER=wR.NoopLoggerProvider=void 0;var e1t=S6(),T6=class{getLogger(t,n,r){return new e1t.NoopLogger}};wR.NoopLoggerProvider=T6;wR.NOOP_LOGGER_PROVIDER=new T6});var cX=P(I6=>{"use strict";m();Object.defineProperty(I6,"__esModule",{value:!0});I6.ProxyLogger=void 0;var t1t=S6(),uX=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):t1t.NOOP_LOGGER}};I6.ProxyLogger=uX});var dX=P(C6=>{"use strict";m();Object.defineProperty(C6,"__esModule",{value:!0});C6.ProxyLoggerProvider=void 0;var n1t=b6(),r1t=cX(),lX=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new r1t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:n1t.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)}};C6.ProxyLoggerProvider=lX});var s2e=P(v6=>{"use strict";m();Object.defineProperty(v6,"__esModule",{value:!0});v6._globalThis=void 0;v6._globalThis=typeof globalThis=="object"?globalThis:global});var a2e=P(R6=>{"use strict";m();Object.defineProperty(R6,"__esModule",{value:!0});R6._globalThis=void 0;var o1t=s2e();Object.defineProperty(R6,"_globalThis",{enumerable:!0,get:function(){return o1t._globalThis}})});var u2e=P(x6=>{"use strict";m();Object.defineProperty(x6,"__esModule",{value:!0});x6._globalThis=void 0;var i1t=a2e();Object.defineProperty(x6,"_globalThis",{enumerable:!0,get:function(){return i1t._globalThis}})});var c2e=P(tA=>{"use strict";m();Object.defineProperty(tA,"__esModule",{value:!0});tA.API_BACKWARDS_COMPATIBILITY_VERSION=tA.makeGetter=tA._global=tA.GLOBAL_LOGS_API_KEY=void 0;var s1t=u2e();tA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");tA._global=s1t._globalThis;function a1t(e,t,n){return r=>r===e?t:n}tA.makeGetter=a1t;tA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var d2e=P(D6=>{"use strict";m();Object.defineProperty(D6,"__esModule",{value:!0});D6.LogsAPI=void 0;var lp=c2e(),u1t=b6(),l2e=dX(),pX=class e{constructor(){this._proxyLoggerProvider=new l2e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return lp._global[lp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(lp._global[lp.GLOBAL_LOGS_API_KEY]=(0,lp.makeGetter)(lp.API_BACKWARDS_COMPATIBILITY_VERSION,t,u1t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=lp._global[lp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(lp._global,lp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete lp._global[lp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new l2e.ProxyLoggerProvider}};D6.LogsAPI=pX});var fX=P(ua=>{"use strict";m();Object.defineProperty(ua,"__esModule",{value:!0});ua.logs=ua.ProxyLoggerProvider=ua.ProxyLogger=ua.NoopLoggerProvider=ua.NOOP_LOGGER_PROVIDER=ua.NoopLogger=ua.NOOP_LOGGER=ua.SeverityNumber=void 0;var c1t=i2e();Object.defineProperty(ua,"SeverityNumber",{enumerable:!0,get:function(){return c1t.SeverityNumber}});var p2e=S6();Object.defineProperty(ua,"NOOP_LOGGER",{enumerable:!0,get:function(){return p2e.NOOP_LOGGER}});Object.defineProperty(ua,"NoopLogger",{enumerable:!0,get:function(){return p2e.NoopLogger}});var f2e=b6();Object.defineProperty(ua,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return f2e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ua,"NoopLoggerProvider",{enumerable:!0,get:function(){return f2e.NoopLoggerProvider}});var l1t=cX();Object.defineProperty(ua,"ProxyLogger",{enumerable:!0,get:function(){return l1t.ProxyLogger}});var d1t=dX();Object.defineProperty(ua,"ProxyLoggerProvider",{enumerable:!0,get:function(){return d1t.ProxyLoggerProvider}});var p1t=d2e();ua.logs=p1t.LogsAPI.getInstance()});var m2e=P(OR=>{"use strict";m();Object.defineProperty(OR,"__esModule",{value:!0});OR.disableInstrumentations=OR.enableInstrumentations=void 0;function f1t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}OR.enableInstrumentations=f1t;function m1t(e){e.forEach(t=>t.disable())}OR.disableInstrumentations=m1t});var h2e=P(N6=>{"use strict";m();Object.defineProperty(N6,"__esModule",{value:!0});N6.registerInstrumentations=void 0;var A2e=(ze(),Le(nt)),A1t=fX(),g2e=m2e();function g1t(e){let t=e.tracerProvider||A2e.trace.getTracerProvider(),n=e.meterProvider||A2e.metrics.getMeterProvider(),r=e.loggerProvider||A1t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,g2e.enableInstrumentations)(o,t,n,r),()=>{(0,g2e.disableInstrumentations)(o)}}N6.registerInstrumentations=g1t});var v2e=P(B6=>{"use strict";m();Object.defineProperty(B6,"__esModule",{value:!0});B6.satisfies=void 0;var hX=(ze(),Le(nt)),T2e=/^(?: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-]+)*))?$/,h1t=/^(?<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-]+)*))?$/,_1t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function E1t(e,t,n){if(!y1t(e))return hX.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=I1t(e);if(!r)return!1;let o=[],i=b2e(r,t,o,n);return i&&!n?.includePrerelease?T1t(r,o):i}B6.satisfies=E1t;function y1t(e){return typeof e=="string"&&T2e.test(e)}function b2e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(mX(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=$1t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!mX(e,i,n,r))return!1;return!0}return mX(e,t,n,r)}function mX(e,t,n,r){if(t=b1t(t,r),t.includes(" "))return b2e(e,t,n,r);{let o=C1t(t);return n.push(o),S1t(e,o)}}function S1t(e,t){if(t.invalid)return!1;if(!t.version||gX(t.version))return!0;let n=E2e(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=E2e(r,o)}return _1t[t.op]?.includes(n)}function T1t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function b1t(e,t){return e=e.trim(),e=z1t(e,t),e=j1t(e),e=H1t(e,t),e=e.trim(),e}function nc(e){return!e||e.toLowerCase()==="x"||e==="*"}function I1t(e){let t=e.match(T2e);if(!t){hX.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function C1t(e){if(!e)return{};let t=e.match(h1t);if(!t)return hX.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),u=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:u,prereleaseSegmentCount:u?u.length:0,build:i}}function gX(e){return e==="*"||e==="x"||e==="X"}function _2e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function v1t(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 R1t(e,t){if(gX(e)||gX(t))return 0;let[n,r]=v1t(_2e(e),_2e(t));return n>r?1:n<r?-1:0}function E2e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=R1t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var I2e="[a-zA-Z0-9-]",C2e="0|[1-9]\\d*",x1t=`\\d*[a-zA-Z-]${I2e}*`,D1t="((?:<|>)?=?)",y2e=`(?:${C2e}|${x1t})`,N1t=`(?:-(${y2e}(?:\\.${y2e})*))`,S2e=`${I2e}+`,B1t=`(?:\\+(${S2e}(?:\\.${S2e})*))`,AX=`${C2e}|x|X|\\*`,SO=`[v=\\s]*(${AX})(?:\\.(${AX})(?:\\.(${AX})(?:${N1t})?${B1t}?)?)?`,w1t=`^${D1t}\\s*${SO}$`,O1t=new RegExp(w1t),k1t=`^\\s*(${SO})\\s+-\\s+(${SO})\\s*$`,P1t=new RegExp(k1t),M1t="(?:~>?)",L1t=`^${M1t}${SO}$`,U1t=new RegExp(L1t),Q1t="(?:\\^)",F1t=`^${Q1t}${SO}$`,G1t=new RegExp(F1t);function j1t(e){let t=U1t;return e.replace(t,(n,r,o,i,s)=>{let u;return nc(r)?u="":nc(o)?u=`>=${r}.0.0 <${+r+1}.0.0-0`:nc(i)?u=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?u=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:u=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,u})}function z1t(e,t){let n=G1t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,u,l)=>{let p;return nc(i)?p="":nc(s)?p=`>=${i}.0.0${r} <${+i+1}.0.0-0`:nc(u)?i==="0"?p=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?p=`>=${i}.${s}.${u}-${l} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}-${l} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?p=`>=${i}.${s}.${u}${r} <${i}.${s}.${+u+1}-0`:p=`>=${i}.${s}.${u}${r} <${i}.${+s+1}.0-0`:p=`>=${i}.${s}.${u} <${+i+1}.0.0-0`,p})}function H1t(e,t){let n=O1t;return e.replace(n,(r,o,i,s,u,l)=>{let p=nc(i),h=p||nc(s),y=h||nc(u),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",p?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),u=0,o===">"?(o=">=",h?(i=+i+1,s=0,u=0):(s=+s+1,u=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${u}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function $1t(e,t){let n=P1t;return e.replace(n,(r,o,i,s,u,l,p,h,y,S,T,v)=>(nc(i)?o="":nc(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:nc(u)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,nc(y)?h="":nc(S)?h=`<${+y+1}.0.0-0`:nc(T)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${T}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+T+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var _X=P(La=>{"use strict";m();Object.defineProperty(La,"__esModule",{value:!0});La.massUnwrap=La.unwrap=La.massWrap=La.wrap=void 0;var rc=console.error.bind(console);function TO(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 q1t=(e,t,n)=>{if(!e||!e[t]){rc("no original function "+String(t)+" to wrap");return}if(!n){rc("no wrapper function"),rc(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){rc("original object and wrapper must be functions");return}let o=n(r,t);return TO(o,"__original",r),TO(o,"__unwrap",()=>{e[t]===o&&TO(e,t,r)}),TO(o,"__wrapped",!0),TO(e,t,o),o};La.wrap=q1t;var V1t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,La.wrap)(r,o,n)})})};La.massWrap=V1t;var Y1t=(e,t)=>{if(!e||!e[t]){rc("no function to unwrap."),rc(new Error().stack);return}let n=e[t];if(!n.__unwrap)rc("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};La.unwrap=Y1t;var K1t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{rc("must provide one or more modules to patch"),rc(new Error().stack);return}if(!(t&&Array.isArray(t))){rc("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,La.unwrap)(n,r)})})};La.massUnwrap=K1t;function bO(e){e&&e.logger&&(typeof e.logger!="function"?rc("new logger isn't a function, not replacing"):rc=e.logger)}La.default=bO;bO.wrap=La.wrap;bO.massWrap=La.massWrap;bO.unwrap=La.unwrap;bO.massUnwrap=La.massUnwrap});var R2e=P(O6=>{"use strict";m();Object.defineProperty(O6,"__esModule",{value:!0});O6.InstrumentationAbstract=void 0;var EX=(ze(),Le(nt)),J1t=fX(),w6=_X(),yX=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=EX.diag.createComponentLogger({namespace:t}),this._tracer=EX.trace.getTracer(t,n),this._meter=EX.metrics.getMeter(t,n),this._logger=J1t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=w6.wrap;_unwrap=w6.unwrap;_massWrap=w6.massWrap;_massUnwrap=w6.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)}}};O6.InstrumentationAbstract=yX});var x2e=P(RE=>{"use strict";m();Object.defineProperty(RE,"__esModule",{value:!0});RE.ModuleNameTrie=RE.ModuleNameSeparator=void 0;RE.ModuleNameSeparator="/";var k6=class{hooks=[];children=new Map},SX=class{_trie=new k6;_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 k6,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=[],s=!0;for(let u of t.split(RE.ModuleNameSeparator)){let l=o.children.get(u);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((u,l)=>u.insertedId-l.insertedId),i.map(({hook:u})=>u))}};RE.ModuleNameTrie=SX});var N2e=P(P6=>{"use strict";m();Object.defineProperty(P6,"__esModule",{value:!0});P6.RequireInTheMiddleSingleton=void 0;var Z1t=hS(),D2e=Qe("path"),TX=x2e(),W1t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),bX=class e{_moduleNameTrie=new TX.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Z1t.Hook(null,{internals:!0},(t,n,r)=>{let o=X1t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return W1t?new e:this._instance=this._instance??new e}};P6.RequireInTheMiddleSingleton=bX;function X1t(e){return D2e.sep!==TX.ModuleNameSeparator?e.split(D2e.sep).join(TX.ModuleNameSeparator):e}});var IX=P(xE=>{"use strict";m();Object.defineProperty(xE,"__esModule",{value:!0});xE.isWrapped=xE.safeExecuteInTheMiddleAsync=xE.safeExecuteInTheMiddle=void 0;function eNt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}xE.safeExecuteInTheMiddle=eNt;async function tNt(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}}xE.safeExecuteInTheMiddleAsync=tNt;function nNt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}xE.isWrapped=nNt});var O2e=P(M6=>{"use strict";m();Object.defineProperty(M6,"__esModule",{value:!0});M6.InstrumentationBase=void 0;var IO=Qe("path"),B2e=Qe("util"),rNt=v2e(),CX=_X(),oNt=R2e(),iNt=N2e(),sNt=iW(),CO=(ze(),Le(nt)),aNt=hS(),uNt=Qe("fs"),cNt=IX(),vX=class extends oNt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=iNt.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,cNt.isWrapped)(t[n])&&this._unwrap(t,n),B2e.types.isProxy(t)){let o=(0,CX.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,CX.wrap)(t,n,r)};_unwrap=(t,n)=>B2e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,CX.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{CO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){CO.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{CO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){CO.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=Qe.resolve(n);Qe.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,uNt.readFileSync)(IO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{CO.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 w2e(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 s=t.files??[],u=IO.normalize(r);return s.filter(p=>p.name===u).filter(p=>w2e(p.supportedVersions,i,t.includePrerelease)).reduce((p,h)=>(h.moduleExports=p,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(p,t.moduleVersion)):p),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=(s,u,l)=>{if(!l&&IO.isAbsolute(u)){let p=IO.parse(u);u=p.name,l=p.dir}return this._onRequire(t,s,u,l)},r=(s,u,l)=>this._onRequire(t,s,u,l),o=IO.isAbsolute(t.name)?new aNt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new sNt.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}};M6.InstrumentationBase=vX;function w2e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,rNt.satisfies)(t,r,{includePrerelease:n}))}});var k2e=P(L6=>{"use strict";m();Object.defineProperty(L6,"__esModule",{value:!0});L6.normalize=void 0;var lNt=Qe("path");Object.defineProperty(L6,"normalize",{enumerable:!0,get:function(){return lNt.normalize}})});var P2e=P(kR=>{"use strict";m();Object.defineProperty(kR,"__esModule",{value:!0});kR.normalize=kR.InstrumentationBase=void 0;var dNt=O2e();Object.defineProperty(kR,"InstrumentationBase",{enumerable:!0,get:function(){return dNt.InstrumentationBase}});var pNt=k2e();Object.defineProperty(kR,"normalize",{enumerable:!0,get:function(){return pNt.normalize}})});var RX=P(PR=>{"use strict";m();Object.defineProperty(PR,"__esModule",{value:!0});PR.normalize=PR.InstrumentationBase=void 0;var M2e=P2e();Object.defineProperty(PR,"InstrumentationBase",{enumerable:!0,get:function(){return M2e.InstrumentationBase}});Object.defineProperty(PR,"normalize",{enumerable:!0,get:function(){return M2e.normalize}})});var L2e=P(U6=>{"use strict";m();Object.defineProperty(U6,"__esModule",{value:!0});U6.InstrumentationNodeModuleDefinition=void 0;var xX=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||[]}};U6.InstrumentationNodeModuleDefinition=xX});var U2e=P(Q6=>{"use strict";m();Object.defineProperty(Q6,"__esModule",{value:!0});Q6.InstrumentationNodeModuleFile=void 0;var fNt=RX(),DX=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,fNt.normalize)(t)}};Q6.InstrumentationNodeModuleFile=DX});var Q2e=P(rT=>{"use strict";m();Object.defineProperty(rT,"__esModule",{value:!0});rT.semconvStabilityFromStr=rT.SemconvStability=void 0;var F6;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(F6=rT.SemconvStability||(rT.SemconvStability={}));function mNt(e,t){let n=F6.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=F6.DUPLICATE;break}else o.toLowerCase()===e&&(n=F6.STABLE);return n}rT.semconvStabilityFromStr=mNt});var G2e=P(cs=>{"use strict";m();Object.defineProperty(cs,"__esModule",{value:!0});cs.semconvStabilityFromStr=cs.SemconvStability=cs.safeExecuteInTheMiddleAsync=cs.safeExecuteInTheMiddle=cs.isWrapped=cs.InstrumentationNodeModuleFile=cs.InstrumentationNodeModuleDefinition=cs.InstrumentationBase=cs.registerInstrumentations=void 0;var ANt=h2e();Object.defineProperty(cs,"registerInstrumentations",{enumerable:!0,get:function(){return ANt.registerInstrumentations}});var gNt=RX();Object.defineProperty(cs,"InstrumentationBase",{enumerable:!0,get:function(){return gNt.InstrumentationBase}});var hNt=L2e();Object.defineProperty(cs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return hNt.InstrumentationNodeModuleDefinition}});var _Nt=U2e();Object.defineProperty(cs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return _Nt.InstrumentationNodeModuleFile}});var NX=IX();Object.defineProperty(cs,"isWrapped",{enumerable:!0,get:function(){return NX.isWrapped}});Object.defineProperty(cs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return NX.safeExecuteInTheMiddle}});Object.defineProperty(cs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return NX.safeExecuteInTheMiddleAsync}});var F2e=Q2e();Object.defineProperty(cs,"SemconvStability",{enumerable:!0,get:function(){return F2e.SemconvStability}});Object.defineProperty(cs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return F2e.semconvStabilityFromStr}})});function SNt(){let e=MR[wX];return e?.helper?e.helper:MR[BX]?.helper}function TNt(e){let t={helper:e};MR[wX]=t,MR[BX]=t}function bNt(){delete MR[wX],delete MR[BX]}function vNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}function H2e(e,t,n,r,o){if($2e(t.name,o))return;let i={attributes:t.attributes,kind:vNt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let p=r.get(l);return p?{context:{spanId:p,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let u=n.filter(l=>l.parentId===t.id);for(let l of u)H2e(e,l,n,r,o);s.end(t.endTime)})}function j2e(e,t){return xNt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function xNt(e){return e!=null&&typeof e.then=="function"}function $2e(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var G6,ENt,yNt,BX,wX,MR,INt,CNt,RNt,q2e,z2e,DNt,NNt,V2e,Y2e=w(()=>{m();ze();G6=ue(G2e(),1);ze();ENt={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"}},yNt=ENt.version.split(".")[0],BX="PRISMA_INSTRUMENTATION",wX=`V${yNt}_PRISMA_INSTRUMENTATION`,MR=globalThis;INt=process.env.PRISMA_SHOW_ALL_TRACES==="true",CNt="00-10-10-00";RNt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=qt.getSpanContext(e??Xe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:CNt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)H2e(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Xe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!INt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if($2e(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return j2e(i,t(i,r))}return n.startActiveSpan(o,e,i=>j2e(i,t(i,r)))}};q2e={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},z2e=q2e.version,DNt=q2e.name,NNt="@prisma/client",V2e=class extends G6.InstrumentationBase{tracerProvider;constructor(e={}){super(DNt,z2e,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new G6.InstrumentationNodeModuleDefinition(NNt,[z2e])]}enable(){let e=this._config;TNt(new RNt({tracerProvider:this.tracerProvider??qt.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){bNt()}isEnabled(){return SNt()!==void 0}}});function BNt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function J2e(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function wNt(e){return e==="client"?fo.CLIENT:fo.INTERNAL}var K2e,OX,ONt,Z2e,W2e=w(()=>{m();ze();Y2e();mt();_r();K2e="Prisma";OX=class extends V2e{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=J2e();BNt(t)&&(t.createEngineSpan=n=>{let r=qt.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Xo(()=>{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 s=wNt(i.kind),u=i.parent_span_id,l=i.span_id,p=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:ou.SAMPLED}})),y=qt.setSpanContext(Xe.active(),{traceId:p,spanId:u,traceFlags:ou.SAMPLED});Xe.with(y,()=>{let S={generateTraceId:()=>p,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};ONt=ut(K2e,e=>new OX(e)),Z2e=e=>({name:K2e,setupOnce(){ONt(e)},setup(t){J2e()&&t.on("spanStart",n=>{let r=kt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Pt,"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 X2e=P(LR=>{"use strict";m();Object.defineProperty(LR,"__esModule",{value:!0});LR.PACKAGE_NAME=LR.PACKAGE_VERSION=void 0;LR.PACKAGE_VERSION="0.60.0";LR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var kX=P(nA=>{"use strict";m();Object.defineProperty(nA,"__esModule",{value:!0});nA.HapiLifecycleMethodNames=nA.HapiLayerType=nA.handlerPatched=nA.HapiComponentName=void 0;nA.HapiComponentName="@hapi/hapi";nA.handlerPatched=Symbol("hapi-handler-patched");nA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};nA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var eLe=P(j6=>{"use strict";m();Object.defineProperty(j6,"__esModule",{value:!0});j6.ATTR_HTTP_METHOD=void 0;j6.ATTR_HTTP_METHOD="http.method"});var PX=P(vO=>{"use strict";m();Object.defineProperty(vO,"__esModule",{value:!0});vO.AttributeNames=void 0;var kNt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(kNt=vO.AttributeNames||(vO.AttributeNames={}))});var rLe=P(ls=>{"use strict";m();Object.defineProperty(ls,"__esModule",{value:!0});ls.getPluginFromInput=ls.getExtMetadata=ls.getRouteMetadata=ls.isPatchableExtMethod=ls.isDirectExtInput=ls.isLifecycleExtEventObj=ls.isLifecycleExtType=ls.getPluginName=void 0;var tLe=(Xn(),Le(jr)),PNt=eLe(),RO=kX(),DE=PX(),nLe=sn();function MNt(e){return e.name?e.name:e.pkg.name}ls.getPluginName=MNt;var LNt=e=>typeof e=="string"&&RO.HapiLifecycleMethodNames.has(e);ls.isLifecycleExtType=LNt;var UNt=e=>{let t=e?.type;return t!==void 0&&(0,ls.isLifecycleExtType)(t)};ls.isLifecycleExtEventObj=UNt;var QNt=e=>Array.isArray(e)&&e.length<=3&&(0,ls.isLifecycleExtType)(e[0])&&typeof e[1]=="function";ls.isDirectExtInput=QNt;var FNt=e=>!Array.isArray(e);ls.isPatchableExtMethod=FNt;var GNt=(e,t,n)=>{let r={[tLe.ATTR_HTTP_ROUTE]:e.path};t&nLe.SemconvStability.OLD&&(r[PNt.ATTR_HTTP_METHOD]=e.method),t&nLe.SemconvStability.STABLE&&(r[tLe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[DE.AttributeNames.HAPI_TYPE]=RO.HapiLayerType.PLUGIN,r[DE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[DE.AttributeNames.HAPI_TYPE]=RO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};ls.getRouteMetadata=GNt;var jNt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:RO.HapiLayerType.EXT,[DE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[DE.AttributeNames.EXT_TYPE]:e,[DE.AttributeNames.HAPI_TYPE]:RO.HapiLayerType.EXT},name:r}};ls.getExtMetadata=jNt;var zNt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;ls.getPluginFromInput=zNt});var sLe=P(z6=>{"use strict";m();Object.defineProperty(z6,"__esModule",{value:!0});z6.HapiInstrumentation=void 0;var Wl=(ze(),Le(nt)),oLe=vr(),xO=sn(),iLe=X2e(),DO=kX(),eh=rLe(),MX=class extends xO.InstrumentationBase{_semconvStability;constructor(t={}){super(iLe.PACKAGE_NAME,iLe.PACKAGE_VERSION,t),this._semconvStability=(0,xO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new xO.InstrumentationNodeModuleDefinition(DO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,xO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,xO.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 s=t.apply(this,[i]);return r._wrap(s,"route",u=>n._getServerRoutePatch.bind(n)(u)),r._wrap(s,"ext",u=>n._getServerExtPatch.bind(n)(u)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let u=(0,eh.getPluginFromInput)(s);n._wrapRegisterHandler(u)}else{let s=(0,eh.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let u=0;u<s.length;u++){let l=s[u];if((0,eh.isLifecycleExtType)(l.type)){let p=l,h=r._wrapExtMethods(p.method,l.type,n);p.method=h,s[u]=p}}return t.apply(this,i)}else if((0,eh.isDirectExtInput)(i)){let s=i,u=s[1],l=r._wrapExtMethods(u,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,eh.isLifecycleExtEventObj)(i[0])){let s=i[0],u=r._wrapExtMethods(s.method,s.type,n);return s.method=u,t.call(this,s)}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 s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,eh.getPluginName)(t),o=t.register,i=this,s=function(u,l){return i._wrap(u,"route",p=>n._getServerRoutePatch.bind(n)(p,r)),i._wrap(u,"ext",p=>n._getServerExtPatch.bind(n)(p,r)),o.call(this,u,l)};t.register=s}_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,eh.isPatchableExtMethod)(t))return t[DO.handlerPatched]===!0?t:(t[DO.handlerPatched]=!0,async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await t.apply(this,s);let u=(0,eh.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(u.name,{attributes:u.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),l),t,void 0,...s)}catch(p){throw l.recordException(p),l.setStatus({code:Wl.SpanStatusCode.ERROR,message:p.message}),p}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[DO.handlerPatched]===!0)return t;t[DO.handlerPatched]=!0;let o=i=>async function(...s){if(Wl.trace.getSpan(Wl.context.active())===void 0)return await i.call(this,...s);let u=(0,oLe.getRPCMetadata)(Wl.context.active());u?.type===oLe.RPCType.HTTP&&(u.route=t.path);let l=(0,eh.getRouteMetadata)(t,r._semconvStability,n),p=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Wl.context.with(Wl.trace.setSpan(Wl.context.active(),p),()=>i.call(this,...s))}catch(h){throw p.recordException(h),p.setStatus({code:Wl.SpanStatusCode.ERROR,message:h.message}),h}finally{p.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let u=i(s);return typeof u.handler=="function"&&(u.handler=o(u.handler)),u}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};z6.HapiInstrumentation=MX});var aLe=P(UR=>{"use strict";m();Object.defineProperty(UR,"__esModule",{value:!0});UR.AttributeNames=UR.HapiInstrumentation=void 0;var HNt=sLe();Object.defineProperty(UR,"HapiInstrumentation",{enumerable:!0,get:function(){return HNt.HapiInstrumentation}});var $Nt=PX();Object.defineProperty(UR,"AttributeNames",{enumerable:!0,get:function(){return $Nt.AttributeNames}})});var uLe,cLe,lLe,qNt,dLe,pLe=w(()=>{m();uLe=ue(aLe(),1);_r();cLe="Hapi",lLe=ut(cLe,()=>new uLe.HapiInstrumentation),qNt=(()=>({name:cLe,setupOnce(){lLe()}})),dLe=qNt});var NE,NO,LX=w(()=>{m();NE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},NO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var $6,VNt,YNt,H6,fLe=w(()=>{m();ze();$6=ue(sn(),1);mt();LX();VNt="@sentry/instrumentation-hono",YNt="0.0.1",H6=class extends $6.InstrumentationBase{constructor(t={}){super(VNt,YNt,t)}init(){return[new $6.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 s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}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(s=>t._wrapHandler(s))])}}}_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 s=o.slice(1);return n.apply(this,[i,...s.map(u=>t._wrapHandler(u))])}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,s=n.tracer.startSpan(i);return Xe.with(qt.setSpan(Xe.active(),s),()=>n._safeExecute(()=>{let u=t.apply(this,[r,o]);if(xa(u))return u.then(l=>{let p=n._determineHandlerType(l);return s.setAttributes({[NE.HONO_TYPE]:p,[NE.HONO_NAME]:p===NO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(u);return s.setAttributes({[NE.HONO_TYPE]:l,[NE.HONO_NAME]:l===NO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),u}},()=>s.end(),u=>{n._handleError(s,u),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return xa(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?NO.MIDDLEWARE:NO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Ai.ERROR,message:n.message}),t.recordException(n))}}});function KNt(e){let t=kt(e).data,n=t[NE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[Pt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[NE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Rn()===Kd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[Rg],i=t[pS];typeof o=="string"&&typeof i=="string"&&Rn().setTransactionName(`${i} ${o}`)}var mLe,ALe,JNt,gLe,hLe=w(()=>{m();Xn();mt();_r();qS();LX();fLe();mLe="Hono";ALe=ut(mLe,()=>new H6({responseHook:e=>{KNt(e)}})),JNt=(()=>({name:mLe,setupOnce(){ALe()}})),gLe=JNt});var q6=P(BO=>{"use strict";m();Object.defineProperty(BO,"__esModule",{value:!0});BO.KoaLayerType=void 0;var ZNt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(ZNt=BO.KoaLayerType||(BO.KoaLayerType={}))});var _Le=P(QR=>{"use strict";m();Object.defineProperty(QR,"__esModule",{value:!0});QR.PACKAGE_NAME=QR.PACKAGE_VERSION=void 0;QR.PACKAGE_VERSION="0.62.0";QR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var UX=P(wO=>{"use strict";m();Object.defineProperty(wO,"__esModule",{value:!0});wO.AttributeNames=void 0;var WNt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(WNt=wO.AttributeNames||(wO.AttributeNames={}))});var yLe=P(FR=>{"use strict";m();Object.defineProperty(FR,"__esModule",{value:!0});FR.isLayerIgnored=FR.getMiddlewareMetadata=void 0;var ELe=q6(),V6=UX(),XNt=(Xn(),Le(jr)),eBt=(e,t,n,r)=>n?{attributes:{[V6.AttributeNames.KOA_NAME]:r?.toString(),[V6.AttributeNames.KOA_TYPE]:ELe.KoaLayerType.ROUTER,[XNt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[V6.AttributeNames.KOA_NAME]:t.name??"middleware",[V6.AttributeNames.KOA_TYPE]:ELe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};FR.getMiddlewareMetadata=eBt;var tBt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));FR.isLayerIgnored=tBt});var SLe=P(Y6=>{"use strict";m();Object.defineProperty(Y6,"__esModule",{value:!0});Y6.kLayerPatched=void 0;Y6.kLayerPatched=Symbol("koa-layer-patched")});var RLe=P(K6=>{"use strict";m();Object.defineProperty(K6,"__esModule",{value:!0});K6.KoaInstrumentation=void 0;var rA=(ze(),Le(nt)),OO=sn(),TLe=q6(),bLe=_Le(),ILe=yLe(),CLe=vr(),vLe=SLe(),QX=class extends OO.InstrumentationBase{constructor(t={}){super(bLe.PACKAGE_NAME,bLe.PACKAGE_VERSION,t)}init(){return new OO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,OO.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,OO.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){rA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let u=0;u<s.length;u++){let l=s[u];s[u]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?TLe.KoaLayerType.ROUTER:TLe.KoaLayerType.MIDDLEWARE;return t[vLe.kLayerPatched]===!0||(0,ILe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(rA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[vLe.kLayerPatched]=!0,rA.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(rA.trace.getSpan(rA.context.active())===void 0)return t(i,s);let l=(0,ILe.getMiddlewareMetadata)(i,t,n,r),p=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,CLe.getRPCMetadata)(rA.context.active());h?.type===CLe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,OO.safeExecuteInTheMiddle)(()=>y(p,{context:i,middlewareLayer:t,layerType:o}),T=>{T&&rA.diag.error("koa instrumentation: request hook failed",T)},!0);let S=rA.trace.setSpan(rA.context.active(),p);return rA.context.with(S,async()=>{try{return await t(i,s)}catch(T){throw p.recordException(T),T}finally{p.end()}})})}};K6.KoaInstrumentation=QX});var xLe=P(BE=>{"use strict";m();Object.defineProperty(BE,"__esModule",{value:!0});BE.KoaLayerType=BE.AttributeNames=BE.KoaInstrumentation=void 0;var nBt=RLe();Object.defineProperty(BE,"KoaInstrumentation",{enumerable:!0,get:function(){return nBt.KoaInstrumentation}});var rBt=UX();Object.defineProperty(BE,"AttributeNames",{enumerable:!0,get:function(){return rBt.AttributeNames}});var oBt=q6();Object.defineProperty(BE,"KoaLayerType",{enumerable:!0,get:function(){return oBt.KoaLayerType}})});var DLe,NLe,BLe,iBt,wLe,OLe=w(()=>{m();DLe=ue(xLe(),1);Xn();mt();_r();qS();NLe="Koa",BLe=ut(NLe,DLe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Hr(t,"auto.http.otel.koa");let r=kt(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 >"),Rn()===Kd()){xs&&W.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[Rg],u=n.context?.request?.method?.toUpperCase()||"GET";s&&Rn().setTransactionName(`${u} ${s}`)}})),iBt=((e={})=>({name:NLe,setupOnce(){BLe(e)}})),wLe=iBt});var FX=P(xf=>{"use strict";m();Object.defineProperty(xf,"__esModule",{value:!0});xf.ConnectNames=xf.ConnectTypes=xf.AttributeNames=void 0;var sBt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(sBt=xf.AttributeNames||(xf.AttributeNames={}));var aBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(aBt=xf.ConnectTypes||(xf.ConnectTypes={}));var uBt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(uBt=xf.ConnectNames||(xf.ConnectNames={}))});var kLe=P(GR=>{"use strict";m();Object.defineProperty(GR,"__esModule",{value:!0});GR.PACKAGE_NAME=GR.PACKAGE_VERSION=void 0;GR.PACKAGE_VERSION="0.57.0";GR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var PLe=P(J6=>{"use strict";m();Object.defineProperty(J6,"__esModule",{value:!0});J6._LAYERS_STORE_PROPERTY=void 0;J6._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var MLe=P(OE=>{"use strict";m();Object.defineProperty(OE,"__esModule",{value:!0});OE.generateRoute=OE.replaceCurrentStackRoute=OE.addNewStackLayer=void 0;var cBt=(ze(),Le(nt)),wE=PLe(),lBt=e=>{Array.isArray(e[wE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,wE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[wE._LAYERS_STORE_PROPERTY].push("/");let t=e[wE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[wE._LAYERS_STORE_PROPERTY].length?e[wE._LAYERS_STORE_PROPERTY].pop():cBt.diag.warn("Connect: Trying to pop the stack multiple time")}};OE.addNewStackLayer=lBt;var dBt=(e,t)=>{t&&e[wE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};OE.replaceCurrentStackRoute=dBt;var pBt=e=>e[wE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);OE.generateRoute=pBt});var QLe=P(kE=>{"use strict";m();Object.defineProperty(kE,"__esModule",{value:!0});kE.ConnectInstrumentation=kE.ANONYMOUS_NAME=void 0;var fBt=(ze(),Le(nt)),LLe=vr(),jR=FX(),ULe=kLe(),Z6=sn(),mBt=(Xn(),Le(jr)),GX=MLe();kE.ANONYMOUS_NAME="anonymous";var jX=class extends Z6.InstrumentationBase{constructor(t={}){super(ULe.PACKAGE_NAME,ULe.PACKAGE_VERSION,t)}init(){return[new Z6.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,Z6.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,Z6.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=jR.ConnectTypes.REQUEST_HANDLER,i=jR.ConnectNames.REQUEST_HANDLER,o=t):(r=jR.ConnectTypes.MIDDLEWARE,i=jR.ConnectNames.MIDDLEWARE,o=n.name||kE.ANONYMOUS_NAME);let s=`${i} - ${o}`,u={attributes:{[mBt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[jR.AttributeNames.CONNECT_TYPE]:r,[jR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,u)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,u,l]=o?[1,2,3]:[0,1,2],p=arguments[s],h=arguments[u],y=arguments[l];(0,GX.replaceCurrentStackRoute)(p,t);let S=(0,LLe.getRPCMetadata)(fBt.context.active());t&&S?.type===LLe.RPCType.HTTP&&(S.route=(0,GX.generateRoute)(p));let T="";t?T=`request handler - ${t}`:T=`middleware - ${n.name||kE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",T);let R=!1;function x(){R?r._diag.debug(`span ${v.name} - already finished`):(R=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",x)}return h.addListener("close",x),arguments[l]=r._patchNext(y,x),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],s=arguments[o],u=(0,GX.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,u)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};kE.ConnectInstrumentation=jX});var GLe=P(dp=>{"use strict";m();Object.defineProperty(dp,"__esModule",{value:!0});dp.ConnectTypes=dp.ConnectNames=dp.AttributeNames=dp.ANONYMOUS_NAME=dp.ConnectInstrumentation=void 0;var FLe=QLe();Object.defineProperty(dp,"ConnectInstrumentation",{enumerable:!0,get:function(){return FLe.ConnectInstrumentation}});Object.defineProperty(dp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return FLe.ANONYMOUS_NAME}});var zX=FX();Object.defineProperty(dp,"AttributeNames",{enumerable:!0,get:function(){return zX.AttributeNames}});Object.defineProperty(dp,"ConnectNames",{enumerable:!0,get:function(){return zX.ConnectNames}});Object.defineProperty(dp,"ConnectTypes",{enumerable:!0,get:function(){return zX.ConnectTypes}})});var jLe,zLe,HLe,ABt,$Le,qLe=w(()=>{m();jLe=ue(GLe(),1);_r();zLe="Connect",HLe=ut(zLe,()=>new jLe.ConnectInstrumentation),ABt=(()=>({name:zLe,setupOnce(){HLe()}})),$Le=ABt});var VLe=P(ca=>{"use strict";m();Object.defineProperty(ca,"__esModule",{value:!0});ca.DB_SYSTEM_VALUE_MSSQL=ca.ATTR_NET_PEER_PORT=ca.ATTR_NET_PEER_NAME=ca.ATTR_DB_USER=ca.ATTR_DB_SYSTEM=ca.ATTR_DB_STATEMENT=ca.ATTR_DB_SQL_TABLE=ca.ATTR_DB_NAME=void 0;ca.ATTR_DB_NAME="db.name";ca.ATTR_DB_SQL_TABLE="db.sql.table";ca.ATTR_DB_STATEMENT="db.statement";ca.ATTR_DB_SYSTEM="db.system";ca.ATTR_DB_USER="db.user";ca.ATTR_NET_PEER_NAME="net.peer.name";ca.ATTR_NET_PEER_PORT="net.peer.port";ca.DB_SYSTEM_VALUE_MSSQL="mssql"});var YLe=P(zR=>{"use strict";m();Object.defineProperty(zR,"__esModule",{value:!0});zR.once=zR.getSpanName=void 0;function gBt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}zR.getSpanName=gBt;var hBt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};zR.once=hBt});var KLe=P(HR=>{"use strict";m();Object.defineProperty(HR,"__esModule",{value:!0});HR.PACKAGE_NAME=HR.PACKAGE_VERSION=void 0;HR.PACKAGE_VERSION="0.33.0";HR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var eUe=P(ME=>{"use strict";m();Object.defineProperty(ME,"__esModule",{value:!0});ME.TediousInstrumentation=ME.INJECTED_CTX=void 0;var $R=(ze(),Le(nt)),_Bt=Qe("events"),oA=sn(),oT=(Xn(),Le(jr)),PE=VLe(),JLe=YLe(),ZLe=KLe(),XLe=Symbol("opentelemetry.instrumentation-tedious.current-database");ME.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var WLe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function W6(e){Object.defineProperty(this,XLe,{value:e,writable:!0})}var HX=class e extends oA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ZLe.PACKAGE_NAME,ZLe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,oA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,oA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new oA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of WLe)(0,oA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,oA.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 WLe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return W6.call(this,this.config?.options?.database),this.removeListener("databaseChange",W6),this.on("databaseChange",W6),this.once("end",()=>{this.removeListener("databaseChange",W6)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||$R.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,ME.INJECTED_CTX,{value:!0});let u=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,u,{length:u.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[ME.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof _Bt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let u=0,l=0,p=()=>l++,h=()=>u++,y=this[XLe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),T={};o._dbSemconvStability&oA.SemconvStability.OLD&&(T[PE.ATTR_DB_SYSTEM]=PE.DB_SYSTEM_VALUE_MSSQL,T[PE.ATTR_DB_NAME]=y,T[PE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,T[PE.ATTR_DB_STATEMENT]=S,T[PE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&oA.SemconvStability.STABLE&&(T[oT.ATTR_DB_NAMESPACE]=y,T[oT.ATTR_DB_SYSTEM_NAME]=oT.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,T[oT.ATTR_DB_QUERY_TEXT]=S,T[oT.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&oA.SemconvStability.OLD&&(T[PE.ATTR_NET_PEER_NAME]=this.config?.server,T[PE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&oA.SemconvStability.STABLE&&(T[oT.ATTR_SERVER_ADDRESS]=this.config?.server,T[oT.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,JLe.getSpanName)(t,y,S,s.table),{kind:$R.SpanKind.CLIENT,attributes:T}),R=(0,JLe.once)(G=>{s.removeListener("done",p),s.removeListener("doneInProc",p),s.removeListener("doneProc",h),s.removeListener("error",R),this.removeListener("end",R),v.setAttribute("tedious.procedure_count",u),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:$R.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",p),s.on("doneInProc",p),s.on("doneProc",h),s.once("error",R),this.on("end",R),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(R)):o._diag.error("Expected request.callback to be a function");let x=()=>$R.context.with($R.trace.setSpan($R.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return x();let j=o._buildTraceparent(v);o._injectContextInfo(this,n,j).finally(x)}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)}}};ME.TediousInstrumentation=HX});var tUe=P(X6=>{"use strict";m();Object.defineProperty(X6,"__esModule",{value:!0});X6.TediousInstrumentation=void 0;var EBt=eUe();Object.defineProperty(X6,"TediousInstrumentation",{enumerable:!0,get:function(){return EBt.TediousInstrumentation}})});var nUe,yBt,rUe,oUe,SBt,iUe,sUe=w(()=>{m();nUe=ue(tUe(),1);mt();_r();yBt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),rUe="Tedious",oUe=ut(rUe,()=>new nUe.TediousInstrumentation({})),SBt=(()=>{let e;return{name:rUe,setupOnce(){let t=oUe();e=gw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=kt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";yBt.has(i)&&n.setAttribute(Pt,"auto.db.otel.tedious")}))}}}),iUe=SBt});var aUe=P(qR=>{"use strict";m();Object.defineProperty(qR,"__esModule",{value:!0});qR.PACKAGE_NAME=qR.PACKAGE_VERSION=void 0;qR.PACKAGE_VERSION="0.57.0";qR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var cUe=P(eG=>{"use strict";m();Object.defineProperty(eG,"__esModule",{value:!0});eG.GenericPoolInstrumentation=void 0;var VR=(ze(),Le(nt)),iT=sn(),uUe=aUe(),$X="generic-pool",qX=class extends iT.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(uUe.PACKAGE_NAME,uUe.PACKAGE_VERSION,t)}init(){return[new iT.InstrumentationNodeModuleDefinition($X,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,iT.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 iT.InstrumentationNodeModuleDefinition($X,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,iT.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 iT.InstrumentationNodeModuleDefinition($X,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,iT.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=VR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return VR.context.with(VR.trace.setSpan(i,s),()=>t.call(this,...o).then(u=>(s.end(),u),u=>{throw s.recordException(u),s.end(),u}))}}_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 s=VR.context.active(),u=n.tracer.startSpan("generic-pool.acquire",{},s);return VR.context.with(VR.trace.setSpan(s,u),()=>{t.call(this,(l,p)=>{if(u.end(),o)return o(l,p)},i)})}}};eG.GenericPoolInstrumentation=qX});var lUe=P(tG=>{"use strict";m();Object.defineProperty(tG,"__esModule",{value:!0});tG.GenericPoolInstrumentation=void 0;var TBt=cUe();Object.defineProperty(tG,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return TBt.GenericPoolInstrumentation}})});var dUe,pUe,fUe,bBt,mUe,AUe=w(()=>{m();dUe=ue(lUe(),1);mt();_r();pUe="GenericPool",fUe=ut(pUe,()=>new dUe.GenericPoolInstrumentation({})),bBt=(()=>{let e;return{name:pUe,setupOnce(){let t=fUe();e=gw(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=kt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Pt,"auto.db.otel.generic_pool")}))}}}),mUe=bBt});var VX=P(iA=>{"use strict";m();Object.defineProperty(iA,"__esModule",{value:!0});iA.ATTR_NET_PEER_PORT=iA.ATTR_NET_PEER_NAME=iA.ATTR_MESSAGING_SYSTEM=iA.ATTR_MESSAGING_OPERATION=void 0;iA.ATTR_MESSAGING_OPERATION="messaging.operation";iA.ATTR_MESSAGING_SYSTEM="messaging.system";iA.ATTR_NET_PEER_NAME="net.peer.name";iA.ATTR_NET_PEER_PORT="net.peer.port"});var YX=P(yi=>{"use strict";m();Object.defineProperty(yi,"__esModule",{value:!0});yi.ATTR_MESSAGING_CONVERSATION_ID=yi.OLD_ATTR_MESSAGING_MESSAGE_ID=yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=yi.ATTR_MESSAGING_URL=yi.ATTR_MESSAGING_PROTOCOL_VERSION=yi.ATTR_MESSAGING_PROTOCOL=yi.MESSAGING_OPERATION_VALUE_PROCESS=yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=yi.ATTR_MESSAGING_DESTINATION_KIND=yi.ATTR_MESSAGING_DESTINATION=void 0;yi.ATTR_MESSAGING_DESTINATION="messaging.destination";yi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";yi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";yi.MESSAGING_OPERATION_VALUE_PROCESS="process";yi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";yi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";yi.ATTR_MESSAGING_URL="messaging.url";yi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";yi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";yi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var KX=P(sT=>{"use strict";m();Object.defineProperty(sT,"__esModule",{value:!0});sT.DEFAULT_CONFIG=sT.EndOperation=void 0;var IBt;(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"})(IBt=sT.EndOperation||(sT.EndOperation={}));sT.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var EUe=P(Si=>{"use strict";m();Object.defineProperty(Si,"__esModule",{value:!0});Si.isConfirmChannelTracing=Si.unmarkConfirmChannelTracing=Si.markConfirmChannelTracing=Si.getConnectionAttributesFromUrl=Si.getConnectionAttributesFromServer=Si.normalizeExchange=Si.CONNECTION_ATTRIBUTES=Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Si.CHANNEL_SPANS_NOT_ENDED=Si.MESSAGE_STORED_SPAN=void 0;var JX=(ze(),Le(nt)),LE=sn(),nG=(Xn(),Le(jr)),kO=VX(),rG=YX();Si.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");Si.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");Si.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");Si.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var ZX=(0,JX.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),CBt=e=>e!==""?e:"<default>";Si.normalizeExchange=CBt;var vBt=e=>e.replace(/:[^:@/]*@/,":***@"),gUe=(e,t)=>e||(t==="AMQP"?5672:5671),hUe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},_Ue=e=>e||"localhost",sA=(e,t,n,r)=>n?{[t]:n}:(JX.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),RBt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[kO.ATTR_MESSAGING_SYSTEM]:t}:{}};Si.getConnectionAttributesFromServer=RBt;var xBt=(e,t)=>{let n={[rG.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=hUe(r?.protocol);Object.assign(n,{...sA(e,rG.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=_Ue(r?.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...sA(e,kO.ATTR_NET_PEER_NAME,i,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...sA(e,nG.ATTR_SERVER_ADDRESS,i,"hostname")});let s=gUe(r.port,o);t&LE.SemconvStability.OLD&&Object.assign(n,sA(e,kO.ATTR_NET_PEER_PORT,s,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,sA(e,nG.ATTR_SERVER_PORT,s,"port"))}else{let r=vBt(e);n[rG.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=hUe(o.protocol);Object.assign(n,{...sA(r,rG.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=_Ue(o.hostname);t&LE.SemconvStability.OLD&&Object.assign(n,{...sA(r,kO.ATTR_NET_PEER_NAME,s,"hostname")}),t&LE.SemconvStability.STABLE&&Object.assign(n,{...sA(r,nG.ATTR_SERVER_ADDRESS,s,"hostname")});let u=gUe(o.port?parseInt(o.port):void 0,i);t&LE.SemconvStability.OLD&&Object.assign(n,sA(r,kO.ATTR_NET_PEER_PORT,u,"port")),t&LE.SemconvStability.STABLE&&Object.assign(n,sA(r,nG.ATTR_SERVER_PORT,u,"port"))}catch(o){JX.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};Si.getConnectionAttributesFromUrl=xBt;var DBt=e=>e.setValue(ZX,!0);Si.markConfirmChannelTracing=DBt;var NBt=e=>e.deleteValue(ZX);Si.unmarkConfirmChannelTracing=NBt;var BBt=e=>e.getValue(ZX)===!0;Si.isConfirmChannelTracing=BBt});var yUe=P(YR=>{"use strict";m();Object.defineProperty(YR,"__esModule",{value:!0});YR.PACKAGE_NAME=YR.PACKAGE_VERSION=void 0;YR.PACKAGE_VERSION="0.61.0";YR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var TUe=P(sG=>{"use strict";m();Object.defineProperty(sG,"__esModule",{value:!0});sG.AmqplibInstrumentation=void 0;var ri=(ze(),Le(nt)),oG=vr(),xr=sn(),wBt=VX(),Xl=YX(),oc=KX(),Ti=EUe(),SUe=yUe(),iG=[">=0.5.5 <1"],WX=class extends xr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(SUe.PACKAGE_NAME,SUe.PACKAGE_VERSION,{...oc.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,xr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...oc.DEFAULT_CONFIG,...t})}init(){let t=new xr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",iG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new xr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",iG,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new xr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",iG,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new xr.InstrumentationNodeModuleDefinition("amqplib",iG,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,xr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,xr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,xr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,xr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,oc.EndOperation.Ack)),(0,xr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,oc.EndOperation.Nack)),(0,xr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,oc.EndOperation.Reject)),(0,xr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,oc.EndOperation.AckAll)),(0,xr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,oc.EndOperation.NackAll)),(0,xr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,xr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,xr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,xr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,xr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,xr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,xr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,xr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,xr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,xr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(u,l){if(u==null){let p=(0,Ti.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,Ti.getConnectionAttributesFromServer)(l);l[Ti.CONNECTION_ATTRIBUTES]={...p,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelClosed,void 0);let i=this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,oc.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,u,l){let p=this,h=n===oc.EndOperation.Reject?u:l,y=p[Ti.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(T=>T.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==oc.EndOperation.Reject&&u){for(let T=0;T<=S;T++)o.endConsumerSpan(y[T].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,u){let l=this;if(!Object.prototype.hasOwnProperty.call(l,Ti.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[Ti.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}let p=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=ri.propagation.extract(ri.ROOT_CONTEXT,y),T=h.fields?.exchange,v;if(r._config.useLinksForConsume){let M=S?ri.trace.getSpan(S)?.spanContext():void 0;S=void 0,M&&(v=[{context:M}])}let R=r.tracer.startSpan(`${i} process`,{kind:ri.SpanKind.CONSUMER,attributes:{...l?.connection?.[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:T,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[wBt.ATTR_MESSAGING_OPERATION]:Xl.MESSAGING_OPERATION_VALUE_PROCESS,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:x}=r.getConfig();x&&(0,xr.safeExecuteInTheMiddle)(()=>x(R,{moduleVersion:t,msg:h}),M=>{M&&ri.diag.error("amqplib instrumentation: consumerHook error",M)},!0),u?.noAck||(l[Ti.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,oG.hrTime)()}),h[Ti.MESSAGE_STORED_SPAN]=R);let O=S||ri.ROOT_CONTEXT;ri.context.with(ri.trace.setSpan(O,R),()=>{s.call(this,h)}),u?.noAck&&(r.callConsumeEndHook(R,h,!1,oc.EndOperation.AutoAck),R.end())};return arguments[1]=p,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,u,l,p){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:T}=r.getConfig();T&&(0,xr.safeExecuteInTheMiddle)(()=>T(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:S,isConfirmChannel:!0}),O=>{O&&ri.diag.error("amqplib instrumentation: publishHook error",O)},!0);let v=function(O,M){try{p?.call(this,O,M)}finally{let{publishConfirmHook:j}=r.getConfig();j&&(0,xr.safeExecuteInTheMiddle)(()=>j(y,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:l,isConfirmChannel:!0,confirmError:O}),G=>{G&&ri.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),O&&y.setStatus({code:ri.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},R=(0,Ti.markConfirmChannelTracing)(ri.context.active()),x=[...arguments];return x[3]=S,x[4]=ri.context.bind((0,Ti.unmarkConfirmChannelTracing)(ri.trace.setSpan(R,y)),v),ri.context.with(R,n.bind(this,...x))}}getPublishPatch(t,n){let r=this;return function(i,s,u,l){if((0,Ti.isConfirmChannelTracing)(ri.context.active()))return n.apply(this,arguments);{let p=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,p,l),{publishHook:S}=r.getConfig();S&&(0,xr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:u,options:y,isConfirmChannel:!1}),R=>{R&&ri.diag.error("amqplib instrumentation: publishHook error",R)},!0);let T=[...arguments];T[3]=y;let v=n.apply(this,T);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,Ti.normalizeExchange)(n),u=t.tracer.startSpan(`publish ${s}`,{kind:ri.SpanKind.PRODUCER,attributes:{...o.connection[Ti.CONNECTION_ATTRIBUTES],[Xl.ATTR_MESSAGING_DESTINATION]:n,[Xl.ATTR_MESSAGING_DESTINATION_KIND]:Xl.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[Xl.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[Xl.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[Xl.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},ri.propagation.inject(ri.trace.setSpan(ri.context.active(),u),l.headers),{span:u,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[Ti.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:ri.SpanStatusCode.ERROR,message:r!==oc.EndOperation.ChannelClosed&&r!==oc.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[Ti.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[Ti.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[Ti.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,xr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&ri.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,oG.hrTime)(),r=t[Ti.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],u=(0,oG.hrTimeDuration)(s.timeOfConsume,n);if((0,oG.hrTimeToMilliseconds)(u)<i)break;this.endConsumerSpan(s.msg,null,oc.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};sG.AmqplibInstrumentation=WX});var IUe=P(UE=>{"use strict";m();Object.defineProperty(UE,"__esModule",{value:!0});UE.EndOperation=UE.DEFAULT_CONFIG=UE.AmqplibInstrumentation=void 0;var OBt=TUe();Object.defineProperty(UE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return OBt.AmqplibInstrumentation}});var bUe=KX();Object.defineProperty(UE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return bUe.DEFAULT_CONFIG}});Object.defineProperty(UE,"EndOperation",{enumerable:!0,get:function(){return bUe.EndOperation}})});var CUe,vUe,kBt,RUe,PBt,xUe,DUe=w(()=>{m();CUe=ue(IUe(),1);_r();vUe="Amqplib",kBt={consumeEndHook:e=>{Hr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Hr(e,"auto.amqplib.otel.publisher")}},RUe=ut(vUe,()=>new CUe.AmqplibInstrumentation(kBt)),PBt=(()=>({name:vUe,setupOnce(){RUe()}})),xUe=PBt});var PO,XX=w(()=>{m();PO="VercelAI"});function LBt(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)&&(QBt(t.content),FBt(t.content))}function QBt(e){for(let t of e){if(!LBt(t))continue;let n=DK(t.toolCallId);n?Gl(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}})}):Gl(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 FBt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&NK(t.toolCallId)}function GBt(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 uG,MBt,NUe,aG,BUe=w(()=>{m();uG=ue(sn(),1);mt();XX();MBt=[">=3.0.0 <7"],NUe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];aG=class e extends uG.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",er,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new uG.InstrumentationNodeModuleDefinition("ai",MBt,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,s)=>{let u=s[0].experimental_telemetry||{},l=u.isEnabled,p=_t(),h=p?.getIntegrationByName(PO),y=h?.options,S=h?!!p?.getOptions().sendDefaultPii:!1,{recordInputs:T,recordOutputs:v}=GBt(y,u,l,S);return s[0].experimental_telemetry={...u,isEnabled:l!==void 0?l:!0,recordInputs:T,recordOutputs:v},Tf(()=>Reflect.apply(o,i,s),R=>{R&&typeof R=="object"&&ns(R,"_sentry_active_span",zc())},()=>{},R=>{UBt(R)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of NUe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=NUe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function jBt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var wUe,zBt,OUe,kUe=w(()=>{m();mt();_r();XX();BUe();wUe=ut(PO,()=>new aG({}));zBt=((e={})=>{let t;return{name:PO,options:e,setupOnce(){t=wUe()},afterAllSetup(n){e.force??jBt(n)?fF(n):t?.callWhenPatched(()=>fF(n))}}}),OUe=zBt});var lG,HBt,cG,PUe=w(()=>{m();lG=ue(sn(),1);mt();HBt=[">=4.0.0 <7"],cG=class extends lG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",er,t)}init(){return new lG.InstrumentationNodeModuleDefinition("openai",HBt,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(...s){if(DS(uE))return Reflect.construct(r,s);let u=Reflect.construct(r,s);return gF(u,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let u=Object.getOwnPropertyDescriptor(r,s);u&&Object.defineProperty(i,s,u)}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 MUe,$Bt,LUe,UUe=w(()=>{m();mt();_r();PUe();MUe=ut(uE,e=>new cG(e)),$Bt=((e={})=>({name:uE,setupOnce(){MUe(e)}})),LUe=$Bt});var pG,qBt,dG,QUe=w(()=>{m();pG=ue(sn(),1);mt();qBt=[">=0.19.2 <1.0.0"],dG=class extends pG.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",er,t)}init(){return new pG.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",qBt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(DS(cE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return hF(s,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 s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}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 FUe,VBt,GUe,jUe=w(()=>{m();mt();_r();QUe();FUe=ut(cE,e=>new dG(e)),VBt=((e={})=>({name:cE,options:e,setupOnce(){FUe(e)}})),GUe=VBt});var KR,zUe,fG,HUe=w(()=>{m();KR=ue(sn(),1);mt();zUe=[">=0.10.0 <2"],fG=class extends KR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",er,t)}init(){return new KR.InstrumentationNodeModuleDefinition("@google/genai",zUe,n=>this._patch(n),n=>n,[new KR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",zUe,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(DS(lE))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return _F(s,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 s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return mw(t,"GoogleGenAI",o),t}}});var $Ue,YBt,qUe,VUe=w(()=>{m();mt();_r();HUe();$Ue=ut(lE,e=>new fG(e)),YBt=((e={})=>({name:lE,setupOnce(){$Ue(e)}})),qUe=YBt});function KBt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function JBt(e,t,n){return new Proxy(e,{apply(r,o,i){let u=i[1];(!u||typeof u!="object"||Array.isArray(u))&&(u={},i[1]=u);let l=u.callbacks,p=KBt(l,t);return u.callbacks=p,Reflect.apply(r,o,i)}})}var QE,mG,AG,YUe=w(()=>{m();QE=ue(sn(),1);mt();mG=[">=0.1.0 <2.0.0"];AG=class extends QE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",er,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 QE.InstrumentationNodeModuleDefinition(r,mG,this._patch.bind(this),o=>o,[new QE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,mG,this._patch.bind(this),o=>o)]));return t.push(new QE.InstrumentationNodeModuleDefinition("langchain",mG,this._patch.bind(this),r=>r,[new QE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",mG,this._patch.bind(this),r=>r)])),t}_patch(t){qY([uE,cE,lE]);let n=TF(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(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let u=["invoke","stream","batch"];for(let l of u){let p=s[l];typeof p=="function"&&(s[l]=JBt(p,n))}}}});var KUe,ZBt,JUe,ZUe=w(()=>{m();mt();_r();YUe();KUe=ut(EF,e=>new AG(e)),ZBt=((e={})=>({name:EF,setupOnce(){KUe(e)}})),JUe=ZBt});var JR,WUe,gG,XUe=w(()=>{m();JR=ue(sn(),1);mt();WUe=[">=0.0.0 <2.0.0"],gG=class extends JR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",er,t)}init(){return new JR.InstrumentationNodeModuleDefinition("@langchain/langgraph",WUe,this._patch.bind(this),n=>n,[new JR.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",WUe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&IF(t.StateGraph.prototype,this.getConfig()),t}}});var eQe,WBt,tQe,nQe=w(()=>{m();mt();_r();XUe();eQe=ut(bF,e=>new gG(e)),WBt=((e={})=>({name:bF,setupOnce(){eQe(e)}})),tQe=WBt});import*as oQe from"node:net";function iQe(e,t,n,r,o){let s=()=>{},u=o.firestoreSpanCreationHook;typeof u=="function"&&(s=h=>{(0,th.safeExecuteInTheMiddle)(()=>u(h),y=>{y&&Ul.error(y?.message)},!0)});let l=new th.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>rQe(h,n,r,e,s)),p=["@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 p)l.files.push(new th.InstrumentationNodeModuleFile(h,t,y=>rQe(y,n,r,e,s),y=>sQe(y,r)));return l}function rQe(e,t,n,r,o){return sQe(e,n),t(e,"addDoc",XBt(r,o)),t(e,"getDocs",twt(r,o)),t(e,"setDoc",nwt(r,o)),t(e,"deleteDoc",ewt(r,o)),e}function sQe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,th.isWrapped)(e[n])&&t(e,n);return e}function XBt(e,t){return function(r){return function(o,i){let s=_G(e,"addDoc",o);return t(s),hG(s,()=>r(o,i))}}}function ewt(e,t){return function(r){return function(o){let i=_G(e,"deleteDoc",o.parent||o);return t(i),hG(i,()=>r(o))}}}function twt(e,t){return function(r){return function(o){let i=_G(e,"getDocs",o);return t(i),hG(i,()=>r(o))}}}function nwt(e,t){return function(r){return function(o,i,s){let u=_G(e,"setDoc",o.parent||o);return t(u),hG(u,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function hG(e,t){return Xe.with(qt.setSpan(Xe.active(),e),()=>(0,th.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function _G(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:fo.CLIENT});return owt(r,n),r.setAttribute(MC,t),r}function rwt(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(oQe.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 owt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[gV]:t.path,[hV]:n.name,[dS]:"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:u,port:l}=rwt(i);u&&(s[CV]=u),l&&(s[vV]=l),e.setAttributes(s)}var th,aQe=w(()=>{m();ze();th=ue(sn(),1);Xn()});function uQe(e,t,n,r,o){let i=()=>{},s=()=>{},u=o.functions?.errorHook,l=o.functions?.requestHook,p=o.functions?.responseHook;typeof p=="function"&&(s=(S,T)=>{(0,nh.safeExecuteInTheMiddle)(()=>p(S,T),v=>{v&&Ul.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,nh.safeExecuteInTheMiddle)(()=>l(S),T=>{T&&Ul.error(T?.message)},!0)});let h=new nh.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:S,triggerType:T})=>{h.files.push(new nh.InstrumentationNodeModuleFile(S,t,v=>iwt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:u},T),v=>cQe(v,r)))}),h}function ic(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],u=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...p){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:fo.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Xe.with(qt.setSpan(Xe.active(),y),async()=>{let T,v;try{v=await s.apply(this,p)}catch(R){T=R}if(t?.responseHook?.(y,T),T&&y.recordException(T),y.end(),T)throw await t?.errorHook?.(y,T),T;return v})};return u?o.call(this,u,l):o.call(this,l)}}}function iwt(e,t,n,r,o,i){switch(cQe(e,n),i){case"function":t(e,"onRequest",ic(r,o,"http.request")),t(e,"onCall",ic(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",ic(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",ic(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",ic(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",ic(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",ic(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",ic(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",ic(r,o,"storage.object.finalized")),t(e,"onObjectArchived",ic(r,o,"storage.object.archived")),t(e,"onObjectDeleted",ic(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",ic(r,o,"storage.object.metadataUpdated"));break}return e}function cQe(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,nh.isWrapped)(e[r])&&t(e,r);return e}var nh,lQe=w(()=>{m();ze();nh=ue(sn(),1)});var pQe,dQe,swt,awt,EG,fQe=w(()=>{m();pQe=ue(sn(),1);mt();aQe();lQe();dQe={},swt=[">=3.0.0 <5"],awt=[">=6.0.0 <7"],EG=class extends pQe.InstrumentationBase{constructor(t=dQe){super("@sentry/instrumentation-firebase",er,t)}setConfig(t={}){super.setConfig({...dQe,...t})}init(){let t=[];return t.push(iQe(this.tracer,swt,this._wrap,this._unwrap,this.getConfig())),t.push(uQe(this.tracer,awt,this._wrap,this._unwrap,this.getConfig())),t}}});var mQe,uwt,AQe,cwt,gQe,hQe=w(()=>{m();mt();_r();fQe();mQe="Firebase",uwt={firestoreSpanCreationHook:e=>{Hr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{Hr(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 yv(2e3))}}},AQe=ut(mQe,()=>new EG(uwt)),cwt=(()=>({name:mQe,setupOnce(){AQe()}})),gQe=cwt});function _Qe(){return[Swe(),tke(),xke(),gLe(),APe(),NPe(),jPe(),eMe(),wMe(),XMe(),Z2e(),dLe(),wLe(),$Le(),iUe(),mUe(),$ke(),xUe(),nPe(),JUe(),tQe(),OUe(),LUe(),GUe(),qUe(),r2e(),gQe()]}var EQe=w(()=>{m();DUe();jUe();qLe();Twe();oke();hQe();AUe();VUe();Nke();pLe();hLe();qke();OLe();ZUe();nQe();rPe();gPe();BPe();zPe();tMe();UUe();e2e();o2e();W2e();OMe();sUe();kUe()});function SQe(e,t={}){e.getOptions().debug&&aZ();let[n,r]=lwt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function lwt(e,t={}){let n=new yQe.BasicTracerProvider({sampler:new N4(e),resource:(0,yG.defaultResource)().merge((0,yG.resourceFromAttributes)({[RV]:"node",[AV]:"sentry",[xV]:er})),forceFlushTimeoutMillis:500,spanProcessors:[new D4({timeout:dwt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});qt.setGlobalTracerProvider(n),pf.setGlobalPropagator(new x4);let r=new w4;return Xe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function dwt(e){if(e!=null){if(e>eee)return xs&&W.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${eee}`),eee;if(e<=0||Number.isNaN(e)){xs&&W.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var yG,yQe,eee,TQe=w(()=>{m();ze();yG=ue(yJ(),1),yQe=ue(qJ(),1);Xn();mt();_r();Wv();qS();eee=1e6});function bQe(){return Q4().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(ZBe(),swe())}function IQe(e){return[...bQe(),...Mi(e)?_Qe():[]]}function tee(e={}){return pwt(e,IQe)}function pwt(e={},t){NS(e,"node");let n=OZ({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(SQe(n,{spanProcessors:e.openTelemetrySpanProcessors}),F4()),n}var CQe=w(()=>{m();mt();_r();WBe();awe();EQe();TQe()});var ZR=w(()=>{m();CQe();mt();_r()});function eo(){return fwt}function hu(){return vQe}function RQe(){return mwt}var fwt,vQe,mwt,sc=w(()=>{"use strict";m();fwt="prod",vQe="0.1.189",mwt=`@loredotlink/cli/${vQe}`});function Ewt(e=""){if(!hwt.test(e))return e!==e.toLowerCase()}function xQe(e,t){let n=t??_wt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let u of e){let l=n.includes(u);if(l===!0){r.push(o),o="",i=void 0;continue}let p=Ewt(u);if(s===!1){if(i===!1&&p===!0){r.push(o),o=u,i=p;continue}if(i===!0&&p===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+u,i=p;continue}}o+=u,i=p,s=l}return r.push(o),r}function ywt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Swt(e){return e?e[0].toLowerCase()+e.slice(1):""}function Twt(e,t){return e?(Array.isArray(e)?e:xQe(e)).map(n=>ywt(t?.normalize?n.toLowerCase():n)).join(""):""}function LO(e,t){return Swt(Twt(e||"",t))}function SG(e,t){return e?(Array.isArray(e)?e:xQe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function DQe(e){return SG(e||"","_")}var hwt,_wt,NQe=w(()=>{m();hwt=/\d/,_wt=["-","_","/","."]});import{parseArgs as bwt}from"node:util";function CG(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function nee(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 ed(e){return typeof e=="function"?e():e}function Iwt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},s=new Map,u=new Map;for(let[x,O]of Object.entries(o)){let M=O;for(let j of M)s.set(x,j),u.has(j)||u.set(j,[]),u.get(j).push(x),s.set(j,x),u.has(x)||u.set(x,[]),u.get(x).push(j)}let l={};function p(x){if(n.has(x))return"boolean";let O=u.get(x)||[];for(let M of O)if(n.has(M))return"boolean";return"string"}function h(x){if(r.has(x))return!0;let O=u.get(x)||[];for(let M of O)if(r.has(M))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let x of y)l[x]||(l[x]={type:p(x),default:i[x]});for(let[x,O]of s.entries())x.length===1&&l[O]&&!l[O].short&&(l[O].short=x);let S=[],T={};for(let x=0;x<e.length;x++){let O=e[x];if(O==="--"){S.push(...e.slice(x));break}if(O.startsWith("--no-")){let M=O.slice(5);T[M]=!0;continue}S.push(O)}let v;try{v=bwt({args:S,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:S}}let R={_:[]};R._=v.positionals;for(let[x,O]of Object.entries(v.values)){let M=O;p(x)==="boolean"&&typeof O=="string"?M=O!=="false":h(x)&&typeof O=="boolean"&&(M=""),R[x]=M}for(let[x]of Object.entries(T)){R[x]=!1;let O=s.get(x);O&&(R[O]=!1);let M=u.get(x);if(M)for(let j of M)R[j]=!1}for(let[x,O]of s.entries())R[x]!==void 0&&R[O]===void 0&&(R[O]=R[x]),R[O]!==void 0&&R[x]===void 0&&(R[x]=R[O]),R[x]!==R[O]&&i[O]===R[O]&&(R[O]=R[x]);return R}function vwt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=OQe(t);for(let u of r){if(u.type==="positional")continue;u.type==="string"||u.type==="enum"?n.string.push(u.name):u.type==="boolean"&&n.boolean.push(u.name),u.default!==void 0&&(n.default[u.name]=u.default),u.alias&&(n.alias[u.name]=u.alias);let l=LO(u.name),p=SG(u.name);if(l!==u.name||p!==u.name){let h=CG(n.alias[u.name]||[]);l!==u.name&&!h.includes(l)&&h.push(l),p!==u.name&&!h.includes(p)&&h.push(p),h.length>0&&(n.alias[u.name]=h)}}let o=Iwt(e,n),[...i]=o._,s=new Proxy(o,{get(u,l){return u[l]??u[LO(l)]??u[SG(l)]}});for(let[,u]of r.entries())if(u.type==="positional"){let l=i.shift();if(l!==void 0)s[u.name]=l;else{if(u.default===void 0&&u.required!==!1)throw new aT(`Missing required positional argument: ${u.name.toUpperCase()}`,"EARG");s[u.name]=u.default}}else if(u.type==="enum"){let l=s[u.name],p=u.options||[];if(l!==void 0&&p.length>0&&!p.includes(l))throw new aT(`Invalid value for argument: ${Df(`--${u.name}`)} (${Df(l)}). Expected one of: ${p.map(h=>Df(h)).join(", ")}.`,"EARG")}else if(u.required&&s[u.name]===void 0)throw new aT(`Missing required argument: --${u.name}`,"EARG");return s}function OQe(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:CG(r.alias)});return t}async function Rwt(e){return Promise.all(e.map(t=>ed(t)))}async function uT(e,t){let n=await ed(e.args||{}),r=vwt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await Rwt(e.plugins??[]),s,u;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let p=await ed(e.subCommands);if(p&&Object.keys(p).length>0){let h=xwt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await BQe(p,y);if(!S)throw new aT(`Unknown command ${Df(y)}`,"E_UNKNOWN_COMMAND");await uT(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await ed(e.default);if(S){if(e.run)throw new aT("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let T=await BQe(p,S);if(!T)throw new aT(`Default sub command ${Df(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await uT(T,{rawArgs:t.rawArgs})}else if(!e.run)throw new aT("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(s=await e.run(o))}catch(p){u=p}let l=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(p){l.push(p)}for(let p of[...i].reverse())try{await p.cleanup?.(o)}catch(h){l.push(h)}if(u)throw u;if(l.length===1)throw l[0];if(l.length>1)throw new Error("Multiple cleanup errors",{cause:l});return{result:s}}async function BQe(e,t){if(t in e)return ed(e[t]);for(let n of Object.values(e)){let r=await ed(n),o=await ed(r?.meta);if(o?.alias&&CG(o.alias).includes(t))return r}}function xwt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&Dwt(r,t)&&n++;continue}return n}return-1}function Dwt(e,t){let n=e.replace(/^-{1,2}/,""),r=LO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===LO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function oee(e,t){let n=await ed(e.meta||{}),r=OQe(await ed(e.args||{})),o=await ed(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),s=[],u=[],l=[],p=[];for(let T of r)if(T.type==="positional"){let v=T.name.toUpperCase(),R=T.required!==!1&&T.default===void 0;u.push([Df(v+ree(T)),wQe(T,R)]),p.push(R?`<${v}>`:`[${v}]`)}else{let v=T.required===!0&&T.default===void 0,R=[...(T.alias||[]).map(x=>`-${x}`),`--${T.name}`].join(", ")+ree(T);if(s.push([Df(R),wQe(T,v)]),T.type==="boolean"&&(T.default===!0||T.negativeDescription)&&!Nwt.test(T.name)){let x=[...(T.alias||[]).map(O=>`--no-${O}`),`--no-${T.name}`].join(", ");s.push([Df(x),[T.negativeDescription,v?IG("(Required)"):""].filter(Boolean).join(" ")])}v&&p.push(`--${T.name}`+ree(T))}if(e.subCommands){let T=[],v=await ed(e.subCommands);for(let[R,x]of Object.entries(v)){let O=await ed((await ed(x))?.meta);if(O?.hidden)continue;let M=CG(O?.alias),j=[R,...M].join(", ");l.push([Df(j),O?.description||""]),T.push(R,...M)}p.push(T.join("|"))}let h=[],y=n.version||o.version;h.push(IG(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=s.length>0||u.length>0;return h.push(`${bG(TG("USAGE"))} ${Df(`${i}${S?" [OPTIONS]":""} ${p.join(" ")}`)}`,""),u.length>0&&(h.push(bG(TG("ARGUMENTS")),""),h.push(nee(u," ")),h.push("")),s.length>0&&(h.push(bG(TG("OPTIONS")),""),h.push(nee(s," ")),h.push("")),l.length>0&&(h.push(bG(TG("COMMANDS")),""),h.push(nee(l," ")),h.push("",`Use ${Df(`${i} <command> --help`)} for more information about a command.`)),h.filter(T=>typeof T=="string").join(`
40
40
  `)}function ree(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${DQe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function wQe(e,t){let n=t?IG("(Required)"):"",r=e.default===void 0?"":IG(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var aT,Cwt,vG,TG,Df,IG,bG,Nwt,iee=w(()=>{m();NQe();aT=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};Cwt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),vG=(e,t=39)=>n=>Cwt?n:`\x1B[${e}m${n}\x1B[${t}m`,TG=vG(1,22),Df=vG(36),IG=vG(90),bG=vG(4,24);Nwt=/^no[-A-Z]/});var see,kQe,Bwt,PQe,oLn,aee=w(()=>{"use strict";m();see=["free","creator","team"],kQe=typeof process<"u"&&process.env?.NODE_ENV!=="production",Bwt={stripe:{plans:[{tier:"free",subjectType:"user",name:"Free",description:"Share any thread from Claude Code, Codex, or Cowork. Share with friends or keep private. Share skills with your team instantly.",price:0,priceId:null,features:[{name:"Share threads from Claude Code, Codex, and Cowork"},{name:"Share with friends or keep private"},{name:"Skills tab \u2014 tool usage across every thread"},{name:"Share skills with your team instantly"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:3}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot. Permanent share links that never expire.",price:29,isFeatured:!0,priceId:kQe?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"},{name:"Shared threads live forever"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:null}},{tier:"team",subjectType:"organization",name:"Team",description:"GitHub for Prompts. Org-wide thread sharing plus the review surface.",price:19,minSeats:2,priceId:kQe?"price_1TP9MpKwvRM43sh6TBIFxVCd":"price_1TPA3CKwvRM43sh6k0bgPTsQ",features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0,sharedThreadTtlDays:null}}]}},PQe=Bwt.stripe.plans,oLn=Object.freeze(Object.fromEntries(PQe.map(e=>[e.tier,e])))});var MQe=w(()=>{"use strict";m();aee();aee()});function Owt(e){FQe=e}function xG(){return FQe}function lt(e,t){let n=DG({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,xG(),UO].filter(r=>!!r)});e.common.issues.push(n)}function xn(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:(s,u)=>s.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"?{message:r??u.defaultError}:{message:n??u.defaultError},description:o}}function Hwt(e,t){return!!((t==="v4"||!t)&&Gwt.test(e)||(t==="v6"||!t)&&jwt.test(e))}function $wt(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(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}function WR(e){if(e instanceof yu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Nf.create(WR(r))}return new yu({...e._def,shape:()=>t})}else return e instanceof oh?new oh({...e._def,type:WR(e.element)}):e instanceof Nf?Nf.create(WR(e.unwrap())):e instanceof ih?ih.create(WR(e.unwrap())):e instanceof aA?aA.create(e.items.map(t=>WR(t))):e}function fee(e,t){let n=FE(e),r=FE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=Tr.objectKeys(t),i=Tr.objectKeys(e).filter(u=>o.indexOf(u)!==-1),s={...e,...t};for(let u of i){let l=fee(e[u],t[u]);if(!l.valid)return{valid:!1};s[u]=l.data}return{valid:!0,data:s}}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 s=e[i],u=t[i],l=fee(s,u);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===at.date&&r===at.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function jQe(e,t){return new ET({values:e,typeName:Jt.ZodEnum,...xn(t)})}var Tr,lee,at,FE,Ve,wwt,Xc,UO,FQe,DG,kwt,Eu,En,GQe,ac,dee,pee,QO,NG,Lt,fp,LQe,Dn,Pwt,Mwt,Lwt,Uwt,Qwt,Fwt,Gwt,jwt,zwt,GE,cT,lT,dT,pT,XR,fT,mT,jE,rh,Bf,ex,oh,yu,AT,RG,BG,gT,aA,wG,tx,nx,OG,hT,_T,ET,yT,zE,td,Nf,ih,ST,rx,ox,qwt,kG,FO,ix,zQe,Vwt,Jt,Ywt,HQe,$Qe,Kwt,Jwt,qQe,Zwt,Wwt,Xwt,eOt,tOt,nOt,rOt,oOt,iOt,sOt,aOt,uOt,cOt,lOt,dOt,pOt,fOt,mOt,AOt,gOt,hOt,_Ot,EOt,yOt,UQe,SOt,TOt,bOt,IOt,COt,vOt,ROt,xOt,DOt,_u,NOt,uee,BOt,pp,mee,ELn,yLn,SLn,VQe,wOt,OOt,kOt,POt,YQe,KQe,JQe,cee,Su,MOt,LOt,UOt,QOt,Aee,gee,hee,FOt,QQe,GOt,jOt,zOt,HOt,_ee,uA=w(()=>{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 s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(u=>typeof o[o[u]]!="number"),s={};for(let u of i)s[u]=o[u];return e.objectValues(s)},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 s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},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(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Tr||(Tr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(lee||(lee={}));at=Tr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),FE=e=>{switch(typeof e){case"undefined":return at.undefined;case"string":return at.string;case"number":return isNaN(e)?at.nan:at.number;case"boolean":return at.boolean;case"function":return at.function;case"bigint":return at.bigint;case"symbol":return at.symbol;case"object":return Array.isArray(e)?at.array:e===null?at.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?at.promise:typeof Map<"u"&&e instanceof Map?at.map:typeof Set<"u"&&e instanceof Set?at.set:typeof Date<"u"&&e instanceof Date?at.date:at.object;default:return at.unknown}},Ve=Tr.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"]),wwt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Xc=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 s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let u=r,l=0;for(;l<s.path.length;){let p=s.path[l];l===s.path.length-1?(u[p]=u[p]||{_errors:[]},u[p]._errors.push(n(s))):u[p]=u[p]||{_errors:[]},u=u[p],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,Tr.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()}};Xc.create=e=>new Xc(e);UO=(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,Tr.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${Tr.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Tr.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${Tr.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}"`:Tr.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,Tr.assertNever(e)}return{message:n}},FQe=UO;DG=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i},u="",l=r.filter(p=>!!p).slice().reverse();for(let p of l)u=p(s,{data:t,defaultError:u}).message;return{...o,path:i,message:o.message||u}},kwt=[];Eu=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 En;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:s}=o;if(i.status==="aborted"||s.status==="aborted")return En;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},En=Object.freeze({status:"aborted"}),GQe=e=>({status:"dirty",value:e}),ac=e=>({status:"valid",value:e}),dee=e=>e.status==="aborted",pee=e=>e.status==="dirty",QO=e=>e.status==="valid",NG=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})(Lt||(Lt={}));fp=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}},LQe=(e,t)=>{if(QO(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 Xc(e.common.issues);return this._error=n,this._error}}};Dn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return FE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:FE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Eu,ctx:{common:t.parent.common,data:t.data,parsedType:FE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(NG(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){let n=this._parse(t);return Promise.resolve(n)}parse(t,n){let r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;let o={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:FE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return LQe(o,i)}async parseAsync(t,n){let r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){let r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:FE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(NG(o)?o:Promise.resolve(o));return LQe(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 s=t(o),u=()=>i.addIssue({code:Ve.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(u(),!1)):s?!0:(u(),!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 td({schema:this,typeName:Jt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Nf.create(this,this._def)}nullable(){return ih.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return oh.create(this,this._def)}promise(){return zE.create(this,this._def)}or(t){return AT.create([this,t],this._def)}and(t){return gT.create(this,t,this._def)}transform(t){return new td({...xn(this._def),schema:this,typeName:Jt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new ST({...xn(this._def),innerType:this,defaultValue:n,typeName:Jt.ZodDefault})}brand(){return new kG({typeName:Jt.ZodBranded,type:this,...xn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new rx({...xn(this._def),innerType:this,catchValue:n,typeName:Jt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return FO.create(this,t)}readonly(){return ix.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},Pwt=/^c[^\s-]{8,}$/i,Mwt=/^[a-z][a-z0-9]*$/,Lwt=/[0-9A-HJKMNP-TV-Z]{26}/,Uwt=/^[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,Qwt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fwt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),Gwt=/^(((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}))$/,jwt=/^(([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})))$/,zwt=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$");GE=class e extends Dn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:Ve.invalid_string,...Lt.errToObj(r)}),this.nonempty=t=>this.min(1,Lt.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 lt(i,{code:Ve.invalid_type,expected:at.string,received:i.parsedType}),En}let r=new Eu,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),lt(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),lt(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 s=t.data.length>i.value,u=t.data.length<i.value;(s||u)&&(o=this._getOrReturnCtx(t,o),s?lt(o,{code:Ve.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&lt(o,{code:Ve.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Qwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"email",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Fwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"emoji",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Uwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"uuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Pwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Mwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"cuid2",code:Ve.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Lwt.test(t.data)||(o=this._getOrReturnCtx(t,o),lt(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),lt(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),lt(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),lt(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),lt(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),lt(o,{code:Ve.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?zwt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),lt(o,{code:Ve.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?Hwt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),lt(o,{validation:"ip",code:Ve.invalid_string,message:i.message}),r.dirty()):Tr.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",...Lt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Lt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Lt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Lt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Lt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Lt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Lt.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,...Lt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Lt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Lt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Lt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Lt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Lt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Lt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Lt.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}};GE.create=e=>{var t;return new GE({checks:[],typeName:Jt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};cT=class e extends Dn{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 lt(i,{code:Ve.invalid_type,expected:at.number,received:i.parsedType}),En}let r,o=new Eu;for(let i of this._def.checks)i.kind==="int"?Tr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),lt(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),lt(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),lt(r,{code:Ve.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?$wt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),lt(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),lt(r,{code:Ve.not_finite,message:i.message}),o.dirty()):Tr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Lt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Lt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Lt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Lt.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"&&Tr.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)}};cT.create=e=>new cT({checks:[],typeName:Jt.ZodNumber,coerce:e?.coerce||!1,...xn(e)});lT=class e extends Dn{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 lt(i,{code:Ve.invalid_type,expected:at.bigint,received:i.parsedType}),En}let r,o=new Eu;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),lt(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),lt(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),lt(r,{code:Ve.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Tr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.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:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.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}};lT.create=e=>{var t;return new lT({checks:[],typeName:Jt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...xn(e)})};dT=class extends Dn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.boolean,received:r.parsedType}),En}return ac(t.data)}};dT.create=e=>new dT({typeName:Jt.ZodBoolean,coerce:e?.coerce||!1,...xn(e)});pT=class e extends Dn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_type,expected:at.date,received:i.parsedType}),En}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return lt(i,{code:Ve.invalid_date}),En}let r=new Eu,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),lt(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),lt(o,{code:Ve.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Tr.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:Lt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Lt.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}};pT.create=e=>new pT({checks:[],coerce:e?.coerce||!1,typeName:Jt.ZodDate,...xn(e)});XR=class extends Dn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.symbol,received:r.parsedType}),En}return ac(t.data)}};XR.create=e=>new XR({typeName:Jt.ZodSymbol,...xn(e)});fT=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.undefined,received:r.parsedType}),En}return ac(t.data)}};fT.create=e=>new fT({typeName:Jt.ZodUndefined,...xn(e)});mT=class extends Dn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.null,received:r.parsedType}),En}return ac(t.data)}};mT.create=e=>new mT({typeName:Jt.ZodNull,...xn(e)});jE=class extends Dn{constructor(){super(...arguments),this._any=!0}_parse(t){return ac(t.data)}};jE.create=e=>new jE({typeName:Jt.ZodAny,...xn(e)});rh=class extends Dn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ac(t.data)}};rh.create=e=>new rh({typeName:Jt.ZodUnknown,...xn(e)});Bf=class extends Dn{_parse(t){let n=this._getOrReturnCtx(t);return lt(n,{code:Ve.invalid_type,expected:at.never,received:n.parsedType}),En}};Bf.create=e=>new Bf({typeName:Jt.ZodNever,...xn(e)});ex=class extends Dn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.void,received:r.parsedType}),En}return ac(t.data)}};ex.create=e=>new ex({typeName:Jt.ZodVoid,...xn(e)});oh=class e extends Dn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return lt(n,{code:Ve.invalid_type,expected:at.array,received:n.parsedType}),En;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,u=n.data.length<o.exactLength.value;(s||u)&&(lt(n,{code:s?Ve.too_big:Ve.too_small,minimum:u?o.exactLength.value:void 0,maximum:s?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&&(lt(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&&(lt(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((s,u)=>o.type._parseAsync(new fp(n,s,n.path,u)))).then(s=>Eu.mergeArray(r,s));let i=[...n.data].map((s,u)=>o.type._parseSync(new fp(n,s,n.path,u)));return Eu.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Lt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Lt.toString(n)}})}nonempty(t){return this.min(1,t)}};oh.create=(e,t)=>new oh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Jt.ZodArray,...xn(t)});yu=class e extends Dn{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=Tr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let p=this._getOrReturnCtx(t);return lt(p,{code:Ve.invalid_type,expected:at.object,received:p.parsedType}),En}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),u=[];if(!(this._def.catchall instanceof Bf&&this._def.unknownKeys==="strip"))for(let p in o.data)s.includes(p)||u.push(p);let l=[];for(let p of s){let h=i[p],y=o.data[p];l.push({key:{status:"valid",value:p},value:h._parse(new fp(o,y,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Bf){let p=this._def.unknownKeys;if(p==="passthrough")for(let h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")u.length>0&&(lt(o,{code:Ve.unrecognized_keys,keys:u}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let p=this._def.catchall;for(let h of u){let y=o.data[h];l.push({key:{status:"valid",value:h},value:p._parse(new fp(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let p=[];for(let h of l){let y=await h.key;p.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return p}).then(p=>Eu.mergeObjectSync(r,p)):Eu.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Lt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,u;let l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(u=Lt.errToObj(t).message)!==null&&u!==void 0?u:l}:{message:l}}}:{}})}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:Jt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return Tr.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 Tr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return WR(this)}partial(t){let n={};return Tr.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 Tr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Nf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return jQe(Tr.objectKeys(this.shape))}};yu.create=(e,t)=>new yu({shape:()=>e,unknownKeys:"strip",catchall:Bf.create(),typeName:Jt.ZodObject,...xn(t)});yu.strictCreate=(e,t)=>new yu({shape:()=>e,unknownKeys:"strict",catchall:Bf.create(),typeName:Jt.ZodObject,...xn(t)});yu.lazycreate=(e,t)=>new yu({shape:e,unknownKeys:"strip",catchall:Bf.create(),typeName:Jt.ZodObject,...xn(t)});AT=class extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let u of i)if(u.result.status==="valid")return u.result;for(let u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;let s=i.map(u=>new Xc(u.ctx.common.issues));return lt(n,{code:Ve.invalid_union,unionErrors:s}),En}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let p={...n,common:{...n.common,issues:[]},parent:null},h=l._parseSync({data:n.data,path:n.path,parent:p});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let u=s.map(l=>new Xc(l));return lt(n,{code:Ve.invalid_union,unionErrors:u}),En}}get options(){return this._def.options}};AT.create=(e,t)=>new AT({options:e,typeName:Jt.ZodUnion,...xn(t)});RG=e=>e instanceof hT?RG(e.schema):e instanceof td?RG(e.innerType()):e instanceof _T?[e.value]:e instanceof ET?e.options:e instanceof yT?Object.keys(e.enum):e instanceof ST?RG(e._def.innerType):e instanceof fT?[void 0]:e instanceof mT?[null]:null,BG=class e extends Dn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return lt(n,{code:Ve.invalid_type,expected:at.object,received:n.parsedType}),En;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}):(lt(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),En)}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 s=RG(i.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let u of s){if(o.has(u))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(u)}`);o.set(u,i)}}return new e({typeName:Jt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...xn(r)})}};gT=class extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(dee(i)||dee(s))return En;let u=fee(i.value,s.value);return u.valid?((pee(i)||pee(s))&&n.dirty(),{status:n.value,value:u.data}):(lt(r,{code:Ve.invalid_intersection_types}),En)};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,s])=>o(i,s)):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}))}};gT.create=(e,t,n)=>new gT({left:e,right:t,typeName:Jt.ZodIntersection,...xn(n)});aA=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return lt(r,{code:Ve.invalid_type,expected:at.array,received:r.parsedType}),En;if(r.data.length<this._def.items.length)return lt(r,{code:Ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),En;!this._def.rest&&r.data.length>this._def.items.length&&(lt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,u)=>{let l=this._def.items[u]||this._def.rest;return l?l._parse(new fp(r,s,r.path,u)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>Eu.mergeArray(n,s)):Eu.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};aA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new aA({items:e,typeName:Jt.ZodTuple,rest:null,...xn(t)})};wG=class e extends Dn{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 lt(r,{code:Ve.invalid_type,expected:at.object,received:r.parsedType}),En;let o=[],i=this._def.keyType,s=this._def.valueType;for(let u in r.data)o.push({key:i._parse(new fp(r,u,r.path,u)),value:s._parse(new fp(r,r.data[u],r.path,u))});return r.common.async?Eu.mergeObjectAsync(n,o):Eu.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Dn?new e({keyType:t,valueType:n,typeName:Jt.ZodRecord,...xn(r)}):new e({keyType:GE.create(),valueType:t,typeName:Jt.ZodRecord,...xn(n)})}},tx=class extends Dn{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 lt(r,{code:Ve.invalid_type,expected:at.map,received:r.parsedType}),En;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([u,l],p)=>({key:o._parse(new fp(r,u,r.path,[p,"key"])),value:i._parse(new fp(r,l,r.path,[p,"value"]))}));if(r.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let l of s){let p=await l.key,h=await l.value;if(p.status==="aborted"||h.status==="aborted")return En;(p.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(p.value,h.value)}return{status:n.value,value:u}})}else{let u=new Map;for(let l of s){let p=l.key,h=l.value;if(p.status==="aborted"||h.status==="aborted")return En;(p.status==="dirty"||h.status==="dirty")&&n.dirty(),u.set(p.value,h.value)}return{status:n.value,value:u}}}};tx.create=(e,t,n)=>new tx({valueType:t,keyType:e,typeName:Jt.ZodMap,...xn(n)});nx=class e extends Dn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return lt(r,{code:Ve.invalid_type,expected:at.set,received:r.parsedType}),En;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(lt(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&&(lt(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 s(l){let p=new Set;for(let h of l){if(h.status==="aborted")return En;h.status==="dirty"&&n.dirty(),p.add(h.value)}return{status:n.value,value:p}}let u=[...r.data.values()].map((l,p)=>i._parse(new fp(r,l,r.path,p)));return r.common.async?Promise.all(u).then(l=>s(l)):s(u)}min(t,n){return new e({...this._def,minSize:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Lt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};nx.create=(e,t)=>new nx({valueType:e,minSize:null,maxSize:null,typeName:Jt.ZodSet,...xn(t)});OG=class e extends Dn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return lt(n,{code:Ve.invalid_type,expected:at.function,received:n.parsedType}),En;function r(u,l){return DG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xG(),UO].filter(p=>!!p),issueData:{code:Ve.invalid_arguments,argumentsError:l}})}function o(u,l){return DG({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,xG(),UO].filter(p=>!!p),issueData:{code:Ve.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof zE){let u=this;return ac(async function(...l){let p=new Xc([]),h=await u._def.args.parseAsync(l,i).catch(T=>{throw p.addIssue(r(l,T)),p}),y=await Reflect.apply(s,this,h);return await u._def.returns._def.type.parseAsync(y,i).catch(T=>{throw p.addIssue(o(y,T)),p})})}else{let u=this;return ac(function(...l){let p=u._def.args.safeParse(l,i);if(!p.success)throw new Xc([r(l,p.error)]);let h=Reflect.apply(s,this,p.data),y=u._def.returns.safeParse(h,i);if(!y.success)throw new Xc([o(h,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:aA.create(t).rest(rh.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||aA.create([]).rest(rh.create()),returns:n||rh.create(),typeName:Jt.ZodFunction,...xn(r)})}},hT=class extends Dn{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})}};hT.create=(e,t)=>new hT({getter:e,typeName:Jt.ZodLazy,...xn(t)});_T=class extends Dn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return lt(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),En}return{status:"valid",value:t.data}}get value(){return this._def.value}};_T.create=(e,t)=>new _T({value:e,typeName:Jt.ZodLiteral,...xn(t)});ET=class e extends Dn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return lt(n,{expected:Tr.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),En}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return lt(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),En}return ac(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)))}};ET.create=jQe;yT=class extends Dn{_parse(t){let n=Tr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=Tr.objectValues(n);return lt(r,{expected:Tr.joinValues(o),received:r.parsedType,code:Ve.invalid_type}),En}if(n.indexOf(t.data)===-1){let o=Tr.objectValues(n);return lt(r,{received:r.data,code:Ve.invalid_enum_value,options:o}),En}return ac(t.data)}get enum(){return this._def.values}};yT.create=(e,t)=>new yT({values:e,typeName:Jt.ZodNativeEnum,...xn(t)});zE=class extends Dn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return lt(n,{code:Ve.invalid_type,expected:at.promise,received:n.parsedType}),En;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return ac(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};zE.create=(e,t)=>new zE({type:e,typeName:Jt.ZodPromise,...xn(t)});td=class extends Dn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Jt.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:s=>{lt(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(s).then(u=>this._def.schema._parseAsync({data:u,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}if(o.type==="refinement"){let s=u=>{let l=o.refinement(u,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){let u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?En:(u.status==="dirty"&&n.dirty(),s(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?En:(u.status==="dirty"&&n.dirty(),s(u.value).then(()=>({status:n.value,value:u.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!QO(s))return s;let u=o.transform(s.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>QO(s)?Promise.resolve(o.transform(s.value,i)).then(u=>({status:n.value,value:u})):s);Tr.assertNever(o)}};td.create=(e,t,n)=>new td({schema:e,typeName:Jt.ZodEffects,effect:t,...xn(n)});td.createWithPreprocess=(e,t,n)=>new td({schema:t,effect:{type:"preprocess",transform:e},typeName:Jt.ZodEffects,...xn(n)});Nf=class extends Dn{_parse(t){return this._getType(t)===at.undefined?ac(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Nf.create=(e,t)=>new Nf({innerType:e,typeName:Jt.ZodOptional,...xn(t)});ih=class extends Dn{_parse(t){return this._getType(t)===at.null?ac(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};ih.create=(e,t)=>new ih({innerType:e,typeName:Jt.ZodNullable,...xn(t)});ST=class extends Dn{_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}};ST.create=(e,t)=>new ST({innerType:e,typeName:Jt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...xn(t)});rx=class extends Dn{_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 NG(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Xc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};rx.create=(e,t)=>new rx({innerType:e,typeName:Jt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...xn(t)});ox=class extends Dn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return lt(r,{code:Ve.invalid_type,expected:at.nan,received:r.parsedType}),En}return{status:"valid",value:t.data}}};ox.create=e=>new ox({typeName:Jt.ZodNaN,...xn(e)});qwt=Symbol("zod_brand"),kG=class extends Dn{_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}},FO=class e extends Dn{_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"?En:i.status==="dirty"?(n.dirty(),GQe(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"?En: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:Jt.ZodPipeline})}},ix=class extends Dn{_parse(t){let n=this._def.innerType._parse(t);return QO(n)&&(n.value=Object.freeze(n.value)),n}};ix.create=(e,t)=>new ix({innerType:e,typeName:Jt.ZodReadonly,...xn(t)});zQe=(e,t={},n)=>e?jE.create().superRefine((r,o)=>{var i,s;if(!e(r)){let u=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(i=u.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,p=typeof u=="string"?{message:u}:u;o.addIssue({code:"custom",...p,fatal:l})}}):jE.create(),Vwt={object:yu.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"})(Jt||(Jt={}));Ywt=(e,t={message:`Input not instance of ${e.name}`})=>zQe(n=>n instanceof e,t),HQe=GE.create,$Qe=cT.create,Kwt=ox.create,Jwt=lT.create,qQe=dT.create,Zwt=pT.create,Wwt=XR.create,Xwt=fT.create,eOt=mT.create,tOt=jE.create,nOt=rh.create,rOt=Bf.create,oOt=ex.create,iOt=oh.create,sOt=yu.create,aOt=yu.strictCreate,uOt=AT.create,cOt=BG.create,lOt=gT.create,dOt=aA.create,pOt=wG.create,fOt=tx.create,mOt=nx.create,AOt=OG.create,gOt=hT.create,hOt=_T.create,_Ot=ET.create,EOt=yT.create,yOt=zE.create,UQe=td.create,SOt=Nf.create,TOt=ih.create,bOt=td.createWithPreprocess,IOt=FO.create,COt=()=>HQe().optional(),vOt=()=>$Qe().optional(),ROt=()=>qQe().optional(),xOt={string:(e=>GE.create({...e,coerce:!0})),number:(e=>cT.create({...e,coerce:!0})),boolean:(e=>dT.create({...e,coerce:!0})),bigint:(e=>lT.create({...e,coerce:!0})),date:(e=>pT.create({...e,coerce:!0}))},DOt=En,_u=Object.freeze({__proto__:null,defaultErrorMap:UO,setErrorMap:Owt,getErrorMap:xG,makeIssue:DG,EMPTY_PATH:kwt,addIssueToContext:lt,ParseStatus:Eu,INVALID:En,DIRTY:GQe,OK:ac,isAborted:dee,isDirty:pee,isValid:QO,isAsync:NG,get util(){return Tr},get objectUtil(){return lee},ZodParsedType:at,getParsedType:FE,ZodType:Dn,ZodString:GE,ZodNumber:cT,ZodBigInt:lT,ZodBoolean:dT,ZodDate:pT,ZodSymbol:XR,ZodUndefined:fT,ZodNull:mT,ZodAny:jE,ZodUnknown:rh,ZodNever:Bf,ZodVoid:ex,ZodArray:oh,ZodObject:yu,ZodUnion:AT,ZodDiscriminatedUnion:BG,ZodIntersection:gT,ZodTuple:aA,ZodRecord:wG,ZodMap:tx,ZodSet:nx,ZodFunction:OG,ZodLazy:hT,ZodLiteral:_T,ZodEnum:ET,ZodNativeEnum:yT,ZodPromise:zE,ZodEffects:td,ZodTransformer:td,ZodOptional:Nf,ZodNullable:ih,ZodDefault:ST,ZodCatch:rx,ZodNaN:ox,BRAND:qwt,ZodBranded:kG,ZodPipeline:FO,ZodReadonly:ix,custom:zQe,Schema:Dn,ZodSchema:Dn,late:Vwt,get ZodFirstPartyTypeKind(){return Jt},coerce:xOt,any:tOt,array:iOt,bigint:Jwt,boolean:qQe,date:Zwt,discriminatedUnion:cOt,effect:UQe,enum:_Ot,function:AOt,instanceof:Ywt,intersection:lOt,lazy:gOt,literal:hOt,map:fOt,nan:Kwt,nativeEnum:EOt,never:rOt,null:eOt,nullable:TOt,number:$Qe,object:sOt,oboolean:ROt,onumber:vOt,optional:SOt,ostring:COt,pipeline:IOt,preprocess:bOt,promise:yOt,record:pOt,set:mOt,strictObject:aOt,string:HQe,symbol:Wwt,transformer:UQe,tuple:dOt,undefined:Xwt,union:uOt,unknown:nOt,void:oOt,NEVER:DOt,ZodIssueCode:Ve,quotelessJson:wwt,ZodError:Xc}),NOt=e=>typeof e?.safeParse=="function",uee=e=>typeof e?.passthrough=="function",BOt=(e,t)=>uee(e)?uee(t)?e.merge(t):e:uee(t)?t:Object.assign({},e,t),pp=_u.object({name:_u.literal("ZodError"),issues:_u.array(_u.object({path:_u.array(_u.union([_u.string(),_u.number()])),message:_u.string().optional(),code:_u.nativeEnum(_u.ZodIssueCode)}).catchall(_u.any()))}),mee=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}},ELn=_u.object({message:_u.literal("Request validation failed"),pathParameterErrors:pp.nullable(),headerErrors:pp.nullable(),queryParameterErrors:pp.nullable(),bodyErrors:pp.nullable()}),yLn=_u.object({pathParameterErrors:pp.nullable(),headerErrors:pp.nullable(),queryParameterErrors:pp.nullable(),bodyErrors:pp.nullable()}),SLn=_u.object({paramsResult:pp.nullable(),headersResult:pp.nullable(),queryResult:pp.nullable(),bodyResult:pp.nullable()}),VQe="zod-ts-rest-polyfill",wOt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},OOt=e=>wOt(e)?e:NOt(e)?(Object.assign(e,{"~standard":{vendor:VQe,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,kOt=(e,t)=>e?t?e instanceof yu&&t instanceof yu?BOt(e,t):{...e,...t}:e:t,POt=(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===VQe?{error:new Xc(r.issues)}:{error:new mee(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},YQe=Symbol("ContractNoBody"),KQe=e=>"method"in e&&"path"in e,JQe=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return KQe(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:kOt(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,...(s=r.metadata)!==null&&s!==void 0?s:{}}:r.metadata}]:[n,JQe(r,t)]})),cee=Symbol("ContractPlainType"),Su=()=>({router:(e,t)=>JQe(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>cee,body:()=>cee,type:()=>cee,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>YQe}),MOt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},LOt=(e,t=!1)=>{let n=t?UOt(e):QOt(e);return n?.length>0?"?"+n:""},UOt=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("&"):"",QOt=e=>e?Object.keys(e).flatMap(t=>Aee(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",Aee=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>Aee(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>Aee(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],gee=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}},hee=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:s})=>{let u=await fetch(t,{...s,method:n,headers:r,body:o}),l=u.headers.get("content-type");if(l?.includes("application/")&&l?.includes("json")){let p=e.responses[u.status],h={status:u.status,body:p===YQe?void 0:await u.json(),headers:u.headers},y=OOt(p);if(y&&(i??e.validateResponseOnClient)){let S=POt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return l?.includes("text/")?{status:u.status,body:await u.text(),headers:u.headers}:{status:u.status,body:await u.blob(),headers:u.headers}},FOt=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},QQe=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),GOt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:u,fetchOptions:l}=e,p=n.api||hee,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([T,v])=>typeof v=="function"?[T,v(e)]:[T,v])),y={...h&&QQe(h),...QQe(u)};Object.keys(y).forEach(T=>{y[T]===void 0&&delete y[T]});let S={route:r,path:t,method:r.method,headers:y,body:void 0,rawBody:o,rawQuery:i,contentType:void 0,validateResponse:n.validateResponse,fetchOptions:{...n.credentials&&{credentials:n.credentials},...l},...l?.signal&&{signal:l.signal},...l?.cache&&{cache:l.cache},...l&&"next"in l&&!!l?.next&&{next:l.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?S={...S,contentType:"multipart/form-data",body:o instanceof FormData?o:FOt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?S={...S,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...S.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(S={...S,contentType:"application/json",headers:{"content-type":"application/json",...S.headers},body:JSON.stringify(o)})),p({...S,...s})},jOt=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:u,overrideClientOptions:l,fetchOptions:p,cache:h,next:y,...S}=n||{},T={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([x,O])=>[x,String(O)])):{};return{path:zOt(r,T.baseUrl,v,e,!!T.jsonQuery),clientArgs:T,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...p},headers:{...u,...s}}},zOt=(e,t,n,r,o)=>{let i=MOt({path:r.path,params:n}),s=LOt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},HOt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=jOt(e,t,r),i=await GOt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new gee(i,n)}},_ee=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>KQe(r)?[n,HOt(r,t)]:[n,_ee(r,t)]))});function oe(e,t,n){function r(u,l){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,l);let p=s.prototype,h=Object.keys(p);for(let y=0;y<h.length;y++){let S=h[y];S in u||(u[S]=p[S].bind(u))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(u){var l;let p=n?.Parent?new i:this;r(p,u),(l=p._zod).deferred??(l.deferred=[]);for(let h of p._zod.deferred)h();return p}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function bi(e){return e&&Object.assign(TT,e),TT}var ZQe,Eee,yee,wf,HE,TT,bT=w(()=>{m();Eee=Object.freeze({status:"aborted"});yee=Symbol("zod_brand"),wf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},HE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(ZQe=globalThis).__zod_globalConfig??(ZQe.__zod_globalConfig={});TT=globalThis.__zod_globalConfig});var Ue={};Js(Ue,{BIGINT_FORMAT_RANGES:()=>Nee,Class:()=>Tee,NUMBER_FORMAT_RANGES:()=>Dee,aborted:()=>YE,allowsEval:()=>Cee,assert:()=>KOt,assertEqual:()=>$Ot,assertIs:()=>VOt,assertNever:()=>YOt,assertNotEqual:()=>qOt,assignProp:()=>qE,base64ToUint8Array:()=>XQe,base64urlToUint8Array:()=>pkt,cached:()=>ax,captureStackTrace:()=>MG,cleanEnum:()=>dkt,cleanRegex:()=>zO,clone:()=>uc,cloneDef:()=>ZOt,createTransparentProxy:()=>rkt,defineLazy:()=>Hn,esc:()=>PG,escapeRegex:()=>mp,explicitlyAborted:()=>Bee,extend:()=>skt,finalizeIssue:()=>cc,floatSafeRemainder:()=>bee,getElementAtPath:()=>WOt,getEnumValues:()=>jO,getLengthableOrigin:()=>qO,getParsedType:()=>nkt,getSizableOrigin:()=>$O,hexToUint8Array:()=>mkt,isObject:()=>IT,isPlainObject:()=>VE,issue:()=>ux,joinValues:()=>de,jsonStringifyReplacer:()=>sx,merge:()=>ukt,mergeDefs:()=>sh,normalizeParams:()=>$e,nullish:()=>$E,numKeys:()=>tkt,objectClone:()=>JOt,omit:()=>ikt,optionalKeys:()=>xee,parsedType:()=>Pe,partial:()=>ckt,pick:()=>okt,prefixIssues:()=>el,primitiveTypes:()=>Ree,promiseAllObject:()=>XOt,propertyKeyTypes:()=>HO,randomString:()=>ekt,required:()=>lkt,safeExtend:()=>akt,shallowClone:()=>vee,slugify:()=>Iee,stringifyPrimitive:()=>ke,uint8ArrayToBase64:()=>eFe,uint8ArrayToBase64url:()=>fkt,uint8ArrayToHex:()=>Akt,unwrapMessage:()=>GO});function $Ot(e){return e}function qOt(e){return e}function VOt(e){}function YOt(e){throw new Error("Unexpected value in exhaustive check")}function KOt(e){}function jO(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 de(e,t="|"){return e.map(n=>ke(n)).join(t)}function sx(e,t){return typeof t=="bigint"?t.toString():t}function ax(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function $E(e){return e==null}function zO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function bee(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 Hn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==WQe)return r===void 0&&(r=WQe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function JOt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function qE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function sh(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ZOt(e){return sh(e._zod.def)}function WOt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function XOt(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 ekt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function PG(e){return JSON.stringify(e)}function Iee(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function IT(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function VE(e){if(IT(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(IT(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function vee(e){return VE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function tkt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function mp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function uc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $e(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 rkt(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 ke(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function xee(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function okt(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=sh(e._zod.def,{get shape(){let s={};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(s[u]=n.shape[u])}return qE(this,"shape",s),s},checks:[]});return uc(e,i)}function ikt(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=sh(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete s[u]}return qE(this,"shape",s),s},checks:[]});return uc(e,i)}function skt(e,t){if(!VE(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 s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=sh(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return qE(this,"shape",i),i}});return uc(e,o)}function akt(e,t){if(!VE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return qE(this,"shape",r),r}});return uc(e,n)}function ukt(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=sh(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return qE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return uc(e,n)}function ckt(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 s=sh(t._zod.def,{get shape(){let u=t._zod.def.shape,l={...u};if(n)for(let p in n){if(!(p in u))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(l[p]=e?new e({type:"optional",innerType:u[p]}):u[p])}else for(let p in u)l[p]=e?new e({type:"optional",innerType:u[p]}):u[p];return qE(this,"shape",l),l},checks:[]});return uc(t,s)}function lkt(e,t,n){let r=sh(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return qE(this,"shape",i),i}});return uc(t,r)}function YE(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Bee(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 el(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function GO(e){return typeof e=="string"?e:e?.message}function cc(e,t,n){let r=e.message?e.message:GO(e.inst?._zod.def?.error?.(e))??GO(t?.error?.(e))??GO(n.customError?.(e))??GO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...u}=e;return u.path??(u.path=[]),u.message=r,t?.reportInput&&(u.input=s),u}function $O(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function qO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Pe(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 ux(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function dkt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function XQe(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 eFe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function pkt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return XQe(t+n)}function fkt(e){return eFe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function mkt(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 Akt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var WQe,MG,Cee,nkt,HO,Ree,Dee,Nee,Tee,yt=w(()=>{m();bT();WQe=Symbol("evaluating");MG="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};Cee=ax(()=>{if(TT.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});nkt=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}`)}},HO=new Set(["string","number","symbol"]),Ree=new Set(["string","number","bigint","boolean","symbol","undefined"]);Dee={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]},Nee={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};Tee=class{constructor(...t){}}});function YO(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 KO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(u=>r({issues:u},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let u=[...i,...s.path];if(u.length===0)n._errors.push(t(s));else{let l=n,p=0;for(;p<u.length;){let h=u[p];p===u.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(t(s))):l[h]=l[h]||{_errors:[]},l=l[h],p++}}}};return r(e),n}function wee(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,u;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(p=>r({issues:p},[...i,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...i,...l.path]);else{let p=[...i,...l.path];if(p.length===0){n.errors.push(t(l));continue}let h=n,y=0;for(;y<p.length;){let S=p[y],T=y===p.length-1;typeof S=="string"?(h.properties??(h.properties={}),(s=h.properties)[S]??(s[S]={errors:[]}),h=h.properties[S]):(h.items??(h.items=[]),(u=h.items)[S]??(u[S]={errors:[]}),h=h.items[S]),T&&h.errors.push(t(l)),y++}}};return r(e),n}function nFe(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 Oee(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 ${nFe(r.path)}`);return t.join(`
41
41
  `)}var tFe,VO,tl,kee=w(()=>{m();bT();yt();tFe=(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,sx,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},VO=oe("$ZodError",tFe),tl=oe("$ZodError",tFe,{Parent:Error})});var cx,LG,lx,UG,dx,Pee,px,Mee,QG,hkt,FG,_kt,GG,Ekt,jG,ykt,zG,Skt,HG,Tkt,$G,bkt,qG,Ikt,Lee=w(()=>{m();bT();kee();yt();cx=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new wf;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,bi())));throw MG(u,o?.callee),u}return s.value},LG=cx(tl),lx=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(l=>cc(l,i,bi())));throw MG(u,o?.callee),u}return s.value},UG=lx(tl),dx=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 wf;return i.issues.length?{success:!1,error:new(e??VO)(i.issues.map(s=>cc(s,o,bi())))}:{success:!0,data:i.value}},Pee=dx(tl),px=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(s=>cc(s,o,bi())))}:{success:!0,data:i.value}},Mee=px(tl),QG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return cx(e)(t,n,o)},hkt=QG(tl),FG=e=>(t,n,r)=>cx(e)(t,n,r),_kt=FG(tl),GG=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return lx(e)(t,n,o)},Ekt=GG(tl),jG=e=>async(t,n,r)=>lx(e)(t,n,r),ykt=jG(tl),zG=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return dx(e)(t,n,o)},Skt=zG(tl),HG=e=>(t,n,r)=>dx(e)(t,n,r),Tkt=HG(tl),$G=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return px(e)(t,n,o)},bkt=$G(tl),qG=e=>async(t,n,r)=>px(e)(t,n,r),Ikt=qG(tl)});var nd={};Js(nd,{base64:()=>Xee,base64url:()=>VG,bigint:()=>ste,boolean:()=>ute,browserEmail:()=>wkt,cidrv4:()=>Zee,cidrv6:()=>Wee,cuid:()=>Uee,cuid2:()=>Qee,date:()=>nte,datetime:()=>ote,domain:()=>Pkt,duration:()=>Hee,e164:()=>tte,email:()=>qee,emoji:()=>Vee,extendedDuration:()=>Ckt,guid:()=>$ee,hex:()=>Mkt,hostname:()=>kkt,html5Email:()=>Dkt,httpProtocol:()=>ete,idnEmail:()=>Bkt,integer:()=>ate,ipv4:()=>Yee,ipv6:()=>Kee,ksuid:()=>jee,lowercase:()=>dte,mac:()=>Jee,md5_base64:()=>Ukt,md5_base64url:()=>Qkt,md5_hex:()=>Lkt,nanoid:()=>zee,null:()=>cte,number:()=>YG,rfc5322Email:()=>Nkt,sha1_base64:()=>Gkt,sha1_base64url:()=>jkt,sha1_hex:()=>Fkt,sha256_base64:()=>Hkt,sha256_base64url:()=>$kt,sha256_hex:()=>zkt,sha384_base64:()=>Vkt,sha384_base64url:()=>Ykt,sha384_hex:()=>qkt,sha512_base64:()=>Jkt,sha512_base64url:()=>Zkt,sha512_hex:()=>Kkt,string:()=>ite,time:()=>rte,ulid:()=>Fee,undefined:()=>lte,unicodeEmail:()=>rFe,uppercase:()=>pte,uuid:()=>CT,uuid4:()=>vkt,uuid6:()=>Rkt,uuid7:()=>xkt,xid:()=>Gee});function Vee(){return new RegExp(Okt,"u")}function iFe(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 rte(e){return new RegExp(`^${iFe(e)}$`)}function ote(e){let t=iFe({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(`^${oFe}T(?:${r})$`)}function JO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ZO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Uee,Qee,Fee,Gee,jee,zee,Hee,Ckt,$ee,CT,vkt,Rkt,xkt,qee,Dkt,Nkt,rFe,Bkt,wkt,Okt,Yee,Kee,Jee,Zee,Wee,Xee,VG,kkt,Pkt,ete,tte,oFe,nte,ite,ste,ate,YG,ute,cte,lte,dte,pte,Mkt,Lkt,Ukt,Qkt,Fkt,Gkt,jkt,zkt,Hkt,$kt,qkt,Vkt,Ykt,Kkt,Jkt,Zkt,KG=w(()=>{m();yt();Uee=/^[cC][0-9a-z]{6,}$/,Qee=/^[0-9a-z]+$/,Fee=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Gee=/^[0-9a-vA-V]{20}$/,jee=/^[A-Za-z0-9]{27}$/,zee=/^[a-zA-Z0-9_-]{21}$/,Hee=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Ckt=/^[-+]?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)?)??$/,$ee=/^([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})$/,CT=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)$/,vkt=CT(4),Rkt=CT(6),xkt=CT(7),qee=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Dkt=/^[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])?)*$/,Nkt=/^(([^<>()\[\]\\.,;:\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,}))$/,rFe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Bkt=rFe,wkt=/^[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])?)*$/,Okt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";Yee=/^(?:(?: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])$/,Kee=/^(([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}|:))$/,Jee=e=>{let t=mp(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Zee=/^((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])$/,Wee=/^(([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])$/,Xee=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,VG=/^[A-Za-z0-9_-]*$/,kkt=/^(?=.{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])?)*\.?$/,Pkt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ete=/^https?$/,tte=/^\+[1-9]\d{6,14}$/,oFe="(?:(?:\\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])))",nte=new RegExp(`^${oFe}$`);ite=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},ste=/^-?\d+n?$/,ate=/^-?\d+$/,YG=/^-?\d+(?:\.\d+)?$/,ute=/^(?:true|false)$/i,cte=/^null$/i,lte=/^undefined$/i,dte=/^[^A-Z]*$/,pte=/^[^a-z]*$/,Mkt=/^[0-9a-fA-F]*$/;Lkt=/^[0-9a-fA-F]{32}$/,Ukt=JO(22,"=="),Qkt=ZO(22),Fkt=/^[0-9a-fA-F]{40}$/,Gkt=JO(27,"="),jkt=ZO(27),zkt=/^[0-9a-fA-F]{64}$/,Hkt=JO(43,"="),$kt=ZO(43),qkt=/^[0-9a-fA-F]{96}$/,Vkt=JO(64,""),Ykt=ZO(64),Kkt=/^[0-9a-fA-F]{128}$/,Jkt=JO(86,"=="),Zkt=ZO(86)});function sFe(e,t,n){e.issues.length&&t.issues.push(...el(n,e.issues))}var to,aFe,JG,ZG,fte,mte,Ate,gte,hte,_te,Ete,yte,Ste,fx,Tte,bte,Ite,Cte,vte,Rte,xte,Dte,Nte,WG=w(()=>{m();bT();KG();yt();to=oe("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aFe={number:"number",bigint:"bigint",object:"date"},JG=oe("$ZodCheckLessThan",(e,t)=>{to.init(e,t);let n=aFe[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})}}),ZG=oe("$ZodCheckGreaterThan",(e,t)=>{to.init(e,t);let n=aFe[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})}}),fte=oe("$ZodCheckMultipleOf",(e,t)=>{to.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):bee(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})}}),mte=oe("$ZodCheckNumberFormat",(e,t)=>{to.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=Dee[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=i,n&&(u.pattern=ate)}),e._zod.check=s=>{let u=s.value;if(n){if(!Number.isInteger(u)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,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}):s.issues.push({input:u,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}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>i&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ate=oe("$ZodCheckBigIntFormat",(e,t)=>{to.init(e,t);let[n,r]=Nee[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})}}),gte=oe("$ZodCheckMaxSize",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;o.size<=t.maximum||r.issues.push({origin:$O(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),hte=oe("$ZodCheckMinSize",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;o.size>=t.minimum||r.issues.push({origin:$O(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),_te=oe("$ZodCheckSizeEquals",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:$O(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Ete=oe("$ZodCheckMaxLength",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let s=qO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),yte=oe("$ZodCheckMinLength",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let s=qO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Ste=oe("$ZodCheckLengthEquals",(e,t)=>{var n;to.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!$E(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let s=qO(o),u=i>t.length;r.issues.push({origin:s,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),fx=oe("$ZodCheckStringFormat",(e,t)=>{var n,r;to.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=()=>{})}),Tte=oe("$ZodCheckRegex",(e,t)=>{fx.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})}}),bte=oe("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=dte),fx.init(e,t)}),Ite=oe("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=pte),fx.init(e,t)}),Cte=oe("$ZodCheckIncludes",(e,t)=>{to.init(e,t);let n=mp(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})}}),vte=oe("$ZodCheckStartsWith",(e,t)=>{to.init(e,t);let n=new RegExp(`^${mp(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})}}),Rte=oe("$ZodCheckEndsWith",(e,t)=>{to.init(e,t);let n=new RegExp(`.*${mp(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})}});xte=oe("$ZodCheckProperty",(e,t)=>{to.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=>sFe(o,n,t.property));sFe(r,n,t.property)}}),Dte=oe("$ZodCheckMimeType",(e,t)=>{to.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})}}),Nte=oe("$ZodCheckOverwrite",(e,t)=>{to.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var WO,Bte=w(()=>{m();WO=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(`
@@ -662,7 +662,7 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
662
662
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
663
663
  `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){let r=!this.onKeyLine&&this.indent===t.indent,o=r&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind",i=[];if(o&&n.sep&&!n.value){let s=[];for(let u=0;u<n.sep.length;++u){let l=n.sep[u];switch(l.type){case"newline":s.push(u);break;case"space":break;case"comment":l.indent>t.indent&&(s.length=0);break;default:s.length=0}}s.length>=2&&(i=n.sep.splice(s[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(i.push(this.sourceToken),t.items.push({start:i}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(i.push(this.sourceToken),t.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(O0(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(FZe(n.key)&&!O0(n.sep,"newline")){let s=n1(n.start),u=n.key,l=n.sep;l.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:u,sep:l}]})}else i.length>0?n.sep=n.sep.concat(i,this.sourceToken):n.sep.push(this.sourceToken);else if(O0(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{let s=n1(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:i,key:null,sep:[this.sourceToken]}):O0(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let s=this.flowScalar(this.type);o||n.value?(t.items.push({start:i,key:s,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(s):(Object.assign(n,{key:s,sep:[]}),this.onKeyLine=!0);return}default:{let s=this.startBlockValue(t);if(s){if(s.type==="block-seq"){if(!n.explicitKey&&n.sep&&!O0(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else r&&t.items.push({start:i});this.stack.push(s);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){let n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){let r="end"in n.value?n.value.end:void 0;(Array.isArray(r)?r[r.length-1]:void 0)?.type==="comment"?r?.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){let o=t.items[t.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||O0(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){let r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){let n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r?.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let o=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:o,sep:[]}):n.sep?this.stack.push(o):Object.assign(n,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}let r=this.startBlockValue(t);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{let r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){let o=_9(r),i=n1(o);QZe(t);let s=t.end.splice(1,t.end.length);s.push(this.sourceToken);let u={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:i,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=u}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
664
664
  `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
665
- `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=_9(t),r=n1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=_9(t),r=n1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};GZe.Parser=Npe});var qZe=P(TM=>{"use strict";m();var jZe=hpe(),tZt=fM(),SM=gM(),nZt=Ade(),rZt=gr(),oZt=Dpe(),zZe=Bpe();function HZe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new oZt.LineCounter||null,prettyErrors:t}}function iZt(e,t={}){let{lineCounter:n,prettyErrors:r}=HZe(t),o=new zZe.Parser(n?.addNewLine),i=new jZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(SM.prettifyError(e,n)),u.warnings.forEach(SM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function $Ze(e,t={}){let{lineCounter:n,prettyErrors:r}=HZe(t),o=new zZe.Parser(n?.addNewLine),i=new jZe.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new SM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(SM.prettifyError(e,n)),s.warnings.forEach(SM.prettifyError(e,n))),s}function sZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=$Ze(e,n);if(!o)return null;if(o.warnings.forEach(i=>nZt.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function aZt(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return rZt.isDocument(e)&&!r?e.toString(n):new tZt.Document(e,r,n).toString(n)}TM.parse=sZt;TM.parseAllDocuments=iZt;TM.parseDocument=$Ze;TM.stringify=aZt});var YZe=P(kr=>{"use strict";m();var uZt=hpe(),cZt=fM(),lZt=Zde(),wpe=gM(),dZt=JP(),k0=gr(),pZt=D0(),fZt=ps(),mZt=B0(),AZt=w0(),gZt=g9(),hZt=Rpe(),_Zt=Dpe(),EZt=Bpe(),E9=qZe(),VZe=qP();kr.Composer=uZt.Composer;kr.Document=cZt.Document;kr.Schema=lZt.Schema;kr.YAMLError=wpe.YAMLError;kr.YAMLParseError=wpe.YAMLParseError;kr.YAMLWarning=wpe.YAMLWarning;kr.Alias=dZt.Alias;kr.isAlias=k0.isAlias;kr.isCollection=k0.isCollection;kr.isDocument=k0.isDocument;kr.isMap=k0.isMap;kr.isNode=k0.isNode;kr.isPair=k0.isPair;kr.isScalar=k0.isScalar;kr.isSeq=k0.isSeq;kr.Pair=pZt.Pair;kr.Scalar=fZt.Scalar;kr.YAMLMap=mZt.YAMLMap;kr.YAMLSeq=AZt.YAMLSeq;kr.CST=gZt;kr.Lexer=hZt.Lexer;kr.LineCounter=_Zt.LineCounter;kr.Parser=EZt.Parser;kr.parse=E9.parse;kr.parseAllDocuments=E9.parseAllDocuments;kr.parseDocument=E9.parseDocument;kr.stringify=E9.stringify;kr.visit=VZe.visit;kr.visitAsync=VZe.visitAsync});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]="83ebaf33-8d93-4e5c-ab8d-be924d5a3aa8",e._sentryDebugIdIdentifier="sentry-dbid-83ebaf33-8d93-4e5c-ab8d-be924d5a3aa8")}catch{}})();m();m();m();function rAe(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 oAe=rAe();oAe.ok||(process.stderr.write(`lore: ${oAe.message}.
665
+ `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let n=_9(t),r=n1(n);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let n=_9(t),r=n1(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}};GZe.Parser=Npe});var qZe=P(TM=>{"use strict";m();var jZe=hpe(),tZt=fM(),SM=gM(),nZt=Ade(),rZt=gr(),oZt=Dpe(),zZe=Bpe();function HZe(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new oZt.LineCounter||null,prettyErrors:t}}function iZt(e,t={}){let{lineCounter:n,prettyErrors:r}=HZe(t),o=new zZe.Parser(n?.addNewLine),i=new jZe.Composer(t),s=Array.from(i.compose(o.parse(e)));if(r&&n)for(let u of s)u.errors.forEach(SM.prettifyError(e,n)),u.warnings.forEach(SM.prettifyError(e,n));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function $Ze(e,t={}){let{lineCounter:n,prettyErrors:r}=HZe(t),o=new zZe.Parser(n?.addNewLine),i=new jZe.Composer(t),s=null;for(let u of i.compose(o.parse(e),!0,e.length))if(!s)s=u;else if(s.options.logLevel!=="silent"){s.errors.push(new SM.YAMLParseError(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(s.errors.forEach(SM.prettifyError(e,n)),s.warnings.forEach(SM.prettifyError(e,n))),s}function sZt(e,t,n){let r;typeof t=="function"?r=t:n===void 0&&t&&typeof t=="object"&&(n=t);let o=$Ze(e,n);if(!o)return null;if(o.warnings.forEach(i=>nZt.warn(o.options.logLevel,i)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function aZt(e,t,n){let r=null;if(typeof t=="function"||Array.isArray(t)?r=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){let o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(e===void 0){let{keepUndefined:o}=n??t??{};if(!o)return}return rZt.isDocument(e)&&!r?e.toString(n):new tZt.Document(e,r,n).toString(n)}TM.parse=sZt;TM.parseAllDocuments=iZt;TM.parseDocument=$Ze;TM.stringify=aZt});var YZe=P(kr=>{"use strict";m();var uZt=hpe(),cZt=fM(),lZt=Zde(),wpe=gM(),dZt=JP(),k0=gr(),pZt=D0(),fZt=ps(),mZt=B0(),AZt=w0(),gZt=g9(),hZt=Rpe(),_Zt=Dpe(),EZt=Bpe(),E9=qZe(),VZe=qP();kr.Composer=uZt.Composer;kr.Document=cZt.Document;kr.Schema=lZt.Schema;kr.YAMLError=wpe.YAMLError;kr.YAMLParseError=wpe.YAMLParseError;kr.YAMLWarning=wpe.YAMLWarning;kr.Alias=dZt.Alias;kr.isAlias=k0.isAlias;kr.isCollection=k0.isCollection;kr.isDocument=k0.isDocument;kr.isMap=k0.isMap;kr.isNode=k0.isNode;kr.isPair=k0.isPair;kr.isScalar=k0.isScalar;kr.isSeq=k0.isSeq;kr.Pair=pZt.Pair;kr.Scalar=fZt.Scalar;kr.YAMLMap=mZt.YAMLMap;kr.YAMLSeq=AZt.YAMLSeq;kr.CST=gZt;kr.Lexer=hZt.Lexer;kr.LineCounter=_Zt.LineCounter;kr.Parser=EZt.Parser;kr.parse=E9.parse;kr.parseAllDocuments=E9.parseAllDocuments;kr.parseDocument=E9.parseDocument;kr.stringify=E9.stringify;kr.visit=VZe.visit;kr.visitAsync=VZe.visitAsync});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]="e022a5e4-ec52-4d04-9e79-94b154cdf636",e._sentryDebugIdIdentifier="sentry-dbid-e022a5e4-ec52-4d04-9e79-94b154cdf636")}catch{}})();m();m();m();function rAe(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 oAe=rAe();oAe.ok||(process.stderr.write(`lore: ${oAe.message}.
666
666
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
667
667
  `),process.exit(1));m();ZR();sc();function Awt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var gwt=Awt();tee({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:eo(),release:hu(),sendDefaultPii:!0,enableLogs:!0,spotlight:gwt,tracesSampleRate:1});UQ("service_name","lore-cli");ZR();iee();import{realpathSync as Ftn}from"node:fs";import{fileURLToPath as Gtn,pathToFileURL as Vet}from"node:url";m();m();Ck();Ur();cn();Pn();m();function Lk(e){let t=e;return t._def??t.def??{}}function V4t(e){let t=Lk(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function ol(e,t,n){let r=V4t(e);return r===t||r===n}function Bje(e){let t=Lk(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function Y4t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=Lk(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Ase(e){if(!e||!ol(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=Lk(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function wje(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=Lk(t);if(ol(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(ol(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(ol(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(ol(t,"ZodEffects","effects"))t=i.schema;else if(ol(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function K4t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=wje(e),s=!1,u=n;ol(u,"ZodArray","array")&&(s=!0,u=Bje(u)??u);let l=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ol(u,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:Y4t(u),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:ol(u,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:l,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:s}:{arg:{type:"string",description:s?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:l,...o!==void 0?{default:String(o)}:{},...s?{valueHint:"a,b,c"}:{}},optional:r,isArray:s}}function gse(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:u}=K4t(i,t);n[o]=s,r[o]={isArray:u,leafKind:J4t(i)}}return{args:n,fields:r}}function hse(e,t={}){let n=Ase(e);return n?gse(n,t):{args:{},fields:{}}}function J4t(e){let{inner:t}=wje(e),n=t;return ol(n,"ZodArray","array")&&(n=Bje(n)??n),ol(n,"ZodNumber","number")?"number":ol(n,"ZodBoolean","boolean")?"boolean":ol(n,"ZodEnum","enum")?"enum":ol(n,"ZodString","string")?"string":"other"}function Z4t(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 W4t(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 _se(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 X4t(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 e3t(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Ese(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>e3t(n,s))}function t3t(e,t,n){return e.resource==="threads"&&t==="id"?X4t(n):n}function Oje(e){let t=Z4t(Mz,e.path),n=Ase(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=gse(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=hse(t.query),u=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:hse(t.body);for(let h of Object.keys(u.args))if(s.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let l={...i.args,...s.args,...u.args},p=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:p},args:l,async run({args:h,data:y}){$.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??rn)())throw new Be("not logged in \u2014 run 'lore login' first");let v={};for(let ae of r){let se=h[ae],Ee=_se(se,i.fields[ae])??se;v[ae]=t3t(e,ae,Ee)}let R={};for(let[ae,se]of Object.entries(s.fields)){let Ee=_se(h[ae],se);Ee!==void 0&&(R[ae]=Ee)}let x={};for(let[ae,se]of Object.entries(u.fields)){let Ee=_se(h[ae],se);Ee!==void 0&&(x[ae]=Ee)}let O=[...Ese(t.pathParams,v,"path"),...Ese(t.query,R,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Ese(t.body,x,"body")];if(O.length>0)throw new Be(`Invalid request for \`lore ${e.resource} ${e.op}\`:
668
668
  ${O.join(`