@tanagram/lore 0.1.161 → 0.1.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +3 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
3
- var ZYe=Object.create;var pM=Object.defineProperty;var WYe=Object.getOwnPropertyDescriptor;var XYe=Object.getOwnPropertyNames;var eKe=Object.getPrototypeOf,tKe=Object.prototype.hasOwnProperty;var Fe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},$a=(e,t)=>{for(var n in t)pM(e,n,{get:t[n],enumerable:!0})},ude=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of XYe(t))!tKe.call(e,o)&&o!==n&&pM(e,o,{get:()=>t[o],enumerable:!(r=WYe(t,o))||r.enumerable});return e};var ae=(e,t,n)=>(n=e!=null?ZYe(eKe(e)):{},ude(t||!e||!e.__esModule?pM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>ude(pM({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.161"}}catch{}})()});var dg,H$=O(()=>{A();dg="1.9.1"});function nKe(e){let t=new Set([e]),n=new Set,r=e.match(dde);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(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(dde);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(l):i(l):o.minor<=h.minor?a(l):i(l)}}var dde,pde,fde=O(()=>{A();H$();dde=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;pde=nKe(dg)});function Am(e,t,n,r=!1){var o;let i=sB[aB]=(o=sB[aB])!==null&&o!==void 0?o:{version:dg};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==dg){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${dg}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${dg}.`),!0}function Dl(e){var t,n;let r=(t=sB[aB])===null||t===void 0?void 0:t.version;if(!(!r||!pde(r)))return(n=sB[aB])===null||n===void 0?void 0:n[e]}function gm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${dg}.`);let n=sB[aB];n&&delete n[e]}var rKe,aB,sB,Ny=O(()=>{A();H$();fde();rKe=dg.split(".")[0],aB=Symbol.for(`opentelemetry.js.api.${rKe}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function uB(e,t,n){let r=Dl("diag");if(r)return r[e](t,...n)}var fM,mde=O(()=>{A();Ny();fM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return uB("debug",this._namespace,t)}error(...t){return uB("error",this._namespace,t)}info(...t){return uB("info",this._namespace,t)}warn(...t){return uB("warn",this._namespace,t)}verbose(...t){return uB("verbose",this._namespace,t)}}});var ya,mM=O(()=>{A();(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"})(ya||(ya={}))});function Ade(e,t){e<ya.NONE?e=ya.NONE:e>ya.ALL&&(e=ya.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",ya.ERROR),warn:n("warn",ya.WARN),info:n("info",ya.INFO),debug:n("debug",ya.DEBUG),verbose:n("verbose",ya.VERBOSE)}}var gde=O(()=>{A();mM()});var oKe,qa,Oy=O(()=>{A();mde();gde();mM();Ny();oKe="diag",qa=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Dl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:ya.INFO})=>{var a,c,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((a=y.stack)!==null&&a!==void 0?a:y.message),!1}typeof i=="number"&&(i={logLevel:i});let f=Dl("diag"),h=Ade((c=i.logLevel)!==null&&c!==void 0?c:ya.INFO,o);if(f&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Am("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{gm(oKe,n)},n.createComponentLogger=o=>new fM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var AM,hde=O(()=>{A();AM=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 _de,Ede=O(()=>{A();_de=Symbol("BaggageEntryMetadata")});function yde(e={}){return new AM(new Map(Object.entries(e)))}function Sde(e){return typeof e!="string"&&(iKe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:_de,toString(){return e}}}var iKe,$$=O(()=>{A();Oy();hde();Ede();iKe=qa.instance()});function Bl(e){return Symbol.for(e)}var q$,Xb,cB=O(()=>{A();q$=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}}},Xb=new q$});var V$,Y$,gM,Tde=O(()=>{A();V$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Y$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(Y$[t]=console[t])}gM=class{constructor(){function t(n){return function(...r){let o=Y$[n];if(typeof o!="function"&&(o=Y$.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<V$.length;n++)this[V$[n].n]=t(V$[n].c)}}});function Ide(){return r9}var K$,eC,J$,Z$,W$,X$,lB,e9,t9,n9,r9,aKe,sKe,uKe,cKe,lKe,dKe,pKe,o9=O(()=>{A();K$=class{constructor(){}createGauge(t,n){return sKe}createHistogram(t,n){return uKe}createCounter(t,n){return aKe}createUpDownCounter(t,n){return cKe}createObservableGauge(t,n){return dKe}createObservableCounter(t,n){return lKe}createObservableUpDownCounter(t,n){return pKe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},eC=class{},J$=class extends eC{add(t,n){}},Z$=class extends eC{add(t,n){}},W$=class extends eC{record(t,n){}},X$=class extends eC{record(t,n){}},lB=class{addCallback(t){}removeCallback(t){}},e9=class extends lB{},t9=class extends lB{},n9=class extends lB{},r9=new K$,aKe=new J$,sKe=new W$,uKe=new X$,cKe=new Z$,lKe=new e9,dKe=new t9,pKe=new n9});var hM,bde=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(hM||(hM={}))});var _M,EM,i9=O(()=>{A();_M={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},EM={set(e,t,n){e!=null&&(e[t]=n)}}});var yM,Cde=O(()=>{A();cB();yM=class{active(){return Xb}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var a9,fKe,hm,dB=O(()=>{A();Cde();Ny();Oy();a9="context",fKe=new yM,hm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Am(a9,t,qa.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 Dl(a9)||fKe}disable(){this._getContextManager().disable(),gm(a9,qa.instance())}}});var Js,s9=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Js||(Js={}))});var pB,ky,SM,TM=O(()=>{A();s9();pB="0000000000000000",ky="00000000000000000000000000000000",SM={traceId:ky,spanId:pB,traceFlags:Js.NONE}});var _m,IM=O(()=>{A();TM();_m=class{constructor(t=SM){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 bM(e){return e.getValue(u9)||void 0}function vde(){return bM(hm.getInstance().active())}function fB(e,t){return e.setValue(u9,t)}function Rde(e){return e.deleteValue(u9)}function xde(e,t){return fB(e,new _m(t))}function CM(e){var t;return(t=bM(e))===null||t===void 0?void 0:t.spanContext()}var u9,c9=O(()=>{A();cB();IM();dB();u9=Bl("OpenTelemetry Context Key SPAN")});function Dde(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(vM[e.charCodeAt(r)]|0)+(vM[e.charCodeAt(r+1)]|0)+(vM[e.charCodeAt(r+2)]|0)+(vM[e.charCodeAt(r+3)]|0);return n===t}function l9(e){return Dde(e,32)&&e!==ky}function d9(e){return Dde(e,16)&&e!==pB}function pg(e){return l9(e.traceId)&&d9(e.spanId)}function Bde(e){return new _m(e)}var vM,RM=O(()=>{A();TM();IM();vM=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 mKe(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 p9,tC,f9=O(()=>{A();dB();c9();IM();RM();p9=hm.getInstance(),tC=class{startSpan(t,n,r=p9.active()){if(!!n?.root)return new _m;let i=r&&CM(r);return mKe(i)&&pg(i)?new _m(i):new _m}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let l=a??p9.active(),f=this.startSpan(t,i,l),h=fB(l,f);return p9.with(h,c,void 0,f)}}});var AKe,nC,m9=O(()=>{A();f9();AKe=new tC,nC=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):AKe}}});var xM,Nde=O(()=>{A();f9();xM=class{getTracer(t,n,r){return new tC}}});var gKe,wy,A9=O(()=>{A();m9();Nde();gKe=new xM,wy=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new nC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:gKe}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 DM,Ode=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(DM||(DM={}))});var co,kde=O(()=>{A();(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"})(co||(co={}))});var di,wde=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(di||(di={}))});function Pde(e){return EKe.test(e)}function Mde(e){return yKe.test(e)&&!SKe.test(e)}var g9,hKe,_Ke,EKe,yKe,SKe,Lde=O(()=>{A();g9="[_0-9a-z-*/]",hKe=`[a-z]${g9}{0,255}`,_Ke=`[a-z0-9]${g9}{0,240}@[a-z]${g9}{0,13}`,EKe=new RegExp(`^(?:${hKe}|${_Ke})$`),yKe=/^[ -~]{0,255}[!-~]$/,SKe=/,|=/});var Ude,TKe,Qde,Fde,BM,Gde=O(()=>{A();Lde();Ude=32,TKe=512,Qde=",",Fde="=",BM=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+Fde+this.get(n)),t),[]).join(Qde)}_parse(t){t.length>TKe||(this._internalState=t.split(Qde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Fde);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Pde(a)&&Mde(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Ude&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ude))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function zde(e){return new BM(e)}var jde=O(()=>{A();Gde()});var Ke,Hde=O(()=>{A();dB();Ke=hm.getInstance()});var Nl,$de=O(()=>{A();Oy();Nl=qa.instance()});var h9,qde,Vde=O(()=>{A();o9();h9=class{getMeter(t,n,r){return r9}},qde=new h9});var _9,NM,Yde=O(()=>{A();Vde();Ny();Oy();_9="metrics",NM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Am(_9,t,qa.instance())}getMeterProvider(){return Dl(_9)||qde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){gm(_9,qa.instance())}}});var E9,Kde=O(()=>{A();Yde();E9=NM.getInstance()});var OM,Jde=O(()=>{A();OM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function S9(e){return e.getValue(y9)||void 0}function Zde(){return S9(hm.getInstance().active())}function Wde(e,t){return e.setValue(y9,t)}function Xde(e){return e.deleteValue(y9)}var y9,epe=O(()=>{A();dB();cB();y9=Bl("OpenTelemetry Baggage Key")});var T9,IKe,kM,tpe=O(()=>{A();Ny();Jde();i9();epe();$$();Oy();T9="propagation",IKe=new OM,kM=class e{constructor(){this.createBaggage=yde,this.getBaggage=S9,this.getActiveBaggage=Zde,this.setBaggage=Wde,this.deleteBaggage=Xde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Am(T9,t,qa.instance())}inject(t,n,r=EM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=_M){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){gm(T9,qa.instance())}_getGlobalPropagator(){return Dl(T9)||IKe}}});var tf,npe=O(()=>{A();tpe();tf=kM.getInstance()});var I9,wM,rpe=O(()=>{A();Ny();A9();RM();c9();Oy();I9="trace",wM=class e{constructor(){this._proxyTracerProvider=new wy,this.wrapSpanContext=Bde,this.isSpanContextValid=pg,this.deleteSpan=Rde,this.getSpan=bM,this.getActiveSpan=vde,this.getSpanContext=CM,this.setSpan=fB,this.setSpanContext=xde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Am(I9,this._proxyTracerProvider,qa.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Dl(I9)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){gm(I9,qa.instance()),this._proxyTracerProvider=new wy}}});var $t,ope=O(()=>{A();rpe();$t=wM.getInstance()});var We={};$a(We,{DiagConsoleLogger:()=>gM,DiagLogLevel:()=>ya,INVALID_SPANID:()=>pB,INVALID_SPAN_CONTEXT:()=>SM,INVALID_TRACEID:()=>ky,ProxyTracer:()=>nC,ProxyTracerProvider:()=>wy,ROOT_CONTEXT:()=>Xb,SamplingDecision:()=>DM,SpanKind:()=>co,SpanStatusCode:()=>di,TraceFlags:()=>Js,ValueType:()=>hM,baggageEntryMetadataFromString:()=>Sde,context:()=>Ke,createContextKey:()=>Bl,createNoopMeter:()=>Ide,createTraceState:()=>zde,default:()=>bKe,defaultTextMapGetter:()=>_M,defaultTextMapSetter:()=>EM,diag:()=>Nl,isSpanContextValid:()=>pg,isValidSpanId:()=>d9,isValidTraceId:()=>l9,metrics:()=>E9,propagation:()=>tf,trace:()=>$t});var bKe,ze=O(()=>{A();$$();cB();Tde();mM();o9();bde();i9();m9();A9();Ode();kde();wde();s9();jde();RM();TM();Hde();$de();Kde();npe();ope();bKe={context:Ke,diag:Nl,metrics:E9,propagation:tf,trace:$t}});var mB=F(l_=>{"use strict";A();Object.defineProperty(l_,"__esModule",{value:!0});l_.isTracingSuppressed=l_.unsuppressTracing=l_.suppressTracing=void 0;var CKe=(ze(),Me(We)),b9=(0,CKe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function vKe(e){return e.setValue(b9,!0)}l_.suppressTracing=vKe;function RKe(e){return e.deleteValue(b9)}l_.unsuppressTracing=RKe;function xKe(e){return e.getValue(b9)===!0}l_.isTracingSuppressed=xKe});var C9=F(Zs=>{"use strict";A();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.BAGGAGE_MAX_TOTAL_LENGTH=Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Zs.BAGGAGE_HEADER=Zs.BAGGAGE_ITEMS_SEPARATOR=Zs.BAGGAGE_PROPERTIES_SEPARATOR=Zs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Zs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Zs.BAGGAGE_PROPERTIES_SEPARATOR=";";Zs.BAGGAGE_ITEMS_SEPARATOR=",";Zs.BAGGAGE_HEADER="baggage";Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Zs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var R9=F(Pd=>{"use strict";A();Object.defineProperty(Pd,"__esModule",{value:!0});Pd.parseKeyPairsIntoRecord=Pd.parseBaggageHeaderString=Pd.parsePairKeyValue=Pd.getKeyPairs=Pd.serializeKeyPairs=void 0;var DKe=(ze(),Me(We)),Em=C9();function BKe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Em.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Em.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Pd.serializeKeyPairs=BKe;function NKe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Em.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Pd.getKeyPairs=NKe;function v9(e){if(!e)return;let t=e.indexOf(Em.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Em.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,DKe.baggageEntryMetadataFromString)(f)}return{key:a,value:c,metadata:l}}Pd.parsePairKeyValue=v9;function OKe(e,t,n,r){let o=0;for(;o<e.length&&n<Em.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Em.BAGGAGE_ITEMS_SEPARATOR,o),a=i===-1?e.length:i,c=a-o;if(c<=Em.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=v9(e.substring(o,a));if(l){let f=(n===0?0:1)+c;if(r+f>Em.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}Pd.parseBaggageHeaderString=OKe;function kKe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Em.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=v9(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Pd.parseKeyPairsIntoRecord=kKe});var ipe=F(MM=>{"use strict";A();Object.defineProperty(MM,"__esModule",{value:!0});MM.W3CBaggagePropagator=void 0;var x9=(ze(),Me(We)),wKe=mB(),AB=C9(),PM=R9(),D9=class{inject(t,n,r){let o=x9.propagation.getBaggage(t);if(!o||(0,wKe.isTracingSuppressed)(t))return;let i=(0,PM.getKeyPairs)(o).filter(c=>c.length<=AB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,AB.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,PM.serializeKeyPairs)(i);a.length>0&&r.set(n,AB.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,AB.BAGGAGE_HEADER);if(!o)return t;let i={},a=0,c=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[a,c]=(0,PM.parseBaggageHeaderString)(o[l],i,a,c);else[a]=(0,PM.parseBaggageHeaderString)(o,i,a,c);return a===0?t:x9.propagation.setBaggage(t,x9.propagation.createBaggage(i))}fields(){return[AB.BAGGAGE_HEADER]}};MM.W3CBaggagePropagator=D9});var ape=F(LM=>{"use strict";A();Object.defineProperty(LM,"__esModule",{value:!0});LM.AnchoredClock=void 0;var B9=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}};LM.AnchoredClock=B9});var dpe=F(d_=>{"use strict";A();Object.defineProperty(d_,"__esModule",{value:!0});d_.isAttributeValue=d_.isAttributeKey=d_.sanitizeAttributes=void 0;var spe=(ze(),Me(We));function PKe(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(!upe(n)){spe.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!cpe(r)){spe.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}d_.sanitizeAttributes=PKe;function upe(e){return typeof e=="string"&&e!==""}d_.isAttributeKey=upe;function cpe(e){return e==null?!0:Array.isArray(e)?MKe(e):lpe(typeof e)}d_.isAttributeValue=cpe;function MKe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(lpe(r)){t=r;continue}return!1}return!1}}return!0}function lpe(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var N9=F(UM=>{"use strict";A();Object.defineProperty(UM,"__esModule",{value:!0});UM.loggingErrorHandler=void 0;var LKe=(ze(),Me(We));function UKe(){return e=>{LKe.diag.error(QKe(e))}}UM.loggingErrorHandler=UKe;function QKe(e){return typeof e=="string"?e:JSON.stringify(FKe(e))}function FKe(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 fpe=F(rC=>{"use strict";A();Object.defineProperty(rC,"__esModule",{value:!0});rC.globalErrorHandler=rC.setGlobalErrorHandler=void 0;var GKe=N9(),ppe=(0,GKe.loggingErrorHandler)();function zKe(e){ppe=e}rC.setGlobalErrorHandler=zKe;function jKe(e){try{ppe(e)}catch{}}rC.globalErrorHandler=jKe});var hpe=F(ym=>{"use strict";A();Object.defineProperty(ym,"__esModule",{value:!0});ym.getStringListFromEnv=ym.getBooleanFromEnv=ym.getStringFromEnv=ym.getNumberFromEnv=void 0;var mpe=(ze(),Me(We)),Ape=Fe("util");function HKe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){mpe.diag.warn(`Unknown value ${(0,Ape.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}ym.getNumberFromEnv=HKe;function gpe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}ym.getStringFromEnv=gpe;function $Ke(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||mpe.diag.warn(`Unknown value ${(0,Ape.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}ym.getBooleanFromEnv=$Ke;function qKe(e){return gpe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}ym.getStringListFromEnv=qKe});var _pe=F(QM=>{"use strict";A();Object.defineProperty(QM,"__esModule",{value:!0});QM._globalThis=void 0;QM._globalThis=globalThis});var Epe=F(FM=>{"use strict";A();Object.defineProperty(FM,"__esModule",{value:!0});FM.VERSION=void 0;FM.VERSION="2.8.0"});function Ni(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 O9=O(()=>{A()});var ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,kpe,wpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,kfe,wfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,kme,wme,Pme,Mme,Lme,Ume,Qme,VKe,k9,YKe,KKe,JKe,ZKe,w9,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,mJe,AJe,P9,gJe,hJe,_Je,EJe,yJe,SJe,TJe,IJe,bJe,CJe,vJe,RJe,M9,xJe,DJe,L9,U9,BJe,NJe,OJe,kJe,wJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,zJe,jJe,HJe,$Je,qJe,gB,oC,Q9,VJe,YJe,Py,KJe,JJe,ZJe,WJe,F9,G9,XJe,z9,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,mZe,AZe,gZe,hZe,_Ze,EZe,yZe,SZe,TZe,j9,IZe,bZe,CZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,kZe,wZe,PZe,MZe,LZe,UZe,QZe,FZe,GZe,H9,zZe,$9,jZe,HZe,$Ze,qZe,VZe,YZe,KZe,JZe,ZZe,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,mWe,AWe,gWe,hWe,_We,EWe,yWe,SWe,TWe,IWe,bWe,CWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,kWe,wWe,PWe,MWe,LWe,UWe,QWe,FWe,GWe,zWe,jWe,HWe,$We,kAe,wAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,zAe,jAe,qWe,VWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,HAe,$Ae,qAe,VAe,YAe,oXe,iXe,aXe,sXe,uXe,cXe,KAe,JAe,ZAe,lXe,dXe,pXe,fXe,WAe,XAe,ege,tge,mXe,AXe,gXe,hXe,_Xe,nge,rge,oge,ige,age,sge,uge,EXe,yXe,SXe,TXe,IXe,bXe,CXe,vXe,cge,lge,dge,pge,fge,RXe,xXe,DXe,BXe,NXe,OXe,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,Oge,kge,wge,kXe,wXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,zXe,jXe,HXe,$Xe,qXe,VXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,Pge,Mge,Lge,Uge,Qge,tet,net,ret,oet,iet,aet,Fge,Gge,set,uet,cet,zge,jge,det,pet,fet,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,met,Aet,get,het,_et,Eet,yet,Tet,Iet,bet,Cet,vet,Ret,xet,Det,Bet,Net,Oet,she,uhe,ket,wet,Pet,che=O(()=>{A();O9();ype="aws.lambda.invoked_arn",Spe="db.system",Tpe="db.connection_string",Ipe="db.user",bpe="db.jdbc.driver_classname",Cpe="db.name",vpe="db.statement",Rpe="db.operation",xpe="db.mssql.instance_name",Dpe="db.cassandra.keyspace",Bpe="db.cassandra.page_size",Npe="db.cassandra.consistency_level",Ope="db.cassandra.table",kpe="db.cassandra.idempotence",wpe="db.cassandra.speculative_execution_count",Ppe="db.cassandra.coordinator.id",Mpe="db.cassandra.coordinator.dc",Lpe="db.hbase.namespace",Upe="db.redis.database_index",Qpe="db.mongodb.collection",Fpe="db.sql.table",Gpe="exception.type",zpe="exception.message",jpe="exception.stacktrace",Hpe="exception.escaped",$pe="faas.trigger",qpe="faas.execution",Vpe="faas.document.collection",Ype="faas.document.operation",Kpe="faas.document.time",Jpe="faas.document.name",Zpe="faas.time",Wpe="faas.cron",Xpe="faas.coldstart",efe="faas.invoked_name",tfe="faas.invoked_provider",nfe="faas.invoked_region",rfe="net.transport",ofe="net.peer.ip",ife="net.peer.port",afe="net.peer.name",sfe="net.host.ip",ufe="net.host.port",cfe="net.host.name",lfe="net.host.connection.type",dfe="net.host.connection.subtype",pfe="net.host.carrier.name",ffe="net.host.carrier.mcc",mfe="net.host.carrier.mnc",Afe="net.host.carrier.icc",gfe="peer.service",hfe="enduser.id",_fe="enduser.role",Efe="enduser.scope",yfe="thread.id",Sfe="thread.name",Tfe="code.function",Ife="code.namespace",bfe="code.filepath",Cfe="code.lineno",vfe="http.method",Rfe="http.url",xfe="http.target",Dfe="http.host",Bfe="http.scheme",Nfe="http.status_code",Ofe="http.flavor",kfe="http.user_agent",wfe="http.request_content_length",Pfe="http.request_content_length_uncompressed",Mfe="http.response_content_length",Lfe="http.response_content_length_uncompressed",Ufe="http.server_name",Qfe="http.route",Ffe="http.client_ip",Gfe="aws.dynamodb.table_names",zfe="aws.dynamodb.consumed_capacity",jfe="aws.dynamodb.item_collection_metrics",Hfe="aws.dynamodb.provisioned_read_capacity",$fe="aws.dynamodb.provisioned_write_capacity",qfe="aws.dynamodb.consistent_read",Vfe="aws.dynamodb.projection",Yfe="aws.dynamodb.limit",Kfe="aws.dynamodb.attributes_to_get",Jfe="aws.dynamodb.index_name",Zfe="aws.dynamodb.select",Wfe="aws.dynamodb.global_secondary_indexes",Xfe="aws.dynamodb.local_secondary_indexes",eme="aws.dynamodb.exclusive_start_table",tme="aws.dynamodb.table_count",nme="aws.dynamodb.scan_forward",rme="aws.dynamodb.segment",ome="aws.dynamodb.total_segments",ime="aws.dynamodb.count",ame="aws.dynamodb.scanned_count",sme="aws.dynamodb.attribute_definitions",ume="aws.dynamodb.global_secondary_index_updates",cme="messaging.system",lme="messaging.destination",dme="messaging.destination_kind",pme="messaging.temp_destination",fme="messaging.protocol",mme="messaging.protocol_version",Ame="messaging.url",gme="messaging.message_id",hme="messaging.conversation_id",_me="messaging.message_payload_size_bytes",Eme="messaging.message_payload_compressed_size_bytes",yme="messaging.operation",Sme="messaging.consumer_id",Tme="messaging.rabbitmq.routing_key",Ime="messaging.kafka.message_key",bme="messaging.kafka.consumer_group",Cme="messaging.kafka.client_id",vme="messaging.kafka.partition",Rme="messaging.kafka.tombstone",xme="rpc.system",Dme="rpc.service",Bme="rpc.method",Nme="rpc.grpc.status_code",Ome="rpc.jsonrpc.version",kme="rpc.jsonrpc.request_id",wme="rpc.jsonrpc.error_code",Pme="rpc.jsonrpc.error_message",Mme="message.type",Lme="message.id",Ume="message.compressed_size",Qme="message.uncompressed_size",VKe=ype,k9=Spe,YKe=Tpe,KKe=Ipe,JKe=bpe,ZKe=Cpe,w9=vpe,WKe=Rpe,XKe=xpe,eJe=Dpe,tJe=Bpe,nJe=Npe,rJe=Ope,oJe=kpe,iJe=wpe,aJe=Ppe,sJe=Mpe,uJe=Lpe,cJe=Upe,lJe=Qpe,dJe=Fpe,pJe=Gpe,fJe=zpe,mJe=jpe,AJe=Hpe,P9=$pe,gJe=qpe,hJe=Vpe,_Je=Ype,EJe=Kpe,yJe=Jpe,SJe=Zpe,TJe=Wpe,IJe=Xpe,bJe=efe,CJe=tfe,vJe=nfe,RJe=rfe,M9=ofe,xJe=ife,DJe=afe,L9=sfe,U9=ufe,BJe=cfe,NJe=lfe,OJe=dfe,kJe=pfe,wJe=ffe,PJe=mfe,MJe=Afe,LJe=gfe,UJe=hfe,QJe=_fe,FJe=Efe,GJe=yfe,zJe=Sfe,jJe=Tfe,HJe=Ife,$Je=bfe,qJe=Cfe,gB=vfe,oC=Rfe,Q9=xfe,VJe=Dfe,YJe=Bfe,Py=Nfe,KJe=Ofe,JJe=kfe,ZJe=wfe,WJe=Pfe,F9=Mfe,G9=Lfe,XJe=Ufe,z9=Qfe,eZe=Ffe,tZe=Gfe,nZe=zfe,rZe=jfe,oZe=Hfe,iZe=$fe,aZe=qfe,sZe=Vfe,uZe=Yfe,cZe=Kfe,lZe=Jfe,dZe=Zfe,pZe=Wfe,fZe=Xfe,mZe=eme,AZe=tme,gZe=nme,hZe=rme,_Ze=ome,EZe=ime,yZe=ame,SZe=sme,TZe=ume,j9=cme,IZe=lme,bZe=dme,CZe=pme,vZe=fme,RZe=mme,xZe=Ame,DZe=gme,BZe=hme,NZe=_me,OZe=Eme,kZe=yme,wZe=Sme,PZe=Tme,MZe=Ime,LZe=bme,UZe=Cme,QZe=vme,FZe=Rme,GZe=xme,H9=Dme,zZe=Bme,$9=Nme,jZe=Ome,HZe=kme,$Ze=wme,qZe=Pme,VZe=Mme,YZe=Lme,KZe=Ume,JZe=Qme,ZZe=Ni([ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,kpe,wpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,kfe,wfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,kme,wme,Pme,Mme,Lme,Ume,Qme]),Fme="other_sql",Gme="mssql",zme="mysql",jme="oracle",Hme="db2",$me="postgresql",qme="redshift",Vme="hive",Yme="cloudscape",Kme="hsqldb",Jme="progress",Zme="maxdb",Wme="hanadb",Xme="ingres",eAe="firstsql",tAe="edb",nAe="cache",rAe="adabas",oAe="firebird",iAe="derby",aAe="filemaker",sAe="informix",uAe="instantdb",cAe="interbase",lAe="mariadb",dAe="netezza",pAe="pervasive",fAe="pointbase",mAe="sqlite",AAe="sybase",gAe="teradata",hAe="vertica",_Ae="h2",EAe="coldfusion",yAe="cassandra",SAe="hbase",TAe="mongodb",IAe="redis",bAe="couchbase",CAe="couchdb",vAe="cosmosdb",RAe="dynamodb",xAe="neo4j",DAe="geode",BAe="elasticsearch",NAe="memcached",OAe="cockroachdb",WZe=Fme,XZe=Gme,eWe=zme,tWe=jme,nWe=Hme,rWe=$me,oWe=qme,iWe=Vme,aWe=Yme,sWe=Kme,uWe=Jme,cWe=Zme,lWe=Wme,dWe=Xme,pWe=eAe,fWe=tAe,mWe=nAe,AWe=rAe,gWe=oAe,hWe=iAe,_We=aAe,EWe=sAe,yWe=uAe,SWe=cAe,TWe=lAe,IWe=dAe,bWe=pAe,CWe=fAe,vWe=mAe,RWe=AAe,xWe=gAe,DWe=hAe,BWe=_Ae,NWe=EAe,OWe=yAe,kWe=SAe,wWe=TAe,PWe=IAe,MWe=bAe,LWe=CAe,UWe=vAe,QWe=RAe,FWe=xAe,GWe=DAe,zWe=BAe,jWe=NAe,HWe=OAe,$We=Ni([Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe]),kAe="all",wAe="each_quorum",PAe="quorum",MAe="local_quorum",LAe="one",UAe="two",QAe="three",FAe="local_one",GAe="any",zAe="serial",jAe="local_serial",qWe=kAe,VWe=wAe,YWe=PAe,KWe=MAe,JWe=LAe,ZWe=UAe,WWe=QAe,XWe=FAe,eXe=GAe,tXe=zAe,nXe=jAe,rXe=Ni([kAe,wAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,zAe,jAe]),HAe="datasource",$Ae="http",qAe="pubsub",VAe="timer",YAe="other",oXe=HAe,iXe=$Ae,aXe=qAe,sXe=VAe,uXe=YAe,cXe=Ni([HAe,$Ae,qAe,VAe,YAe]),KAe="insert",JAe="edit",ZAe="delete",lXe=KAe,dXe=JAe,pXe=ZAe,fXe=Ni([KAe,JAe,ZAe]),WAe="alibaba_cloud",XAe="aws",ege="azure",tge="gcp",mXe=WAe,AXe=XAe,gXe=ege,hXe=tge,_Xe=Ni([WAe,XAe,ege,tge]),nge="ip_tcp",rge="ip_udp",oge="ip",ige="unix",age="pipe",sge="inproc",uge="other",EXe=nge,yXe=rge,SXe=oge,TXe=ige,IXe=age,bXe=sge,CXe=uge,vXe=Ni([nge,rge,oge,ige,age,sge,uge]),cge="wifi",lge="wired",dge="cell",pge="unavailable",fge="unknown",RXe=cge,xXe=lge,DXe=dge,BXe=pge,NXe=fge,OXe=Ni([cge,lge,dge,pge,fge]),mge="gprs",Age="edge",gge="umts",hge="cdma",_ge="evdo_0",Ege="evdo_a",yge="cdma2000_1xrtt",Sge="hsdpa",Tge="hsupa",Ige="hspa",bge="iden",Cge="evdo_b",vge="lte",Rge="ehrpd",xge="hspap",Dge="gsm",Bge="td_scdma",Nge="iwlan",Oge="nr",kge="nrnsa",wge="lte_ca",kXe=mge,wXe=Age,PXe=gge,MXe=hge,LXe=_ge,UXe=Ege,QXe=yge,FXe=Sge,GXe=Tge,zXe=Ige,jXe=bge,HXe=Cge,$Xe=vge,qXe=Rge,VXe=xge,YXe=Dge,KXe=Bge,JXe=Nge,ZXe=Oge,WXe=kge,XXe=wge,eet=Ni([mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,Oge,kge,wge]),Pge="1.0",Mge="1.1",Lge="2.0",Uge="SPDY",Qge="QUIC",tet=Pge,net=Mge,ret=Lge,oet=Uge,iet=Qge,aet={HTTP_1_0:Pge,HTTP_1_1:Mge,HTTP_2_0:Lge,SPDY:Uge,QUIC:Qge},Fge="queue",Gge="topic",set=Fge,uet=Gge,cet=Ni([Fge,Gge]),zge="receive",jge="process",det=zge,pet=jge,fet=Ni([zge,jge]),Hge=0,$ge=1,qge=2,Vge=3,Yge=4,Kge=5,Jge=6,Zge=7,Wge=8,Xge=9,ehe=10,the=11,nhe=12,rhe=13,ohe=14,ihe=15,ahe=16,met=Hge,Aet=$ge,get=qge,het=Vge,_et=Yge,Eet=Kge,yet=Jge,Tet=Zge,Iet=Wge,bet=Xge,Cet=ehe,vet=the,Ret=nhe,xet=rhe,Det=ohe,Bet=ihe,Net=ahe,Oet={OK:Hge,CANCELLED:$ge,UNKNOWN:qge,INVALID_ARGUMENT:Vge,DEADLINE_EXCEEDED:Yge,NOT_FOUND:Kge,ALREADY_EXISTS:Jge,PERMISSION_DENIED:Zge,RESOURCE_EXHAUSTED:Wge,FAILED_PRECONDITION:Xge,ABORTED:ehe,OUT_OF_RANGE:the,UNIMPLEMENTED:nhe,INTERNAL:rhe,UNAVAILABLE:ohe,DATA_LOSS:ihe,UNAUTHENTICATED:ahe},she="SENT",uhe="RECEIVED",ket=she,wet=uhe,Pet=Ni([she,uhe])});var lhe=O(()=>{A();che()});var dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,khe,whe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,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,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,k_e,w_e,P_e,M_e,L_e,Met,Let,Uet,Qet,Fet,Get,zet,jet,Het,$et,qet,Vet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,mtt,Att,gtt,htt,_tt,Ett,ytt,Stt,Ttt,Itt,btt,Ctt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,ktt,wtt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,ztt,jtt,Htt,$tt,qtt,Vtt,Ytt,Ktt,Jtt,Ztt,Wtt,q9,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,U_e,Q_e,F_e,G_e,cnt,lnt,dnt,pnt,fnt,z_e,j_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,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,Int,bnt,Cnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,iEe,aEe,Ont,knt,wnt,sEe,uEe,cEe,lEe,dEe,pEe,fEe,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,znt,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,IEe,bEe,jnt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,CEe,vEe,REe,xEe,DEe,BEe,NEe,OEe,kEe,wEe,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,PEe=O(()=>{A();O9();dhe="cloud.provider",phe="cloud.account.id",fhe="cloud.region",mhe="cloud.availability_zone",Ahe="cloud.platform",ghe="aws.ecs.container.arn",hhe="aws.ecs.cluster.arn",_he="aws.ecs.launchtype",Ehe="aws.ecs.task.arn",yhe="aws.ecs.task.family",She="aws.ecs.task.revision",The="aws.eks.cluster.arn",Ihe="aws.log.group.names",bhe="aws.log.group.arns",Che="aws.log.stream.names",vhe="aws.log.stream.arns",Rhe="container.name",xhe="container.id",Dhe="container.runtime",Bhe="container.image.name",Nhe="container.image.tag",Ohe="deployment.environment",khe="device.id",whe="device.model.identifier",Phe="device.model.name",Mhe="faas.name",Lhe="faas.id",Uhe="faas.version",Qhe="faas.instance",Fhe="faas.max_memory",Ghe="host.id",zhe="host.name",jhe="host.type",Hhe="host.arch",$he="host.image.name",qhe="host.image.id",Vhe="host.image.version",Yhe="k8s.cluster.name",Khe="k8s.node.name",Jhe="k8s.node.uid",Zhe="k8s.namespace.name",Whe="k8s.pod.uid",Xhe="k8s.pod.name",e_e="k8s.container.name",t_e="k8s.replicaset.uid",n_e="k8s.replicaset.name",r_e="k8s.deployment.uid",o_e="k8s.deployment.name",i_e="k8s.statefulset.uid",a_e="k8s.statefulset.name",s_e="k8s.daemonset.uid",u_e="k8s.daemonset.name",c_e="k8s.job.uid",l_e="k8s.job.name",d_e="k8s.cronjob.uid",p_e="k8s.cronjob.name",f_e="os.type",m_e="os.description",A_e="os.name",g_e="os.version",h_e="process.pid",__e="process.executable.name",E_e="process.executable.path",y_e="process.command",S_e="process.command_line",T_e="process.command_args",I_e="process.owner",b_e="process.runtime.name",C_e="process.runtime.version",v_e="process.runtime.description",R_e="service.name",x_e="service.namespace",D_e="service.instance.id",B_e="service.version",N_e="telemetry.sdk.name",O_e="telemetry.sdk.language",k_e="telemetry.sdk.version",w_e="telemetry.auto.version",P_e="webengine.name",M_e="webengine.version",L_e="webengine.description",Met=dhe,Let=phe,Uet=fhe,Qet=mhe,Fet=Ahe,Get=ghe,zet=hhe,jet=_he,Het=Ehe,$et=yhe,qet=She,Vet=The,Yet=Ihe,Ket=bhe,Jet=Che,Zet=vhe,Wet=Rhe,Xet=xhe,ett=Dhe,ttt=Bhe,ntt=Nhe,rtt=Ohe,ott=khe,itt=whe,att=Phe,stt=Mhe,utt=Lhe,ctt=Uhe,ltt=Qhe,dtt=Fhe,ptt=Ghe,ftt=zhe,mtt=jhe,Att=Hhe,gtt=$he,htt=qhe,_tt=Vhe,Ett=Yhe,ytt=Khe,Stt=Jhe,Ttt=Zhe,Itt=Whe,btt=Xhe,Ctt=e_e,vtt=t_e,Rtt=n_e,xtt=r_e,Dtt=o_e,Btt=i_e,Ntt=a_e,Ott=s_e,ktt=u_e,wtt=c_e,Ptt=l_e,Mtt=d_e,Ltt=p_e,Utt=f_e,Qtt=m_e,Ftt=A_e,Gtt=g_e,ztt=h_e,jtt=__e,Htt=E_e,$tt=y_e,qtt=S_e,Vtt=T_e,Ytt=I_e,Ktt=b_e,Jtt=C_e,Ztt=v_e,Wtt=R_e,q9=x_e,Xtt=D_e,ent=B_e,tnt=N_e,nnt=O_e,rnt=k_e,ont=w_e,int=P_e,ant=M_e,snt=L_e,unt=Ni([dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,khe,whe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,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,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,k_e,w_e,P_e,M_e,L_e]),U_e="alibaba_cloud",Q_e="aws",F_e="azure",G_e="gcp",cnt=U_e,lnt=Q_e,dnt=F_e,pnt=G_e,fnt=Ni([U_e,Q_e,F_e,G_e]),z_e="alibaba_cloud_ecs",j_e="alibaba_cloud_fc",H_e="aws_ec2",$_e="aws_ecs",q_e="aws_eks",V_e="aws_lambda",Y_e="aws_elastic_beanstalk",K_e="azure_vm",J_e="azure_container_instances",Z_e="azure_aks",W_e="azure_functions",X_e="azure_app_service",eEe="gcp_compute_engine",tEe="gcp_cloud_run",nEe="gcp_kubernetes_engine",rEe="gcp_cloud_functions",oEe="gcp_app_engine",mnt=z_e,Ant=j_e,gnt=H_e,hnt=$_e,_nt=q_e,Ent=V_e,ynt=Y_e,Snt=K_e,Tnt=J_e,Int=Z_e,bnt=W_e,Cnt=X_e,vnt=eEe,Rnt=tEe,xnt=nEe,Dnt=rEe,Bnt=oEe,Nnt=Ni([z_e,j_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="ec2",aEe="fargate",Ont=iEe,knt=aEe,wnt=Ni([iEe,aEe]),sEe="amd64",uEe="arm32",cEe="arm64",lEe="ia64",dEe="ppc32",pEe="ppc64",fEe="x86",Pnt=sEe,Mnt=uEe,Lnt=cEe,Unt=lEe,Qnt=dEe,Fnt=pEe,Gnt=fEe,znt=Ni([sEe,uEe,cEe,lEe,dEe,pEe,fEe]),mEe="windows",AEe="linux",gEe="darwin",hEe="freebsd",_Ee="netbsd",EEe="openbsd",yEe="dragonflybsd",SEe="hpux",TEe="aix",IEe="solaris",bEe="z_os",jnt=mEe,Hnt=AEe,$nt=gEe,qnt=hEe,Vnt=_Ee,Ynt=EEe,Knt=yEe,Jnt=SEe,Znt=TEe,Wnt=IEe,Xnt=bEe,ert=Ni([mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,IEe,bEe]),CEe="cpp",vEe="dotnet",REe="erlang",xEe="go",DEe="java",BEe="nodejs",NEe="php",OEe="python",kEe="ruby",wEe="webjs",trt=CEe,nrt=vEe,rrt=REe,ort=xEe,irt=DEe,art=BEe,srt=NEe,urt=OEe,crt=kEe,lrt=wEe,drt=Ni([CEe,vEe,REe,xEe,DEe,BEe,NEe,OEe,kEe,wEe])});var MEe=O(()=>{A();PEe()});var prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,Irt,brt,Crt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,krt,wrt,Prt,Mrt,V9,Y9,Lrt,iC,Urt,K9,J9,Qrt,My,Frt,Grt,zrt,jrt,Hrt,$rt,qrt,Vrt,dYt,pYt,Z9,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,Ly,eot,tot,not,fYt,rot,oot,iot,aot,mYt,sot,uot,cot,lot,fg,mg,dot,pot,fot,mot,Aot,got,hot,_ot,Eot,AYt,yot,Sot,Tot,Iot,bot,Cot,W9,X9,vot,e5,t5,Rot,xot,gYt,hYt,Dot,Bot,Not,Oot,kot,wot,Pot,Mot,_Yt,Lot,n5,r5,Uot,o5,Qot,i5,Fot,Got,zot,jot,Hot,$ot,qot,Vot,Yot,EYt,Kot,Jot,yYt,Zot,Wot,SYt,Xot,eit,tit,nit,rit,oit,iit,ait,p_,sit,uit,cit,a5,LEe=O(()=>{A();prt="aspnetcore.diagnostics.exception.result",frt="aborted",mrt="handled",Art="skipped",grt="unhandled",hrt="aspnetcore.diagnostics.handler.type",_rt="aspnetcore.rate_limiting.policy",Ert="aspnetcore.rate_limiting.result",yrt="acquired",Srt="endpoint_limiter",Trt="global_limiter",Irt="request_canceled",brt="aspnetcore.request.is_unhandled",Crt="aspnetcore.routing.is_fallback",vrt="aspnetcore.routing.match_status",Rrt="failure",xrt="success",Drt="aspnetcore.user.is_authenticated",Brt="client.address",Nrt="client.port",Ort="code.column.number",krt="code.file.path",wrt="code.function.name",Prt="code.line.number",Mrt="code.stacktrace",V9="db.collection.name",Y9="db.namespace",Lrt="db.operation.batch.size",iC="db.operation.name",Urt="db.query.summary",K9="db.query.text",J9="db.response.status_code",Qrt="db.stored_procedure.name",My="db.system.name",Frt="mariadb",Grt="microsoft.sql_server",zrt="mysql",jrt="postgresql",Hrt="dotnet.gc.heap.generation",$rt="gen0",qrt="gen1",Vrt="gen2",dYt="loh",pYt="poh",Z9="error.type",Yrt="_OTHER",Krt="exception.escaped",Jrt="exception.message",Zrt="exception.stacktrace",Wrt="exception.type",Xrt=e=>`http.request.header.${e}`,Ly="http.request.method",eot="_OTHER",tot="CONNECT",not="DELETE",fYt="GET",rot="HEAD",oot="OPTIONS",iot="PATCH",aot="POST",mYt="PUT",sot="TRACE",uot="http.request.method_original",cot="http.request.resend_count",lot=e=>`http.response.header.${e}`,fg="http.response.status_code",mg="http.route",dot="jvm.gc.action",pot="jvm.gc.name",fot="jvm.memory.pool.name",mot="jvm.memory.type",Aot="heap",got="non_heap",hot="jvm.thread.daemon",_ot="jvm.thread.state",Eot="blocked",AYt="new",yot="runnable",Sot="terminated",Tot="timed_waiting",Iot="waiting",bot="network.local.address",Cot="network.local.port",W9="network.peer.address",X9="network.peer.port",vot="network.protocol.name",e5="network.protocol.version",t5="network.transport",Rot="pipe",xot="quic",gYt="tcp",hYt="udp",Dot="unix",Bot="network.type",Not="ipv4",Oot="ipv6",kot="otel.scope.name",wot="otel.scope.version",Pot="otel.status_code",Mot="ERROR",_Yt="OK",Lot="otel.status_description",n5="server.address",r5="server.port",Uot="service.instance.id",o5="service.name",Qot="service.namespace",i5="service.version",Fot="signalr.connection.status",Got="app_shutdown",zot="normal_closure",jot="timeout",Hot="signalr.transport",$ot="long_polling",qot="server_sent_events",Vot="web_sockets",Yot="telemetry.sdk.language",EYt="cpp",Kot="dotnet",Jot="erlang",yYt="go",Zot="java",Wot="nodejs",SYt="php",Xot="python",eit="ruby",tit="rust",nit="swift",rit="webjs",oit="telemetry.sdk.name",iit="telemetry.sdk.version",ait="url.fragment",p_="url.full",sit="url.path",uit="url.query",cit="url.scheme",a5="user_agent.original"});var lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,Iit,bit,Cit,vit,Rit,xit,Dit,Bit,Nit,Oit,kit,wit,Pit,Mit,Lit,Uit,Qit,Fit,Git,zit,jit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,eat,tat,nat,rat,oat,iat,aat,UEe=O(()=>{A();lit="aspnetcore.diagnostics.exceptions",dit="aspnetcore.rate_limiting.active_request_leases",pit="aspnetcore.rate_limiting.queued_requests",fit="aspnetcore.rate_limiting.request.time_in_queue",mit="aspnetcore.rate_limiting.request_lease.duration",Ait="aspnetcore.rate_limiting.requests",git="aspnetcore.routing.match_attempts",hit="db.client.operation.duration",_it="dotnet.assembly.count",Eit="dotnet.exceptions",yit="dotnet.gc.collections",Sit="dotnet.gc.heap.total_allocated",Tit="dotnet.gc.last_collection.heap.fragmentation.size",Iit="dotnet.gc.last_collection.heap.size",bit="dotnet.gc.last_collection.memory.committed_size",Cit="dotnet.gc.pause.time",vit="dotnet.jit.compilation.time",Rit="dotnet.jit.compiled_il.size",xit="dotnet.jit.compiled_methods",Dit="dotnet.monitor.lock_contentions",Bit="dotnet.process.cpu.count",Nit="dotnet.process.cpu.time",Oit="dotnet.process.memory.working_set",kit="dotnet.thread_pool.queue.length",wit="dotnet.thread_pool.thread.count",Pit="dotnet.thread_pool.work_item.count",Mit="dotnet.timer.count",Lit="http.client.request.duration",Uit="http.server.request.duration",Qit="jvm.class.count",Fit="jvm.class.loaded",Git="jvm.class.unloaded",zit="jvm.cpu.count",jit="jvm.cpu.recent_utilization",Hit="jvm.cpu.time",$it="jvm.gc.duration",qit="jvm.memory.committed",Vit="jvm.memory.limit",Yit="jvm.memory.used",Kit="jvm.memory.used_after_last_gc",Jit="jvm.thread.count",Zit="kestrel.active_connections",Wit="kestrel.active_tls_handshakes",Xit="kestrel.connection.duration",eat="kestrel.queued_connections",tat="kestrel.queued_requests",nat="kestrel.rejected_connections",rat="kestrel.tls_handshake.duration",oat="kestrel.upgraded_connections",iat="signalr.server.active_connections",aat="signalr.server.connection.duration"});var sat,QEe=O(()=>{A();sat="exception"});var Fr={};$a(Fr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>frt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>mrt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Art,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>grt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>yrt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Srt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Trt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Irt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Rrt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>xrt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>prt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>hrt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>_rt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ert,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>brt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Crt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>vrt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Drt,ATTR_CLIENT_ADDRESS:()=>Brt,ATTR_CLIENT_PORT:()=>Nrt,ATTR_CODE_COLUMN_NUMBER:()=>Ort,ATTR_CODE_FILE_PATH:()=>krt,ATTR_CODE_FUNCTION_NAME:()=>wrt,ATTR_CODE_LINE_NUMBER:()=>Prt,ATTR_CODE_STACKTRACE:()=>Mrt,ATTR_DB_COLLECTION_NAME:()=>V9,ATTR_DB_NAMESPACE:()=>Y9,ATTR_DB_OPERATION_BATCH_SIZE:()=>Lrt,ATTR_DB_OPERATION_NAME:()=>iC,ATTR_DB_QUERY_SUMMARY:()=>Urt,ATTR_DB_QUERY_TEXT:()=>K9,ATTR_DB_RESPONSE_STATUS_CODE:()=>J9,ATTR_DB_STORED_PROCEDURE_NAME:()=>Qrt,ATTR_DB_SYSTEM_NAME:()=>My,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Hrt,ATTR_ERROR_TYPE:()=>Z9,ATTR_EXCEPTION_ESCAPED:()=>Krt,ATTR_EXCEPTION_MESSAGE:()=>Jrt,ATTR_EXCEPTION_STACKTRACE:()=>Zrt,ATTR_EXCEPTION_TYPE:()=>Wrt,ATTR_HTTP_REQUEST_HEADER:()=>Xrt,ATTR_HTTP_REQUEST_METHOD:()=>Ly,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>uot,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>cot,ATTR_HTTP_RESPONSE_HEADER:()=>lot,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>fg,ATTR_HTTP_ROUTE:()=>mg,ATTR_JVM_GC_ACTION:()=>dot,ATTR_JVM_GC_NAME:()=>pot,ATTR_JVM_MEMORY_POOL_NAME:()=>fot,ATTR_JVM_MEMORY_TYPE:()=>mot,ATTR_JVM_THREAD_DAEMON:()=>hot,ATTR_JVM_THREAD_STATE:()=>_ot,ATTR_NETWORK_LOCAL_ADDRESS:()=>bot,ATTR_NETWORK_LOCAL_PORT:()=>Cot,ATTR_NETWORK_PEER_ADDRESS:()=>W9,ATTR_NETWORK_PEER_PORT:()=>X9,ATTR_NETWORK_PROTOCOL_NAME:()=>vot,ATTR_NETWORK_PROTOCOL_VERSION:()=>e5,ATTR_NETWORK_TRANSPORT:()=>t5,ATTR_NETWORK_TYPE:()=>Bot,ATTR_OTEL_SCOPE_NAME:()=>kot,ATTR_OTEL_SCOPE_VERSION:()=>wot,ATTR_OTEL_STATUS_CODE:()=>Pot,ATTR_OTEL_STATUS_DESCRIPTION:()=>Lot,ATTR_SERVER_ADDRESS:()=>n5,ATTR_SERVER_PORT:()=>r5,ATTR_SERVICE_INSTANCE_ID:()=>Uot,ATTR_SERVICE_NAME:()=>o5,ATTR_SERVICE_NAMESPACE:()=>Qot,ATTR_SERVICE_VERSION:()=>i5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Fot,ATTR_SIGNALR_TRANSPORT:()=>Hot,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Yot,ATTR_TELEMETRY_SDK_NAME:()=>oit,ATTR_TELEMETRY_SDK_VERSION:()=>iit,ATTR_URL_FRAGMENT:()=>ait,ATTR_URL_FULL:()=>p_,ATTR_URL_PATH:()=>sit,ATTR_URL_QUERY:()=>uit,ATTR_URL_SCHEME:()=>cit,ATTR_USER_AGENT_ORIGINAL:()=>a5,AWSECSLAUNCHTYPEVALUES_EC2:()=>Ont,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>knt,AwsEcsLaunchtypeValues:()=>wnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>mnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Ant,CLOUDPLATFORMVALUES_AWS_EC2:()=>gnt,CLOUDPLATFORMVALUES_AWS_ECS:()=>hnt,CLOUDPLATFORMVALUES_AWS_EKS:()=>_nt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>ynt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Ent,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Int,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Cnt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Tnt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>bnt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Snt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Bnt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Dnt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Rnt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>vnt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>xnt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>cnt,CLOUDPROVIDERVALUES_AWS:()=>lnt,CLOUDPROVIDERVALUES_AZURE:()=>dnt,CLOUDPROVIDERVALUES_GCP:()=>pnt,CloudPlatformValues:()=>Nnt,CloudProviderValues:()=>fnt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>qWe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>eXe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>VWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>XWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>KWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>nXe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>JWe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>YWe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>tXe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>WWe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>ZWe,DBSYSTEMVALUES_ADABAS:()=>AWe,DBSYSTEMVALUES_CACHE:()=>mWe,DBSYSTEMVALUES_CASSANDRA:()=>OWe,DBSYSTEMVALUES_CLOUDSCAPE:()=>aWe,DBSYSTEMVALUES_COCKROACHDB:()=>HWe,DBSYSTEMVALUES_COLDFUSION:()=>NWe,DBSYSTEMVALUES_COSMOSDB:()=>UWe,DBSYSTEMVALUES_COUCHBASE:()=>MWe,DBSYSTEMVALUES_COUCHDB:()=>LWe,DBSYSTEMVALUES_DB2:()=>nWe,DBSYSTEMVALUES_DERBY:()=>hWe,DBSYSTEMVALUES_DYNAMODB:()=>QWe,DBSYSTEMVALUES_EDB:()=>fWe,DBSYSTEMVALUES_ELASTICSEARCH:()=>zWe,DBSYSTEMVALUES_FILEMAKER:()=>_We,DBSYSTEMVALUES_FIREBIRD:()=>gWe,DBSYSTEMVALUES_FIRSTSQL:()=>pWe,DBSYSTEMVALUES_GEODE:()=>GWe,DBSYSTEMVALUES_H2:()=>BWe,DBSYSTEMVALUES_HANADB:()=>lWe,DBSYSTEMVALUES_HBASE:()=>kWe,DBSYSTEMVALUES_HIVE:()=>iWe,DBSYSTEMVALUES_HSQLDB:()=>sWe,DBSYSTEMVALUES_INFORMIX:()=>EWe,DBSYSTEMVALUES_INGRES:()=>dWe,DBSYSTEMVALUES_INSTANTDB:()=>yWe,DBSYSTEMVALUES_INTERBASE:()=>SWe,DBSYSTEMVALUES_MARIADB:()=>TWe,DBSYSTEMVALUES_MAXDB:()=>cWe,DBSYSTEMVALUES_MEMCACHED:()=>jWe,DBSYSTEMVALUES_MONGODB:()=>wWe,DBSYSTEMVALUES_MSSQL:()=>XZe,DBSYSTEMVALUES_MYSQL:()=>eWe,DBSYSTEMVALUES_NEO4J:()=>FWe,DBSYSTEMVALUES_NETEZZA:()=>IWe,DBSYSTEMVALUES_ORACLE:()=>tWe,DBSYSTEMVALUES_OTHER_SQL:()=>WZe,DBSYSTEMVALUES_PERVASIVE:()=>bWe,DBSYSTEMVALUES_POINTBASE:()=>CWe,DBSYSTEMVALUES_POSTGRESQL:()=>rWe,DBSYSTEMVALUES_PROGRESS:()=>uWe,DBSYSTEMVALUES_REDIS:()=>PWe,DBSYSTEMVALUES_REDSHIFT:()=>oWe,DBSYSTEMVALUES_SQLITE:()=>vWe,DBSYSTEMVALUES_SYBASE:()=>RWe,DBSYSTEMVALUES_TERADATA:()=>xWe,DBSYSTEMVALUES_VERTICA:()=>DWe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Frt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Grt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>zrt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>jrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>$rt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>qrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Vrt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>dYt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>pYt,DbCassandraConsistencyLevelValues:()=>rXe,DbSystemValues:()=>$We,ERROR_TYPE_VALUE_OTHER:()=>Yrt,EVENT_EXCEPTION:()=>sat,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>pXe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>dXe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>lXe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>mXe,FAASINVOKEDPROVIDERVALUES_AWS:()=>AXe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>gXe,FAASINVOKEDPROVIDERVALUES_GCP:()=>hXe,FAASTRIGGERVALUES_DATASOURCE:()=>oXe,FAASTRIGGERVALUES_HTTP:()=>iXe,FAASTRIGGERVALUES_OTHER:()=>uXe,FAASTRIGGERVALUES_PUBSUB:()=>aXe,FAASTRIGGERVALUES_TIMER:()=>sXe,FaasDocumentOperationValues:()=>fXe,FaasInvokedProviderValues:()=>_Xe,FaasTriggerValues:()=>cXe,HOSTARCHVALUES_AMD64:()=>Pnt,HOSTARCHVALUES_ARM32:()=>Mnt,HOSTARCHVALUES_ARM64:()=>Lnt,HOSTARCHVALUES_IA64:()=>Unt,HOSTARCHVALUES_PPC32:()=>Qnt,HOSTARCHVALUES_PPC64:()=>Fnt,HOSTARCHVALUES_X86:()=>Gnt,HTTPFLAVORVALUES_HTTP_1_0:()=>tet,HTTPFLAVORVALUES_HTTP_1_1:()=>net,HTTPFLAVORVALUES_HTTP_2_0:()=>ret,HTTPFLAVORVALUES_QUIC:()=>iet,HTTPFLAVORVALUES_SPDY:()=>oet,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>tot,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>not,HTTP_REQUEST_METHOD_VALUE_GET:()=>fYt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>rot,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>oot,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>eot,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>iot,HTTP_REQUEST_METHOD_VALUE_POST:()=>aot,HTTP_REQUEST_METHOD_VALUE_PUT:()=>mYt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>sot,HostArchValues:()=>znt,HttpFlavorValues:()=>aet,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Aot,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>got,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Eot,JVM_THREAD_STATE_VALUE_NEW:()=>AYt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>yot,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Sot,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Tot,JVM_THREAD_STATE_VALUE_WAITING:()=>Iot,MESSAGETYPEVALUES_RECEIVED:()=>wet,MESSAGETYPEVALUES_SENT:()=>ket,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>set,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>uet,MESSAGINGOPERATIONVALUES_PROCESS:()=>pet,MESSAGINGOPERATIONVALUES_RECEIVE:()=>det,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>lit,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>dit,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>pit,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ait,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>mit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>fit,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>git,METRIC_DB_CLIENT_OPERATION_DURATION:()=>hit,METRIC_DOTNET_ASSEMBLY_COUNT:()=>_it,METRIC_DOTNET_EXCEPTIONS:()=>Eit,METRIC_DOTNET_GC_COLLECTIONS:()=>yit,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Sit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Tit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Iit,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>bit,METRIC_DOTNET_GC_PAUSE_TIME:()=>Cit,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>vit,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Rit,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>xit,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Dit,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Bit,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Nit,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Oit,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>kit,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>wit,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Pit,METRIC_DOTNET_TIMER_COUNT:()=>Mit,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Lit,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Uit,METRIC_JVM_CLASS_COUNT:()=>Qit,METRIC_JVM_CLASS_LOADED:()=>Fit,METRIC_JVM_CLASS_UNLOADED:()=>Git,METRIC_JVM_CPU_COUNT:()=>zit,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>jit,METRIC_JVM_CPU_TIME:()=>Hit,METRIC_JVM_GC_DURATION:()=>$it,METRIC_JVM_MEMORY_COMMITTED:()=>qit,METRIC_JVM_MEMORY_LIMIT:()=>Vit,METRIC_JVM_MEMORY_USED:()=>Yit,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Kit,METRIC_JVM_THREAD_COUNT:()=>Jit,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Zit,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Wit,METRIC_KESTREL_CONNECTION_DURATION:()=>Xit,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>eat,METRIC_KESTREL_QUEUED_REQUESTS:()=>tat,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>nat,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>rat,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>oat,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>iat,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>aat,MessageTypeValues:()=>Pet,MessagingDestinationKindValues:()=>cet,MessagingOperationValues:()=>fet,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>MXe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>QXe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>wXe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>qXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>LXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>UXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>HXe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>kXe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>YXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>FXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>zXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>VXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>GXe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>jXe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>JXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>$Xe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>XXe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>ZXe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>WXe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>KXe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>PXe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>DXe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>BXe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>NXe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>RXe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>xXe,NETTRANSPORTVALUES_INPROC:()=>bXe,NETTRANSPORTVALUES_IP:()=>SXe,NETTRANSPORTVALUES_IP_TCP:()=>EXe,NETTRANSPORTVALUES_IP_UDP:()=>yXe,NETTRANSPORTVALUES_OTHER:()=>CXe,NETTRANSPORTVALUES_PIPE:()=>IXe,NETTRANSPORTVALUES_UNIX:()=>TXe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Rot,NETWORK_TRANSPORT_VALUE_QUIC:()=>xot,NETWORK_TRANSPORT_VALUE_TCP:()=>gYt,NETWORK_TRANSPORT_VALUE_UDP:()=>hYt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Dot,NETWORK_TYPE_VALUE_IPV4:()=>Not,NETWORK_TYPE_VALUE_IPV6:()=>Oot,NetHostConnectionSubtypeValues:()=>eet,NetHostConnectionTypeValues:()=>OXe,NetTransportValues:()=>vXe,OSTYPEVALUES_AIX:()=>Znt,OSTYPEVALUES_DARWIN:()=>$nt,OSTYPEVALUES_DRAGONFLYBSD:()=>Knt,OSTYPEVALUES_FREEBSD:()=>qnt,OSTYPEVALUES_HPUX:()=>Jnt,OSTYPEVALUES_LINUX:()=>Hnt,OSTYPEVALUES_NETBSD:()=>Vnt,OSTYPEVALUES_OPENBSD:()=>Ynt,OSTYPEVALUES_SOLARIS:()=>Wnt,OSTYPEVALUES_WINDOWS:()=>jnt,OSTYPEVALUES_Z_OS:()=>Xnt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Mot,OTEL_STATUS_CODE_VALUE_OK:()=>_Yt,OsTypeValues:()=>ert,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Cet,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>yet,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Aet,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Bet,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>_et,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>bet,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>xet,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>het,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Eet,RPCGRPCSTATUSCODEVALUES_OK:()=>met,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>vet,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Tet,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Iet,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Net,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Det,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Ret,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>get,RpcGrpcStatusCodeValues:()=>Oet,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>cZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>SZe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>aZe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>nZe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>EZe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>mZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>pZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>TZe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>lZe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>rZe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>uZe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>fZe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>sZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>oZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>iZe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>yZe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>gZe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>hZe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>dZe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>AZe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>tZe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>_Ze,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>VKe,SEMATTRS_CODE_FILEPATH:()=>$Je,SEMATTRS_CODE_FUNCTION:()=>jJe,SEMATTRS_CODE_LINENO:()=>qJe,SEMATTRS_CODE_NAMESPACE:()=>HJe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>nJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>sJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>aJe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>oJe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>eJe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>tJe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>iJe,SEMATTRS_DB_CASSANDRA_TABLE:()=>rJe,SEMATTRS_DB_CONNECTION_STRING:()=>YKe,SEMATTRS_DB_HBASE_NAMESPACE:()=>uJe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>JKe,SEMATTRS_DB_MONGODB_COLLECTION:()=>lJe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>XKe,SEMATTRS_DB_NAME:()=>ZKe,SEMATTRS_DB_OPERATION:()=>WKe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>cJe,SEMATTRS_DB_SQL_TABLE:()=>dJe,SEMATTRS_DB_STATEMENT:()=>w9,SEMATTRS_DB_SYSTEM:()=>k9,SEMATTRS_DB_USER:()=>KKe,SEMATTRS_ENDUSER_ID:()=>UJe,SEMATTRS_ENDUSER_ROLE:()=>QJe,SEMATTRS_ENDUSER_SCOPE:()=>FJe,SEMATTRS_EXCEPTION_ESCAPED:()=>AJe,SEMATTRS_EXCEPTION_MESSAGE:()=>fJe,SEMATTRS_EXCEPTION_STACKTRACE:()=>mJe,SEMATTRS_EXCEPTION_TYPE:()=>pJe,SEMATTRS_FAAS_COLDSTART:()=>IJe,SEMATTRS_FAAS_CRON:()=>TJe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>hJe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>yJe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>_Je,SEMATTRS_FAAS_DOCUMENT_TIME:()=>EJe,SEMATTRS_FAAS_EXECUTION:()=>gJe,SEMATTRS_FAAS_INVOKED_NAME:()=>bJe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>CJe,SEMATTRS_FAAS_INVOKED_REGION:()=>vJe,SEMATTRS_FAAS_TIME:()=>SJe,SEMATTRS_FAAS_TRIGGER:()=>P9,SEMATTRS_HTTP_CLIENT_IP:()=>eZe,SEMATTRS_HTTP_FLAVOR:()=>KJe,SEMATTRS_HTTP_HOST:()=>VJe,SEMATTRS_HTTP_METHOD:()=>gB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>ZJe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>WJe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>F9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>G9,SEMATTRS_HTTP_ROUTE:()=>z9,SEMATTRS_HTTP_SCHEME:()=>YJe,SEMATTRS_HTTP_SERVER_NAME:()=>XJe,SEMATTRS_HTTP_STATUS_CODE:()=>Py,SEMATTRS_HTTP_TARGET:()=>Q9,SEMATTRS_HTTP_URL:()=>oC,SEMATTRS_HTTP_USER_AGENT:()=>JJe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>KZe,SEMATTRS_MESSAGE_ID:()=>YZe,SEMATTRS_MESSAGE_TYPE:()=>VZe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>JZe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>wZe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>BZe,SEMATTRS_MESSAGING_DESTINATION:()=>IZe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>bZe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>UZe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>LZe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>MZe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>QZe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>FZe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>DZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>OZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>NZe,SEMATTRS_MESSAGING_OPERATION:()=>kZe,SEMATTRS_MESSAGING_PROTOCOL:()=>vZe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>RZe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>PZe,SEMATTRS_MESSAGING_SYSTEM:()=>j9,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>CZe,SEMATTRS_MESSAGING_URL:()=>xZe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>MJe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>wJe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>PJe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>kJe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>OJe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>NJe,SEMATTRS_NET_HOST_IP:()=>L9,SEMATTRS_NET_HOST_NAME:()=>BJe,SEMATTRS_NET_HOST_PORT:()=>U9,SEMATTRS_NET_PEER_IP:()=>M9,SEMATTRS_NET_PEER_NAME:()=>DJe,SEMATTRS_NET_PEER_PORT:()=>xJe,SEMATTRS_NET_TRANSPORT:()=>RJe,SEMATTRS_PEER_SERVICE:()=>LJe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>$9,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>$Ze,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>qZe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>HZe,SEMATTRS_RPC_JSONRPC_VERSION:()=>jZe,SEMATTRS_RPC_METHOD:()=>zZe,SEMATTRS_RPC_SERVICE:()=>H9,SEMATTRS_RPC_SYSTEM:()=>GZe,SEMATTRS_THREAD_ID:()=>GJe,SEMATTRS_THREAD_NAME:()=>zJe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>zet,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Get,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>jet,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Het,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>$et,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>qet,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Vet,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Ket,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Yet,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Zet,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Jet,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Let,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Qet,SEMRESATTRS_CLOUD_PLATFORM:()=>Fet,SEMRESATTRS_CLOUD_PROVIDER:()=>Met,SEMRESATTRS_CLOUD_REGION:()=>Uet,SEMRESATTRS_CONTAINER_ID:()=>Xet,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>ttt,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>ntt,SEMRESATTRS_CONTAINER_NAME:()=>Wet,SEMRESATTRS_CONTAINER_RUNTIME:()=>ett,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>rtt,SEMRESATTRS_DEVICE_ID:()=>ott,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>itt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>att,SEMRESATTRS_FAAS_ID:()=>utt,SEMRESATTRS_FAAS_INSTANCE:()=>ltt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>dtt,SEMRESATTRS_FAAS_NAME:()=>stt,SEMRESATTRS_FAAS_VERSION:()=>ctt,SEMRESATTRS_HOST_ARCH:()=>Att,SEMRESATTRS_HOST_ID:()=>ptt,SEMRESATTRS_HOST_IMAGE_ID:()=>htt,SEMRESATTRS_HOST_IMAGE_NAME:()=>gtt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>_tt,SEMRESATTRS_HOST_NAME:()=>ftt,SEMRESATTRS_HOST_TYPE:()=>mtt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Ett,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Ctt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Ltt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Mtt,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>ktt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Ott,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Dtt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>xtt,SEMRESATTRS_K8S_JOB_NAME:()=>Ptt,SEMRESATTRS_K8S_JOB_UID:()=>wtt,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Ttt,SEMRESATTRS_K8S_NODE_NAME:()=>ytt,SEMRESATTRS_K8S_NODE_UID:()=>Stt,SEMRESATTRS_K8S_POD_NAME:()=>btt,SEMRESATTRS_K8S_POD_UID:()=>Itt,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Rtt,SEMRESATTRS_K8S_REPLICASET_UID:()=>vtt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Ntt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Btt,SEMRESATTRS_OS_DESCRIPTION:()=>Qtt,SEMRESATTRS_OS_NAME:()=>Ftt,SEMRESATTRS_OS_TYPE:()=>Utt,SEMRESATTRS_OS_VERSION:()=>Gtt,SEMRESATTRS_PROCESS_COMMAND:()=>$tt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Vtt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>qtt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>jtt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Htt,SEMRESATTRS_PROCESS_OWNER:()=>Ytt,SEMRESATTRS_PROCESS_PID:()=>ztt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Ztt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Ktt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Jtt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Xtt,SEMRESATTRS_SERVICE_NAME:()=>Wtt,SEMRESATTRS_SERVICE_NAMESPACE:()=>q9,SEMRESATTRS_SERVICE_VERSION:()=>ent,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>ont,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>nnt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>tnt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>rnt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>snt,SEMRESATTRS_WEBENGINE_NAME:()=>int,SEMRESATTRS_WEBENGINE_VERSION:()=>ant,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Got,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>zot,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>jot,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>$ot,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>qot,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Vot,SemanticAttributes:()=>ZZe,SemanticResourceAttributes:()=>unt,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>trt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>nrt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>rrt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ort,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>irt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>art,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>srt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>urt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>crt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>EYt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Kot,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Jot,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>yYt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Zot,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Wot,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>SYt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Xot,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>eit,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>tit,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>nit,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>rit,TelemetrySdkLanguageValues:()=>drt});var Wn=O(()=>{A();lhe();MEe();LEe();UEe();QEe()});var FEe=F(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.ATTR_PROCESS_RUNTIME_NAME=void 0;GM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var GEe=F(jM=>{"use strict";A();Object.defineProperty(jM,"__esModule",{value:!0});jM.SDK_INFO=void 0;var uat=Epe(),zM=(Wn(),Me(Fr)),cat=FEe();jM.SDK_INFO={[zM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[cat.ATTR_PROCESS_RUNTIME_NAME]:"node",[zM.ATTR_TELEMETRY_SDK_LANGUAGE]:zM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[zM.ATTR_TELEMETRY_SDK_VERSION]:uat.VERSION}});var zEe=F(Ws=>{"use strict";A();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.otperformance=Ws.SDK_INFO=Ws._globalThis=Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getBooleanFromEnv=Ws.getStringFromEnv=void 0;var HM=hpe();Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return HM.getStringFromEnv}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return HM.getBooleanFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return HM.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return HM.getStringListFromEnv}});var lat=_pe();Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return lat._globalThis}});var dat=GEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return dat.SDK_INFO}});Ws.otperformance=performance});var s5=F(Xs=>{"use strict";A();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.getStringListFromEnv=Xs.getNumberFromEnv=Xs.getStringFromEnv=Xs.getBooleanFromEnv=Xs.otperformance=Xs._globalThis=Xs.SDK_INFO=void 0;var Uy=zEe();Object.defineProperty(Xs,"SDK_INFO",{enumerable:!0,get:function(){return Uy.SDK_INFO}});Object.defineProperty(Xs,"_globalThis",{enumerable:!0,get:function(){return Uy._globalThis}});Object.defineProperty(Xs,"otperformance",{enumerable:!0,get:function(){return Uy.otperformance}});Object.defineProperty(Xs,"getBooleanFromEnv",{enumerable:!0,get:function(){return Uy.getBooleanFromEnv}});Object.defineProperty(Xs,"getStringFromEnv",{enumerable:!0,get:function(){return Uy.getStringFromEnv}});Object.defineProperty(Xs,"getNumberFromEnv",{enumerable:!0,get:function(){return Uy.getNumberFromEnv}});Object.defineProperty(Xs,"getStringListFromEnv",{enumerable:!0,get:function(){return Uy.getStringListFromEnv}})});var qEe=F(Gr=>{"use strict";A();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.addHrTimes=Gr.isTimeInput=Gr.isTimeInputHrTime=Gr.hrTimeToSeconds=Gr.hrTimeToMilliseconds=Gr.hrTimeToMicroseconds=Gr.hrTimeToNanoseconds=Gr.hrTimeToTimeStamp=Gr.hrTimeDuration=Gr.timeInputToHrTime=Gr.hrTime=Gr.getTimeOrigin=Gr.millisToHrTime=void 0;var $M=s5(),jEe=9,pat=6,fat=Math.pow(10,pat),hB=Math.pow(10,jEe);function _B(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*fat);return[n,r]}Gr.millisToHrTime=_B;function mat(){return $M.otperformance.timeOrigin}Gr.getTimeOrigin=mat;function HEe(e){let t=_B($M.otperformance.timeOrigin),n=_B(typeof e=="number"?e:$M.otperformance.now());return $Ee(t,n)}Gr.hrTime=HEe;function Aat(e){if(u5(e))return e;if(typeof e=="number")return e<$M.otperformance.timeOrigin?HEe(e):_B(e);if(e instanceof Date)return _B(e.getTime());throw TypeError("Invalid input type")}Gr.timeInputToHrTime=Aat;function gat(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=hB),[n,r]}Gr.hrTimeDuration=gat;function hat(e){let t=jEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Gr.hrTimeToTimeStamp=hat;function _at(e){return e[0]*hB+e[1]}Gr.hrTimeToNanoseconds=_at;function Eat(e){return e[0]*1e6+e[1]/1e3}Gr.hrTimeToMicroseconds=Eat;function yat(e){return e[0]*1e3+e[1]/1e6}Gr.hrTimeToMilliseconds=yat;function Sat(e){return e[0]+e[1]/hB}Gr.hrTimeToSeconds=Sat;function u5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Gr.isTimeInputHrTime=u5;function Tat(e){return u5(e)||typeof e=="number"||e instanceof Date}Gr.isTimeInput=Tat;function $Ee(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=hB&&(n[1]-=hB,n[0]+=1),n}Gr.addHrTimes=$Ee});var VEe=F(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.unrefTimer=void 0;function Iat(e){typeof e!="number"&&e.unref()}qM.unrefTimer=Iat});var YEe=F(EB=>{"use strict";A();Object.defineProperty(EB,"__esModule",{value:!0});EB.ExportResultCode=void 0;var bat;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(bat=EB.ExportResultCode||(EB.ExportResultCode={}))});var JEe=F(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.CompositePropagator=void 0;var KEe=(ze(),Me(We)),c5=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){KEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){KEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};VM.CompositePropagator=c5});var ZEe=F(aC=>{"use strict";A();Object.defineProperty(aC,"__esModule",{value:!0});aC.validateValue=aC.validateKey=void 0;var l5="[_0-9a-z-*/]",Cat=`[a-z]${l5}{0,255}`,vat=`[a-z0-9]${l5}{0,240}@[a-z]${l5}{0,13}`,Rat=new RegExp(`^(?:${Cat}|${vat})$`),xat=/^[ -~]{0,255}[!-~]$/,Dat=/,|=/;function Bat(e){return Rat.test(e)}aC.validateKey=Bat;function Nat(e){return xat.test(e)&&!Dat.test(e)}aC.validateValue=Nat});var p5=F(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM.TraceState=void 0;var YM=ZEe(),Oat=32,WEe=512,XEe=",",e0e="=",d5=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,YM.validateKey)(t)||!(0,YM.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>WEe)return this;let a=new Map(r);return a.delete(t),a.set(t,n),this._fromState(a,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=XEe+t),t=`${r[0]}${e0e}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(XEe),n=new Map,r=0;for(let o of t){let i=o.trim(),a=i.indexOf(e0e);if(a===-1)continue;let c=i.slice(0,a),l=i.slice(a+1);if(!(0,YM.validateKey)(c)||!(0,YM.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>WEe)&&(n.set(c,l),r=f,n.size>=Oat))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}};KM.TraceState=d5});var n0e=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var JM=(ze(),Me(We)),kat=mB(),wat=p5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Pat="00",Mat="(?!ff)[\\da-f]{2}",Lat="(?![0]{32})[\\da-f]{32}",Uat="(?![0]{16})[\\da-f]{16}",Qat="[\\da-f]{2}",Fat=new RegExp(`^\\s?(${Mat})-(${Lat})-(${Uat})-(${Qat})(-.*)?\\s?$`);function t0e(e){let t=Fat.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=t0e;var f5=class{inject(t,n,r){let o=JM.trace.getSpanContext(t);if(!o||(0,kat.isTracingSuppressed)(t)||!(0,JM.isSpanContextValid)(o))return;let i=`${Pat}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||JM.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=t0e(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let l=Array.isArray(c)?c.join(","):c;a.traceState=new wat.TraceState(typeof l=="string"?l:void 0)}return JM.trace.setSpanContext(t,a)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=f5});var r0e=F(nf=>{"use strict";A();Object.defineProperty(nf,"__esModule",{value:!0});nf.getRPCMetadata=nf.deleteRPCMetadata=nf.setRPCMetadata=nf.RPCType=void 0;var Gat=(ze(),Me(We)),m5=(0,Gat.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),zat;(function(e){e.HTTP="http"})(zat=nf.RPCType||(nf.RPCType={}));function jat(e,t){return e.setValue(m5,t)}nf.setRPCMetadata=jat;function Hat(e){return e.deleteValue(m5)}nf.deleteRPCMetadata=Hat;function $at(e){return e.getValue(m5)}nf.getRPCMetadata=$at});var u0e=F(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.isPlainObject=void 0;var qat="[object Object]",Vat="[object Null]",Yat="[object Undefined]",Kat=Function.prototype,o0e=Kat.toString,Jat=o0e.call(Object),Zat=Object.getPrototypeOf,i0e=Object.prototype,a0e=i0e.hasOwnProperty,Qy=Symbol?Symbol.toStringTag:void 0,s0e=i0e.toString;function Wat(e){if(!Xat(e)||est(e)!==qat)return!1;let t=Zat(e);if(t===null)return!0;let n=a0e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&o0e.call(n)===Jat}ZM.isPlainObject=Wat;function Xat(e){return e!=null&&typeof e=="object"}function est(e){return e==null?e===void 0?Yat:Vat:Qy&&Qy in Object(e)?tst(e):nst(e)}function tst(e){let t=a0e.call(e,Qy),n=e[Qy],r=!1;try{e[Qy]=void 0,r=!0}catch{}let o=s0e.call(e);return r&&(t?e[Qy]=n:delete e[Qy]),o}function nst(e){return s0e.call(e)}});var f0e=F(eL=>{"use strict";A();Object.defineProperty(eL,"__esModule",{value:!0});eL.merge=void 0;var c0e=u0e(),rst=20;function ost(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=d0e(t,e.shift(),0,n);return t}eL.merge=ost;function A5(e){return XM(e)?e.slice():e}function d0e(e,t,n=0,r){let o;if(!(n>rst)){if(n++,WM(e)||WM(t)||p0e(t))o=A5(t);else if(XM(e)){if(o=e.slice(),XM(t))for(let i=0,a=t.length;i<a;i++)o.push(A5(t[i]));else if(yB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let l=i[a];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=A5(t[l]))}}}else if(yB(e))if(yB(t)){if(!ist(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let l=i[a];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(WM(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],y=f;if(l0e(e,l,r)||l0e(t,l,r))delete o[l];else{if(yB(h)&&yB(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:l}),b.push({obj:t,key:l}),r.set(h,S),r.set(y,b)}o[l]=d0e(o[l],f,n,r)}}}}else o=t;return o}}function l0e(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function XM(e){return Array.isArray(e)}function p0e(e){return typeof e=="function"}function yB(e){return!WM(e)&&!XM(e)&&!p0e(e)&&typeof e=="object"}function WM(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function ist(e,t){return!(!(0,c0e.isPlainObject)(e)||!(0,c0e.isPlainObject)(t))}});var m0e=F(sC=>{"use strict";A();Object.defineProperty(sC,"__esModule",{value:!0});sC.callWithTimeout=sC.TimeoutError=void 0;var tL=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};sC.TimeoutError=tL;function ast(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new tL("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}sC.callWithTimeout=ast});var g0e=F(uC=>{"use strict";A();Object.defineProperty(uC,"__esModule",{value:!0});uC.isUrlIgnored=uC.urlMatches=void 0;function A0e(e,t){return typeof t=="string"?e===t:!!e.match(t)}uC.urlMatches=A0e;function sst(e,t){if(!t)return!1;for(let n of t)if(A0e(e,n))return!0;return!1}uC.isUrlIgnored=sst});var h0e=F(nL=>{"use strict";A();Object.defineProperty(nL,"__esModule",{value:!0});nL.Deferred=void 0;var g5=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)}};nL.Deferred=g5});var _0e=F(rL=>{"use strict";A();Object.defineProperty(rL,"__esModule",{value:!0});rL.BindOnceFuture=void 0;var ust=h0e(),h5=class{_isCalled=!1;_deferred=new ust.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}};rL.BindOnceFuture=h5});var y0e=F(oL=>{"use strict";A();Object.defineProperty(oL,"__esModule",{value:!0});oL.diagLogLevelFromString=void 0;var Ag=(ze(),Me(We)),E0e={ALL:Ag.DiagLogLevel.ALL,VERBOSE:Ag.DiagLogLevel.VERBOSE,DEBUG:Ag.DiagLogLevel.DEBUG,INFO:Ag.DiagLogLevel.INFO,WARN:Ag.DiagLogLevel.WARN,ERROR:Ag.DiagLogLevel.ERROR,NONE:Ag.DiagLogLevel.NONE};function cst(e){if(e==null)return;let t=E0e[e.toUpperCase()];return t??(Ag.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(E0e)}, using default`),Ag.DiagLogLevel.INFO)}oL.diagLogLevelFromString=cst});var T0e=F(iL=>{"use strict";A();Object.defineProperty(iL,"__esModule",{value:!0});iL._export=void 0;var S0e=(ze(),Me(We)),lst=mB();function dst(e,t){return new Promise(n=>{S0e.context.with((0,lst.suppressTracing)(S0e.context.active()),()=>{e.export(t,n)})})}iL._export=dst});var br=F(Ne=>{"use strict";A();Object.defineProperty(Ne,"__esModule",{value:!0});Ne.diagLogLevelFromString=Ne.BindOnceFuture=Ne.urlMatches=Ne.isUrlIgnored=Ne.callWithTimeout=Ne.TimeoutError=Ne.merge=Ne.TraceState=Ne.unsuppressTracing=Ne.suppressTracing=Ne.isTracingSuppressed=Ne.setRPCMetadata=Ne.getRPCMetadata=Ne.deleteRPCMetadata=Ne.RPCType=Ne.parseTraceParent=Ne.W3CTraceContextPropagator=Ne.TRACE_STATE_HEADER=Ne.TRACE_PARENT_HEADER=Ne.CompositePropagator=Ne.otperformance=Ne.getStringListFromEnv=Ne.getNumberFromEnv=Ne.getBooleanFromEnv=Ne.getStringFromEnv=Ne._globalThis=Ne.SDK_INFO=Ne.parseKeyPairsIntoRecord=Ne.ExportResultCode=Ne.unrefTimer=Ne.timeInputToHrTime=Ne.millisToHrTime=Ne.isTimeInputHrTime=Ne.isTimeInput=Ne.hrTimeToTimeStamp=Ne.hrTimeToSeconds=Ne.hrTimeToNanoseconds=Ne.hrTimeToMilliseconds=Ne.hrTimeToMicroseconds=Ne.hrTimeDuration=Ne.hrTime=Ne.getTimeOrigin=Ne.addHrTimes=Ne.loggingErrorHandler=Ne.setGlobalErrorHandler=Ne.globalErrorHandler=Ne.sanitizeAttributes=Ne.isAttributeValue=Ne.AnchoredClock=Ne.W3CBaggagePropagator=void 0;Ne.internal=void 0;var pst=ipe();Object.defineProperty(Ne,"W3CBaggagePropagator",{enumerable:!0,get:function(){return pst.W3CBaggagePropagator}});var fst=ape();Object.defineProperty(Ne,"AnchoredClock",{enumerable:!0,get:function(){return fst.AnchoredClock}});var I0e=dpe();Object.defineProperty(Ne,"isAttributeValue",{enumerable:!0,get:function(){return I0e.isAttributeValue}});Object.defineProperty(Ne,"sanitizeAttributes",{enumerable:!0,get:function(){return I0e.sanitizeAttributes}});var b0e=fpe();Object.defineProperty(Ne,"globalErrorHandler",{enumerable:!0,get:function(){return b0e.globalErrorHandler}});Object.defineProperty(Ne,"setGlobalErrorHandler",{enumerable:!0,get:function(){return b0e.setGlobalErrorHandler}});var mst=N9();Object.defineProperty(Ne,"loggingErrorHandler",{enumerable:!0,get:function(){return mst.loggingErrorHandler}});var Ol=qEe();Object.defineProperty(Ne,"addHrTimes",{enumerable:!0,get:function(){return Ol.addHrTimes}});Object.defineProperty(Ne,"getTimeOrigin",{enumerable:!0,get:function(){return Ol.getTimeOrigin}});Object.defineProperty(Ne,"hrTime",{enumerable:!0,get:function(){return Ol.hrTime}});Object.defineProperty(Ne,"hrTimeDuration",{enumerable:!0,get:function(){return Ol.hrTimeDuration}});Object.defineProperty(Ne,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ol.hrTimeToMicroseconds}});Object.defineProperty(Ne,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ol.hrTimeToMilliseconds}});Object.defineProperty(Ne,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ol.hrTimeToNanoseconds}});Object.defineProperty(Ne,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ol.hrTimeToSeconds}});Object.defineProperty(Ne,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ol.hrTimeToTimeStamp}});Object.defineProperty(Ne,"isTimeInput",{enumerable:!0,get:function(){return Ol.isTimeInput}});Object.defineProperty(Ne,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ol.isTimeInputHrTime}});Object.defineProperty(Ne,"millisToHrTime",{enumerable:!0,get:function(){return Ol.millisToHrTime}});Object.defineProperty(Ne,"timeInputToHrTime",{enumerable:!0,get:function(){return Ol.timeInputToHrTime}});var Ast=VEe();Object.defineProperty(Ne,"unrefTimer",{enumerable:!0,get:function(){return Ast.unrefTimer}});var gst=YEe();Object.defineProperty(Ne,"ExportResultCode",{enumerable:!0,get:function(){return gst.ExportResultCode}});var hst=R9();Object.defineProperty(Ne,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return hst.parseKeyPairsIntoRecord}});var Fy=s5();Object.defineProperty(Ne,"SDK_INFO",{enumerable:!0,get:function(){return Fy.SDK_INFO}});Object.defineProperty(Ne,"_globalThis",{enumerable:!0,get:function(){return Fy._globalThis}});Object.defineProperty(Ne,"getStringFromEnv",{enumerable:!0,get:function(){return Fy.getStringFromEnv}});Object.defineProperty(Ne,"getBooleanFromEnv",{enumerable:!0,get:function(){return Fy.getBooleanFromEnv}});Object.defineProperty(Ne,"getNumberFromEnv",{enumerable:!0,get:function(){return Fy.getNumberFromEnv}});Object.defineProperty(Ne,"getStringListFromEnv",{enumerable:!0,get:function(){return Fy.getStringListFromEnv}});Object.defineProperty(Ne,"otperformance",{enumerable:!0,get:function(){return Fy.otperformance}});var _st=JEe();Object.defineProperty(Ne,"CompositePropagator",{enumerable:!0,get:function(){return _st.CompositePropagator}});var aL=n0e();Object.defineProperty(Ne,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return aL.TRACE_PARENT_HEADER}});Object.defineProperty(Ne,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return aL.TRACE_STATE_HEADER}});Object.defineProperty(Ne,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return aL.W3CTraceContextPropagator}});Object.defineProperty(Ne,"parseTraceParent",{enumerable:!0,get:function(){return aL.parseTraceParent}});var sL=r0e();Object.defineProperty(Ne,"RPCType",{enumerable:!0,get:function(){return sL.RPCType}});Object.defineProperty(Ne,"deleteRPCMetadata",{enumerable:!0,get:function(){return sL.deleteRPCMetadata}});Object.defineProperty(Ne,"getRPCMetadata",{enumerable:!0,get:function(){return sL.getRPCMetadata}});Object.defineProperty(Ne,"setRPCMetadata",{enumerable:!0,get:function(){return sL.setRPCMetadata}});var _5=mB();Object.defineProperty(Ne,"isTracingSuppressed",{enumerable:!0,get:function(){return _5.isTracingSuppressed}});Object.defineProperty(Ne,"suppressTracing",{enumerable:!0,get:function(){return _5.suppressTracing}});Object.defineProperty(Ne,"unsuppressTracing",{enumerable:!0,get:function(){return _5.unsuppressTracing}});var Est=p5();Object.defineProperty(Ne,"TraceState",{enumerable:!0,get:function(){return Est.TraceState}});var yst=f0e();Object.defineProperty(Ne,"merge",{enumerable:!0,get:function(){return yst.merge}});var C0e=m0e();Object.defineProperty(Ne,"TimeoutError",{enumerable:!0,get:function(){return C0e.TimeoutError}});Object.defineProperty(Ne,"callWithTimeout",{enumerable:!0,get:function(){return C0e.callWithTimeout}});var v0e=g0e();Object.defineProperty(Ne,"isUrlIgnored",{enumerable:!0,get:function(){return v0e.isUrlIgnored}});Object.defineProperty(Ne,"urlMatches",{enumerable:!0,get:function(){return v0e.urlMatches}});var Sst=_0e();Object.defineProperty(Ne,"BindOnceFuture",{enumerable:!0,get:function(){return Sst.BindOnceFuture}});var Tst=y0e();Object.defineProperty(Ne,"diagLogLevelFromString",{enumerable:!0,get:function(){return Tst.diagLogLevelFromString}});var Ist=T0e();Ne.internal={_export:Ist._export}});var R0e=F(uL=>{"use strict";A();Object.defineProperty(uL,"__esModule",{value:!0});uL.VERSION=void 0;uL.VERSION="0.214.0"});var x0e=F(SB=>{"use strict";A();Object.defineProperty(SB,"__esModule",{value:!0});SB.SeverityNumber=void 0;var bst;(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"})(bst=SB.SeverityNumber||(SB.SeverityNumber={}))});var lL=F(cC=>{"use strict";A();Object.defineProperty(cC,"__esModule",{value:!0});cC.NOOP_LOGGER=cC.NoopLogger=void 0;var cL=class{emit(t){}};cC.NoopLogger=cL;cC.NOOP_LOGGER=new cL});var D0e=F(Sm=>{"use strict";A();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.API_BACKWARDS_COMPATIBILITY_VERSION=Sm.makeGetter=Sm._global=Sm.GLOBAL_LOGS_API_KEY=void 0;Sm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Sm._global=globalThis;function Cst(e,t,n){return r=>r===e?t:n}Sm.makeGetter=Cst;Sm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var E5=F(lC=>{"use strict";A();Object.defineProperty(lC,"__esModule",{value:!0});lC.NOOP_LOGGER_PROVIDER=lC.NoopLoggerProvider=void 0;var vst=lL(),dL=class{getLogger(t,n,r){return new vst.NoopLogger}};lC.NoopLoggerProvider=dL;lC.NOOP_LOGGER_PROVIDER=new dL});var B0e=F(pL=>{"use strict";A();Object.defineProperty(pL,"__esModule",{value:!0});pL.ProxyLogger=void 0;var Rst=lL(),y5=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):Rst.NOOP_LOGGER}};pL.ProxyLogger=y5});var N0e=F(fL=>{"use strict";A();Object.defineProperty(fL,"__esModule",{value:!0});fL.ProxyLoggerProvider=void 0;var xst=E5(),Dst=B0e(),S5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Dst.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:xst.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)}};fL.ProxyLoggerProvider=S5});var k0e=F(mL=>{"use strict";A();Object.defineProperty(mL,"__esModule",{value:!0});mL.LogsAPI=void 0;var Md=D0e(),Bst=E5(),O0e=N0e(),T5=class e{constructor(){this._proxyLoggerProvider=new O0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Md._global[Md.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Md._global[Md.GLOBAL_LOGS_API_KEY]=(0,Md.makeGetter)(Md.API_BACKWARDS_COMPATIBILITY_VERSION,t,Bst.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Md._global[Md.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Md._global,Md.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Md._global[Md.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new O0e.ProxyLoggerProvider}};mL.LogsAPI=T5});var I5=F(Tm=>{"use strict";A();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.logs=Tm.NoopLogger=Tm.NOOP_LOGGER=Tm.SeverityNumber=void 0;var Nst=x0e();Object.defineProperty(Tm,"SeverityNumber",{enumerable:!0,get:function(){return Nst.SeverityNumber}});var w0e=lL();Object.defineProperty(Tm,"NOOP_LOGGER",{enumerable:!0,get:function(){return w0e.NOOP_LOGGER}});Object.defineProperty(Tm,"NoopLogger",{enumerable:!0,get:function(){return w0e.NoopLogger}});var Ost=k0e();Tm.logs=Ost.LogsAPI.getInstance()});var P0e=F(dC=>{"use strict";A();Object.defineProperty(dC,"__esModule",{value:!0});dC.disableInstrumentations=dC.enableInstrumentations=void 0;function kst(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}dC.enableInstrumentations=kst;function wst(e){e.forEach(t=>t.disable())}dC.disableInstrumentations=wst});var U0e=F(AL=>{"use strict";A();Object.defineProperty(AL,"__esModule",{value:!0});AL.registerInstrumentations=void 0;var M0e=(ze(),Me(We)),Pst=I5(),L0e=P0e();function Mst(e){let t=e.tracerProvider||M0e.trace.getTracerProvider(),n=e.meterProvider||M0e.metrics.getMeterProvider(),r=e.loggerProvider||Pst.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,L0e.enableInstrumentations)(o,t,n,r),()=>{(0,L0e.disableInstrumentations)(o)}}AL.registerInstrumentations=Mst});var V0e=F(gL=>{"use strict";A();Object.defineProperty(gL,"__esModule",{value:!0});gL.satisfies=void 0;var R5=(ze(),Me(We)),j0e=/^(?: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-]+)*))?$/,Lst=/^(?<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-]+)*))?$/,Ust={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Qst(e,t,n){if(!Fst(e))return R5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Hst(e);if(!r)return!1;let o=[],i=H0e(r,t,o,n);return i&&!n?.includePrerelease?zst(r,o):i}gL.satisfies=Qst;function Fst(e){return typeof e=="string"&&j0e.test(e)}function H0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(b5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=dut(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!b5(e,i,n,r))return!1;return!0}return b5(e,t,n,r)}function b5(e,t,n,r){if(t=jst(t,r),t.includes(" "))return H0e(e,t,n,r);{let o=$st(t);return n.push(o),Gst(e,o)}}function Gst(e,t){if(t.invalid)return!1;if(!t.version||v5(t.version))return!0;let n=F0e(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=F0e(r,o)}return Ust[t.op]?.includes(n)}function zst(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function jst(e,t){return e=e.trim(),e=cut(e,t),e=uut(e),e=lut(e,t),e=e.trim(),e}function Mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Hst(e){let t=e.match(j0e);if(!t){R5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function $st(e){if(!e)return{};let t=e.match(Lst);if(!t)return R5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function v5(e){return e==="*"||e==="x"||e==="X"}function Q0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function qst(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 Vst(e,t){if(v5(e)||v5(t))return 0;let[n,r]=qst(Q0e(e),Q0e(t));return n>r?1:n<r?-1:0}function F0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Vst(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $0e="[a-zA-Z0-9-]",q0e="0|[1-9]\\d*",Yst=`\\d*[a-zA-Z-]${$0e}*`,Kst="((?:<|>)?=?)",G0e=`(?:${q0e}|${Yst})`,Jst=`(?:-(${G0e}(?:\\.${G0e})*))`,z0e=`${$0e}+`,Zst=`(?:\\+(${z0e}(?:\\.${z0e})*))`,C5=`${q0e}|x|X|\\*`,TB=`[v=\\s]*(${C5})(?:\\.(${C5})(?:\\.(${C5})(?:${Jst})?${Zst}?)?)?`,Wst=`^${Kst}\\s*${TB}$`,Xst=new RegExp(Wst),eut=`^\\s*(${TB})\\s+-\\s+(${TB})\\s*$`,tut=new RegExp(eut),nut="(?:~>?)",rut=`^${nut}${TB}$`,out=new RegExp(rut),iut="(?:\\^)",aut=`^${iut}${TB}$`,sut=new RegExp(aut);function uut(e){let t=out;return e.replace(t,(n,r,o,i,a)=>{let c;return Mu(r)?c="":Mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function cut(e,t){let n=sut,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,l)=>{let f;return Mu(i)?f="":Mu(a)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Mu(c)?i==="0"?f=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:l?i==="0"?a==="0"?f=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?a==="0"?f=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,f})}function lut(e,t){let n=Xst;return e.replace(n,(r,o,i,a,c,l)=>{let f=Mu(i),h=f||Mu(a),y=h||Mu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(l="-0"),r=`${o+i}.${a}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),r})}function dut(e,t){let n=tut;return e.replace(n,(r,o,i,a,c,l,f,h,y,S,b,v)=>(Mu(i)?o="":Mu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Mu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Mu(y)?h="":Mu(S)?h=`<${+y+1}.0.0-0`:Mu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var x5=F(Is=>{"use strict";A();Object.defineProperty(Is,"__esModule",{value:!0});Is.massUnwrap=Is.unwrap=Is.massWrap=Is.wrap=void 0;var Lu=console.error.bind(console);function IB(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 put=(e,t,n)=>{if(!e||!e[t]){Lu("no original function "+String(t)+" to wrap");return}if(!n){Lu("no wrapper function"),Lu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Lu("original object and wrapper must be functions");return}let o=n(r,t);return IB(o,"__original",r),IB(o,"__unwrap",()=>{e[t]===o&&IB(e,t,r)}),IB(o,"__wrapped",!0),IB(e,t,o),o};Is.wrap=put;var fut=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Is.wrap)(r,o,n)})})};Is.massWrap=fut;var mut=(e,t)=>{if(!e||!e[t]){Lu("no function to unwrap."),Lu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Lu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Is.unwrap=mut;var Aut=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Is.unwrap)(n,r)})})};Is.massUnwrap=Aut;function bB(e){e&&e.logger&&(typeof e.logger!="function"?Lu("new logger isn't a function, not replacing"):Lu=e.logger)}Is.default=bB;bB.wrap=Is.wrap;bB.massWrap=Is.massWrap;bB.unwrap=Is.unwrap;bB.massUnwrap=Is.massUnwrap});var Y0e=F(_L=>{"use strict";A();Object.defineProperty(_L,"__esModule",{value:!0});_L.InstrumentationAbstract=void 0;var D5=(ze(),Me(We)),gut=I5(),hL=x5(),B5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=D5.diag.createComponentLogger({namespace:t}),this._tracer=D5.trace.getTracer(t,n),this._meter=D5.metrics.getMeter(t,n),this._logger=gut.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=hL.wrap;_unwrap=hL.unwrap;_massWrap=hL.massWrap;_massUnwrap=hL.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)}}};_L.InstrumentationAbstract=B5});var J0e=F((JKt,K0e)=>{A();var pC=1e3,fC=pC*60,mC=fC*60,Gy=mC*24,hut=Gy*7,_ut=Gy*365.25;K0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Eut(e);if(n==="number"&&isFinite(e))return t.long?Sut(e):yut(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Eut(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*_ut;case"weeks":case"week":case"w":return n*hut;case"days":case"day":case"d":return n*Gy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*mC;case"minutes":case"minute":case"mins":case"min":case"m":return n*fC;case"seconds":case"second":case"secs":case"sec":case"s":return n*pC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function yut(e){var t=Math.abs(e);return t>=Gy?Math.round(e/Gy)+"d":t>=mC?Math.round(e/mC)+"h":t>=fC?Math.round(e/fC)+"m":t>=pC?Math.round(e/pC)+"s":e+"ms"}function Sut(e){var t=Math.abs(e);return t>=Gy?EL(e,t,Gy,"day"):t>=mC?EL(e,t,mC,"hour"):t>=fC?EL(e,t,fC,"minute"):t>=pC?EL(e,t,pC,"second"):e+" ms"}function EL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var N5=F((WKt,Z0e)=>{A();function Tut(e){n.debug=n,n.default=n,n.coerce=l,n.disable=a,n.enable=o,n.enabled=c,n.humanize=J0e(),n.destroy=f,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,b,v;function x(...D){if(!x.enabled)return;let w=x,Q=Number(new Date),z=Q-(y||Q);w.diff=z,w.prev=y,w.curr=Q,y=Q,D[0]=n.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let G=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(ie,ge)=>{if(ie==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let ve=D[G];ie=Ce.call(w,ve),D.splice(G,1),G--}return ie}),n.formatArgs.call(w,D),(w.log||n.log).apply(w,D)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,v=n.enabled(h)),v),set:D=>{S=D}}),typeof n.init=="function"&&n.init(x),x}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,b=0,v=-1,x=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(v=b,x=S,b++):(S++,b++);else if(v!==-1)b=v+1,x++,S=x;else return!1;for(;b<y.length&&y[b]==="*";)b++;return b===y.length}function a(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(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 f(){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}Z0e.exports=Tut});var W0e=F((kc,yL)=>{A();kc.formatArgs=but;kc.save=Cut;kc.load=vut;kc.useColors=Iut;kc.storage=Rut();kc.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`."))}})();kc.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 Iut(){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 but(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+yL.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)}kc.log=console.debug||console.log||(()=>{});function Cut(e){try{e?kc.storage.setItem("debug",e):kc.storage.removeItem("debug")}catch{}}function vut(){let e;try{e=kc.storage.getItem("debug")||kc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Rut(){try{return localStorage}catch{}}yL.exports=N5()(kc);var{formatters:xut}=yL.exports;xut.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var eye=F((tJt,X0e)=>{"use strict";A();X0e.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 rye=F((rJt,nye)=>{"use strict";A();var Dut=Fe("os"),tye=Fe("tty"),Ld=eye(),{env:Va}=process,f_;Ld("no-color")||Ld("no-colors")||Ld("color=false")||Ld("color=never")?f_=0:(Ld("color")||Ld("colors")||Ld("color=true")||Ld("color=always"))&&(f_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?f_=1:Va.FORCE_COLOR==="false"?f_=0:f_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function O5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function k5(e,t){if(f_===0)return 0;if(Ld("color=16m")||Ld("color=full")||Ld("color=truecolor"))return 3;if(Ld("color=256"))return 2;if(e&&!t&&f_===void 0)return 0;let n=f_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Dut.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function But(e){let t=k5(e,e&&e.isTTY);return O5(t)}nye.exports={supportsColor:But,stdout:O5(k5(!0,tye.isatty(1))),stderr:O5(k5(!0,tye.isatty(2)))}});var iye=F((Ya,TL)=>{A();var Nut=Fe("tty"),SL=Fe("util");Ya.init=Uut;Ya.log=Put;Ya.formatArgs=kut;Ya.save=Mut;Ya.load=Lut;Ya.useColors=Out;Ya.destroy=SL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ya.colors=[6,2,3,4,5,1];try{let e=rye();e&&(e.stderr||e).level>=2&&(Ya.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ya.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function Out(){return"colors"in Ya.inspectOpts?!!Ya.inspectOpts.colors:Nut.isatty(process.stderr.fd)}function kut(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 ZYe=Object.create;var pM=Object.defineProperty;var WYe=Object.getOwnPropertyDescriptor;var XYe=Object.getOwnPropertyNames;var eKe=Object.getPrototypeOf,tKe=Object.prototype.hasOwnProperty;var Fe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},$a=(e,t)=>{for(var n in t)pM(e,n,{get:t[n],enumerable:!0})},ude=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of XYe(t))!tKe.call(e,o)&&o!==n&&pM(e,o,{get:()=>t[o],enumerable:!(r=WYe(t,o))||r.enumerable});return e};var ae=(e,t,n)=>(n=e!=null?ZYe(eKe(e)):{},ude(t||!e||!e.__esModule?pM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>ude(pM({},"__esModule",{value:!0}),e);var A=O(()=>{(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"0.1.162"}}catch{}})()});var dg,H$=O(()=>{A();dg="1.9.1"});function nKe(e){let t=new Set([e]),n=new Set,r=e.match(dde);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(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(dde);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(l):i(l):o.minor<=h.minor?a(l):i(l)}}var dde,pde,fde=O(()=>{A();H$();dde=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;pde=nKe(dg)});function Am(e,t,n,r=!1){var o;let i=sB[aB]=(o=sB[aB])!==null&&o!==void 0?o:{version:dg};if(!r&&i[e]){let a=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(a.stack||a.message),!1}if(i.version!==dg){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${dg}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${dg}.`),!0}function Dl(e){var t,n;let r=(t=sB[aB])===null||t===void 0?void 0:t.version;if(!(!r||!pde(r)))return(n=sB[aB])===null||n===void 0?void 0:n[e]}function gm(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${dg}.`);let n=sB[aB];n&&delete n[e]}var rKe,aB,sB,Ny=O(()=>{A();H$();fde();rKe=dg.split(".")[0],aB=Symbol.for(`opentelemetry.js.api.${rKe}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function uB(e,t,n){let r=Dl("diag");if(r)return r[e](t,...n)}var fM,mde=O(()=>{A();Ny();fM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return uB("debug",this._namespace,t)}error(...t){return uB("error",this._namespace,t)}info(...t){return uB("info",this._namespace,t)}warn(...t){return uB("warn",this._namespace,t)}verbose(...t){return uB("verbose",this._namespace,t)}}});var ya,mM=O(()=>{A();(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"})(ya||(ya={}))});function Ade(e,t){e<ya.NONE?e=ya.NONE:e>ya.ALL&&(e=ya.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",ya.ERROR),warn:n("warn",ya.WARN),info:n("info",ya.INFO),debug:n("debug",ya.DEBUG),verbose:n("verbose",ya.VERBOSE)}}var gde=O(()=>{A();mM()});var oKe,qa,Oy=O(()=>{A();mde();gde();mM();Ny();oKe="diag",qa=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=Dl("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:ya.INFO})=>{var a,c,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((a=y.stack)!==null&&a!==void 0?a:y.message),!1}typeof i=="number"&&(i={logLevel:i});let f=Dl("diag"),h=Ade((c=i.logLevel)!==null&&c!==void 0?c:ya.INFO,o);if(f&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Am("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{gm(oKe,n)},n.createComponentLogger=o=>new fM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var AM,hde=O(()=>{A();AM=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 _de,Ede=O(()=>{A();_de=Symbol("BaggageEntryMetadata")});function yde(e={}){return new AM(new Map(Object.entries(e)))}function Sde(e){return typeof e!="string"&&(iKe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:_de,toString(){return e}}}var iKe,$$=O(()=>{A();Oy();hde();Ede();iKe=qa.instance()});function Bl(e){return Symbol.for(e)}var q$,Xb,cB=O(()=>{A();q$=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}}},Xb=new q$});var V$,Y$,gM,Tde=O(()=>{A();V$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Y$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(Y$[t]=console[t])}gM=class{constructor(){function t(n){return function(...r){let o=Y$[n];if(typeof o!="function"&&(o=Y$.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<V$.length;n++)this[V$[n].n]=t(V$[n].c)}}});function Ide(){return r9}var K$,eC,J$,Z$,W$,X$,lB,e9,t9,n9,r9,aKe,sKe,uKe,cKe,lKe,dKe,pKe,o9=O(()=>{A();K$=class{constructor(){}createGauge(t,n){return sKe}createHistogram(t,n){return uKe}createCounter(t,n){return aKe}createUpDownCounter(t,n){return cKe}createObservableGauge(t,n){return dKe}createObservableCounter(t,n){return lKe}createObservableUpDownCounter(t,n){return pKe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},eC=class{},J$=class extends eC{add(t,n){}},Z$=class extends eC{add(t,n){}},W$=class extends eC{record(t,n){}},X$=class extends eC{record(t,n){}},lB=class{addCallback(t){}removeCallback(t){}},e9=class extends lB{},t9=class extends lB{},n9=class extends lB{},r9=new K$,aKe=new J$,sKe=new W$,uKe=new X$,cKe=new Z$,lKe=new e9,dKe=new t9,pKe=new n9});var hM,bde=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(hM||(hM={}))});var _M,EM,i9=O(()=>{A();_M={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},EM={set(e,t,n){e!=null&&(e[t]=n)}}});var yM,Cde=O(()=>{A();cB();yM=class{active(){return Xb}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var a9,fKe,hm,dB=O(()=>{A();Cde();Ny();Oy();a9="context",fKe=new yM,hm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Am(a9,t,qa.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 Dl(a9)||fKe}disable(){this._getContextManager().disable(),gm(a9,qa.instance())}}});var Js,s9=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Js||(Js={}))});var pB,ky,SM,TM=O(()=>{A();s9();pB="0000000000000000",ky="00000000000000000000000000000000",SM={traceId:ky,spanId:pB,traceFlags:Js.NONE}});var _m,IM=O(()=>{A();TM();_m=class{constructor(t=SM){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 bM(e){return e.getValue(u9)||void 0}function vde(){return bM(hm.getInstance().active())}function fB(e,t){return e.setValue(u9,t)}function Rde(e){return e.deleteValue(u9)}function xde(e,t){return fB(e,new _m(t))}function CM(e){var t;return(t=bM(e))===null||t===void 0?void 0:t.spanContext()}var u9,c9=O(()=>{A();cB();IM();dB();u9=Bl("OpenTelemetry Context Key SPAN")});function Dde(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(vM[e.charCodeAt(r)]|0)+(vM[e.charCodeAt(r+1)]|0)+(vM[e.charCodeAt(r+2)]|0)+(vM[e.charCodeAt(r+3)]|0);return n===t}function l9(e){return Dde(e,32)&&e!==ky}function d9(e){return Dde(e,16)&&e!==pB}function pg(e){return l9(e.traceId)&&d9(e.spanId)}function Bde(e){return new _m(e)}var vM,RM=O(()=>{A();TM();IM();vM=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 mKe(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 p9,tC,f9=O(()=>{A();dB();c9();IM();RM();p9=hm.getInstance(),tC=class{startSpan(t,n,r=p9.active()){if(!!n?.root)return new _m;let i=r&&CM(r);return mKe(i)&&pg(i)?new _m(i):new _m}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let l=a??p9.active(),f=this.startSpan(t,i,l),h=fB(l,f);return p9.with(h,c,void 0,f)}}});var AKe,nC,m9=O(()=>{A();f9();AKe=new tC,nC=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):AKe}}});var xM,Nde=O(()=>{A();f9();xM=class{getTracer(t,n,r){return new tC}}});var gKe,wy,A9=O(()=>{A();m9();Nde();gKe=new xM,wy=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new nC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:gKe}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 DM,Ode=O(()=>{A();(function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(DM||(DM={}))});var co,kde=O(()=>{A();(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"})(co||(co={}))});var di,wde=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(di||(di={}))});function Pde(e){return EKe.test(e)}function Mde(e){return yKe.test(e)&&!SKe.test(e)}var g9,hKe,_Ke,EKe,yKe,SKe,Lde=O(()=>{A();g9="[_0-9a-z-*/]",hKe=`[a-z]${g9}{0,255}`,_Ke=`[a-z0-9]${g9}{0,240}@[a-z]${g9}{0,13}`,EKe=new RegExp(`^(?:${hKe}|${_Ke})$`),yKe=/^[ -~]{0,255}[!-~]$/,SKe=/,|=/});var Ude,TKe,Qde,Fde,BM,Gde=O(()=>{A();Lde();Ude=32,TKe=512,Qde=",",Fde="=",BM=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+Fde+this.get(n)),t),[]).join(Qde)}_parse(t){t.length>TKe||(this._internalState=t.split(Qde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Fde);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);Pde(a)&&Mde(c)&&n.set(a,c)}return n},new Map),this._internalState.size>Ude&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Ude))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function zde(e){return new BM(e)}var jde=O(()=>{A();Gde()});var Ke,Hde=O(()=>{A();dB();Ke=hm.getInstance()});var Nl,$de=O(()=>{A();Oy();Nl=qa.instance()});var h9,qde,Vde=O(()=>{A();o9();h9=class{getMeter(t,n,r){return r9}},qde=new h9});var _9,NM,Yde=O(()=>{A();Vde();Ny();Oy();_9="metrics",NM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Am(_9,t,qa.instance())}getMeterProvider(){return Dl(_9)||qde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){gm(_9,qa.instance())}}});var E9,Kde=O(()=>{A();Yde();E9=NM.getInstance()});var OM,Jde=O(()=>{A();OM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function S9(e){return e.getValue(y9)||void 0}function Zde(){return S9(hm.getInstance().active())}function Wde(e,t){return e.setValue(y9,t)}function Xde(e){return e.deleteValue(y9)}var y9,epe=O(()=>{A();dB();cB();y9=Bl("OpenTelemetry Baggage Key")});var T9,IKe,kM,tpe=O(()=>{A();Ny();Jde();i9();epe();$$();Oy();T9="propagation",IKe=new OM,kM=class e{constructor(){this.createBaggage=yde,this.getBaggage=S9,this.getActiveBaggage=Zde,this.setBaggage=Wde,this.deleteBaggage=Xde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Am(T9,t,qa.instance())}inject(t,n,r=EM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=_M){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){gm(T9,qa.instance())}_getGlobalPropagator(){return Dl(T9)||IKe}}});var tf,npe=O(()=>{A();tpe();tf=kM.getInstance()});var I9,wM,rpe=O(()=>{A();Ny();A9();RM();c9();Oy();I9="trace",wM=class e{constructor(){this._proxyTracerProvider=new wy,this.wrapSpanContext=Bde,this.isSpanContextValid=pg,this.deleteSpan=Rde,this.getSpan=bM,this.getActiveSpan=vde,this.getSpanContext=CM,this.setSpan=fB,this.setSpanContext=xde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Am(I9,this._proxyTracerProvider,qa.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return Dl(I9)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){gm(I9,qa.instance()),this._proxyTracerProvider=new wy}}});var $t,ope=O(()=>{A();rpe();$t=wM.getInstance()});var We={};$a(We,{DiagConsoleLogger:()=>gM,DiagLogLevel:()=>ya,INVALID_SPANID:()=>pB,INVALID_SPAN_CONTEXT:()=>SM,INVALID_TRACEID:()=>ky,ProxyTracer:()=>nC,ProxyTracerProvider:()=>wy,ROOT_CONTEXT:()=>Xb,SamplingDecision:()=>DM,SpanKind:()=>co,SpanStatusCode:()=>di,TraceFlags:()=>Js,ValueType:()=>hM,baggageEntryMetadataFromString:()=>Sde,context:()=>Ke,createContextKey:()=>Bl,createNoopMeter:()=>Ide,createTraceState:()=>zde,default:()=>bKe,defaultTextMapGetter:()=>_M,defaultTextMapSetter:()=>EM,diag:()=>Nl,isSpanContextValid:()=>pg,isValidSpanId:()=>d9,isValidTraceId:()=>l9,metrics:()=>E9,propagation:()=>tf,trace:()=>$t});var bKe,ze=O(()=>{A();$$();cB();Tde();mM();o9();bde();i9();m9();A9();Ode();kde();wde();s9();jde();RM();TM();Hde();$de();Kde();npe();ope();bKe={context:Ke,diag:Nl,metrics:E9,propagation:tf,trace:$t}});var mB=F(l_=>{"use strict";A();Object.defineProperty(l_,"__esModule",{value:!0});l_.isTracingSuppressed=l_.unsuppressTracing=l_.suppressTracing=void 0;var CKe=(ze(),Me(We)),b9=(0,CKe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function vKe(e){return e.setValue(b9,!0)}l_.suppressTracing=vKe;function RKe(e){return e.deleteValue(b9)}l_.unsuppressTracing=RKe;function xKe(e){return e.getValue(b9)===!0}l_.isTracingSuppressed=xKe});var C9=F(Zs=>{"use strict";A();Object.defineProperty(Zs,"__esModule",{value:!0});Zs.BAGGAGE_MAX_TOTAL_LENGTH=Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=Zs.BAGGAGE_HEADER=Zs.BAGGAGE_ITEMS_SEPARATOR=Zs.BAGGAGE_PROPERTIES_SEPARATOR=Zs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Zs.BAGGAGE_KEY_PAIR_SEPARATOR="=";Zs.BAGGAGE_PROPERTIES_SEPARATOR=";";Zs.BAGGAGE_ITEMS_SEPARATOR=",";Zs.BAGGAGE_HEADER="baggage";Zs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Zs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Zs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var R9=F(Pd=>{"use strict";A();Object.defineProperty(Pd,"__esModule",{value:!0});Pd.parseKeyPairsIntoRecord=Pd.parseBaggageHeaderString=Pd.parsePairKeyValue=Pd.getKeyPairs=Pd.serializeKeyPairs=void 0;var DKe=(ze(),Me(We)),Em=C9();function BKe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?Em.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>Em.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}Pd.serializeKeyPairs=BKe;function NKe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=Em.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}Pd.getKeyPairs=NKe;function v9(e){if(!e)return;let t=e.indexOf(Em.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(Em.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,DKe.baggageEntryMetadataFromString)(f)}return{key:a,value:c,metadata:l}}Pd.parsePairKeyValue=v9;function OKe(e,t,n,r){let o=0;for(;o<e.length&&n<Em.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(Em.BAGGAGE_ITEMS_SEPARATOR,o),a=i===-1?e.length:i,c=a-o;if(c<=Em.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=v9(e.substring(o,a));if(l){let f=(n===0?0:1)+c;if(r+f>Em.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}Pd.parseBaggageHeaderString=OKe;function kKe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(Em.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=v9(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}Pd.parseKeyPairsIntoRecord=kKe});var ipe=F(MM=>{"use strict";A();Object.defineProperty(MM,"__esModule",{value:!0});MM.W3CBaggagePropagator=void 0;var x9=(ze(),Me(We)),wKe=mB(),AB=C9(),PM=R9(),D9=class{inject(t,n,r){let o=x9.propagation.getBaggage(t);if(!o||(0,wKe.isTracingSuppressed)(t))return;let i=(0,PM.getKeyPairs)(o).filter(c=>c.length<=AB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,AB.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,PM.serializeKeyPairs)(i);a.length>0&&r.set(n,AB.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,AB.BAGGAGE_HEADER);if(!o)return t;let i={},a=0,c=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[a,c]=(0,PM.parseBaggageHeaderString)(o[l],i,a,c);else[a]=(0,PM.parseBaggageHeaderString)(o,i,a,c);return a===0?t:x9.propagation.setBaggage(t,x9.propagation.createBaggage(i))}fields(){return[AB.BAGGAGE_HEADER]}};MM.W3CBaggagePropagator=D9});var ape=F(LM=>{"use strict";A();Object.defineProperty(LM,"__esModule",{value:!0});LM.AnchoredClock=void 0;var B9=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}};LM.AnchoredClock=B9});var dpe=F(d_=>{"use strict";A();Object.defineProperty(d_,"__esModule",{value:!0});d_.isAttributeValue=d_.isAttributeKey=d_.sanitizeAttributes=void 0;var spe=(ze(),Me(We));function PKe(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(!upe(n)){spe.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!cpe(r)){spe.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}d_.sanitizeAttributes=PKe;function upe(e){return typeof e=="string"&&e!==""}d_.isAttributeKey=upe;function cpe(e){return e==null?!0:Array.isArray(e)?MKe(e):lpe(typeof e)}d_.isAttributeValue=cpe;function MKe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(lpe(r)){t=r;continue}return!1}return!1}}return!0}function lpe(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var N9=F(UM=>{"use strict";A();Object.defineProperty(UM,"__esModule",{value:!0});UM.loggingErrorHandler=void 0;var LKe=(ze(),Me(We));function UKe(){return e=>{LKe.diag.error(QKe(e))}}UM.loggingErrorHandler=UKe;function QKe(e){return typeof e=="string"?e:JSON.stringify(FKe(e))}function FKe(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 fpe=F(rC=>{"use strict";A();Object.defineProperty(rC,"__esModule",{value:!0});rC.globalErrorHandler=rC.setGlobalErrorHandler=void 0;var GKe=N9(),ppe=(0,GKe.loggingErrorHandler)();function zKe(e){ppe=e}rC.setGlobalErrorHandler=zKe;function jKe(e){try{ppe(e)}catch{}}rC.globalErrorHandler=jKe});var hpe=F(ym=>{"use strict";A();Object.defineProperty(ym,"__esModule",{value:!0});ym.getStringListFromEnv=ym.getBooleanFromEnv=ym.getStringFromEnv=ym.getNumberFromEnv=void 0;var mpe=(ze(),Me(We)),Ape=Fe("util");function HKe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){mpe.diag.warn(`Unknown value ${(0,Ape.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}ym.getNumberFromEnv=HKe;function gpe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}ym.getStringFromEnv=gpe;function $Ke(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||mpe.diag.warn(`Unknown value ${(0,Ape.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}ym.getBooleanFromEnv=$Ke;function qKe(e){return gpe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}ym.getStringListFromEnv=qKe});var _pe=F(QM=>{"use strict";A();Object.defineProperty(QM,"__esModule",{value:!0});QM._globalThis=void 0;QM._globalThis=globalThis});var Epe=F(FM=>{"use strict";A();Object.defineProperty(FM,"__esModule",{value:!0});FM.VERSION=void 0;FM.VERSION="2.8.0"});function Ni(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 O9=O(()=>{A()});var ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,kpe,wpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,kfe,wfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,kme,wme,Pme,Mme,Lme,Ume,Qme,VKe,k9,YKe,KKe,JKe,ZKe,w9,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,uJe,cJe,lJe,dJe,pJe,fJe,mJe,AJe,P9,gJe,hJe,_Je,EJe,yJe,SJe,TJe,IJe,bJe,CJe,vJe,RJe,M9,xJe,DJe,L9,U9,BJe,NJe,OJe,kJe,wJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,zJe,jJe,HJe,$Je,qJe,gB,oC,Q9,VJe,YJe,Py,KJe,JJe,ZJe,WJe,F9,G9,XJe,z9,eZe,tZe,nZe,rZe,oZe,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,mZe,AZe,gZe,hZe,_Ze,EZe,yZe,SZe,TZe,j9,IZe,bZe,CZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,kZe,wZe,PZe,MZe,LZe,UZe,QZe,FZe,GZe,H9,zZe,$9,jZe,HZe,$Ze,qZe,VZe,YZe,KZe,JZe,ZZe,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,dWe,pWe,fWe,mWe,AWe,gWe,hWe,_We,EWe,yWe,SWe,TWe,IWe,bWe,CWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,kWe,wWe,PWe,MWe,LWe,UWe,QWe,FWe,GWe,zWe,jWe,HWe,$We,kAe,wAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,zAe,jAe,qWe,VWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,HAe,$Ae,qAe,VAe,YAe,oXe,iXe,aXe,sXe,uXe,cXe,KAe,JAe,ZAe,lXe,dXe,pXe,fXe,WAe,XAe,ege,tge,mXe,AXe,gXe,hXe,_Xe,nge,rge,oge,ige,age,sge,uge,EXe,yXe,SXe,TXe,IXe,bXe,CXe,vXe,cge,lge,dge,pge,fge,RXe,xXe,DXe,BXe,NXe,OXe,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,Oge,kge,wge,kXe,wXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,zXe,jXe,HXe,$Xe,qXe,VXe,YXe,KXe,JXe,ZXe,WXe,XXe,eet,Pge,Mge,Lge,Uge,Qge,tet,net,ret,oet,iet,aet,Fge,Gge,set,uet,cet,zge,jge,det,pet,fet,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,ohe,ihe,ahe,met,Aet,get,het,_et,Eet,yet,Tet,Iet,bet,Cet,vet,Ret,xet,Det,Bet,Net,Oet,she,uhe,ket,wet,Pet,che=O(()=>{A();O9();ype="aws.lambda.invoked_arn",Spe="db.system",Tpe="db.connection_string",Ipe="db.user",bpe="db.jdbc.driver_classname",Cpe="db.name",vpe="db.statement",Rpe="db.operation",xpe="db.mssql.instance_name",Dpe="db.cassandra.keyspace",Bpe="db.cassandra.page_size",Npe="db.cassandra.consistency_level",Ope="db.cassandra.table",kpe="db.cassandra.idempotence",wpe="db.cassandra.speculative_execution_count",Ppe="db.cassandra.coordinator.id",Mpe="db.cassandra.coordinator.dc",Lpe="db.hbase.namespace",Upe="db.redis.database_index",Qpe="db.mongodb.collection",Fpe="db.sql.table",Gpe="exception.type",zpe="exception.message",jpe="exception.stacktrace",Hpe="exception.escaped",$pe="faas.trigger",qpe="faas.execution",Vpe="faas.document.collection",Ype="faas.document.operation",Kpe="faas.document.time",Jpe="faas.document.name",Zpe="faas.time",Wpe="faas.cron",Xpe="faas.coldstart",efe="faas.invoked_name",tfe="faas.invoked_provider",nfe="faas.invoked_region",rfe="net.transport",ofe="net.peer.ip",ife="net.peer.port",afe="net.peer.name",sfe="net.host.ip",ufe="net.host.port",cfe="net.host.name",lfe="net.host.connection.type",dfe="net.host.connection.subtype",pfe="net.host.carrier.name",ffe="net.host.carrier.mcc",mfe="net.host.carrier.mnc",Afe="net.host.carrier.icc",gfe="peer.service",hfe="enduser.id",_fe="enduser.role",Efe="enduser.scope",yfe="thread.id",Sfe="thread.name",Tfe="code.function",Ife="code.namespace",bfe="code.filepath",Cfe="code.lineno",vfe="http.method",Rfe="http.url",xfe="http.target",Dfe="http.host",Bfe="http.scheme",Nfe="http.status_code",Ofe="http.flavor",kfe="http.user_agent",wfe="http.request_content_length",Pfe="http.request_content_length_uncompressed",Mfe="http.response_content_length",Lfe="http.response_content_length_uncompressed",Ufe="http.server_name",Qfe="http.route",Ffe="http.client_ip",Gfe="aws.dynamodb.table_names",zfe="aws.dynamodb.consumed_capacity",jfe="aws.dynamodb.item_collection_metrics",Hfe="aws.dynamodb.provisioned_read_capacity",$fe="aws.dynamodb.provisioned_write_capacity",qfe="aws.dynamodb.consistent_read",Vfe="aws.dynamodb.projection",Yfe="aws.dynamodb.limit",Kfe="aws.dynamodb.attributes_to_get",Jfe="aws.dynamodb.index_name",Zfe="aws.dynamodb.select",Wfe="aws.dynamodb.global_secondary_indexes",Xfe="aws.dynamodb.local_secondary_indexes",eme="aws.dynamodb.exclusive_start_table",tme="aws.dynamodb.table_count",nme="aws.dynamodb.scan_forward",rme="aws.dynamodb.segment",ome="aws.dynamodb.total_segments",ime="aws.dynamodb.count",ame="aws.dynamodb.scanned_count",sme="aws.dynamodb.attribute_definitions",ume="aws.dynamodb.global_secondary_index_updates",cme="messaging.system",lme="messaging.destination",dme="messaging.destination_kind",pme="messaging.temp_destination",fme="messaging.protocol",mme="messaging.protocol_version",Ame="messaging.url",gme="messaging.message_id",hme="messaging.conversation_id",_me="messaging.message_payload_size_bytes",Eme="messaging.message_payload_compressed_size_bytes",yme="messaging.operation",Sme="messaging.consumer_id",Tme="messaging.rabbitmq.routing_key",Ime="messaging.kafka.message_key",bme="messaging.kafka.consumer_group",Cme="messaging.kafka.client_id",vme="messaging.kafka.partition",Rme="messaging.kafka.tombstone",xme="rpc.system",Dme="rpc.service",Bme="rpc.method",Nme="rpc.grpc.status_code",Ome="rpc.jsonrpc.version",kme="rpc.jsonrpc.request_id",wme="rpc.jsonrpc.error_code",Pme="rpc.jsonrpc.error_message",Mme="message.type",Lme="message.id",Ume="message.compressed_size",Qme="message.uncompressed_size",VKe=ype,k9=Spe,YKe=Tpe,KKe=Ipe,JKe=bpe,ZKe=Cpe,w9=vpe,WKe=Rpe,XKe=xpe,eJe=Dpe,tJe=Bpe,nJe=Npe,rJe=Ope,oJe=kpe,iJe=wpe,aJe=Ppe,sJe=Mpe,uJe=Lpe,cJe=Upe,lJe=Qpe,dJe=Fpe,pJe=Gpe,fJe=zpe,mJe=jpe,AJe=Hpe,P9=$pe,gJe=qpe,hJe=Vpe,_Je=Ype,EJe=Kpe,yJe=Jpe,SJe=Zpe,TJe=Wpe,IJe=Xpe,bJe=efe,CJe=tfe,vJe=nfe,RJe=rfe,M9=ofe,xJe=ife,DJe=afe,L9=sfe,U9=ufe,BJe=cfe,NJe=lfe,OJe=dfe,kJe=pfe,wJe=ffe,PJe=mfe,MJe=Afe,LJe=gfe,UJe=hfe,QJe=_fe,FJe=Efe,GJe=yfe,zJe=Sfe,jJe=Tfe,HJe=Ife,$Je=bfe,qJe=Cfe,gB=vfe,oC=Rfe,Q9=xfe,VJe=Dfe,YJe=Bfe,Py=Nfe,KJe=Ofe,JJe=kfe,ZJe=wfe,WJe=Pfe,F9=Mfe,G9=Lfe,XJe=Ufe,z9=Qfe,eZe=Ffe,tZe=Gfe,nZe=zfe,rZe=jfe,oZe=Hfe,iZe=$fe,aZe=qfe,sZe=Vfe,uZe=Yfe,cZe=Kfe,lZe=Jfe,dZe=Zfe,pZe=Wfe,fZe=Xfe,mZe=eme,AZe=tme,gZe=nme,hZe=rme,_Ze=ome,EZe=ime,yZe=ame,SZe=sme,TZe=ume,j9=cme,IZe=lme,bZe=dme,CZe=pme,vZe=fme,RZe=mme,xZe=Ame,DZe=gme,BZe=hme,NZe=_me,OZe=Eme,kZe=yme,wZe=Sme,PZe=Tme,MZe=Ime,LZe=bme,UZe=Cme,QZe=vme,FZe=Rme,GZe=xme,H9=Dme,zZe=Bme,$9=Nme,jZe=Ome,HZe=kme,$Ze=wme,qZe=Pme,VZe=Mme,YZe=Lme,KZe=Ume,JZe=Qme,ZZe=Ni([ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,kpe,wpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,kfe,wfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,kme,wme,Pme,Mme,Lme,Ume,Qme]),Fme="other_sql",Gme="mssql",zme="mysql",jme="oracle",Hme="db2",$me="postgresql",qme="redshift",Vme="hive",Yme="cloudscape",Kme="hsqldb",Jme="progress",Zme="maxdb",Wme="hanadb",Xme="ingres",eAe="firstsql",tAe="edb",nAe="cache",rAe="adabas",oAe="firebird",iAe="derby",aAe="filemaker",sAe="informix",uAe="instantdb",cAe="interbase",lAe="mariadb",dAe="netezza",pAe="pervasive",fAe="pointbase",mAe="sqlite",AAe="sybase",gAe="teradata",hAe="vertica",_Ae="h2",EAe="coldfusion",yAe="cassandra",SAe="hbase",TAe="mongodb",IAe="redis",bAe="couchbase",CAe="couchdb",vAe="cosmosdb",RAe="dynamodb",xAe="neo4j",DAe="geode",BAe="elasticsearch",NAe="memcached",OAe="cockroachdb",WZe=Fme,XZe=Gme,eWe=zme,tWe=jme,nWe=Hme,rWe=$me,oWe=qme,iWe=Vme,aWe=Yme,sWe=Kme,uWe=Jme,cWe=Zme,lWe=Wme,dWe=Xme,pWe=eAe,fWe=tAe,mWe=nAe,AWe=rAe,gWe=oAe,hWe=iAe,_We=aAe,EWe=sAe,yWe=uAe,SWe=cAe,TWe=lAe,IWe=dAe,bWe=pAe,CWe=fAe,vWe=mAe,RWe=AAe,xWe=gAe,DWe=hAe,BWe=_Ae,NWe=EAe,OWe=yAe,kWe=SAe,wWe=TAe,PWe=IAe,MWe=bAe,LWe=CAe,UWe=vAe,QWe=RAe,FWe=xAe,GWe=DAe,zWe=BAe,jWe=NAe,HWe=OAe,$We=Ni([Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,BAe,NAe,OAe]),kAe="all",wAe="each_quorum",PAe="quorum",MAe="local_quorum",LAe="one",UAe="two",QAe="three",FAe="local_one",GAe="any",zAe="serial",jAe="local_serial",qWe=kAe,VWe=wAe,YWe=PAe,KWe=MAe,JWe=LAe,ZWe=UAe,WWe=QAe,XWe=FAe,eXe=GAe,tXe=zAe,nXe=jAe,rXe=Ni([kAe,wAe,PAe,MAe,LAe,UAe,QAe,FAe,GAe,zAe,jAe]),HAe="datasource",$Ae="http",qAe="pubsub",VAe="timer",YAe="other",oXe=HAe,iXe=$Ae,aXe=qAe,sXe=VAe,uXe=YAe,cXe=Ni([HAe,$Ae,qAe,VAe,YAe]),KAe="insert",JAe="edit",ZAe="delete",lXe=KAe,dXe=JAe,pXe=ZAe,fXe=Ni([KAe,JAe,ZAe]),WAe="alibaba_cloud",XAe="aws",ege="azure",tge="gcp",mXe=WAe,AXe=XAe,gXe=ege,hXe=tge,_Xe=Ni([WAe,XAe,ege,tge]),nge="ip_tcp",rge="ip_udp",oge="ip",ige="unix",age="pipe",sge="inproc",uge="other",EXe=nge,yXe=rge,SXe=oge,TXe=ige,IXe=age,bXe=sge,CXe=uge,vXe=Ni([nge,rge,oge,ige,age,sge,uge]),cge="wifi",lge="wired",dge="cell",pge="unavailable",fge="unknown",RXe=cge,xXe=lge,DXe=dge,BXe=pge,NXe=fge,OXe=Ni([cge,lge,dge,pge,fge]),mge="gprs",Age="edge",gge="umts",hge="cdma",_ge="evdo_0",Ege="evdo_a",yge="cdma2000_1xrtt",Sge="hsdpa",Tge="hsupa",Ige="hspa",bge="iden",Cge="evdo_b",vge="lte",Rge="ehrpd",xge="hspap",Dge="gsm",Bge="td_scdma",Nge="iwlan",Oge="nr",kge="nrnsa",wge="lte_ca",kXe=mge,wXe=Age,PXe=gge,MXe=hge,LXe=_ge,UXe=Ege,QXe=yge,FXe=Sge,GXe=Tge,zXe=Ige,jXe=bge,HXe=Cge,$Xe=vge,qXe=Rge,VXe=xge,YXe=Dge,KXe=Bge,JXe=Nge,ZXe=Oge,WXe=kge,XXe=wge,eet=Ni([mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,Oge,kge,wge]),Pge="1.0",Mge="1.1",Lge="2.0",Uge="SPDY",Qge="QUIC",tet=Pge,net=Mge,ret=Lge,oet=Uge,iet=Qge,aet={HTTP_1_0:Pge,HTTP_1_1:Mge,HTTP_2_0:Lge,SPDY:Uge,QUIC:Qge},Fge="queue",Gge="topic",set=Fge,uet=Gge,cet=Ni([Fge,Gge]),zge="receive",jge="process",det=zge,pet=jge,fet=Ni([zge,jge]),Hge=0,$ge=1,qge=2,Vge=3,Yge=4,Kge=5,Jge=6,Zge=7,Wge=8,Xge=9,ehe=10,the=11,nhe=12,rhe=13,ohe=14,ihe=15,ahe=16,met=Hge,Aet=$ge,get=qge,het=Vge,_et=Yge,Eet=Kge,yet=Jge,Tet=Zge,Iet=Wge,bet=Xge,Cet=ehe,vet=the,Ret=nhe,xet=rhe,Det=ohe,Bet=ihe,Net=ahe,Oet={OK:Hge,CANCELLED:$ge,UNKNOWN:qge,INVALID_ARGUMENT:Vge,DEADLINE_EXCEEDED:Yge,NOT_FOUND:Kge,ALREADY_EXISTS:Jge,PERMISSION_DENIED:Zge,RESOURCE_EXHAUSTED:Wge,FAILED_PRECONDITION:Xge,ABORTED:ehe,OUT_OF_RANGE:the,UNIMPLEMENTED:nhe,INTERNAL:rhe,UNAVAILABLE:ohe,DATA_LOSS:ihe,UNAUTHENTICATED:ahe},she="SENT",uhe="RECEIVED",ket=she,wet=uhe,Pet=Ni([she,uhe])});var lhe=O(()=>{A();che()});var dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,khe,whe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,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,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,k_e,w_e,P_e,M_e,L_e,Met,Let,Uet,Qet,Fet,Get,zet,jet,Het,$et,qet,Vet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,att,stt,utt,ctt,ltt,dtt,ptt,ftt,mtt,Att,gtt,htt,_tt,Ett,ytt,Stt,Ttt,Itt,btt,Ctt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,ktt,wtt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,ztt,jtt,Htt,$tt,qtt,Vtt,Ytt,Ktt,Jtt,Ztt,Wtt,q9,Xtt,ent,tnt,nnt,rnt,ont,int,ant,snt,unt,U_e,Q_e,F_e,G_e,cnt,lnt,dnt,pnt,fnt,z_e,j_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,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,Int,bnt,Cnt,vnt,Rnt,xnt,Dnt,Bnt,Nnt,iEe,aEe,Ont,knt,wnt,sEe,uEe,cEe,lEe,dEe,pEe,fEe,Pnt,Mnt,Lnt,Unt,Qnt,Fnt,Gnt,znt,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,IEe,bEe,jnt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,Znt,Wnt,Xnt,ert,CEe,vEe,REe,xEe,DEe,BEe,NEe,OEe,kEe,wEe,trt,nrt,rrt,ort,irt,art,srt,urt,crt,lrt,drt,PEe=O(()=>{A();O9();dhe="cloud.provider",phe="cloud.account.id",fhe="cloud.region",mhe="cloud.availability_zone",Ahe="cloud.platform",ghe="aws.ecs.container.arn",hhe="aws.ecs.cluster.arn",_he="aws.ecs.launchtype",Ehe="aws.ecs.task.arn",yhe="aws.ecs.task.family",She="aws.ecs.task.revision",The="aws.eks.cluster.arn",Ihe="aws.log.group.names",bhe="aws.log.group.arns",Che="aws.log.stream.names",vhe="aws.log.stream.arns",Rhe="container.name",xhe="container.id",Dhe="container.runtime",Bhe="container.image.name",Nhe="container.image.tag",Ohe="deployment.environment",khe="device.id",whe="device.model.identifier",Phe="device.model.name",Mhe="faas.name",Lhe="faas.id",Uhe="faas.version",Qhe="faas.instance",Fhe="faas.max_memory",Ghe="host.id",zhe="host.name",jhe="host.type",Hhe="host.arch",$he="host.image.name",qhe="host.image.id",Vhe="host.image.version",Yhe="k8s.cluster.name",Khe="k8s.node.name",Jhe="k8s.node.uid",Zhe="k8s.namespace.name",Whe="k8s.pod.uid",Xhe="k8s.pod.name",e_e="k8s.container.name",t_e="k8s.replicaset.uid",n_e="k8s.replicaset.name",r_e="k8s.deployment.uid",o_e="k8s.deployment.name",i_e="k8s.statefulset.uid",a_e="k8s.statefulset.name",s_e="k8s.daemonset.uid",u_e="k8s.daemonset.name",c_e="k8s.job.uid",l_e="k8s.job.name",d_e="k8s.cronjob.uid",p_e="k8s.cronjob.name",f_e="os.type",m_e="os.description",A_e="os.name",g_e="os.version",h_e="process.pid",__e="process.executable.name",E_e="process.executable.path",y_e="process.command",S_e="process.command_line",T_e="process.command_args",I_e="process.owner",b_e="process.runtime.name",C_e="process.runtime.version",v_e="process.runtime.description",R_e="service.name",x_e="service.namespace",D_e="service.instance.id",B_e="service.version",N_e="telemetry.sdk.name",O_e="telemetry.sdk.language",k_e="telemetry.sdk.version",w_e="telemetry.auto.version",P_e="webengine.name",M_e="webengine.version",L_e="webengine.description",Met=dhe,Let=phe,Uet=fhe,Qet=mhe,Fet=Ahe,Get=ghe,zet=hhe,jet=_he,Het=Ehe,$et=yhe,qet=She,Vet=The,Yet=Ihe,Ket=bhe,Jet=Che,Zet=vhe,Wet=Rhe,Xet=xhe,ett=Dhe,ttt=Bhe,ntt=Nhe,rtt=Ohe,ott=khe,itt=whe,att=Phe,stt=Mhe,utt=Lhe,ctt=Uhe,ltt=Qhe,dtt=Fhe,ptt=Ghe,ftt=zhe,mtt=jhe,Att=Hhe,gtt=$he,htt=qhe,_tt=Vhe,Ett=Yhe,ytt=Khe,Stt=Jhe,Ttt=Zhe,Itt=Whe,btt=Xhe,Ctt=e_e,vtt=t_e,Rtt=n_e,xtt=r_e,Dtt=o_e,Btt=i_e,Ntt=a_e,Ott=s_e,ktt=u_e,wtt=c_e,Ptt=l_e,Mtt=d_e,Ltt=p_e,Utt=f_e,Qtt=m_e,Ftt=A_e,Gtt=g_e,ztt=h_e,jtt=__e,Htt=E_e,$tt=y_e,qtt=S_e,Vtt=T_e,Ytt=I_e,Ktt=b_e,Jtt=C_e,Ztt=v_e,Wtt=R_e,q9=x_e,Xtt=D_e,ent=B_e,tnt=N_e,nnt=O_e,rnt=k_e,ont=w_e,int=P_e,ant=M_e,snt=L_e,unt=Ni([dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,khe,whe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,a_e,s_e,u_e,c_e,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,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,k_e,w_e,P_e,M_e,L_e]),U_e="alibaba_cloud",Q_e="aws",F_e="azure",G_e="gcp",cnt=U_e,lnt=Q_e,dnt=F_e,pnt=G_e,fnt=Ni([U_e,Q_e,F_e,G_e]),z_e="alibaba_cloud_ecs",j_e="alibaba_cloud_fc",H_e="aws_ec2",$_e="aws_ecs",q_e="aws_eks",V_e="aws_lambda",Y_e="aws_elastic_beanstalk",K_e="azure_vm",J_e="azure_container_instances",Z_e="azure_aks",W_e="azure_functions",X_e="azure_app_service",eEe="gcp_compute_engine",tEe="gcp_cloud_run",nEe="gcp_kubernetes_engine",rEe="gcp_cloud_functions",oEe="gcp_app_engine",mnt=z_e,Ant=j_e,gnt=H_e,hnt=$_e,_nt=q_e,Ent=V_e,ynt=Y_e,Snt=K_e,Tnt=J_e,Int=Z_e,bnt=W_e,Cnt=X_e,vnt=eEe,Rnt=tEe,xnt=nEe,Dnt=rEe,Bnt=oEe,Nnt=Ni([z_e,j_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="ec2",aEe="fargate",Ont=iEe,knt=aEe,wnt=Ni([iEe,aEe]),sEe="amd64",uEe="arm32",cEe="arm64",lEe="ia64",dEe="ppc32",pEe="ppc64",fEe="x86",Pnt=sEe,Mnt=uEe,Lnt=cEe,Unt=lEe,Qnt=dEe,Fnt=pEe,Gnt=fEe,znt=Ni([sEe,uEe,cEe,lEe,dEe,pEe,fEe]),mEe="windows",AEe="linux",gEe="darwin",hEe="freebsd",_Ee="netbsd",EEe="openbsd",yEe="dragonflybsd",SEe="hpux",TEe="aix",IEe="solaris",bEe="z_os",jnt=mEe,Hnt=AEe,$nt=gEe,qnt=hEe,Vnt=_Ee,Ynt=EEe,Knt=yEe,Jnt=SEe,Znt=TEe,Wnt=IEe,Xnt=bEe,ert=Ni([mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,TEe,IEe,bEe]),CEe="cpp",vEe="dotnet",REe="erlang",xEe="go",DEe="java",BEe="nodejs",NEe="php",OEe="python",kEe="ruby",wEe="webjs",trt=CEe,nrt=vEe,rrt=REe,ort=xEe,irt=DEe,art=BEe,srt=NEe,urt=OEe,crt=kEe,lrt=wEe,drt=Ni([CEe,vEe,REe,xEe,DEe,BEe,NEe,OEe,kEe,wEe])});var MEe=O(()=>{A();PEe()});var prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,Irt,brt,Crt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,krt,wrt,Prt,Mrt,V9,Y9,Lrt,iC,Urt,K9,J9,Qrt,My,Frt,Grt,zrt,jrt,Hrt,$rt,qrt,Vrt,dYt,pYt,Z9,Yrt,Krt,Jrt,Zrt,Wrt,Xrt,Ly,eot,tot,not,fYt,rot,oot,iot,aot,mYt,sot,uot,cot,lot,fg,mg,dot,pot,fot,mot,Aot,got,hot,_ot,Eot,AYt,yot,Sot,Tot,Iot,bot,Cot,W9,X9,vot,e5,t5,Rot,xot,gYt,hYt,Dot,Bot,Not,Oot,kot,wot,Pot,Mot,_Yt,Lot,n5,r5,Uot,o5,Qot,i5,Fot,Got,zot,jot,Hot,$ot,qot,Vot,Yot,EYt,Kot,Jot,yYt,Zot,Wot,SYt,Xot,eit,tit,nit,rit,oit,iit,ait,p_,sit,uit,cit,a5,LEe=O(()=>{A();prt="aspnetcore.diagnostics.exception.result",frt="aborted",mrt="handled",Art="skipped",grt="unhandled",hrt="aspnetcore.diagnostics.handler.type",_rt="aspnetcore.rate_limiting.policy",Ert="aspnetcore.rate_limiting.result",yrt="acquired",Srt="endpoint_limiter",Trt="global_limiter",Irt="request_canceled",brt="aspnetcore.request.is_unhandled",Crt="aspnetcore.routing.is_fallback",vrt="aspnetcore.routing.match_status",Rrt="failure",xrt="success",Drt="aspnetcore.user.is_authenticated",Brt="client.address",Nrt="client.port",Ort="code.column.number",krt="code.file.path",wrt="code.function.name",Prt="code.line.number",Mrt="code.stacktrace",V9="db.collection.name",Y9="db.namespace",Lrt="db.operation.batch.size",iC="db.operation.name",Urt="db.query.summary",K9="db.query.text",J9="db.response.status_code",Qrt="db.stored_procedure.name",My="db.system.name",Frt="mariadb",Grt="microsoft.sql_server",zrt="mysql",jrt="postgresql",Hrt="dotnet.gc.heap.generation",$rt="gen0",qrt="gen1",Vrt="gen2",dYt="loh",pYt="poh",Z9="error.type",Yrt="_OTHER",Krt="exception.escaped",Jrt="exception.message",Zrt="exception.stacktrace",Wrt="exception.type",Xrt=e=>`http.request.header.${e}`,Ly="http.request.method",eot="_OTHER",tot="CONNECT",not="DELETE",fYt="GET",rot="HEAD",oot="OPTIONS",iot="PATCH",aot="POST",mYt="PUT",sot="TRACE",uot="http.request.method_original",cot="http.request.resend_count",lot=e=>`http.response.header.${e}`,fg="http.response.status_code",mg="http.route",dot="jvm.gc.action",pot="jvm.gc.name",fot="jvm.memory.pool.name",mot="jvm.memory.type",Aot="heap",got="non_heap",hot="jvm.thread.daemon",_ot="jvm.thread.state",Eot="blocked",AYt="new",yot="runnable",Sot="terminated",Tot="timed_waiting",Iot="waiting",bot="network.local.address",Cot="network.local.port",W9="network.peer.address",X9="network.peer.port",vot="network.protocol.name",e5="network.protocol.version",t5="network.transport",Rot="pipe",xot="quic",gYt="tcp",hYt="udp",Dot="unix",Bot="network.type",Not="ipv4",Oot="ipv6",kot="otel.scope.name",wot="otel.scope.version",Pot="otel.status_code",Mot="ERROR",_Yt="OK",Lot="otel.status_description",n5="server.address",r5="server.port",Uot="service.instance.id",o5="service.name",Qot="service.namespace",i5="service.version",Fot="signalr.connection.status",Got="app_shutdown",zot="normal_closure",jot="timeout",Hot="signalr.transport",$ot="long_polling",qot="server_sent_events",Vot="web_sockets",Yot="telemetry.sdk.language",EYt="cpp",Kot="dotnet",Jot="erlang",yYt="go",Zot="java",Wot="nodejs",SYt="php",Xot="python",eit="ruby",tit="rust",nit="swift",rit="webjs",oit="telemetry.sdk.name",iit="telemetry.sdk.version",ait="url.fragment",p_="url.full",sit="url.path",uit="url.query",cit="url.scheme",a5="user_agent.original"});var lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,Iit,bit,Cit,vit,Rit,xit,Dit,Bit,Nit,Oit,kit,wit,Pit,Mit,Lit,Uit,Qit,Fit,Git,zit,jit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,eat,tat,nat,rat,oat,iat,aat,UEe=O(()=>{A();lit="aspnetcore.diagnostics.exceptions",dit="aspnetcore.rate_limiting.active_request_leases",pit="aspnetcore.rate_limiting.queued_requests",fit="aspnetcore.rate_limiting.request.time_in_queue",mit="aspnetcore.rate_limiting.request_lease.duration",Ait="aspnetcore.rate_limiting.requests",git="aspnetcore.routing.match_attempts",hit="db.client.operation.duration",_it="dotnet.assembly.count",Eit="dotnet.exceptions",yit="dotnet.gc.collections",Sit="dotnet.gc.heap.total_allocated",Tit="dotnet.gc.last_collection.heap.fragmentation.size",Iit="dotnet.gc.last_collection.heap.size",bit="dotnet.gc.last_collection.memory.committed_size",Cit="dotnet.gc.pause.time",vit="dotnet.jit.compilation.time",Rit="dotnet.jit.compiled_il.size",xit="dotnet.jit.compiled_methods",Dit="dotnet.monitor.lock_contentions",Bit="dotnet.process.cpu.count",Nit="dotnet.process.cpu.time",Oit="dotnet.process.memory.working_set",kit="dotnet.thread_pool.queue.length",wit="dotnet.thread_pool.thread.count",Pit="dotnet.thread_pool.work_item.count",Mit="dotnet.timer.count",Lit="http.client.request.duration",Uit="http.server.request.duration",Qit="jvm.class.count",Fit="jvm.class.loaded",Git="jvm.class.unloaded",zit="jvm.cpu.count",jit="jvm.cpu.recent_utilization",Hit="jvm.cpu.time",$it="jvm.gc.duration",qit="jvm.memory.committed",Vit="jvm.memory.limit",Yit="jvm.memory.used",Kit="jvm.memory.used_after_last_gc",Jit="jvm.thread.count",Zit="kestrel.active_connections",Wit="kestrel.active_tls_handshakes",Xit="kestrel.connection.duration",eat="kestrel.queued_connections",tat="kestrel.queued_requests",nat="kestrel.rejected_connections",rat="kestrel.tls_handshake.duration",oat="kestrel.upgraded_connections",iat="signalr.server.active_connections",aat="signalr.server.connection.duration"});var sat,QEe=O(()=>{A();sat="exception"});var Fr={};$a(Fr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>frt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>mrt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>Art,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>grt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>yrt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>Srt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>Trt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Irt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Rrt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>xrt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>prt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>hrt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>_rt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Ert,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>brt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Crt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>vrt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Drt,ATTR_CLIENT_ADDRESS:()=>Brt,ATTR_CLIENT_PORT:()=>Nrt,ATTR_CODE_COLUMN_NUMBER:()=>Ort,ATTR_CODE_FILE_PATH:()=>krt,ATTR_CODE_FUNCTION_NAME:()=>wrt,ATTR_CODE_LINE_NUMBER:()=>Prt,ATTR_CODE_STACKTRACE:()=>Mrt,ATTR_DB_COLLECTION_NAME:()=>V9,ATTR_DB_NAMESPACE:()=>Y9,ATTR_DB_OPERATION_BATCH_SIZE:()=>Lrt,ATTR_DB_OPERATION_NAME:()=>iC,ATTR_DB_QUERY_SUMMARY:()=>Urt,ATTR_DB_QUERY_TEXT:()=>K9,ATTR_DB_RESPONSE_STATUS_CODE:()=>J9,ATTR_DB_STORED_PROCEDURE_NAME:()=>Qrt,ATTR_DB_SYSTEM_NAME:()=>My,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Hrt,ATTR_ERROR_TYPE:()=>Z9,ATTR_EXCEPTION_ESCAPED:()=>Krt,ATTR_EXCEPTION_MESSAGE:()=>Jrt,ATTR_EXCEPTION_STACKTRACE:()=>Zrt,ATTR_EXCEPTION_TYPE:()=>Wrt,ATTR_HTTP_REQUEST_HEADER:()=>Xrt,ATTR_HTTP_REQUEST_METHOD:()=>Ly,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>uot,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>cot,ATTR_HTTP_RESPONSE_HEADER:()=>lot,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>fg,ATTR_HTTP_ROUTE:()=>mg,ATTR_JVM_GC_ACTION:()=>dot,ATTR_JVM_GC_NAME:()=>pot,ATTR_JVM_MEMORY_POOL_NAME:()=>fot,ATTR_JVM_MEMORY_TYPE:()=>mot,ATTR_JVM_THREAD_DAEMON:()=>hot,ATTR_JVM_THREAD_STATE:()=>_ot,ATTR_NETWORK_LOCAL_ADDRESS:()=>bot,ATTR_NETWORK_LOCAL_PORT:()=>Cot,ATTR_NETWORK_PEER_ADDRESS:()=>W9,ATTR_NETWORK_PEER_PORT:()=>X9,ATTR_NETWORK_PROTOCOL_NAME:()=>vot,ATTR_NETWORK_PROTOCOL_VERSION:()=>e5,ATTR_NETWORK_TRANSPORT:()=>t5,ATTR_NETWORK_TYPE:()=>Bot,ATTR_OTEL_SCOPE_NAME:()=>kot,ATTR_OTEL_SCOPE_VERSION:()=>wot,ATTR_OTEL_STATUS_CODE:()=>Pot,ATTR_OTEL_STATUS_DESCRIPTION:()=>Lot,ATTR_SERVER_ADDRESS:()=>n5,ATTR_SERVER_PORT:()=>r5,ATTR_SERVICE_INSTANCE_ID:()=>Uot,ATTR_SERVICE_NAME:()=>o5,ATTR_SERVICE_NAMESPACE:()=>Qot,ATTR_SERVICE_VERSION:()=>i5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Fot,ATTR_SIGNALR_TRANSPORT:()=>Hot,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Yot,ATTR_TELEMETRY_SDK_NAME:()=>oit,ATTR_TELEMETRY_SDK_VERSION:()=>iit,ATTR_URL_FRAGMENT:()=>ait,ATTR_URL_FULL:()=>p_,ATTR_URL_PATH:()=>sit,ATTR_URL_QUERY:()=>uit,ATTR_URL_SCHEME:()=>cit,ATTR_USER_AGENT_ORIGINAL:()=>a5,AWSECSLAUNCHTYPEVALUES_EC2:()=>Ont,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>knt,AwsEcsLaunchtypeValues:()=>wnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>mnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>Ant,CLOUDPLATFORMVALUES_AWS_EC2:()=>gnt,CLOUDPLATFORMVALUES_AWS_ECS:()=>hnt,CLOUDPLATFORMVALUES_AWS_EKS:()=>_nt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>ynt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Ent,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Int,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Cnt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>Tnt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>bnt,CLOUDPLATFORMVALUES_AZURE_VM:()=>Snt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>Bnt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Dnt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Rnt,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>vnt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>xnt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>cnt,CLOUDPROVIDERVALUES_AWS:()=>lnt,CLOUDPROVIDERVALUES_AZURE:()=>dnt,CLOUDPROVIDERVALUES_GCP:()=>pnt,CloudPlatformValues:()=>Nnt,CloudProviderValues:()=>fnt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>qWe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>eXe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>VWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>XWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>KWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>nXe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>JWe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>YWe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>tXe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>WWe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>ZWe,DBSYSTEMVALUES_ADABAS:()=>AWe,DBSYSTEMVALUES_CACHE:()=>mWe,DBSYSTEMVALUES_CASSANDRA:()=>OWe,DBSYSTEMVALUES_CLOUDSCAPE:()=>aWe,DBSYSTEMVALUES_COCKROACHDB:()=>HWe,DBSYSTEMVALUES_COLDFUSION:()=>NWe,DBSYSTEMVALUES_COSMOSDB:()=>UWe,DBSYSTEMVALUES_COUCHBASE:()=>MWe,DBSYSTEMVALUES_COUCHDB:()=>LWe,DBSYSTEMVALUES_DB2:()=>nWe,DBSYSTEMVALUES_DERBY:()=>hWe,DBSYSTEMVALUES_DYNAMODB:()=>QWe,DBSYSTEMVALUES_EDB:()=>fWe,DBSYSTEMVALUES_ELASTICSEARCH:()=>zWe,DBSYSTEMVALUES_FILEMAKER:()=>_We,DBSYSTEMVALUES_FIREBIRD:()=>gWe,DBSYSTEMVALUES_FIRSTSQL:()=>pWe,DBSYSTEMVALUES_GEODE:()=>GWe,DBSYSTEMVALUES_H2:()=>BWe,DBSYSTEMVALUES_HANADB:()=>lWe,DBSYSTEMVALUES_HBASE:()=>kWe,DBSYSTEMVALUES_HIVE:()=>iWe,DBSYSTEMVALUES_HSQLDB:()=>sWe,DBSYSTEMVALUES_INFORMIX:()=>EWe,DBSYSTEMVALUES_INGRES:()=>dWe,DBSYSTEMVALUES_INSTANTDB:()=>yWe,DBSYSTEMVALUES_INTERBASE:()=>SWe,DBSYSTEMVALUES_MARIADB:()=>TWe,DBSYSTEMVALUES_MAXDB:()=>cWe,DBSYSTEMVALUES_MEMCACHED:()=>jWe,DBSYSTEMVALUES_MONGODB:()=>wWe,DBSYSTEMVALUES_MSSQL:()=>XZe,DBSYSTEMVALUES_MYSQL:()=>eWe,DBSYSTEMVALUES_NEO4J:()=>FWe,DBSYSTEMVALUES_NETEZZA:()=>IWe,DBSYSTEMVALUES_ORACLE:()=>tWe,DBSYSTEMVALUES_OTHER_SQL:()=>WZe,DBSYSTEMVALUES_PERVASIVE:()=>bWe,DBSYSTEMVALUES_POINTBASE:()=>CWe,DBSYSTEMVALUES_POSTGRESQL:()=>rWe,DBSYSTEMVALUES_PROGRESS:()=>uWe,DBSYSTEMVALUES_REDIS:()=>PWe,DBSYSTEMVALUES_REDSHIFT:()=>oWe,DBSYSTEMVALUES_SQLITE:()=>vWe,DBSYSTEMVALUES_SYBASE:()=>RWe,DBSYSTEMVALUES_TERADATA:()=>xWe,DBSYSTEMVALUES_VERTICA:()=>DWe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Frt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Grt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>zrt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>jrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>$rt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>qrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>Vrt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>dYt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>pYt,DbCassandraConsistencyLevelValues:()=>rXe,DbSystemValues:()=>$We,ERROR_TYPE_VALUE_OTHER:()=>Yrt,EVENT_EXCEPTION:()=>sat,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>pXe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>dXe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>lXe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>mXe,FAASINVOKEDPROVIDERVALUES_AWS:()=>AXe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>gXe,FAASINVOKEDPROVIDERVALUES_GCP:()=>hXe,FAASTRIGGERVALUES_DATASOURCE:()=>oXe,FAASTRIGGERVALUES_HTTP:()=>iXe,FAASTRIGGERVALUES_OTHER:()=>uXe,FAASTRIGGERVALUES_PUBSUB:()=>aXe,FAASTRIGGERVALUES_TIMER:()=>sXe,FaasDocumentOperationValues:()=>fXe,FaasInvokedProviderValues:()=>_Xe,FaasTriggerValues:()=>cXe,HOSTARCHVALUES_AMD64:()=>Pnt,HOSTARCHVALUES_ARM32:()=>Mnt,HOSTARCHVALUES_ARM64:()=>Lnt,HOSTARCHVALUES_IA64:()=>Unt,HOSTARCHVALUES_PPC32:()=>Qnt,HOSTARCHVALUES_PPC64:()=>Fnt,HOSTARCHVALUES_X86:()=>Gnt,HTTPFLAVORVALUES_HTTP_1_0:()=>tet,HTTPFLAVORVALUES_HTTP_1_1:()=>net,HTTPFLAVORVALUES_HTTP_2_0:()=>ret,HTTPFLAVORVALUES_QUIC:()=>iet,HTTPFLAVORVALUES_SPDY:()=>oet,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>tot,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>not,HTTP_REQUEST_METHOD_VALUE_GET:()=>fYt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>rot,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>oot,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>eot,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>iot,HTTP_REQUEST_METHOD_VALUE_POST:()=>aot,HTTP_REQUEST_METHOD_VALUE_PUT:()=>mYt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>sot,HostArchValues:()=>znt,HttpFlavorValues:()=>aet,JVM_MEMORY_TYPE_VALUE_HEAP:()=>Aot,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>got,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Eot,JVM_THREAD_STATE_VALUE_NEW:()=>AYt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>yot,JVM_THREAD_STATE_VALUE_TERMINATED:()=>Sot,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>Tot,JVM_THREAD_STATE_VALUE_WAITING:()=>Iot,MESSAGETYPEVALUES_RECEIVED:()=>wet,MESSAGETYPEVALUES_SENT:()=>ket,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>set,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>uet,MESSAGINGOPERATIONVALUES_PROCESS:()=>pet,MESSAGINGOPERATIONVALUES_RECEIVE:()=>det,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>lit,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>dit,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>pit,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>Ait,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>mit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>fit,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>git,METRIC_DB_CLIENT_OPERATION_DURATION:()=>hit,METRIC_DOTNET_ASSEMBLY_COUNT:()=>_it,METRIC_DOTNET_EXCEPTIONS:()=>Eit,METRIC_DOTNET_GC_COLLECTIONS:()=>yit,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>Sit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>Tit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Iit,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>bit,METRIC_DOTNET_GC_PAUSE_TIME:()=>Cit,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>vit,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Rit,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>xit,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Dit,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>Bit,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Nit,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>Oit,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>kit,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>wit,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Pit,METRIC_DOTNET_TIMER_COUNT:()=>Mit,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>Lit,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>Uit,METRIC_JVM_CLASS_COUNT:()=>Qit,METRIC_JVM_CLASS_LOADED:()=>Fit,METRIC_JVM_CLASS_UNLOADED:()=>Git,METRIC_JVM_CPU_COUNT:()=>zit,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>jit,METRIC_JVM_CPU_TIME:()=>Hit,METRIC_JVM_GC_DURATION:()=>$it,METRIC_JVM_MEMORY_COMMITTED:()=>qit,METRIC_JVM_MEMORY_LIMIT:()=>Vit,METRIC_JVM_MEMORY_USED:()=>Yit,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>Kit,METRIC_JVM_THREAD_COUNT:()=>Jit,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Zit,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Wit,METRIC_KESTREL_CONNECTION_DURATION:()=>Xit,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>eat,METRIC_KESTREL_QUEUED_REQUESTS:()=>tat,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>nat,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>rat,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>oat,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>iat,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>aat,MessageTypeValues:()=>Pet,MessagingDestinationKindValues:()=>cet,MessagingOperationValues:()=>fet,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>MXe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>QXe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>wXe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>qXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>LXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>UXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>HXe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>kXe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>YXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>FXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>zXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>VXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>GXe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>jXe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>JXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>$Xe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>XXe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>ZXe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>WXe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>KXe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>PXe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>DXe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>BXe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>NXe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>RXe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>xXe,NETTRANSPORTVALUES_INPROC:()=>bXe,NETTRANSPORTVALUES_IP:()=>SXe,NETTRANSPORTVALUES_IP_TCP:()=>EXe,NETTRANSPORTVALUES_IP_UDP:()=>yXe,NETTRANSPORTVALUES_OTHER:()=>CXe,NETTRANSPORTVALUES_PIPE:()=>IXe,NETTRANSPORTVALUES_UNIX:()=>TXe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Rot,NETWORK_TRANSPORT_VALUE_QUIC:()=>xot,NETWORK_TRANSPORT_VALUE_TCP:()=>gYt,NETWORK_TRANSPORT_VALUE_UDP:()=>hYt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Dot,NETWORK_TYPE_VALUE_IPV4:()=>Not,NETWORK_TYPE_VALUE_IPV6:()=>Oot,NetHostConnectionSubtypeValues:()=>eet,NetHostConnectionTypeValues:()=>OXe,NetTransportValues:()=>vXe,OSTYPEVALUES_AIX:()=>Znt,OSTYPEVALUES_DARWIN:()=>$nt,OSTYPEVALUES_DRAGONFLYBSD:()=>Knt,OSTYPEVALUES_FREEBSD:()=>qnt,OSTYPEVALUES_HPUX:()=>Jnt,OSTYPEVALUES_LINUX:()=>Hnt,OSTYPEVALUES_NETBSD:()=>Vnt,OSTYPEVALUES_OPENBSD:()=>Ynt,OSTYPEVALUES_SOLARIS:()=>Wnt,OSTYPEVALUES_WINDOWS:()=>jnt,OSTYPEVALUES_Z_OS:()=>Xnt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Mot,OTEL_STATUS_CODE_VALUE_OK:()=>_Yt,OsTypeValues:()=>ert,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>Cet,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>yet,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>Aet,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>Bet,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>_et,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>bet,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>xet,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>het,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Eet,RPCGRPCSTATUSCODEVALUES_OK:()=>met,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>vet,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>Tet,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>Iet,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Net,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Det,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Ret,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>get,RpcGrpcStatusCodeValues:()=>Oet,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>cZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>SZe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>aZe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>nZe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>EZe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>mZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>pZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>TZe,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>lZe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>rZe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>uZe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>fZe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>sZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>oZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>iZe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>yZe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>gZe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>hZe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>dZe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>AZe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>tZe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>_Ze,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>VKe,SEMATTRS_CODE_FILEPATH:()=>$Je,SEMATTRS_CODE_FUNCTION:()=>jJe,SEMATTRS_CODE_LINENO:()=>qJe,SEMATTRS_CODE_NAMESPACE:()=>HJe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>nJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>sJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>aJe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>oJe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>eJe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>tJe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>iJe,SEMATTRS_DB_CASSANDRA_TABLE:()=>rJe,SEMATTRS_DB_CONNECTION_STRING:()=>YKe,SEMATTRS_DB_HBASE_NAMESPACE:()=>uJe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>JKe,SEMATTRS_DB_MONGODB_COLLECTION:()=>lJe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>XKe,SEMATTRS_DB_NAME:()=>ZKe,SEMATTRS_DB_OPERATION:()=>WKe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>cJe,SEMATTRS_DB_SQL_TABLE:()=>dJe,SEMATTRS_DB_STATEMENT:()=>w9,SEMATTRS_DB_SYSTEM:()=>k9,SEMATTRS_DB_USER:()=>KKe,SEMATTRS_ENDUSER_ID:()=>UJe,SEMATTRS_ENDUSER_ROLE:()=>QJe,SEMATTRS_ENDUSER_SCOPE:()=>FJe,SEMATTRS_EXCEPTION_ESCAPED:()=>AJe,SEMATTRS_EXCEPTION_MESSAGE:()=>fJe,SEMATTRS_EXCEPTION_STACKTRACE:()=>mJe,SEMATTRS_EXCEPTION_TYPE:()=>pJe,SEMATTRS_FAAS_COLDSTART:()=>IJe,SEMATTRS_FAAS_CRON:()=>TJe,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>hJe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>yJe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>_Je,SEMATTRS_FAAS_DOCUMENT_TIME:()=>EJe,SEMATTRS_FAAS_EXECUTION:()=>gJe,SEMATTRS_FAAS_INVOKED_NAME:()=>bJe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>CJe,SEMATTRS_FAAS_INVOKED_REGION:()=>vJe,SEMATTRS_FAAS_TIME:()=>SJe,SEMATTRS_FAAS_TRIGGER:()=>P9,SEMATTRS_HTTP_CLIENT_IP:()=>eZe,SEMATTRS_HTTP_FLAVOR:()=>KJe,SEMATTRS_HTTP_HOST:()=>VJe,SEMATTRS_HTTP_METHOD:()=>gB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>ZJe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>WJe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>F9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>G9,SEMATTRS_HTTP_ROUTE:()=>z9,SEMATTRS_HTTP_SCHEME:()=>YJe,SEMATTRS_HTTP_SERVER_NAME:()=>XJe,SEMATTRS_HTTP_STATUS_CODE:()=>Py,SEMATTRS_HTTP_TARGET:()=>Q9,SEMATTRS_HTTP_URL:()=>oC,SEMATTRS_HTTP_USER_AGENT:()=>JJe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>KZe,SEMATTRS_MESSAGE_ID:()=>YZe,SEMATTRS_MESSAGE_TYPE:()=>VZe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>JZe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>wZe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>BZe,SEMATTRS_MESSAGING_DESTINATION:()=>IZe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>bZe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>UZe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>LZe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>MZe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>QZe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>FZe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>DZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>OZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>NZe,SEMATTRS_MESSAGING_OPERATION:()=>kZe,SEMATTRS_MESSAGING_PROTOCOL:()=>vZe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>RZe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>PZe,SEMATTRS_MESSAGING_SYSTEM:()=>j9,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>CZe,SEMATTRS_MESSAGING_URL:()=>xZe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>MJe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>wJe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>PJe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>kJe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>OJe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>NJe,SEMATTRS_NET_HOST_IP:()=>L9,SEMATTRS_NET_HOST_NAME:()=>BJe,SEMATTRS_NET_HOST_PORT:()=>U9,SEMATTRS_NET_PEER_IP:()=>M9,SEMATTRS_NET_PEER_NAME:()=>DJe,SEMATTRS_NET_PEER_PORT:()=>xJe,SEMATTRS_NET_TRANSPORT:()=>RJe,SEMATTRS_PEER_SERVICE:()=>LJe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>$9,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>$Ze,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>qZe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>HZe,SEMATTRS_RPC_JSONRPC_VERSION:()=>jZe,SEMATTRS_RPC_METHOD:()=>zZe,SEMATTRS_RPC_SERVICE:()=>H9,SEMATTRS_RPC_SYSTEM:()=>GZe,SEMATTRS_THREAD_ID:()=>GJe,SEMATTRS_THREAD_NAME:()=>zJe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>zet,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Get,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>jet,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Het,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>$et,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>qet,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>Vet,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>Ket,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Yet,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Zet,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>Jet,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>Let,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Qet,SEMRESATTRS_CLOUD_PLATFORM:()=>Fet,SEMRESATTRS_CLOUD_PROVIDER:()=>Met,SEMRESATTRS_CLOUD_REGION:()=>Uet,SEMRESATTRS_CONTAINER_ID:()=>Xet,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>ttt,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>ntt,SEMRESATTRS_CONTAINER_NAME:()=>Wet,SEMRESATTRS_CONTAINER_RUNTIME:()=>ett,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>rtt,SEMRESATTRS_DEVICE_ID:()=>ott,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>itt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>att,SEMRESATTRS_FAAS_ID:()=>utt,SEMRESATTRS_FAAS_INSTANCE:()=>ltt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>dtt,SEMRESATTRS_FAAS_NAME:()=>stt,SEMRESATTRS_FAAS_VERSION:()=>ctt,SEMRESATTRS_HOST_ARCH:()=>Att,SEMRESATTRS_HOST_ID:()=>ptt,SEMRESATTRS_HOST_IMAGE_ID:()=>htt,SEMRESATTRS_HOST_IMAGE_NAME:()=>gtt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>_tt,SEMRESATTRS_HOST_NAME:()=>ftt,SEMRESATTRS_HOST_TYPE:()=>mtt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Ett,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Ctt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>Ltt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Mtt,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>ktt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>Ott,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Dtt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>xtt,SEMRESATTRS_K8S_JOB_NAME:()=>Ptt,SEMRESATTRS_K8S_JOB_UID:()=>wtt,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>Ttt,SEMRESATTRS_K8S_NODE_NAME:()=>ytt,SEMRESATTRS_K8S_NODE_UID:()=>Stt,SEMRESATTRS_K8S_POD_NAME:()=>btt,SEMRESATTRS_K8S_POD_UID:()=>Itt,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Rtt,SEMRESATTRS_K8S_REPLICASET_UID:()=>vtt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Ntt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>Btt,SEMRESATTRS_OS_DESCRIPTION:()=>Qtt,SEMRESATTRS_OS_NAME:()=>Ftt,SEMRESATTRS_OS_TYPE:()=>Utt,SEMRESATTRS_OS_VERSION:()=>Gtt,SEMRESATTRS_PROCESS_COMMAND:()=>$tt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>Vtt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>qtt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>jtt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Htt,SEMRESATTRS_PROCESS_OWNER:()=>Ytt,SEMRESATTRS_PROCESS_PID:()=>ztt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Ztt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>Ktt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>Jtt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Xtt,SEMRESATTRS_SERVICE_NAME:()=>Wtt,SEMRESATTRS_SERVICE_NAMESPACE:()=>q9,SEMRESATTRS_SERVICE_VERSION:()=>ent,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>ont,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>nnt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>tnt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>rnt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>snt,SEMRESATTRS_WEBENGINE_NAME:()=>int,SEMRESATTRS_WEBENGINE_VERSION:()=>ant,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Got,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>zot,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>jot,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>$ot,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>qot,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>Vot,SemanticAttributes:()=>ZZe,SemanticResourceAttributes:()=>unt,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>trt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>nrt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>rrt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ort,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>irt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>art,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>srt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>urt,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>crt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>lrt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>EYt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>Kot,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>Jot,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>yYt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Zot,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Wot,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>SYt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Xot,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>eit,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>tit,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>nit,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>rit,TelemetrySdkLanguageValues:()=>drt});var Wn=O(()=>{A();lhe();MEe();LEe();UEe();QEe()});var FEe=F(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.ATTR_PROCESS_RUNTIME_NAME=void 0;GM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var GEe=F(jM=>{"use strict";A();Object.defineProperty(jM,"__esModule",{value:!0});jM.SDK_INFO=void 0;var uat=Epe(),zM=(Wn(),Me(Fr)),cat=FEe();jM.SDK_INFO={[zM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[cat.ATTR_PROCESS_RUNTIME_NAME]:"node",[zM.ATTR_TELEMETRY_SDK_LANGUAGE]:zM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[zM.ATTR_TELEMETRY_SDK_VERSION]:uat.VERSION}});var zEe=F(Ws=>{"use strict";A();Object.defineProperty(Ws,"__esModule",{value:!0});Ws.otperformance=Ws.SDK_INFO=Ws._globalThis=Ws.getStringListFromEnv=Ws.getNumberFromEnv=Ws.getBooleanFromEnv=Ws.getStringFromEnv=void 0;var HM=hpe();Object.defineProperty(Ws,"getStringFromEnv",{enumerable:!0,get:function(){return HM.getStringFromEnv}});Object.defineProperty(Ws,"getBooleanFromEnv",{enumerable:!0,get:function(){return HM.getBooleanFromEnv}});Object.defineProperty(Ws,"getNumberFromEnv",{enumerable:!0,get:function(){return HM.getNumberFromEnv}});Object.defineProperty(Ws,"getStringListFromEnv",{enumerable:!0,get:function(){return HM.getStringListFromEnv}});var lat=_pe();Object.defineProperty(Ws,"_globalThis",{enumerable:!0,get:function(){return lat._globalThis}});var dat=GEe();Object.defineProperty(Ws,"SDK_INFO",{enumerable:!0,get:function(){return dat.SDK_INFO}});Ws.otperformance=performance});var s5=F(Xs=>{"use strict";A();Object.defineProperty(Xs,"__esModule",{value:!0});Xs.getStringListFromEnv=Xs.getNumberFromEnv=Xs.getStringFromEnv=Xs.getBooleanFromEnv=Xs.otperformance=Xs._globalThis=Xs.SDK_INFO=void 0;var Uy=zEe();Object.defineProperty(Xs,"SDK_INFO",{enumerable:!0,get:function(){return Uy.SDK_INFO}});Object.defineProperty(Xs,"_globalThis",{enumerable:!0,get:function(){return Uy._globalThis}});Object.defineProperty(Xs,"otperformance",{enumerable:!0,get:function(){return Uy.otperformance}});Object.defineProperty(Xs,"getBooleanFromEnv",{enumerable:!0,get:function(){return Uy.getBooleanFromEnv}});Object.defineProperty(Xs,"getStringFromEnv",{enumerable:!0,get:function(){return Uy.getStringFromEnv}});Object.defineProperty(Xs,"getNumberFromEnv",{enumerable:!0,get:function(){return Uy.getNumberFromEnv}});Object.defineProperty(Xs,"getStringListFromEnv",{enumerable:!0,get:function(){return Uy.getStringListFromEnv}})});var qEe=F(Gr=>{"use strict";A();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.addHrTimes=Gr.isTimeInput=Gr.isTimeInputHrTime=Gr.hrTimeToSeconds=Gr.hrTimeToMilliseconds=Gr.hrTimeToMicroseconds=Gr.hrTimeToNanoseconds=Gr.hrTimeToTimeStamp=Gr.hrTimeDuration=Gr.timeInputToHrTime=Gr.hrTime=Gr.getTimeOrigin=Gr.millisToHrTime=void 0;var $M=s5(),jEe=9,pat=6,fat=Math.pow(10,pat),hB=Math.pow(10,jEe);function _B(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*fat);return[n,r]}Gr.millisToHrTime=_B;function mat(){return $M.otperformance.timeOrigin}Gr.getTimeOrigin=mat;function HEe(e){let t=_B($M.otperformance.timeOrigin),n=_B(typeof e=="number"?e:$M.otperformance.now());return $Ee(t,n)}Gr.hrTime=HEe;function Aat(e){if(u5(e))return e;if(typeof e=="number")return e<$M.otperformance.timeOrigin?HEe(e):_B(e);if(e instanceof Date)return _B(e.getTime());throw TypeError("Invalid input type")}Gr.timeInputToHrTime=Aat;function gat(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=hB),[n,r]}Gr.hrTimeDuration=gat;function hat(e){let t=jEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Gr.hrTimeToTimeStamp=hat;function _at(e){return e[0]*hB+e[1]}Gr.hrTimeToNanoseconds=_at;function Eat(e){return e[0]*1e6+e[1]/1e3}Gr.hrTimeToMicroseconds=Eat;function yat(e){return e[0]*1e3+e[1]/1e6}Gr.hrTimeToMilliseconds=yat;function Sat(e){return e[0]+e[1]/hB}Gr.hrTimeToSeconds=Sat;function u5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Gr.isTimeInputHrTime=u5;function Tat(e){return u5(e)||typeof e=="number"||e instanceof Date}Gr.isTimeInput=Tat;function $Ee(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=hB&&(n[1]-=hB,n[0]+=1),n}Gr.addHrTimes=$Ee});var VEe=F(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.unrefTimer=void 0;function Iat(e){typeof e!="number"&&e.unref()}qM.unrefTimer=Iat});var YEe=F(EB=>{"use strict";A();Object.defineProperty(EB,"__esModule",{value:!0});EB.ExportResultCode=void 0;var bat;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(bat=EB.ExportResultCode||(EB.ExportResultCode={}))});var JEe=F(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.CompositePropagator=void 0;var KEe=(ze(),Me(We)),c5=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){KEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(a){KEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};VM.CompositePropagator=c5});var ZEe=F(aC=>{"use strict";A();Object.defineProperty(aC,"__esModule",{value:!0});aC.validateValue=aC.validateKey=void 0;var l5="[_0-9a-z-*/]",Cat=`[a-z]${l5}{0,255}`,vat=`[a-z0-9]${l5}{0,240}@[a-z]${l5}{0,13}`,Rat=new RegExp(`^(?:${Cat}|${vat})$`),xat=/^[ -~]{0,255}[!-~]$/,Dat=/,|=/;function Bat(e){return Rat.test(e)}aC.validateKey=Bat;function Nat(e){return xat.test(e)&&!Dat.test(e)}aC.validateValue=Nat});var p5=F(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM.TraceState=void 0;var YM=ZEe(),Oat=32,WEe=512,XEe=",",e0e="=",d5=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,YM.validateKey)(t)||!(0,YM.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>WEe)return this;let a=new Map(r);return a.delete(t),a.set(t,n),this._fromState(a,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=XEe+t),t=`${r[0]}${e0e}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(XEe),n=new Map,r=0;for(let o of t){let i=o.trim(),a=i.indexOf(e0e);if(a===-1)continue;let c=i.slice(0,a),l=i.slice(a+1);if(!(0,YM.validateKey)(c)||!(0,YM.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>WEe)&&(n.set(c,l),r=f,n.size>=Oat))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}};KM.TraceState=d5});var n0e=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var JM=(ze(),Me(We)),kat=mB(),wat=p5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Pat="00",Mat="(?!ff)[\\da-f]{2}",Lat="(?![0]{32})[\\da-f]{32}",Uat="(?![0]{16})[\\da-f]{16}",Qat="[\\da-f]{2}",Fat=new RegExp(`^\\s?(${Mat})-(${Lat})-(${Uat})-(${Qat})(-.*)?\\s?$`);function t0e(e){let t=Fat.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=t0e;var f5=class{inject(t,n,r){let o=JM.trace.getSpanContext(t);if(!o||(0,kat.isTracingSuppressed)(t)||!(0,JM.isSpanContextValid)(o))return;let i=`${Pat}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||JM.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=t0e(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let l=Array.isArray(c)?c.join(","):c;a.traceState=new wat.TraceState(typeof l=="string"?l:void 0)}return JM.trace.setSpanContext(t,a)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=f5});var r0e=F(nf=>{"use strict";A();Object.defineProperty(nf,"__esModule",{value:!0});nf.getRPCMetadata=nf.deleteRPCMetadata=nf.setRPCMetadata=nf.RPCType=void 0;var Gat=(ze(),Me(We)),m5=(0,Gat.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),zat;(function(e){e.HTTP="http"})(zat=nf.RPCType||(nf.RPCType={}));function jat(e,t){return e.setValue(m5,t)}nf.setRPCMetadata=jat;function Hat(e){return e.deleteValue(m5)}nf.deleteRPCMetadata=Hat;function $at(e){return e.getValue(m5)}nf.getRPCMetadata=$at});var u0e=F(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.isPlainObject=void 0;var qat="[object Object]",Vat="[object Null]",Yat="[object Undefined]",Kat=Function.prototype,o0e=Kat.toString,Jat=o0e.call(Object),Zat=Object.getPrototypeOf,i0e=Object.prototype,a0e=i0e.hasOwnProperty,Qy=Symbol?Symbol.toStringTag:void 0,s0e=i0e.toString;function Wat(e){if(!Xat(e)||est(e)!==qat)return!1;let t=Zat(e);if(t===null)return!0;let n=a0e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&o0e.call(n)===Jat}ZM.isPlainObject=Wat;function Xat(e){return e!=null&&typeof e=="object"}function est(e){return e==null?e===void 0?Yat:Vat:Qy&&Qy in Object(e)?tst(e):nst(e)}function tst(e){let t=a0e.call(e,Qy),n=e[Qy],r=!1;try{e[Qy]=void 0,r=!0}catch{}let o=s0e.call(e);return r&&(t?e[Qy]=n:delete e[Qy]),o}function nst(e){return s0e.call(e)}});var f0e=F(eL=>{"use strict";A();Object.defineProperty(eL,"__esModule",{value:!0});eL.merge=void 0;var c0e=u0e(),rst=20;function ost(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=d0e(t,e.shift(),0,n);return t}eL.merge=ost;function A5(e){return XM(e)?e.slice():e}function d0e(e,t,n=0,r){let o;if(!(n>rst)){if(n++,WM(e)||WM(t)||p0e(t))o=A5(t);else if(XM(e)){if(o=e.slice(),XM(t))for(let i=0,a=t.length;i<a;i++)o.push(A5(t[i]));else if(yB(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let l=i[a];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=A5(t[l]))}}}else if(yB(e))if(yB(t)){if(!ist(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let l=i[a];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(WM(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],y=f;if(l0e(e,l,r)||l0e(t,l,r))delete o[l];else{if(yB(h)&&yB(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:l}),b.push({obj:t,key:l}),r.set(h,S),r.set(y,b)}o[l]=d0e(o[l],f,n,r)}}}}else o=t;return o}}function l0e(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function XM(e){return Array.isArray(e)}function p0e(e){return typeof e=="function"}function yB(e){return!WM(e)&&!XM(e)&&!p0e(e)&&typeof e=="object"}function WM(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function ist(e,t){return!(!(0,c0e.isPlainObject)(e)||!(0,c0e.isPlainObject)(t))}});var m0e=F(sC=>{"use strict";A();Object.defineProperty(sC,"__esModule",{value:!0});sC.callWithTimeout=sC.TimeoutError=void 0;var tL=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};sC.TimeoutError=tL;function ast(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new tL("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}sC.callWithTimeout=ast});var g0e=F(uC=>{"use strict";A();Object.defineProperty(uC,"__esModule",{value:!0});uC.isUrlIgnored=uC.urlMatches=void 0;function A0e(e,t){return typeof t=="string"?e===t:!!e.match(t)}uC.urlMatches=A0e;function sst(e,t){if(!t)return!1;for(let n of t)if(A0e(e,n))return!0;return!1}uC.isUrlIgnored=sst});var h0e=F(nL=>{"use strict";A();Object.defineProperty(nL,"__esModule",{value:!0});nL.Deferred=void 0;var g5=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)}};nL.Deferred=g5});var _0e=F(rL=>{"use strict";A();Object.defineProperty(rL,"__esModule",{value:!0});rL.BindOnceFuture=void 0;var ust=h0e(),h5=class{_isCalled=!1;_deferred=new ust.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}};rL.BindOnceFuture=h5});var y0e=F(oL=>{"use strict";A();Object.defineProperty(oL,"__esModule",{value:!0});oL.diagLogLevelFromString=void 0;var Ag=(ze(),Me(We)),E0e={ALL:Ag.DiagLogLevel.ALL,VERBOSE:Ag.DiagLogLevel.VERBOSE,DEBUG:Ag.DiagLogLevel.DEBUG,INFO:Ag.DiagLogLevel.INFO,WARN:Ag.DiagLogLevel.WARN,ERROR:Ag.DiagLogLevel.ERROR,NONE:Ag.DiagLogLevel.NONE};function cst(e){if(e==null)return;let t=E0e[e.toUpperCase()];return t??(Ag.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(E0e)}, using default`),Ag.DiagLogLevel.INFO)}oL.diagLogLevelFromString=cst});var T0e=F(iL=>{"use strict";A();Object.defineProperty(iL,"__esModule",{value:!0});iL._export=void 0;var S0e=(ze(),Me(We)),lst=mB();function dst(e,t){return new Promise(n=>{S0e.context.with((0,lst.suppressTracing)(S0e.context.active()),()=>{e.export(t,n)})})}iL._export=dst});var br=F(Ne=>{"use strict";A();Object.defineProperty(Ne,"__esModule",{value:!0});Ne.diagLogLevelFromString=Ne.BindOnceFuture=Ne.urlMatches=Ne.isUrlIgnored=Ne.callWithTimeout=Ne.TimeoutError=Ne.merge=Ne.TraceState=Ne.unsuppressTracing=Ne.suppressTracing=Ne.isTracingSuppressed=Ne.setRPCMetadata=Ne.getRPCMetadata=Ne.deleteRPCMetadata=Ne.RPCType=Ne.parseTraceParent=Ne.W3CTraceContextPropagator=Ne.TRACE_STATE_HEADER=Ne.TRACE_PARENT_HEADER=Ne.CompositePropagator=Ne.otperformance=Ne.getStringListFromEnv=Ne.getNumberFromEnv=Ne.getBooleanFromEnv=Ne.getStringFromEnv=Ne._globalThis=Ne.SDK_INFO=Ne.parseKeyPairsIntoRecord=Ne.ExportResultCode=Ne.unrefTimer=Ne.timeInputToHrTime=Ne.millisToHrTime=Ne.isTimeInputHrTime=Ne.isTimeInput=Ne.hrTimeToTimeStamp=Ne.hrTimeToSeconds=Ne.hrTimeToNanoseconds=Ne.hrTimeToMilliseconds=Ne.hrTimeToMicroseconds=Ne.hrTimeDuration=Ne.hrTime=Ne.getTimeOrigin=Ne.addHrTimes=Ne.loggingErrorHandler=Ne.setGlobalErrorHandler=Ne.globalErrorHandler=Ne.sanitizeAttributes=Ne.isAttributeValue=Ne.AnchoredClock=Ne.W3CBaggagePropagator=void 0;Ne.internal=void 0;var pst=ipe();Object.defineProperty(Ne,"W3CBaggagePropagator",{enumerable:!0,get:function(){return pst.W3CBaggagePropagator}});var fst=ape();Object.defineProperty(Ne,"AnchoredClock",{enumerable:!0,get:function(){return fst.AnchoredClock}});var I0e=dpe();Object.defineProperty(Ne,"isAttributeValue",{enumerable:!0,get:function(){return I0e.isAttributeValue}});Object.defineProperty(Ne,"sanitizeAttributes",{enumerable:!0,get:function(){return I0e.sanitizeAttributes}});var b0e=fpe();Object.defineProperty(Ne,"globalErrorHandler",{enumerable:!0,get:function(){return b0e.globalErrorHandler}});Object.defineProperty(Ne,"setGlobalErrorHandler",{enumerable:!0,get:function(){return b0e.setGlobalErrorHandler}});var mst=N9();Object.defineProperty(Ne,"loggingErrorHandler",{enumerable:!0,get:function(){return mst.loggingErrorHandler}});var Ol=qEe();Object.defineProperty(Ne,"addHrTimes",{enumerable:!0,get:function(){return Ol.addHrTimes}});Object.defineProperty(Ne,"getTimeOrigin",{enumerable:!0,get:function(){return Ol.getTimeOrigin}});Object.defineProperty(Ne,"hrTime",{enumerable:!0,get:function(){return Ol.hrTime}});Object.defineProperty(Ne,"hrTimeDuration",{enumerable:!0,get:function(){return Ol.hrTimeDuration}});Object.defineProperty(Ne,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Ol.hrTimeToMicroseconds}});Object.defineProperty(Ne,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Ol.hrTimeToMilliseconds}});Object.defineProperty(Ne,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Ol.hrTimeToNanoseconds}});Object.defineProperty(Ne,"hrTimeToSeconds",{enumerable:!0,get:function(){return Ol.hrTimeToSeconds}});Object.defineProperty(Ne,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Ol.hrTimeToTimeStamp}});Object.defineProperty(Ne,"isTimeInput",{enumerable:!0,get:function(){return Ol.isTimeInput}});Object.defineProperty(Ne,"isTimeInputHrTime",{enumerable:!0,get:function(){return Ol.isTimeInputHrTime}});Object.defineProperty(Ne,"millisToHrTime",{enumerable:!0,get:function(){return Ol.millisToHrTime}});Object.defineProperty(Ne,"timeInputToHrTime",{enumerable:!0,get:function(){return Ol.timeInputToHrTime}});var Ast=VEe();Object.defineProperty(Ne,"unrefTimer",{enumerable:!0,get:function(){return Ast.unrefTimer}});var gst=YEe();Object.defineProperty(Ne,"ExportResultCode",{enumerable:!0,get:function(){return gst.ExportResultCode}});var hst=R9();Object.defineProperty(Ne,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return hst.parseKeyPairsIntoRecord}});var Fy=s5();Object.defineProperty(Ne,"SDK_INFO",{enumerable:!0,get:function(){return Fy.SDK_INFO}});Object.defineProperty(Ne,"_globalThis",{enumerable:!0,get:function(){return Fy._globalThis}});Object.defineProperty(Ne,"getStringFromEnv",{enumerable:!0,get:function(){return Fy.getStringFromEnv}});Object.defineProperty(Ne,"getBooleanFromEnv",{enumerable:!0,get:function(){return Fy.getBooleanFromEnv}});Object.defineProperty(Ne,"getNumberFromEnv",{enumerable:!0,get:function(){return Fy.getNumberFromEnv}});Object.defineProperty(Ne,"getStringListFromEnv",{enumerable:!0,get:function(){return Fy.getStringListFromEnv}});Object.defineProperty(Ne,"otperformance",{enumerable:!0,get:function(){return Fy.otperformance}});var _st=JEe();Object.defineProperty(Ne,"CompositePropagator",{enumerable:!0,get:function(){return _st.CompositePropagator}});var aL=n0e();Object.defineProperty(Ne,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return aL.TRACE_PARENT_HEADER}});Object.defineProperty(Ne,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return aL.TRACE_STATE_HEADER}});Object.defineProperty(Ne,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return aL.W3CTraceContextPropagator}});Object.defineProperty(Ne,"parseTraceParent",{enumerable:!0,get:function(){return aL.parseTraceParent}});var sL=r0e();Object.defineProperty(Ne,"RPCType",{enumerable:!0,get:function(){return sL.RPCType}});Object.defineProperty(Ne,"deleteRPCMetadata",{enumerable:!0,get:function(){return sL.deleteRPCMetadata}});Object.defineProperty(Ne,"getRPCMetadata",{enumerable:!0,get:function(){return sL.getRPCMetadata}});Object.defineProperty(Ne,"setRPCMetadata",{enumerable:!0,get:function(){return sL.setRPCMetadata}});var _5=mB();Object.defineProperty(Ne,"isTracingSuppressed",{enumerable:!0,get:function(){return _5.isTracingSuppressed}});Object.defineProperty(Ne,"suppressTracing",{enumerable:!0,get:function(){return _5.suppressTracing}});Object.defineProperty(Ne,"unsuppressTracing",{enumerable:!0,get:function(){return _5.unsuppressTracing}});var Est=p5();Object.defineProperty(Ne,"TraceState",{enumerable:!0,get:function(){return Est.TraceState}});var yst=f0e();Object.defineProperty(Ne,"merge",{enumerable:!0,get:function(){return yst.merge}});var C0e=m0e();Object.defineProperty(Ne,"TimeoutError",{enumerable:!0,get:function(){return C0e.TimeoutError}});Object.defineProperty(Ne,"callWithTimeout",{enumerable:!0,get:function(){return C0e.callWithTimeout}});var v0e=g0e();Object.defineProperty(Ne,"isUrlIgnored",{enumerable:!0,get:function(){return v0e.isUrlIgnored}});Object.defineProperty(Ne,"urlMatches",{enumerable:!0,get:function(){return v0e.urlMatches}});var Sst=_0e();Object.defineProperty(Ne,"BindOnceFuture",{enumerable:!0,get:function(){return Sst.BindOnceFuture}});var Tst=y0e();Object.defineProperty(Ne,"diagLogLevelFromString",{enumerable:!0,get:function(){return Tst.diagLogLevelFromString}});var Ist=T0e();Ne.internal={_export:Ist._export}});var R0e=F(uL=>{"use strict";A();Object.defineProperty(uL,"__esModule",{value:!0});uL.VERSION=void 0;uL.VERSION="0.214.0"});var x0e=F(SB=>{"use strict";A();Object.defineProperty(SB,"__esModule",{value:!0});SB.SeverityNumber=void 0;var bst;(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"})(bst=SB.SeverityNumber||(SB.SeverityNumber={}))});var lL=F(cC=>{"use strict";A();Object.defineProperty(cC,"__esModule",{value:!0});cC.NOOP_LOGGER=cC.NoopLogger=void 0;var cL=class{emit(t){}};cC.NoopLogger=cL;cC.NOOP_LOGGER=new cL});var D0e=F(Sm=>{"use strict";A();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.API_BACKWARDS_COMPATIBILITY_VERSION=Sm.makeGetter=Sm._global=Sm.GLOBAL_LOGS_API_KEY=void 0;Sm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Sm._global=globalThis;function Cst(e,t,n){return r=>r===e?t:n}Sm.makeGetter=Cst;Sm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var E5=F(lC=>{"use strict";A();Object.defineProperty(lC,"__esModule",{value:!0});lC.NOOP_LOGGER_PROVIDER=lC.NoopLoggerProvider=void 0;var vst=lL(),dL=class{getLogger(t,n,r){return new vst.NoopLogger}};lC.NoopLoggerProvider=dL;lC.NOOP_LOGGER_PROVIDER=new dL});var B0e=F(pL=>{"use strict";A();Object.defineProperty(pL,"__esModule",{value:!0});pL.ProxyLogger=void 0;var Rst=lL(),y5=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):Rst.NOOP_LOGGER}};pL.ProxyLogger=y5});var N0e=F(fL=>{"use strict";A();Object.defineProperty(fL,"__esModule",{value:!0});fL.ProxyLoggerProvider=void 0;var xst=E5(),Dst=B0e(),S5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Dst.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:xst.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)}};fL.ProxyLoggerProvider=S5});var k0e=F(mL=>{"use strict";A();Object.defineProperty(mL,"__esModule",{value:!0});mL.LogsAPI=void 0;var Md=D0e(),Bst=E5(),O0e=N0e(),T5=class e{constructor(){this._proxyLoggerProvider=new O0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Md._global[Md.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Md._global[Md.GLOBAL_LOGS_API_KEY]=(0,Md.makeGetter)(Md.API_BACKWARDS_COMPATIBILITY_VERSION,t,Bst.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Md._global[Md.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Md._global,Md.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Md._global[Md.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new O0e.ProxyLoggerProvider}};mL.LogsAPI=T5});var I5=F(Tm=>{"use strict";A();Object.defineProperty(Tm,"__esModule",{value:!0});Tm.logs=Tm.NoopLogger=Tm.NOOP_LOGGER=Tm.SeverityNumber=void 0;var Nst=x0e();Object.defineProperty(Tm,"SeverityNumber",{enumerable:!0,get:function(){return Nst.SeverityNumber}});var w0e=lL();Object.defineProperty(Tm,"NOOP_LOGGER",{enumerable:!0,get:function(){return w0e.NOOP_LOGGER}});Object.defineProperty(Tm,"NoopLogger",{enumerable:!0,get:function(){return w0e.NoopLogger}});var Ost=k0e();Tm.logs=Ost.LogsAPI.getInstance()});var P0e=F(dC=>{"use strict";A();Object.defineProperty(dC,"__esModule",{value:!0});dC.disableInstrumentations=dC.enableInstrumentations=void 0;function kst(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}dC.enableInstrumentations=kst;function wst(e){e.forEach(t=>t.disable())}dC.disableInstrumentations=wst});var U0e=F(AL=>{"use strict";A();Object.defineProperty(AL,"__esModule",{value:!0});AL.registerInstrumentations=void 0;var M0e=(ze(),Me(We)),Pst=I5(),L0e=P0e();function Mst(e){let t=e.tracerProvider||M0e.trace.getTracerProvider(),n=e.meterProvider||M0e.metrics.getMeterProvider(),r=e.loggerProvider||Pst.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,L0e.enableInstrumentations)(o,t,n,r),()=>{(0,L0e.disableInstrumentations)(o)}}AL.registerInstrumentations=Mst});var V0e=F(gL=>{"use strict";A();Object.defineProperty(gL,"__esModule",{value:!0});gL.satisfies=void 0;var R5=(ze(),Me(We)),j0e=/^(?: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-]+)*))?$/,Lst=/^(?<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-]+)*))?$/,Ust={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Qst(e,t,n){if(!Fst(e))return R5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Hst(e);if(!r)return!1;let o=[],i=H0e(r,t,o,n);return i&&!n?.includePrerelease?zst(r,o):i}gL.satisfies=Qst;function Fst(e){return typeof e=="string"&&j0e.test(e)}function H0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(b5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=dut(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!b5(e,i,n,r))return!1;return!0}return b5(e,t,n,r)}function b5(e,t,n,r){if(t=jst(t,r),t.includes(" "))return H0e(e,t,n,r);{let o=$st(t);return n.push(o),Gst(e,o)}}function Gst(e,t){if(t.invalid)return!1;if(!t.version||v5(t.version))return!0;let n=F0e(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=F0e(r,o)}return Ust[t.op]?.includes(n)}function zst(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function jst(e,t){return e=e.trim(),e=cut(e,t),e=uut(e),e=lut(e,t),e=e.trim(),e}function Mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Hst(e){let t=e.match(j0e);if(!t){R5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function $st(e){if(!e)return{};let t=e.match(Lst);if(!t)return R5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function v5(e){return e==="*"||e==="x"||e==="X"}function Q0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function qst(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 Vst(e,t){if(v5(e)||v5(t))return 0;let[n,r]=qst(Q0e(e),Q0e(t));return n>r?1:n<r?-1:0}function F0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Vst(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $0e="[a-zA-Z0-9-]",q0e="0|[1-9]\\d*",Yst=`\\d*[a-zA-Z-]${$0e}*`,Kst="((?:<|>)?=?)",G0e=`(?:${q0e}|${Yst})`,Jst=`(?:-(${G0e}(?:\\.${G0e})*))`,z0e=`${$0e}+`,Zst=`(?:\\+(${z0e}(?:\\.${z0e})*))`,C5=`${q0e}|x|X|\\*`,TB=`[v=\\s]*(${C5})(?:\\.(${C5})(?:\\.(${C5})(?:${Jst})?${Zst}?)?)?`,Wst=`^${Kst}\\s*${TB}$`,Xst=new RegExp(Wst),eut=`^\\s*(${TB})\\s+-\\s+(${TB})\\s*$`,tut=new RegExp(eut),nut="(?:~>?)",rut=`^${nut}${TB}$`,out=new RegExp(rut),iut="(?:\\^)",aut=`^${iut}${TB}$`,sut=new RegExp(aut);function uut(e){let t=out;return e.replace(t,(n,r,o,i,a)=>{let c;return Mu(r)?c="":Mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function cut(e,t){let n=sut,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,l)=>{let f;return Mu(i)?f="":Mu(a)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Mu(c)?i==="0"?f=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:l?i==="0"?a==="0"?f=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?a==="0"?f=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,f})}function lut(e,t){let n=Xst;return e.replace(n,(r,o,i,a,c,l)=>{let f=Mu(i),h=f||Mu(a),y=h||Mu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(l="-0"),r=`${o+i}.${a}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),r})}function dut(e,t){let n=tut;return e.replace(n,(r,o,i,a,c,l,f,h,y,S,b,v)=>(Mu(i)?o="":Mu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Mu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Mu(y)?h="":Mu(S)?h=`<${+y+1}.0.0-0`:Mu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var x5=F(Is=>{"use strict";A();Object.defineProperty(Is,"__esModule",{value:!0});Is.massUnwrap=Is.unwrap=Is.massWrap=Is.wrap=void 0;var Lu=console.error.bind(console);function IB(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 put=(e,t,n)=>{if(!e||!e[t]){Lu("no original function "+String(t)+" to wrap");return}if(!n){Lu("no wrapper function"),Lu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Lu("original object and wrapper must be functions");return}let o=n(r,t);return IB(o,"__original",r),IB(o,"__unwrap",()=>{e[t]===o&&IB(e,t,r)}),IB(o,"__wrapped",!0),IB(e,t,o),o};Is.wrap=put;var fut=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Is.wrap)(r,o,n)})})};Is.massWrap=fut;var mut=(e,t)=>{if(!e||!e[t]){Lu("no function to unwrap."),Lu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Lu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Is.unwrap=mut;var Aut=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Is.unwrap)(n,r)})})};Is.massUnwrap=Aut;function bB(e){e&&e.logger&&(typeof e.logger!="function"?Lu("new logger isn't a function, not replacing"):Lu=e.logger)}Is.default=bB;bB.wrap=Is.wrap;bB.massWrap=Is.massWrap;bB.unwrap=Is.unwrap;bB.massUnwrap=Is.massUnwrap});var Y0e=F(_L=>{"use strict";A();Object.defineProperty(_L,"__esModule",{value:!0});_L.InstrumentationAbstract=void 0;var D5=(ze(),Me(We)),gut=I5(),hL=x5(),B5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=D5.diag.createComponentLogger({namespace:t}),this._tracer=D5.trace.getTracer(t,n),this._meter=D5.metrics.getMeter(t,n),this._logger=gut.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=hL.wrap;_unwrap=hL.unwrap;_massWrap=hL.massWrap;_massUnwrap=hL.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)}}};_L.InstrumentationAbstract=B5});var J0e=F((JKt,K0e)=>{A();var pC=1e3,fC=pC*60,mC=fC*60,Gy=mC*24,hut=Gy*7,_ut=Gy*365.25;K0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Eut(e);if(n==="number"&&isFinite(e))return t.long?Sut(e):yut(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Eut(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*_ut;case"weeks":case"week":case"w":return n*hut;case"days":case"day":case"d":return n*Gy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*mC;case"minutes":case"minute":case"mins":case"min":case"m":return n*fC;case"seconds":case"second":case"secs":case"sec":case"s":return n*pC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function yut(e){var t=Math.abs(e);return t>=Gy?Math.round(e/Gy)+"d":t>=mC?Math.round(e/mC)+"h":t>=fC?Math.round(e/fC)+"m":t>=pC?Math.round(e/pC)+"s":e+"ms"}function Sut(e){var t=Math.abs(e);return t>=Gy?EL(e,t,Gy,"day"):t>=mC?EL(e,t,mC,"hour"):t>=fC?EL(e,t,fC,"minute"):t>=pC?EL(e,t,pC,"second"):e+" ms"}function EL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var N5=F((WKt,Z0e)=>{A();function Tut(e){n.debug=n,n.default=n,n.coerce=l,n.disable=a,n.enable=o,n.enabled=c,n.humanize=J0e(),n.destroy=f,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,b,v;function x(...D){if(!x.enabled)return;let w=x,Q=Number(new Date),z=Q-(y||Q);w.diff=z,w.prev=y,w.curr=Q,y=Q,D[0]=n.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let G=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(ie,ge)=>{if(ie==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let ve=D[G];ie=Ce.call(w,ve),D.splice(G,1),G--}return ie}),n.formatArgs.call(w,D),(w.log||n.log).apply(w,D)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,v=n.enabled(h)),v),set:D=>{S=D}}),typeof n.init=="function"&&n.init(x),x}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,b=0,v=-1,x=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(v=b,x=S,b++):(S++,b++);else if(v!==-1)b=v+1,x++,S=x;else return!1;for(;b<y.length&&y[b]==="*";)b++;return b===y.length}function a(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(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 f(){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}Z0e.exports=Tut});var W0e=F((kc,yL)=>{A();kc.formatArgs=but;kc.save=Cut;kc.load=vut;kc.useColors=Iut;kc.storage=Rut();kc.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`."))}})();kc.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 Iut(){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 but(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+yL.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)}kc.log=console.debug||console.log||(()=>{});function Cut(e){try{e?kc.storage.setItem("debug",e):kc.storage.removeItem("debug")}catch{}}function vut(){let e;try{e=kc.storage.getItem("debug")||kc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Rut(){try{return localStorage}catch{}}yL.exports=N5()(kc);var{formatters:xut}=yL.exports;xut.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var eye=F((tJt,X0e)=>{"use strict";A();X0e.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 rye=F((rJt,nye)=>{"use strict";A();var Dut=Fe("os"),tye=Fe("tty"),Ld=eye(),{env:Va}=process,f_;Ld("no-color")||Ld("no-colors")||Ld("color=false")||Ld("color=never")?f_=0:(Ld("color")||Ld("colors")||Ld("color=true")||Ld("color=always"))&&(f_=1);"FORCE_COLOR"in Va&&(Va.FORCE_COLOR==="true"?f_=1:Va.FORCE_COLOR==="false"?f_=0:f_=Va.FORCE_COLOR.length===0?1:Math.min(parseInt(Va.FORCE_COLOR,10),3));function O5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function k5(e,t){if(f_===0)return 0;if(Ld("color=16m")||Ld("color=full")||Ld("color=truecolor"))return 3;if(Ld("color=256"))return 2;if(e&&!t&&f_===void 0)return 0;let n=f_||0;if(Va.TERM==="dumb")return n;if(process.platform==="win32"){let r=Dut.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Va)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Va)||Va.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Va)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Va.TEAMCITY_VERSION)?1:0;if(Va.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Va){let r=parseInt((Va.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Va.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Va.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Va.TERM)||"COLORTERM"in Va?1:n}function But(e){let t=k5(e,e&&e.isTTY);return O5(t)}nye.exports={supportsColor:But,stdout:O5(k5(!0,tye.isatty(1))),stderr:O5(k5(!0,tye.isatty(2)))}});var iye=F((Ya,TL)=>{A();var Nut=Fe("tty"),SL=Fe("util");Ya.init=Uut;Ya.log=Put;Ya.formatArgs=kut;Ya.save=Mut;Ya.load=Lut;Ya.useColors=Out;Ya.destroy=SL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ya.colors=[6,2,3,4,5,1];try{let e=rye();e&&(e.stderr||e).level>=2&&(Ya.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ya.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let n=t.substring(6).toLowerCase().replace(/_([a-z])/g,(o,i)=>i.toUpperCase()),r=process.env[t];return/^(yes|on|true|enabled)$/i.test(r)?r=!0:/^(no|off|false|disabled)$/i.test(r)?r=!1:r==="null"?r=null:r=Number(r),e[n]=r,e},{});function Out(){return"colors"in Ya.inspectOpts?!!Ya.inspectOpts.colors:Nut.isatty(process.stderr.fd)}function kut(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+"+TL.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=wut()+t+" "+e[0]}function wut(){return Ya.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Put(...e){return process.stderr.write(SL.formatWithOptions(Ya.inspectOpts,...e)+`
6
6
  `)}function Mut(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Lut(){return process.env.DEBUG}function Uut(e){e.inspectOpts={};let t=Object.keys(Ya.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ya.inspectOpts[t[n]]}TL.exports=N5()(Ya);var{formatters:oye}=TL.exports;oye.o=function(e){return this.inspectOpts.colors=this.useColors,SL.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${OU(e)}`),!0}return!1}function ept(e,t){return t?.length?RU(e).some(n=>I_(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let a=o.substring(0,i).toLowerCase(),c=o.substring(i+1).trim(),l=n.get(a);l&&Array.isArray(l)?l.push(c):l?n.set(a,[l,c]):n.set(a,c)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,FN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),ie=>ie&&this._diag.error("caught ignoreRequestHook error: ",ie),!0))return;let i=(0,SF.hrTime)(),a;try{a=new oEt.URL(t.path,t.origin)}catch(ie){this._diag.warn("could not determine url.full:",ie);return}let c=a.protocol.replace(":",""),l=this.getRequestMethod(t.method),f={[ta.ATTR_HTTP_REQUEST_METHOD]:l,[ta.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[ta.ATTR_URL_FULL]:a.toString(),[ta.ATTR_URL_PATH]:a.pathname,[ta.ATTR_URL_QUERY]:a.search,[ta.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},y=a.hostname,S=a.port||h[c];f[ta.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(f[ta.ATTR_SERVER_PORT]=Number(S));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let ie=Array.isArray(v)?v[v.length-1]:v;f[ta.ATTR_USER_AGENT_ORIGINAL]=ie}let x=(0,FN.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),ie=>ie&&this._diag.error("caught startSpanHook error: ",ie),!0);x&&Object.entries(x).forEach(([ie,ge])=>{f[ie]=ge});let D=zl.context.active(),w=zl.trace.getSpan(D),Q;n.requireParentforSpans&&(!w||!zl.trace.isSpanContextValid(w.spanContext()))?Q=zl.trace.wrapSpanContext(zl.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:zl.SpanKind.CLIENT,attributes:f},D),(0,FN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),ie=>ie&&this._diag.error("caught requestHook error: ",ie),!0);let z=zl.trace.setSpan(zl.context.active(),Q),G={};zl.propagation.inject(z,G);let $=Object.entries(G);for(let ie=0;ie<$.length;ie++){let[ge,Ce]=$[ie];typeof t.addHeader=="function"?t.addHeader(ge,Ce):typeof t.headers=="string"?t.headers+=`${ge}: ${Ce}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ge,Ce)}this._recordFromReq.set(t,{span:Q,attributes:f,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:a,remotePort:c}=n,l={[ta.ATTR_NETWORK_PEER_ADDRESS]:a,[ta.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let f=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(f.has(y)){let b=Array.isArray(S)?S:[S];l[`http.request.header.${y}`]=b}}i.setAttributes(l)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,a={[ta.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,FN.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),l=>l&&this._diag.error("caught responseHook error: ",l),!0),c.headersToSpanAttributes?.responseHeaders){let l=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(f=>l.add(f.toLowerCase()));for(let f=0;f<n.headers.length;f=f+2){let h=n.headers[f].toString().toLowerCase(),y=n.headers[f+1];if(l.has(h)){let S=`http.response.header.${h}`;Object.hasOwn(a,S)?a[S].push(y.toString()):a[S]=[y.toString()]}}}o.setAttributes(a),o.setStatus({code:n.statusCode>=400?zl.SpanStatusCode.ERROR:zl.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,a)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:a}=r;o.recordException(n),o.setStatus({code:zl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[ta.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[ta.ATTR_HTTP_RESPONSE_STATUS_CODE,ta.ATTR_HTTP_REQUEST_METHOD,ta.ATTR_SERVER_ADDRESS,ta.ATTR_SERVER_PORT,ta.ATTR_URL_SCHEME,ta.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,SF.hrTimeToMilliseconds)((0,SF.hrTimeDuration)(n,(0,SF.hrTime)()))/1e3;this._httpClientDurationHistogram.record(i,r)}getRequestMethod(t){let n={CONNECT:!0,OPTIONS:!0,HEAD:!0,GET:!0,POST:!0,PUT:!0,PATCH:!0,DELETE:!0,TRACE:!0,QUERY:!0};return t.toUpperCase()in n?t.toUpperCase():"_OTHER"}};TF.UndiciInstrumentation=fK});var uDe=F(IF=>{"use strict";A();Object.defineProperty(IF,"__esModule",{value:!0});IF.UndiciInstrumentation=void 0;var iEt=sDe();Object.defineProperty(IF,"UndiciInstrumentation",{enumerable:!0,get:function(){return iEt.UndiciInstrumentation}})});function cDe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function cEt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&wi(t)}function lEt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=cDe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=cDe(n.origin,n.path);if(r.startsWith("data:")){let o=qC(r);return{[wt]:"auto.http.otel.node_fetch","http.url":o,[x_]:o,[Gd]:`${n.method||"GET"} ${o}`}}return{[wt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var lDe,dDe,aEt,sEt,uEt,pDe,fDe=O(()=>{A();lDe=ae(uDe(),1);dt();hr();dDe="NodeFetch",aEt=st(dDe,lDe.UndiciInstrumentation,e=>lEt(e)),sEt=st(`${dDe}.sentry`,lS,e=>e),uEt=((e={})=>({name:"NodeFetch",setupOnce(){cEt(e,gt()?.getOptions())&&aEt(e),sEt(e)}})),pDe=uEt});var bF=F(GN=>{"use strict";A();Object.defineProperty(GN,"__esModule",{value:!0});GN.ExpressLayerType=void 0;var dEt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(dEt=GN.ExpressLayerType||(GN.ExpressLayerType={}))});var CF=F(zN=>{"use strict";A();Object.defineProperty(zN,"__esModule",{value:!0});zN.AttributeNames=void 0;var pEt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(pEt=zN.AttributeNames||(zN.AttributeNames={}))});var mK=F(Iv=>{"use strict";A();Object.defineProperty(Iv,"__esModule",{value:!0});Iv._LAYERS_STORE_PROPERTY=Iv.kLayerPatched=void 0;Iv.kLayerPatched=Symbol("express-layer-patched");Iv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var gDe=F(na=>{"use strict";A();Object.defineProperty(na,"__esModule",{value:!0});na.getActualMatchedRoute=na.getConstructedRoute=na.getLayerPath=na.asErrorAndMessage=na.isLayerIgnored=na.getLayerMetadata=na.getRouterPath=na.storeLayerPath=void 0;var AK=bF(),bv=CF(),gS=mK(),fEt=(e,t)=>(Array.isArray(e[gS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,gS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[gS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));na.storeLayerPath=fEt;var mEt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,na.getRouterPath)(e,n):e};na.getRouterPath=mEt;var AEt=(e,t,n)=>{if(t.name==="router"){let r=(0,na.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[bv.AttributeNames.EXPRESS_NAME]:o,[bv.AttributeNames.EXPRESS_TYPE]:AK.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[bv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[bv.AttributeNames.EXPRESS_TYPE]:AK.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[bv.AttributeNames.EXPRESS_NAME]:t.name,[bv.AttributeNames.EXPRESS_TYPE]:AK.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};na.getLayerMetadata=AEt;var gEt=(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")},hEt=(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(gEt(e,r))return!0}catch{}return!1};na.isLayerIgnored=hEt;var _Et=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];na.asErrorAndMessage=_Et;var EEt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>mDe(n)||"").join(","):mDe(t)};na.getLayerPath=EEt;var mDe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function ADe(e){let n=(Array.isArray(e[gS._LAYERS_STORE_PROPERTY])?e[gS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}na.getConstructedRoute=ADe;function yEt(e){let t=Array.isArray(e[gS._LAYERS_STORE_PROPERTY])?e[gS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=ADe(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)||SEt(r))?r:void 0}na.getActualMatchedRoute=yEt;function SEt(e){return e.includes(":")||e.includes("*")}});var hDe=F(Cv=>{"use strict";A();Object.defineProperty(Cv,"__esModule",{value:!0});Cv.PACKAGE_NAME=Cv.PACKAGE_VERSION=void 0;Cv.PACKAGE_VERSION="0.62.0";Cv.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var TDe=F(RF=>{"use strict";A();Object.defineProperty(RF,"__esModule",{value:!0});RF.ExpressInstrumentation=void 0;var _De=br(),Fc=(ze(),Me(We)),EDe=bF(),yDe=CF(),zm=gDe(),SDe=hDe(),vv=on(),TEt=(Wn(),Me(Fr)),vF=mK(),gK=class extends vv.InstrumentationBase{constructor(t={}){super(SDe.PACKAGE_NAME,SDe.PACKAGE_VERSION,t)}init(){return[new vv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,vv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,vv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,vv.isWrapped)(t.application.use)&&this._unwrap(t.application,"use"),this._wrap(t.application,"use",this._getAppUsePatch(n)),t},t=>{if(t===void 0)return;let r=typeof t?.Router?.prototype?.route=="function"?t.Router.prototype:t.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(t.application,"use")})]}_getRoutePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,zm.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),a=this.stack[this.stack.length-1];return t._applyPatch(a,(0,zm.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let a=t?this.router:this._router,c=r.apply(this,i);if(a){let l=a.stack[a.stack.length-1];n._applyPatch(l,(0,zm.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[vF.kLayerPatched]!==!0&&(t[vF.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:l}=(0,zm.storeLayerPath)(a,n),f=(0,zm.getConstructedRoute)(a),h=(0,zm.getActualMatchedRoute)(a),y={[TEt.ATTR_HTTP_ROUTE]:h},S=(0,zm.getLayerMetadata)(f,t,n),b=S.attributes[yDe.AttributeNames.EXPRESS_TYPE],v=(0,_De.getRPCMetadata)(Fc.context.active());if(v?.type===_De.RPCType.HTTP&&(v.route=h),(0,zm.isLayerIgnored)(S.name,b,r.getConfig()))return b===EDe.ExpressLayerType.MIDDLEWARE&&a[vF._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Fc.trace.getSpan(Fc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:a,layerType:b,route:f},S.name),D=r.tracer.startSpan(x,{attributes:Object.assign(y,S.attributes)}),w=Fc.context.active(),Q=Fc.trace.setSpan(w,D),{requestHook:z}=r.getConfig();z&&(0,vv.safeExecuteInTheMiddle)(()=>z(D,{request:a,layerType:b,route:f}),Ce=>{Ce&&Fc.diag.error("express instrumentation: request hook failed",Ce)},!0);let G=!1;S.attributes[yDe.AttributeNames.EXPRESS_TYPE]===EDe.ExpressLayerType.ROUTER&&(D.end(),G=!0,Q=w);let $=()=>{G===!1&&(G=!0,D.end())},ie=Array.from(arguments),ge=ie.findIndex(Ce=>typeof Ce=="function");ge>=0&&(arguments[ge]=function(){let Ce=arguments[0],ve=![void 0,null,"route","router"].includes(Ce);if(!G&&ve){let[fn,De]=(0,zm.asErrorAndMessage)(Ce);D.recordException(fn),D.setStatus({code:Fc.SpanStatusCode.ERROR,message:De})}G===!1&&(G=!0,a.res?.removeListener("finish",$),D.end()),!(a.route&&ve)&&l&&a[vF._LAYERS_STORE_PROPERTY].pop();let Xe=ie[ge],kt=Fc.context.active(),nt=Fc.trace.getSpan(w),Vt=nt?Fc.trace.setSpan(kt,nt):kt;return Fc.context.bind(Vt,Xe).apply(this,arguments)});try{return Fc.context.bind(Q,o).apply(this,arguments)}catch(Ce){let[ve,Xe]=(0,zm.asErrorAndMessage)(Ce);throw D.recordException(ve),D.setStatus({code:Fc.SpanStatusCode.ERROR,message:Xe}),Ce}finally{G||c.once("finish",$)}};for(let a in o)Object.defineProperty(i,a,{get(){return o[a]},set(c){o[a]=c}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return Fc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};RF.ExpressInstrumentation=gK});var IDe=F(J_=>{"use strict";A();Object.defineProperty(J_,"__esModule",{value:!0});J_.AttributeNames=J_.ExpressLayerType=J_.ExpressInstrumentation=void 0;var IEt=TDe();Object.defineProperty(J_,"ExpressInstrumentation",{enumerable:!0,get:function(){return IEt.ExpressInstrumentation}});var bEt=bF();Object.defineProperty(J_,"ExpressLayerType",{enumerable:!0,get:function(){return bEt.ExpressLayerType}});var CEt=CF();Object.defineProperty(J_,"AttributeNames",{enumerable:!0,get:function(){return CEt.AttributeNames}})});var ba,hS=O(()=>{A();ba=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function vEt(e){zr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function REt(e,t){if(vn()===Fd())return ba&&Z.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";vn().setTransactionName(`${r} ${e.route}`)}return t}var bDe,CDe,vDe,xEt,RDe,xDe=O(()=>{A();bDe=ae(IDe(),1);dt();hr();hS();CDe="Express";vDe=st(CDe,()=>new bDe.ExpressInstrumentation({requestHook:e=>vEt(e),spanNameHook:(e,t)=>REt(e,t)})),xEt=(()=>({name:CDe,setupOnce(){vDe()}})),RDe=xEt});var DDe=F(jN=>{"use strict";A();Object.defineProperty(jN,"__esModule",{value:!0});jN.SeverityNumber=void 0;var DEt;(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"})(DEt=jN.SeverityNumber||(jN.SeverityNumber={}))});var BF=F(Rv=>{"use strict";A();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.NOOP_LOGGER=Rv.NoopLogger=void 0;var DF=class{emit(t){}};Rv.NoopLogger=DF;Rv.NOOP_LOGGER=new DF});var BDe=F(jm=>{"use strict";A();Object.defineProperty(jm,"__esModule",{value:!0});jm.API_BACKWARDS_COMPATIBILITY_VERSION=jm.makeGetter=jm._global=jm.GLOBAL_LOGS_API_KEY=void 0;jm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");jm._global=globalThis;function BEt(e,t,n){return r=>r===e?t:n}jm.makeGetter=BEt;jm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var hK=F(xv=>{"use strict";A();Object.defineProperty(xv,"__esModule",{value:!0});xv.NOOP_LOGGER_PROVIDER=xv.NoopLoggerProvider=void 0;var NEt=BF(),NF=class{getLogger(t,n,r){return new NEt.NoopLogger}};xv.NoopLoggerProvider=NF;xv.NOOP_LOGGER_PROVIDER=new NF});var NDe=F(OF=>{"use strict";A();Object.defineProperty(OF,"__esModule",{value:!0});OF.ProxyLogger=void 0;var OEt=BF(),_K=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):OEt.NOOP_LOGGER}};OF.ProxyLogger=_K});var ODe=F(kF=>{"use strict";A();Object.defineProperty(kF,"__esModule",{value:!0});kF.ProxyLoggerProvider=void 0;var kEt=hK(),wEt=NDe(),EK=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new wEt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:kEt.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)}};kF.ProxyLoggerProvider=EK});var wDe=F(wF=>{"use strict";A();Object.defineProperty(wF,"__esModule",{value:!0});wF.LogsAPI=void 0;var Vd=BDe(),PEt=hK(),kDe=ODe(),yK=class e{constructor(){this._proxyLoggerProvider=new kDe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Vd._global[Vd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Vd._global[Vd.GLOBAL_LOGS_API_KEY]=(0,Vd.makeGetter)(Vd.API_BACKWARDS_COMPATIBILITY_VERSION,t,PEt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Vd._global[Vd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Vd._global,Vd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Vd._global[Vd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new kDe.ProxyLoggerProvider}};wF.LogsAPI=yK});var SK=F(Hm=>{"use strict";A();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.logs=Hm.NoopLogger=Hm.NOOP_LOGGER=Hm.SeverityNumber=void 0;var MEt=DDe();Object.defineProperty(Hm,"SeverityNumber",{enumerable:!0,get:function(){return MEt.SeverityNumber}});var PDe=BF();Object.defineProperty(Hm,"NOOP_LOGGER",{enumerable:!0,get:function(){return PDe.NOOP_LOGGER}});Object.defineProperty(Hm,"NoopLogger",{enumerable:!0,get:function(){return PDe.NoopLogger}});var LEt=wDe();Hm.logs=LEt.LogsAPI.getInstance()});var MDe=F(Dv=>{"use strict";A();Object.defineProperty(Dv,"__esModule",{value:!0});Dv.disableInstrumentations=Dv.enableInstrumentations=void 0;function UEt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}Dv.enableInstrumentations=UEt;function QEt(e){e.forEach(t=>t.disable())}Dv.disableInstrumentations=QEt});var QDe=F(PF=>{"use strict";A();Object.defineProperty(PF,"__esModule",{value:!0});PF.registerInstrumentations=void 0;var LDe=(ze(),Me(We)),FEt=SK(),UDe=MDe();function GEt(e){let t=e.tracerProvider||LDe.trace.getTracerProvider(),n=e.meterProvider||LDe.metrics.getMeterProvider(),r=e.loggerProvider||FEt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,UDe.enableInstrumentations)(o,t,n,r),()=>{(0,UDe.disableInstrumentations)(o)}}PF.registerInstrumentations=GEt});var YDe=F(MF=>{"use strict";A();Object.defineProperty(MF,"__esModule",{value:!0});MF.satisfies=void 0;var CK=(ze(),Me(We)),HDe=/^(?: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-]+)*))?$/,zEt=/^(?<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-]+)*))?$/,jEt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function HEt(e,t,n){if(!$Et(e))return CK.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=KEt(e);if(!r)return!1;let o=[],i=$De(r,t,o,n);return i&&!n?.includePrerelease?VEt(r,o):i}MF.satisfies=HEt;function $Et(e){return typeof e=="string"&&HDe.test(e)}function $De(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(TK(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=g0t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!TK(e,i,n,r))return!1;return!0}return TK(e,t,n,r)}function TK(e,t,n,r){if(t=YEt(t,r),t.includes(" "))return $De(e,t,n,r);{let o=JEt(t);return n.push(o),qEt(e,o)}}function qEt(e,t){if(t.invalid)return!1;if(!t.version||bK(t.version))return!0;let n=GDe(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=GDe(r,o)}return jEt[t.op]?.includes(n)}function VEt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function YEt(e,t){return e=e.trim(),e=m0t(e,t),e=f0t(e),e=A0t(e,t),e=e.trim(),e}function Hu(e){return!e||e.toLowerCase()==="x"||e==="*"}function KEt(e){let t=e.match(HDe);if(!t){CK.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function JEt(e){if(!e)return{};let t=e.match(zEt);if(!t)return CK.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function bK(e){return e==="*"||e==="x"||e==="X"}function FDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function ZEt(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 WEt(e,t){if(bK(e)||bK(t))return 0;let[n,r]=ZEt(FDe(e),FDe(t));return n>r?1:n<r?-1:0}function GDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=WEt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var qDe="[a-zA-Z0-9-]",VDe="0|[1-9]\\d*",XEt=`\\d*[a-zA-Z-]${qDe}*`,e0t="((?:<|>)?=?)",zDe=`(?:${VDe}|${XEt})`,t0t=`(?:-(${zDe}(?:\\.${zDe})*))`,jDe=`${qDe}+`,n0t=`(?:\\+(${jDe}(?:\\.${jDe})*))`,IK=`${VDe}|x|X|\\*`,HN=`[v=\\s]*(${IK})(?:\\.(${IK})(?:\\.(${IK})(?:${t0t})?${n0t}?)?)?`,r0t=`^${e0t}\\s*${HN}$`,o0t=new RegExp(r0t),i0t=`^\\s*(${HN})\\s+-\\s+(${HN})\\s*$`,a0t=new RegExp(i0t),s0t="(?:~>?)",u0t=`^${s0t}${HN}$`,c0t=new RegExp(u0t),l0t="(?:\\^)",d0t=`^${l0t}${HN}$`,p0t=new RegExp(d0t);function f0t(e){let t=c0t;return e.replace(t,(n,r,o,i,a)=>{let c;return Hu(r)?c="":Hu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Hu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function m0t(e,t){let n=p0t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,l)=>{let f;return Hu(i)?f="":Hu(a)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Hu(c)?i==="0"?f=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:l?i==="0"?a==="0"?f=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?a==="0"?f=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,f})}function A0t(e,t){let n=o0t;return e.replace(n,(r,o,i,a,c,l)=>{let f=Hu(i),h=f||Hu(a),y=h||Hu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(l="-0"),r=`${o+i}.${a}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),r})}function g0t(e,t){let n=a0t;return e.replace(n,(r,o,i,a,c,l,f,h,y,S,b,v)=>(Hu(i)?o="":Hu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Hu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Hu(y)?h="":Hu(S)?h=`<${+y+1}.0.0-0`:Hu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var vK=F(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.massUnwrap=Ns.unwrap=Ns.massWrap=Ns.wrap=void 0;var $u=console.error.bind(console);function $N(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 h0t=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return $N(o,"__original",r),$N(o,"__unwrap",()=>{e[t]===o&&$N(e,t,r)}),$N(o,"__wrapped",!0),$N(e,t,o),o};Ns.wrap=h0t;var _0t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ns.wrap)(r,o,n)})})};Ns.massWrap=_0t;var E0t=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ns.unwrap=E0t;var y0t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ns.unwrap)(n,r)})})};Ns.massUnwrap=y0t;function qN(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Ns.default=qN;qN.wrap=Ns.wrap;qN.massWrap=Ns.massWrap;qN.unwrap=Ns.unwrap;qN.massUnwrap=Ns.massUnwrap});var KDe=F(UF=>{"use strict";A();Object.defineProperty(UF,"__esModule",{value:!0});UF.InstrumentationAbstract=void 0;var RK=(ze(),Me(We)),S0t=SK(),LF=vK(),xK=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=RK.diag.createComponentLogger({namespace:t}),this._tracer=RK.trace.getTracer(t,n),this._meter=RK.metrics.getMeter(t,n),this._logger=S0t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=LF.wrap;_unwrap=LF.unwrap;_massWrap=LF.massWrap;_massUnwrap=LF.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)}}};UF.InstrumentationAbstract=xK});var JDe=F(Z_=>{"use strict";A();Object.defineProperty(Z_,"__esModule",{value:!0});Z_.ModuleNameTrie=Z_.ModuleNameSeparator=void 0;Z_.ModuleNameSeparator="/";var QF=class{hooks=[];children=new Map},DK=class{_trie=new QF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(Z_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new QF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(Z_.ModuleNameSeparator)){let l=o.children.get(c);if(!l){a=!1;break}r||i.push(...l.hooks),o=l}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};Z_.ModuleNameTrie=DK});var WDe=F(FF=>{"use strict";A();Object.defineProperty(FF,"__esModule",{value:!0});FF.RequireInTheMiddleSingleton=void 0;var T0t=zy(),ZDe=Fe("path"),BK=JDe(),I0t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),NK=class e{_moduleNameTrie=new BK.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new T0t.Hook(null,{internals:!0},(t,n,r)=>{let o=b0t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return I0t?new e:this._instance=this._instance??new e}};FF.RequireInTheMiddleSingleton=NK;function b0t(e){return ZDe.sep!==BK.ModuleNameSeparator?e.split(ZDe.sep).join(BK.ModuleNameSeparator):e}});var r1e=F(VN=>{A();var XDe=[],OK=new WeakMap,e1e=new WeakMap,t1e=new Map,n1e=[],C0t={set(e,t,n){let r=OK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=e1e.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=OK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function v0t(e,t,n,r,o){t1e.set(e,o),OK.set(t,n),e1e.set(t,r);let i=new Proxy(t,C0t);XDe.forEach(a=>a(e,i,o)),n1e.push([e,i,o])}VN.register=v0t;VN.importHooks=XDe;VN.specifiers=t1e;VN.toHook=n1e});var MK=F((f_n,Nv)=>{A();var o1e=Fe("path"),R0t=IL(),{fileURLToPath:x0t}=Fe("url"),{MessageChannel:D0t}=Fe("worker_threads"),{isBuiltin:kK}=Fe("module");kK||(kK=()=>!0);var{importHooks:wK,specifiers:B0t,toHook:N0t}=r1e();function i1e(e){wK.push(e),N0t.forEach(([t,n,r])=>e(t,n,r))}function a1e(e){let t=wK.indexOf(e);t>-1&&wK.splice(t,1)}function Bv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var PK;function O0t(){let{port1:e,port2:t}=new D0t,n=0,r;PK=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),l=new Promise(f=>{r=f}).then(()=>{clearInterval(c)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function YN(e,t,n){if(!(this instanceof YN))return new YN(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;PK&&Array.isArray(e)&&PK(e),this._iitmHook=(o,i,a)=>{let c=o,l=c.startsWith("node:"),f,h;if(l){let y=o.slice(5);kK(y)&&(o=y)}else if(c.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{f=x0t(o),o=f}catch{}if(Error.stackTraceLimit=y,f){let S=R0t(f);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(f&&y===f)Bv(n,i,f,void 0);else if(y===o){if(!h)Bv(n,i,o,h);else if(h.endsWith(B0t.get(c)))Bv(n,i,o,h);else if(r){let S=o+o1e.sep+o1e.relative(h,f);Bv(n,i,S,h)}}else y===a&&Bv(n,i,a,h);else Bv(n,i,o,h)},i1e(this._iitmHook)}YN.prototype.unhook=function(){a1e(this._iitmHook)};Nv.exports=YN;Nv.exports.Hook=YN;Nv.exports.addHook=i1e;Nv.exports.removeHook=a1e;Nv.exports.createAddHookMessageChannel=O0t});var LK=F(W_=>{"use strict";A();Object.defineProperty(W_,"__esModule",{value:!0});W_.isWrapped=W_.safeExecuteInTheMiddleAsync=W_.safeExecuteInTheMiddle=void 0;function k0t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}W_.safeExecuteInTheMiddle=k0t;async function w0t(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}}W_.safeExecuteInTheMiddleAsync=w0t;function P0t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}W_.isWrapped=P0t});var c1e=F(GF=>{"use strict";A();Object.defineProperty(GF,"__esModule",{value:!0});GF.InstrumentationBase=void 0;var KN=Fe("path"),s1e=Fe("util"),M0t=YDe(),UK=vK(),L0t=KDe(),U0t=WDe(),Q0t=MK(),JN=(ze(),Me(We)),F0t=zy(),G0t=Fe("fs"),z0t=LK(),QK=class extends L0t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=U0t.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,z0t.isWrapped)(t[n])&&this._unwrap(t,n),s1e.types.isProxy(t)){let o=(0,UK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,UK.wrap)(t,n,r)};_unwrap=(t,n)=>s1e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,UK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{JN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){JN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(o=>{n.forEach(i=>{this._wrap(o,i,r)})})};_massUnwrap=(t,n)=>{if(t)Array.isArray(t)||(t=[t]);else{JN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){JN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,G0t.readFileSync)(KN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{JN.diag.warn("Failed extracting version",t)}}_onRequire(t,n,r,o){if(!o)return typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for nodejs core module on require hook",{module:t.name}),t.patch(n)):n;let i=this._extractPackageVersion(o);if(t.moduleVersion=i,t.name===r)return u1e(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=KN.normalize(r);return a.filter(f=>f.name===c&&u1e(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,l)=>{if(!l&&KN.isAbsolute(c)){let f=KN.parse(c);c=f.name,l=f.dir}return this._onRequire(t,a,c,l)},r=(a,c,l)=>this._onRequire(t,a,c,l),o=KN.isAbsolute(t.name)?new F0t.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Q0t.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}};GF.InstrumentationBase=QK;function u1e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,M0t.satisfies)(t,r,{includePrerelease:n}))}});var l1e=F(zF=>{"use strict";A();Object.defineProperty(zF,"__esModule",{value:!0});zF.normalize=void 0;var j0t=Fe("path");Object.defineProperty(zF,"normalize",{enumerable:!0,get:function(){return j0t.normalize}})});var d1e=F(Ov=>{"use strict";A();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.normalize=Ov.InstrumentationBase=void 0;var H0t=c1e();Object.defineProperty(Ov,"InstrumentationBase",{enumerable:!0,get:function(){return H0t.InstrumentationBase}});var $0t=l1e();Object.defineProperty(Ov,"normalize",{enumerable:!0,get:function(){return $0t.normalize}})});var FK=F(kv=>{"use strict";A();Object.defineProperty(kv,"__esModule",{value:!0});kv.normalize=kv.InstrumentationBase=void 0;var p1e=d1e();Object.defineProperty(kv,"InstrumentationBase",{enumerable:!0,get:function(){return p1e.InstrumentationBase}});Object.defineProperty(kv,"normalize",{enumerable:!0,get:function(){return p1e.normalize}})});var f1e=F(jF=>{"use strict";A();Object.defineProperty(jF,"__esModule",{value:!0});jF.InstrumentationNodeModuleDefinition=void 0;var GK=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}};jF.InstrumentationNodeModuleDefinition=GK});var m1e=F(HF=>{"use strict";A();Object.defineProperty(HF,"__esModule",{value:!0});HF.InstrumentationNodeModuleFile=void 0;var q0t=FK(),zK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,q0t.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};HF.InstrumentationNodeModuleFile=zK});var A1e=F(_S=>{"use strict";A();Object.defineProperty(_S,"__esModule",{value:!0});_S.semconvStabilityFromStr=_S.SemconvStability=void 0;var $F;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})($F=_S.SemconvStability||(_S.SemconvStability={}));function V0t(e,t){let n=$F.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=$F.DUPLICATE;break}else o.toLowerCase()===e&&(n=$F.STABLE);return n}_S.semconvStabilityFromStr=V0t});var h1e=F(ra=>{"use strict";A();Object.defineProperty(ra,"__esModule",{value:!0});ra.semconvStabilityFromStr=ra.SemconvStability=ra.safeExecuteInTheMiddleAsync=ra.safeExecuteInTheMiddle=ra.isWrapped=ra.InstrumentationNodeModuleFile=ra.InstrumentationNodeModuleDefinition=ra.InstrumentationBase=ra.registerInstrumentations=void 0;var Y0t=QDe();Object.defineProperty(ra,"registerInstrumentations",{enumerable:!0,get:function(){return Y0t.registerInstrumentations}});var K0t=FK();Object.defineProperty(ra,"InstrumentationBase",{enumerable:!0,get:function(){return K0t.InstrumentationBase}});var J0t=f1e();Object.defineProperty(ra,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return J0t.InstrumentationNodeModuleDefinition}});var Z0t=m1e();Object.defineProperty(ra,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Z0t.InstrumentationNodeModuleFile}});var jK=LK();Object.defineProperty(ra,"isWrapped",{enumerable:!0,get:function(){return jK.isWrapped}});Object.defineProperty(ra,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return jK.safeExecuteInTheMiddle}});Object.defineProperty(ra,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return jK.safeExecuteInTheMiddleAsync}});var g1e=A1e();Object.defineProperty(ra,"SemconvStability",{enumerable:!0,get:function(){return g1e.SemconvStability}});Object.defineProperty(ra,"semconvStabilityFromStr",{enumerable:!0,get:function(){return g1e.semconvStabilityFromStr}})});var _1e=F((w_n,W0t)=>{W0t.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 y1e=F(ES=>{"use strict";A();Object.defineProperty(ES,"__esModule",{value:!0});ES.range=ES.balanced=void 0;var X0t=(e,t,n)=>{let r=e instanceof RegExp?E1e(e,n):e,o=t instanceof RegExp?E1e(t,n):t,i=r!==null&&o!=null&&(0,ES.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)}};ES.balanced=X0t;var E1e=(e,t)=>{let n=t.match(e);return n?n[0]:null},eyt=(e,t,n)=>{let r,o,i,a,c,l=n.indexOf(e),f=n.indexOf(t,l+1),h=l;if(l>=0&&f>0){if(e===t)return[l,f];for(r=[],i=n.length;h>=0&&!c;){if(h===l)r.push(h),l=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(c=[y,f])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=f),f=n.indexOf(t,h+1);h=l<f&&l>=0?l:f}r.length&&a!==void 0&&(c=[i,a])}return c};ES.range=eyt});var R1e=F(wv=>{"use strict";A();Object.defineProperty(wv,"__esModule",{value:!0});wv.EXPANSION_MAX=void 0;wv.expand=fyt;var S1e=y1e(),T1e="\0SLASH"+Math.random()+"\0",I1e="\0OPEN"+Math.random()+"\0",$K="\0CLOSE"+Math.random()+"\0",b1e="\0COMMA"+Math.random()+"\0",C1e="\0PERIOD"+Math.random()+"\0",tyt=new RegExp(T1e,"g"),nyt=new RegExp(I1e,"g"),ryt=new RegExp($K,"g"),oyt=new RegExp(b1e,"g"),iyt=new RegExp(C1e,"g"),ayt=/\\\\/g,syt=/\\{/g,uyt=/\\}/g,cyt=/\\,/g,lyt=/\\\./g;wv.EXPANSION_MAX=1e5;function HK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function dyt(e){return e.replace(ayt,T1e).replace(syt,I1e).replace(uyt,$K).replace(cyt,b1e).replace(lyt,C1e)}function pyt(e){return e.replace(tyt,"\\").replace(nyt,"{").replace(ryt,"}").replace(oyt,",").replace(iyt,".")}function v1e(e){if(!e)return[""];let t=[],n=(0,S1e.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,a=r.split(",");a[a.length-1]+="{"+o+"}";let c=v1e(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function fyt(e,t={}){if(!e)return[];let{max:n=wv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),ZN(dyt(e),n,!0).map(pyt)}function myt(e){return"{"+e+"}"}function Ayt(e){return/^-?0\d/.test(e)}function gyt(e,t){return e<=t}function hyt(e,t){return e>=t}function ZN(e,t,n){let r=[],o=(0,S1e.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?ZN(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<a.length&&c<t;c++){let l=i+"{"+o.body+"}"+a[c];r.push(l)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),f=c||l,h=o.body.indexOf(",")>=0;if(!f&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+$K+o.post,ZN(e,t,!0)):[e];let y;if(f)y=o.body.split(/\.\./);else if(y=v1e(o.body),y.length===1&&y[0]!==void 0&&(y=ZN(y[0],t,!1).map(myt),y.length===1))return a.map(b=>o.pre+y[0]+b);let S;if(f&&y[0]!==void 0&&y[1]!==void 0){let b=HK(y[0]),v=HK(y[1]),x=Math.max(y[0].length,y[1].length),D=y.length===3&&y[2]!==void 0?Math.max(Math.abs(HK(y[2])),1):1,w=gyt;v<b&&(D*=-1,w=hyt);let z=y.some(Ayt);S=[];for(let G=b;w(G,v)&&S.length<t;G+=D){let $;if(l)$=String.fromCharCode(G),$==="\\"&&($="");else if($=String(G),z){let ie=x-$.length;if(ie>0){let ge=new Array(ie+1).join("0");G<0?$="-"+ge+$.slice(1):$=ge+$}}S.push($)}}else{S=[];for(let b=0;b<y.length;b++)S.push.apply(S,ZN(y[b],t,!1))}for(let b=0;b<S.length;b++)for(let v=0;v<a.length&&r.length<t;v++){let x=i+S[b]+a[v];(!n||f||x)&&r.push(x)}}return r}});var x1e=F(qF=>{"use strict";A();Object.defineProperty(qF,"__esModule",{value:!0});qF.assertValidPattern=void 0;var _yt=1024*64,Eyt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>_yt)throw new TypeError("pattern is too long")};qF.assertValidPattern=Eyt});var B1e=F(VF=>{"use strict";A();Object.defineProperty(VF,"__esModule",{value:!0});VF.parseClass=void 0;var yyt={"[: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]},WN=e=>e.replace(/[[\]\\-]/g,"\\$&"),Syt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),D1e=e=>e.join(""),Tyt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,a=!1,c=!1,l=!1,f=!1,h=n,y="";e:for(;i<e.length;){let x=e.charAt(i);if((x==="!"||x==="^")&&i===n+1){f=!0,i++;continue}if(x==="]"&&a&&!l){h=i+1;break}if(a=!0,x==="\\"&&!l){l=!0,i++;continue}if(x==="["&&!l){for(let[D,[w,Q,z]]of Object.entries(yyt))if(e.startsWith(D,i)){if(y)return["$.",!1,e.length-n,!0];i+=D.length,z?o.push(w):r.push(w),c=c||Q;continue e}}if(l=!1,y){x>y?r.push(WN(y)+"-"+WN(x)):x===y&&r.push(WN(x)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(WN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=x,i+=2;continue}r.push(WN(x)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!f){let x=r[0].length===2?r[0].slice(-1):r[0];return[Syt(x),!1,h-n,!1]}let S="["+(f?"^":"")+D1e(r)+"]",b="["+(f?"":"^")+D1e(o)+"]";return[r.length&&o.length?"("+S+"|"+b+")":r.length?S:b,c,h-n,!0]};VF.parseClass=Tyt});var KF=F(YF=>{"use strict";A();Object.defineProperty(YF,"__esModule",{value:!0});YF.unescape=void 0;var Iyt=(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");YF.unescape=Iyt});var YK=F(XF=>{"use strict";A();var Gc;Object.defineProperty(XF,"__esModule",{value:!0});XF.AST=void 0;var byt=B1e(),JF=KF(),Cyt=new Set(["!","?","+","*","@"]),qK=e=>Cyt.has(e),N1e=e=>qK(e.type),vyt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Ryt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),xyt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),O1e=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Dyt="(?!(?:^|/)\\.\\.?(?:$|/))",ZF="(?!\\.)",Byt=new Set(["[","."]),Nyt=new Set(["..","."]),Oyt=new Set("().*{}+?[]^$\\!"),kyt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),VK="[^/]",k1e=VK+"*?",w1e=VK+"+?",wyt=0,WF=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++wyt;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,n,r={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,t==="!"&&!this.#n.#u&&this.#c.push(this),this.#s=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#a!==void 0?this.#a:this.type?this.#a=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#a=this.#e.map(t=>String(t)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#t;for(;r;){for(let o=n.#s+1;!r.type&&o<r.#e.length;o++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[o])}n=r,r=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Gc&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let t=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#s===0)return!0;let t=this.#t;for(let n=0;n<this.#s;n++){let r=t.#e[n];if(!(r instanceof Gc&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#s===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Gc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let a=o.maxExtglobRecursion??2,c=!1,l=!1,f=-1,h=!1;if(n.type===null){let x=r,D="";for(;x<t.length;){let w=t.charAt(x++);if(c||w==="\\"){c=!c,D+=w;continue}if(l){x===f+1?(w==="^"||w==="!")&&(h=!0):w==="]"&&!(x===f+2&&h)&&(l=!1),D+=w;continue}else if(w==="["){l=!0,f=x,h=!1,D+=w;continue}if(!o.noext&&qK(w)&&t.charAt(x)==="("&&i<=a){n.push(D),D="";let z=new Gc(w,n);x=Gc.#d(t,z,x,o,i+1),n.push(z);continue}D+=w}return n.push(D),x}let y=r+1,S=new Gc(null,n),b=[],v="";for(;y<t.length;){let x=t.charAt(y++);if(c||x==="\\"){c=!c,v+=x;continue}if(l){y===f+1?(x==="^"||x==="!")&&(h=!0):x==="]"&&!(y===f+2&&h)&&(l=!1),v+=x;continue}else if(x==="["){l=!0,f=y,h=!1,v+=x;continue}if(!o.noext&&qK(x)&&t.charAt(y)==="("&&(i<=a||n&&n.#p(x))){let w=n&&n.#p(x)?0:1;S.push(v),v="";let Q=new Gc(x,S);S.push(Q),y=Gc.#d(t,Q,y,o,i+w);continue}if(x==="|"){S.push(v),v="",b.push(S),S=new Gc(null,n);continue}if(x===")")return v===""&&n.#e.length===0&&(n.#l=!0),S.push(v),v="",n.push(...b,S),y;v+=x}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#m(t,Ryt)}#m(t,n=vyt){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=xyt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Gc(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.#a=void 0}#y(t){return!!O1e.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=O1e.get(this.type),r=t.#e[0],o=n?.get(r.type);if(!o)return!1;this.#e=r.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=o,this.#a=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new Gc(null,void 0,n);return Gc.#d(t,r,0,n,0),r}toMMPattern(){if(this!==this.#n)return this.#n.toMMPattern();let t=this.toString(),[n,r,o,i]=this.toRegExpSource();if(!(o||this.#r||this.#i.nocase&&!this.#i.nocaseMagicOnly&&t.toUpperCase()!==t.toLowerCase()))return r;let c=(this.#i.nocase?"i":"")+(i?"u":"");return Object.assign(new RegExp(`^${n}$`,c),{_src:n,_glob:t})}get options(){return this.#i}toRegExpSource(t){let n=t??!!this.#i.dot;if(this.#n===this&&(this.#f(),this.#h()),!N1e(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(b=>typeof b!="string"),f=this.#e.map(b=>{let[v,x,D,w]=typeof b=="string"?Gc.#I(b,this.#r,l):b.toRegExpSource(t);return this.#r=this.#r||D,this.#o=this.#o||w,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Nyt.has(this.#e[0]))){let v=Byt,x=n&&v.has(f.charAt(0))||f.startsWith("\\.")&&v.has(f.charAt(2))||f.startsWith("\\.\\.")&&v.has(f.charAt(4)),D=!n&&!t&&v.has(f.charAt(0));h=x?Dyt:D?ZF:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+f+y,(0,JF.unescape)(f),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(),f=this;return f.#e=[l],f.type=null,f.#r=void 0,[l,(0,JF.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!ZF?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?ZF:"")+w1e;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?ZF:"")+k1e+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+l}return[c,(0,JF.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(N1e(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#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.#a=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,a]=n.toRegExpSource(t);return this.#o=this.#o||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",a=!1,c=!1;for(let l=0;l<t.length;l++){let f=t.charAt(l);if(o){o=!1,i+=(Oyt.has(f)?"\\":"")+f;continue}if(f==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?w1e:k1e,n=!0;continue}else c=!1;if(f==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(f==="["){let[h,y,S,b]=(0,byt.parseClass)(t,l);if(S){i+=h,a=a||y,l+=S-1,n=n||b;continue}}if(f==="?"){i+=VK,n=!0;continue}i+=kyt(f)}return[i,(0,JF.unescape)(t),!!n,a]}};XF.AST=WF;Gc=WF});var KK=F(e4=>{"use strict";A();Object.defineProperty(e4,"__esModule",{value:!0});e4.escape=void 0;var Pyt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");e4.escape=Pyt});var G1e=F(ft=>{"use strict";A();Object.defineProperty(ft,"__esModule",{value:!0});ft.unescape=ft.escape=ft.AST=ft.Minimatch=ft.match=ft.makeRe=ft.braceExpand=ft.defaults=ft.filter=ft.GLOBSTAR=ft.sep=ft.minimatch=void 0;var Myt=R1e(),t4=x1e(),L1e=YK(),Lyt=KK(),Uyt=KF(),Qyt=(e,t,n={})=>((0,t4.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new yS(t,n).match(e));ft.minimatch=Qyt;var Fyt=/^\*+([^+@!?\*\[\(]*)$/,Gyt=e=>t=>!t.startsWith(".")&&t.endsWith(e),zyt=e=>t=>t.endsWith(e),jyt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Hyt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),$yt=/^\*+\.\*+$/,qyt=e=>!e.startsWith(".")&&e.includes("."),Vyt=e=>e!=="."&&e!==".."&&e.includes("."),Yyt=/^\.\*+$/,Kyt=e=>e!=="."&&e!==".."&&e.startsWith("."),Jyt=/^\*+$/,Zyt=e=>e.length!==0&&!e.startsWith("."),Wyt=e=>e.length!==0&&e!=="."&&e!=="..",Xyt=/^\?+([^+@!?\*\[\(]*)?$/,eSt=([e,t=""])=>{let n=U1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},tSt=([e,t=""])=>{let n=Q1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},nSt=([e,t=""])=>{let n=Q1e([e]);return t?r=>n(r)&&r.endsWith(t):n},rSt=([e,t=""])=>{let n=U1e([e]);return t?r=>n(r)&&r.endsWith(t):n},U1e=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},Q1e=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},F1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",P1e={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=F1e==="win32"?P1e.win32.sep:P1e.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var oSt="[^/]",iSt=oSt+"*?",aSt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",sSt="(?:(?!(?:\\/|^)\\.).)*?",uSt=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=uSt;ft.minimatch.filter=ft.filter;var Yd=(e,t={})=>Object.assign({},e,t),cSt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ft.minimatch;let t=ft.minimatch;return Object.assign((r,o,i={})=>t(r,o,Yd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,Yd(e,i))}static defaults(o){return t.defaults(Yd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,Yd(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,Yd(e,i))}},unescape:(r,o={})=>t.unescape(r,Yd(e,o)),escape:(r,o={})=>t.escape(r,Yd(e,o)),filter:(r,o={})=>t.filter(r,Yd(e,o)),defaults:r=>t.defaults(Yd(e,r)),makeRe:(r,o={})=>t.makeRe(r,Yd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,Yd(e,o)),match:(r,o,i={})=>t.match(r,o,Yd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=cSt;ft.minimatch.defaults=ft.defaults;var lSt=(e,t={})=>((0,t4.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Myt.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=lSt;ft.minimatch.braceExpand=ft.braceExpand;var dSt=(e,t={})=>new yS(e,t).makeRe();ft.makeRe=dSt;ft.minimatch.makeRe=ft.makeRe;var pSt=(e,t,n={})=>{let r=new yS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=pSt;ft.minimatch.match=ft.match;var M1e=/[?*]|[+@!]\(.*?\)|\[|\]/,fSt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),yS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,t4.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||F1e,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!M1e.test(i[2]))&&!M1e.test(i[3]),f=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(f)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 a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let c=r[o+1],l=r[o+2],f=r[o+3];if(c!==".."||!l||l==="."||l===".."||!f||f==="."||f==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let 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,a=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(c==="a")return!1;c="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=l?3:c?0:void 0,S=h?3:f?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[b,v]=[t[y],n[S]];b.toLowerCase()===v.toLowerCase()&&(n[S]=b,i=S,o=y)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(ft.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let a=n.indexOf(ft.GLOBSTAR,i),c=n.lastIndexOf(ft.GLOBSTAR),[l,f,h]=r?[n.slice(i,a),n.slice(a+1),[]]:[n.slice(i,a),n.slice(a+1,c),n.slice(c+1)];if(l.length){let Q=t.slice(o,o+l.length);if(!this.#o(Q,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 Q=t.length-h.length;if(this.#o(t,h,r,Q,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(Q--,!this.#o(t,h,r,Q,0)))return!1;y=h.length+1}}if(!f.length){let Q=!!y;for(let z=o;z<t.length-y;z++){let G=String(t[z]);if(Q=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||Q}let S=[[[],0]],b=S[0],v=0,x=[0];for(let Q of f)Q===ft.GLOBSTAR?(x.push(v),b=[[],0],S.push(b)):(b[0].push(Q),v++);let D=S.length-1,w=t.length-y;for(let Q of S)Q[1]=w-(x[D--]+Q[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,a,c){let l=n[o];if(!l){for(let y=r;y<t.length;y++){c=!0;let S=t[y];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return c}let[f,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+f.length),f,i,r,0)&&a<this.maxGlobstarRecursion){let b=this.#r(t,n,r+f.length,o+1,i,a+1,c);if(b!==!1)return b}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 a,c,l,f;for(a=o,c=i,f=t.length,l=n.length;a<f&&c<l;a++,c++){this.debug("matchOne loop");let h=n[c],y=t[a];if(this.debug(n,h,y),h===!1||h===ft.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(a===f&&c===l)return!0;if(a===f)return r;if(c===l)return a===f-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,ft.braceExpand)(this.pattern,this.options)}parse(t){(0,t4.assertValidPattern)(t);let n=this.options;if(t==="**")return ft.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(Jyt))?o=n.dot?Wyt:Zyt:(r=t.match(Fyt))?o=(n.nocase?n.dot?Hyt:jyt:n.dot?zyt:Gyt)(r[1]):(r=t.match(Xyt))?o=(n.nocase?n.dot?tSt:eSt:n.dot?nSt:rSt)(r):(r=t.match($yt))?o=n.dot?Vyt:qyt:(r=t.match(Yyt))&&(o=Kyt);let i=L1e.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?iSt:n.dot?aSt:sSt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let f=l.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?fSt(y):y===ft.GLOBSTAR?ft.GLOBSTAR:y._src});f.forEach((y,S)=>{let b=f[S+1],v=f[S-1];y!==ft.GLOBSTAR||v===ft.GLOBSTAR||(v===void 0?b!==void 0&&b!==ft.GLOBSTAR?f[S+1]="(?:\\/|"+r+"\\/)?"+b:f[S]=r:b===void 0?f[S-1]=v+"(?:\\/|\\/"+r+")?":b!==ft.GLOBSTAR&&(f[S-1]=v+"(?:\\/|\\/"+r+"\\/)"+b,f[S+1]=ft.GLOBSTAR))});let h=f.filter(y=>y!==ft.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("|"),[a,c]=t.length>1?["(?:",")"]:["",""];i="^"+a+i+c+"$",this.partial&&(i="^(?:\\/|"+a+i.slice(1,-1)+c+")$"),this.negate&&(i="^(?!"+i+").+$");try{this.regexp=new RegExp(i,[...o].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(t){return this.preserveMultipleSlashes?t.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(t)?["",...t.split(/\/+/)]:t.split(/\/+/)}match(t,n=this.partial){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return t==="";if(t==="/"&&n)return!0;let r=this.options;this.isWindows&&(t=t.split("\\").join("/"));let o=this.slashSplit(t);this.debug(this.pattern,"split",o);let i=this.set;this.debug(this.pattern,"set",i);let a=o[o.length-1];if(!a)for(let c=o.length-2;!a&&c>=0;c--)a=o[c];for(let c=0;c<i.length;c++){let l=i[c],f=o;if(r.matchBase&&l.length===1&&(f=[a]),this.matchOne(f,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ft.minimatch.defaults(t).Minimatch}};ft.Minimatch=yS;var mSt=YK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return mSt.AST}});var ASt=KK();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return ASt.escape}});var gSt=KF();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return gSt.unescape}});ft.minimatch.AST=L1e.AST;ft.minimatch.Minimatch=yS;ft.minimatch.escape=Lyt.escape;ft.minimatch.unescape=Uyt.unescape});var Y1e=F((X_n,WK)=>{"use strict";A();var z1e=Fe("node:diagnostics_channel"),{context:n4,trace:JK,SpanStatusCode:r4,propagation:ZK,diag:hSt}=(ze(),Me(We)),{getRPCMetadata:_St,RPCType:ESt}=br(),{ATTR_HTTP_ROUTE:o4,ATTR_HTTP_RESPONSE_STATUS_CODE:j1e,ATTR_HTTP_REQUEST_METHOD:ySt,ATTR_URL_PATH:SSt}=(Wn(),Me(Fr)),{InstrumentationBase:TSt}=h1e(),{version:ISt,name:H1e}=_1e(),bSt=">=4.0.0 <6",$1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],To={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},X_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Pg="anonymous",eE=Symbol("fastify otel instance"),tE=Symbol("fastify otel request spans"),XN=Symbol("fastify otel request context"),q1e=Symbol("fastify otel addhook original"),V1e=Symbol("fastify otel setnotfound original"),eO=Symbol("fastify otel ignore path"),tO=Symbol("fastify otel record exceptions"),i4=class extends TSt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(H1e,ISt,t),this.logger=hSt.createComponentLogger({namespace:H1e}),this[eO]=null,this[tO]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[tO]=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[eO]=o=>typeof n=="function"?n(o):(r==null&&(r=G1e().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)},z1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(z1e.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:bSt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(eE,t),r.decorate(q1e,r.addHook),r.decorate(V1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let b=this[XN],v=this[tE];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:b,inject:(x,D)=>ZK.inject(b,x,D),extract:(x,D)=>ZK.extract(b,x,D)}}),r.decorateRequest(tE,null),r.decorateRequest(XN,null),r.addHook("onRoute",function(b){if(t[eO]?.(b)===!0){t.logger.debug(`Ignoring route instrumentation ${b.method} ${b.url} because it matches the ignore path`);return}if(b.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${b.method} ${b.url} because it is disabled`);return}for(let v of $1e)if(b[v]!=null){let x=b[v];if(typeof x=="function")b[v]=y(x,v,{[To.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[To.FASTIFY_TYPE]:X_.ROUTE,[o4]:b.url,[To.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:Pg});else if(Array.isArray(x)){let D=[];for(let w of x)D.push(y(w,v,{[To.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[To.FASTIFY_TYPE]:X_.ROUTE,[o4]:b.url,[To.HOOK_CALLBACK_NAME]:w.name?.length>0?w.name:Pg}));b[v]=D}}b.onSend!=null?b.onSend=Array.isArray(b.onSend)?[...b.onSend,a]:[b.onSend,a]:b.onSend=a,b.onError!=null?b.onError=Array.isArray(b.onError)?[...b.onError,c]:[b.onError,c]:b.onError=c,b.handler=y(b.handler,"handler",{[To.HOOK_NAME]:`${this.pluginName} - route-handler`,[To.FASTIFY_TYPE]:X_.HANDLER,[o4]:b.url,[To.HOOK_CALLBACK_NAME]:b.handler.name.length>0?b.handler.name:Pg})}),r.addHook("onRequest",function(b,v,x){if(this[eE].isEnabled()===!1||b.routeOptions.config?.otel===!1)return x();if(this[eE][eO]?.({url:b.url,method:b.method})===!0)return this[eE].logger.debug(`Ignoring request ${b.method} ${b.url} because it matches the ignore path`),x();let D=n4.active();JK.getSpan(D)==null&&(D=ZK.extract(D,b.headers));let w=_St(D);b.routeOptions.url!=null&&w?.type===ESt.HTTP&&(w.route=b.routeOptions.url);let Q={[To.ROOT]:"@fastify/otel",[ySt]:b.method,[SSt]:b.url};b.routeOptions.url!=null&&(Q[o4]=b.routeOptions.url);let z=this[eE].tracer.startSpan("request",{attributes:Q},D);try{this[eE]._requestHook?.(z,b)}catch(G){this[eE].logger.error({err:G},"requestHook threw")}b[XN]=JK.setSpan(D,z),b[tE]=z,n4.with(b[XN],()=>{x()})}),r.addHook("onResponse",function(b,v,x){let D=b[tE];D!=null&&(D.setAttributes({[j1e]:v.statusCode}),D.end()),b[tE]=null,x()}),r.addHook=l,r.setNotFoundHandler=f,i();function a(S,b,v,x){let D=S[tE];D!=null&&(b.statusCode>=500&&D.setStatus({code:r4.ERROR}),D.setAttributes({[j1e]:b.statusCode}),D.end()),S[tE]=null,x(null,v)}function c(S,b,v,x){let D=S[tE];D!=null&&(D.setStatus({code:r4.ERROR,message:v.message}),t[tO]!==!1&&D.recordException(v)),x()}function l(S,b){let v=this[q1e];return $1e.includes(S)?v.call(this,S,y(b,S,{[To.HOOK_NAME]:`${this.pluginName} - ${S}`,[To.FASTIFY_TYPE]:X_.INSTANCE,[To.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:Pg})):v.call(this,S,b)}function f(S,b){let v=this[V1e];typeof S=="function"?(b=y(S,"notFoundHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[To.FASTIFY_TYPE]:X_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:Pg}),v.call(this,b)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[To.FASTIFY_TYPE]:X_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:Pg})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[To.FASTIFY_TYPE]:X_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:Pg})),b=y(b,"notFoundHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[To.FASTIFY_TYPE]:X_.INSTANCE,[To.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:Pg}),v.call(this,S,b))}function h(S){for(let b of S)if(b?.routeOptions&&b.url&&b.method)return b;return null}function y(S,b,v={}){return function(...D){let w=this[eE],Q=h(D);if(Q===null)return w.logger.debug(`Ignoring route instrumentation because ${b} was called without a Fastify request argument`),S.call(this,...D);if(w.isEnabled()===!1||Q.routeOptions.config?.otel===!1)return w.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it is disabled`),S.call(this,...D);if(w[eO]?.({url:Q.url,method:Q.method})===!0)return w.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it matches the ignore path`),S.call(this,...D);let z=Q[XN]??n4.active(),G=S.name?.length>0?S.name:this.pluginName??Pg,$=w.tracer.startSpan(`${b} - ${G}`,{attributes:v},z);if(w._lifecycleHook!=null)try{w._lifecycleHook($,{hookName:b,request:Q,handler:G})}catch(ie){w.logger.error({err:ie},"Execution of lifecycleHook failed")}return n4.with(JK.setSpan(z,$),function(){try{let ie=S.call(this,...D);return typeof ie?.then=="function"?ie.then(ge=>($.end(),ge),ge=>($.setStatus({code:r4.ERROR,message:ge.message}),w[tO]!==!1&&$.recordException(ge),$.end(),Promise.reject(ge))):($.end(),ie)}catch(ie){throw $.setStatus({code:r4.ERROR,message:ie.message}),w[tO]!==!1&&$.recordException(ie),$.end(),ie}},this)}}}}};WK.exports=i4;WK.exports.FastifyOtelInstrumentation=i4});var Mg,nO,rO,K1e=O(()=>{A();(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})(Mg||(Mg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(nO||(nO={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(rO||(rO={}))});var oO,J1e=O(()=>{A();oO=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function XK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[oO]||[];return i.push(o),Object.defineProperty(e,oO,{enumerable:!1,configurable:!0,value:i}),o}function a4(e,t){let n=e[oO]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:di.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[oO])}function W1e(e,t,n){let r,o;try{o=e(),Z1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!Z1e(o)&&(t(r,o),r))throw r;return o}}function Z1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var X1e=O(()=>{A();ze();J1e()});function xSt(){let e=gt();e&&e.on("spanStart",t=>{tBe(t)})}function tBe(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[wt]:"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 u4,SS,CSt,vSt,eBe,RSt,s4,nBe=O(()=>{A();ze();u4=ae(br(),1),SS=ae(on(),1);Wn();dt();K1e();X1e();CSt="0.1.0",vSt="@sentry/instrumentation-fastify-v3",eBe="anonymous",RSt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),s4=class extends SS.InstrumentationBase{constructor(t={}){super(vSt,CSt,t)}init(){return[new SS.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let a=r,c=(0,u4.getRPCMetadata)(Ke.active()),l=a.routeOptions?a.routeOptions.url:r.routerPath;l&&c?.type===u4.RPCType.HTTP&&(c.route=l);let f=r.method||"GET";vn().setTransactionName(`${f} ${l}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||eBe,l=`${rO.MIDDLEWARE} - ${c}`,f=a[1],h=XK(f,i.tracer,l,{[Mg.FASTIFY_TYPE]:nO.MIDDLEWARE,[Mg.PLUGIN_NAME]:t,[Mg.HOOK_NAME]:n}),y=o&&a[a.length-1];return y&&(a[a.length-1]=function(...S){a4(f),y.apply(this,S)}),Ke.with($t.setSpan(Ke.active(),h),()=>W1e(()=>r.apply(this,a),S=>{S instanceof Error&&(h.setStatus({code:di.ERROR,message:S.message}),h.recordException(S)),o||a4(f)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],a=o[1],c=this.pluginName;if(!RSt.has(i))return n.apply(this,o);let l=typeof o[o.length-1]=="function"&&a.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(c,i,a,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()),xSt(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(r.errorCodes=t.errorCodes),r.fastify=r,r.default=r,r}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let a=i[0];return t.isEnabled()?(0,SS.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),a4(this,c)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let a=r,c=a.routeOptions?.handler||a.context?.handler,l=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,f=`${rO.REQUEST_HANDLER} - ${l||this.pluginName||eBe}`,h={[Mg.PLUGIN_NAME]:this.pluginName,[Mg.FASTIFY_TYPE]:nO.REQUEST_HANDLER,[z9]:a.routeOptions?a.routeOptions.url:r.routerPath};l&&(h[Mg.FASTIFY_NAME]=l);let y=XK(o,t.tracer,f,h);tBe(y);let{requestHook:S}=t.getConfig();return S&&(0,SS.safeExecuteInTheMiddle)(()=>S(y,{request:r}),b=>{b&&t._diag.error("request hook failed",b)},!0),Ke.with($t.setSpan(Ke.active(),y),()=>{i()})}}}});import*as eJ from"node:diagnostics_channel";function DSt(){let e=gt();if(e)return e.getIntegrationByName(c4)}function rBe(e,t,n,r){let o=DSt()?.getShouldHandleError()||uBe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){ba&&Z.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 uBe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function cBe(e){let t=Ot(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",a=o===n?.startsWith("handler -"),c=n==="request"||o==="request-handler";if(r[Xt]||!a&&!c&&!i)return;let l=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[wt]:"auto.http.otel.fastify",[Xt]:`${l}.fastify`});let f=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof f=="string"){let h=f.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function NSt(){let e=gt();e&&e.on("spanStart",t=>{cBe(t)})}function OSt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&cBe(i)}let r=t.routeOptions?.url,o=t.method||"GET";vn().setTransactionName(`${o} ${r}`)})}var oBe,c4,iBe,aBe,BSt,sBe,lBe=O(()=>{A();oBe=ae(Y1e(),1);dt();hr();hS();nBe();c4="Fastify",iBe=st(`${c4}.v3`,()=>new s4);aBe=st(`${c4}.v5`,()=>{let e=new oBe.FastifyOtelInstrumentation,t=e.plugin();return eJ.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?ba&&Z.error("Failed to setup Fastify instrumentation",o):(NSt(),r&&OSt(r))})}),eJ.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;rBe.call(rBe,r,o,i,"diagnostics-channel")}),e}),BSt=(({shouldHandleError:e})=>{let t;return{name:c4,setupOnce(){t=e||uBe,iBe(),aBe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),sBe=(e={})=>BSt(e)});var tJ=F(Af=>{"use strict";A();Object.defineProperty(Af,"__esModule",{value:!0});Af.SpanNames=Af.TokenKind=Af.AllowedOperationTypes=void 0;var kSt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(kSt=Af.AllowedOperationTypes||(Af.AllowedOperationTypes={}));var wSt;(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"})(wSt=Af.TokenKind||(Af.TokenKind={}));var PSt;(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"})(PSt=Af.SpanNames||(Af.SpanNames={}))});var nJ=F(iO=>{"use strict";A();Object.defineProperty(iO,"__esModule",{value:!0});iO.AttributeNames=void 0;var MSt;(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"})(MSt=iO.AttributeNames||(iO.AttributeNames={}))});var l4=F(Pv=>{"use strict";A();Object.defineProperty(Pv,"__esModule",{value:!0});Pv.OTEL_GRAPHQL_DATA_SYMBOL=Pv.OTEL_PATCHED_SYMBOL=void 0;Pv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");Pv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var dBe=F(d4=>{"use strict";A();Object.defineProperty(d4,"__esModule",{value:!0});d4.OPERATION_NOT_SUPPORTED=void 0;var xEn=l4();d4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var CBe=F(Ca=>{"use strict";A();Object.defineProperty(Ca,"__esModule",{value:!0});Ca.wrapFieldResolver=Ca.wrapFields=Ca.getSourceFromLocation=Ca.getOperation=Ca.endSpan=Ca.addSpanSource=Ca.addInputVariableAttributes=Ca.isPromise=void 0;var Mv=(ze(),Me(We)),nE=tJ(),TS=nJ(),Lg=l4(),pBe=Object.values(nE.AllowedOperationTypes),LSt=e=>typeof e?.then=="function";Ca.isPromise=LSt;var USt=e=>typeof e=="object"&&e!==null;function rJ(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{rJ(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{rJ(e,`${t}.${r}`,o)}):e.setAttribute(`${TS.AttributeNames.VARIABLES}${String(t)}`,n)}function QSt(e,t){Object.entries(t).forEach(([n,r])=>{rJ(e,n,r)})}Ca.addInputVariableAttributes=QSt;function gBe(e,t,n,r,o){let i=SBe(t,n,r,o);e.setAttribute(TS.AttributeNames.SOURCE,i)}Ca.addSpanSource=gBe;function FSt(e,t,n,r,o){let i=hBe(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?EBe(n):_Be(n,o);return i={span:GSt(e,t,n,r,o,c)},HSt(n,o,i),{field:i,spanAdded:!0}}function GSt(e,t,n,r,o,i){let a={[TS.AttributeNames.FIELD_NAME]:r.fieldName,[TS.AttributeNames.FIELD_PATH]:o.join("."),[TS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[TS.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${nE.SpanNames.RESOLVE} ${a[TS.AttributeNames.FIELD_PATH]}`,{attributes:a},i?Mv.trace.setSpan(Mv.context.active(),i):void 0),l=n[Lg.OTEL_GRAPHQL_DATA_SYMBOL].source,f=r.fieldNodes.find(h=>h.kind==="Field");return f&&gBe(c,l.loc,t().allowValues,f.loc?.start,f.loc?.end),c}function zSt(e,t){t&&e.recordException(t),e.end()}Ca.endSpan=zSt;function jSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>pBe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>pBe.indexOf(n?.operation)!==-1)}Ca.getOperation=jSt;function HSt(e,t,n){return e[Lg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function hBe(e,t){return e[Lg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function _Be(e,t){for(let n=t.length-1;n>0;n--){let r=hBe(e,t.slice(0,n));if(r)return r.span}return EBe(e)}function EBe(e){return e[Lg.OTEL_GRAPHQL_DATA_SYMBOL].span}function $St(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 qSt(e){return yBe(`
37
37
  `,e)}function fBe(e){return yBe(" ",e)}function yBe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var VSt=[nE.TokenKind.FLOAT,nE.TokenKind.STRING,nE.TokenKind.INT,nE.TokenKind.BLOCK_STRING];function SBe(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,a=typeof r=="number"?r:e.end,c=e.startToken.next,l=1;for(;c;){if(c.start<i){c=c.next,l=c?.line;continue}if(c.end>a){c=c.next,l=c?.line;continue}let f=c.value||c.kind,h="";!t&&VSt.indexOf(c.kind)>=0&&(f="*"),c.kind===nE.TokenKind.STRING&&(f=`"${f}"`),c.kind===nE.TokenKind.EOF&&(f=""),c.line>l?(o+=qSt(c.line-l),l=c.line,h=fBe(c.column-1)):c.line===c.prev?.line&&(h=fBe(c.start-(c.prev?.end||0))),o+=h+f,c&&(c=c.next)}}return o}Ca.getSourceFromLocation=SBe;function TBe(e,t,n){if(!e||e[Lg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Lg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=bBe(t,n,i.resolve)),i.type)){let a=IBe(i.type);for(let c of a)TBe(c,t,n)}})}Ca.wrapFields=TBe;function IBe(e){return"ofType"in e?IBe(e.ofType):YSt(e)?e.getTypes():KSt(e)?[e]:[]}function YSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function KSt(e){return"getFields"in e&&typeof e.getFields=="function"}var mBe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:Mv.SpanStatusCode.ERROR,message:t.message}),e.end())},ABe=(e,t)=>{t&&e.end()};function bBe(e,t,n,r=!1){if(o[Lg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,l){if(!n)return;let f=t();if(f.ignoreTrivialResolveSpans&&r&&(USt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,a,c,l);if(!c[Lg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,l);let h=$St(f.mergeItems,l&&l.path),y=h.filter(v=>typeof v=="string").length,S,b=!1;if(f.depth>=0&&f.depth<y)S=_Be(c,h);else{let{field:v,spanAdded:x}=FSt(e,t,c,l,h);S=v.span,b=x}return Mv.context.with(Mv.trace.setSpan(Mv.context.active(),S),()=>{try{let v=n.call(this,i,a,c,l);return(0,Ca.isPromise)(v)?v.then(x=>(ABe(S,b),x),x=>{throw mBe(S,x,b),x}):(ABe(S,b),v)}catch(v){throw mBe(S,v,b),v}})}return o[Lg.OTEL_PATCHED_SYMBOL]=!0,o}Ca.wrapFieldResolver=bBe});var vBe=F(Lv=>{"use strict";A();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.62.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var DBe=F(m4=>{"use strict";A();Object.defineProperty(m4,"__esModule",{value:!0});m4.GraphQLInstrumentation=void 0;var Ug=(ze(),Me(We)),Kd=on(),aO=tJ(),p4=nJ(),oJ=l4(),JSt=dBe(),iu=CBe(),RBe=vBe(),xBe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},f4=[">=14.0.0 <17"],iJ=class extends Kd.InstrumentationBase{constructor(t={}){super(RBe.PACKAGE_NAME,RBe.PACKAGE_VERSION,{...xBe,...t})}setConfig(t={}){super.setConfig({...xBe,...t})}init(){let t=new Kd.InstrumentationNodeModuleDefinition("graphql",f4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Kd.InstrumentationNodeModuleFile("graphql/execution/execute.js",f4,t=>((0,Kd.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 Kd.InstrumentationNodeModuleFile("graphql/language/parser.js",f4,t=>((0,Kd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Kd.InstrumentationNodeModuleFile("graphql/validation/validate.js",f4,t=>((0,Kd.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let a;if(arguments.length>=2){let f=arguments;a=n._wrapExecuteArgs(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],t)}else{let f=arguments[0];a=n._wrapExecuteArgs(f.schema,f.document,f.rootValue,f.contextValue,f.variableValues,f.operationName,f.fieldResolver,f.typeResolver,t)}let c=(0,iu.getOperation)(a.document,a.operationName),l=n._createExecuteSpan(c,a);return a.contextValue[oJ.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[oJ.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Ug.context.with(Ug.trace.setSpan(Ug.context.active(),l),()=>(0,Kd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(f,h)=>{n._handleExecutionResult(l,f,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,iu.endSpan)(t,n);return}if((0,iu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,iu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,Kd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,iu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,a){return t._parse(this,r,i,a)}}}_patchValidate(){let t=this;return function(r){return function(i,a,c,l,f){return t._validate(this,r,i,a,c,f,l)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan(aO.SpanNames.PARSE);return Ug.context.with(Ug.trace.setSpan(Ug.context.active(),a),()=>(0,Kd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,l)=>{l&&((0,iu.getOperation)(l)?l.loc&&(0,iu.addSpanSource)(a,l.loc,i.allowValues):a.updateName(aO.SpanNames.SCHEMA_PARSE)),(0,iu.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let l=this.tracer.startSpan(aO.SpanNames.VALIDATE,{});return Ug.context.with(Ug.trace.setSpan(Ug.context.active(),l),()=>(0,Kd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(f,h)=>{o.loc||l.updateName(aO.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:p4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,iu.endSpan)(l,f)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(aO.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(p4.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(p4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=JSt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(p4.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,iu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,iu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,l,f){if(o||(o={}),o[oJ.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:l};let h=c==null,y=c??f;return c=(0,iu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,iu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,iu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:l}}};m4.GraphQLInstrumentation=iJ});var BBe=F(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.GraphQLInstrumentation=void 0;var ZSt=DBe();Object.defineProperty(A4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return ZSt.GraphQLInstrumentation}})});function PBe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function XSt(e){if(Array.isArray(e)){let t=e.slice().sort();return t.length<=5?t.join(", "):`${t.slice(0,5).join(", ")}, +${t.length-5}`}return`${e}`}var NBe,OBe,kBe,WSt,wBe,MBe=O(()=>{A();ze();NBe=ae(BBe(),1);dt();hr();Sv();OBe="Graphql",kBe=st(OBe,NBe.GraphQLInstrumentation,e=>{let t=PBe(e);return{...t,responseHook(n,r){zr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Ot(n).status&&n.setStatus({code:di.ERROR});let i=Ot(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let l=pi(n),h=Ot(l).data[Ev]||[],y=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(y),l.setAttribute(Ev,h)):typeof h=="string"?l.setAttribute(Ev,[h,y]):l.setAttribute(Ev,y),Ot(l).data["original-description"]||l.setAttribute("original-description",Ot(l).description),l.updateName(`${Ot(l).data["original-description"]} (${XSt(h)})`)}}}}),WSt=((e={})=>({name:OBe,setupOnce(){kBe(PBe(e))}})),wBe=WSt});var LBe=F(g4=>{"use strict";A();Object.defineProperty(g4,"__esModule",{value:!0});g4.EVENT_LISTENERS_SET=void 0;g4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var UBe=F(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4.bufferTextMapGetter=void 0;h4.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 QBe=F(rr=>{"use strict";A();Object.defineProperty(rr,"__esModule",{value:!0});rr.METRIC_MESSAGING_PROCESS_DURATION=rr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=rr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=rr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=rr.MESSAGING_SYSTEM_VALUE_KAFKA=rr.MESSAGING_OPERATION_TYPE_VALUE_SEND=rr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=rr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=rr.ATTR_MESSAGING_SYSTEM=rr.ATTR_MESSAGING_OPERATION_TYPE=rr.ATTR_MESSAGING_OPERATION_NAME=rr.ATTR_MESSAGING_KAFKA_OFFSET=rr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=rr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=rr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=rr.ATTR_MESSAGING_DESTINATION_NAME=rr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;rr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";rr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";rr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";rr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";rr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";rr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";rr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";rr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";rr.ATTR_MESSAGING_SYSTEM="messaging.system";rr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";rr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";rr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";rr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";rr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";rr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";rr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";rr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var FBe=F(Uv=>{"use strict";A();Object.defineProperty(Uv,"__esModule",{value:!0});Uv.PACKAGE_NAME=Uv.PACKAGE_VERSION=void 0;Uv.PACKAGE_VERSION="0.23.0";Uv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var qBe=F(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.KafkaJsInstrumentation=void 0;var jr=(ze(),Me(We)),Jd=on(),Qv=(Wn(),Me(Fr)),GBe=LBe(),zBe=UBe(),mt=QBe(),jBe=FBe();function _4(e,t,n){return r=>{e.add(t,{...n,...r?{[Qv.ATTR_ERROR_TYPE]:r}:{}})}}function HBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[Qv.ATTR_ERROR_TYPE]:r}:{}})}}var $Be=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],aJ=class extends Jd.InstrumentationBase{constructor(t={}){super(jBe.PACKAGE_NAME,jBe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(mt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:$Be}}),this._sentMessages=this.meter.createCounter(mt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(mt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(mt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:$Be}})}init(){let t=r=>{(0,Jd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Jd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Jd.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,Jd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[GBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[GBe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[Qv.ATTR_SERVER_ADDRESS]:n,[Qv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Jd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Jd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Jd.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,Jd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Jd.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],a=jr.propagation.extract(jr.ROOT_CONTEXT,i.message.headers,zBe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:a,attributes:{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[HBe(t._processDuration,Date.now(),{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),_4(t._consumedMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],f=jr.context.with(jr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],l,f)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:jr.ROOT_CONTEXT,attributes:{[mt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return jr.context.with(jr.trace.setSpan(jr.context.active(),a),()=>{let c=Date.now(),l=[],f=[_4(n._consumedMessages,i.batch.messages.length,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=jr.propagation.extract(jr.ROOT_CONTEXT,y.headers,zBe.bufferTextMapGetter),b=jr.trace.getSpan(S)?.spanContext(),v;b&&(v={context:b}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),f.push(HBe(n._processDuration,c,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return l.unshift(a),n._endSpansOnPromise(l,f,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let l=c.send;c.send=function(...b){return jr.context.with(jr.trace.setSpan(jr.context.active(),i),()=>t._getSendPatch()(l).apply(this,b).catch(x=>{throw i.setStatus({code:jr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let f=c.sendBatch;c.sendBatch=function(...b){return jr.context.with(jr.trace.setSpan(jr.context.active(),i),()=>t._getSendBatchPatch()(f).apply(this,b).catch(x=>{throw i.setStatus({code:jr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let h=c.commit;c.commit=function(...b){let v=h.apply(this,b).then(()=>{i.setStatus({code:jr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let y=c.abort;c.abort=function(...b){let v=y.apply(this,b);return t._endSpansOnPromise([i],[],v)}}).catch(c=>{i.setStatus({code:jr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),a}}_getSendBatchPatch(){let t=this;return n=>function(...o){let a=o[0].topicMessages||[],c=[],l=[];a.forEach(h=>{h.messages.forEach(y=>{c.push(t._startProducerSpan(h.topic,y)),l.push(_4(t._sentMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let f=n.apply(this,o);return t._endSpansOnPromise(c,l,f)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(f=>t._startProducerSpan(i.topic,f)),c=i.messages.map(f=>_4(t._sentMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...f.partition!==void 0?{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(f.partition)}:{}})),l=n.apply(this,o);return t._endSpansOnPromise(a,c,l)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,a=Qv.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,a=o.constructor.name),n.forEach(c=>c(a)),t.forEach(c=>{c.setAttribute(Qv.ATTR_ERROR_TYPE,a),c.setStatus({code:jr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:a}){let c=r===mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${c} ${t}`,{kind:r===mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?jr.SpanKind.CLIENT:jr.SpanKind.CONSUMER,attributes:{...a,[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_DESTINATION_NAME]:t,[mt.ATTR_MESSAGING_OPERATION_TYPE]:r,[mt.ATTR_MESSAGING_OPERATION_NAME]:c,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[mt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:f}=this.getConfig();return f&&n&&(0,Jd.safeExecuteInTheMiddle)(()=>f(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:jr.SpanKind.PRODUCER,attributes:{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_DESTINATION_NAME]:t,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_OPERATION_TYPE]:mt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},jr.propagation.inject(jr.trace.setSpan(jr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Jd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};E4.KafkaJsInstrumentation=aJ});var VBe=F(y4=>{"use strict";A();Object.defineProperty(y4,"__esModule",{value:!0});y4.KafkaJsInstrumentation=void 0;var eTt=qBe();Object.defineProperty(y4,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return eTt.KafkaJsInstrumentation}})});var YBe,KBe,JBe,tTt,ZBe,WBe=O(()=>{A();YBe=ae(VBe(),1);hr();KBe="Kafka",JBe=st(KBe,()=>new YBe.KafkaJsInstrumentation({consumerHook(e){zr(e,"auto.kafkajs.otel.consumer")},producerHook(e){zr(e,"auto.kafkajs.otel.producer")}})),tTt=(()=>({name:KBe,setupOnce(){JBe()}})),ZBe=tTt});var XBe=F(Fv=>{"use strict";A();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.PACKAGE_NAME=Fv.PACKAGE_VERSION=void 0;Fv.PACKAGE_VERSION="0.58.0";Fv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var rNe=F(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.LruMemoizerInstrumentation=void 0;var eNe=(ze(),Me(We)),tNe=on(),nNe=XBe(),sJ=class extends tNe.InstrumentationBase{constructor(t={}){super(nNe.PACKAGE_NAME,nNe.PACKAGE_VERSION,t)}init(){return[new tNe.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),a=typeof i=="function"?eNe.context.bind(eNe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};S4.LruMemoizerInstrumentation=sJ});var oNe=F(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.LruMemoizerInstrumentation=void 0;var nTt=rNe();Object.defineProperty(T4,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return nTt.LruMemoizerInstrumentation}})});var iNe,aNe,sNe,rTt,uNe,cNe=O(()=>{A();iNe=ae(oNe(),1);hr();aNe="LruMemoizer",sNe=st(aNe,()=>new iNe.LruMemoizerInstrumentation),rTt=(()=>({name:aNe,setupOnce(){sNe()}})),uNe=rTt});var lNe=F(ko=>{"use strict";A();Object.defineProperty(ko,"__esModule",{value:!0});ko.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ko.DB_SYSTEM_VALUE_MONGODB=ko.DB_SYSTEM_NAME_VALUE_MONGODB=ko.ATTR_NET_PEER_PORT=ko.ATTR_NET_PEER_NAME=ko.ATTR_DB_SYSTEM=ko.ATTR_DB_STATEMENT=ko.ATTR_DB_OPERATION=ko.ATTR_DB_NAME=ko.ATTR_DB_MONGODB_COLLECTION=ko.ATTR_DB_CONNECTION_STRING=void 0;ko.ATTR_DB_CONNECTION_STRING="db.connection_string";ko.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";ko.ATTR_DB_NAME="db.name";ko.ATTR_DB_OPERATION="db.operation";ko.ATTR_DB_STATEMENT="db.statement";ko.ATTR_DB_SYSTEM="db.system";ko.ATTR_NET_PEER_NAME="net.peer.name";ko.ATTR_NET_PEER_PORT="net.peer.port";ko.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";ko.DB_SYSTEM_VALUE_MONGODB="mongodb";ko.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var dNe=F(sO=>{"use strict";A();Object.defineProperty(sO,"__esModule",{value:!0});sO.MongodbCommandType=void 0;var oTt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(oTt=sO.MongodbCommandType||(sO.MongodbCommandType={}))});var pNe=F(Gv=>{"use strict";A();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.PACKAGE_NAME=Gv.PACKAGE_VERSION=void 0;Gv.PACKAGE_VERSION="0.67.0";Gv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var ANe=F(I4=>{"use strict";A();Object.defineProperty(I4,"__esModule",{value:!0});I4.MongoDBInstrumentation=void 0;var Zo=(ze(),Me(We)),or=on(),Qg=(Wn(),Me(Fr)),jl=lNe(),IS=dNe(),fNe=pNe(),mNe={requireParentSpan:!0},uJ=class e extends or.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(fNe.PACKAGE_NAME,fNe.PACKAGE_VERSION,{...mNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,or.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,or.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...mNe,...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:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:l,v4UnpatchConnectionPool:f}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new or.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new or.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new or.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],l,f),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new or.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,or.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,or.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,or.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,or.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,or.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,or.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,or.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,or.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,or.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,or.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),a=this.sessions.length;return o===a?t._connCountAdd(1,t._poolName,"used"):o-1===a&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,or.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,or.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=Zo.context.bind(Zo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,l){if(c||!l){i(c,l);return}t.setPoolName(o),i(c,l)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,or.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,or.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=n._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function"||typeof c!="object")return typeof l=="function"?r.call(this,i,a,c,l):r.call(this,i,a,c,l,f);let b=n._getV3SpanAttributes(a,i,c[0],t),v=n._spanNameFromAttrs(b),x=n.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=n._patchEnd(x,S);return typeof l=="function"?r.call(this,i,a,c,D):r.call(this,i,a,c,l,D)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,a,c,l){let f=Zo.trace.getSpan(Zo.context.active()),h=t._checkSkipInstrumentation(f),y=typeof c=="function"?c:l;if(h||typeof y!="function"||typeof a!="object")return typeof c=="function"?n.call(this,o,i,a,c):n.call(this,o,i,a,c,l);let S=e._getCommandType(a),b=S===IS.MongodbCommandType.UNKNOWN?void 0:S,v=t._getV3SpanAttributes(i,o,a,b),x=t._spanNameFromAttrs(v),D=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v}),w=t._patchEnd(D,y);return typeof c=="function"?n.call(this,o,i,a,w):n.call(this,o,i,a,c,w)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let l=Zo.trace.getSpan(Zo.context.active()),f=t._checkSkipInstrumentation(l),h=c,y=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,a,c);let S;if(!f){let v=t._getV4SpanAttributes(this,o,i,y),x=t._spanNameFromAttrs(v);S=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v})}let b=t._patchEnd(S,h,this.id,y);return n.call(this,o,i,a,b)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,a]=o,c=Zo.trace.getSpan(Zo.context.active()),l=t._checkSkipInstrumentation(c),f=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let y;if(!l){let v=t._getV4SpanAttributes(this,i,a,f),x=t._spanNameFromAttrs(v);y=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v})}let S=t._patchEnd(y,h,this.id,f),b=n.apply(this,o);return b.then(v=>S(null,v),v=>S(v)),b}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function"||typeof a!="object")return typeof l=="function"?n.call(this,o,i,a,c,l):n.call(this,o,i,a,c,l,f);let b=t._getV3SpanAttributes(i,o,a,"find"),v=t._spanNameFromAttrs(b),x=t.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=t._patchEnd(x,S);return typeof l=="function"?n.call(this,o,i,a,c,D):n.call(this,o,i,a,c,l,D)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,a,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function")return typeof l=="function"?n.call(this,o,i,a,c,l):n.call(this,o,i,a,c,l,f);let b=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),v=t._spanNameFromAttrs(b),x=t.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=t._patchEnd(x,S);return typeof l=="function"?n.call(this,o,i,a,c,D):n.call(this,o,i,a,c,l,D)}}static _getCommandType(t){return t.createIndexes!==void 0?IS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?IS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?IS.MongodbCommandType.IS_MASTER:t.count!==void 0?IS.MongodbCommandType.COUNT:t.aggregate!==void 0?IS.MongodbCommandType.AGGREGATE:IS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let l=typeof t.address=="string"?t.address.split(":"):"";l.length===2&&(i=l[0],a=l[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],a=y[1]}}let[c,l]=t.toString().split("."),f=r?.query??r?.q??r;return this._getSpanAttributes(c,l,i,a,f,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&or.SemconvStability.OLD&&(c[jl.ATTR_DB_SYSTEM]=jl.DB_SYSTEM_VALUE_MONGODB,c[jl.ATTR_DB_NAME]=t,c[jl.ATTR_DB_MONGODB_COLLECTION]=n,c[jl.ATTR_DB_OPERATION]=a,c[jl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&or.SemconvStability.STABLE&&(c[Qg.ATTR_DB_SYSTEM_NAME]=jl.DB_SYSTEM_NAME_VALUE_MONGODB,c[Qg.ATTR_DB_NAMESPACE]=t,c[Qg.ATTR_DB_OPERATION_NAME]=a,c[Qg.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&or.SemconvStability.OLD&&(c[jl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&or.SemconvStability.STABLE&&(c[Qg.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&or.SemconvStability.OLD&&(c[jl.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&or.SemconvStability.STABLE&&(c[Qg.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),f=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,or.safeExecuteInTheMiddle)(()=>{let h=f(i);this._dbSemconvStability&or.SemconvStability.OLD&&(c[jl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&or.SemconvStability.STABLE&&(c[Qg.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return c}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&or.SemconvStability.STABLE?n=[t[Qg.ATTR_DB_OPERATION_NAME],t[Qg.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,or.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Zo.context.active(),a=this,c=!1;return function(...f){if(!c){c=!0;let h=f[0];if(t){if(h instanceof Error)t.setStatus({code:Zo.SpanStatusCode.ERROR,message:h.message});else{let y=f[1];a._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return Zo.context.with(i,()=>n.apply(this,f))}}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}};I4.MongoDBInstrumentation=uJ});var gNe=F(uO=>{"use strict";A();Object.defineProperty(uO,"__esModule",{value:!0});uO.MongodbCommandType=void 0;var iTt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(iTt=uO.MongodbCommandType||(uO.MongodbCommandType={}))});var hNe=F(zv=>{"use strict";A();Object.defineProperty(zv,"__esModule",{value:!0});zv.MongodbCommandType=zv.MongoDBInstrumentation=void 0;var aTt=ANe();Object.defineProperty(zv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return aTt.MongoDBInstrumentation}});var sTt=gNe();Object.defineProperty(zv,"MongodbCommandType",{enumerable:!0,get:function(){return sTt.MongodbCommandType}})});function uTt(e){let t=cJ(e);return JSON.stringify(t)}function cJ(e){if(Array.isArray(e))return e.map(t=>cJ(t));if(cTt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,cJ(r)]).reduce((n,r)=>(dTt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function cTt(e){return typeof e=="object"&&e!==null&&!lTt(e)}function lTt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function dTt(e){return Array.isArray(e)}var _Ne,ENe,yNe,pTt,SNe,TNe=O(()=>{A();_Ne=ae(hNe(),1);hr();ENe="Mongo",yNe=st(ENe,()=>new _Ne.MongoDBInstrumentation({dbStatementSerializer:uTt,responseHook(e){zr(e,"auto.db.otel.mongo")}}));pTt=(()=>({name:ENe,setupOnce(){yNe()}})),SNe=pTt});var lJ=F(oa=>{"use strict";A();Object.defineProperty(oa,"__esModule",{value:!0});oa.DB_SYSTEM_NAME_VALUE_MONGODB=oa.ATTR_NET_PEER_PORT=oa.ATTR_NET_PEER_NAME=oa.ATTR_DB_USER=oa.ATTR_DB_SYSTEM=oa.ATTR_DB_STATEMENT=oa.ATTR_DB_OPERATION=oa.ATTR_DB_NAME=oa.ATTR_DB_MONGODB_COLLECTION=void 0;oa.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";oa.ATTR_DB_NAME="db.name";oa.ATTR_DB_OPERATION="db.operation";oa.ATTR_DB_STATEMENT="db.statement";oa.ATTR_DB_SYSTEM="db.system";oa.ATTR_DB_USER="db.user";oa.ATTR_NET_PEER_NAME="net.peer.name";oa.ATTR_NET_PEER_PORT="net.peer.port";oa.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var CNe=F(rE=>{"use strict";A();Object.defineProperty(rE,"__esModule",{value:!0});rE.handleCallbackResponse=rE.handlePromiseResponse=rE.getAttributesFromCollection=void 0;var INe=(ze(),Me(We)),lO=on(),cO=lJ(),b4=(Wn(),Me(Fr));function fTt(e,t,n){let r={};return t&lO.SemconvStability.OLD&&(r[cO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[cO.ATTR_DB_NAME]=e.conn.name,r[cO.ATTR_DB_USER]=e.conn.user),t&lO.SemconvStability.STABLE&&(r[b4.ATTR_DB_COLLECTION_NAME]=e.name,r[b4.ATTR_DB_NAMESPACE]=e.conn.name),n&lO.SemconvStability.OLD&&(r[cO.ATTR_NET_PEER_NAME]=e.conn.host,r[cO.ATTR_NET_PEER_PORT]=e.conn.port),n&lO.SemconvStability.STABLE&&(r[b4.ATTR_SERVER_ADDRESS]=e.conn.host,r[b4.ATTR_SERVER_PORT]=e.conn.port),r}rE.getAttributesFromCollection=fTt;function bNe(e,t={}){e.recordException(t),e.setStatus({code:INe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function dJ(e,t,n,r=void 0){n&&(0,lO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&INe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function mTt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(dJ(t,o,n,r),o)).catch(o=>{throw bNe(t,o),o}).finally(()=>t.end()):(dJ(t,e,n,r),t.end(),e)}rE.handlePromiseResponse=mTt;function ATt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(l,f)=>(l?bNe(r,l):dJ(r,f,i,a),r.end(),e(l,f)),t.apply(n,o)}rE.handleCallbackResponse=ATt});var vNe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var NNe=F(zc=>{"use strict";A();Object.defineProperty(zc,"__esModule",{value:!0});zc.MongooseInstrumentation=zc._ALREADY_INSTRUMENTED=zc._STORED_PARENT_SPAN=void 0;var va=(ze(),Me(We)),gTt=br(),pJ=CNe(),Os=on(),RNe=vNe(),oE=lJ(),bS=(Wn(),Me(Fr)),C4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],hTt=["remove","count","findOneAndRemove",...C4],_Tt=["count","findOneAndRemove",...C4],ETt=[...C4];function xNe(e){return e?e.startsWith("6.")||e.startsWith("5.")?hTt:e.startsWith("7.")?_Tt:ETt:C4}function DNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function BNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var fJ=class extends Os.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Os.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Os.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Os.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,DNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),BNe(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)),xNe(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=xNe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,DNe(n)&&this._unwrap(r.Model.prototype,"remove"),BNe(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&&va.trace.getSpan(va.context.active())===void 0)return r.apply(this,arguments);let a=this[zc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Os.SemconvStability.OLD&&(c[oE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return r.apply(this,arguments);let a=this[zc._STORED_PARENT_SPAN],c={},{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&Os.SemconvStability.OLD&&(c[oE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);let l={document:this};a&&!(a instanceof Function)&&(l.options=a);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Os.SemconvStability.OLD&&(f[oE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Os.SemconvStability.STABLE&&(f[bS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,l){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);let f=l,h=a,y=c;typeof a=="function"?(f=a,h=void 0,y=void 0):typeof c=="function"&&(f=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let D=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Os.SemconvStability.OLD&&(S[oE.ATTR_DB_STATEMENT]=D),r._dbSemconvStability&Os.SemconvStability.STABLE&&(S[bS.ATTR_DB_QUERY_TEXT]=D)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),x=r._handleResponse(v,o,this,arguments,f,n);return x&&typeof x=="object"&&(x[zc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,l){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(l=c,c=void 0);let f={};switch(t){case"insertMany":f.documents=a;break;case"bulkWrite":f.operations=a;break;default:f.document=a;break}c!==void 0&&(f.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,f);r._dbSemconvStability&Os.SemconvStability.OLD&&(h[oE.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Os.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=b)}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=va.trace.getSpan(va.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[zc._STORED_PARENT_SPAN]=va.trace.getSpan(va.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,pJ.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Os.SemconvStability.OLD&&(a[oE.ATTR_DB_OPERATION]=r,a[oE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Os.SemconvStability.STABLE&&(a[bS.ATTR_DB_OPERATION_NAME]=r,a[bS.ATTR_DB_SYSTEM_NAME]=oE.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Os.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:va.SpanKind.CLIENT,attributes:a},i?va.trace.setSpan(va.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,pJ.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let l=c._callOriginalFunction(()=>n.apply(r,o));return(0,pJ.handlePromiseResponse)(l,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?va.context.with((0,gTt.suppressTracing)(va.context.active()),t):t()}};zc.MongooseInstrumentation=fJ});var ONe=F(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.MongooseInstrumentation=void 0;var yTt=NNe();Object.defineProperty(v4,"MongooseInstrumentation",{enumerable:!0,get:function(){return yTt.MongooseInstrumentation}})});var kNe,wNe,PNe,STt,MNe,LNe=O(()=>{A();kNe=ae(ONe(),1);hr();wNe="Mongoose",PNe=st(wNe,()=>new kNe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),STt=(()=>({name:wNe,setupOnce(){PNe()}})),MNe=STt});var UNe=F(ia=>{"use strict";A();Object.defineProperty(ia,"__esModule",{value:!0});ia.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ia.DB_SYSTEM_VALUE_MYSQL=ia.ATTR_NET_PEER_PORT=ia.ATTR_NET_PEER_NAME=ia.ATTR_DB_USER=ia.ATTR_DB_SYSTEM=ia.ATTR_DB_STATEMENT=ia.ATTR_DB_NAME=ia.ATTR_DB_CONNECTION_STRING=void 0;ia.ATTR_DB_CONNECTION_STRING="db.connection_string";ia.ATTR_DB_NAME="db.name";ia.ATTR_DB_STATEMENT="db.statement";ia.ATTR_DB_SYSTEM="db.system";ia.ATTR_DB_USER="db.user";ia.ATTR_NET_PEER_NAME="net.peer.name";ia.ATTR_NET_PEER_PORT="net.peer.port";ia.DB_SYSTEM_VALUE_MYSQL="mysql";ia.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var QNe=F(dO=>{"use strict";A();Object.defineProperty(dO,"__esModule",{value:!0});dO.AttributeNames=void 0;var TTt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(TTt=dO.AttributeNames||(dO.AttributeNames={}))});var FNe=F(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.getPoolNameOld=au.arrayStringifyHelper=au.getSpanName=au.getDbValues=au.getDbQueryText=au.getJDBCString=au.getConfig=void 0;function ITt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}au.getConfig=ITt;function bTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}au.getJDBCString=bTt;function CTt(e){return typeof e=="string"?e:e.sql}au.getDbQueryText=CTt;function vTt(e,t){return mJ(typeof e=="string"?t:t||e.values)}au.getDbValues=vTt;function RTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}au.getSpanName=RTt;function mJ(e){return e?`[${e.toString()}]`:""}au.arrayStringifyHelper=mJ;function xTt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}au.getPoolNameOld=xTt});var GNe=F(Hv=>{"use strict";A();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.PACKAGE_NAME=Hv.PACKAGE_VERSION=void 0;Hv.PACKAGE_VERSION="0.60.0";Hv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var jNe=F(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.MySQLInstrumentation=void 0;var jc=(ze(),Me(We)),Zd=on(),$v=(Wn(),Me(Fr)),Fg=UNe(),DTt=QNe(),CS=FNe(),zNe=GNe(),AJ=class extends Zd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(zNe.PACKAGE_NAME,zNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Zd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Zd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Fg.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 Zd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Zd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Zd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Zd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,l=a-c,f=(0,CS.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-c,f,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=c[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof a=="function"){let l=r._getConnectionCallbackPatchFn(a);return n.call(t,i,l)}if(arguments.length===3&&typeof c=="function"){let l=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=jc.context.active();return function(o,i){i&&((0,Zd.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,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:l,port:f,database:h,user:y}=(0,CS.getConfig)(t.config),S=parseInt(f,10),b=(0,CS.getDbQueryText)(o);r._dbSemconvStability&Zd.SemconvStability.OLD&&(c[Fg.ATTR_DB_SYSTEM]=Fg.DB_SYSTEM_VALUE_MYSQL,c[Fg.ATTR_DB_CONNECTION_STRING]=(0,CS.getJDBCString)(l,f,h),c[Fg.ATTR_DB_NAME]=h,c[Fg.ATTR_DB_USER]=y,c[Fg.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Zd.SemconvStability.STABLE&&(c[$v.ATTR_DB_SYSTEM_NAME]=$v.DB_SYSTEM_NAME_VALUE_MYSQL,c[$v.ATTR_DB_NAMESPACE]=h,c[$v.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&Zd.SemconvStability.OLD&&(c[Fg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(c[Fg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Zd.SemconvStability.STABLE&&(c[$v.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(c[$v.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,CS.getSpanName)(o),{kind:jc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let w;Array.isArray(i)?w=i:arguments[2]&&(w=[i]),v.setAttribute(DTt.AttributeNames.MYSQL_VALUES,(0,CS.getDbValues)(o,w))}let x=Array.from(arguments).findIndex(w=>typeof w=="function"),D=jc.context.active();if(x===-1){let w=jc.context.with(jc.trace.setSpan(jc.context.active(),v),()=>n.apply(t,arguments));return jc.context.bind(D,w),w.on("error",Q=>v.setStatus({code:jc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,D)),jc.context.with(jc.trace.setSpan(jc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){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,CS.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")})}};R4.MySQLInstrumentation=AJ});var HNe=F(x4=>{"use strict";A();Object.defineProperty(x4,"__esModule",{value:!0});x4.MySQLInstrumentation=void 0;var BTt=jNe();Object.defineProperty(x4,"MySQLInstrumentation",{enumerable:!0,get:function(){return BTt.MySQLInstrumentation}})});var $Ne,qNe,VNe,NTt,YNe,KNe=O(()=>{A();$Ne=ae(HNe(),1);hr();qNe="Mysql",VNe=st(qNe,()=>new $Ne.MySQLInstrumentation({})),NTt=(()=>({name:qNe,setupOnce(){VNe()}})),YNe=NTt});var gJ=F(ns=>{"use strict";A();Object.defineProperty(ns,"__esModule",{value:!0});ns.DB_SYSTEM_VALUE_MYSQL=ns.ATTR_NET_PEER_PORT=ns.ATTR_NET_PEER_NAME=ns.ATTR_DB_USER=ns.ATTR_DB_SYSTEM=ns.ATTR_DB_STATEMENT=ns.ATTR_DB_NAME=ns.ATTR_DB_CONNECTION_STRING=void 0;ns.ATTR_DB_CONNECTION_STRING="db.connection_string";ns.ATTR_DB_NAME="db.name";ns.ATTR_DB_STATEMENT="db.statement";ns.ATTR_DB_SYSTEM="db.system";ns.ATTR_DB_USER="db.user";ns.ATTR_NET_PEER_NAME="net.peer.name";ns.ATTR_NET_PEER_PORT="net.peer.port";ns.DB_SYSTEM_VALUE_MYSQL="mysql"});var _J=F(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.addSqlCommenterComment=void 0;var hJ=(ze(),Me(We)),OTt=br();function kTt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function wTt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function PTt(e,t){if(typeof t!="string"||t.length===0||kTt(t))return t;let n=new OTt.W3CTraceContextPropagator,r={};n.inject(hJ.trace.setSpan(hJ.ROOT_CONTEXT,e),r,hJ.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=wTt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}D4.addSqlCommenterComment=PTt});var JNe=F(Wd=>{"use strict";A();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.getConnectionPrototypeToInstrument=Wd.once=Wd.getSpanName=Wd.getQueryText=Wd.getConnectionAttributes=void 0;var pO=gJ(),B4=on(),EJ=(Wn(),Me(Fr));function MTt(e,t,n){let{host:r,port:o,database:i,user:a}=LTt(e),c={};t&B4.SemconvStability.OLD&&(c[pO.ATTR_DB_CONNECTION_STRING]=UTt(r,o,i),c[pO.ATTR_DB_NAME]=i,c[pO.ATTR_DB_USER]=a),t&B4.SemconvStability.STABLE&&(c[EJ.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&B4.SemconvStability.OLD&&(c[pO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(c[pO.ATTR_NET_PEER_PORT]=l)),n&B4.SemconvStability.STABLE&&(c[EJ.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(c[EJ.ATTR_SERVER_PORT]=l)),c}Wd.getConnectionAttributes=MTt;function LTt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function UTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function QTt(e,t,n,r=!1,o=FTt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,GTt(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Wd.getQueryText=QTt;function FTt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function GTt(e){return"values"in e}function zTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Wd.getSpanName=zTt;var jTt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wd.once=jTt;function HTt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Wd.getConnectionPrototypeToInstrument=HTt});var ZNe=F(qv=>{"use strict";A();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.60.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var tOe=F(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.MySQL2Instrumentation=void 0;var WNe=(ze(),Me(We)),gf=on(),yJ=gJ(),XNe=_J(),Vv=JNe(),eOe=ZNe(),SJ=(Wn(),Me(Fr)),TJ=[">=1.4.2 <4"],IJ=class extends gf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(eOe.PACKAGE_NAME,eOe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,gf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,gf.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,gf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,gf.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 gf.InstrumentationNodeModuleDefinition("mysql2",TJ,i=>(n(i),i),()=>{},[new gf.InstrumentationNodeModuleFile("mysql2/promise.js",TJ,i=>(n(i),i),()=>{}),new gf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",TJ,i=>{let a=(0,Vv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Vv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let l;Array.isArray(a)?l=a:arguments[2]&&(l=[a]);let{maskStatement:f,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,Vv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,Vv.getQueryText)(i,t,l,f,h);o._dbSemconvStability&gf.SemconvStability.OLD&&(S[yJ.ATTR_DB_SYSTEM]=yJ.DB_SYSTEM_VALUE_MYSQL,S[yJ.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&gf.SemconvStability.STABLE&&(S[SJ.ATTR_DB_SYSTEM_NAME]=SJ.DB_SYSTEM_NAME_VALUE_MYSQL,S[SJ.ATTR_DB_QUERY_TEXT]=b);let v=o.tracer.startSpan((0,Vv.getSpanName)(i),{kind:WNe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,XNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,XNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Vv.once)((D,w)=>{D?v.setStatus({code:WNe.SpanStatusCode.ERROR,message:D.message}):typeof y=="function"&&(0,gf.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:w})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let D=r.apply(this,arguments);return D.once("error",w=>{x(w)}).once("result",w=>{x(void 0,w)}),D}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};N4.MySQL2Instrumentation=IJ});var nOe=F(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.MySQL2Instrumentation=void 0;var $Tt=tOe();Object.defineProperty(O4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return $Tt.MySQL2Instrumentation}})});var rOe,oOe,iOe,qTt,aOe,sOe=O(()=>{A();rOe=ae(nOe(),1);hr();oOe="Mysql2",iOe=st(oOe,()=>new rOe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),qTt=(()=>({name:oOe,setupOnce(){iOe()}})),aOe=qTt});var uOe=F(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var cOe=F(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.endSpan=void 0;var VTt=(ze(),Me(We)),YTt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:VTt.SpanStatusCode.ERROR,message:t.message})),e.end()};k4.endSpan=YTt});var P4=F(w4=>{"use strict";A();Object.defineProperty(w4,"__esModule",{value:!0});w4.defaultDbStatementSerializer=void 0;var KTt=[{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}],JTt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=KTt.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};w4.defaultDbStatementSerializer=JTt});var lOe=F(Yv=>{"use strict";A();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var mOe=F(M4=>{"use strict";A();Object.defineProperty(M4,"__esModule",{value:!0});M4.IORedisInstrumentation=void 0;var iE=(ze(),Me(We)),Hc=on(),aE=(Wn(),Me(Fr)),$c=uOe(),dOe=on(),fO=cOe(),ZTt=P4(),pOe=lOe(),fOe={requireParentSpan:!0},bJ=class extends Hc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,{...fOe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Hc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Hc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...fOe,...t})}init(){return[new Hc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Hc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Hc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||ZTt.defaultDbStatementSerializer,c=iE.trace.getSpan(iE.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&Hc.SemconvStability.OLD&&(l[$c.ATTR_DB_SYSTEM]=$c.DB_SYSTEM_VALUE_REDIS,l[$c.ATTR_DB_STATEMENT]=y,l[$c.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Hc.SemconvStability.STABLE&&(l[aE.ATTR_DB_SYSTEM_NAME]=$c.DB_SYSTEM_NAME_VALUE_REDIS,l[aE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Hc.SemconvStability.OLD&&(l[$c.ATTR_NET_PEER_NAME]=f,l[$c.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Hc.SemconvStability.STABLE&&(l[aE.ATTR_SERVER_ADDRESS]=f,l[aE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:iE.SpanKind.CLIENT,attributes:l}),{requestHook:b}=i;b&&(0,dOe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&iE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(w){(0,dOe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,w),Q=>{Q&&iE.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,fO.endSpan)(S,null),x(w)};let D=o.reject;return o.reject=function(w){(0,fO.endSpan)(S,w),D(w)},v}catch(v){throw(0,fO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=iE.trace.getSpan(iE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&Hc.SemconvStability.OLD&&(o[$c.ATTR_DB_SYSTEM]=$c.DB_SYSTEM_VALUE_REDIS,o[$c.ATTR_DB_STATEMENT]="connect",o[$c.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Hc.SemconvStability.STABLE&&(o[aE.ATTR_DB_SYSTEM_NAME]=$c.DB_SYSTEM_NAME_VALUE_REDIS,o[aE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Hc.SemconvStability.OLD&&(o[$c.ATTR_NET_PEER_NAME]=i,o[$c.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Hc.SemconvStability.STABLE&&(o[aE.ATTR_SERVER_ADDRESS]=i,o[aE.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:iE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,fO.endSpan)(c,null),l}catch(l){throw(0,fO.endSpan)(c,l),l}}}};M4.IORedisInstrumentation=bJ});var AOe=F(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.IORedisInstrumentation=void 0;var WTt=mOe();Object.defineProperty(L4,"IORedisInstrumentation",{enumerable:!0,get:function(){return WTt.IORedisInstrumentation}})});var U4=F(Kv=>{"use strict";A();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.62.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var gOe=F(sE=>{"use strict";A();Object.defineProperty(sE,"__esModule",{value:!0});sE.getTracedCreateStreamTrace=sE.getTracedCreateClient=sE.endSpan=void 0;var mO=(ze(),Me(We)),XTt=(e,t)=>{t&&e.setStatus({code:mO.SpanStatusCode.ERROR,message:t.message}),e.end()};sE.endSpan=XTt;var eIt=e=>function(){let n=e.apply(this,arguments);return mO.context.bind(mO.context.active(),n)};sE.getTracedCreateClient=eIt;var tIt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){mO.context.bind(mO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};sE.getTracedCreateStreamTrace=tIt});var Q4=F(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var _Oe=F(G4=>{"use strict";A();Object.defineProperty(G4,"__esModule",{value:!0});G4.RedisInstrumentationV2_V3=void 0;var Hl=on(),F4=gOe(),hOe=U4(),AO=(ze(),Me(We)),gO=(Wn(),Me(Fr)),vS=Q4(),nIt=P4(),CJ=class e extends Hl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(hOe.PACKAGE_NAME,hOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Hl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Hl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Hl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Hl.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,Hl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Hl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=AO.trace.getSpan(AO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let l=a?.dbStatementSerializer||nIt.defaultDbStatementSerializer,f={};t._semconvStability&Hl.SemconvStability.OLD&&Object.assign(f,{[vS.ATTR_DB_SYSTEM]:vS.DB_SYSTEM_VALUE_REDIS,[vS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Hl.SemconvStability.STABLE&&Object.assign(f,{[gO.ATTR_DB_SYSTEM_NAME]:vS.DB_SYSTEM_NAME_VALUE_REDIS,[gO.ATTR_DB_OPERATION_NAME]:i.command,[gO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:AO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let S={};t._semconvStability&Hl.SemconvStability.OLD&&Object.assign(S,{[vS.ATTR_NET_PEER_NAME]:this.connection_options.host,[vS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Hl.SemconvStability.STABLE&&Object.assign(S,{[gO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[gO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Hl.SemconvStability.OLD&&h.setAttribute(vS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=AO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let D=a.responseHook;(0,Hl.safeExecuteInTheMiddle)(()=>{D(h,i.command,i.args,x)},w=>{w&&t._diag.error("Error executing responseHook",w)},!0)}return(0,F4.endSpan)(h,v),AO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,F4.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,F4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,F4.getTracedCreateStreamTrace)(n)}}};G4.RedisInstrumentationV2_V3=CJ});var yOe=F(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.getClientAttributes=void 0;var vJ=(Wn(),Me(Fr)),Jv=Q4(),EOe=on();function rIt(e,t,n){let r={};return n&EOe.SemconvStability.OLD&&Object.assign(r,{[Jv.ATTR_DB_SYSTEM]:Jv.DB_SYSTEM_VALUE_REDIS,[Jv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Jv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Jv.ATTR_DB_CONNECTION_STRING]:oIt(e,t?.url)}),n&EOe.SemconvStability.STABLE&&Object.assign(r,{[vJ.ATTR_DB_SYSTEM_NAME]:Jv.DB_SYSTEM_NAME_VALUE_REDIS,[vJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[vJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}z4.getClientAttributes=rIt;function oIt(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 bOe=F(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.RedisInstrumentationV4_V5=void 0;var Xd=(ze(),Me(We)),Io=on(),SOe=yOe(),iIt=P4(),TOe=U4(),RJ=(Wn(),Me(Fr)),aIt=Q4(),hO=Symbol("opentelemetry.instrumentation.redis.open_spans"),IOe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),xJ=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.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 Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(c)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Io.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Io.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Io.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Io.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Io.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,Io.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Io.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Io.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let l=this[hO];return n._endSpansWithRedisReplies(l,c,t),c}).catch(c=>{let l=this[hO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=c.constructor.name==="MultiErrorReply"?c.replies:new Array(l.length).fill(c);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[IOe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,SOe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Xd.SpanKind.CLIENT,attributes:a});return Xd.context.with(Xd.trace.setSpan(Xd.context.active(),c),()=>r.apply(this)).then(f=>(c.end(),f)).catch(f=>(c.recordException(f),c.setStatus({code:Xd.SpanStatusCode.ERROR,message:f.message}),c.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(Xd.trace.getSpan(Xd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[IOe],c=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||iIt.defaultDbStatementSerializer,h=(0,SOe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[RJ.ATTR_DB_OPERATION_NAME]=c);try{let b=f(c,l);b!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[aIt.ATTR_DB_STATEMENT]=b),this._semconvStability&Io.SemconvStability.STABLE&&(h[RJ.ATTR_DB_QUERY_TEXT]=b))}catch(b){this._diag.error("dbStatementSerializer throw an exception",b,{commandName:c})}let y=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Xd.SpanKind.CLIENT,attributes:h}),S=Xd.context.with(Xd.trace.setSpan(Xd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,l,b,void 0)},b=>{this._endSpanWithResponse(y,c,l,null,b)});else{let b=S;b[hO]=b[hO]||[],b[hO].push({span:y,commandName:c,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(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:l,commandArgs:f}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(RJ.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(l,o[c],f,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Xd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};j4.RedisInstrumentationV4_V5=xJ});var ROe=F(H4=>{"use strict";A();Object.defineProperty(H4,"__esModule",{value:!0});H4.RedisInstrumentation=void 0;var sIt=on(),COe=U4(),uIt=_Oe(),cIt=bOe(),vOe={requireParentSpan:!1},DJ=class extends sIt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...vOe,...t};super(COe.PACKAGE_NAME,COe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new uIt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new cIt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...vOe,...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())}};H4.RedisInstrumentation=DJ});var xOe=F($4=>{"use strict";A();Object.defineProperty($4,"__esModule",{value:!0});$4.RedisInstrumentation=void 0;var lIt=ROe();Object.defineProperty($4,"RedisInstrumentation",{enumerable:!0,get:function(){return lIt.RedisInstrumentation}})});function _O(e,t){return e.includes(t.toLowerCase())}function NJ(e){return _O(BJ,e)?"cache.get":_O(pIt,e)?"cache.put":void 0}function fIt(e,t){return t.some(n=>e.startsWith(n))}function BOe(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)?DOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return _O(dIt,e)&&r!=null?n(r):DOe(t.map(o=>n(o)))}catch{return}}function NOe(e,t,n){if(!NJ(e))return!1;for(let r of t)if(fIt(r,n))return!0;return!1}function OOe(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 DOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var dIt,BJ,pIt,kOe=O(()=>{A();dIt=["get","set","setex"],BJ=["get","mget"],pIt=["set","setex"]});var wOe,POe,q4,EO,MOe,mIt,AIt,LOe,gIt,UOe,QOe=O(()=>{A();wOe=ae(AOe(),1),POe=ae(xOe(),1);dt();hr();kOe();q4="Redis",EO={},MOe=(e,t,n,r)=>{e.setAttribute(wt,"auto.db.otel.redis");let o=BOe(t,n),i=NJ(t);if(!o||!i||!EO.cachePrefixes||!NOe(t,o,EO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let l=OOe(r);l&&e.setAttribute(Pq,l),_O(BJ,t)&&l!==void 0&&e.setAttribute(kq,l>0),e.setAttributes({[Xt]:i,[wq]:o});let f=o.join(", ");e.updateName(EO.maxCacheKeyLength?T_(f,EO.maxCacheKeyLength):f)},mIt=st(`${q4}.IORedis`,()=>new wOe.IORedisInstrumentation({responseHook:MOe})),AIt=st(`${q4}.Redis`,()=>new POe.RedisInstrumentation({responseHook:MOe})),LOe=Object.assign(()=>{mIt(),AIt()},{id:q4}),gIt=((e={})=>({name:q4,setupOnce(){EO=e,LOe()}})),UOe=gIt});var FOe=F(V4=>{"use strict";A();Object.defineProperty(V4,"__esModule",{value:!0});V4.EVENT_LISTENERS_SET=void 0;V4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var OJ=F(yO=>{"use strict";A();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var hIt;(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"})(hIt=yO.AttributeNames||(yO.AttributeNames={}))});var kJ=F(Nr=>{"use strict";A();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Nr.METRIC_DB_CLIENT_CONNECTION_COUNT=Nr.DB_SYSTEM_VALUE_POSTGRESQL=Nr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Nr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Nr.ATTR_NET_PEER_PORT=Nr.ATTR_NET_PEER_NAME=Nr.ATTR_DB_USER=Nr.ATTR_DB_SYSTEM=Nr.ATTR_DB_STATEMENT=Nr.ATTR_DB_NAME=Nr.ATTR_DB_CONNECTION_STRING=Nr.ATTR_DB_CLIENT_CONNECTION_STATE=Nr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Nr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Nr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Nr.ATTR_DB_CONNECTION_STRING="db.connection_string";Nr.ATTR_DB_NAME="db.name";Nr.ATTR_DB_STATEMENT="db.statement";Nr.ATTR_DB_SYSTEM="db.system";Nr.ATTR_DB_USER="db.user";Nr.ATTR_NET_PEER_NAME="net.peer.name";Nr.ATTR_NET_PEER_PORT="net.peer.port";Nr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Nr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Nr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Nr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Nr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var wJ=F(SO=>{"use strict";A();Object.defineProperty(SO,"__esModule",{value:!0});SO.SpanNames=void 0;var _It;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(_It=SO.SpanNames||(SO.SpanNames={}))});var VOe=F(ir=>{"use strict";A();Object.defineProperty(ir,"__esModule",{value:!0});ir.sanitizedErrorMessage=ir.isObjectWithTextString=ir.getErrorMessage=ir.patchClientConnectCallback=ir.patchCallbackPGPool=ir.updateCounter=ir.getPoolName=ir.patchCallback=ir.handleExecutionResult=ir.handleConfigQuery=ir.shouldSkipInstrumentation=ir.getSemanticAttributesFromPoolConnection=ir.getSemanticAttributesFromConnection=ir.getConnectionString=ir.parseAndMaskConnectionString=ir.parseNormalizedOperationName=ir.getQuerySpanName=void 0;var uE=(ze(),Me(We)),Y4=OJ(),ep=(Wn(),Me(Fr)),Ai=kJ(),RS=on(),GOe=wJ();function zOe(e,t){if(!t)return GOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:jOe(t.text);return`${GOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ir.getQuerySpanName=zOe;function jOe(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}ir.parseNormalizedOperationName=jOe;function HOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ir.parseAndMaskConnectionString=HOe;function PJ(e){if("connectionString"in e&&e.connectionString)return HOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ir.getConnectionString=PJ;function K4(e){if(Number.isInteger(e))return e}function $Oe(e,t){let n={};return t&RS.SemconvStability.OLD&&(n={...n,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:e.database,[Ai.ATTR_DB_CONNECTION_STRING]:PJ(e),[Ai.ATTR_DB_USER]:e.user,[Ai.ATTR_NET_PEER_NAME]:e.host,[Ai.ATTR_NET_PEER_PORT]:K4(e.port)}),t&RS.SemconvStability.STABLE&&(n={...n,[ep.ATTR_DB_SYSTEM_NAME]:ep.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ep.ATTR_DB_NAMESPACE]:e.namespace,[ep.ATTR_SERVER_ADDRESS]:e.host,[ep.ATTR_SERVER_PORT]:K4(e.port)}),n}ir.getSemanticAttributesFromConnection=$Oe;function EIt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[Y4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[Y4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&RS.SemconvStability.OLD&&(r={...r,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ai.ATTR_DB_CONNECTION_STRING]:PJ(e),[Ai.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ai.ATTR_NET_PEER_PORT]:Number(n?.port)||K4(e.port),[Ai.ATTR_DB_USER]:n?.username??e.user}),t&RS.SemconvStability.STABLE&&(r={...r,[ep.ATTR_DB_SYSTEM_NAME]:ep.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ep.ATTR_DB_NAMESPACE]:e.namespace,[ep.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[ep.ATTR_SERVER_PORT]:Number(n?.port)||K4(e.port)}),r}ir.getSemanticAttributesFromPoolConnection=EIt;function yIt(e){return e.requireParentSpan===!0&&uE.trace.getSpan(uE.context.active())===void 0}ir.shouldSkipInstrumentation=yIt;function SIt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=zOe(i,r),c=e.startSpan(a,{kind:uE.SpanKind.CLIENT,attributes:$Oe(o,n)});if(!r)return c;if(r.text&&(n&RS.SemconvStability.OLD&&c.setAttribute(Ai.ATTR_DB_STATEMENT,r.text),n&RS.SemconvStability.STABLE&&c.setAttribute(ep.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());c.setAttribute(Y4.AttributeNames.PG_VALUES,l)}catch(l){uE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&c.setAttribute(Y4.AttributeNames.PG_PLAN,r.name),c}ir.handleConfigQuery=SIt;function qOe(e,t,n){typeof e.responseHook=="function"&&(0,RS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&uE.diag.error("Error running response hook",r)},!0)}ir.handleExecutionResult=qOe;function TIt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[ep.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(J4(a)),t.setStatus({code:uE.SpanStatusCode.ERROR,message:a.message})):qOe(e,t,c),o(),t.end(),n.call(this,a,c)}}ir.patchCallback=TIt;function IIt(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()}ir.getPoolName=IIt;function bIt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,l=i-c;return n.add(l-o.used,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:c,pending:a}}ir.updateCounter=bIt;function CIt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(J4(r)),e.setStatus({code:uE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ir.patchCallbackPGPool=CIt;function vIt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(J4(r)),e.setStatus({code:uE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ir.patchClientConnectCallback=vIt;function RIt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ir.getErrorMessage=RIt;function xIt(e){return typeof e=="object"&&typeof e?.text=="string"}ir.isObjectWithTextString=xIt;function J4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ir.sanitizedErrorMessage=J4});var YOe=F(Zv=>{"use strict";A();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.PACKAGE_NAME=Zv.PACKAGE_VERSION=void 0;Zv.PACKAGE_VERSION="0.66.0";Zv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var eke=F(W4=>{"use strict";A();Object.defineProperty(W4,"__esModule",{value:!0});W4.PgInstrumentation=void 0;var qu=on(),Hr=(ze(),Me(We)),KOe=FOe(),Wo=VOe(),JOe=_J(),ZOe=YOe(),WOe=wJ(),Z4=br(),hf=(Wn(),Me(Fr)),TO=kJ();function Wv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var MJ=class extends qu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(ZOe.PACKAGE_NAME,ZOe.PACKAGE_VERSION,t),this._semconvStability=(0,qu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(hf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Hr.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(TO.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(TO.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 qu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new qu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new qu.InstrumentationNodeModuleDefinition("pg",t,c=>{let l=Wv(c);return this._patchPgClient(l.Client),c},c=>{let l=Wv(c);return this._unpatchPgClient(l.Client),c},[o,r]),a=new qu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let l=Wv(c);return(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},c=>{let l=Wv(c);(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Wv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.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=Wv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(WOe.SpanNames.CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchClientConnectCallback(a,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),a),()=>n.call(this,o));return XOe(a,c)}}recordOperationDuration(t,n){let r={},o=[hf.ATTR_DB_NAMESPACE,hf.ATTR_ERROR_TYPE,hf.ATTR_SERVER_PORT,hf.ATTR_SERVER_ADDRESS,hf.ATTR_DB_OPERATION_NAME];this._semconvStability&qu.SemconvStability.OLD&&o.push(TO.ATTR_DB_SYSTEM),this._semconvStability&qu.SemconvStability.STABLE&&o.push(hf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,Z4.hrTimeToMilliseconds)((0,Z4.hrTimeDuration)(n,(0,Z4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Wo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,Z4.hrTime)(),a=o[0],c=typeof a=="string",l=Wo.isObjectWithTextString(a),f=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:l?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[TO.ATTR_DB_SYSTEM]:TO.DB_SYSTEM_VALUE_POSTGRESQL,[hf.ATTR_DB_NAMESPACE]:this.database,[hf.ATTR_SERVER_PORT]:this.connectionParameters.port,[hf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[hf.ATTR_DB_OPERATION_NAME]=Wo.parseNormalizedOperationName(f?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Wo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,f);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,JOe.addSqlCommenterComment)(b,a):l&&!("name"in a)&&(o[0]={...a,text:(0,JOe.addSqlCommenterComment)(b,a.text)})),o.length>0){let D=Hr.trace.getSpan(Hr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Wo.patchCallback(S,b,o[o.length-1],h,y),D&&(o[o.length-1]=Hr.context.bind(Hr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let w=Wo.patchCallback(t.getConfig(),b,f.callback,h,y);D&&(w=Hr.context.bind(Hr.context.active(),w)),o[0].callback=w}}let{requestHook:v}=S;typeof v=="function"&&f&&(0,qu.safeExecuteInTheMiddle)(()=>{let{database:D,host:w,port:Q,user:z}=this.connectionParameters;v(b,{connection:{database:D,host:w,port:Q,user:z},query:{text:f.text,values:f.values,name:f.name}})},D=>{D&&t._diag.error("Error running query hook",D)},!0);let x;try{x=n.apply(this,o)}catch(D){throw D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(D)}),b.end(),D}return x instanceof Promise?x.then(D=>new Promise(w=>{Wo.handleExecutionResult(t.getConfig(),b,D),y(),b.end(),w(D)})).catch(D=>new Promise((w,Q)=>{D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:D.message}),y(),b.end(),Q(D)})):x})}_setPoolConnectEventListeners(t){if(t[KOe.EVENT_LISTENERS_SET])return;let n=Wo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[KOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(WOe.SpanNames.POOL_CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchCallbackPGPool(a,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),a),()=>n.call(this,o));return XOe(a,c)}}};W4.PgInstrumentation=MJ;function XOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Hr.context.bind(Hr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Wo.sanitizedErrorMessage(r)),e.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var tke=F(Xv=>{"use strict";A();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.AttributeNames=Xv.PgInstrumentation=void 0;var DIt=eke();Object.defineProperty(Xv,"PgInstrumentation",{enumerable:!0,get:function(){return DIt.PgInstrumentation}});var BIt=OJ();Object.defineProperty(Xv,"AttributeNames",{enumerable:!0,get:function(){return BIt.AttributeNames}})});var nke,rke,oke,NIt,ike,ake=O(()=>{A();nke=ae(tke(),1);hr();rke="Postgres",oke=st(rke,nke.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),NIt=(e=>({name:rke,setupOnce(){oke(e)}})),ike=NIt});var cE,UJ,ske,OIt,kIt,uke,LJ,wIt,cke,lke=O(()=>{A();ze();cE=ae(on(),1);Wn();dt();hr();hS();UJ="PostgresJs",ske=[">=3.0.0 <4"],OIt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,kIt=Symbol.for("sentry.query.from.instrumented.sql"),uke=st(UJ,e=>new LJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),LJ=class extends cE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Xn,t)}init(){let t=new cE.InstrumentationNodeModuleDefinition("postgres",ske,n=>{try{return this._patchPostgres(n)}catch(r){return ba&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new cE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,ske,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 ba&&Z.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return ba&&Z.warn("postgres() did not return a valid instance"),c;let l=o.getConfig();return LV(c,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(hN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return $t.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(iC,r);return}let o=n?.match(OIt);o?.[1]&&t.setAttribute(iC,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[kIt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Wa({name:a||"postgresjs.query",op:"db"},c=>{zr(c,"auto.db.postgresjs"),c.setAttributes({[My]:"postgres",[K9]:a});let l=n.getConfig(),{requestHook:f}=l;f&&(0,cE.safeExecuteInTheMiddle)(()=>f(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),ba&&Z.error(`Error in requestHook for ${UJ} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){ba&&Z.error("Error ending span in resolve callback:",x)}return Reflect.apply(S,b,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(J9,v?.[0]?.code||"unknown"),c.setAttribute(Z9,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){ba&&Z.error("Error ending span in reject callback:",x)}return Reflect.apply(S,b,v)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.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}},wIt=(e=>({name:UJ,setupOnce(){uke(e)}})),cke=wIt});var dke=F(IO=>{"use strict";A();Object.defineProperty(IO,"__esModule",{value:!0});IO.SeverityNumber=void 0;var PIt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(PIt=IO.SeverityNumber||(IO.SeverityNumber={}))});var e3=F(eR=>{"use strict";A();Object.defineProperty(eR,"__esModule",{value:!0});eR.NOOP_LOGGER=eR.NoopLogger=void 0;var X4=class{emit(t){}};eR.NoopLogger=X4;eR.NOOP_LOGGER=new X4});var n3=F(tR=>{"use strict";A();Object.defineProperty(tR,"__esModule",{value:!0});tR.NOOP_LOGGER_PROVIDER=tR.NoopLoggerProvider=void 0;var MIt=e3(),t3=class{getLogger(t,n,r){return new MIt.NoopLogger}};tR.NoopLoggerProvider=t3;tR.NOOP_LOGGER_PROVIDER=new t3});var FJ=F(r3=>{"use strict";A();Object.defineProperty(r3,"__esModule",{value:!0});r3.ProxyLogger=void 0;var LIt=e3(),QJ=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):LIt.NOOP_LOGGER}};r3.ProxyLogger=QJ});var zJ=F(o3=>{"use strict";A();Object.defineProperty(o3,"__esModule",{value:!0});o3.ProxyLoggerProvider=void 0;var UIt=n3(),QIt=FJ(),GJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new QIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:UIt.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)}};o3.ProxyLoggerProvider=GJ});var pke=F(i3=>{"use strict";A();Object.defineProperty(i3,"__esModule",{value:!0});i3._globalThis=void 0;i3._globalThis=typeof globalThis=="object"?globalThis:global});var fke=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3._globalThis=void 0;var FIt=pke();Object.defineProperty(a3,"_globalThis",{enumerable:!0,get:function(){return FIt._globalThis}})});var mke=F(s3=>{"use strict";A();Object.defineProperty(s3,"__esModule",{value:!0});s3._globalThis=void 0;var GIt=fke();Object.defineProperty(s3,"_globalThis",{enumerable:!0,get:function(){return GIt._globalThis}})});var Ake=F($m=>{"use strict";A();Object.defineProperty($m,"__esModule",{value:!0});$m.API_BACKWARDS_COMPATIBILITY_VERSION=$m.makeGetter=$m._global=$m.GLOBAL_LOGS_API_KEY=void 0;var zIt=mke();$m.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");$m._global=zIt._globalThis;function jIt(e,t,n){return r=>r===e?t:n}$m.makeGetter=jIt;$m.API_BACKWARDS_COMPATIBILITY_VERSION=1});var hke=F(u3=>{"use strict";A();Object.defineProperty(u3,"__esModule",{value:!0});u3.LogsAPI=void 0;var tp=Ake(),HIt=n3(),gke=zJ(),jJ=class e{constructor(){this._proxyLoggerProvider=new gke.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return tp._global[tp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(tp._global[tp.GLOBAL_LOGS_API_KEY]=(0,tp.makeGetter)(tp.API_BACKWARDS_COMPATIBILITY_VERSION,t,HIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=tp._global[tp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(tp._global,tp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete tp._global[tp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new gke.ProxyLoggerProvider}};u3.LogsAPI=jJ});var HJ=F(rs=>{"use strict";A();Object.defineProperty(rs,"__esModule",{value:!0});rs.logs=rs.ProxyLoggerProvider=rs.ProxyLogger=rs.NoopLoggerProvider=rs.NOOP_LOGGER_PROVIDER=rs.NoopLogger=rs.NOOP_LOGGER=rs.SeverityNumber=void 0;var $It=dke();Object.defineProperty(rs,"SeverityNumber",{enumerable:!0,get:function(){return $It.SeverityNumber}});var _ke=e3();Object.defineProperty(rs,"NOOP_LOGGER",{enumerable:!0,get:function(){return _ke.NOOP_LOGGER}});Object.defineProperty(rs,"NoopLogger",{enumerable:!0,get:function(){return _ke.NoopLogger}});var Eke=n3();Object.defineProperty(rs,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return Eke.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rs,"NoopLoggerProvider",{enumerable:!0,get:function(){return Eke.NoopLoggerProvider}});var qIt=FJ();Object.defineProperty(rs,"ProxyLogger",{enumerable:!0,get:function(){return qIt.ProxyLogger}});var VIt=zJ();Object.defineProperty(rs,"ProxyLoggerProvider",{enumerable:!0,get:function(){return VIt.ProxyLoggerProvider}});var YIt=hke();rs.logs=YIt.LogsAPI.getInstance()});var yke=F(nR=>{"use strict";A();Object.defineProperty(nR,"__esModule",{value:!0});nR.disableInstrumentations=nR.enableInstrumentations=void 0;function KIt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}nR.enableInstrumentations=KIt;function JIt(e){e.forEach(t=>t.disable())}nR.disableInstrumentations=JIt});var Ike=F(c3=>{"use strict";A();Object.defineProperty(c3,"__esModule",{value:!0});c3.registerInstrumentations=void 0;var Ske=(ze(),Me(We)),ZIt=HJ(),Tke=yke();function WIt(e){let t=e.tracerProvider||Ske.trace.getTracerProvider(),n=e.meterProvider||Ske.metrics.getMeterProvider(),r=e.loggerProvider||ZIt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Tke.enableInstrumentations)(o,t,n,r),()=>{(0,Tke.disableInstrumentations)(o)}}c3.registerInstrumentations=WIt});var Oke=F(l3=>{"use strict";A();Object.defineProperty(l3,"__esModule",{value:!0});l3.satisfies=void 0;var YJ=(ze(),Me(We)),xke=/^(?: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-]+)*))?$/,XIt=/^(?<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-]+)*))?$/,ebt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function tbt(e,t,n){if(!nbt(e))return YJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=abt(e);if(!r)return!1;let o=[],i=Dke(r,t,o,n);return i&&!n?.includePrerelease?obt(r,o):i}l3.satisfies=tbt;function nbt(e){return typeof e=="string"&&xke.test(e)}function Dke(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if($J(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Rbt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!$J(e,i,n,r))return!1;return!0}return $J(e,t,n,r)}function $J(e,t,n,r){if(t=ibt(t,r),t.includes(" "))return Dke(e,t,n,r);{let o=sbt(t);return n.push(o),rbt(e,o)}}function rbt(e,t){if(t.invalid)return!1;if(!t.version||VJ(t.version))return!0;let n=Cke(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=Cke(r,o)}return ebt[t.op]?.includes(n)}function obt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function ibt(e,t){return e=e.trim(),e=Cbt(e,t),e=bbt(e),e=vbt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function abt(e){let t=e.match(xke);if(!t){YJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function sbt(e){if(!e)return{};let t=e.match(XIt);if(!t)return YJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function VJ(e){return e==="*"||e==="x"||e==="X"}function bke(e){let t=parseInt(e,10);return isNaN(t)?e:t}function ubt(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 cbt(e,t){if(VJ(e)||VJ(t))return 0;let[n,r]=ubt(bke(e),bke(t));return n>r?1:n<r?-1:0}function Cke(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=cbt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Bke="[a-zA-Z0-9-]",Nke="0|[1-9]\\d*",lbt=`\\d*[a-zA-Z-]${Bke}*`,dbt="((?:<|>)?=?)",vke=`(?:${Nke}|${lbt})`,pbt=`(?:-(${vke}(?:\\.${vke})*))`,Rke=`${Bke}+`,fbt=`(?:\\+(${Rke}(?:\\.${Rke})*))`,qJ=`${Nke}|x|X|\\*`,bO=`[v=\\s]*(${qJ})(?:\\.(${qJ})(?:\\.(${qJ})(?:${pbt})?${fbt}?)?)?`,mbt=`^${dbt}\\s*${bO}$`,Abt=new RegExp(mbt),gbt=`^\\s*(${bO})\\s+-\\s+(${bO})\\s*$`,hbt=new RegExp(gbt),_bt="(?:~>?)",Ebt=`^${_bt}${bO}$`,ybt=new RegExp(Ebt),Sbt="(?:\\^)",Tbt=`^${Sbt}${bO}$`,Ibt=new RegExp(Tbt);function bbt(e){let t=ybt;return e.replace(t,(n,r,o,i,a)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Cbt(e,t){let n=Ibt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,l)=>{let f;return Vu(i)?f="":Vu(a)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(c)?i==="0"?f=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:l?i==="0"?a==="0"?f=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?a==="0"?f=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,f})}function vbt(e,t){let n=Abt;return e.replace(n,(r,o,i,a,c,l)=>{let f=Vu(i),h=f||Vu(a),y=h||Vu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(l="-0"),r=`${o+i}.${a}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),r})}function Rbt(e,t){let n=hbt;return e.replace(n,(r,o,i,a,c,l,f,h,y,S,b,v)=>(Vu(i)?o="":Vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(y)?h="":Vu(S)?h=`<${+y+1}.0.0-0`:Vu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var KJ=F(ks=>{"use strict";A();Object.defineProperty(ks,"__esModule",{value:!0});ks.massUnwrap=ks.unwrap=ks.massWrap=ks.wrap=void 0;var Yu=console.error.bind(console);function CO(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 xbt=(e,t,n)=>{if(!e||!e[t]){Yu("no original function "+String(t)+" to wrap");return}if(!n){Yu("no wrapper function"),Yu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Yu("original object and wrapper must be functions");return}let o=n(r,t);return CO(o,"__original",r),CO(o,"__unwrap",()=>{e[t]===o&&CO(e,t,r)}),CO(o,"__wrapped",!0),CO(e,t,o),o};ks.wrap=xbt;var Dbt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ks.wrap)(r,o,n)})})};ks.massWrap=Dbt;var Bbt=(e,t)=>{if(!e||!e[t]){Yu("no function to unwrap."),Yu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Yu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ks.unwrap=Bbt;var Nbt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ks.unwrap)(n,r)})})};ks.massUnwrap=Nbt;function vO(e){e&&e.logger&&(typeof e.logger!="function"?Yu("new logger isn't a function, not replacing"):Yu=e.logger)}ks.default=vO;vO.wrap=ks.wrap;vO.massWrap=ks.massWrap;vO.unwrap=ks.unwrap;vO.massUnwrap=ks.massUnwrap});var kke=F(p3=>{"use strict";A();Object.defineProperty(p3,"__esModule",{value:!0});p3.InstrumentationAbstract=void 0;var JJ=(ze(),Me(We)),Obt=HJ(),d3=KJ(),ZJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=JJ.diag.createComponentLogger({namespace:t}),this._tracer=JJ.trace.getTracer(t,n),this._meter=JJ.metrics.getMeter(t,n),this._logger=Obt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=d3.wrap;_unwrap=d3.unwrap;_massWrap=d3.massWrap;_massUnwrap=d3.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)}}};p3.InstrumentationAbstract=ZJ});var wke=F(lE=>{"use strict";A();Object.defineProperty(lE,"__esModule",{value:!0});lE.ModuleNameTrie=lE.ModuleNameSeparator=void 0;lE.ModuleNameSeparator="/";var f3=class{hooks=[];children=new Map},WJ=class{_trie=new f3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(lE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new f3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(lE.ModuleNameSeparator)){let l=o.children.get(c);if(!l){a=!1;break}r||i.push(...l.hooks),o=l}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};lE.ModuleNameTrie=WJ});var Mke=F(m3=>{"use strict";A();Object.defineProperty(m3,"__esModule",{value:!0});m3.RequireInTheMiddleSingleton=void 0;var kbt=zy(),Pke=Fe("path"),XJ=wke(),wbt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),eZ=class e{_moduleNameTrie=new XJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new kbt.Hook(null,{internals:!0},(t,n,r)=>{let o=Pbt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return wbt?new e:this._instance=this._instance??new e}};m3.RequireInTheMiddleSingleton=eZ;function Pbt(e){return Pke.sep!==XJ.ModuleNameSeparator?e.split(Pke.sep).join(XJ.ModuleNameSeparator):e}});var tZ=F(dE=>{"use strict";A();Object.defineProperty(dE,"__esModule",{value:!0});dE.isWrapped=dE.safeExecuteInTheMiddleAsync=dE.safeExecuteInTheMiddle=void 0;function Mbt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}dE.safeExecuteInTheMiddle=Mbt;async function Lbt(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}}dE.safeExecuteInTheMiddleAsync=Lbt;function Ubt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}dE.isWrapped=Ubt});var Qke=F(A3=>{"use strict";A();Object.defineProperty(A3,"__esModule",{value:!0});A3.InstrumentationBase=void 0;var RO=Fe("path"),Lke=Fe("util"),Qbt=Oke(),nZ=KJ(),Fbt=kke(),Gbt=Mke(),zbt=MK(),xO=(ze(),Me(We)),jbt=zy(),Hbt=Fe("fs"),$bt=tZ(),rZ=class extends Fbt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Gbt.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,$bt.isWrapped)(t[n])&&this._unwrap(t,n),Lke.types.isProxy(t)){let o=(0,nZ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,nZ.wrap)(t,n,r)};_unwrap=(t,n)=>Lke.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,nZ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{xO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xO.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{xO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,Hbt.readFileSync)(RO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{xO.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 Uke(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=RO.normalize(r);return a.filter(f=>f.name===c).filter(f=>Uke(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,l)=>{if(!l&&RO.isAbsolute(c)){let f=RO.parse(c);c=f.name,l=f.dir}return this._onRequire(t,a,c,l)},r=(a,c,l)=>this._onRequire(t,a,c,l),o=RO.isAbsolute(t.name)?new jbt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new zbt.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}};A3.InstrumentationBase=rZ;function Uke(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Qbt.satisfies)(t,r,{includePrerelease:n}))}});var Fke=F(g3=>{"use strict";A();Object.defineProperty(g3,"__esModule",{value:!0});g3.normalize=void 0;var qbt=Fe("path");Object.defineProperty(g3,"normalize",{enumerable:!0,get:function(){return qbt.normalize}})});var Gke=F(rR=>{"use strict";A();Object.defineProperty(rR,"__esModule",{value:!0});rR.normalize=rR.InstrumentationBase=void 0;var Vbt=Qke();Object.defineProperty(rR,"InstrumentationBase",{enumerable:!0,get:function(){return Vbt.InstrumentationBase}});var Ybt=Fke();Object.defineProperty(rR,"normalize",{enumerable:!0,get:function(){return Ybt.normalize}})});var oZ=F(oR=>{"use strict";A();Object.defineProperty(oR,"__esModule",{value:!0});oR.normalize=oR.InstrumentationBase=void 0;var zke=Gke();Object.defineProperty(oR,"InstrumentationBase",{enumerable:!0,get:function(){return zke.InstrumentationBase}});Object.defineProperty(oR,"normalize",{enumerable:!0,get:function(){return zke.normalize}})});var jke=F(h3=>{"use strict";A();Object.defineProperty(h3,"__esModule",{value:!0});h3.InstrumentationNodeModuleDefinition=void 0;var iZ=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||[]}};h3.InstrumentationNodeModuleDefinition=iZ});var Hke=F(_3=>{"use strict";A();Object.defineProperty(_3,"__esModule",{value:!0});_3.InstrumentationNodeModuleFile=void 0;var Kbt=oZ(),aZ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Kbt.normalize)(t)}};_3.InstrumentationNodeModuleFile=aZ});var $ke=F(xS=>{"use strict";A();Object.defineProperty(xS,"__esModule",{value:!0});xS.semconvStabilityFromStr=xS.SemconvStability=void 0;var E3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(E3=xS.SemconvStability||(xS.SemconvStability={}));function Jbt(e,t){let n=E3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=E3.DUPLICATE;break}else o.toLowerCase()===e&&(n=E3.STABLE);return n}xS.semconvStabilityFromStr=Jbt});var Vke=F(aa=>{"use strict";A();Object.defineProperty(aa,"__esModule",{value:!0});aa.semconvStabilityFromStr=aa.SemconvStability=aa.safeExecuteInTheMiddleAsync=aa.safeExecuteInTheMiddle=aa.isWrapped=aa.InstrumentationNodeModuleFile=aa.InstrumentationNodeModuleDefinition=aa.InstrumentationBase=aa.registerInstrumentations=void 0;var Zbt=Ike();Object.defineProperty(aa,"registerInstrumentations",{enumerable:!0,get:function(){return Zbt.registerInstrumentations}});var Wbt=oZ();Object.defineProperty(aa,"InstrumentationBase",{enumerable:!0,get:function(){return Wbt.InstrumentationBase}});var Xbt=jke();Object.defineProperty(aa,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Xbt.InstrumentationNodeModuleDefinition}});var eCt=Hke();Object.defineProperty(aa,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return eCt.InstrumentationNodeModuleFile}});var sZ=tZ();Object.defineProperty(aa,"isWrapped",{enumerable:!0,get:function(){return sZ.isWrapped}});Object.defineProperty(aa,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return sZ.safeExecuteInTheMiddle}});Object.defineProperty(aa,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return sZ.safeExecuteInTheMiddleAsync}});var qke=$ke();Object.defineProperty(aa,"SemconvStability",{enumerable:!0,get:function(){return qke.SemconvStability}});Object.defineProperty(aa,"semconvStabilityFromStr",{enumerable:!0,get:function(){return qke.semconvStabilityFromStr}})});function rCt(){let e=iR[cZ];return e?.helper?e.helper:iR[uZ]?.helper}function oCt(e){let t={helper:e};iR[cZ]=t,iR[uZ]=t}function iCt(){delete iR[cZ],delete iR[uZ]}function uCt(e){return e==="client"?co.CLIENT:co.INTERNAL}function Jke(e,t,n,r,o){if(Zke(t.name,o))return;let i={attributes:t.attributes,kind:uCt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(l=>{let f=r.get(l);return f?{context:{spanId:f,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(l=>l.parentId===t.id);for(let l of c)Jke(e,l,n,r,o);a.end(t.endTime)})}function Yke(e,t){return lCt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function lCt(e){return e!=null&&typeof e.then=="function"}function Zke(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var y3,tCt,nCt,uZ,cZ,iR,aCt,sCt,cCt,Wke,Kke,dCt,pCt,Xke,ewe=O(()=>{A();ze();y3=ae(Vke(),1);ze();tCt={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"}},nCt=tCt.version.split(".")[0],uZ="PRISMA_INSTRUMENTATION",cZ=`V${nCt}_PRISMA_INSTRUMENTATION`,iR=globalThis;aCt=process.env.PRISMA_SHOW_ALL_TRACES==="true",sCt="00-10-10-00";cCt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=$t.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:sCt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Jke(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!aCt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Zke(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return Yke(i,t(i,r))}return n.startActiveSpan(o,e,i=>Yke(i,t(i,r)))}};Wke={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},Kke=Wke.version,dCt=Wke.name,pCt="@prisma/client",Xke=class extends y3.InstrumentationBase{tracerProvider;constructor(e={}){super(dCt,Kke,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new y3.InstrumentationNodeModuleDefinition(pCt,[Kke])]}enable(){let e=this._config;oCt(new cCt({tracerProvider:this.tracerProvider??$t.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){iCt()}isEnabled(){return rCt()!==void 0}}});function fCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function nwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function mCt(e){return e==="client"?co.CLIENT:co.INTERNAL}var twe,lZ,ACt,rwe,owe=O(()=>{A();ze();ewe();dt();hr();twe="Prisma";lZ=class extends Xke{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=nwe();fCt(t)&&(t.createEngineSpan=n=>{let r=$t.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ko(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=mCt(i.kind),c=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Js.SAMPLED}})),y=$t.setSpanContext(Ke.active(),{traceId:f,spanId:c,traceFlags:Js.SAMPLED});Ke.with(y,()=>{let S={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};ACt=st(twe,e=>new lZ(e)),rwe=e=>({name:twe,setupOnce(){ACt(e)},setup(t){nwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(wt,"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 iwe=F(aR=>{"use strict";A();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.60.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var dZ=F(qm=>{"use strict";A();Object.defineProperty(qm,"__esModule",{value:!0});qm.HapiLifecycleMethodNames=qm.HapiLayerType=qm.handlerPatched=qm.HapiComponentName=void 0;qm.HapiComponentName="@hapi/hapi";qm.handlerPatched=Symbol("hapi-handler-patched");qm.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};qm.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var awe=F(S3=>{"use strict";A();Object.defineProperty(S3,"__esModule",{value:!0});S3.ATTR_HTTP_METHOD=void 0;S3.ATTR_HTTP_METHOD="http.method"});var pZ=F(DO=>{"use strict";A();Object.defineProperty(DO,"__esModule",{value:!0});DO.AttributeNames=void 0;var gCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(gCt=DO.AttributeNames||(DO.AttributeNames={}))});var cwe=F(sa=>{"use strict";A();Object.defineProperty(sa,"__esModule",{value:!0});sa.getPluginFromInput=sa.getExtMetadata=sa.getRouteMetadata=sa.isPatchableExtMethod=sa.isDirectExtInput=sa.isLifecycleExtEventObj=sa.isLifecycleExtType=sa.getPluginName=void 0;var swe=(Wn(),Me(Fr)),hCt=awe(),BO=dZ(),pE=pZ(),uwe=on();function _Ct(e){return e.name?e.name:e.pkg.name}sa.getPluginName=_Ct;var ECt=e=>typeof e=="string"&&BO.HapiLifecycleMethodNames.has(e);sa.isLifecycleExtType=ECt;var yCt=e=>{let t=e?.type;return t!==void 0&&(0,sa.isLifecycleExtType)(t)};sa.isLifecycleExtEventObj=yCt;var SCt=e=>Array.isArray(e)&&e.length<=3&&(0,sa.isLifecycleExtType)(e[0])&&typeof e[1]=="function";sa.isDirectExtInput=SCt;var TCt=e=>!Array.isArray(e);sa.isPatchableExtMethod=TCt;var ICt=(e,t,n)=>{let r={[swe.ATTR_HTTP_ROUTE]:e.path};t&uwe.SemconvStability.OLD&&(r[hCt.ATTR_HTTP_METHOD]=e.method),t&uwe.SemconvStability.STABLE&&(r[swe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[pE.AttributeNames.HAPI_TYPE]=BO.HapiLayerType.PLUGIN,r[pE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[pE.AttributeNames.HAPI_TYPE]=BO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};sa.getRouteMetadata=ICt;var bCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[pE.AttributeNames.EXT_TYPE]:e,[pE.AttributeNames.HAPI_TYPE]:BO.HapiLayerType.EXT,[pE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[pE.AttributeNames.EXT_TYPE]:e,[pE.AttributeNames.HAPI_TYPE]:BO.HapiLayerType.EXT},name:r}};sa.getExtMetadata=bCt;var CCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;sa.getPluginFromInput=CCt});var pwe=F(T3=>{"use strict";A();Object.defineProperty(T3,"__esModule",{value:!0});T3.HapiInstrumentation=void 0;var $l=(ze(),Me(We)),lwe=br(),NO=on(),dwe=iwe(),OO=dZ(),Gg=cwe(),fZ=class extends NO.InstrumentationBase{_semconvStability;constructor(t={}){super(dwe.PACKAGE_NAME,dwe.PACKAGE_VERSION,t),this._semconvStability=(0,NO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new NO.InstrumentationNodeModuleDefinition(OO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,NO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,NO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Gg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Gg.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let l=a[c];if((0,Gg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,a[c]=f}}return t.apply(this,i)}else if((0,Gg.isDirectExtInput)(i)){let a=i,c=a[1],l=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],l,a[2]])}else if((0,Gg.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Gg.getPluginName)(t),o=t.register,i=this,a=function(c,l){return i._wrap(c,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(c,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,c,l)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Gg.isPatchableExtMethod)(t))return t[OO.handlerPatched]===!0?t:(t[OO.handlerPatched]=!0,async function(...a){if($l.trace.getSpan($l.context.active())===void 0)return await t.apply(this,a);let c=(0,Gg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await $l.context.with($l.trace.setSpan($l.context.active(),l),t,void 0,...a)}catch(f){throw l.recordException(f),l.setStatus({code:$l.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[OO.handlerPatched]===!0)return t;t[OO.handlerPatched]=!0;let o=i=>async function(...a){if($l.trace.getSpan($l.context.active())===void 0)return await i.call(this,...a);let c=(0,lwe.getRPCMetadata)($l.context.active());c?.type===lwe.RPCType.HTTP&&(c.route=t.path);let l=(0,Gg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await $l.context.with($l.trace.setSpan($l.context.active(),f),()=>i.call(this,...a))}catch(h){throw f.recordException(h),f.setStatus({code:$l.SpanStatusCode.ERROR,message:h.message}),h}finally{f.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};T3.HapiInstrumentation=fZ});var fwe=F(sR=>{"use strict";A();Object.defineProperty(sR,"__esModule",{value:!0});sR.AttributeNames=sR.HapiInstrumentation=void 0;var vCt=pwe();Object.defineProperty(sR,"HapiInstrumentation",{enumerable:!0,get:function(){return vCt.HapiInstrumentation}});var RCt=pZ();Object.defineProperty(sR,"AttributeNames",{enumerable:!0,get:function(){return RCt.AttributeNames}})});var mwe,Awe,gwe,xCt,hwe,_we=O(()=>{A();mwe=ae(fwe(),1);hr();Awe="Hapi",gwe=st(Awe,()=>new mwe.HapiInstrumentation),xCt=(()=>({name:Awe,setupOnce(){gwe()}})),hwe=xCt});var fE,kO,mZ=O(()=>{A();fE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},kO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var b3,DCt,BCt,I3,Ewe=O(()=>{A();ze();b3=ae(on(),1);dt();mZ();DCt="@sentry/instrumentation-hono",BCt="0.0.1",I3=class extends b3.InstrumentationBase{constructor(t={}){super(DCt,BCt,t)}init(){return[new b3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return Ke.with($t.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(bs(c))return c.then(l=>{let f=n._determineHandlerType(l);return a.setAttributes({[fE.HONO_TYPE]:f,[fE.HONO_NAME]:f===kO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),l});{let l=n._determineHandlerType(c);return a.setAttributes({[fE.HONO_TYPE]:l,[fE.HONO_NAME]:l===kO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return bs(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?kO.MIDDLEWARE:kO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:di.ERROR,message:n.message}),t.recordException(n))}}});function NCt(e){let t=Ot(e).data,n=t[fE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[wt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[fE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),vn()===Fd()){ba&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[mg],i=t[Ly];typeof o=="string"&&typeof i=="string"&&vn().setTransactionName(`${i} ${o}`)}var ywe,Swe,OCt,Twe,Iwe=O(()=>{A();Wn();dt();hr();hS();mZ();Ewe();ywe="Hono";Swe=st(ywe,()=>new I3({responseHook:e=>{NCt(e)}})),OCt=(()=>({name:ywe,setupOnce(){Swe()}})),Twe=OCt});var C3=F(wO=>{"use strict";A();Object.defineProperty(wO,"__esModule",{value:!0});wO.KoaLayerType=void 0;var kCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(kCt=wO.KoaLayerType||(wO.KoaLayerType={}))});var bwe=F(uR=>{"use strict";A();Object.defineProperty(uR,"__esModule",{value:!0});uR.PACKAGE_NAME=uR.PACKAGE_VERSION=void 0;uR.PACKAGE_VERSION="0.62.0";uR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var AZ=F(PO=>{"use strict";A();Object.defineProperty(PO,"__esModule",{value:!0});PO.AttributeNames=void 0;var wCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(wCt=PO.AttributeNames||(PO.AttributeNames={}))});var vwe=F(cR=>{"use strict";A();Object.defineProperty(cR,"__esModule",{value:!0});cR.isLayerIgnored=cR.getMiddlewareMetadata=void 0;var Cwe=C3(),v3=AZ(),PCt=(Wn(),Me(Fr)),MCt=(e,t,n,r)=>n?{attributes:{[v3.AttributeNames.KOA_NAME]:r?.toString(),[v3.AttributeNames.KOA_TYPE]:Cwe.KoaLayerType.ROUTER,[PCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[v3.AttributeNames.KOA_NAME]:t.name??"middleware",[v3.AttributeNames.KOA_TYPE]:Cwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};cR.getMiddlewareMetadata=MCt;var LCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));cR.isLayerIgnored=LCt});var Rwe=F(R3=>{"use strict";A();Object.defineProperty(R3,"__esModule",{value:!0});R3.kLayerPatched=void 0;R3.kLayerPatched=Symbol("koa-layer-patched")});var kwe=F(x3=>{"use strict";A();Object.defineProperty(x3,"__esModule",{value:!0});x3.KoaInstrumentation=void 0;var Vm=(ze(),Me(We)),MO=on(),xwe=C3(),Dwe=bwe(),Bwe=vwe(),Nwe=br(),Owe=Rwe(),gZ=class extends MO.InstrumentationBase{constructor(t={}){super(Dwe.PACKAGE_NAME,Dwe.PACKAGE_VERSION,t)}init(){return new MO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,MO.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,MO.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){Vm.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let l=a[c];a[c]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?xwe.KoaLayerType.ROUTER:xwe.KoaLayerType.MIDDLEWARE;return t[Owe.kLayerPatched]===!0||(0,Bwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(Vm.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Owe.kLayerPatched]=!0,Vm.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(Vm.trace.getSpan(Vm.context.active())===void 0)return t(i,a);let l=(0,Bwe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,Nwe.getRPCMetadata)(Vm.context.active());h?.type===Nwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,MO.safeExecuteInTheMiddle)(()=>y(f,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&Vm.diag.error("koa instrumentation: request hook failed",b)},!0);let S=Vm.trace.setSpan(Vm.context.active(),f);return Vm.context.with(S,async()=>{try{return await t(i,a)}catch(b){throw f.recordException(b),b}finally{f.end()}})})}};x3.KoaInstrumentation=gZ});var wwe=F(mE=>{"use strict";A();Object.defineProperty(mE,"__esModule",{value:!0});mE.KoaLayerType=mE.AttributeNames=mE.KoaInstrumentation=void 0;var UCt=kwe();Object.defineProperty(mE,"KoaInstrumentation",{enumerable:!0,get:function(){return UCt.KoaInstrumentation}});var QCt=AZ();Object.defineProperty(mE,"AttributeNames",{enumerable:!0,get:function(){return QCt.AttributeNames}});var FCt=C3();Object.defineProperty(mE,"KoaLayerType",{enumerable:!0,get:function(){return FCt.KoaLayerType}})});var Pwe,Mwe,Lwe,GCt,Uwe,Qwe=O(()=>{A();Pwe=ae(wwe(),1);Wn();dt();hr();hS();Mwe="Koa",Lwe=st(Mwe,Pwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),vn()===Fd()){ba&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[mg],c=n.context?.request?.method?.toUpperCase()||"GET";a&&vn().setTransactionName(`${c} ${a}`)}})),GCt=((e={})=>({name:Mwe,setupOnce(){Lwe(e)}})),Uwe=GCt});var hZ=F(_f=>{"use strict";A();Object.defineProperty(_f,"__esModule",{value:!0});_f.ConnectNames=_f.ConnectTypes=_f.AttributeNames=void 0;var zCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(zCt=_f.AttributeNames||(_f.AttributeNames={}));var jCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(jCt=_f.ConnectTypes||(_f.ConnectTypes={}));var HCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(HCt=_f.ConnectNames||(_f.ConnectNames={}))});var Fwe=F(lR=>{"use strict";A();Object.defineProperty(lR,"__esModule",{value:!0});lR.PACKAGE_NAME=lR.PACKAGE_VERSION=void 0;lR.PACKAGE_VERSION="0.57.0";lR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Gwe=F(D3=>{"use strict";A();Object.defineProperty(D3,"__esModule",{value:!0});D3._LAYERS_STORE_PROPERTY=void 0;D3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var zwe=F(gE=>{"use strict";A();Object.defineProperty(gE,"__esModule",{value:!0});gE.generateRoute=gE.replaceCurrentStackRoute=gE.addNewStackLayer=void 0;var $Ct=(ze(),Me(We)),AE=Gwe(),qCt=e=>{Array.isArray(e[AE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,AE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[AE._LAYERS_STORE_PROPERTY].push("/");let t=e[AE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[AE._LAYERS_STORE_PROPERTY].length?e[AE._LAYERS_STORE_PROPERTY].pop():$Ct.diag.warn("Connect: Trying to pop the stack multiple time")}};gE.addNewStackLayer=qCt;var VCt=(e,t)=>{t&&e[AE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};gE.replaceCurrentStackRoute=VCt;var YCt=e=>e[AE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);gE.generateRoute=YCt});var $we=F(hE=>{"use strict";A();Object.defineProperty(hE,"__esModule",{value:!0});hE.ConnectInstrumentation=hE.ANONYMOUS_NAME=void 0;var KCt=(ze(),Me(We)),jwe=br(),dR=hZ(),Hwe=Fwe(),B3=on(),JCt=(Wn(),Me(Fr)),_Z=zwe();hE.ANONYMOUS_NAME="anonymous";var EZ=class extends B3.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return[new B3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,B3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,B3.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=dR.ConnectTypes.REQUEST_HANDLER,i=dR.ConnectNames.REQUEST_HANDLER,o=t):(r=dR.ConnectTypes.MIDDLEWARE,i=dR.ConnectNames.MIDDLEWARE,o=n.name||hE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[JCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[dR.AttributeNames.CONNECT_TYPE]:r,[dR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,l]=o?[1,2,3]:[0,1,2],f=arguments[a],h=arguments[c],y=arguments[l];(0,_Z.replaceCurrentStackRoute)(f,t);let S=(0,jwe.getRPCMetadata)(KCt.context.active());t&&S?.type===jwe.RPCType.HTTP&&(S.route=(0,_Z.generateRoute)(f));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||hE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",b);let x=!1;function D(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",D)}return h.addListener("close",D),arguments[l]=r._patchNext(y,D),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,_Z.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};hE.ConnectInstrumentation=EZ});var Vwe=F(np=>{"use strict";A();Object.defineProperty(np,"__esModule",{value:!0});np.ConnectTypes=np.ConnectNames=np.AttributeNames=np.ANONYMOUS_NAME=np.ConnectInstrumentation=void 0;var qwe=$we();Object.defineProperty(np,"ConnectInstrumentation",{enumerable:!0,get:function(){return qwe.ConnectInstrumentation}});Object.defineProperty(np,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return qwe.ANONYMOUS_NAME}});var yZ=hZ();Object.defineProperty(np,"AttributeNames",{enumerable:!0,get:function(){return yZ.AttributeNames}});Object.defineProperty(np,"ConnectNames",{enumerable:!0,get:function(){return yZ.ConnectNames}});Object.defineProperty(np,"ConnectTypes",{enumerable:!0,get:function(){return yZ.ConnectTypes}})});var Ywe,Kwe,Jwe,ZCt,Zwe,Wwe=O(()=>{A();Ywe=ae(Vwe(),1);hr();Kwe="Connect",Jwe=st(Kwe,()=>new Ywe.ConnectInstrumentation),ZCt=(()=>({name:Kwe,setupOnce(){Jwe()}})),Zwe=ZCt});var Xwe=F(os=>{"use strict";A();Object.defineProperty(os,"__esModule",{value:!0});os.DB_SYSTEM_VALUE_MSSQL=os.ATTR_NET_PEER_PORT=os.ATTR_NET_PEER_NAME=os.ATTR_DB_USER=os.ATTR_DB_SYSTEM=os.ATTR_DB_STATEMENT=os.ATTR_DB_SQL_TABLE=os.ATTR_DB_NAME=void 0;os.ATTR_DB_NAME="db.name";os.ATTR_DB_SQL_TABLE="db.sql.table";os.ATTR_DB_STATEMENT="db.statement";os.ATTR_DB_SYSTEM="db.system";os.ATTR_DB_USER="db.user";os.ATTR_NET_PEER_NAME="net.peer.name";os.ATTR_NET_PEER_PORT="net.peer.port";os.DB_SYSTEM_VALUE_MSSQL="mssql"});var ePe=F(pR=>{"use strict";A();Object.defineProperty(pR,"__esModule",{value:!0});pR.once=pR.getSpanName=void 0;function WCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}pR.getSpanName=WCt;var XCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pR.once=XCt});var tPe=F(fR=>{"use strict";A();Object.defineProperty(fR,"__esModule",{value:!0});fR.PACKAGE_NAME=fR.PACKAGE_VERSION=void 0;fR.PACKAGE_VERSION="0.33.0";fR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var aPe=F(EE=>{"use strict";A();Object.defineProperty(EE,"__esModule",{value:!0});EE.TediousInstrumentation=EE.INJECTED_CTX=void 0;var mR=(ze(),Me(We)),evt=Fe("events"),Ym=on(),DS=(Wn(),Me(Fr)),_E=Xwe(),nPe=ePe(),rPe=tPe(),iPe=Symbol("opentelemetry.instrumentation-tedious.current-database");EE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var oPe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function N3(e){Object.defineProperty(this,iPe,{value:e,writable:!0})}var SZ=class e extends Ym.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rPe.PACKAGE_NAME,rPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ym.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ym.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ym.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of oPe)(0,Ym.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,Ym.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 oPe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return N3.call(this,this.config?.options?.database),this.removeListener("databaseChange",N3),this.on("databaseChange",N3),this.once("end",()=>{this.removeListener("databaseChange",N3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||mR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,l=>{o()});Object.defineProperty(a,EE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[EE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof evt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,l=0,f=()=>l++,h=()=>c++,y=this[iPe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),b={};o._dbSemconvStability&Ym.SemconvStability.OLD&&(b[_E.ATTR_DB_SYSTEM]=_E.DB_SYSTEM_VALUE_MSSQL,b[_E.ATTR_DB_NAME]=y,b[_E.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[_E.ATTR_DB_STATEMENT]=S,b[_E.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&Ym.SemconvStability.STABLE&&(b[DS.ATTR_DB_NAMESPACE]=y,b[DS.ATTR_DB_SYSTEM_NAME]=DS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[DS.ATTR_DB_QUERY_TEXT]=S,b[DS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&Ym.SemconvStability.OLD&&(b[_E.ATTR_NET_PEER_NAME]=this.config?.server,b[_E.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&Ym.SemconvStability.STABLE&&(b[DS.ATTR_SERVER_ADDRESS]=this.config?.server,b[DS.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,nPe.getSpanName)(t,y,S,a.table),{kind:mR.SpanKind.CLIENT,attributes:b}),x=(0,nPe.once)(G=>{a.removeListener("done",f),a.removeListener("doneInProc",f),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:mR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",f),a.on("doneInProc",f),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let D=()=>mR.context.with(mR.trace.setSpan(mR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return D();let z=o._buildTraceparent(v);o._injectContextInfo(this,n,z).finally(D)}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)}}};EE.TediousInstrumentation=SZ});var sPe=F(O3=>{"use strict";A();Object.defineProperty(O3,"__esModule",{value:!0});O3.TediousInstrumentation=void 0;var tvt=aPe();Object.defineProperty(O3,"TediousInstrumentation",{enumerable:!0,get:function(){return tvt.TediousInstrumentation}})});var uPe,nvt,cPe,lPe,rvt,dPe,pPe=O(()=>{A();uPe=ae(sPe(),1);dt();hr();nvt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),cPe="Tedious",lPe=st(cPe,()=>new uPe.TediousInstrumentation({})),rvt=(()=>{let e;return{name:cPe,setupOnce(){let t=lPe();e=EN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";nvt.has(i)&&n.setAttribute(wt,"auto.db.otel.tedious")}))}}}),dPe=rvt});var fPe=F(AR=>{"use strict";A();Object.defineProperty(AR,"__esModule",{value:!0});AR.PACKAGE_NAME=AR.PACKAGE_VERSION=void 0;AR.PACKAGE_VERSION="0.57.0";AR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var APe=F(k3=>{"use strict";A();Object.defineProperty(k3,"__esModule",{value:!0});k3.GenericPoolInstrumentation=void 0;var gR=(ze(),Me(We)),BS=on(),mPe=fPe(),TZ="generic-pool",IZ=class extends BS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(mPe.PACKAGE_NAME,mPe.PACKAGE_VERSION,t)}init(){return[new BS.InstrumentationNodeModuleDefinition(TZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,BS.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 BS.InstrumentationNodeModuleDefinition(TZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,BS.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 BS.InstrumentationNodeModuleDefinition(TZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,BS.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=gR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return gR.context.with(gR.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=gR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return gR.context.with(gR.trace.setSpan(a,c),()=>{t.call(this,(l,f)=>{if(c.end(),o)return o(l,f)},i)})}}};k3.GenericPoolInstrumentation=IZ});var gPe=F(w3=>{"use strict";A();Object.defineProperty(w3,"__esModule",{value:!0});w3.GenericPoolInstrumentation=void 0;var ovt=APe();Object.defineProperty(w3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return ovt.GenericPoolInstrumentation}})});var hPe,_Pe,EPe,ivt,yPe,SPe=O(()=>{A();hPe=ae(gPe(),1);dt();hr();_Pe="GenericPool",EPe=st(_Pe,()=>new hPe.GenericPoolInstrumentation({})),ivt=(()=>{let e;return{name:_Pe,setupOnce(){let t=EPe();e=EN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(wt,"auto.db.otel.generic_pool")}))}}}),yPe=ivt});var bZ=F(Km=>{"use strict";A();Object.defineProperty(Km,"__esModule",{value:!0});Km.ATTR_NET_PEER_PORT=Km.ATTR_NET_PEER_NAME=Km.ATTR_MESSAGING_SYSTEM=Km.ATTR_MESSAGING_OPERATION=void 0;Km.ATTR_MESSAGING_OPERATION="messaging.operation";Km.ATTR_MESSAGING_SYSTEM="messaging.system";Km.ATTR_NET_PEER_NAME="net.peer.name";Km.ATTR_NET_PEER_PORT="net.peer.port"});var CZ=F(gi=>{"use strict";A();Object.defineProperty(gi,"__esModule",{value:!0});gi.ATTR_MESSAGING_CONVERSATION_ID=gi.OLD_ATTR_MESSAGING_MESSAGE_ID=gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=gi.ATTR_MESSAGING_URL=gi.ATTR_MESSAGING_PROTOCOL_VERSION=gi.ATTR_MESSAGING_PROTOCOL=gi.MESSAGING_OPERATION_VALUE_PROCESS=gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=gi.ATTR_MESSAGING_DESTINATION_KIND=gi.ATTR_MESSAGING_DESTINATION=void 0;gi.ATTR_MESSAGING_DESTINATION="messaging.destination";gi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";gi.MESSAGING_OPERATION_VALUE_PROCESS="process";gi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";gi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";gi.ATTR_MESSAGING_URL="messaging.url";gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";gi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";gi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var vZ=F(NS=>{"use strict";A();Object.defineProperty(NS,"__esModule",{value:!0});NS.DEFAULT_CONFIG=NS.EndOperation=void 0;var avt;(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"})(avt=NS.EndOperation||(NS.EndOperation={}));NS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var CPe=F(hi=>{"use strict";A();Object.defineProperty(hi,"__esModule",{value:!0});hi.isConfirmChannelTracing=hi.unmarkConfirmChannelTracing=hi.markConfirmChannelTracing=hi.getConnectionAttributesFromUrl=hi.getConnectionAttributesFromServer=hi.normalizeExchange=hi.CONNECTION_ATTRIBUTES=hi.CHANNEL_CONSUME_TIMEOUT_TIMER=hi.CHANNEL_SPANS_NOT_ENDED=hi.MESSAGE_STORED_SPAN=void 0;var RZ=(ze(),Me(We)),yE=on(),P3=(Wn(),Me(Fr)),LO=bZ(),M3=CZ();hi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");hi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");hi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");hi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var xZ=(0,RZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),svt=e=>e!==""?e:"<default>";hi.normalizeExchange=svt;var uvt=e=>e.replace(/:[^:@/]*@/,":***@"),TPe=(e,t)=>e||(t==="AMQP"?5672:5671),IPe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},bPe=e=>e||"localhost",Jm=(e,t,n,r)=>n?{[t]:n}:(RZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),cvt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[LO.ATTR_MESSAGING_SYSTEM]:t}:{}};hi.getConnectionAttributesFromServer=cvt;var lvt=(e,t)=>{let n={[M3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=IPe(r?.protocol);Object.assign(n,{...Jm(e,M3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=bPe(r?.hostname);t&yE.SemconvStability.OLD&&Object.assign(n,{...Jm(e,LO.ATTR_NET_PEER_NAME,i,"hostname")}),t&yE.SemconvStability.STABLE&&Object.assign(n,{...Jm(e,P3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=TPe(r.port,o);t&yE.SemconvStability.OLD&&Object.assign(n,Jm(e,LO.ATTR_NET_PEER_PORT,a,"port")),t&yE.SemconvStability.STABLE&&Object.assign(n,Jm(e,P3.ATTR_SERVER_PORT,a,"port"))}else{let r=uvt(e);n[M3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=IPe(o.protocol);Object.assign(n,{...Jm(r,M3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=bPe(o.hostname);t&yE.SemconvStability.OLD&&Object.assign(n,{...Jm(r,LO.ATTR_NET_PEER_NAME,a,"hostname")}),t&yE.SemconvStability.STABLE&&Object.assign(n,{...Jm(r,P3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=TPe(o.port?parseInt(o.port):void 0,i);t&yE.SemconvStability.OLD&&Object.assign(n,Jm(r,LO.ATTR_NET_PEER_PORT,c,"port")),t&yE.SemconvStability.STABLE&&Object.assign(n,Jm(r,P3.ATTR_SERVER_PORT,c,"port"))}catch(o){RZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};hi.getConnectionAttributesFromUrl=lvt;var dvt=e=>e.setValue(xZ,!0);hi.markConfirmChannelTracing=dvt;var pvt=e=>e.deleteValue(xZ);hi.unmarkConfirmChannelTracing=pvt;var fvt=e=>e.getValue(xZ)===!0;hi.isConfirmChannelTracing=fvt});var vPe=F(hR=>{"use strict";A();Object.defineProperty(hR,"__esModule",{value:!0});hR.PACKAGE_NAME=hR.PACKAGE_VERSION=void 0;hR.PACKAGE_VERSION="0.61.0";hR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var xPe=F(Q3=>{"use strict";A();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.AmqplibInstrumentation=void 0;var Xo=(ze(),Me(We)),L3=br(),vr=on(),mvt=bZ(),ql=CZ(),Ku=vZ(),_i=CPe(),RPe=vPe(),U3=[">=0.5.5 <1"],DZ=class extends vr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(RPe.PACKAGE_NAME,RPe.PACKAGE_VERSION,{...Ku.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ku.DEFAULT_CONFIG,...t})}init(){let t=new vr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",U3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new vr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",U3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new vr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",U3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new vr.InstrumentationNodeModuleDefinition("amqplib",U3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,vr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,vr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,vr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ku.EndOperation.Ack)),(0,vr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ku.EndOperation.Nack)),(0,vr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ku.EndOperation.Reject)),(0,vr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ku.EndOperation.AckAll)),(0,vr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ku.EndOperation.NackAll)),(0,vr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,vr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,vr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,vr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,vr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,vr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,vr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,vr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,vr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,l){if(c==null){let f=(0,_i.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,_i.getConnectionAttributesFromServer)(l);l[_i.CONNECTION_ATTRIBUTES]={...f,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelClosed,void 0);let i=this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,l){let f=this,h=n===Ku.EndOperation.Reject?c:l,y=f[_i.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Ku.EndOperation.Reject&&c){for(let b=0;b<=S;b++)o.endConsumerSpan(y[b].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(a,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let l=this;if(!Object.prototype.hasOwnProperty.call(l,_i.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[_i.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Xo.propagation.extract(Xo.ROOT_CONTEXT,y),b=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=S?Xo.trace.getSpan(S)?.spanContext():void 0;S=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Xo.SpanKind.CONSUMER,attributes:{...l?.connection?.[_i.CONNECTION_ATTRIBUTES],[ql.ATTR_MESSAGING_DESTINATION]:b,[ql.ATTR_MESSAGING_DESTINATION_KIND]:ql.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[ql.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[mvt.ATTR_MESSAGING_OPERATION]:ql.MESSAGING_OPERATION_VALUE_PROCESS,[ql.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[ql.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:D}=r.getConfig();D&&(0,vr.safeExecuteInTheMiddle)(()=>D(x,{moduleVersion:t,msg:h}),Q=>{Q&&Xo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(l[_i.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,L3.hrTime)()}),h[_i.MESSAGE_STORED_SPAN]=x);let w=S||Xo.ROOT_CONTEXT;Xo.context.with(Xo.trace.setSpan(w,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Ku.EndOperation.AutoAck),x.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,l,f){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,l),{publishHook:b}=r.getConfig();b&&(0,vr.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),w=>{w&&Xo.diag.error("amqplib instrumentation: publishHook error",w)},!0);let v=function(w,Q){try{f?.call(this,w,Q)}finally{let{publishConfirmHook:z}=r.getConfig();z&&(0,vr.safeExecuteInTheMiddle)(()=>z(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:l,isConfirmChannel:!0,confirmError:w}),G=>{G&&Xo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),w&&y.setStatus({code:Xo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},x=(0,_i.markConfirmChannelTracing)(Xo.context.active()),D=[...arguments];return D[3]=S,D[4]=Xo.context.bind((0,_i.unmarkConfirmChannelTracing)(Xo.trace.setSpan(x,y)),v),Xo.context.with(x,n.bind(this,...D))}}getPublishPatch(t,n){let r=this;return function(i,a,c,l){if((0,_i.isConfirmChannelTracing)(Xo.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,f,l),{publishHook:S}=r.getConfig();S&&(0,vr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),x=>{x&&Xo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let b=[...arguments];b[3]=y;let v=n.apply(this,b);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,_i.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Xo.SpanKind.PRODUCER,attributes:{...o.connection[_i.CONNECTION_ATTRIBUTES],[ql.ATTR_MESSAGING_DESTINATION]:n,[ql.ATTR_MESSAGING_DESTINATION_KIND]:ql.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[ql.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[ql.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[ql.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},Xo.propagation.inject(Xo.trace.setSpan(Xo.context.active(),c),l.headers),{span:c,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[_i.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Xo.SpanStatusCode.ERROR,message:r!==Ku.EndOperation.ChannelClosed&&r!==Ku.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[_i.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[_i.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[_i.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,vr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Xo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,L3.hrTime)(),r=t[_i.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,L3.hrTimeDuration)(a.timeOfConsume,n);if((0,L3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Ku.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};Q3.AmqplibInstrumentation=DZ});var BPe=F(SE=>{"use strict";A();Object.defineProperty(SE,"__esModule",{value:!0});SE.EndOperation=SE.DEFAULT_CONFIG=SE.AmqplibInstrumentation=void 0;var Avt=xPe();Object.defineProperty(SE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return Avt.AmqplibInstrumentation}});var DPe=vZ();Object.defineProperty(SE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return DPe.DEFAULT_CONFIG}});Object.defineProperty(SE,"EndOperation",{enumerable:!0,get:function(){return DPe.EndOperation}})});var NPe,OPe,gvt,kPe,hvt,wPe,PPe=O(()=>{A();NPe=ae(BPe(),1);hr();OPe="Amqplib",gvt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},kPe=st(OPe,()=>new NPe.AmqplibInstrumentation(gvt)),hvt=(()=>({name:OPe,setupOnce(){kPe()}})),wPe=hvt});var UO,BZ=O(()=>{A();UO="VercelAI"});function Evt(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 yvt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(Svt(t.content),Tvt(t.content))}function Svt(e){for(let t of e){if(!Evt(t))continue;let n=a7(t.toolCallId);n?wl(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}})}):wl(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 Tvt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&s7(t.toolCallId)}function Ivt(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 G3,_vt,MPe,F3,LPe=O(()=>{A();G3=ae(on(),1);dt();BZ();_vt=[">=3.0.0 <7"],MPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];F3=class e extends G3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Xn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new G3.InstrumentationNodeModuleDefinition("ai",_vt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},l=c.isEnabled,f=gt(),h=f?.getIntegrationByName(UO),y=h?.options,S=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:v}=Ivt(y,c,l,S);return a[0].experimental_telemetry={...c,isEnabled:l!==void 0?l:!0,recordInputs:b,recordOutputs:v},pf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Xi(x,"_sentry_active_span",Mc())},()=>{},x=>{yvt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of MPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=MPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function bvt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var UPe,Cvt,QPe,FPe=O(()=>{A();dt();hr();BZ();LPe();UPe=st(UO,()=>new F3({}));Cvt=((e={})=>{let t;return{name:UO,options:e,setupOnce(){t=UPe()},afterAllSetup(n){e.force??bvt(n)?qU(n):t?.callWhenPatched(()=>qU(n))}}}),QPe=Cvt});var j3,vvt,z3,GPe=O(()=>{A();j3=ae(on(),1);dt();vvt=[">=4.0.0 <7"],z3=class extends j3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Xn,t)}init(){return new j3.InstrumentationNodeModuleDefinition("openai",vvt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(eS($_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return KU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var zPe,Rvt,jPe,HPe=O(()=>{A();dt();hr();GPe();zPe=st($_,e=>new z3(e)),Rvt=((e={})=>({name:$_,setupOnce(){zPe(e)}})),jPe=Rvt});var $3,xvt,H3,$Pe=O(()=>{A();$3=ae(on(),1);dt();xvt=[">=0.19.2 <1.0.0"],H3=class extends $3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Xn,t)}init(){return new $3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",xvt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(eS(q_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return JU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var qPe,Dvt,VPe,YPe=O(()=>{A();dt();hr();$Pe();qPe=st(q_,e=>new H3(e)),Dvt=((e={})=>({name:q_,options:e,setupOnce(){qPe(e)}})),VPe=Dvt});var _R,KPe,q3,JPe=O(()=>{A();_R=ae(on(),1);dt();KPe=[">=0.10.0 <2"],q3=class extends _R.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Xn,t)}init(){return new _R.InstrumentationNodeModuleDefinition("@google/genai",KPe,n=>this._patch(n),n=>n,[new _R.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",KPe,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(eS(V_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return ZU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return hN(t,"GoogleGenAI",o),t}}});var ZPe,Bvt,WPe,XPe=O(()=>{A();dt();hr();JPe();ZPe=st(V_,e=>new q3(e)),Bvt=((e={})=>({name:V_,setupOnce(){ZPe(e)}})),WPe=Bvt});function Nvt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function Ovt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let l=c.callbacks,f=Nvt(l,t);return c.callbacks=f,Reflect.apply(r,o,i)}})}var TE,V3,Y3,e2e=O(()=>{A();TE=ae(on(),1);dt();V3=[">=0.1.0 <2.0.0"];Y3=class extends TE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Xn,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 TE.InstrumentationNodeModuleDefinition(r,V3,this._patch.bind(this),o=>o,[new TE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,V3,this._patch.bind(this),o=>o)]));return t.push(new TE.InstrumentationNodeModuleDefinition("langchain",V3,this._patch.bind(this),r=>r,[new TE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",V3,this._patch.bind(this),r=>r)])),t}_patch(t){IV([$_,q_,V_]);let n=tQ(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 a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let l of c){let f=a[l];typeof f=="function"&&(a[l]=Ovt(f,n))}}}});var t2e,kvt,n2e,r2e=O(()=>{A();dt();hr();e2e();t2e=st(WU,e=>new Y3(e)),kvt=((e={})=>({name:WU,setupOnce(){t2e(e)}})),n2e=kvt});var ER,o2e,K3,i2e=O(()=>{A();ER=ae(on(),1);dt();o2e=[">=0.0.0 <2.0.0"],K3=class extends ER.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Xn,t)}init(){return new ER.InstrumentationNodeModuleDefinition("@langchain/langgraph",o2e,this._patch.bind(this),n=>n,[new ER.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",o2e,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&rQ(t.StateGraph.prototype,this.getConfig()),t}}});var a2e,wvt,s2e,u2e=O(()=>{A();dt();hr();i2e();a2e=st(nQ,e=>new K3(e)),wvt=((e={})=>({name:nQ,setupOnce(){a2e(e)}})),s2e=wvt});import*as l2e from"node:net";function d2e(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,zg.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&Nl.error(y?.message)},!0)});let l=new zg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>c2e(h,n,r,e,a)),f=["@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 f)l.files.push(new zg.InstrumentationNodeModuleFile(h,t,y=>c2e(y,n,r,e,a),y=>p2e(y,r)));return l}function c2e(e,t,n,r,o){return p2e(e,n),t(e,"addDoc",Pvt(r,o)),t(e,"getDocs",Lvt(r,o)),t(e,"setDoc",Uvt(r,o)),t(e,"deleteDoc",Mvt(r,o)),e}function p2e(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,zg.isWrapped)(e[n])&&t(e,n);return e}function Pvt(e,t){return function(r){return function(o,i){let a=Z3(e,"addDoc",o);return t(a),J3(a,()=>r(o,i))}}}function Mvt(e,t){return function(r){return function(o){let i=Z3(e,"deleteDoc",o.parent||o);return t(i),J3(i,()=>r(o))}}}function Lvt(e,t){return function(r){return function(o){let i=Z3(e,"getDocs",o);return t(i),J3(i,()=>r(o))}}}function Uvt(e,t){return function(r){return function(o,i,a){let c=Z3(e,"setDoc",o.parent||o);return t(c),J3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function J3(e,t){return Ke.with($t.setSpan(Ke.active(),e),()=>(0,zg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function Z3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:co.CLIENT});return Fvt(r,n),r.setAttribute(iC,t),r}function Qvt(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(l2e.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 Fvt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[V9]:t.path,[Y9]:n.name,[My]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:l}=Qvt(i);c&&(a[n5]=c),l&&(a[r5]=l),e.setAttributes(a)}var zg,f2e=O(()=>{A();ze();zg=ae(on(),1);Wn()});function m2e(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(a=(S,b)=>{(0,jg.safeExecuteInTheMiddle)(()=>f(S,b),v=>{v&&Nl.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,jg.safeExecuteInTheMiddle)(()=>l(S),b=>{b&&Nl.error(b?.message)},!0)});let h=new jg.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:b})=>{h.files.push(new jg.InstrumentationNodeModuleFile(S,t,v=>Gvt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},b),v=>A2e(v,r)))}),h}function Ju(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:co.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),Ke.with($t.setSpan(Ke.active(),y),async()=>{let b,v;try{v=await a.apply(this,f)}catch(x){b=x}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return v})};return c?o.call(this,c,l):o.call(this,l)}}}function Gvt(e,t,n,r,o,i){switch(A2e(e,n),i){case"function":t(e,"onRequest",Ju(r,o,"http.request")),t(e,"onCall",Ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ju(r,o,"storage.object.metadataUpdated"));break}return e}function A2e(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,jg.isWrapped)(e[r])&&t(e,r);return e}var jg,g2e=O(()=>{A();ze();jg=ae(on(),1)});var _2e,h2e,zvt,jvt,W3,E2e=O(()=>{A();_2e=ae(on(),1);dt();f2e();g2e();h2e={},zvt=[">=3.0.0 <5"],jvt=[">=6.0.0 <7"],W3=class extends _2e.InstrumentationBase{constructor(t=h2e){super("@sentry/instrumentation-firebase",Xn,t)}setConfig(t={}){super.setConfig({...h2e,...t})}init(){let t=[];return t.push(d2e(this.tracer,zvt,this._wrap,this._unwrap,this.getConfig())),t.push(m2e(this.tracer,jvt,this._wrap,this._unwrap,this.getConfig())),t}}});var y2e,Hvt,S2e,$vt,T2e,I2e=O(()=>{A();dt();hr();E2e();y2e="Firebase",Hvt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(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 jC(2e3))}}},S2e=st(y2e,()=>new W3(Hvt)),$vt=(()=>({name:y2e,setupOnce(){S2e()}})),T2e=$vt});function b2e(){return[RDe(),sBe(),wBe(),Twe(),SNe(),MNe(),YNe(),aOe(),UOe(),ike(),rwe(),hwe(),Uwe(),Zwe(),dPe(),yPe(),ZBe(),wPe(),uNe(),n2e(),s2e(),QPe(),jPe(),VPe(),WPe(),cke(),T2e()]}var C2e=O(()=>{A();PPe();YPe();Wwe();xDe();lBe();I2e();SPe();XPe();MBe();_we();Iwe();WBe();Qwe();r2e();u2e();cNe();TNe();LNe();KNe();sOe();HPe();ake();lke();owe();QOe();pPe();FPe()});function R2e(e,t={}){e.getOptions().debug&&UY();let[n,r]=qvt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function qvt(e,t={}){let n=new v2e.BasicTracerProvider({sampler:new cF(e),resource:(0,X3.defaultResource)().merge((0,X3.resourceFromAttributes)({[o5]:"node",[q9]:"sentry",[i5]:Xn})),forceFlushTimeoutMillis:500,spanProcessors:[new uF({timeout:Vvt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});$t.setGlobalTracerProvider(n),tf.setGlobalPropagator(new sF);let r=new dF;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Vvt(e){if(e!=null){if(e>NZ)return ba&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${NZ}`),NZ;if(e<=0||Number.isNaN(e)){ba&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var X3,v2e,NZ,x2e=O(()=>{A();ze();X3=ae(Z7(),1),v2e=ae(IY(),1);Wn();dt();hr();Sv();hS();NZ=1e6});function D2e(){return _F().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(rDe(),pDe())}function B2e(e){return[...D2e(),...wi(e)?b2e():[]]}function OZ(e={}){return Yvt(e,B2e)}function Yvt(e={},t){tS(e,"node");let n=lK({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(R2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),EF()),n}var N2e=O(()=>{A();dt();hr();oDe();fDe();C2e();x2e()});var yR=O(()=>{A();N2e();dt();hr()});function Zr(){return Kvt}function cu(){return O2e}function k2e(){return Jvt}var Kvt,O2e,Jvt,qc=O(()=>{"use strict";A();Kvt="prod",O2e="0.1.161",Jvt=`@tanagram/lore/${O2e}`});function tRt(e=""){if(!Xvt.test(e))return e!==e.toLowerCase()}function w2e(e,t){let n=t??eRt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let l=n.includes(c);if(l===!0){r.push(o),o="",i=void 0;continue}let f=tRt(c);if(a===!1){if(i===!1&&f===!0){r.push(o),o=c,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=f;continue}}o+=c,i=f,a=l}return r.push(o),r}function nRt(e){return e?e[0].toUpperCase()+e.slice(1):""}function rRt(e){return e?e[0].toLowerCase()+e.slice(1):""}function oRt(e,t){return e?(Array.isArray(e)?e:w2e(e)).map(n=>nRt(t?.normalize?n.toLowerCase():n)).join(""):""}function FO(e,t){return rRt(oRt(e||"",t))}function e6(e,t){return e?(Array.isArray(e)?e:w2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function P2e(e){return e6(e||"","_")}var Xvt,eRt,M2e=O(()=>{A();Xvt=/\d/,eRt=["-","_","/","."]});import{parseArgs as iRt}from"node:util";function o6(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function kZ(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 dJ(e,t,n,r=void 0){n&&(0,lO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&INe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function mTt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(dJ(t,o,n,r),o)).catch(o=>{throw bNe(t,o),o}).finally(()=>t.end()):(dJ(t,e,n,r),t.end(),e)}rE.handlePromiseResponse=mTt;function ATt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(l,f)=>(l?bNe(r,l):dJ(r,f,i,a),r.end(),e(l,f)),t.apply(n,o)}rE.handleCallbackResponse=ATt});var vNe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var NNe=F(zc=>{"use strict";A();Object.defineProperty(zc,"__esModule",{value:!0});zc.MongooseInstrumentation=zc._ALREADY_INSTRUMENTED=zc._STORED_PARENT_SPAN=void 0;var va=(ze(),Me(We)),gTt=br(),pJ=CNe(),Os=on(),RNe=vNe(),oE=lJ(),bS=(Wn(),Me(Fr)),C4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],hTt=["remove","count","findOneAndRemove",...C4],_Tt=["count","findOneAndRemove",...C4],ETt=[...C4];function xNe(e){return e?e.startsWith("6.")||e.startsWith("5.")?hTt:e.startsWith("7.")?_Tt:ETt:C4}function DNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function BNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}zc._STORED_PARENT_SPAN=Symbol("stored-parent-span");zc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var fJ=class extends Os.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(RNe.PACKAGE_NAME,RNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Os.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Os.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Os.InstrumentationNodeModuleDefinition("mongoose",[">=5.9.7 <10"],this.patch.bind(this),this.unpatch.bind(this))}patch(t,n){let r=t[Symbol.toStringTag]==="Module"?t.default:t;return this._wrap(r.Model.prototype,"save",this.patchOnModelMethods("save",n)),r.Model.prototype.$save=r.Model.prototype.save,DNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),BNe(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)),xNe(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=xNe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,DNe(n)&&this._unwrap(r.Model.prototype,"remove"),BNe(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&&va.trace.getSpan(va.context.active())===void 0)return r.apply(this,arguments);let a=this[zc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Os.SemconvStability.OLD&&(c[oE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[zc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return r.apply(this,arguments);let a=this[zc._STORED_PARENT_SPAN],c={},{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&Os.SemconvStability.OLD&&(c[oE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Os.SemconvStability.STABLE&&(c[bS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);let l={document:this};a&&!(a instanceof Function)&&(l.options=a);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Os.SemconvStability.OLD&&(f[oE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Os.SemconvStability.STABLE&&(f[bS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return a instanceof Function&&(c=a,a=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(a,c,l){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);let f=l,h=a,y=c;typeof a=="function"?(f=a,h=void 0,y=void 0):typeof c=="function"&&(f=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let D=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Os.SemconvStability.OLD&&(S[oE.ATTR_DB_STATEMENT]=D),r._dbSemconvStability&Os.SemconvStability.STABLE&&(S[bS.ATTR_DB_QUERY_TEXT]=D)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),x=r._handleResponse(v,o,this,arguments,f,n);return x&&typeof x=="object"&&(x[zc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(a,c,l){if(r.getConfig().requireParentSpan&&va.trace.getSpan(va.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(l=c,c=void 0);let f={};switch(t){case"insertMany":f.documents=a;break;case"bulkWrite":f.operations=a;break;default:f.document=a;break}c!==void 0&&(f.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,f);r._dbSemconvStability&Os.SemconvStability.OLD&&(h[oE.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Os.SemconvStability.STABLE&&(h[bS.ATTR_DB_QUERY_TEXT]=b)}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=va.trace.getSpan(va.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[zc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[zc._STORED_PARENT_SPAN]=va.trace.getSpan(va.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,pJ.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Os.SemconvStability.OLD&&(a[oE.ATTR_DB_OPERATION]=r,a[oE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Os.SemconvStability.STABLE&&(a[bS.ATTR_DB_OPERATION_NAME]=r,a[bS.ATTR_DB_SYSTEM_NAME]=oE.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Os.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:va.SpanKind.CLIENT,attributes:a},i?va.trace.setSpan(va.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,pJ.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let l=c._callOriginalFunction(()=>n.apply(r,o));return(0,pJ.handlePromiseResponse)(l,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?va.context.with((0,gTt.suppressTracing)(va.context.active()),t):t()}};zc.MongooseInstrumentation=fJ});var ONe=F(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.MongooseInstrumentation=void 0;var yTt=NNe();Object.defineProperty(v4,"MongooseInstrumentation",{enumerable:!0,get:function(){return yTt.MongooseInstrumentation}})});var kNe,wNe,PNe,STt,MNe,LNe=O(()=>{A();kNe=ae(ONe(),1);hr();wNe="Mongoose",PNe=st(wNe,()=>new kNe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),STt=(()=>({name:wNe,setupOnce(){PNe()}})),MNe=STt});var UNe=F(ia=>{"use strict";A();Object.defineProperty(ia,"__esModule",{value:!0});ia.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ia.DB_SYSTEM_VALUE_MYSQL=ia.ATTR_NET_PEER_PORT=ia.ATTR_NET_PEER_NAME=ia.ATTR_DB_USER=ia.ATTR_DB_SYSTEM=ia.ATTR_DB_STATEMENT=ia.ATTR_DB_NAME=ia.ATTR_DB_CONNECTION_STRING=void 0;ia.ATTR_DB_CONNECTION_STRING="db.connection_string";ia.ATTR_DB_NAME="db.name";ia.ATTR_DB_STATEMENT="db.statement";ia.ATTR_DB_SYSTEM="db.system";ia.ATTR_DB_USER="db.user";ia.ATTR_NET_PEER_NAME="net.peer.name";ia.ATTR_NET_PEER_PORT="net.peer.port";ia.DB_SYSTEM_VALUE_MYSQL="mysql";ia.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var QNe=F(dO=>{"use strict";A();Object.defineProperty(dO,"__esModule",{value:!0});dO.AttributeNames=void 0;var TTt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(TTt=dO.AttributeNames||(dO.AttributeNames={}))});var FNe=F(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.getPoolNameOld=au.arrayStringifyHelper=au.getSpanName=au.getDbValues=au.getDbQueryText=au.getJDBCString=au.getConfig=void 0;function ITt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}au.getConfig=ITt;function bTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}au.getJDBCString=bTt;function CTt(e){return typeof e=="string"?e:e.sql}au.getDbQueryText=CTt;function vTt(e,t){return mJ(typeof e=="string"?t:t||e.values)}au.getDbValues=vTt;function RTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}au.getSpanName=RTt;function mJ(e){return e?`[${e.toString()}]`:""}au.arrayStringifyHelper=mJ;function xTt(e){let t=e.config.connectionConfig,n="";return n+=t.host?`host: '${t.host}', `:"",n+=t.port?`port: ${t.port}, `:"",n+=t.database?`database: '${t.database}', `:"",n+=t.user?`user: '${t.user}'`:"",t.user||(n=n.substring(0,n.length-2)),n.trim()}au.getPoolNameOld=xTt});var GNe=F(Hv=>{"use strict";A();Object.defineProperty(Hv,"__esModule",{value:!0});Hv.PACKAGE_NAME=Hv.PACKAGE_VERSION=void 0;Hv.PACKAGE_VERSION="0.60.0";Hv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var jNe=F(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.MySQLInstrumentation=void 0;var jc=(ze(),Me(We)),Zd=on(),$v=(Wn(),Me(Fr)),Fg=UNe(),DTt=QNe(),CS=FNe(),zNe=GNe(),AJ=class extends Zd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(zNe.PACKAGE_NAME,zNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Zd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Zd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Fg.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 Zd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Zd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Zd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Zd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,l=a-c,f=(0,CS.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-c,f,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=c[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof a=="function"){let l=r._getConnectionCallbackPatchFn(a);return n.call(t,i,l)}if(arguments.length===3&&typeof c=="function"){let l=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=jc.context.active();return function(o,i){i&&((0,Zd.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,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:l,port:f,database:h,user:y}=(0,CS.getConfig)(t.config),S=parseInt(f,10),b=(0,CS.getDbQueryText)(o);r._dbSemconvStability&Zd.SemconvStability.OLD&&(c[Fg.ATTR_DB_SYSTEM]=Fg.DB_SYSTEM_VALUE_MYSQL,c[Fg.ATTR_DB_CONNECTION_STRING]=(0,CS.getJDBCString)(l,f,h),c[Fg.ATTR_DB_NAME]=h,c[Fg.ATTR_DB_USER]=y,c[Fg.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Zd.SemconvStability.STABLE&&(c[$v.ATTR_DB_SYSTEM_NAME]=$v.DB_SYSTEM_NAME_VALUE_MYSQL,c[$v.ATTR_DB_NAMESPACE]=h,c[$v.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&Zd.SemconvStability.OLD&&(c[Fg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(c[Fg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Zd.SemconvStability.STABLE&&(c[$v.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(c[$v.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,CS.getSpanName)(o),{kind:jc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let w;Array.isArray(i)?w=i:arguments[2]&&(w=[i]),v.setAttribute(DTt.AttributeNames.MYSQL_VALUES,(0,CS.getDbValues)(o,w))}let x=Array.from(arguments).findIndex(w=>typeof w=="function"),D=jc.context.active();if(x===-1){let w=jc.context.with(jc.trace.setSpan(jc.context.active(),v),()=>n.apply(t,arguments));return jc.context.bind(D,w),w.on("error",Q=>v.setStatus({code:jc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,D)),jc.context.with(jc.trace.setSpan(jc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){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,CS.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")})}};R4.MySQLInstrumentation=AJ});var HNe=F(x4=>{"use strict";A();Object.defineProperty(x4,"__esModule",{value:!0});x4.MySQLInstrumentation=void 0;var BTt=jNe();Object.defineProperty(x4,"MySQLInstrumentation",{enumerable:!0,get:function(){return BTt.MySQLInstrumentation}})});var $Ne,qNe,VNe,NTt,YNe,KNe=O(()=>{A();$Ne=ae(HNe(),1);hr();qNe="Mysql",VNe=st(qNe,()=>new $Ne.MySQLInstrumentation({})),NTt=(()=>({name:qNe,setupOnce(){VNe()}})),YNe=NTt});var gJ=F(ns=>{"use strict";A();Object.defineProperty(ns,"__esModule",{value:!0});ns.DB_SYSTEM_VALUE_MYSQL=ns.ATTR_NET_PEER_PORT=ns.ATTR_NET_PEER_NAME=ns.ATTR_DB_USER=ns.ATTR_DB_SYSTEM=ns.ATTR_DB_STATEMENT=ns.ATTR_DB_NAME=ns.ATTR_DB_CONNECTION_STRING=void 0;ns.ATTR_DB_CONNECTION_STRING="db.connection_string";ns.ATTR_DB_NAME="db.name";ns.ATTR_DB_STATEMENT="db.statement";ns.ATTR_DB_SYSTEM="db.system";ns.ATTR_DB_USER="db.user";ns.ATTR_NET_PEER_NAME="net.peer.name";ns.ATTR_NET_PEER_PORT="net.peer.port";ns.DB_SYSTEM_VALUE_MYSQL="mysql"});var _J=F(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.addSqlCommenterComment=void 0;var hJ=(ze(),Me(We)),OTt=br();function kTt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function wTt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function PTt(e,t){if(typeof t!="string"||t.length===0||kTt(t))return t;let n=new OTt.W3CTraceContextPropagator,r={};n.inject(hJ.trace.setSpan(hJ.ROOT_CONTEXT,e),r,hJ.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=wTt(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}D4.addSqlCommenterComment=PTt});var JNe=F(Wd=>{"use strict";A();Object.defineProperty(Wd,"__esModule",{value:!0});Wd.getConnectionPrototypeToInstrument=Wd.once=Wd.getSpanName=Wd.getQueryText=Wd.getConnectionAttributes=void 0;var pO=gJ(),B4=on(),EJ=(Wn(),Me(Fr));function MTt(e,t,n){let{host:r,port:o,database:i,user:a}=LTt(e),c={};t&B4.SemconvStability.OLD&&(c[pO.ATTR_DB_CONNECTION_STRING]=UTt(r,o,i),c[pO.ATTR_DB_NAME]=i,c[pO.ATTR_DB_USER]=a),t&B4.SemconvStability.STABLE&&(c[EJ.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&B4.SemconvStability.OLD&&(c[pO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(c[pO.ATTR_NET_PEER_PORT]=l)),n&B4.SemconvStability.STABLE&&(c[EJ.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(c[EJ.ATTR_SERVER_PORT]=l)),c}Wd.getConnectionAttributes=MTt;function LTt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function UTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function QTt(e,t,n,r=!1,o=FTt){let[i,a]=typeof e=="string"?[e,n]:[e.sql,GTt(e)?n||e.values:n];try{return r?o(i):t&&a?t(i,a):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Wd.getQueryText=QTt;function FTt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function GTt(e){return"values"in e}function zTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Wd.getSpanName=zTt;var jTt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wd.once=jTt;function HTt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Wd.getConnectionPrototypeToInstrument=HTt});var ZNe=F(qv=>{"use strict";A();Object.defineProperty(qv,"__esModule",{value:!0});qv.PACKAGE_NAME=qv.PACKAGE_VERSION=void 0;qv.PACKAGE_VERSION="0.60.0";qv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var tOe=F(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.MySQL2Instrumentation=void 0;var WNe=(ze(),Me(We)),gf=on(),yJ=gJ(),XNe=_J(),Vv=JNe(),eOe=ZNe(),SJ=(Wn(),Me(Fr)),TJ=[">=1.4.2 <4"],IJ=class extends gf.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(eOe.PACKAGE_NAME,eOe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,gf.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,gf.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,gf.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,gf.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 gf.InstrumentationNodeModuleDefinition("mysql2",TJ,i=>(n(i),i),()=>{},[new gf.InstrumentationNodeModuleFile("mysql2/promise.js",TJ,i=>(n(i),i),()=>{}),new gf.InstrumentationNodeModuleFile("mysql2/lib/connection.js",TJ,i=>{let a=(0,Vv.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,Vv.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let l;Array.isArray(a)?l=a:arguments[2]&&(l=[a]);let{maskStatement:f,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,Vv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,Vv.getQueryText)(i,t,l,f,h);o._dbSemconvStability&gf.SemconvStability.OLD&&(S[yJ.ATTR_DB_SYSTEM]=yJ.DB_SYSTEM_VALUE_MYSQL,S[yJ.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&gf.SemconvStability.STABLE&&(S[SJ.ATTR_DB_SYSTEM_NAME]=SJ.DB_SYSTEM_NAME_VALUE_MYSQL,S[SJ.ATTR_DB_QUERY_TEXT]=b);let v=o.tracer.startSpan((0,Vv.getSpanName)(i),{kind:WNe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,XNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,XNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,Vv.once)((D,w)=>{D?v.setStatus({code:WNe.SpanStatusCode.ERROR,message:D.message}):typeof y=="function"&&(0,gf.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:w})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let D=r.apply(this,arguments);return D.once("error",w=>{x(w)}).once("result",w=>{x(void 0,w)}),D}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};N4.MySQL2Instrumentation=IJ});var nOe=F(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.MySQL2Instrumentation=void 0;var $Tt=tOe();Object.defineProperty(O4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return $Tt.MySQL2Instrumentation}})});var rOe,oOe,iOe,qTt,aOe,sOe=O(()=>{A();rOe=ae(nOe(),1);hr();oOe="Mysql2",iOe=st(oOe,()=>new rOe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),qTt=(()=>({name:oOe,setupOnce(){iOe()}})),aOe=qTt});var uOe=F(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.DB_SYSTEM_VALUE_REDIS=su.DB_SYSTEM_NAME_VALUE_REDIS=su.ATTR_NET_PEER_PORT=su.ATTR_NET_PEER_NAME=su.ATTR_DB_SYSTEM=su.ATTR_DB_STATEMENT=su.ATTR_DB_CONNECTION_STRING=void 0;su.ATTR_DB_CONNECTION_STRING="db.connection_string";su.ATTR_DB_STATEMENT="db.statement";su.ATTR_DB_SYSTEM="db.system";su.ATTR_NET_PEER_NAME="net.peer.name";su.ATTR_NET_PEER_PORT="net.peer.port";su.DB_SYSTEM_NAME_VALUE_REDIS="redis";su.DB_SYSTEM_VALUE_REDIS="redis"});var cOe=F(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.endSpan=void 0;var VTt=(ze(),Me(We)),YTt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:VTt.SpanStatusCode.ERROR,message:t.message})),e.end()};k4.endSpan=YTt});var P4=F(w4=>{"use strict";A();Object.defineProperty(w4,"__esModule",{value:!0});w4.defaultDbStatementSerializer=void 0;var KTt=[{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}],JTt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=KTt.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};w4.defaultDbStatementSerializer=JTt});var lOe=F(Yv=>{"use strict";A();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var mOe=F(M4=>{"use strict";A();Object.defineProperty(M4,"__esModule",{value:!0});M4.IORedisInstrumentation=void 0;var iE=(ze(),Me(We)),Hc=on(),aE=(Wn(),Me(Fr)),$c=uOe(),dOe=on(),fO=cOe(),ZTt=P4(),pOe=lOe(),fOe={requireParentSpan:!0},bJ=class extends Hc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(pOe.PACKAGE_NAME,pOe.PACKAGE_VERSION,{...fOe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Hc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Hc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...fOe,...t})}init(){return[new Hc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Hc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Hc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),a=i.dbStatementSerializer||ZTt.defaultDbStatementSerializer,c=iE.trace.getSpan(iE.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&Hc.SemconvStability.OLD&&(l[$c.ATTR_DB_SYSTEM]=$c.DB_SYSTEM_VALUE_REDIS,l[$c.ATTR_DB_STATEMENT]=y,l[$c.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&Hc.SemconvStability.STABLE&&(l[aE.ATTR_DB_SYSTEM_NAME]=$c.DB_SYSTEM_NAME_VALUE_REDIS,l[aE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Hc.SemconvStability.OLD&&(l[$c.ATTR_NET_PEER_NAME]=f,l[$c.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Hc.SemconvStability.STABLE&&(l[aE.ATTR_SERVER_ADDRESS]=f,l[aE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:iE.SpanKind.CLIENT,attributes:l}),{requestHook:b}=i;b&&(0,dOe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&iE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(w){(0,dOe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,w),Q=>{Q&&iE.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,fO.endSpan)(S,null),x(w)};let D=o.reject;return o.reject=function(w){(0,fO.endSpan)(S,w),D(w)},v}catch(v){throw(0,fO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=iE.trace.getSpan(iE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:a}=this.options;n._dbSemconvStability&Hc.SemconvStability.OLD&&(o[$c.ATTR_DB_SYSTEM]=$c.DB_SYSTEM_VALUE_REDIS,o[$c.ATTR_DB_STATEMENT]="connect",o[$c.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Hc.SemconvStability.STABLE&&(o[aE.ATTR_DB_SYSTEM_NAME]=$c.DB_SYSTEM_NAME_VALUE_REDIS,o[aE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Hc.SemconvStability.OLD&&(o[$c.ATTR_NET_PEER_NAME]=i,o[$c.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Hc.SemconvStability.STABLE&&(o[aE.ATTR_SERVER_ADDRESS]=i,o[aE.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:iE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,fO.endSpan)(c,null),l}catch(l){throw(0,fO.endSpan)(c,l),l}}}};M4.IORedisInstrumentation=bJ});var AOe=F(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.IORedisInstrumentation=void 0;var WTt=mOe();Object.defineProperty(L4,"IORedisInstrumentation",{enumerable:!0,get:function(){return WTt.IORedisInstrumentation}})});var U4=F(Kv=>{"use strict";A();Object.defineProperty(Kv,"__esModule",{value:!0});Kv.PACKAGE_NAME=Kv.PACKAGE_VERSION=void 0;Kv.PACKAGE_VERSION="0.62.0";Kv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var gOe=F(sE=>{"use strict";A();Object.defineProperty(sE,"__esModule",{value:!0});sE.getTracedCreateStreamTrace=sE.getTracedCreateClient=sE.endSpan=void 0;var mO=(ze(),Me(We)),XTt=(e,t)=>{t&&e.setStatus({code:mO.SpanStatusCode.ERROR,message:t.message}),e.end()};sE.endSpan=XTt;var eIt=e=>function(){let n=e.apply(this,arguments);return mO.context.bind(mO.context.active(),n)};sE.getTracedCreateClient=eIt;var tIt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){mO.context.bind(mO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};sE.getTracedCreateStreamTrace=tIt});var Q4=F(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var _Oe=F(G4=>{"use strict";A();Object.defineProperty(G4,"__esModule",{value:!0});G4.RedisInstrumentationV2_V3=void 0;var Hl=on(),F4=gOe(),hOe=U4(),AO=(ze(),Me(We)),gO=(Wn(),Me(Fr)),vS=Q4(),nIt=P4(),CJ=class e extends Hl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(hOe.PACKAGE_NAME,hOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Hl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Hl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Hl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,Hl.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,Hl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,Hl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let a=t.getConfig(),c=AO.trace.getSpan(AO.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let l=a?.dbStatementSerializer||nIt.defaultDbStatementSerializer,f={};t._semconvStability&Hl.SemconvStability.OLD&&Object.assign(f,{[vS.ATTR_DB_SYSTEM]:vS.DB_SYSTEM_VALUE_REDIS,[vS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&Hl.SemconvStability.STABLE&&Object.assign(f,{[gO.ATTR_DB_SYSTEM_NAME]:vS.DB_SYSTEM_NAME_VALUE_REDIS,[gO.ATTR_DB_OPERATION_NAME]:i.command,[gO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:AO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let S={};t._semconvStability&Hl.SemconvStability.OLD&&Object.assign(S,{[vS.ATTR_NET_PEER_NAME]:this.connection_options.host,[vS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&Hl.SemconvStability.STABLE&&Object.assign(S,{[gO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[gO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&Hl.SemconvStability.OLD&&h.setAttribute(vS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=AO.context.active();arguments[0].callback=function(v,x){if(a?.responseHook){let D=a.responseHook;(0,Hl.safeExecuteInTheMiddle)(()=>{D(h,i.command,i.args,x)},w=>{w&&t._diag.error("Error executing responseHook",w)},!0)}return(0,F4.endSpan)(h,v),AO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,F4.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,F4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,F4.getTracedCreateStreamTrace)(n)}}};G4.RedisInstrumentationV2_V3=CJ});var yOe=F(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.getClientAttributes=void 0;var vJ=(Wn(),Me(Fr)),Jv=Q4(),EOe=on();function rIt(e,t,n){let r={};return n&EOe.SemconvStability.OLD&&Object.assign(r,{[Jv.ATTR_DB_SYSTEM]:Jv.DB_SYSTEM_VALUE_REDIS,[Jv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Jv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Jv.ATTR_DB_CONNECTION_STRING]:oIt(e,t?.url)}),n&EOe.SemconvStability.STABLE&&Object.assign(r,{[vJ.ATTR_DB_SYSTEM_NAME]:Jv.DB_SYSTEM_NAME_VALUE_REDIS,[vJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[vJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}z4.getClientAttributes=rIt;function oIt(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 bOe=F(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.RedisInstrumentationV4_V5=void 0;var Xd=(ze(),Me(We)),Io=on(),SOe=yOe(),iIt=P4(),TOe=U4(),RJ=(Wn(),Me(Fr)),aIt=Q4(),hO=Symbol("opentelemetry.instrumentation.redis.open_spans"),IOe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),xJ=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.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 Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(c)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,Io.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,Io.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,Io.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,Io.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,Io.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand"),this._wrap(a,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(a,"connect",this._getPatchedClientConnect()),i},i=>{let a=i?.default?.prototype;(0,Io.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,Io.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,Io.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let l=this[hO];return n._endSpansWithRedisReplies(l,c,t),c}).catch(c=>{let l=this[hO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=c.constructor.name==="MultiErrorReply"?c.replies:new Array(l.length).fill(c);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[IOe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,a=(0,SOe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Xd.SpanKind.CLIENT,attributes:a});return Xd.context.with(Xd.trace.setSpan(Xd.context.active(),c),()=>r.apply(this)).then(f=>(c.end(),f)).catch(f=>(c.recordException(f),c.setStatus({code:Xd.SpanStatusCode.ERROR,message:f.message}),c.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(Xd.trace.getSpan(Xd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[IOe],c=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||iIt.defaultDbStatementSerializer,h=(0,SOe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[RJ.ATTR_DB_OPERATION_NAME]=c);try{let b=f(c,l);b!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[aIt.ATTR_DB_STATEMENT]=b),this._semconvStability&Io.SemconvStability.STABLE&&(h[RJ.ATTR_DB_QUERY_TEXT]=b))}catch(b){this._diag.error("dbStatementSerializer throw an exception",b,{commandName:c})}let y=this.tracer.startSpan(`${e.COMPONENT}-${c}`,{kind:Xd.SpanKind.CLIENT,attributes:h}),S=Xd.context.with(Xd.trace.setSpan(Xd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,l,b,void 0)},b=>{this._endSpanWithResponse(y,c,l,null,b)});else{let b=S;b[hO]=b[hO]||[],b[hO].push({span:y,commandName:c,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(c=>c.commandName),a=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:l,commandArgs:f}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(RJ.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(l,o[c],f,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:a}=this.getConfig();if(!i&&a)try{a(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Xd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};j4.RedisInstrumentationV4_V5=xJ});var ROe=F(H4=>{"use strict";A();Object.defineProperty(H4,"__esModule",{value:!0});H4.RedisInstrumentation=void 0;var sIt=on(),COe=U4(),uIt=_Oe(),cIt=bOe(),vOe={requireParentSpan:!1},DJ=class extends sIt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...vOe,...t};super(COe.PACKAGE_NAME,COe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new uIt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new cIt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...vOe,...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())}};H4.RedisInstrumentation=DJ});var xOe=F($4=>{"use strict";A();Object.defineProperty($4,"__esModule",{value:!0});$4.RedisInstrumentation=void 0;var lIt=ROe();Object.defineProperty($4,"RedisInstrumentation",{enumerable:!0,get:function(){return lIt.RedisInstrumentation}})});function _O(e,t){return e.includes(t.toLowerCase())}function NJ(e){return _O(BJ,e)?"cache.get":_O(pIt,e)?"cache.put":void 0}function fIt(e,t){return t.some(n=>e.startsWith(n))}function BOe(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)?DOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return _O(dIt,e)&&r!=null?n(r):DOe(t.map(o=>n(o)))}catch{return}}function NOe(e,t,n){if(!NJ(e))return!1;for(let r of t)if(fIt(r,n))return!0;return!1}function OOe(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 DOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var dIt,BJ,pIt,kOe=O(()=>{A();dIt=["get","set","setex"],BJ=["get","mget"],pIt=["set","setex"]});var wOe,POe,q4,EO,MOe,mIt,AIt,LOe,gIt,UOe,QOe=O(()=>{A();wOe=ae(AOe(),1),POe=ae(xOe(),1);dt();hr();kOe();q4="Redis",EO={},MOe=(e,t,n,r)=>{e.setAttribute(wt,"auto.db.otel.redis");let o=BOe(t,n),i=NJ(t);if(!o||!i||!EO.cachePrefixes||!NOe(t,o,EO.cachePrefixes))return;let a=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let l=OOe(r);l&&e.setAttribute(Pq,l),_O(BJ,t)&&l!==void 0&&e.setAttribute(kq,l>0),e.setAttributes({[Xt]:i,[wq]:o});let f=o.join(", ");e.updateName(EO.maxCacheKeyLength?T_(f,EO.maxCacheKeyLength):f)},mIt=st(`${q4}.IORedis`,()=>new wOe.IORedisInstrumentation({responseHook:MOe})),AIt=st(`${q4}.Redis`,()=>new POe.RedisInstrumentation({responseHook:MOe})),LOe=Object.assign(()=>{mIt(),AIt()},{id:q4}),gIt=((e={})=>({name:q4,setupOnce(){EO=e,LOe()}})),UOe=gIt});var FOe=F(V4=>{"use strict";A();Object.defineProperty(V4,"__esModule",{value:!0});V4.EVENT_LISTENERS_SET=void 0;V4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var OJ=F(yO=>{"use strict";A();Object.defineProperty(yO,"__esModule",{value:!0});yO.AttributeNames=void 0;var hIt;(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"})(hIt=yO.AttributeNames||(yO.AttributeNames={}))});var kJ=F(Nr=>{"use strict";A();Object.defineProperty(Nr,"__esModule",{value:!0});Nr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Nr.METRIC_DB_CLIENT_CONNECTION_COUNT=Nr.DB_SYSTEM_VALUE_POSTGRESQL=Nr.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Nr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Nr.ATTR_NET_PEER_PORT=Nr.ATTR_NET_PEER_NAME=Nr.ATTR_DB_USER=Nr.ATTR_DB_SYSTEM=Nr.ATTR_DB_STATEMENT=Nr.ATTR_DB_NAME=Nr.ATTR_DB_CONNECTION_STRING=Nr.ATTR_DB_CLIENT_CONNECTION_STATE=Nr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Nr.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Nr.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Nr.ATTR_DB_CONNECTION_STRING="db.connection_string";Nr.ATTR_DB_NAME="db.name";Nr.ATTR_DB_STATEMENT="db.statement";Nr.ATTR_DB_SYSTEM="db.system";Nr.ATTR_DB_USER="db.user";Nr.ATTR_NET_PEER_NAME="net.peer.name";Nr.ATTR_NET_PEER_PORT="net.peer.port";Nr.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Nr.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Nr.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Nr.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Nr.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var wJ=F(SO=>{"use strict";A();Object.defineProperty(SO,"__esModule",{value:!0});SO.SpanNames=void 0;var _It;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(_It=SO.SpanNames||(SO.SpanNames={}))});var VOe=F(ir=>{"use strict";A();Object.defineProperty(ir,"__esModule",{value:!0});ir.sanitizedErrorMessage=ir.isObjectWithTextString=ir.getErrorMessage=ir.patchClientConnectCallback=ir.patchCallbackPGPool=ir.updateCounter=ir.getPoolName=ir.patchCallback=ir.handleExecutionResult=ir.handleConfigQuery=ir.shouldSkipInstrumentation=ir.getSemanticAttributesFromPoolConnection=ir.getSemanticAttributesFromConnection=ir.getConnectionString=ir.parseAndMaskConnectionString=ir.parseNormalizedOperationName=ir.getQuerySpanName=void 0;var uE=(ze(),Me(We)),Y4=OJ(),ep=(Wn(),Me(Fr)),Ai=kJ(),RS=on(),GOe=wJ();function zOe(e,t){if(!t)return GOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:jOe(t.text);return`${GOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ir.getQuerySpanName=zOe;function jOe(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}ir.parseNormalizedOperationName=jOe;function HOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ir.parseAndMaskConnectionString=HOe;function PJ(e){if("connectionString"in e&&e.connectionString)return HOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ir.getConnectionString=PJ;function K4(e){if(Number.isInteger(e))return e}function $Oe(e,t){let n={};return t&RS.SemconvStability.OLD&&(n={...n,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:e.database,[Ai.ATTR_DB_CONNECTION_STRING]:PJ(e),[Ai.ATTR_DB_USER]:e.user,[Ai.ATTR_NET_PEER_NAME]:e.host,[Ai.ATTR_NET_PEER_PORT]:K4(e.port)}),t&RS.SemconvStability.STABLE&&(n={...n,[ep.ATTR_DB_SYSTEM_NAME]:ep.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ep.ATTR_DB_NAMESPACE]:e.namespace,[ep.ATTR_SERVER_ADDRESS]:e.host,[ep.ATTR_SERVER_PORT]:K4(e.port)}),n}ir.getSemanticAttributesFromConnection=$Oe;function EIt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[Y4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[Y4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&RS.SemconvStability.OLD&&(r={...r,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ai.ATTR_DB_CONNECTION_STRING]:PJ(e),[Ai.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ai.ATTR_NET_PEER_PORT]:Number(n?.port)||K4(e.port),[Ai.ATTR_DB_USER]:n?.username??e.user}),t&RS.SemconvStability.STABLE&&(r={...r,[ep.ATTR_DB_SYSTEM_NAME]:ep.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[ep.ATTR_DB_NAMESPACE]:e.namespace,[ep.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[ep.ATTR_SERVER_PORT]:Number(n?.port)||K4(e.port)}),r}ir.getSemanticAttributesFromPoolConnection=EIt;function yIt(e){return e.requireParentSpan===!0&&uE.trace.getSpan(uE.context.active())===void 0}ir.shouldSkipInstrumentation=yIt;function SIt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=zOe(i,r),c=e.startSpan(a,{kind:uE.SpanKind.CLIENT,attributes:$Oe(o,n)});if(!r)return c;if(r.text&&(n&RS.SemconvStability.OLD&&c.setAttribute(Ai.ATTR_DB_STATEMENT,r.text),n&RS.SemconvStability.STABLE&&c.setAttribute(ep.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());c.setAttribute(Y4.AttributeNames.PG_VALUES,l)}catch(l){uE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&c.setAttribute(Y4.AttributeNames.PG_PLAN,r.name),c}ir.handleConfigQuery=SIt;function qOe(e,t,n){typeof e.responseHook=="function"&&(0,RS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&uE.diag.error("Error running response hook",r)},!0)}ir.handleExecutionResult=qOe;function TIt(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[ep.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(J4(a)),t.setStatus({code:uE.SpanStatusCode.ERROR,message:a.message})):qOe(e,t,c),o(),t.end(),n.call(this,a,c)}}ir.patchCallback=TIt;function IIt(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()}ir.getPoolName=IIt;function bIt(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,l=i-c;return n.add(l-o.used,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:c,pending:a}}ir.updateCounter=bIt;function CIt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(J4(r)),e.setStatus({code:uE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ir.patchCallbackPGPool=CIt;function vIt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(J4(r)),e.setStatus({code:uE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ir.patchClientConnectCallback=vIt;function RIt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ir.getErrorMessage=RIt;function xIt(e){return typeof e=="object"&&typeof e?.text=="string"}ir.isObjectWithTextString=xIt;function J4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ir.sanitizedErrorMessage=J4});var YOe=F(Zv=>{"use strict";A();Object.defineProperty(Zv,"__esModule",{value:!0});Zv.PACKAGE_NAME=Zv.PACKAGE_VERSION=void 0;Zv.PACKAGE_VERSION="0.66.0";Zv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var eke=F(W4=>{"use strict";A();Object.defineProperty(W4,"__esModule",{value:!0});W4.PgInstrumentation=void 0;var qu=on(),Hr=(ze(),Me(We)),KOe=FOe(),Wo=VOe(),JOe=_J(),ZOe=YOe(),WOe=wJ(),Z4=br(),hf=(Wn(),Me(Fr)),TO=kJ();function Wv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var MJ=class extends qu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(ZOe.PACKAGE_NAME,ZOe.PACKAGE_VERSION,t),this._semconvStability=(0,qu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(hf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Hr.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(TO.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(TO.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 qu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new qu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new qu.InstrumentationNodeModuleDefinition("pg",t,c=>{let l=Wv(c);return this._patchPgClient(l.Client),c},c=>{let l=Wv(c);return this._unpatchPgClient(l.Client),c},[o,r]),a=new qu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let l=Wv(c);return(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},c=>{let l=Wv(c);(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Wv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.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=Wv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(WOe.SpanNames.CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchClientConnectCallback(a,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),a),()=>n.call(this,o));return XOe(a,c)}}recordOperationDuration(t,n){let r={},o=[hf.ATTR_DB_NAMESPACE,hf.ATTR_ERROR_TYPE,hf.ATTR_SERVER_PORT,hf.ATTR_SERVER_ADDRESS,hf.ATTR_DB_OPERATION_NAME];this._semconvStability&qu.SemconvStability.OLD&&o.push(TO.ATTR_DB_SYSTEM),this._semconvStability&qu.SemconvStability.STABLE&&o.push(hf.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,Z4.hrTimeToMilliseconds)((0,Z4.hrTimeDuration)(n,(0,Z4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Wo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,Z4.hrTime)(),a=o[0],c=typeof a=="string",l=Wo.isObjectWithTextString(a),f=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:l?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[TO.ATTR_DB_SYSTEM]:TO.DB_SYSTEM_VALUE_POSTGRESQL,[hf.ATTR_DB_NAMESPACE]:this.database,[hf.ATTR_SERVER_PORT]:this.connectionParameters.port,[hf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[hf.ATTR_DB_OPERATION_NAME]=Wo.parseNormalizedOperationName(f?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Wo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,f);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,JOe.addSqlCommenterComment)(b,a):l&&!("name"in a)&&(o[0]={...a,text:(0,JOe.addSqlCommenterComment)(b,a.text)})),o.length>0){let D=Hr.trace.getSpan(Hr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Wo.patchCallback(S,b,o[o.length-1],h,y),D&&(o[o.length-1]=Hr.context.bind(Hr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let w=Wo.patchCallback(t.getConfig(),b,f.callback,h,y);D&&(w=Hr.context.bind(Hr.context.active(),w)),o[0].callback=w}}let{requestHook:v}=S;typeof v=="function"&&f&&(0,qu.safeExecuteInTheMiddle)(()=>{let{database:D,host:w,port:Q,user:z}=this.connectionParameters;v(b,{connection:{database:D,host:w,port:Q,user:z},query:{text:f.text,values:f.values,name:f.name}})},D=>{D&&t._diag.error("Error running query hook",D)},!0);let x;try{x=n.apply(this,o)}catch(D){throw D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(D)}),b.end(),D}return x instanceof Promise?x.then(D=>new Promise(w=>{Wo.handleExecutionResult(t.getConfig(),b,D),y(),b.end(),w(D)})).catch(D=>new Promise((w,Q)=>{D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:D.message}),y(),b.end(),Q(D)})):x})}_setPoolConnectEventListeners(t){if(t[KOe.EVENT_LISTENERS_SET])return;let n=Wo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[KOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(WOe.SpanNames.POOL_CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchCallbackPGPool(a,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),a),()=>n.call(this,o));return XOe(a,c)}}};W4.PgInstrumentation=MJ;function XOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Hr.context.bind(Hr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Wo.sanitizedErrorMessage(r)),e.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var tke=F(Xv=>{"use strict";A();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.AttributeNames=Xv.PgInstrumentation=void 0;var DIt=eke();Object.defineProperty(Xv,"PgInstrumentation",{enumerable:!0,get:function(){return DIt.PgInstrumentation}});var BIt=OJ();Object.defineProperty(Xv,"AttributeNames",{enumerable:!0,get:function(){return BIt.AttributeNames}})});var nke,rke,oke,NIt,ike,ake=O(()=>{A();nke=ae(tke(),1);hr();rke="Postgres",oke=st(rke,nke.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),NIt=(e=>({name:rke,setupOnce(){oke(e)}})),ike=NIt});var cE,UJ,ske,OIt,kIt,uke,LJ,wIt,cke,lke=O(()=>{A();ze();cE=ae(on(),1);Wn();dt();hr();hS();UJ="PostgresJs",ske=[">=3.0.0 <4"],OIt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,kIt=Symbol.for("sentry.query.from.instrumented.sql"),uke=st(UJ,e=>new LJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),LJ=class extends cE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Xn,t)}init(){let t=new cE.InstrumentationNodeModuleDefinition("postgres",ske,n=>{try{return this._patchPostgres(n)}catch(r){return ba&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new cE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,ske,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 ba&&Z.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...a){let c=Reflect.construct(r,a);if(!c||typeof c!="function")return ba&&Z.warn("postgres() did not return a valid instance"),c;let l=o.getConfig();return LV(c,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(hN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return $t.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(iC,r);return}let o=n?.match(OIt);o?.[1]&&t.setAttribute(iC,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[kIt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Wa({name:a||"postgresjs.query",op:"db"},c=>{zr(c,"auto.db.postgresjs"),c.setAttributes({[My]:"postgres",[K9]:a});let l=n.getConfig(),{requestHook:f}=l;f&&(0,cE.safeExecuteInTheMiddle)(()=>f(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),ba&&Z.error(`Error in requestHook for ${UJ} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,v)=>{try{n._setOperationName(c,a,v?.[0]?.command),c.end()}catch(x){ba&&Z.error("Error ending span in resolve callback:",x)}return Reflect.apply(S,b,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(J9,v?.[0]?.code||"unknown"),c.setAttribute(Z9,v?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(x){ba&&Z.error("Error ending span in reject callback:",x)}return Reflect.apply(S,b,v)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.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}},wIt=(e=>({name:UJ,setupOnce(){uke(e)}})),cke=wIt});var dke=F(IO=>{"use strict";A();Object.defineProperty(IO,"__esModule",{value:!0});IO.SeverityNumber=void 0;var PIt;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(PIt=IO.SeverityNumber||(IO.SeverityNumber={}))});var e3=F(eR=>{"use strict";A();Object.defineProperty(eR,"__esModule",{value:!0});eR.NOOP_LOGGER=eR.NoopLogger=void 0;var X4=class{emit(t){}};eR.NoopLogger=X4;eR.NOOP_LOGGER=new X4});var n3=F(tR=>{"use strict";A();Object.defineProperty(tR,"__esModule",{value:!0});tR.NOOP_LOGGER_PROVIDER=tR.NoopLoggerProvider=void 0;var MIt=e3(),t3=class{getLogger(t,n,r){return new MIt.NoopLogger}};tR.NoopLoggerProvider=t3;tR.NOOP_LOGGER_PROVIDER=new t3});var FJ=F(r3=>{"use strict";A();Object.defineProperty(r3,"__esModule",{value:!0});r3.ProxyLogger=void 0;var LIt=e3(),QJ=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):LIt.NOOP_LOGGER}};r3.ProxyLogger=QJ});var zJ=F(o3=>{"use strict";A();Object.defineProperty(o3,"__esModule",{value:!0});o3.ProxyLoggerProvider=void 0;var UIt=n3(),QIt=FJ(),GJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new QIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:UIt.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)}};o3.ProxyLoggerProvider=GJ});var pke=F(i3=>{"use strict";A();Object.defineProperty(i3,"__esModule",{value:!0});i3._globalThis=void 0;i3._globalThis=typeof globalThis=="object"?globalThis:global});var fke=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3._globalThis=void 0;var FIt=pke();Object.defineProperty(a3,"_globalThis",{enumerable:!0,get:function(){return FIt._globalThis}})});var mke=F(s3=>{"use strict";A();Object.defineProperty(s3,"__esModule",{value:!0});s3._globalThis=void 0;var GIt=fke();Object.defineProperty(s3,"_globalThis",{enumerable:!0,get:function(){return GIt._globalThis}})});var Ake=F($m=>{"use strict";A();Object.defineProperty($m,"__esModule",{value:!0});$m.API_BACKWARDS_COMPATIBILITY_VERSION=$m.makeGetter=$m._global=$m.GLOBAL_LOGS_API_KEY=void 0;var zIt=mke();$m.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");$m._global=zIt._globalThis;function jIt(e,t,n){return r=>r===e?t:n}$m.makeGetter=jIt;$m.API_BACKWARDS_COMPATIBILITY_VERSION=1});var hke=F(u3=>{"use strict";A();Object.defineProperty(u3,"__esModule",{value:!0});u3.LogsAPI=void 0;var tp=Ake(),HIt=n3(),gke=zJ(),jJ=class e{constructor(){this._proxyLoggerProvider=new gke.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return tp._global[tp.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(tp._global[tp.GLOBAL_LOGS_API_KEY]=(0,tp.makeGetter)(tp.API_BACKWARDS_COMPATIBILITY_VERSION,t,HIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=tp._global[tp.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(tp._global,tp.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete tp._global[tp.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new gke.ProxyLoggerProvider}};u3.LogsAPI=jJ});var HJ=F(rs=>{"use strict";A();Object.defineProperty(rs,"__esModule",{value:!0});rs.logs=rs.ProxyLoggerProvider=rs.ProxyLogger=rs.NoopLoggerProvider=rs.NOOP_LOGGER_PROVIDER=rs.NoopLogger=rs.NOOP_LOGGER=rs.SeverityNumber=void 0;var $It=dke();Object.defineProperty(rs,"SeverityNumber",{enumerable:!0,get:function(){return $It.SeverityNumber}});var _ke=e3();Object.defineProperty(rs,"NOOP_LOGGER",{enumerable:!0,get:function(){return _ke.NOOP_LOGGER}});Object.defineProperty(rs,"NoopLogger",{enumerable:!0,get:function(){return _ke.NoopLogger}});var Eke=n3();Object.defineProperty(rs,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return Eke.NOOP_LOGGER_PROVIDER}});Object.defineProperty(rs,"NoopLoggerProvider",{enumerable:!0,get:function(){return Eke.NoopLoggerProvider}});var qIt=FJ();Object.defineProperty(rs,"ProxyLogger",{enumerable:!0,get:function(){return qIt.ProxyLogger}});var VIt=zJ();Object.defineProperty(rs,"ProxyLoggerProvider",{enumerable:!0,get:function(){return VIt.ProxyLoggerProvider}});var YIt=hke();rs.logs=YIt.LogsAPI.getInstance()});var yke=F(nR=>{"use strict";A();Object.defineProperty(nR,"__esModule",{value:!0});nR.disableInstrumentations=nR.enableInstrumentations=void 0;function KIt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}nR.enableInstrumentations=KIt;function JIt(e){e.forEach(t=>t.disable())}nR.disableInstrumentations=JIt});var Ike=F(c3=>{"use strict";A();Object.defineProperty(c3,"__esModule",{value:!0});c3.registerInstrumentations=void 0;var Ske=(ze(),Me(We)),ZIt=HJ(),Tke=yke();function WIt(e){let t=e.tracerProvider||Ske.trace.getTracerProvider(),n=e.meterProvider||Ske.metrics.getMeterProvider(),r=e.loggerProvider||ZIt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Tke.enableInstrumentations)(o,t,n,r),()=>{(0,Tke.disableInstrumentations)(o)}}c3.registerInstrumentations=WIt});var Oke=F(l3=>{"use strict";A();Object.defineProperty(l3,"__esModule",{value:!0});l3.satisfies=void 0;var YJ=(ze(),Me(We)),xke=/^(?: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-]+)*))?$/,XIt=/^(?<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-]+)*))?$/,ebt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function tbt(e,t,n){if(!nbt(e))return YJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=abt(e);if(!r)return!1;let o=[],i=Dke(r,t,o,n);return i&&!n?.includePrerelease?obt(r,o):i}l3.satisfies=tbt;function nbt(e){return typeof e=="string"&&xke.test(e)}function Dke(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if($J(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Rbt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!$J(e,i,n,r))return!1;return!0}return $J(e,t,n,r)}function $J(e,t,n,r){if(t=ibt(t,r),t.includes(" "))return Dke(e,t,n,r);{let o=sbt(t);return n.push(o),rbt(e,o)}}function rbt(e,t){if(t.invalid)return!1;if(!t.version||VJ(t.version))return!0;let n=Cke(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=Cke(r,o)}return ebt[t.op]?.includes(n)}function obt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function ibt(e,t){return e=e.trim(),e=Cbt(e,t),e=bbt(e),e=vbt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function abt(e){let t=e.match(xke);if(!t){YJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),a=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:a,prereleaseSegmentCount:a?a.length:0,build:o}}function sbt(e){if(!e)return{};let t=e.match(XIt);if(!t)return YJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,a=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:a,versionSegmentCount:a.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function VJ(e){return e==="*"||e==="x"||e==="X"}function bke(e){let t=parseInt(e,10);return isNaN(t)?e:t}function ubt(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 cbt(e,t){if(VJ(e)||VJ(t))return 0;let[n,r]=ubt(bke(e),bke(t));return n>r?1:n<r?-1:0}function Cke(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=cbt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Bke="[a-zA-Z0-9-]",Nke="0|[1-9]\\d*",lbt=`\\d*[a-zA-Z-]${Bke}*`,dbt="((?:<|>)?=?)",vke=`(?:${Nke}|${lbt})`,pbt=`(?:-(${vke}(?:\\.${vke})*))`,Rke=`${Bke}+`,fbt=`(?:\\+(${Rke}(?:\\.${Rke})*))`,qJ=`${Nke}|x|X|\\*`,bO=`[v=\\s]*(${qJ})(?:\\.(${qJ})(?:\\.(${qJ})(?:${pbt})?${fbt}?)?)?`,mbt=`^${dbt}\\s*${bO}$`,Abt=new RegExp(mbt),gbt=`^\\s*(${bO})\\s+-\\s+(${bO})\\s*$`,hbt=new RegExp(gbt),_bt="(?:~>?)",Ebt=`^${_bt}${bO}$`,ybt=new RegExp(Ebt),Sbt="(?:\\^)",Tbt=`^${Sbt}${bO}$`,Ibt=new RegExp(Tbt);function bbt(e){let t=ybt;return e.replace(t,(n,r,o,i,a)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:a?c=`>=${r}.${o}.${i}-${a} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Cbt(e,t){let n=Ibt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,l)=>{let f;return Vu(i)?f="":Vu(a)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(c)?i==="0"?f=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:l?i==="0"?a==="0"?f=`>=${i}.${a}.${c}-${l} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}-${l} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?a==="0"?f=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:f=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:f=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,f})}function vbt(e,t){let n=Abt;return e.replace(n,(r,o,i,a,c,l)=>{let f=Vu(i),h=f||Vu(a),y=h||Vu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(a=0),c=0,o===">"?(o=">=",h?(i=+i+1,a=0,c=0):(a=+a+1,c=0)):o==="<="&&(o="<",h?i=+i+1:a=+a+1),o==="<"&&(l="-0"),r=`${o+i}.${a}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${l} <${i}.${+a+1}.0-0`),r})}function Rbt(e,t){let n=hbt;return e.replace(n,(r,o,i,a,c,l,f,h,y,S,b,v)=>(Vu(i)?o="":Vu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(y)?h="":Vu(S)?h=`<${+y+1}.0.0-0`:Vu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var KJ=F(ks=>{"use strict";A();Object.defineProperty(ks,"__esModule",{value:!0});ks.massUnwrap=ks.unwrap=ks.massWrap=ks.wrap=void 0;var Yu=console.error.bind(console);function CO(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 xbt=(e,t,n)=>{if(!e||!e[t]){Yu("no original function "+String(t)+" to wrap");return}if(!n){Yu("no wrapper function"),Yu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Yu("original object and wrapper must be functions");return}let o=n(r,t);return CO(o,"__original",r),CO(o,"__unwrap",()=>{e[t]===o&&CO(e,t,r)}),CO(o,"__wrapped",!0),CO(e,t,o),o};ks.wrap=xbt;var Dbt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ks.wrap)(r,o,n)})})};ks.massWrap=Dbt;var Bbt=(e,t)=>{if(!e||!e[t]){Yu("no function to unwrap."),Yu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Yu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ks.unwrap=Bbt;var Nbt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ks.unwrap)(n,r)})})};ks.massUnwrap=Nbt;function vO(e){e&&e.logger&&(typeof e.logger!="function"?Yu("new logger isn't a function, not replacing"):Yu=e.logger)}ks.default=vO;vO.wrap=ks.wrap;vO.massWrap=ks.massWrap;vO.unwrap=ks.unwrap;vO.massUnwrap=ks.massUnwrap});var kke=F(p3=>{"use strict";A();Object.defineProperty(p3,"__esModule",{value:!0});p3.InstrumentationAbstract=void 0;var JJ=(ze(),Me(We)),Obt=HJ(),d3=KJ(),ZJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=JJ.diag.createComponentLogger({namespace:t}),this._tracer=JJ.trace.getTracer(t,n),this._meter=JJ.metrics.getMeter(t,n),this._logger=Obt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=d3.wrap;_unwrap=d3.unwrap;_massWrap=d3.massWrap;_massUnwrap=d3.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)}}};p3.InstrumentationAbstract=ZJ});var wke=F(lE=>{"use strict";A();Object.defineProperty(lE,"__esModule",{value:!0});lE.ModuleNameTrie=lE.ModuleNameSeparator=void 0;lE.ModuleNameSeparator="/";var f3=class{hooks=[];children=new Map},WJ=class{_trie=new f3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(lE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new f3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],a=!0;for(let c of t.split(lE.ModuleNameSeparator)){let l=o.children.get(c);if(!l){a=!1;break}r||i.push(...l.hooks),o=l}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};lE.ModuleNameTrie=WJ});var Mke=F(m3=>{"use strict";A();Object.defineProperty(m3,"__esModule",{value:!0});m3.RequireInTheMiddleSingleton=void 0;var kbt=zy(),Pke=Fe("path"),XJ=wke(),wbt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),eZ=class e{_moduleNameTrie=new XJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new kbt.Hook(null,{internals:!0},(t,n,r)=>{let o=Pbt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:a}of i)t=a(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return wbt?new e:this._instance=this._instance??new e}};m3.RequireInTheMiddleSingleton=eZ;function Pbt(e){return Pke.sep!==XJ.ModuleNameSeparator?e.split(Pke.sep).join(XJ.ModuleNameSeparator):e}});var tZ=F(dE=>{"use strict";A();Object.defineProperty(dE,"__esModule",{value:!0});dE.isWrapped=dE.safeExecuteInTheMiddleAsync=dE.safeExecuteInTheMiddle=void 0;function Mbt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}dE.safeExecuteInTheMiddle=Mbt;async function Lbt(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}}dE.safeExecuteInTheMiddleAsync=Lbt;function Ubt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}dE.isWrapped=Ubt});var Qke=F(A3=>{"use strict";A();Object.defineProperty(A3,"__esModule",{value:!0});A3.InstrumentationBase=void 0;var RO=Fe("path"),Lke=Fe("util"),Qbt=Oke(),nZ=KJ(),Fbt=kke(),Gbt=Mke(),zbt=MK(),xO=(ze(),Me(We)),jbt=zy(),Hbt=Fe("fs"),$bt=tZ(),rZ=class extends Fbt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Gbt.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,$bt.isWrapped)(t[n])&&this._unwrap(t,n),Lke.types.isProxy(t)){let o=(0,nZ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,nZ.wrap)(t,n,r)};_unwrap=(t,n)=>Lke.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,nZ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{xO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xO.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{xO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,Hbt.readFileSync)(RO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{xO.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 Uke(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let a=t.files??[],c=RO.normalize(r);return a.filter(f=>f.name===c).filter(f=>Uke(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,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(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,l)=>{if(!l&&RO.isAbsolute(c)){let f=RO.parse(c);c=f.name,l=f.dir}return this._onRequire(t,a,c,l)},r=(a,c,l)=>this._onRequire(t,a,c,l),o=RO.isAbsolute(t.name)?new jbt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new zbt.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}};A3.InstrumentationBase=rZ;function Uke(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Qbt.satisfies)(t,r,{includePrerelease:n}))}});var Fke=F(g3=>{"use strict";A();Object.defineProperty(g3,"__esModule",{value:!0});g3.normalize=void 0;var qbt=Fe("path");Object.defineProperty(g3,"normalize",{enumerable:!0,get:function(){return qbt.normalize}})});var Gke=F(rR=>{"use strict";A();Object.defineProperty(rR,"__esModule",{value:!0});rR.normalize=rR.InstrumentationBase=void 0;var Vbt=Qke();Object.defineProperty(rR,"InstrumentationBase",{enumerable:!0,get:function(){return Vbt.InstrumentationBase}});var Ybt=Fke();Object.defineProperty(rR,"normalize",{enumerable:!0,get:function(){return Ybt.normalize}})});var oZ=F(oR=>{"use strict";A();Object.defineProperty(oR,"__esModule",{value:!0});oR.normalize=oR.InstrumentationBase=void 0;var zke=Gke();Object.defineProperty(oR,"InstrumentationBase",{enumerable:!0,get:function(){return zke.InstrumentationBase}});Object.defineProperty(oR,"normalize",{enumerable:!0,get:function(){return zke.normalize}})});var jke=F(h3=>{"use strict";A();Object.defineProperty(h3,"__esModule",{value:!0});h3.InstrumentationNodeModuleDefinition=void 0;var iZ=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||[]}};h3.InstrumentationNodeModuleDefinition=iZ});var Hke=F(_3=>{"use strict";A();Object.defineProperty(_3,"__esModule",{value:!0});_3.InstrumentationNodeModuleFile=void 0;var Kbt=oZ(),aZ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,Kbt.normalize)(t)}};_3.InstrumentationNodeModuleFile=aZ});var $ke=F(xS=>{"use strict";A();Object.defineProperty(xS,"__esModule",{value:!0});xS.semconvStabilityFromStr=xS.SemconvStability=void 0;var E3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(E3=xS.SemconvStability||(xS.SemconvStability={}));function Jbt(e,t){let n=E3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=E3.DUPLICATE;break}else o.toLowerCase()===e&&(n=E3.STABLE);return n}xS.semconvStabilityFromStr=Jbt});var Vke=F(aa=>{"use strict";A();Object.defineProperty(aa,"__esModule",{value:!0});aa.semconvStabilityFromStr=aa.SemconvStability=aa.safeExecuteInTheMiddleAsync=aa.safeExecuteInTheMiddle=aa.isWrapped=aa.InstrumentationNodeModuleFile=aa.InstrumentationNodeModuleDefinition=aa.InstrumentationBase=aa.registerInstrumentations=void 0;var Zbt=Ike();Object.defineProperty(aa,"registerInstrumentations",{enumerable:!0,get:function(){return Zbt.registerInstrumentations}});var Wbt=oZ();Object.defineProperty(aa,"InstrumentationBase",{enumerable:!0,get:function(){return Wbt.InstrumentationBase}});var Xbt=jke();Object.defineProperty(aa,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Xbt.InstrumentationNodeModuleDefinition}});var eCt=Hke();Object.defineProperty(aa,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return eCt.InstrumentationNodeModuleFile}});var sZ=tZ();Object.defineProperty(aa,"isWrapped",{enumerable:!0,get:function(){return sZ.isWrapped}});Object.defineProperty(aa,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return sZ.safeExecuteInTheMiddle}});Object.defineProperty(aa,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return sZ.safeExecuteInTheMiddleAsync}});var qke=$ke();Object.defineProperty(aa,"SemconvStability",{enumerable:!0,get:function(){return qke.SemconvStability}});Object.defineProperty(aa,"semconvStabilityFromStr",{enumerable:!0,get:function(){return qke.semconvStabilityFromStr}})});function rCt(){let e=iR[cZ];return e?.helper?e.helper:iR[uZ]?.helper}function oCt(e){let t={helper:e};iR[cZ]=t,iR[uZ]=t}function iCt(){delete iR[cZ],delete iR[uZ]}function uCt(e){return e==="client"?co.CLIENT:co.INTERNAL}function Jke(e,t,n,r,o){if(Zke(t.name,o))return;let i={attributes:t.attributes,kind:uCt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(l=>{let f=r.get(l);return f?{context:{spanId:f,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(l=>l.parentId===t.id);for(let l of c)Jke(e,l,n,r,o);a.end(t.endTime)})}function Yke(e,t){return lCt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function lCt(e){return e!=null&&typeof e.then=="function"}function Zke(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var y3,tCt,nCt,uZ,cZ,iR,aCt,sCt,cCt,Wke,Kke,dCt,pCt,Xke,ewe=O(()=>{A();ze();y3=ae(Vke(),1);ze();tCt={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"}},nCt=tCt.version.split(".")[0],uZ="PRISMA_INSTRUMENTATION",cZ=`V${nCt}_PRISMA_INSTRUMENTATION`,iR=globalThis;aCt=process.env.PRISMA_SHOW_ALL_TRACES==="true",sCt="00-10-10-00";cCt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=$t.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:sCt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Jke(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!aCt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Zke(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return Yke(i,t(i,r))}return n.startActiveSpan(o,e,i=>Yke(i,t(i,r)))}};Wke={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},Kke=Wke.version,dCt=Wke.name,pCt="@prisma/client",Xke=class extends y3.InstrumentationBase{tracerProvider;constructor(e={}){super(dCt,Kke,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new y3.InstrumentationNodeModuleDefinition(pCt,[Kke])]}enable(){let e=this._config;oCt(new cCt({tracerProvider:this.tracerProvider??$t.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){iCt()}isEnabled(){return rCt()!==void 0}}});function fCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function nwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function mCt(e){return e==="client"?co.CLIENT:co.INTERNAL}var twe,lZ,ACt,rwe,owe=O(()=>{A();ze();ewe();dt();hr();twe="Prisma";lZ=class extends Xke{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=nwe();fCt(t)&&(t.createEngineSpan=n=>{let r=$t.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ko(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let a=mCt(i.kind),c=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Js.SAMPLED}})),y=$t.setSpanContext(Ke.active(),{traceId:f,spanId:c,traceFlags:Js.SAMPLED});Ke.with(y,()=>{let S={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:a,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};ACt=st(twe,e=>new lZ(e)),rwe=e=>({name:twe,setupOnce(){ACt(e)},setup(t){nwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(wt,"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 iwe=F(aR=>{"use strict";A();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.60.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var dZ=F(qm=>{"use strict";A();Object.defineProperty(qm,"__esModule",{value:!0});qm.HapiLifecycleMethodNames=qm.HapiLayerType=qm.handlerPatched=qm.HapiComponentName=void 0;qm.HapiComponentName="@hapi/hapi";qm.handlerPatched=Symbol("hapi-handler-patched");qm.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};qm.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var awe=F(S3=>{"use strict";A();Object.defineProperty(S3,"__esModule",{value:!0});S3.ATTR_HTTP_METHOD=void 0;S3.ATTR_HTTP_METHOD="http.method"});var pZ=F(DO=>{"use strict";A();Object.defineProperty(DO,"__esModule",{value:!0});DO.AttributeNames=void 0;var gCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(gCt=DO.AttributeNames||(DO.AttributeNames={}))});var cwe=F(sa=>{"use strict";A();Object.defineProperty(sa,"__esModule",{value:!0});sa.getPluginFromInput=sa.getExtMetadata=sa.getRouteMetadata=sa.isPatchableExtMethod=sa.isDirectExtInput=sa.isLifecycleExtEventObj=sa.isLifecycleExtType=sa.getPluginName=void 0;var swe=(Wn(),Me(Fr)),hCt=awe(),BO=dZ(),pE=pZ(),uwe=on();function _Ct(e){return e.name?e.name:e.pkg.name}sa.getPluginName=_Ct;var ECt=e=>typeof e=="string"&&BO.HapiLifecycleMethodNames.has(e);sa.isLifecycleExtType=ECt;var yCt=e=>{let t=e?.type;return t!==void 0&&(0,sa.isLifecycleExtType)(t)};sa.isLifecycleExtEventObj=yCt;var SCt=e=>Array.isArray(e)&&e.length<=3&&(0,sa.isLifecycleExtType)(e[0])&&typeof e[1]=="function";sa.isDirectExtInput=SCt;var TCt=e=>!Array.isArray(e);sa.isPatchableExtMethod=TCt;var ICt=(e,t,n)=>{let r={[swe.ATTR_HTTP_ROUTE]:e.path};t&uwe.SemconvStability.OLD&&(r[hCt.ATTR_HTTP_METHOD]=e.method),t&uwe.SemconvStability.STABLE&&(r[swe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[pE.AttributeNames.HAPI_TYPE]=BO.HapiLayerType.PLUGIN,r[pE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[pE.AttributeNames.HAPI_TYPE]=BO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};sa.getRouteMetadata=ICt;var bCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[pE.AttributeNames.EXT_TYPE]:e,[pE.AttributeNames.HAPI_TYPE]:BO.HapiLayerType.EXT,[pE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[pE.AttributeNames.EXT_TYPE]:e,[pE.AttributeNames.HAPI_TYPE]:BO.HapiLayerType.EXT},name:r}};sa.getExtMetadata=bCt;var CCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;sa.getPluginFromInput=CCt});var pwe=F(T3=>{"use strict";A();Object.defineProperty(T3,"__esModule",{value:!0});T3.HapiInstrumentation=void 0;var $l=(ze(),Me(We)),lwe=br(),NO=on(),dwe=iwe(),OO=dZ(),Gg=cwe(),fZ=class extends NO.InstrumentationBase{_semconvStability;constructor(t={}){super(dwe.PACKAGE_NAME,dwe.PACKAGE_VERSION,t),this._semconvStability=(0,NO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new NO.InstrumentationNodeModuleDefinition(OO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,NO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,NO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let a=t.apply(this,[i]);return r._wrap(a,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(a,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(a,"register",n._getServerRegisterPatch.bind(n)),a}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let a of o){let c=(0,Gg.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Gg.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let l=a[c];if((0,Gg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,a[c]=f}}return t.apply(this,i)}else if((0,Gg.isDirectExtInput)(i)){let a=i,c=a[1],l=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],l,a[2]])}else if((0,Gg.isLifecycleExtEventObj)(i[0])){let a=i[0],c=r._wrapExtMethods(a.method,a.type,n);return a.method=c,t.call(this,a)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let a=r._wrapRouteHandler.call(r,o[i],n);o[i]=a}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Gg.getPluginName)(t),o=t.register,i=this,a=function(c,l){return i._wrap(c,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(c,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,c,l)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Gg.isPatchableExtMethod)(t))return t[OO.handlerPatched]===!0?t:(t[OO.handlerPatched]=!0,async function(...a){if($l.trace.getSpan($l.context.active())===void 0)return await t.apply(this,a);let c=(0,Gg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await $l.context.with($l.trace.setSpan($l.context.active(),l),t,void 0,...a)}catch(f){throw l.recordException(f),l.setStatus({code:$l.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[OO.handlerPatched]===!0)return t;t[OO.handlerPatched]=!0;let o=i=>async function(...a){if($l.trace.getSpan($l.context.active())===void 0)return await i.call(this,...a);let c=(0,lwe.getRPCMetadata)($l.context.active());c?.type===lwe.RPCType.HTTP&&(c.route=t.path);let l=(0,Gg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await $l.context.with($l.trace.setSpan($l.context.active(),f),()=>i.call(this,...a))}catch(h){throw f.recordException(h),f.setStatus({code:$l.SpanStatusCode.ERROR,message:h.message}),h}finally{f.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(a){let c=i(a);return typeof c.handler=="function"&&(c.handler=o(c.handler)),c}}else typeof t.options?.handler=="function"&&(t.options.handler=o(t.options.handler));return t}};T3.HapiInstrumentation=fZ});var fwe=F(sR=>{"use strict";A();Object.defineProperty(sR,"__esModule",{value:!0});sR.AttributeNames=sR.HapiInstrumentation=void 0;var vCt=pwe();Object.defineProperty(sR,"HapiInstrumentation",{enumerable:!0,get:function(){return vCt.HapiInstrumentation}});var RCt=pZ();Object.defineProperty(sR,"AttributeNames",{enumerable:!0,get:function(){return RCt.AttributeNames}})});var mwe,Awe,gwe,xCt,hwe,_we=O(()=>{A();mwe=ae(fwe(),1);hr();Awe="Hapi",gwe=st(Awe,()=>new mwe.HapiInstrumentation),xCt=(()=>({name:Awe,setupOnce(){gwe()}})),hwe=xCt});var fE,kO,mZ=O(()=>{A();fE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},kO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var b3,DCt,BCt,I3,Ewe=O(()=>{A();ze();b3=ae(on(),1);dt();mZ();DCt="@sentry/instrumentation-hono",BCt="0.0.1",I3=class extends b3.InstrumentationBase{constructor(t={}){super(DCt,BCt,t)}init(){return[new b3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_patchOnHandler(){let t=this;return function(n){return function(...o){let i=o.slice(2);return n.apply(this,[...o.slice(0,2),...i.map(a=>t._wrapHandler(a))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let a=o.slice(1);return n.apply(this,[i,...a.map(c=>t._wrapHandler(c))])}return n.apply(this,o.map(i=>t._wrapHandler(i)))}}}_wrapHandler(t){let n=this;return function(r,o){if(!n.isEnabled())return t.apply(this,[r,o]);let i=r.req.path,a=n.tracer.startSpan(i);return Ke.with($t.setSpan(Ke.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(bs(c))return c.then(l=>{let f=n._determineHandlerType(l);return a.setAttributes({[fE.HONO_TYPE]:f,[fE.HONO_NAME]:f===kO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),l});{let l=n._determineHandlerType(c);return a.setAttributes({[fE.HONO_TYPE]:l,[fE.HONO_NAME]:l===kO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),c}},()=>a.end(),c=>{n._handleError(a,c),a.end()}))}}_safeExecute(t,n,r){try{let o=t();return bs(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?kO.MIDDLEWARE:kO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:di.ERROR,message:n.message}),t.recordException(n))}}});function NCt(e){let t=Ot(e).data,n=t[fE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[wt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[fE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),vn()===Fd()){ba&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[mg],i=t[Ly];typeof o=="string"&&typeof i=="string"&&vn().setTransactionName(`${i} ${o}`)}var ywe,Swe,OCt,Twe,Iwe=O(()=>{A();Wn();dt();hr();hS();mZ();Ewe();ywe="Hono";Swe=st(ywe,()=>new I3({responseHook:e=>{NCt(e)}})),OCt=(()=>({name:ywe,setupOnce(){Swe()}})),Twe=OCt});var C3=F(wO=>{"use strict";A();Object.defineProperty(wO,"__esModule",{value:!0});wO.KoaLayerType=void 0;var kCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(kCt=wO.KoaLayerType||(wO.KoaLayerType={}))});var bwe=F(uR=>{"use strict";A();Object.defineProperty(uR,"__esModule",{value:!0});uR.PACKAGE_NAME=uR.PACKAGE_VERSION=void 0;uR.PACKAGE_VERSION="0.62.0";uR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var AZ=F(PO=>{"use strict";A();Object.defineProperty(PO,"__esModule",{value:!0});PO.AttributeNames=void 0;var wCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(wCt=PO.AttributeNames||(PO.AttributeNames={}))});var vwe=F(cR=>{"use strict";A();Object.defineProperty(cR,"__esModule",{value:!0});cR.isLayerIgnored=cR.getMiddlewareMetadata=void 0;var Cwe=C3(),v3=AZ(),PCt=(Wn(),Me(Fr)),MCt=(e,t,n,r)=>n?{attributes:{[v3.AttributeNames.KOA_NAME]:r?.toString(),[v3.AttributeNames.KOA_TYPE]:Cwe.KoaLayerType.ROUTER,[PCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[v3.AttributeNames.KOA_NAME]:t.name??"middleware",[v3.AttributeNames.KOA_TYPE]:Cwe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};cR.getMiddlewareMetadata=MCt;var LCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));cR.isLayerIgnored=LCt});var Rwe=F(R3=>{"use strict";A();Object.defineProperty(R3,"__esModule",{value:!0});R3.kLayerPatched=void 0;R3.kLayerPatched=Symbol("koa-layer-patched")});var kwe=F(x3=>{"use strict";A();Object.defineProperty(x3,"__esModule",{value:!0});x3.KoaInstrumentation=void 0;var Vm=(ze(),Me(We)),MO=on(),xwe=C3(),Dwe=bwe(),Bwe=vwe(),Nwe=br(),Owe=Rwe(),gZ=class extends MO.InstrumentationBase{constructor(t={}){super(Dwe.PACKAGE_NAME,Dwe.PACKAGE_VERSION,t)}init(){return new MO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,MO.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,MO.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){Vm.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let l=a[c];a[c]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?xwe.KoaLayerType.ROUTER:xwe.KoaLayerType.MIDDLEWARE;return t[Owe.kLayerPatched]===!0||(0,Bwe.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(Vm.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Owe.kLayerPatched]=!0,Vm.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(Vm.trace.getSpan(Vm.context.active())===void 0)return t(i,a);let l=(0,Bwe.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,Nwe.getRPCMetadata)(Vm.context.active());h?.type===Nwe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,MO.safeExecuteInTheMiddle)(()=>y(f,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&Vm.diag.error("koa instrumentation: request hook failed",b)},!0);let S=Vm.trace.setSpan(Vm.context.active(),f);return Vm.context.with(S,async()=>{try{return await t(i,a)}catch(b){throw f.recordException(b),b}finally{f.end()}})})}};x3.KoaInstrumentation=gZ});var wwe=F(mE=>{"use strict";A();Object.defineProperty(mE,"__esModule",{value:!0});mE.KoaLayerType=mE.AttributeNames=mE.KoaInstrumentation=void 0;var UCt=kwe();Object.defineProperty(mE,"KoaInstrumentation",{enumerable:!0,get:function(){return UCt.KoaInstrumentation}});var QCt=AZ();Object.defineProperty(mE,"AttributeNames",{enumerable:!0,get:function(){return QCt.AttributeNames}});var FCt=C3();Object.defineProperty(mE,"KoaLayerType",{enumerable:!0,get:function(){return FCt.KoaLayerType}})});var Pwe,Mwe,Lwe,GCt,Uwe,Qwe=O(()=>{A();Pwe=ae(wwe(),1);Wn();dt();hr();hS();Mwe="Koa",Lwe=st(Mwe,Pwe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),vn()===Fd()){ba&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[mg],c=n.context?.request?.method?.toUpperCase()||"GET";a&&vn().setTransactionName(`${c} ${a}`)}})),GCt=((e={})=>({name:Mwe,setupOnce(){Lwe(e)}})),Uwe=GCt});var hZ=F(_f=>{"use strict";A();Object.defineProperty(_f,"__esModule",{value:!0});_f.ConnectNames=_f.ConnectTypes=_f.AttributeNames=void 0;var zCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(zCt=_f.AttributeNames||(_f.AttributeNames={}));var jCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(jCt=_f.ConnectTypes||(_f.ConnectTypes={}));var HCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(HCt=_f.ConnectNames||(_f.ConnectNames={}))});var Fwe=F(lR=>{"use strict";A();Object.defineProperty(lR,"__esModule",{value:!0});lR.PACKAGE_NAME=lR.PACKAGE_VERSION=void 0;lR.PACKAGE_VERSION="0.57.0";lR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Gwe=F(D3=>{"use strict";A();Object.defineProperty(D3,"__esModule",{value:!0});D3._LAYERS_STORE_PROPERTY=void 0;D3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var zwe=F(gE=>{"use strict";A();Object.defineProperty(gE,"__esModule",{value:!0});gE.generateRoute=gE.replaceCurrentStackRoute=gE.addNewStackLayer=void 0;var $Ct=(ze(),Me(We)),AE=Gwe(),qCt=e=>{Array.isArray(e[AE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,AE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[AE._LAYERS_STORE_PROPERTY].push("/");let t=e[AE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[AE._LAYERS_STORE_PROPERTY].length?e[AE._LAYERS_STORE_PROPERTY].pop():$Ct.diag.warn("Connect: Trying to pop the stack multiple time")}};gE.addNewStackLayer=qCt;var VCt=(e,t)=>{t&&e[AE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};gE.replaceCurrentStackRoute=VCt;var YCt=e=>e[AE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);gE.generateRoute=YCt});var $we=F(hE=>{"use strict";A();Object.defineProperty(hE,"__esModule",{value:!0});hE.ConnectInstrumentation=hE.ANONYMOUS_NAME=void 0;var KCt=(ze(),Me(We)),jwe=br(),dR=hZ(),Hwe=Fwe(),B3=on(),JCt=(Wn(),Me(Fr)),_Z=zwe();hE.ANONYMOUS_NAME="anonymous";var EZ=class extends B3.InstrumentationBase{constructor(t={}){super(Hwe.PACKAGE_NAME,Hwe.PACKAGE_VERSION,t)}init(){return[new B3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,B3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,B3.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=dR.ConnectTypes.REQUEST_HANDLER,i=dR.ConnectNames.REQUEST_HANDLER,o=t):(r=dR.ConnectTypes.MIDDLEWARE,i=dR.ConnectNames.MIDDLEWARE,o=n.name||hE.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[JCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[dR.AttributeNames.CONNECT_TYPE]:r,[dR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,l]=o?[1,2,3]:[0,1,2],f=arguments[a],h=arguments[c],y=arguments[l];(0,_Z.replaceCurrentStackRoute)(f,t);let S=(0,jwe.getRPCMetadata)(KCt.context.active());t&&S?.type===jwe.RPCType.HTTP&&(S.route=(0,_Z.generateRoute)(f));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||hE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",b);let x=!1;function D(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",D)}return h.addListener("close",D),arguments[l]=r._patchNext(y,D),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,_Z.addNewStackLayer)(i);return typeof a=="function"&&(arguments[o]=n._patchOut(a,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};hE.ConnectInstrumentation=EZ});var Vwe=F(np=>{"use strict";A();Object.defineProperty(np,"__esModule",{value:!0});np.ConnectTypes=np.ConnectNames=np.AttributeNames=np.ANONYMOUS_NAME=np.ConnectInstrumentation=void 0;var qwe=$we();Object.defineProperty(np,"ConnectInstrumentation",{enumerable:!0,get:function(){return qwe.ConnectInstrumentation}});Object.defineProperty(np,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return qwe.ANONYMOUS_NAME}});var yZ=hZ();Object.defineProperty(np,"AttributeNames",{enumerable:!0,get:function(){return yZ.AttributeNames}});Object.defineProperty(np,"ConnectNames",{enumerable:!0,get:function(){return yZ.ConnectNames}});Object.defineProperty(np,"ConnectTypes",{enumerable:!0,get:function(){return yZ.ConnectTypes}})});var Ywe,Kwe,Jwe,ZCt,Zwe,Wwe=O(()=>{A();Ywe=ae(Vwe(),1);hr();Kwe="Connect",Jwe=st(Kwe,()=>new Ywe.ConnectInstrumentation),ZCt=(()=>({name:Kwe,setupOnce(){Jwe()}})),Zwe=ZCt});var Xwe=F(os=>{"use strict";A();Object.defineProperty(os,"__esModule",{value:!0});os.DB_SYSTEM_VALUE_MSSQL=os.ATTR_NET_PEER_PORT=os.ATTR_NET_PEER_NAME=os.ATTR_DB_USER=os.ATTR_DB_SYSTEM=os.ATTR_DB_STATEMENT=os.ATTR_DB_SQL_TABLE=os.ATTR_DB_NAME=void 0;os.ATTR_DB_NAME="db.name";os.ATTR_DB_SQL_TABLE="db.sql.table";os.ATTR_DB_STATEMENT="db.statement";os.ATTR_DB_SYSTEM="db.system";os.ATTR_DB_USER="db.user";os.ATTR_NET_PEER_NAME="net.peer.name";os.ATTR_NET_PEER_PORT="net.peer.port";os.DB_SYSTEM_VALUE_MSSQL="mssql"});var ePe=F(pR=>{"use strict";A();Object.defineProperty(pR,"__esModule",{value:!0});pR.once=pR.getSpanName=void 0;function WCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}pR.getSpanName=WCt;var XCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};pR.once=XCt});var tPe=F(fR=>{"use strict";A();Object.defineProperty(fR,"__esModule",{value:!0});fR.PACKAGE_NAME=fR.PACKAGE_VERSION=void 0;fR.PACKAGE_VERSION="0.33.0";fR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var aPe=F(EE=>{"use strict";A();Object.defineProperty(EE,"__esModule",{value:!0});EE.TediousInstrumentation=EE.INJECTED_CTX=void 0;var mR=(ze(),Me(We)),evt=Fe("events"),Ym=on(),DS=(Wn(),Me(Fr)),_E=Xwe(),nPe=ePe(),rPe=tPe(),iPe=Symbol("opentelemetry.instrumentation-tedious.current-database");EE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var oPe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function N3(e){Object.defineProperty(this,iPe,{value:e,writable:!0})}var SZ=class e extends Ym.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rPe.PACKAGE_NAME,rPe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ym.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ym.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Ym.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of oPe)(0,Ym.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,Ym.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 oPe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return N3.call(this,this.config?.options?.database),this.removeListener("databaseChange",N3),this.on("databaseChange",N3),this.once("end",()=>{this.removeListener("databaseChange",N3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||mR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,l=>{o()});Object.defineProperty(a,EE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");a.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(a)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(a){if(a?.[EE.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof evt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,l=0,f=()=>l++,h=()=>c++,y=this[iPe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(a),b={};o._dbSemconvStability&Ym.SemconvStability.OLD&&(b[_E.ATTR_DB_SYSTEM]=_E.DB_SYSTEM_VALUE_MSSQL,b[_E.ATTR_DB_NAME]=y,b[_E.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[_E.ATTR_DB_STATEMENT]=S,b[_E.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&Ym.SemconvStability.STABLE&&(b[DS.ATTR_DB_NAMESPACE]=y,b[DS.ATTR_DB_SYSTEM_NAME]=DS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[DS.ATTR_DB_QUERY_TEXT]=S,b[DS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&Ym.SemconvStability.OLD&&(b[_E.ATTR_NET_PEER_NAME]=this.config?.server,b[_E.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&Ym.SemconvStability.STABLE&&(b[DS.ATTR_SERVER_ADDRESS]=this.config?.server,b[DS.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,nPe.getSpanName)(t,y,S,a.table),{kind:mR.SpanKind.CLIENT,attributes:b}),x=(0,nPe.once)(G=>{a.removeListener("done",f),a.removeListener("doneInProc",f),a.removeListener("doneProc",h),a.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:mR.SpanStatusCode.ERROR,message:G.message}),v.end()});a.on("done",f),a.on("doneInProc",f),a.on("doneProc",h),a.once("error",x),this.on("end",x),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let D=()=>mR.context.with(mR.trace.setSpan(mR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return D();let z=o._buildTraceparent(v);o._injectContextInfo(this,n,z).finally(D)}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)}}};EE.TediousInstrumentation=SZ});var sPe=F(O3=>{"use strict";A();Object.defineProperty(O3,"__esModule",{value:!0});O3.TediousInstrumentation=void 0;var tvt=aPe();Object.defineProperty(O3,"TediousInstrumentation",{enumerable:!0,get:function(){return tvt.TediousInstrumentation}})});var uPe,nvt,cPe,lPe,rvt,dPe,pPe=O(()=>{A();uPe=ae(sPe(),1);dt();hr();nvt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),cPe="Tedious",lPe=st(cPe,()=>new uPe.TediousInstrumentation({})),rvt=(()=>{let e;return{name:cPe,setupOnce(){let t=lPe();e=EN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";nvt.has(i)&&n.setAttribute(wt,"auto.db.otel.tedious")}))}}}),dPe=rvt});var fPe=F(AR=>{"use strict";A();Object.defineProperty(AR,"__esModule",{value:!0});AR.PACKAGE_NAME=AR.PACKAGE_VERSION=void 0;AR.PACKAGE_VERSION="0.57.0";AR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var APe=F(k3=>{"use strict";A();Object.defineProperty(k3,"__esModule",{value:!0});k3.GenericPoolInstrumentation=void 0;var gR=(ze(),Me(We)),BS=on(),mPe=fPe(),TZ="generic-pool",IZ=class extends BS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(mPe.PACKAGE_NAME,mPe.PACKAGE_VERSION,t)}init(){return[new BS.InstrumentationNodeModuleDefinition(TZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,BS.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 BS.InstrumentationNodeModuleDefinition(TZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,BS.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 BS.InstrumentationNodeModuleDefinition(TZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,BS.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=gR.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return gR.context.with(gR.trace.setSpan(i,a),()=>t.call(this,...o).then(c=>(a.end(),c),c=>{throw a.recordException(c),a.end(),c}))}}_poolWrapper(t){let n=this;return function(){let o=t.apply(this,arguments);return n._wrap(o,"acquire",n._acquireWithCallbacksPatcher.bind(n)),o}}_acquireWithCallbacksPatcher(t){let n=this;return function(o,i){if(n._isDisabled)return t.call(this,o,i);let a=gR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return gR.context.with(gR.trace.setSpan(a,c),()=>{t.call(this,(l,f)=>{if(c.end(),o)return o(l,f)},i)})}}};k3.GenericPoolInstrumentation=IZ});var gPe=F(w3=>{"use strict";A();Object.defineProperty(w3,"__esModule",{value:!0});w3.GenericPoolInstrumentation=void 0;var ovt=APe();Object.defineProperty(w3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return ovt.GenericPoolInstrumentation}})});var hPe,_Pe,EPe,ivt,yPe,SPe=O(()=>{A();hPe=ae(gPe(),1);dt();hr();_Pe="GenericPool",EPe=st(_Pe,()=>new hPe.GenericPoolInstrumentation({})),ivt=(()=>{let e;return{name:_Pe,setupOnce(){let t=EPe();e=EN(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(wt,"auto.db.otel.generic_pool")}))}}}),yPe=ivt});var bZ=F(Km=>{"use strict";A();Object.defineProperty(Km,"__esModule",{value:!0});Km.ATTR_NET_PEER_PORT=Km.ATTR_NET_PEER_NAME=Km.ATTR_MESSAGING_SYSTEM=Km.ATTR_MESSAGING_OPERATION=void 0;Km.ATTR_MESSAGING_OPERATION="messaging.operation";Km.ATTR_MESSAGING_SYSTEM="messaging.system";Km.ATTR_NET_PEER_NAME="net.peer.name";Km.ATTR_NET_PEER_PORT="net.peer.port"});var CZ=F(gi=>{"use strict";A();Object.defineProperty(gi,"__esModule",{value:!0});gi.ATTR_MESSAGING_CONVERSATION_ID=gi.OLD_ATTR_MESSAGING_MESSAGE_ID=gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=gi.ATTR_MESSAGING_URL=gi.ATTR_MESSAGING_PROTOCOL_VERSION=gi.ATTR_MESSAGING_PROTOCOL=gi.MESSAGING_OPERATION_VALUE_PROCESS=gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=gi.ATTR_MESSAGING_DESTINATION_KIND=gi.ATTR_MESSAGING_DESTINATION=void 0;gi.ATTR_MESSAGING_DESTINATION="messaging.destination";gi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";gi.MESSAGING_OPERATION_VALUE_PROCESS="process";gi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";gi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";gi.ATTR_MESSAGING_URL="messaging.url";gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";gi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";gi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var vZ=F(NS=>{"use strict";A();Object.defineProperty(NS,"__esModule",{value:!0});NS.DEFAULT_CONFIG=NS.EndOperation=void 0;var avt;(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"})(avt=NS.EndOperation||(NS.EndOperation={}));NS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var CPe=F(hi=>{"use strict";A();Object.defineProperty(hi,"__esModule",{value:!0});hi.isConfirmChannelTracing=hi.unmarkConfirmChannelTracing=hi.markConfirmChannelTracing=hi.getConnectionAttributesFromUrl=hi.getConnectionAttributesFromServer=hi.normalizeExchange=hi.CONNECTION_ATTRIBUTES=hi.CHANNEL_CONSUME_TIMEOUT_TIMER=hi.CHANNEL_SPANS_NOT_ENDED=hi.MESSAGE_STORED_SPAN=void 0;var RZ=(ze(),Me(We)),yE=on(),P3=(Wn(),Me(Fr)),LO=bZ(),M3=CZ();hi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");hi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");hi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");hi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var xZ=(0,RZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),svt=e=>e!==""?e:"<default>";hi.normalizeExchange=svt;var uvt=e=>e.replace(/:[^:@/]*@/,":***@"),TPe=(e,t)=>e||(t==="AMQP"?5672:5671),IPe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},bPe=e=>e||"localhost",Jm=(e,t,n,r)=>n?{[t]:n}:(RZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),cvt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[LO.ATTR_MESSAGING_SYSTEM]:t}:{}};hi.getConnectionAttributesFromServer=cvt;var lvt=(e,t)=>{let n={[M3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=IPe(r?.protocol);Object.assign(n,{...Jm(e,M3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=bPe(r?.hostname);t&yE.SemconvStability.OLD&&Object.assign(n,{...Jm(e,LO.ATTR_NET_PEER_NAME,i,"hostname")}),t&yE.SemconvStability.STABLE&&Object.assign(n,{...Jm(e,P3.ATTR_SERVER_ADDRESS,i,"hostname")});let a=TPe(r.port,o);t&yE.SemconvStability.OLD&&Object.assign(n,Jm(e,LO.ATTR_NET_PEER_PORT,a,"port")),t&yE.SemconvStability.STABLE&&Object.assign(n,Jm(e,P3.ATTR_SERVER_PORT,a,"port"))}else{let r=uvt(e);n[M3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=IPe(o.protocol);Object.assign(n,{...Jm(r,M3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=bPe(o.hostname);t&yE.SemconvStability.OLD&&Object.assign(n,{...Jm(r,LO.ATTR_NET_PEER_NAME,a,"hostname")}),t&yE.SemconvStability.STABLE&&Object.assign(n,{...Jm(r,P3.ATTR_SERVER_ADDRESS,a,"hostname")});let c=TPe(o.port?parseInt(o.port):void 0,i);t&yE.SemconvStability.OLD&&Object.assign(n,Jm(r,LO.ATTR_NET_PEER_PORT,c,"port")),t&yE.SemconvStability.STABLE&&Object.assign(n,Jm(r,P3.ATTR_SERVER_PORT,c,"port"))}catch(o){RZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};hi.getConnectionAttributesFromUrl=lvt;var dvt=e=>e.setValue(xZ,!0);hi.markConfirmChannelTracing=dvt;var pvt=e=>e.deleteValue(xZ);hi.unmarkConfirmChannelTracing=pvt;var fvt=e=>e.getValue(xZ)===!0;hi.isConfirmChannelTracing=fvt});var vPe=F(hR=>{"use strict";A();Object.defineProperty(hR,"__esModule",{value:!0});hR.PACKAGE_NAME=hR.PACKAGE_VERSION=void 0;hR.PACKAGE_VERSION="0.61.0";hR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var xPe=F(Q3=>{"use strict";A();Object.defineProperty(Q3,"__esModule",{value:!0});Q3.AmqplibInstrumentation=void 0;var Xo=(ze(),Me(We)),L3=br(),vr=on(),mvt=bZ(),ql=CZ(),Ku=vZ(),_i=CPe(),RPe=vPe(),U3=[">=0.5.5 <1"],DZ=class extends vr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(RPe.PACKAGE_NAME,RPe.PACKAGE_VERSION,{...Ku.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ku.DEFAULT_CONFIG,...t})}init(){let t=new vr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",U3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new vr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",U3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new vr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",U3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new vr.InstrumentationNodeModuleDefinition("amqplib",U3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,vr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,vr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,vr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ku.EndOperation.Ack)),(0,vr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ku.EndOperation.Nack)),(0,vr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ku.EndOperation.Reject)),(0,vr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ku.EndOperation.AckAll)),(0,vr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ku.EndOperation.NackAll)),(0,vr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,vr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,vr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,vr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,vr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,vr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,vr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,vr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,vr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,l){if(c==null){let f=(0,_i.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,_i.getConnectionAttributesFromServer)(l);l[_i.CONNECTION_ATTRIBUTES]={...f,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelClosed,void 0);let i=this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,l){let f=this,h=n===Ku.EndOperation.Reject?c:l,y=f[_i.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Ku.EndOperation.Reject&&c){for(let b=0;b<=S;b++)o.endConsumerSpan(y[b].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(a,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,a,c){let l=this;if(!Object.prototype.hasOwnProperty.call(l,_i.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[_i.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Xo.propagation.extract(Xo.ROOT_CONTEXT,y),b=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=S?Xo.trace.getSpan(S)?.spanContext():void 0;S=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Xo.SpanKind.CONSUMER,attributes:{...l?.connection?.[_i.CONNECTION_ATTRIBUTES],[ql.ATTR_MESSAGING_DESTINATION]:b,[ql.ATTR_MESSAGING_DESTINATION_KIND]:ql.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[ql.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[mvt.ATTR_MESSAGING_OPERATION]:ql.MESSAGING_OPERATION_VALUE_PROCESS,[ql.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[ql.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:D}=r.getConfig();D&&(0,vr.safeExecuteInTheMiddle)(()=>D(x,{moduleVersion:t,msg:h}),Q=>{Q&&Xo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(l[_i.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,L3.hrTime)()}),h[_i.MESSAGE_STORED_SPAN]=x);let w=S||Xo.ROOT_CONTEXT;Xo.context.with(Xo.trace.setSpan(w,x),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Ku.EndOperation.AutoAck),x.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,l,f){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,l),{publishHook:b}=r.getConfig();b&&(0,vr.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),w=>{w&&Xo.diag.error("amqplib instrumentation: publishHook error",w)},!0);let v=function(w,Q){try{f?.call(this,w,Q)}finally{let{publishConfirmHook:z}=r.getConfig();z&&(0,vr.safeExecuteInTheMiddle)(()=>z(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:l,isConfirmChannel:!0,confirmError:w}),G=>{G&&Xo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),w&&y.setStatus({code:Xo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},x=(0,_i.markConfirmChannelTracing)(Xo.context.active()),D=[...arguments];return D[3]=S,D[4]=Xo.context.bind((0,_i.unmarkConfirmChannelTracing)(Xo.trace.setSpan(x,y)),v),Xo.context.with(x,n.bind(this,...D))}}getPublishPatch(t,n){let r=this;return function(i,a,c,l){if((0,_i.isConfirmChannelTracing)(Xo.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,f,l),{publishHook:S}=r.getConfig();S&&(0,vr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),x=>{x&&Xo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let b=[...arguments];b[3]=y;let v=n.apply(this,b);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let a=(0,_i.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Xo.SpanKind.PRODUCER,attributes:{...o.connection[_i.CONNECTION_ATTRIBUTES],[ql.ATTR_MESSAGING_DESTINATION]:n,[ql.ATTR_MESSAGING_DESTINATION_KIND]:ql.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[ql.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[ql.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[ql.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},Xo.propagation.inject(Xo.trace.setSpan(Xo.context.active(),c),l.headers),{span:c,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[_i.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Xo.SpanStatusCode.ERROR,message:r!==Ku.EndOperation.ChannelClosed&&r!==Ku.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[_i.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[_i.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[_i.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,vr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Xo.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,L3.hrTime)(),r=t[_i.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,L3.hrTimeDuration)(a.timeOfConsume,n);if((0,L3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Ku.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};Q3.AmqplibInstrumentation=DZ});var BPe=F(SE=>{"use strict";A();Object.defineProperty(SE,"__esModule",{value:!0});SE.EndOperation=SE.DEFAULT_CONFIG=SE.AmqplibInstrumentation=void 0;var Avt=xPe();Object.defineProperty(SE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return Avt.AmqplibInstrumentation}});var DPe=vZ();Object.defineProperty(SE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return DPe.DEFAULT_CONFIG}});Object.defineProperty(SE,"EndOperation",{enumerable:!0,get:function(){return DPe.EndOperation}})});var NPe,OPe,gvt,kPe,hvt,wPe,PPe=O(()=>{A();NPe=ae(BPe(),1);hr();OPe="Amqplib",gvt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},kPe=st(OPe,()=>new NPe.AmqplibInstrumentation(gvt)),hvt=(()=>({name:OPe,setupOnce(){kPe()}})),wPe=hvt});var UO,BZ=O(()=>{A();UO="VercelAI"});function Evt(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 yvt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(Svt(t.content),Tvt(t.content))}function Svt(e){for(let t of e){if(!Evt(t))continue;let n=a7(t.toolCallId);n?wl(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}})}):wl(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 Tvt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&s7(t.toolCallId)}function Ivt(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 G3,_vt,MPe,F3,LPe=O(()=>{A();G3=ae(on(),1);dt();BZ();_vt=[">=3.0.0 <7"],MPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];F3=class e extends G3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Xn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new G3.InstrumentationNodeModuleDefinition("ai",_vt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},l=c.isEnabled,f=gt(),h=f?.getIntegrationByName(UO),y=h?.options,S=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:v}=Ivt(y,c,l,S);return a[0].experimental_telemetry={...c,isEnabled:l!==void 0?l:!0,recordInputs:b,recordOutputs:v},pf(()=>Reflect.apply(o,i,a),x=>{x&&typeof x=="object"&&Xi(x,"_sentry_active_span",Mc())},()=>{},x=>{yvt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of MPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=MPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function bvt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var UPe,Cvt,QPe,FPe=O(()=>{A();dt();hr();BZ();LPe();UPe=st(UO,()=>new F3({}));Cvt=((e={})=>{let t;return{name:UO,options:e,setupOnce(){t=UPe()},afterAllSetup(n){e.force??bvt(n)?qU(n):t?.callWhenPatched(()=>qU(n))}}}),QPe=Cvt});var j3,vvt,z3,GPe=O(()=>{A();j3=ae(on(),1);dt();vvt=[">=4.0.0 <7"],z3=class extends j3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Xn,t)}init(){return new j3.InstrumentationNodeModuleDefinition("openai",vvt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...a){if(eS($_))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return KU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}try{t[n]=i}catch{Object.defineProperty(t,n,{value:i,writable:!0,configurable:!0,enumerable:!0})}if(t.default===r)try{t.default=i}catch{Object.defineProperty(t,"default",{value:i,writable:!0,configurable:!0,enumerable:!0})}return t}}});var zPe,Rvt,jPe,HPe=O(()=>{A();dt();hr();GPe();zPe=st($_,e=>new z3(e)),Rvt=((e={})=>({name:$_,setupOnce(){zPe(e)}})),jPe=Rvt});var $3,xvt,H3,$Pe=O(()=>{A();$3=ae(on(),1);dt();xvt=[">=0.19.2 <1.0.0"],H3=class extends $3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Xn,t)}init(){return new $3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",xvt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(eS(q_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return JU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var qPe,Dvt,VPe,YPe=O(()=>{A();dt();hr();$Pe();qPe=st(q_,e=>new H3(e)),Dvt=((e={})=>({name:q_,options:e,setupOnce(){qPe(e)}})),VPe=Dvt});var _R,KPe,q3,JPe=O(()=>{A();_R=ae(on(),1);dt();KPe=[">=0.10.0 <2"],q3=class extends _R.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Xn,t)}init(){return new _R.InstrumentationNodeModuleDefinition("@google/genai",KPe,n=>this._patch(n),n=>n,[new _R.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",KPe,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(eS(V_))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return ZU(a,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let a=Object.getOwnPropertyDescriptor(n,i);a&&Object.defineProperty(o,i,a)}return hN(t,"GoogleGenAI",o),t}}});var ZPe,Bvt,WPe,XPe=O(()=>{A();dt();hr();JPe();ZPe=st(V_,e=>new q3(e)),Bvt=((e={})=>({name:V_,setupOnce(){ZPe(e)}})),WPe=Bvt});function Nvt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function Ovt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let l=c.callbacks,f=Nvt(l,t);return c.callbacks=f,Reflect.apply(r,o,i)}})}var TE,V3,Y3,e2e=O(()=>{A();TE=ae(on(),1);dt();V3=[">=0.1.0 <2.0.0"];Y3=class extends TE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Xn,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 TE.InstrumentationNodeModuleDefinition(r,V3,this._patch.bind(this),o=>o,[new TE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,V3,this._patch.bind(this),o=>o)]));return t.push(new TE.InstrumentationNodeModuleDefinition("langchain",V3,this._patch.bind(this),r=>r,[new TE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",V3,this._patch.bind(this),r=>r)])),t}_patch(t){IV([$_,q_,V_]);let n=tQ(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 a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let l of c){let f=a[l];typeof f=="function"&&(a[l]=Ovt(f,n))}}}});var t2e,kvt,n2e,r2e=O(()=>{A();dt();hr();e2e();t2e=st(WU,e=>new Y3(e)),kvt=((e={})=>({name:WU,setupOnce(){t2e(e)}})),n2e=kvt});var ER,o2e,K3,i2e=O(()=>{A();ER=ae(on(),1);dt();o2e=[">=0.0.0 <2.0.0"],K3=class extends ER.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Xn,t)}init(){return new ER.InstrumentationNodeModuleDefinition("@langchain/langgraph",o2e,this._patch.bind(this),n=>n,[new ER.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",o2e,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&rQ(t.StateGraph.prototype,this.getConfig()),t}}});var a2e,wvt,s2e,u2e=O(()=>{A();dt();hr();i2e();a2e=st(nQ,e=>new K3(e)),wvt=((e={})=>({name:nQ,setupOnce(){a2e(e)}})),s2e=wvt});import*as l2e from"node:net";function d2e(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,zg.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&Nl.error(y?.message)},!0)});let l=new zg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>c2e(h,n,r,e,a)),f=["@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 f)l.files.push(new zg.InstrumentationNodeModuleFile(h,t,y=>c2e(y,n,r,e,a),y=>p2e(y,r)));return l}function c2e(e,t,n,r,o){return p2e(e,n),t(e,"addDoc",Pvt(r,o)),t(e,"getDocs",Lvt(r,o)),t(e,"setDoc",Uvt(r,o)),t(e,"deleteDoc",Mvt(r,o)),e}function p2e(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,zg.isWrapped)(e[n])&&t(e,n);return e}function Pvt(e,t){return function(r){return function(o,i){let a=Z3(e,"addDoc",o);return t(a),J3(a,()=>r(o,i))}}}function Mvt(e,t){return function(r){return function(o){let i=Z3(e,"deleteDoc",o.parent||o);return t(i),J3(i,()=>r(o))}}}function Lvt(e,t){return function(r){return function(o){let i=Z3(e,"getDocs",o);return t(i),J3(i,()=>r(o))}}}function Uvt(e,t){return function(r){return function(o,i,a){let c=Z3(e,"setDoc",o.parent||o);return t(c),J3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function J3(e,t){return Ke.with($t.setSpan(Ke.active(),e),()=>(0,zg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function Z3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:co.CLIENT});return Fvt(r,n),r.setAttribute(iC,t),r}function Qvt(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(l2e.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 Fvt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[V9]:t.path,[Y9]:n.name,[My]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:l}=Qvt(i);c&&(a[n5]=c),l&&(a[r5]=l),e.setAttributes(a)}var zg,f2e=O(()=>{A();ze();zg=ae(on(),1);Wn()});function m2e(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(a=(S,b)=>{(0,jg.safeExecuteInTheMiddle)(()=>f(S,b),v=>{v&&Nl.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,jg.safeExecuteInTheMiddle)(()=>l(S),b=>{b&&Nl.error(b?.message)},!0)});let h=new jg.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:b})=>{h.files.push(new jg.InstrumentationNodeModuleFile(S,t,v=>Gvt(v,n,r,e,{requestHook:i,responseHook:a,errorHook:c},b),v=>A2e(v,r)))}),h}function Ju(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:co.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),Ke.with($t.setSpan(Ke.active(),y),async()=>{let b,v;try{v=await a.apply(this,f)}catch(x){b=x}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return v})};return c?o.call(this,c,l):o.call(this,l)}}}function Gvt(e,t,n,r,o,i){switch(A2e(e,n),i){case"function":t(e,"onRequest",Ju(r,o,"http.request")),t(e,"onCall",Ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ju(r,o,"storage.object.metadataUpdated"));break}return e}function A2e(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,jg.isWrapped)(e[r])&&t(e,r);return e}var jg,g2e=O(()=>{A();ze();jg=ae(on(),1)});var _2e,h2e,zvt,jvt,W3,E2e=O(()=>{A();_2e=ae(on(),1);dt();f2e();g2e();h2e={},zvt=[">=3.0.0 <5"],jvt=[">=6.0.0 <7"],W3=class extends _2e.InstrumentationBase{constructor(t=h2e){super("@sentry/instrumentation-firebase",Xn,t)}setConfig(t={}){super.setConfig({...h2e,...t})}init(){let t=[];return t.push(d2e(this.tracer,zvt,this._wrap,this._unwrap,this.getConfig())),t.push(m2e(this.tracer,jvt,this._wrap,this._unwrap,this.getConfig())),t}}});var y2e,Hvt,S2e,$vt,T2e,I2e=O(()=>{A();dt();hr();E2e();y2e="Firebase",Hvt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(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 jC(2e3))}}},S2e=st(y2e,()=>new W3(Hvt)),$vt=(()=>({name:y2e,setupOnce(){S2e()}})),T2e=$vt});function b2e(){return[RDe(),sBe(),wBe(),Twe(),SNe(),MNe(),YNe(),aOe(),UOe(),ike(),rwe(),hwe(),Uwe(),Zwe(),dPe(),yPe(),ZBe(),wPe(),uNe(),n2e(),s2e(),QPe(),jPe(),VPe(),WPe(),cke(),T2e()]}var C2e=O(()=>{A();PPe();YPe();Wwe();xDe();lBe();I2e();SPe();XPe();MBe();_we();Iwe();WBe();Qwe();r2e();u2e();cNe();TNe();LNe();KNe();sOe();HPe();ake();lke();owe();QOe();pPe();FPe()});function R2e(e,t={}){e.getOptions().debug&&UY();let[n,r]=qvt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function qvt(e,t={}){let n=new v2e.BasicTracerProvider({sampler:new cF(e),resource:(0,X3.defaultResource)().merge((0,X3.resourceFromAttributes)({[o5]:"node",[q9]:"sentry",[i5]:Xn})),forceFlushTimeoutMillis:500,spanProcessors:[new uF({timeout:Vvt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});$t.setGlobalTracerProvider(n),tf.setGlobalPropagator(new sF);let r=new dF;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function Vvt(e){if(e!=null){if(e>NZ)return ba&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${NZ}`),NZ;if(e<=0||Number.isNaN(e)){ba&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var X3,v2e,NZ,x2e=O(()=>{A();ze();X3=ae(Z7(),1),v2e=ae(IY(),1);Wn();dt();hr();Sv();hS();NZ=1e6});function D2e(){return _F().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(rDe(),pDe())}function B2e(e){return[...D2e(),...wi(e)?b2e():[]]}function OZ(e={}){return Yvt(e,B2e)}function Yvt(e={},t){tS(e,"node");let n=lK({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(R2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),EF()),n}var N2e=O(()=>{A();dt();hr();oDe();fDe();C2e();x2e()});var yR=O(()=>{A();N2e();dt();hr()});function Zr(){return Kvt}function cu(){return O2e}function k2e(){return Jvt}var Kvt,O2e,Jvt,qc=O(()=>{"use strict";A();Kvt="prod",O2e="0.1.162",Jvt=`@tanagram/lore/${O2e}`});function tRt(e=""){if(!Xvt.test(e))return e!==e.toLowerCase()}function w2e(e,t){let n=t??eRt,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let l=n.includes(c);if(l===!0){r.push(o),o="",i=void 0;continue}let f=tRt(c);if(a===!1){if(i===!1&&f===!0){r.push(o),o=c,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=f;continue}}o+=c,i=f,a=l}return r.push(o),r}function nRt(e){return e?e[0].toUpperCase()+e.slice(1):""}function rRt(e){return e?e[0].toLowerCase()+e.slice(1):""}function oRt(e,t){return e?(Array.isArray(e)?e:w2e(e)).map(n=>nRt(t?.normalize?n.toLowerCase():n)).join(""):""}function FO(e,t){return rRt(oRt(e||"",t))}function e6(e,t){return e?(Array.isArray(e)?e:w2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function P2e(e){return e6(e||"","_")}var Xvt,eRt,M2e=O(()=>{A();Xvt=/\d/,eRt=["-","_","/","."]});import{parseArgs as iRt}from"node:util";function o6(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function kZ(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 Vl(e){return typeof e=="function"?e():e}function aRt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},a=new Map,c=new Map;for(let[D,w]of Object.entries(o)){let Q=w;for(let z of Q)a.set(D,z),c.has(z)||c.set(z,[]),c.get(z).push(D),a.set(z,D),c.has(D)||c.set(D,[]),c.get(D).push(z)}let l={};function f(D){if(n.has(D))return"boolean";let w=c.get(D)||[];for(let Q of w)if(n.has(Q))return"boolean";return"string"}function h(D){if(r.has(D))return!0;let w=c.get(D)||[];for(let Q of w)if(r.has(Q))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let D of y)l[D]||(l[D]={type:f(D),default:i[D]});for(let[D,w]of a.entries())D.length===1&&l[w]&&!l[w].short&&(l[w].short=D);let S=[],b={};for(let D=0;D<e.length;D++){let w=e[D];if(w==="--"){S.push(...e.slice(D));break}if(w.startsWith("--no-")){let Q=w.slice(5);b[Q]=!0;continue}S.push(w)}let v;try{v=iRt({args:S,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:S}}let x={_:[]};x._=v.positionals;for(let[D,w]of Object.entries(v.values)){let Q=w;f(D)==="boolean"&&typeof w=="string"?Q=w!=="false":h(D)&&typeof w=="boolean"&&(Q=""),x[D]=Q}for(let[D]of Object.entries(b)){x[D]=!1;let w=a.get(D);w&&(x[w]=!1);let Q=c.get(D);if(Q)for(let z of Q)x[z]=!1}for(let[D,w]of a.entries())x[D]!==void 0&&x[w]===void 0&&(x[w]=x[D]),x[w]!==void 0&&x[D]===void 0&&(x[D]=x[w]),x[D]!==x[w]&&i[w]===x[w]&&(x[w]=x[D]);return x}function uRt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=Q2e(t);for(let c of r){if(c.type==="positional")continue;c.type==="string"||c.type==="enum"?n.string.push(c.name):c.type==="boolean"&&n.boolean.push(c.name),c.default!==void 0&&(n.default[c.name]=c.default),c.alias&&(n.alias[c.name]=c.alias);let l=FO(c.name),f=e6(c.name);if(l!==c.name||f!==c.name){let h=o6(n.alias[c.name]||[]);l!==c.name&&!h.includes(l)&&h.push(l),f!==c.name&&!h.includes(f)&&h.push(f),h.length>0&&(n.alias[c.name]=h)}}let o=aRt(e,n),[...i]=o._,a=new Proxy(o,{get(c,l){return c[l]??c[FO(l)]??c[e6(l)]}});for(let[,c]of r.entries())if(c.type==="positional"){let l=i.shift();if(l!==void 0)a[c.name]=l;else{if(c.default===void 0&&c.required!==!1)throw new OS(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let l=a[c.name],f=c.options||[];if(l!==void 0&&f.length>0&&!f.includes(l))throw new OS(`Invalid value for argument: ${Ef(`--${c.name}`)} (${Ef(l)}). Expected one of: ${f.map(h=>Ef(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new OS(`Missing required argument: --${c.name}`,"EARG");return a}function Q2e(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:o6(r.alias)});return t}async function cRt(e){return Promise.all(e.map(t=>Vl(t)))}async function kS(e,t){let n=await Vl(e.args||{}),r=uRt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await cRt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let f=await Vl(e.subCommands);if(f&&Object.keys(f).length>0){let h=lRt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await L2e(f,y);if(!S)throw new OS(`Unknown command ${Ef(y)}`,"E_UNKNOWN_COMMAND");await kS(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await Vl(e.default);if(S){if(e.run)throw new OS("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let b=await L2e(f,S);if(!b)throw new OS(`Default sub command ${Ef(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await kS(b,{rawArgs:t.rawArgs})}else if(!e.run)throw new OS("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(f){c=f}let l=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(f){l.push(f)}for(let f of[...i].reverse())try{await f.cleanup?.(o)}catch(h){l.push(h)}if(c)throw c;if(l.length===1)throw l[0];if(l.length>1)throw new Error("Multiple cleanup errors",{cause:l});return{result:a}}async function L2e(e,t){if(t in e)return Vl(e[t]);for(let n of Object.values(e)){let r=await Vl(n),o=await Vl(r?.meta);if(o?.alias&&o6(o.alias).includes(t))return r}}function lRt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&dRt(r,t)&&n++;continue}return n}return-1}function dRt(e,t){let n=e.replace(/^-{1,2}/,""),r=FO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===FO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function PZ(e,t){let n=await Vl(e.meta||{}),r=Q2e(await Vl(e.args||{})),o=await Vl(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],l=[],f=[];for(let b of r)if(b.type==="positional"){let v=b.name.toUpperCase(),x=b.required!==!1&&b.default===void 0;c.push([Ef(v+wZ(b)),U2e(b,x)]),f.push(x?`<${v}>`:`[${v}]`)}else{let v=b.required===!0&&b.default===void 0,x=[...(b.alias||[]).map(D=>`-${D}`),`--${b.name}`].join(", ")+wZ(b);if(a.push([Ef(x),U2e(b,v)]),b.type==="boolean"&&(b.default===!0||b.negativeDescription)&&!pRt.test(b.name)){let D=[...(b.alias||[]).map(w=>`--no-${w}`),`--no-${b.name}`].join(", ");a.push([Ef(D),[b.negativeDescription,v?r6("(Required)"):""].filter(Boolean).join(" ")])}v&&f.push(`--${b.name}`+wZ(b))}if(e.subCommands){let b=[],v=await Vl(e.subCommands);for(let[x,D]of Object.entries(v)){let w=await Vl((await Vl(D))?.meta);if(w?.hidden)continue;let Q=o6(w?.alias),z=[x,...Q].join(", ");l.push([Ef(z),w?.description||""]),b.push(x,...Q)}f.push(b.join("|"))}let h=[],y=n.version||o.version;h.push(r6(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=a.length>0||c.length>0;return h.push(`${n6(t6("USAGE"))} ${Ef(`${i}${S?" [OPTIONS]":""} ${f.join(" ")}`)}`,""),c.length>0&&(h.push(n6(t6("ARGUMENTS")),""),h.push(kZ(c," ")),h.push("")),a.length>0&&(h.push(n6(t6("OPTIONS")),""),h.push(kZ(a," ")),h.push("")),l.length>0&&(h.push(n6(t6("COMMANDS")),""),h.push(kZ(l," ")),h.push("",`Use ${Ef(`${i} <command> --help`)} for more information about a command.`)),h.filter(b=>typeof b=="string").join(`
40
40
  `)}function wZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${P2e(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function U2e(e,t){let n=t?r6("(Required)"):"",r=e.default===void 0?"":r6(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var OS,sRt,i6,t6,Ef,r6,n6,pRt,MZ=O(()=>{A();M2e();OS=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};sRt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),i6=(e,t=39)=>n=>sRt?n:`\x1B[${e}m${n}\x1B[${t}m`,t6=i6(1,22),Ef=i6(36),r6=i6(90),n6=i6(4,24);pRt=/^no[-A-Z]/});function mRt(e){j2e=e}function s6(){return j2e}function ut(e,t){let n=u6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,s6(),GO].filter(r=>!!r)});e.common.issues.push(n)}function Rn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,c)=>a.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:r??c.defaultError}:{message:n??c.defaultError},description:o}}function CRt(e,t){return!!((t==="v4"||!t)&&TRt.test(e)||(t==="v6"||!t)&&IRt.test(e))}function vRt(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}function SR(e){if(e instanceof pu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=yf.create(SR(r))}return new pu({...e._def,shape:()=>t})}else return e instanceof $g?new $g({...e._def,type:SR(e.element)}):e instanceof yf?yf.create(SR(e.unwrap())):e instanceof qg?qg.create(SR(e.unwrap())):e instanceof Zm?Zm.create(e.items.map(t=>SR(t))):e}function zZ(e,t){let n=IE(e),r=IE(t);if(e===t)return{valid:!0,data:e};if(n===at.object&&r===at.object){let o=yr.objectKeys(t),i=yr.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let l=zZ(e[c],t[c]);if(!l.valid)return{valid:!1};a[c]=l.data}return{valid:!0,data:a}}else if(n===at.array&&r===at.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let a=e[i],c=t[i],l=zZ(a,c);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 $2e(e,t){return new HS({values:e,typeName:Kt.ZodEnum,...Rn(t)})}var yr,QZ,at,IE,qe,fRt,Vc,GO,j2e,u6,ARt,du,_n,H2e,Zu,FZ,GZ,zO,c6,Lt,op,F2e,xn,gRt,hRt,_Rt,ERt,yRt,SRt,TRt,IRt,bRt,bE,wS,PS,MS,LS,TR,US,QS,CE,Hg,Sf,IR,$g,pu,FS,a6,l6,GS,Zm,d6,bR,CR,p6,zS,jS,HS,$S,vE,Yl,yf,qg,qS,vR,RR,RRt,f6,jO,xR,q2e,xRt,Kt,DRt,V2e,Y2e,BRt,NRt,K2e,ORt,kRt,wRt,PRt,MRt,LRt,URt,QRt,FRt,GRt,zRt,jRt,HRt,$Rt,qRt,VRt,YRt,KRt,JRt,ZRt,WRt,XRt,ext,txt,G2e,nxt,rxt,oxt,ixt,axt,sxt,uxt,cxt,lxt,lu,dxt,LZ,pxt,rp,jZ,BRn,NRn,ORn,J2e,fxt,mxt,Axt,gxt,Z2e,W2e,X2e,UZ,is,hxt,_xt,Ext,yxt,HZ,$Z,qZ,Sxt,z2e,Txt,Ixt,bxt,Cxt,VZ,Tf=O(()=>{A();(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function n(o){throw new Error}e.assertNever=n,e.arrayToEnum=o=>{let i={};for(let a of o)i[a]=a;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),a={};for(let c of i)a[c]=o[c];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(let a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(yr||(yr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(QZ||(QZ={}));at=yr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),IE=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}},qe=yr.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"]),fRt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),Vc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,l=0;for(;l<a.path.length;){let f=a.path[l];l===a.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(a))):c[f]=c[f]||{_errors:[]},c=c[f],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,yr.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()}};Vc.create=e=>new Vc(e);GO=(e,t)=>{let n;switch(e.code){case qe.invalid_type:e.received===at.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case qe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,yr.jsonStringifyReplacer)}`;break;case qe.unrecognized_keys:n=`Unrecognized key(s) in object: ${yr.joinValues(e.keys,", ")}`;break;case qe.invalid_union:n="Invalid input";break;case qe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${yr.joinValues(e.options)}`;break;case qe.invalid_enum_value:n=`Invalid enum value. Expected ${yr.joinValues(e.options)}, received '${e.received}'`;break;case qe.invalid_arguments:n="Invalid function arguments";break;case qe.invalid_return_type:n="Invalid function return type";break;case qe.invalid_date:n="Invalid date";break;case qe.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}"`:yr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case qe.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 qe.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 qe.custom:n="Invalid input";break;case qe.invalid_intersection_types:n="Intersection results could not be merged";break;case qe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case qe.not_finite:n="Number must be finite";break;default:n=t.defaultError,yr.assertNever(e)}return{message:n}},j2e=GO;u6=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",l=r.filter(f=>!!f).slice().reverse();for(let f of l)c=f(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},ARt=[];du=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 _n;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return _n;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(r[i.value]=a.value)}return{status:t.value,value:r}}},_n=Object.freeze({status:"aborted"}),H2e=e=>({status:"dirty",value:e}),Zu=e=>({status:"valid",value:e}),FZ=e=>e.status==="aborted",GZ=e=>e.status==="dirty",zO=e=>e.status==="valid",c6=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={}));op=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}},F2e=(e,t)=>{if(zO(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 Vc(e.common.issues);return this._error=n,this._error}}};xn=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 IE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:IE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new du,ctx:{common:t.parent.common,data:t.data,parsedType:IE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(c6(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:IE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return F2e(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:IE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(c6(o)?o:Promise.resolve(o));return F2e(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let a=t(o),c=()=>i.addIssue({code:qe.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Yl({schema:this,typeName:Kt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return yf.create(this,this._def)}nullable(){return qg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return $g.create(this,this._def)}promise(){return vE.create(this,this._def)}or(t){return FS.create([this,t],this._def)}and(t){return GS.create(this,t,this._def)}transform(t){return new Yl({...Rn(this._def),schema:this,typeName:Kt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new qS({...Rn(this._def),innerType:this,defaultValue:n,typeName:Kt.ZodDefault})}brand(){return new f6({typeName:Kt.ZodBranded,type:this,...Rn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new vR({...Rn(this._def),innerType:this,catchValue:n,typeName:Kt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return jO.create(this,t)}readonly(){return xR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},gRt=/^c[^\s-]{8,}$/i,hRt=/^[a-z][a-z0-9]*$/,_Rt=/[0-9A-HJKMNP-TV-Z]{26}/,ERt=/^[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,yRt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,SRt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),TRt=/^(((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}))$/,IRt=/^(([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})))$/,bRt=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$");bE=class e extends xn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:qe.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 ut(i,{code:qe.invalid_type,expected:at.string,received:i.parsedType}),_n}let r=new du,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let a=t.data.length>i.value,c=t.data.length<i.value;(a||c)&&(o=this._getOrReturnCtx(t,o),a?ut(o,{code:qe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:qe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")yRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")SRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ERt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")gRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")hRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_Rt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ut(o,{validation:"url",code:qe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"regex",code:qe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?bRt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?CRt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:qe.invalid_string,message:i.message}),r.dirty()):yr.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}};bE.create=e=>{var t;return new bE({checks:[],typeName:Kt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};wS=class e extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==at.number){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:at.number,received:i.parsedType}),_n}let r,o=new du;for(let i of this._def.checks)i.kind==="int"?yr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?vRt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_finite,message:i.message}),o.dirty()):yr.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"&&yr.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)}};wS.create=e=>new wS({checks:[],typeName:Kt.ZodNumber,coerce:e?.coerce||!1,...Rn(e)});PS=class e extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==at.bigint){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:at.bigint,received:i.parsedType}),_n}let r,o=new du;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):yr.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}};PS.create=e=>{var t;return new PS({checks:[],typeName:Kt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};MS=class extends xn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==at.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.boolean,received:r.parsedType}),_n}return Zu(t.data)}};MS.create=e=>new MS({typeName:Kt.ZodBoolean,coerce:e?.coerce||!1,...Rn(e)});LS=class e extends xn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==at.date){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:at.date,received:i.parsedType}),_n}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_date}),_n}let r=new du,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):yr.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}};LS.create=e=>new LS({checks:[],coerce:e?.coerce||!1,typeName:Kt.ZodDate,...Rn(e)});TR=class extends xn{_parse(t){if(this._getType(t)!==at.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.symbol,received:r.parsedType}),_n}return Zu(t.data)}};TR.create=e=>new TR({typeName:Kt.ZodSymbol,...Rn(e)});US=class extends xn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.undefined,received:r.parsedType}),_n}return Zu(t.data)}};US.create=e=>new US({typeName:Kt.ZodUndefined,...Rn(e)});QS=class extends xn{_parse(t){if(this._getType(t)!==at.null){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.null,received:r.parsedType}),_n}return Zu(t.data)}};QS.create=e=>new QS({typeName:Kt.ZodNull,...Rn(e)});CE=class extends xn{constructor(){super(...arguments),this._any=!0}_parse(t){return Zu(t.data)}};CE.create=e=>new CE({typeName:Kt.ZodAny,...Rn(e)});Hg=class extends xn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zu(t.data)}};Hg.create=e=>new Hg({typeName:Kt.ZodUnknown,...Rn(e)});Sf=class extends xn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:qe.invalid_type,expected:at.never,received:n.parsedType}),_n}};Sf.create=e=>new Sf({typeName:Kt.ZodNever,...Rn(e)});IR=class extends xn{_parse(t){if(this._getType(t)!==at.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.void,received:r.parsedType}),_n}return Zu(t.data)}};IR.create=e=>new IR({typeName:Kt.ZodVoid,...Rn(e)});$g=class e extends xn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==at.array)return ut(n,{code:qe.invalid_type,expected:at.array,received:n.parsedType}),_n;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(ut(n,{code:a?qe.too_big:qe.too_small,minimum:c?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ut(n,{code:qe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ut(n,{code:qe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>o.type._parseAsync(new op(n,a,n.path,c)))).then(a=>du.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new op(n,a,n.path,c)));return du.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)}};$g.create=(e,t)=>new $g({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Kt.ZodArray,...Rn(t)});pu=class e extends xn{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=yr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==at.object){let f=this._getOrReturnCtx(t);return ut(f,{code:qe.invalid_type,expected:at.object,received:f.parsedType}),_n}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Sf&&this._def.unknownKeys==="strip"))for(let f in o.data)a.includes(f)||c.push(f);let l=[];for(let f of a){let h=i[f],y=o.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new op(o,y,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof Sf){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of c)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")c.length>0&&(ut(o,{code:qe.unrecognized_keys,keys:c}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of c){let y=o.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new op(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let y=await h.key;f.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return f}).then(f=>du.mergeObjectSync(r,f)):du.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,a,c;let l=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=Lt.errToObj(t).message)!==null&&c!==void 0?c: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:Kt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return yr.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 yr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return SR(this)}partial(t){let n={};return yr.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 yr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof yf;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return $2e(yr.objectKeys(this.shape))}};pu.create=(e,t)=>new pu({shape:()=>e,unknownKeys:"strip",catchall:Sf.create(),typeName:Kt.ZodObject,...Rn(t)});pu.strictCreate=(e,t)=>new pu({shape:()=>e,unknownKeys:"strict",catchall:Sf.create(),typeName:Kt.ZodObject,...Rn(t)});pu.lazycreate=(e,t)=>new pu({shape:e,unknownKeys:"strip",catchall:Sf.create(),typeName:Kt.ZodObject,...Rn(t)});FS=class extends xn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let a=i.map(c=>new Vc(c.ctx.common.issues));return ut(n,{code:qe.invalid_union,unionErrors:a}),_n}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let l of r){let f={...n,common:{...n.common,issues:[]},parent:null},h=l._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:f}),f.common.issues.length&&a.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(l=>new Vc(l));return ut(n,{code:qe.invalid_union,unionErrors:c}),_n}}get options(){return this._def.options}};FS.create=(e,t)=>new FS({options:e,typeName:Kt.ZodUnion,...Rn(t)});a6=e=>e instanceof zS?a6(e.schema):e instanceof Yl?a6(e.innerType()):e instanceof jS?[e.value]:e instanceof HS?e.options:e instanceof $S?Object.keys(e.enum):e instanceof qS?a6(e._def.innerType):e instanceof US?[void 0]:e instanceof QS?[null]:null,l6=class e extends xn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.object)return ut(n,{code:qe.invalid_type,expected:at.object,received:n.parsedType}),_n;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ut(n,{code:qe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_n)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let a=a6(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let c of a){if(o.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);o.set(c,i)}}return new e({typeName:Kt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Rn(r)})}};GS=class extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(FZ(i)||FZ(a))return _n;let c=zZ(i.value,a.value);return c.valid?((GZ(i)||GZ(a))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:qe.invalid_intersection_types}),_n)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};GS.create=(e,t,n)=>new GS({left:e,right:t,typeName:Kt.ZodIntersection,...Rn(n)});Zm=class e extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.array)return ut(r,{code:qe.invalid_type,expected:at.array,received:r.parsedType}),_n;if(r.data.length<this._def.items.length)return ut(r,{code:qe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_n;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:qe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new op(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>du.mergeArray(n,a)):du.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Zm.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Zm({items:e,typeName:Kt.ZodTuple,rest:null,...Rn(t)})};d6=class e extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.object)return ut(r,{code:qe.invalid_type,expected:at.object,received:r.parsedType}),_n;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new op(r,c,r.path,c)),value:a._parse(new op(r,r.data[c],r.path,c))});return r.common.async?du.mergeObjectAsync(n,o):du.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xn?new e({keyType:t,valueType:n,typeName:Kt.ZodRecord,...Rn(r)}):new e({keyType:bE.create(),valueType:t,typeName:Kt.ZodRecord,...Rn(n)})}},bR=class extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.map)return ut(r,{code:qe.invalid_type,expected:at.map,received:r.parsedType}),_n;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,l],f)=>({key:o._parse(new op(r,c,r.path,[f,"key"])),value:i._parse(new op(r,l,r.path,[f,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of a){let f=await l.key,h=await l.value;if(f.status==="aborted"||h.status==="aborted")return _n;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(f.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of a){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return _n;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(f.value,h.value)}return{status:n.value,value:c}}}};bR.create=(e,t,n)=>new bR({valueType:t,keyType:e,typeName:Kt.ZodMap,...Rn(n)});CR=class e extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==at.set)return ut(r,{code:qe.invalid_type,expected:at.set,received:r.parsedType}),_n;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:qe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ut(r,{code:qe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(l){let f=new Set;for(let h of l){if(h.status==="aborted")return _n;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}let c=[...r.data.values()].map((l,f)=>i._parse(new op(r,l,r.path,f)));return r.common.async?Promise.all(c).then(l=>a(l)):a(c)}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)}};CR.create=(e,t)=>new CR({valueType:e,minSize:null,maxSize:null,typeName:Kt.ZodSet,...Rn(t)});p6=class e extends xn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.function)return ut(n,{code:qe.invalid_type,expected:at.function,received:n.parsedType}),_n;function r(c,l){return u6({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s6(),GO].filter(f=>!!f),issueData:{code:qe.invalid_arguments,argumentsError:l}})}function o(c,l){return u6({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,s6(),GO].filter(f=>!!f),issueData:{code:qe.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof vE){let c=this;return Zu(async function(...l){let f=new Vc([]),h=await c._def.args.parseAsync(l,i).catch(b=>{throw f.addIssue(r(l,b)),f}),y=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(y,i).catch(b=>{throw f.addIssue(o(y,b)),f})})}else{let c=this;return Zu(function(...l){let f=c._def.args.safeParse(l,i);if(!f.success)throw new Vc([r(l,f.error)]);let h=Reflect.apply(a,this,f.data),y=c._def.returns.safeParse(h,i);if(!y.success)throw new Vc([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:Zm.create(t).rest(Hg.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||Zm.create([]).rest(Hg.create()),returns:n||Hg.create(),typeName:Kt.ZodFunction,...Rn(r)})}},zS=class extends xn{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})}};zS.create=(e,t)=>new zS({getter:e,typeName:Kt.ZodLazy,...Rn(t)});jS=class extends xn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:qe.invalid_literal,expected:this._def.value}),_n}return{status:"valid",value:t.data}}get value(){return this._def.value}};jS.create=(e,t)=>new jS({value:e,typeName:Kt.ZodLiteral,...Rn(t)});HS=class e extends xn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{expected:yr.joinValues(r),received:n.parsedType,code:qe.invalid_type}),_n}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:qe.invalid_enum_value,options:r}),_n}return Zu(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};HS.create=$2e;$S=class extends xn{_parse(t){let n=yr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==at.string&&r.parsedType!==at.number){let o=yr.objectValues(n);return ut(r,{expected:yr.joinValues(o),received:r.parsedType,code:qe.invalid_type}),_n}if(n.indexOf(t.data)===-1){let o=yr.objectValues(n);return ut(r,{received:r.data,code:qe.invalid_enum_value,options:o}),_n}return Zu(t.data)}get enum(){return this._def.values}};$S.create=(e,t)=>new $S({values:e,typeName:Kt.ZodNativeEnum,...Rn(t)});vE=class extends xn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==at.promise&&n.common.async===!1)return ut(n,{code:qe.invalid_type,expected:at.promise,received:n.parsedType}),_n;let r=n.parsedType===at.promise?n.data:Promise.resolve(n.data);return Zu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};vE.create=(e,t)=>new vE({type:e,typeName:Kt.ZodPromise,...Rn(t)});Yl=class extends xn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Kt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{ut(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){let a=c=>{let l=o.refinement(c,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 c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?_n:(c.status==="dirty"&&n.dirty(),a(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?_n:(c.status==="dirty"&&n.dirty(),a(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(r.common.async===!1){let a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!zO(a))return a;let c=o.transform(a.value,i);if(c instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:c}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>zO(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);yr.assertNever(o)}};Yl.create=(e,t,n)=>new Yl({schema:e,typeName:Kt.ZodEffects,effect:t,...Rn(n)});Yl.createWithPreprocess=(e,t,n)=>new Yl({schema:t,effect:{type:"preprocess",transform:e},typeName:Kt.ZodEffects,...Rn(n)});yf=class extends xn{_parse(t){return this._getType(t)===at.undefined?Zu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};yf.create=(e,t)=>new yf({innerType:e,typeName:Kt.ZodOptional,...Rn(t)});qg=class extends xn{_parse(t){return this._getType(t)===at.null?Zu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};qg.create=(e,t)=>new qg({innerType:e,typeName:Kt.ZodNullable,...Rn(t)});qS=class extends xn{_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}};qS.create=(e,t)=>new qS({innerType:e,typeName:Kt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Rn(t)});vR=class extends xn{_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 c6(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};vR.create=(e,t)=>new vR({innerType:e,typeName:Kt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Rn(t)});RR=class extends xn{_parse(t){if(this._getType(t)!==at.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:at.nan,received:r.parsedType}),_n}return{status:"valid",value:t.data}}};RR.create=e=>new RR({typeName:Kt.ZodNaN,...Rn(e)});RRt=Symbol("zod_brand"),f6=class extends xn{_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}},jO=class e extends xn{_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"?_n:i.status==="dirty"?(n.dirty(),H2e(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"?_n: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:Kt.ZodPipeline})}},xR=class extends xn{_parse(t){let n=this._def.innerType._parse(t);return zO(n)&&(n.value=Object.freeze(n.value)),n}};xR.create=(e,t)=>new xR({innerType:e,typeName:Kt.ZodReadonly,...Rn(t)});q2e=(e,t={},n)=>e?CE.create().superRefine((r,o)=>{var i,a;if(!e(r)){let c=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(a=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,f=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...f,fatal:l})}}):CE.create(),xRt={object:pu.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"})(Kt||(Kt={}));DRt=(e,t={message:`Input not instance of ${e.name}`})=>q2e(n=>n instanceof e,t),V2e=bE.create,Y2e=wS.create,BRt=RR.create,NRt=PS.create,K2e=MS.create,ORt=LS.create,kRt=TR.create,wRt=US.create,PRt=QS.create,MRt=CE.create,LRt=Hg.create,URt=Sf.create,QRt=IR.create,FRt=$g.create,GRt=pu.create,zRt=pu.strictCreate,jRt=FS.create,HRt=l6.create,$Rt=GS.create,qRt=Zm.create,VRt=d6.create,YRt=bR.create,KRt=CR.create,JRt=p6.create,ZRt=zS.create,WRt=jS.create,XRt=HS.create,ext=$S.create,txt=vE.create,G2e=Yl.create,nxt=yf.create,rxt=qg.create,oxt=Yl.createWithPreprocess,ixt=jO.create,axt=()=>V2e().optional(),sxt=()=>Y2e().optional(),uxt=()=>K2e().optional(),cxt={string:(e=>bE.create({...e,coerce:!0})),number:(e=>wS.create({...e,coerce:!0})),boolean:(e=>MS.create({...e,coerce:!0})),bigint:(e=>PS.create({...e,coerce:!0})),date:(e=>LS.create({...e,coerce:!0}))},lxt=_n,lu=Object.freeze({__proto__:null,defaultErrorMap:GO,setErrorMap:mRt,getErrorMap:s6,makeIssue:u6,EMPTY_PATH:ARt,addIssueToContext:ut,ParseStatus:du,INVALID:_n,DIRTY:H2e,OK:Zu,isAborted:FZ,isDirty:GZ,isValid:zO,isAsync:c6,get util(){return yr},get objectUtil(){return QZ},ZodParsedType:at,getParsedType:IE,ZodType:xn,ZodString:bE,ZodNumber:wS,ZodBigInt:PS,ZodBoolean:MS,ZodDate:LS,ZodSymbol:TR,ZodUndefined:US,ZodNull:QS,ZodAny:CE,ZodUnknown:Hg,ZodNever:Sf,ZodVoid:IR,ZodArray:$g,ZodObject:pu,ZodUnion:FS,ZodDiscriminatedUnion:l6,ZodIntersection:GS,ZodTuple:Zm,ZodRecord:d6,ZodMap:bR,ZodSet:CR,ZodFunction:p6,ZodLazy:zS,ZodLiteral:jS,ZodEnum:HS,ZodNativeEnum:$S,ZodPromise:vE,ZodEffects:Yl,ZodTransformer:Yl,ZodOptional:yf,ZodNullable:qg,ZodDefault:qS,ZodCatch:vR,ZodNaN:RR,BRAND:RRt,ZodBranded:f6,ZodPipeline:jO,ZodReadonly:xR,custom:q2e,Schema:xn,ZodSchema:xn,late:xRt,get ZodFirstPartyTypeKind(){return Kt},coerce:cxt,any:MRt,array:FRt,bigint:NRt,boolean:K2e,date:ORt,discriminatedUnion:HRt,effect:G2e,enum:XRt,function:JRt,instanceof:DRt,intersection:$Rt,lazy:ZRt,literal:WRt,map:YRt,nan:BRt,nativeEnum:ext,never:URt,null:PRt,nullable:rxt,number:Y2e,object:GRt,oboolean:uxt,onumber:sxt,optional:nxt,ostring:axt,pipeline:ixt,preprocess:oxt,promise:txt,record:VRt,set:KRt,strictObject:zRt,string:V2e,symbol:kRt,transformer:G2e,tuple:qRt,undefined:wRt,union:jRt,unknown:LRt,void:QRt,NEVER:lxt,ZodIssueCode:qe,quotelessJson:fRt,ZodError:Vc}),dxt=e=>typeof e?.safeParse=="function",LZ=e=>typeof e?.passthrough=="function",pxt=(e,t)=>LZ(e)?LZ(t)?e.merge(t):e:LZ(t)?t:Object.assign({},e,t),rp=lu.object({name:lu.literal("ZodError"),issues:lu.array(lu.object({path:lu.array(lu.union([lu.string(),lu.number()])),message:lu.string().optional(),code:lu.nativeEnum(lu.ZodIssueCode)}).catchall(lu.any()))}),jZ=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}},BRn=lu.object({message:lu.literal("Request validation failed"),pathParameterErrors:rp.nullable(),headerErrors:rp.nullable(),queryParameterErrors:rp.nullable(),bodyErrors:rp.nullable()}),NRn=lu.object({pathParameterErrors:rp.nullable(),headerErrors:rp.nullable(),queryParameterErrors:rp.nullable(),bodyErrors:rp.nullable()}),ORn=lu.object({paramsResult:rp.nullable(),headersResult:rp.nullable(),queryResult:rp.nullable(),bodyResult:rp.nullable()}),J2e="zod-ts-rest-polyfill",fxt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},mxt=e=>fxt(e)?e:dxt(e)?(Object.assign(e,{"~standard":{vendor:J2e,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,Axt=(e,t)=>e?t?e instanceof pu&&t instanceof pu?pxt(e,t):{...e,...t}:e:t,gxt=(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===J2e?{error:new Vc(r.issues)}:{error:new jZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},Z2e=Symbol("ContractNoBody"),W2e=e=>"method"in e&&"path"in e,X2e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return W2e(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:Axt(t?.baseHeaders,r.headers),strictStatusCodes:(o=r.strictStatusCodes)!==null&&o!==void 0?o:t?.strictStatusCodes,validateResponseOnClient:(i=r.validateResponseOnClient)!==null&&i!==void 0?i:t?.validateResponseOnClient,responses:{...t?.commonResponses,...r.responses},metadata:t?.metadata?{...t?.metadata,...(a=r.metadata)!==null&&a!==void 0?a:{}}:r.metadata}]:[n,X2e(r,t)]})),UZ=Symbol("ContractPlainType"),is=()=>({router:(e,t)=>X2e(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>UZ,body:()=>UZ,type:()=>UZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>Z2e}),hxt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},_xt=(e,t=!1)=>{let n=t?Ext(e):yxt(e);return n?.length>0?"?"+n:""},Ext=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("&"):"",yxt=e=>e?Object.keys(e).flatMap(t=>HZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",HZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>HZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>HZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],$Z=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}},qZ=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:a})=>{let c=await fetch(t,{...a,method:n,headers:r,body:o}),l=c.headers.get("content-type");if(l?.includes("application/")&&l?.includes("json")){let f=e.responses[c.status],h={status:c.status,body:f===Z2e?void 0:await c.json(),headers:c.headers},y=mxt(f);if(y&&(i??e.validateResponseOnClient)){let S=gxt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return l?.includes("text/")?{status:c.status,body:await c.text(),headers:c.headers}:{status:c.status,body:await c.blob(),headers:c.headers}},Sxt=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},z2e=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),Txt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:l}=e,f=n.api||qZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([b,v])=>typeof v=="function"?[b,v(e)]:[b,v])),y={...h&&z2e(h),...z2e(c)};Object.keys(y).forEach(b=>{y[b]===void 0&&delete y[b]});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:Sxt(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)})),f({...S,...a})},Ixt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:l,fetchOptions:f,cache:h,next:y,...S}=n||{},b={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([D,w])=>[D,String(w)])):{};return{path:bxt(r,b.baseUrl,v,e,!!b.jsonQuery),clientArgs:b,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...f},headers:{...c,...a}}},bxt=(e,t,n,r,o)=>{let i=hxt({path:r.path,params:n}),a=_xt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},Cxt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Ixt(e,t,r),i=await Txt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new $Z(i,n)}},VZ=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>W2e(r)?[n,Cxt(r,t)]:[n,VZ(r,t)]))});function re(e,t,n){function r(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,l);let f=a.prototype,h=Object.keys(f);for(let y=0;y<h.length;y++){let S=h[y];S in c||(c[S]=f[S].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var l;let f=n?.Parent?new i:this;r(f,c),(l=f._zod).deferred??(l.deferred=[]);for(let h of f._zod.deferred)h();return f}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}function Ei(e){return e&&Object.assign(VS,e),VS}var eMe,YZ,KZ,If,RE,VS,YS=O(()=>{A();YZ=Object.freeze({status:"aborted"});KZ=Symbol("zod_brand"),If=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},RE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(eMe=globalThis).__zod_globalConfig??(eMe.__zod_globalConfig={});VS=globalThis.__zod_globalConfig});var Le={};$a(Le,{BIGINT_FORMAT_RANGES:()=>iW,Class:()=>ZZ,NUMBER_FORMAT_RANGES:()=>oW,aborted:()=>NE,allowsEval:()=>eW,assert:()=>Bxt,assertEqual:()=>vxt,assertIs:()=>xxt,assertNever:()=>Dxt,assertNotEqual:()=>Rxt,assignProp:()=>DE,base64ToUint8Array:()=>nMe,base64urlToUint8Array:()=>Vxt,cached:()=>BR,captureStackTrace:()=>A6,cleanEnum:()=>qxt,cleanRegex:()=>qO,clone:()=>Wu,cloneDef:()=>Oxt,createTransparentProxy:()=>Uxt,defineLazy:()=>jn,esc:()=>m6,escapeRegex:()=>ip,explicitlyAborted:()=>aW,extend:()=>Gxt,finalizeIssue:()=>Xu,floatSafeRemainder:()=>WZ,getElementAtPath:()=>kxt,getEnumValues:()=>$O,getLengthableOrigin:()=>KO,getParsedType:()=>Lxt,getSizableOrigin:()=>YO,hexToUint8Array:()=>Kxt,isObject:()=>KS,isPlainObject:()=>BE,issue:()=>NR,joinValues:()=>ce,jsonStringifyReplacer:()=>DR,merge:()=>jxt,mergeDefs:()=>Vg,normalizeParams:()=>He,nullish:()=>xE,numKeys:()=>Mxt,objectClone:()=>Nxt,omit:()=>Fxt,optionalKeys:()=>rW,parsedType:()=>we,partial:()=>Hxt,pick:()=>Qxt,prefixIssues:()=>Yc,primitiveTypes:()=>nW,promiseAllObject:()=>wxt,propertyKeyTypes:()=>VO,randomString:()=>Pxt,required:()=>$xt,safeExtend:()=>zxt,shallowClone:()=>tW,slugify:()=>XZ,stringifyPrimitive:()=>ke,uint8ArrayToBase64:()=>rMe,uint8ArrayToBase64url:()=>Yxt,uint8ArrayToHex:()=>Jxt,unwrapMessage:()=>HO});function vxt(e){return e}function Rxt(e){return e}function xxt(e){}function Dxt(e){throw new Error("Unexpected value in exhaustive check")}function Bxt(e){}function $O(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 ce(e,t="|"){return e.map(n=>ke(n)).join(t)}function DR(e,t){return typeof t=="bigint"?t.toString():t}function BR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function xE(e){return e==null}function qO(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function WZ(e,t){let n=e/t,r=Math.round(n),o=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<o?0:n-r}function jn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==tMe)return r===void 0&&(r=tMe,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Nxt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function DE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Vg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Oxt(e){return Vg(e._zod.def)}function kxt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function wxt(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 Pxt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function m6(e){return JSON.stringify(e)}function XZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function KS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function BE(e){if(KS(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(KS(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function tW(e){return BE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Mxt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function ip(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wu(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function He(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function Uxt(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 rW(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Qxt(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=Vg(e._zod.def,{get shape(){let a={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(a[c]=n.shape[c])}return DE(this,"shape",a),a},checks:[]});return Wu(e,i)}function Fxt(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=Vg(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete a[c]}return DE(this,"shape",a),a},checks:[]});return Wu(e,i)}function Gxt(e,t){if(!BE(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=Vg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return DE(this,"shape",i),i}});return Wu(e,o)}function zxt(e,t){if(!BE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Vg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return DE(this,"shape",r),r}});return Wu(e,n)}function jxt(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=Vg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return DE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Wu(e,n)}function Hxt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Vg(t._zod.def,{get shape(){let c=t._zod.def.shape,l={...c};if(n)for(let f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(l[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(let f in c)l[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return DE(this,"shape",l),l},checks:[]});return Wu(t,a)}function $xt(e,t,n){let r=Vg(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(let a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return DE(this,"shape",i),i}});return Wu(t,r)}function NE(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 aW(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 Yc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function HO(e){return typeof e=="string"?e:e?.message}function Xu(e,t,n){let r=e.message?e.message:HO(e.inst?._zod.def?.error?.(e))??HO(t?.error?.(e))??HO(n.customError?.(e))??HO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:a,...c}=e;return c.path??(c.path=[]),c.message=r,t?.reportInput&&(c.input=a),c}function YO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function KO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function we(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function NR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function qxt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function nMe(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 rMe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Vxt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return nMe(t+n)}function Yxt(e){return rMe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kxt(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 Jxt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var tMe,A6,eW,Lxt,VO,nW,oW,iW,ZZ,Et=O(()=>{A();YS();tMe=Symbol("evaluating");A6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};eW=BR(()=>{if(VS.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});Lxt=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}`)}},VO=new Set(["string","number","symbol"]),nW=new Set(["string","number","bigint","boolean","symbol","undefined"]);oW={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]},iW={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};ZZ=class{constructor(...t){}}});function ZO(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 WO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{let c=[...i,...a.path];if(c.length===0)n._errors.push(t(a));else{let l=n,f=0;for(;f<c.length;){let h=c[f];f===c.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(t(a))):l[h]=l[h]||{_errors:[]},l=l[h],f++}}}};return r(e),n}function sW(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var a,c;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(f=>r({issues:f},[...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 f=[...i,...l.path];if(f.length===0){n.errors.push(t(l));continue}let h=n,y=0;for(;y<f.length;){let S=f[y],b=y===f.length-1;typeof S=="string"?(h.properties??(h.properties={}),(a=h.properties)[S]??(a[S]={errors:[]}),h=h.properties[S]):(h.items??(h.items=[]),(c=h.items)[S]??(c[S]={errors:[]}),h=h.items[S]),b&&h.errors.push(t(l)),y++}}};return r(e),n}function iMe(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 uW(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 ${iMe(r.path)}`);return t.join(`
41
41
  `)}var oMe,JO,Kc,cW=O(()=>{A();YS();Et();oMe=(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,DR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},JO=re("$ZodError",oMe),Kc=re("$ZodError",oMe,{Parent:Error})});var OR,g6,kR,h6,wR,lW,PR,dW,_6,Wxt,E6,Xxt,y6,eDt,S6,tDt,T6,nDt,I6,rDt,b6,oDt,C6,iDt,pW=O(()=>{A();YS();cW();Et();OR=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new If;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(l=>Xu(l,i,Ei())));throw A6(c,o?.callee),c}return a.value},g6=OR(Kc),kR=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(o?.Err??e)(a.issues.map(l=>Xu(l,i,Ei())));throw A6(c,o?.callee),c}return a.value},h6=kR(Kc),wR=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 If;return i.issues.length?{success:!1,error:new(e??JO)(i.issues.map(a=>Xu(a,o,Ei())))}:{success:!0,data:i.value}},lW=wR(Kc),PR=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>Xu(a,o,Ei())))}:{success:!0,data:i.value}},dW=PR(Kc),_6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return OR(e)(t,n,o)},Wxt=_6(Kc),E6=e=>(t,n,r)=>OR(e)(t,n,r),Xxt=E6(Kc),y6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return kR(e)(t,n,o)},eDt=y6(Kc),S6=e=>async(t,n,r)=>kR(e)(t,n,r),tDt=S6(Kc),T6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return wR(e)(t,n,o)},nDt=T6(Kc),I6=e=>(t,n,r)=>wR(e)(t,n,r),rDt=I6(Kc),b6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return PR(e)(t,n,o)},oDt=b6(Kc),C6=e=>async(t,n,r)=>PR(e)(t,n,r),iDt=C6(Kc)});var Kl={};$a(Kl,{base64:()=>xW,base64url:()=>v6,bigint:()=>PW,boolean:()=>LW,browserEmail:()=>fDt,cidrv4:()=>vW,cidrv6:()=>RW,cuid:()=>fW,cuid2:()=>mW,date:()=>NW,datetime:()=>kW,domain:()=>gDt,duration:()=>EW,e164:()=>BW,email:()=>SW,emoji:()=>TW,extendedDuration:()=>aDt,guid:()=>yW,hex:()=>hDt,hostname:()=>ADt,html5Email:()=>lDt,httpProtocol:()=>DW,idnEmail:()=>pDt,integer:()=>MW,ipv4:()=>IW,ipv6:()=>bW,ksuid:()=>hW,lowercase:()=>FW,mac:()=>CW,md5_base64:()=>EDt,md5_base64url:()=>yDt,md5_hex:()=>_Dt,nanoid:()=>_W,null:()=>UW,number:()=>R6,rfc5322Email:()=>dDt,sha1_base64:()=>TDt,sha1_base64url:()=>IDt,sha1_hex:()=>SDt,sha256_base64:()=>CDt,sha256_base64url:()=>vDt,sha256_hex:()=>bDt,sha384_base64:()=>xDt,sha384_base64url:()=>DDt,sha384_hex:()=>RDt,sha512_base64:()=>NDt,sha512_base64url:()=>ODt,sha512_hex:()=>BDt,string:()=>wW,time:()=>OW,ulid:()=>AW,undefined:()=>QW,unicodeEmail:()=>aMe,uppercase:()=>GW,uuid:()=>JS,uuid4:()=>sDt,uuid6:()=>uDt,uuid7:()=>cDt,xid:()=>gW});function TW(){return new RegExp(mDt,"u")}function uMe(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 OW(e){return new RegExp(`^${uMe(e)}$`)}function kW(e){let t=uMe({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(`^${sMe}T(?:${r})$`)}function XO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ek(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var fW,mW,AW,gW,hW,_W,EW,aDt,yW,JS,sDt,uDt,cDt,SW,lDt,dDt,aMe,pDt,fDt,mDt,IW,bW,CW,vW,RW,xW,v6,ADt,gDt,DW,BW,sMe,NW,wW,PW,MW,R6,LW,UW,QW,FW,GW,hDt,_Dt,EDt,yDt,SDt,TDt,IDt,bDt,CDt,vDt,RDt,xDt,DDt,BDt,NDt,ODt,x6=O(()=>{A();Et();fW=/^[cC][0-9a-z]{6,}$/,mW=/^[0-9a-z]+$/,AW=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gW=/^[0-9a-vA-V]{20}$/,hW=/^[A-Za-z0-9]{27}$/,_W=/^[a-zA-Z0-9_-]{21}$/,EW=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,aDt=/^[-+]?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)?)??$/,yW=/^([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})$/,JS=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)$/,sDt=JS(4),uDt=JS(6),cDt=JS(7),SW=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,lDt=/^[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])?)*$/,dDt=/^(([^<>()\[\]\\.,;:\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,}))$/,aMe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,pDt=aMe,fDt=/^[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])?)*$/,mDt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";IW=/^(?:(?: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])$/,bW=/^(([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}|:))$/,CW=e=>{let t=ip(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},vW=/^((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])$/,RW=/^(([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])$/,xW=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,v6=/^[A-Za-z0-9_-]*$/,ADt=/^(?=.{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])?)*\.?$/,gDt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,DW=/^https?$/,BW=/^\+[1-9]\d{6,14}$/,sMe="(?:(?:\\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])))",NW=new RegExp(`^${sMe}$`);wW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},PW=/^-?\d+n?$/,MW=/^-?\d+$/,R6=/^-?\d+(?:\.\d+)?$/,LW=/^(?:true|false)$/i,UW=/^null$/i,QW=/^undefined$/i,FW=/^[^A-Z]*$/,GW=/^[^a-z]*$/,hDt=/^[0-9a-fA-F]*$/;_Dt=/^[0-9a-fA-F]{32}$/,EDt=XO(22,"=="),yDt=ek(22),SDt=/^[0-9a-fA-F]{40}$/,TDt=XO(27,"="),IDt=ek(27),bDt=/^[0-9a-fA-F]{64}$/,CDt=XO(43,"="),vDt=ek(43),RDt=/^[0-9a-fA-F]{96}$/,xDt=XO(64,""),DDt=ek(64),BDt=/^[0-9a-fA-F]{128}$/,NDt=XO(86,"=="),ODt=ek(86)});function cMe(e,t,n){e.issues.length&&t.issues.push(...Yc(n,e.issues))}var Wr,lMe,D6,B6,zW,jW,HW,$W,qW,VW,YW,KW,JW,MR,ZW,WW,XW,eX,tX,nX,rX,oX,iX,N6=O(()=>{A();YS();x6();Et();Wr=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),lMe={number:"number",bigint:"bigint",object:"date"},D6=re("$ZodCheckLessThan",(e,t)=>{Wr.init(e,t);let n=lMe[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})}}),B6=re("$ZodCheckGreaterThan",(e,t)=>{Wr.init(e,t);let n=lMe[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})}}),zW=re("$ZodCheckMultipleOf",(e,t)=>{Wr.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):WZ(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})}}),jW=re("$ZodCheckNumberFormat",(e,t)=>{Wr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=oW[t.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=MW)}),e._zod.check=a=>{let c=a.value;if(n){if(!Number.isInteger(c)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}c<o&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),HW=re("$ZodCheckBigIntFormat",(e,t)=>{Wr.init(e,t);let[n,r]=iW[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})}}),$W=re("$ZodCheckMaxSize",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(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:YO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qW=re("$ZodCheckMinSize",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(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:YO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),VW=re("$ZodCheckSizeEquals",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let a=i>t.size;r.issues.push({origin:YO(o),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),YW=re("$ZodCheckMaxLength",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let a=KO(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),KW=re("$ZodCheckMinLength",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let a=KO(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),JW=re("$ZodCheckLengthEquals",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!xE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let a=KO(o),c=i>t.length;r.issues.push({origin:a,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),MR=re("$ZodCheckStringFormat",(e,t)=>{var n,r;Wr.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=()=>{})}),ZW=re("$ZodCheckRegex",(e,t)=>{MR.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})}}),WW=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=FW),MR.init(e,t)}),XW=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=GW),MR.init(e,t)}),eX=re("$ZodCheckIncludes",(e,t)=>{Wr.init(e,t);let n=ip(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})}}),tX=re("$ZodCheckStartsWith",(e,t)=>{Wr.init(e,t);let n=new RegExp(`^${ip(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})}}),nX=re("$ZodCheckEndsWith",(e,t)=>{Wr.init(e,t);let n=new RegExp(`.*${ip(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})}});rX=re("$ZodCheckProperty",(e,t)=>{Wr.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>cMe(o,n,t.property));cMe(r,n,t.property)}}),oX=re("$ZodCheckMimeType",(e,t)=>{Wr.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})}}),iX=re("$ZodCheckOverwrite",(e,t)=>{Wr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var tk,aX=O(()=>{A();tk=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(`
@@ -526,7 +526,7 @@ exec ${que(n)} ${que(e)} "$@"
526
526
  Authorization expired. Please try again.
527
527
  `);return;case"login_failed":console.log(`
528
528
  Login failed: ${e.message}
529
- `);return}}});import e8t from"node:http";var aVe,t8t,sVe,uVe=O(()=>{"use strict";A();aVe="/callback",t8t='<!doctype html><meta charset="utf-8"><title>Lore</title><body style="font-family:system-ui;padding:3rem;text-align:center"><h1>Signed in to Lore</h1><p>You can close this tab and return to your terminal.</p></body>',sVe=async()=>{let e,t,n=e8t.createServer((c,l)=>{let f=new URL(c.url??"/","http://127.0.0.1");if(f.pathname!==aVe){l.statusCode=404,l.end("not found");return}let h=f.searchParams.get("error"),y=f.searchParams.get("code"),S=f.searchParams.get("state");l.statusCode=h||!y?400:200,l.setHeader("content-type","text/html; charset=utf-8"),l.end(h||!y?`<p>Login failed: ${h??"no code"}. Return to your terminal.</p>`:t8t),r={error:h,code:y,state:S},i()}),r=null,o,i=()=>{};await new Promise((c,l)=>{n.once("error",l),n.listen(0,"127.0.0.1",()=>{n.removeListener("error",l),c()})});let{port:a}=n.address();return{redirectUri:`http://127.0.0.1:${a}${aVe}`,waitForCallback:(c,l)=>new Promise((f,h)=>{o={state:c},e=f,t=h;let y=setTimeout(()=>{t=void 0,h(new Error("authorization timed out"))},l);y.unref&&y.unref(),i=()=>{if(!r||!e&&!t)return;let S=r;r=null,clearTimeout(y);let b={resolve:e,reject:t};e=void 0,t=void 0,S.error?b.reject?.(new Error(`authorization failed: ${S.error}`)):S.code?o&&S.state!==o.state?b.reject?.(new Error("authorization state mismatch")):b.resolve?.({code:S.code}):b.reject?.(new Error("authorization callback missing code"))},i()}),close:()=>{n.close()}}}});var P5e={};$a(P5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>pVe,getOpenBrowserCommand:()=>_Ve,loginCommand:()=>Wue,openBrowser:()=>hVe,pollForTokens:()=>gVe,requestDeviceAuthorization:()=>AVe,runLogin:()=>EVe});import{spawn as n8t}from"node:child_process";function pVe(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function i8t(e){let n=await Pt({token:e}).whoAmI({headers:{}});n.status===200&&(b4e(`lore_${n.body.user.id}`),R4e(pVe(n.body)))}async function fVe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function mVe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}async function a8t(e){return hz({resource:e,stateDir:Rr()})}function s8t(e){return process.env.LORE_DEVICE_AUTH&&process.env.LORE_DEVICE_AUTH!=="0"?!1:e==="linux"?!!(process.env.DISPLAY||process.env.WAYLAND_DISPLAY):!0}async function AVe(e){let t=await fetch(e.deviceAuthorizationEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e.clientId,scope:kre})}),n=await fVe(t);if(!t.ok)throw new Error(mVe(n));return n}async function gVe(e){let t=AbortSignal.timeout(Math.min(e.timeoutMs,e.expiresIn*1e3)),n=e.interval;for(;;){let r;try{r=await fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:o8t,device_code:e.deviceCode,client_id:e.clientId}),signal:t})}catch(a){throw a instanceof Error&&a.name==="TimeoutError"?new Error("authorization timed out"):a}let o=await fVe(r);if(r.ok){let a=o.access_token,c=o.refresh_token,l=o.expires_in;if(typeof a!="string")throw new Error("device token response missing access_token");return{access_token:a,refresh_token:typeof c=="string"?c:"",expires_at:Date.now()+(typeof l=="number"?l:0)*1e3,scope:typeof o.scope=="string"?o.scope:""}}let i=o;switch(i.error){case"authorization_pending":await cVe(n*1e3);break;case"slow_down":n+=1,await cVe(n*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(mVe(i))}}}async function hVe(e){let{command:t,args:n}=_Ve(process.platform,e);await new Promise((r,o)=>{let i=n8t(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function _Ve(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function u8t(e){if(!await Qt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function c8t(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:sp()})}catch(r){J.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function l8t(e){if(px(e))return`Could not reach the Lore API at ${oA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`}function lVe(){let e=process.env.LORE_AUTHKIT_RESOURCE_INDICATORS?.trim();return e==="1"||e==="true"}async function dVe(e){let t=await e.deps.createLoopbackReceiver();try{let n=e.deps.generatePkce(),r=e.deps.generateState(),o=u4e({authorizationEndpoint:e.endpoints.authorizationEndpoint,clientId:e.clientId,redirectUri:t.redirectUri,codeChallenge:n.codeChallenge,resource:e.resource,scope:kre,state:r,...e.silent?{prompt:"none"}:{}});e.emitProgress&&e.progress({kind:"browser_url",url:o});try{await e.deps.openBrowser(o),e.emitProgress&&e.progress({kind:"browser_opened"})}catch(a){J.warn("open_browser_failed",{error:a instanceof Error?a.message:String(a)}),e.emitProgress&&e.progress({kind:"browser_open_failed"})}e.emitProgress&&e.progress({kind:"waiting_for_authorization"});let{code:i}=await t.waitForCallback(r,e.timeoutMs);return await e.deps.exchangeCode({tokenEndpoint:e.endpoints.tokenEndpoint,clientId:e.clientId,code:i,codeVerifier:n.codeVerifier,redirectUri:t.redirectUri,resource:e.resource})}finally{t.close()}}async function EVe({client:e=Pt(),enableLaunchAgent:t=u8,openBrowser:n=hVe,platform:r=process.platform,discoverEndpoints:o=a8t,createLoopbackReceiver:i=sVe,generatePkce:a=a4e,generateState:c=s4e,exchangeCode:l=c4e,requestDeviceAuthorization:f=AVe,pollForTokens:h=gVe,isBrowserAvailable:y=()=>s8t(r),writeBootstrappedTokens:S=N4e,setTokens:b=B4e,cacheAnalyticsDistinctId:v=i8t,timeoutMs:x=r8t,progress:D=oVe}={}){if(await u8t(e)){D({kind:"already_logged_in"});return}try{let w=Dz(),Q=await o(w),z;if(y()){let G={createLoopbackReceiver:i,openBrowser:n,generatePkce:a,generateState:c,exchangeCode:l},$=await dVe({endpoints:Q,clientId:ux,resource:lVe()?w:void 0,silent:!1,deps:G,progress:D,emitProgress:!0,timeoutMs:x}),ie=await dVe({endpoints:Q,clientId:e4e,resource:lVe()?V4e():void 0,silent:!0,deps:G,progress:D,emitProgress:!1,timeoutMs:x});S($,ie),z=$.access_token}else{let G=await f({deviceAuthorizationEndpoint:Q.deviceAuthorizationEndpoint,clientId:ux});D({kind:"device_authorized",userCode:G.user_code,verificationUri:G.verification_uri,verificationUriComplete:G.verification_uri_complete}),D({kind:"browser_url",url:G.verification_uri_complete}),D({kind:"waiting_for_authorization"});let $=await h({tokenEndpoint:Q.tokenEndpoint,clientId:ux,deviceCode:G.device_code,expiresIn:G.expires_in,interval:G.interval,timeoutMs:x});b($),z=$.access_token}v(z).catch(G=>{J.warn("cache_analytics_distinct_id_failed",{error:G instanceof Error?G.message:String(G)})}),D({kind:"logged_in"}),await c8t(t,r,D)}catch(w){w instanceof Error&&w.message==="authorization timed out"?(D({kind:"authorization_timed_out"}),Uk()):w instanceof Error&&w.message==="Authorization denied"?(D({kind:"authorization_denied"}),Uk()):w instanceof Error&&w.message==="Authorization expired"&&(D({kind:"authorization_expired"}),Uk());let Q=l8t(w);throw Q&&(D({kind:"login_failed",message:Q}),Uk()),w}}var r8t,o8t,cVe,Wue,Cue=O(async()=>{"use strict";A();yz();kr();sn();Rz();lr();yi();FE();await Tue();await w5e();oP();dT();iVe();uVe();r8t=300*1e3,o8t="urn:ietf:params:oauth:grant-type:device_code";cVe=e=>new Promise(t=>setTimeout(t,e));Wue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){J.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,discoverEndpoints:e?.discoverEndpoints,createLoopbackReceiver:e?.createLoopbackReceiver,generatePkce:e?.generatePkce,generateState:e?.generateState,exchangeCode:e?.exchangeCode,requestDeviceAuthorization:e?.requestDeviceAuthorization,pollForTokens:e?.pollForTokens,isBrowserAvailable:e?.isBrowserAvailable,writeBootstrappedTokens:e?.writeBootstrappedTokens,setTokens:e?.setTokens,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(gu()&&!e?.progress){await k5e(t),await HH({skipIfAlreadyConfigured:!0});return}await EVe({...t,progress:e?.progress})}}});A();A();(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]="c16c26f7-a5ad-4287-bcb5-542a4808e478",e._sentryDebugIdIdentifier="sentry-dbid-c16c26f7-a5ad-4287-bcb5-542a4808e478")}catch{}})();A();A();A();function cde(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 lde=cde();lde.ok||(process.stderr.write(`lore: ${lde.message}.
529
+ `);return}}});import e8t from"node:http";var aVe,t8t,sVe,uVe=O(()=>{"use strict";A();aVe="/callback",t8t='<!doctype html><meta charset="utf-8"><title>Lore</title><body style="font-family:system-ui;padding:3rem;text-align:center"><h1>Signed in to Lore</h1><p>You can close this tab and return to your terminal.</p></body>',sVe=async()=>{let e,t,n=e8t.createServer((c,l)=>{let f=new URL(c.url??"/","http://127.0.0.1");if(f.pathname!==aVe){l.statusCode=404,l.end("not found");return}let h=f.searchParams.get("error"),y=f.searchParams.get("code"),S=f.searchParams.get("state");l.statusCode=h||!y?400:200,l.setHeader("content-type","text/html; charset=utf-8"),l.end(h||!y?`<p>Login failed: ${h??"no code"}. Return to your terminal.</p>`:t8t),r={error:h,code:y,state:S},i()}),r=null,o,i=()=>{};await new Promise((c,l)=>{n.once("error",l),n.listen(0,"127.0.0.1",()=>{n.removeListener("error",l),c()})});let{port:a}=n.address();return{redirectUri:`http://127.0.0.1:${a}${aVe}`,waitForCallback:(c,l)=>new Promise((f,h)=>{o={state:c},e=f,t=h;let y=setTimeout(()=>{t=void 0,h(new Error("authorization timed out"))},l);y.unref&&y.unref(),i=()=>{if(!r||!e&&!t)return;let S=r;r=null,clearTimeout(y);let b={resolve:e,reject:t};e=void 0,t=void 0,S.error?b.reject?.(new Error(`authorization failed: ${S.error}`)):S.code?o&&S.state!==o.state?b.reject?.(new Error("authorization state mismatch")):b.resolve?.({code:S.code}):b.reject?.(new Error("authorization callback missing code"))},i()}),close:()=>{n.close()}}}});var P5e={};$a(P5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>pVe,getOpenBrowserCommand:()=>_Ve,loginCommand:()=>Wue,openBrowser:()=>hVe,pollForTokens:()=>gVe,requestDeviceAuthorization:()=>AVe,runLogin:()=>EVe});import{spawn as n8t}from"node:child_process";function pVe(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function i8t(e){let n=await Pt({token:e}).whoAmI({headers:{}});n.status===200&&(b4e(`lore_${n.body.user.id}`),R4e(pVe(n.body)))}async function fVe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function mVe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}async function a8t(e){return hz({resource:e,stateDir:Rr()})}function s8t(e){return process.env.LORE_DEVICE_AUTH&&process.env.LORE_DEVICE_AUTH!=="0"?!1:e==="linux"?!!(process.env.DISPLAY||process.env.WAYLAND_DISPLAY):!0}async function AVe(e){let t=await fetch(e.deviceAuthorizationEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e.clientId,scope:kre})}),n=await fVe(t);if(!t.ok)throw new Error(mVe(n));return n}async function gVe(e){let t=AbortSignal.timeout(Math.min(e.timeoutMs,e.expiresIn*1e3)),n=e.interval;for(;;){let r;try{r=await fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:o8t,device_code:e.deviceCode,client_id:e.clientId}),signal:t})}catch(a){throw a instanceof Error&&a.name==="TimeoutError"?new Error("authorization timed out"):a}let o=await fVe(r);if(r.ok){let a=o.access_token,c=o.refresh_token,l=o.expires_in;if(typeof a!="string")throw new Error("device token response missing access_token");return{access_token:a,refresh_token:typeof c=="string"?c:"",expires_at:Date.now()+(typeof l=="number"?l:0)*1e3,scope:typeof o.scope=="string"?o.scope:""}}let i=o;switch(i.error){case"authorization_pending":await cVe(n*1e3);break;case"slow_down":n+=1,await cVe(n*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(mVe(i))}}}async function hVe(e){let{command:t,args:n}=_Ve(process.platform,e);await new Promise((r,o)=>{let i=n8t(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function _Ve(e,t){return e==="win32"?{command:"rundll32",args:["url.dll,FileProtocolHandler",t]}:e==="darwin"?{command:"open",args:[t]}:{command:"xdg-open",args:[t]}}async function u8t(e){if(!await Qt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function c8t(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:sp()})}catch(r){J.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function l8t(e){if(px(e))return`Could not reach the Lore API at ${oA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`}function lVe(){let e=process.env.LORE_AUTHKIT_RESOURCE_INDICATORS?.trim().toLowerCase();return e!=="0"&&e!=="false"}async function dVe(e){let t=await e.deps.createLoopbackReceiver();try{let n=e.deps.generatePkce(),r=e.deps.generateState(),o=u4e({authorizationEndpoint:e.endpoints.authorizationEndpoint,clientId:e.clientId,redirectUri:t.redirectUri,codeChallenge:n.codeChallenge,resource:e.resource,scope:kre,state:r,...e.silent?{prompt:"none"}:{}});e.emitProgress&&e.progress({kind:"browser_url",url:o});try{await e.deps.openBrowser(o),e.emitProgress&&e.progress({kind:"browser_opened"})}catch(a){J.warn("open_browser_failed",{error:a instanceof Error?a.message:String(a)}),e.emitProgress&&e.progress({kind:"browser_open_failed"})}e.emitProgress&&e.progress({kind:"waiting_for_authorization"});let{code:i}=await t.waitForCallback(r,e.timeoutMs);return await e.deps.exchangeCode({tokenEndpoint:e.endpoints.tokenEndpoint,clientId:e.clientId,code:i,codeVerifier:n.codeVerifier,redirectUri:t.redirectUri,resource:e.resource})}finally{t.close()}}async function EVe({client:e=Pt(),enableLaunchAgent:t=u8,openBrowser:n=hVe,platform:r=process.platform,discoverEndpoints:o=a8t,createLoopbackReceiver:i=sVe,generatePkce:a=a4e,generateState:c=s4e,exchangeCode:l=c4e,requestDeviceAuthorization:f=AVe,pollForTokens:h=gVe,isBrowserAvailable:y=()=>s8t(r),writeBootstrappedTokens:S=N4e,setTokens:b=B4e,cacheAnalyticsDistinctId:v=i8t,timeoutMs:x=r8t,progress:D=oVe}={}){if(await u8t(e)){D({kind:"already_logged_in"});return}try{let w=Dz(),Q=await o(w),z;if(y()){let G={createLoopbackReceiver:i,openBrowser:n,generatePkce:a,generateState:c,exchangeCode:l},$=await dVe({endpoints:Q,clientId:ux,resource:lVe()?w:void 0,silent:!1,deps:G,progress:D,emitProgress:!0,timeoutMs:x}),ie=await dVe({endpoints:Q,clientId:e4e,resource:lVe()?V4e():void 0,silent:!0,deps:G,progress:D,emitProgress:!1,timeoutMs:x});S($,ie),z=$.access_token}else{let G=await f({deviceAuthorizationEndpoint:Q.deviceAuthorizationEndpoint,clientId:ux});D({kind:"device_authorized",userCode:G.user_code,verificationUri:G.verification_uri,verificationUriComplete:G.verification_uri_complete}),D({kind:"browser_url",url:G.verification_uri_complete}),D({kind:"waiting_for_authorization"});let $=await h({tokenEndpoint:Q.tokenEndpoint,clientId:ux,deviceCode:G.device_code,expiresIn:G.expires_in,interval:G.interval,timeoutMs:x});b($),z=$.access_token}v(z).catch(G=>{J.warn("cache_analytics_distinct_id_failed",{error:G instanceof Error?G.message:String(G)})}),D({kind:"logged_in"}),await c8t(t,r,D)}catch(w){w instanceof Error&&w.message==="authorization timed out"?(D({kind:"authorization_timed_out"}),Uk()):w instanceof Error&&w.message==="Authorization denied"?(D({kind:"authorization_denied"}),Uk()):w instanceof Error&&w.message==="Authorization expired"&&(D({kind:"authorization_expired"}),Uk());let Q=l8t(w);throw Q&&(D({kind:"login_failed",message:Q}),Uk()),w}}var r8t,o8t,cVe,Wue,Cue=O(async()=>{"use strict";A();yz();kr();sn();Rz();lr();yi();FE();await Tue();await w5e();oP();dT();iVe();uVe();r8t=300*1e3,o8t="urn:ietf:params:oauth:grant-type:device_code";cVe=e=>new Promise(t=>setTimeout(t,e));Wue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){J.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,discoverEndpoints:e?.discoverEndpoints,createLoopbackReceiver:e?.createLoopbackReceiver,generatePkce:e?.generatePkce,generateState:e?.generateState,exchangeCode:e?.exchangeCode,requestDeviceAuthorization:e?.requestDeviceAuthorization,pollForTokens:e?.pollForTokens,isBrowserAvailable:e?.isBrowserAvailable,writeBootstrappedTokens:e?.writeBootstrappedTokens,setTokens:e?.setTokens,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(gu()&&!e?.progress){await k5e(t),await HH({skipIfAlreadyConfigured:!0});return}await EVe({...t,progress:e?.progress})}}});A();A();(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]="ba81c0c1-0b22-4bd0-89c0-1d2e35363bb0",e._sentryDebugIdIdentifier="sentry-dbid-ba81c0c1-0b22-4bd0-89c0-1d2e35363bb0")}catch{}})();A();A();A();function cde(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 lde=cde();lde.ok||(process.stderr.write(`lore: ${lde.message}.
530
530
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
531
531
  `),process.exit(1));A();yR();qc();function Zvt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Wvt=Zvt();OZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Zr(),release:cu(),sendDefaultPii:!0,enableLogs:!0,spotlight:Wvt,tracesSampleRate:1});hU("service_name","lore-cli");yR();MZ();import{realpathSync as p5t}from"node:fs";import{fileURLToPath as f5t,pathToFileURL as RYe}from"node:url";A();A();cz();kr();sn();lr();A();function Hk(e){let t=e;return t._def??t.def??{}}function N2t(e){let t=Hk(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Xc(e,t,n){let r=N2t(e);return r===t||r===n}function J4e(e){let t=Hk(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function O2t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=Hk(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Wre(e){if(!e||!Xc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=Hk(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function Z4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=Hk(t);if(Xc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Xc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Xc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Xc(t,"ZodEffects","effects"))t=i.schema;else if(Xc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function k2t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=Z4e(e),a=!1,c=n;Xc(c,"ZodArray","array")&&(a=!0,c=J4e(c)??c);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:a}:Xc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:O2t(c),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:Xc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:l,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:l,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function Xre(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=k2t(i,t);n[o]=a,r[o]={isArray:c,leafKind:w2t(i)}}return{args:n,fields:r}}function eoe(e,t={}){let n=Wre(e);return n?Xre(n,t):{args:{},fields:{}}}function w2t(e){let{inner:t}=Z4e(e),n=t;return Xc(n,"ZodArray","array")&&(n=J4e(n)??n),Xc(n,"ZodNumber","number")?"number":Xc(n,"ZodBoolean","boolean")?"boolean":Xc(n,"ZodEnum","enum")?"enum":Xc(n,"ZodString","string")?"string":"other"}function P2t(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 M2t(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 toe(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 L2t(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 U2t(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function noe(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>U2t(n,a))}function Q2t(e,t,n){return e.resource==="threads"&&t==="id"?L2t(n):n}function W4e(e){let t=P2t(gz,e.path),n=Wre(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Xre(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=eoe(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:eoe(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let l={...i.args,...a.args,...c.args},f=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:f},args:l,async run({args:h,data:y}){J.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Qt)())throw new be("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let Ce=h[ge],ve=toe(Ce,i.fields[ge])??Ce;v[ge]=Q2t(e,ge,ve)}let x={};for(let[ge,Ce]of Object.entries(a.fields)){let ve=toe(h[ge],Ce);ve!==void 0&&(x[ge]=ve)}let D={};for(let[ge,Ce]of Object.entries(c.fields)){let ve=toe(h[ge],Ce);ve!==void 0&&(D[ge]=ve)}let w=[...noe(t.pathParams,v,"path"),...noe(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:noe(t.body,D,"body")];if(w.length>0)throw new be(`Invalid request for \`lore ${e.resource} ${e.op}\`:
532
532
  ${w.join(`