@tanagram/lore 0.1.57 → 0.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/skills/fork/SKILL.md +84 -0
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 E5e=Object.create;var hM=Object.defineProperty;var S5e=Object.getOwnPropertyDescriptor;var y5e=Object.getOwnPropertyNames;var T5e=Object.getPrototypeOf,I5e=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),es=(e,t)=>{for(var n in t)hM(e,n,{get:t[n],enumerable:!0})},hse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of y5e(t))!I5e.call(e,o)&&o!==n&&hM(e,o,{get:()=>t[o],enumerable:!(r=S5e(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?E5e(T5e(e)):{},hse(t||!e||!e.__esModule?hM(n,"default",{value:e,enumerable:!0}):n,e)),we=e=>hse(hM({},"__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.57"}}catch{}})()});var _m,Ez=O(()=>{A();_m="1.9.1"});function C5e(e){let t=new Set([e]),n=new Set,r=e.match(_se);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(_se);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var _se,Ese,Sse=O(()=>{A();Ez();_se=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Ese=C5e(_m)});function Of(e,t,n,r=!1){var o;let i=zx[jx]=(o=zx[jx])!==null&&o!==void 0?o:{version:_m};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!==_m){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${_m}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${_m}.`),!0}function ol(e){var t,n;let r=(t=zx[jx])===null||t===void 0?void 0:t.version;if(!(!r||!Ese(r)))return(n=zx[jx])===null||n===void 0?void 0:n[e]}function wf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${_m}.`);let n=zx[jx];n&&delete n[e]}var b5e,jx,zx,D0=O(()=>{A();Ez();Sse();b5e=_m.split(".")[0],jx=Symbol.for(`opentelemetry.js.api.${b5e}`),zx=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Hx(e,t,n){let r=ol("diag");if(r)return r[e](t,...n)}var _M,yse=O(()=>{A();D0();_M=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Hx("debug",this._namespace,t)}error(...t){return Hx("error",this._namespace,t)}info(...t){return Hx("info",this._namespace,t)}warn(...t){return Hx("warn",this._namespace,t)}verbose(...t){return Hx("verbose",this._namespace,t)}}});var oa,EM=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"})(oa||(oa={}))});function Tse(e,t){e<oa.NONE?e=oa.NONE:e>oa.ALL&&(e=oa.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",oa.ERROR),warn:n("warn",oa.WARN),info:n("info",oa.INFO),debug:n("debug",oa.DEBUG),verbose:n("verbose",oa.VERBOSE)}}var Ise=O(()=>{A();EM()});var v5e,Ia,x0=O(()=>{A();yse();Ise();EM();D0();v5e="diag",Ia=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=ol("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:oa.INFO})=>{var a,c,d;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 m=ol("diag"),h=Tse((c=i.logLevel)!==null&&c!==void 0?c:oa.INFO,o);if(m&&!i.suppressOverrideMessage){let y=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Of("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{wf(v5e,n)},n.createComponentLogger=o=>new _M(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var SM,Cse=O(()=>{A();SM=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 bse,vse=O(()=>{A();bse=Symbol("BaggageEntryMetadata")});function Rse(e={}){return new SM(new Map(Object.entries(e)))}function Dse(e){return typeof e!="string"&&(R5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:bse,toString(){return e}}}var R5e,Sz=O(()=>{A();x0();Cse();vse();R5e=Ia.instance()});function il(e){return Symbol.for(e)}var yz,QI,$x=O(()=>{A();yz=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}}},QI=new yz});var Tz,Iz,yM,xse=O(()=>{A();Tz=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Iz={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(Iz[t]=console[t])}yM=class{constructor(){function t(n){return function(...r){let o=Iz[n];if(typeof o!="function"&&(o=Iz.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<Tz.length;n++)this[Tz[n].n]=t(Tz[n].c)}}});function Bse(){return Oz}var Cz,FI,bz,vz,Rz,Dz,Vx,xz,Bz,Nz,Oz,D5e,x5e,B5e,N5e,O5e,w5e,M5e,wz=O(()=>{A();Cz=class{constructor(){}createGauge(t,n){return x5e}createHistogram(t,n){return B5e}createCounter(t,n){return D5e}createUpDownCounter(t,n){return N5e}createObservableGauge(t,n){return w5e}createObservableCounter(t,n){return O5e}createObservableUpDownCounter(t,n){return M5e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FI=class{},bz=class extends FI{add(t,n){}},vz=class extends FI{add(t,n){}},Rz=class extends FI{record(t,n){}},Dz=class extends FI{record(t,n){}},Vx=class{addCallback(t){}removeCallback(t){}},xz=class extends Vx{},Bz=class extends Vx{},Nz=class extends Vx{},Oz=new Cz,D5e=new bz,x5e=new Rz,B5e=new Dz,N5e=new vz,O5e=new xz,w5e=new Bz,M5e=new Nz});var TM,Nse=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(TM||(TM={}))});var IM,CM,Mz=O(()=>{A();IM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},CM={set(e,t,n){e!=null&&(e[t]=n)}}});var bM,Ose=O(()=>{A();$x();bM=class{active(){return QI}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var Pz,P5e,Mf,qx=O(()=>{A();Ose();D0();x0();Pz="context",P5e=new bM,Mf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Of(Pz,t,Ia.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 ol(Pz)||P5e}disable(){this._getContextManager().disable(),wf(Pz,Ia.instance())}}});var Ds,kz=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ds||(Ds={}))});var Yx,B0,vM,RM=O(()=>{A();kz();Yx="0000000000000000",B0="00000000000000000000000000000000",vM={traceId:B0,spanId:Yx,traceFlags:Ds.NONE}});var Pf,DM=O(()=>{A();RM();Pf=class{constructor(t=vM){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 xM(e){return e.getValue(Uz)||void 0}function wse(){return xM(Mf.getInstance().active())}function Kx(e,t){return e.setValue(Uz,t)}function Mse(e){return e.deleteValue(Uz)}function Pse(e,t){return Kx(e,new Pf(t))}function BM(e){var t;return(t=xM(e))===null||t===void 0?void 0:t.spanContext()}var Uz,Lz=O(()=>{A();$x();DM();qx();Uz=il("OpenTelemetry Context Key SPAN")});function kse(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(NM[e.charCodeAt(r)]|0)+(NM[e.charCodeAt(r+1)]|0)+(NM[e.charCodeAt(r+2)]|0)+(NM[e.charCodeAt(r+3)]|0);return n===t}function Qz(e){return kse(e,32)&&e!==B0}function Fz(e){return kse(e,16)&&e!==Yx}function Em(e){return Qz(e.traceId)&&Fz(e.spanId)}function Use(e){return new Pf(e)}var NM,OM=O(()=>{A();RM();DM();NM=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 k5e(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 Gz,GI,jz=O(()=>{A();qx();Lz();DM();OM();Gz=Mf.getInstance(),GI=class{startSpan(t,n,r=Gz.active()){if(!!n?.root)return new Pf;let i=r&&BM(r);return k5e(i)&&Em(i)?new Pf(i):new Pf}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??Gz.active(),m=this.startSpan(t,i,d),h=Kx(d,m);return Gz.with(h,c,void 0,m)}}});var U5e,jI,zz=O(()=>{A();jz();U5e=new GI,jI=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):U5e}}});var wM,Lse=O(()=>{A();jz();wM=class{getTracer(t,n,r){return new GI}}});var L5e,N0,Hz=O(()=>{A();zz();Lse();L5e=new wM,N0=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jI(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:L5e}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 MM,Qse=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"})(MM||(MM={}))});var Zr,Fse=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"})(Zr||(Zr={}))});var Wo,Gse=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Wo||(Wo={}))});function jse(e){return G5e.test(e)}function zse(e){return j5e.test(e)&&!z5e.test(e)}var $z,Q5e,F5e,G5e,j5e,z5e,Hse=O(()=>{A();$z="[_0-9a-z-*/]",Q5e=`[a-z]${$z}{0,255}`,F5e=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,G5e=new RegExp(`^(?:${Q5e}|${F5e})$`),j5e=/^[ -~]{0,255}[!-~]$/,z5e=/,|=/});var $se,H5e,Vse,qse,PM,Yse=O(()=>{A();Hse();$se=32,H5e=512,Vse=",",qse="=",PM=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+qse+this.get(n)),t),[]).join(Vse)}_parse(t){t.length>H5e||(this._internalState=t.split(Vse).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(qse);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);jse(a)&&zse(c)&&n.set(a,c)}return n},new Map),this._internalState.size>$se&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,$se))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Kse(e){return new PM(e)}var Jse=O(()=>{A();Yse()});var qe,Zse=O(()=>{A();qx();qe=Mf.getInstance()});var al,Wse=O(()=>{A();x0();al=Ia.instance()});var Vz,Xse,eue=O(()=>{A();wz();Vz=class{getMeter(t,n,r){return Oz}},Xse=new Vz});var qz,kM,tue=O(()=>{A();eue();D0();x0();qz="metrics",kM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Of(qz,t,Ia.instance())}getMeterProvider(){return ol(qz)||Xse}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){wf(qz,Ia.instance())}}});var Yz,nue=O(()=>{A();tue();Yz=kM.getInstance()});var UM,rue=O(()=>{A();UM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function Jz(e){return e.getValue(Kz)||void 0}function oue(){return Jz(Mf.getInstance().active())}function iue(e,t){return e.setValue(Kz,t)}function aue(e){return e.deleteValue(Kz)}var Kz,sue=O(()=>{A();qx();$x();Kz=il("OpenTelemetry Baggage Key")});var Zz,$5e,LM,uue=O(()=>{A();D0();rue();Mz();sue();Sz();x0();Zz="propagation",$5e=new UM,LM=class e{constructor(){this.createBaggage=Rse,this.getBaggage=Jz,this.getActiveBaggage=oue,this.setBaggage=iue,this.deleteBaggage=aue}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Of(Zz,t,Ia.instance())}inject(t,n,r=CM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=IM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){wf(Zz,Ia.instance())}_getGlobalPropagator(){return ol(Zz)||$5e}}});var Ip,cue=O(()=>{A();uue();Ip=LM.getInstance()});var Wz,QM,lue=O(()=>{A();D0();Hz();OM();Lz();x0();Wz="trace",QM=class e{constructor(){this._proxyTracerProvider=new N0,this.wrapSpanContext=Use,this.isSpanContextValid=Em,this.deleteSpan=Mse,this.getSpan=xM,this.getActiveSpan=wse,this.getSpanContext=BM,this.setSpan=Kx,this.setSpanContext=Pse}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Of(Wz,this._proxyTracerProvider,Ia.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return ol(Wz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){wf(Wz,Ia.instance()),this._proxyTracerProvider=new N0}}});var Ft,due=O(()=>{A();lue();Ft=QM.getInstance()});var Je={};es(Je,{DiagConsoleLogger:()=>yM,DiagLogLevel:()=>oa,INVALID_SPANID:()=>Yx,INVALID_SPAN_CONTEXT:()=>vM,INVALID_TRACEID:()=>B0,ProxyTracer:()=>jI,ProxyTracerProvider:()=>N0,ROOT_CONTEXT:()=>QI,SamplingDecision:()=>MM,SpanKind:()=>Zr,SpanStatusCode:()=>Wo,TraceFlags:()=>Ds,ValueType:()=>TM,baggageEntryMetadataFromString:()=>Dse,context:()=>qe,createContextKey:()=>il,createNoopMeter:()=>Bse,createTraceState:()=>Kse,default:()=>V5e,defaultTextMapGetter:()=>IM,defaultTextMapSetter:()=>CM,diag:()=>al,isSpanContextValid:()=>Em,isValidSpanId:()=>Fz,isValidTraceId:()=>Qz,metrics:()=>Yz,propagation:()=>Ip,trace:()=>Ft});var V5e,Le=O(()=>{A();Sz();$x();xse();EM();wz();Nse();Mz();zz();Hz();Qse();Fse();Gse();kz();Jse();OM();RM();Zse();Wse();nue();cue();due();V5e={context:qe,diag:al,metrics:Yz,propagation:Ip,trace:Ft}});var Jx=Q(mh=>{"use strict";A();Object.defineProperty(mh,"__esModule",{value:!0});mh.isTracingSuppressed=mh.unsuppressTracing=mh.suppressTracing=void 0;var q5e=(Le(),we(Je)),Xz=(0,q5e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Y5e(e){return e.setValue(Xz,!0)}mh.suppressTracing=Y5e;function K5e(e){return e.deleteValue(Xz)}mh.unsuppressTracing=K5e;function J5e(e){return e.getValue(Xz)===!0}mh.isTracingSuppressed=J5e});var eH=Q(xs=>{"use strict";A();Object.defineProperty(xs,"__esModule",{value:!0});xs.BAGGAGE_MAX_TOTAL_LENGTH=xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=xs.BAGGAGE_HEADER=xs.BAGGAGE_ITEMS_SEPARATOR=xs.BAGGAGE_PROPERTIES_SEPARATOR=xs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;xs.BAGGAGE_KEY_PAIR_SEPARATOR="=";xs.BAGGAGE_PROPERTIES_SEPARATOR=";";xs.BAGGAGE_ITEMS_SEPARATOR=",";xs.BAGGAGE_HEADER="baggage";xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;xs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var tH=Q(kf=>{"use strict";A();Object.defineProperty(kf,"__esModule",{value:!0});kf.parseKeyPairsIntoRecord=kf.parsePairKeyValue=kf.getKeyPairs=kf.serializeKeyPairs=void 0;var Z5e=(Le(),we(Je)),zI=eH();function W5e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?zI.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>zI.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}kf.serializeKeyPairs=W5e;function X5e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=zI.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}kf.getKeyPairs=X5e;function pue(e){if(!e)return;let t=e.indexOf(zI.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(zI.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,Z5e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}kf.parsePairKeyValue=pue;function e$e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(zI.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=pue(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}kf.parseKeyPairsIntoRecord=e$e});var fue=Q(FM=>{"use strict";A();Object.defineProperty(FM,"__esModule",{value:!0});FM.W3CBaggagePropagator=void 0;var nH=(Le(),we(Je)),t$e=Jx(),O0=eH(),rH=tH(),oH=class{inject(t,n,r){let o=nH.propagation.getBaggage(t);if(!o||(0,t$e.isTracingSuppressed)(t))return;let i=(0,rH.getKeyPairs)(o).filter(c=>c.length<=O0.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,O0.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,rH.serializeKeyPairs)(i);a.length>0&&r.set(n,O0.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,O0.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(O0.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(O0.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,rH.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:nH.propagation.setBaggage(t,nH.propagation.createBaggage(a))}fields(){return[O0.BAGGAGE_HEADER]}};FM.W3CBaggagePropagator=oH});var Aue=Q(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.AnchoredClock=void 0;var iH=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}};GM.AnchoredClock=iH});var Eue=Q(gh=>{"use strict";A();Object.defineProperty(gh,"__esModule",{value:!0});gh.isAttributeValue=gh.isAttributeKey=gh.sanitizeAttributes=void 0;var mue=(Le(),we(Je));function n$e(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(!gue(n)){mue.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!hue(r)){mue.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}gh.sanitizeAttributes=n$e;function gue(e){return typeof e=="string"&&e!==""}gh.isAttributeKey=gue;function hue(e){return e==null?!0:Array.isArray(e)?r$e(e):_ue(typeof e)}gh.isAttributeValue=hue;function r$e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(_ue(r)){t=r;continue}return!1}return!1}}return!0}function _ue(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var aH=Q(jM=>{"use strict";A();Object.defineProperty(jM,"__esModule",{value:!0});jM.loggingErrorHandler=void 0;var o$e=(Le(),we(Je));function i$e(){return e=>{o$e.diag.error(a$e(e))}}jM.loggingErrorHandler=i$e;function a$e(e){return typeof e=="string"?e:JSON.stringify(s$e(e))}function s$e(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 yue=Q(HI=>{"use strict";A();Object.defineProperty(HI,"__esModule",{value:!0});HI.globalErrorHandler=HI.setGlobalErrorHandler=void 0;var u$e=aH(),Sue=(0,u$e.loggingErrorHandler)();function c$e(e){Sue=e}HI.setGlobalErrorHandler=c$e;function l$e(e){try{Sue(e)}catch{}}HI.globalErrorHandler=l$e});var bue=Q(Uf=>{"use strict";A();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.getStringListFromEnv=Uf.getBooleanFromEnv=Uf.getStringFromEnv=Uf.getNumberFromEnv=void 0;var Tue=(Le(),we(Je)),Iue=Ue("util");function d$e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Tue.diag.warn(`Unknown value ${(0,Iue.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Uf.getNumberFromEnv=d$e;function Cue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Uf.getStringFromEnv=Cue;function p$e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Tue.diag.warn(`Unknown value ${(0,Iue.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Uf.getBooleanFromEnv=p$e;function f$e(e){return Cue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Uf.getStringListFromEnv=f$e});var vue=Q(zM=>{"use strict";A();Object.defineProperty(zM,"__esModule",{value:!0});zM._globalThis=void 0;zM._globalThis=globalThis});var Rue=Q(HM=>{"use strict";A();Object.defineProperty(HM,"__esModule",{value:!0});HM.VERSION=void 0;HM.VERSION="2.6.1"});function mi(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 sH=O(()=>{A()});var Due,xue,Bue,Nue,Oue,wue,Mue,Pue,kue,Uue,Lue,Que,Fue,Gue,jue,zue,Hue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,zce,Hce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,zle,Hle,$le,Vle,qle,A$e,uH,m$e,g$e,h$e,_$e,cH,E$e,S$e,y$e,T$e,I$e,C$e,b$e,v$e,R$e,D$e,x$e,B$e,N$e,O$e,w$e,M$e,P$e,k$e,lH,U$e,L$e,Q$e,F$e,G$e,j$e,z$e,H$e,$$e,V$e,q$e,Y$e,dH,K$e,J$e,pH,fH,Z$e,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,c9e,l9e,d9e,p9e,f9e,Zx,$I,AH,A9e,m9e,w0,g9e,h9e,_9e,E9e,mH,gH,S9e,hH,y9e,T9e,I9e,C9e,b9e,v9e,R9e,D9e,x9e,B9e,N9e,O9e,w9e,M9e,P9e,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,z9e,_H,H9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,oVe,iVe,aVe,sVe,uVe,EH,cVe,SH,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,EVe,SVe,yVe,TVe,IVe,CVe,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,wVe,MVe,PVe,kVe,UVe,LVe,QVe,FVe,GVe,jVe,zVe,HVe,$Ve,VVe,qVe,YVe,KVe,JVe,ZVe,WVe,XVe,eqe,tqe,nqe,rqe,oqe,iqe,aqe,sqe,uqe,cqe,lqe,dqe,pqe,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,fqe,Aqe,mqe,gqe,hqe,_qe,Eqe,Sqe,yqe,Tqe,Iqe,Cqe,Wde,Xde,epe,tpe,npe,bqe,vqe,Rqe,Dqe,xqe,Bqe,rpe,ope,ipe,Nqe,Oqe,wqe,Mqe,ape,spe,upe,cpe,Pqe,kqe,Uqe,Lqe,Qqe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,Fqe,Gqe,jqe,zqe,Hqe,$qe,Vqe,qqe,hpe,_pe,Epe,Spe,ype,Yqe,Kqe,Jqe,Zqe,Wqe,Xqe,Tpe,Ipe,Cpe,bpe,vpe,Rpe,Dpe,xpe,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,c7e,l7e,d7e,p7e,f7e,A7e,m7e,g7e,h7e,_7e,E7e,S7e,y7e,zpe,Hpe,$pe,Vpe,qpe,T7e,I7e,C7e,b7e,v7e,R7e,Ype,Kpe,D7e,x7e,B7e,Jpe,Zpe,N7e,O7e,w7e,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,M7e,P7e,k7e,U7e,L7e,Q7e,F7e,G7e,j7e,z7e,H7e,$7e,V7e,q7e,Y7e,K7e,J7e,Z7e,mfe,gfe,W7e,X7e,eYe,hfe=O(()=>{A();sH();Due="aws.lambda.invoked_arn",xue="db.system",Bue="db.connection_string",Nue="db.user",Oue="db.jdbc.driver_classname",wue="db.name",Mue="db.statement",Pue="db.operation",kue="db.mssql.instance_name",Uue="db.cassandra.keyspace",Lue="db.cassandra.page_size",Que="db.cassandra.consistency_level",Fue="db.cassandra.table",Gue="db.cassandra.idempotence",jue="db.cassandra.speculative_execution_count",zue="db.cassandra.coordinator.id",Hue="db.cassandra.coordinator.dc",$ue="db.hbase.namespace",Vue="db.redis.database_index",que="db.mongodb.collection",Yue="db.sql.table",Kue="exception.type",Jue="exception.message",Zue="exception.stacktrace",Wue="exception.escaped",Xue="faas.trigger",ece="faas.execution",tce="faas.document.collection",nce="faas.document.operation",rce="faas.document.time",oce="faas.document.name",ice="faas.time",ace="faas.cron",sce="faas.coldstart",uce="faas.invoked_name",cce="faas.invoked_provider",lce="faas.invoked_region",dce="net.transport",pce="net.peer.ip",fce="net.peer.port",Ace="net.peer.name",mce="net.host.ip",gce="net.host.port",hce="net.host.name",_ce="net.host.connection.type",Ece="net.host.connection.subtype",Sce="net.host.carrier.name",yce="net.host.carrier.mcc",Tce="net.host.carrier.mnc",Ice="net.host.carrier.icc",Cce="peer.service",bce="enduser.id",vce="enduser.role",Rce="enduser.scope",Dce="thread.id",xce="thread.name",Bce="code.function",Nce="code.namespace",Oce="code.filepath",wce="code.lineno",Mce="http.method",Pce="http.url",kce="http.target",Uce="http.host",Lce="http.scheme",Qce="http.status_code",Fce="http.flavor",Gce="http.user_agent",jce="http.request_content_length",zce="http.request_content_length_uncompressed",Hce="http.response_content_length",$ce="http.response_content_length_uncompressed",Vce="http.server_name",qce="http.route",Yce="http.client_ip",Kce="aws.dynamodb.table_names",Jce="aws.dynamodb.consumed_capacity",Zce="aws.dynamodb.item_collection_metrics",Wce="aws.dynamodb.provisioned_read_capacity",Xce="aws.dynamodb.provisioned_write_capacity",ele="aws.dynamodb.consistent_read",tle="aws.dynamodb.projection",nle="aws.dynamodb.limit",rle="aws.dynamodb.attributes_to_get",ole="aws.dynamodb.index_name",ile="aws.dynamodb.select",ale="aws.dynamodb.global_secondary_indexes",sle="aws.dynamodb.local_secondary_indexes",ule="aws.dynamodb.exclusive_start_table",cle="aws.dynamodb.table_count",lle="aws.dynamodb.scan_forward",dle="aws.dynamodb.segment",ple="aws.dynamodb.total_segments",fle="aws.dynamodb.count",Ale="aws.dynamodb.scanned_count",mle="aws.dynamodb.attribute_definitions",gle="aws.dynamodb.global_secondary_index_updates",hle="messaging.system",_le="messaging.destination",Ele="messaging.destination_kind",Sle="messaging.temp_destination",yle="messaging.protocol",Tle="messaging.protocol_version",Ile="messaging.url",Cle="messaging.message_id",ble="messaging.conversation_id",vle="messaging.message_payload_size_bytes",Rle="messaging.message_payload_compressed_size_bytes",Dle="messaging.operation",xle="messaging.consumer_id",Ble="messaging.rabbitmq.routing_key",Nle="messaging.kafka.message_key",Ole="messaging.kafka.consumer_group",wle="messaging.kafka.client_id",Mle="messaging.kafka.partition",Ple="messaging.kafka.tombstone",kle="rpc.system",Ule="rpc.service",Lle="rpc.method",Qle="rpc.grpc.status_code",Fle="rpc.jsonrpc.version",Gle="rpc.jsonrpc.request_id",jle="rpc.jsonrpc.error_code",zle="rpc.jsonrpc.error_message",Hle="message.type",$le="message.id",Vle="message.compressed_size",qle="message.uncompressed_size",A$e=Due,uH=xue,m$e=Bue,g$e=Nue,h$e=Oue,_$e=wue,cH=Mue,E$e=Pue,S$e=kue,y$e=Uue,T$e=Lue,I$e=Que,C$e=Fue,b$e=Gue,v$e=jue,R$e=zue,D$e=Hue,x$e=$ue,B$e=Vue,N$e=que,O$e=Yue,w$e=Kue,M$e=Jue,P$e=Zue,k$e=Wue,lH=Xue,U$e=ece,L$e=tce,Q$e=nce,F$e=rce,G$e=oce,j$e=ice,z$e=ace,H$e=sce,$$e=uce,V$e=cce,q$e=lce,Y$e=dce,dH=pce,K$e=fce,J$e=Ace,pH=mce,fH=gce,Z$e=hce,W$e=_ce,X$e=Ece,e9e=Sce,t9e=yce,n9e=Tce,r9e=Ice,o9e=Cce,i9e=bce,a9e=vce,s9e=Rce,u9e=Dce,c9e=xce,l9e=Bce,d9e=Nce,p9e=Oce,f9e=wce,Zx=Mce,$I=Pce,AH=kce,A9e=Uce,m9e=Lce,w0=Qce,g9e=Fce,h9e=Gce,_9e=jce,E9e=zce,mH=Hce,gH=$ce,S9e=Vce,hH=qce,y9e=Yce,T9e=Kce,I9e=Jce,C9e=Zce,b9e=Wce,v9e=Xce,R9e=ele,D9e=tle,x9e=nle,B9e=rle,N9e=ole,O9e=ile,w9e=ale,M9e=sle,P9e=ule,k9e=cle,U9e=lle,L9e=dle,Q9e=ple,F9e=fle,G9e=Ale,j9e=mle,z9e=gle,_H=hle,H9e=_le,$9e=Ele,V9e=Sle,q9e=yle,Y9e=Tle,K9e=Ile,J9e=Cle,Z9e=ble,W9e=vle,X9e=Rle,eVe=Dle,tVe=xle,nVe=Ble,rVe=Nle,oVe=Ole,iVe=wle,aVe=Mle,sVe=Ple,uVe=kle,EH=Ule,cVe=Lle,SH=Qle,lVe=Fle,dVe=Gle,pVe=jle,fVe=zle,AVe=Hle,mVe=$le,gVe=Vle,hVe=qle,_Ve=mi([Due,xue,Bue,Nue,Oue,wue,Mue,Pue,kue,Uue,Lue,Que,Fue,Gue,jue,zue,Hue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,zce,Hce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,zle,Hle,$le,Vle,qle]),Yle="other_sql",Kle="mssql",Jle="mysql",Zle="oracle",Wle="db2",Xle="postgresql",ede="redshift",tde="hive",nde="cloudscape",rde="hsqldb",ode="progress",ide="maxdb",ade="hanadb",sde="ingres",ude="firstsql",cde="edb",lde="cache",dde="adabas",pde="firebird",fde="derby",Ade="filemaker",mde="informix",gde="instantdb",hde="interbase",_de="mariadb",Ede="netezza",Sde="pervasive",yde="pointbase",Tde="sqlite",Ide="sybase",Cde="teradata",bde="vertica",vde="h2",Rde="coldfusion",Dde="cassandra",xde="hbase",Bde="mongodb",Nde="redis",Ode="couchbase",wde="couchdb",Mde="cosmosdb",Pde="dynamodb",kde="neo4j",Ude="geode",Lde="elasticsearch",Qde="memcached",Fde="cockroachdb",EVe=Yle,SVe=Kle,yVe=Jle,TVe=Zle,IVe=Wle,CVe=Xle,bVe=ede,vVe=tde,RVe=nde,DVe=rde,xVe=ode,BVe=ide,NVe=ade,OVe=sde,wVe=ude,MVe=cde,PVe=lde,kVe=dde,UVe=pde,LVe=fde,QVe=Ade,FVe=mde,GVe=gde,jVe=hde,zVe=_de,HVe=Ede,$Ve=Sde,VVe=yde,qVe=Tde,YVe=Ide,KVe=Cde,JVe=bde,ZVe=vde,WVe=Rde,XVe=Dde,eqe=xde,tqe=Bde,nqe=Nde,rqe=Ode,oqe=wde,iqe=Mde,aqe=Pde,sqe=kde,uqe=Ude,cqe=Lde,lqe=Qde,dqe=Fde,pqe=mi([Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde]),Gde="all",jde="each_quorum",zde="quorum",Hde="local_quorum",$de="one",Vde="two",qde="three",Yde="local_one",Kde="any",Jde="serial",Zde="local_serial",fqe=Gde,Aqe=jde,mqe=zde,gqe=Hde,hqe=$de,_qe=Vde,Eqe=qde,Sqe=Yde,yqe=Kde,Tqe=Jde,Iqe=Zde,Cqe=mi([Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde]),Wde="datasource",Xde="http",epe="pubsub",tpe="timer",npe="other",bqe=Wde,vqe=Xde,Rqe=epe,Dqe=tpe,xqe=npe,Bqe=mi([Wde,Xde,epe,tpe,npe]),rpe="insert",ope="edit",ipe="delete",Nqe=rpe,Oqe=ope,wqe=ipe,Mqe=mi([rpe,ope,ipe]),ape="alibaba_cloud",spe="aws",upe="azure",cpe="gcp",Pqe=ape,kqe=spe,Uqe=upe,Lqe=cpe,Qqe=mi([ape,spe,upe,cpe]),lpe="ip_tcp",dpe="ip_udp",ppe="ip",fpe="unix",Ape="pipe",mpe="inproc",gpe="other",Fqe=lpe,Gqe=dpe,jqe=ppe,zqe=fpe,Hqe=Ape,$qe=mpe,Vqe=gpe,qqe=mi([lpe,dpe,ppe,fpe,Ape,mpe,gpe]),hpe="wifi",_pe="wired",Epe="cell",Spe="unavailable",ype="unknown",Yqe=hpe,Kqe=_pe,Jqe=Epe,Zqe=Spe,Wqe=ype,Xqe=mi([hpe,_pe,Epe,Spe,ype]),Tpe="gprs",Ipe="edge",Cpe="umts",bpe="cdma",vpe="evdo_0",Rpe="evdo_a",Dpe="cdma2000_1xrtt",xpe="hsdpa",Bpe="hsupa",Npe="hspa",Ope="iden",wpe="evdo_b",Mpe="lte",Ppe="ehrpd",kpe="hspap",Upe="gsm",Lpe="td_scdma",Qpe="iwlan",Fpe="nr",Gpe="nrnsa",jpe="lte_ca",e7e=Tpe,t7e=Ipe,n7e=Cpe,r7e=bpe,o7e=vpe,i7e=Rpe,a7e=Dpe,s7e=xpe,u7e=Bpe,c7e=Npe,l7e=Ope,d7e=wpe,p7e=Mpe,f7e=Ppe,A7e=kpe,m7e=Upe,g7e=Lpe,h7e=Qpe,_7e=Fpe,E7e=Gpe,S7e=jpe,y7e=mi([Tpe,Ipe,Cpe,bpe,vpe,Rpe,Dpe,xpe,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe]),zpe="1.0",Hpe="1.1",$pe="2.0",Vpe="SPDY",qpe="QUIC",T7e=zpe,I7e=Hpe,C7e=$pe,b7e=Vpe,v7e=qpe,R7e={HTTP_1_0:zpe,HTTP_1_1:Hpe,HTTP_2_0:$pe,SPDY:Vpe,QUIC:qpe},Ype="queue",Kpe="topic",D7e=Ype,x7e=Kpe,B7e=mi([Ype,Kpe]),Jpe="receive",Zpe="process",N7e=Jpe,O7e=Zpe,w7e=mi([Jpe,Zpe]),Wpe=0,Xpe=1,efe=2,tfe=3,nfe=4,rfe=5,ofe=6,ife=7,afe=8,sfe=9,ufe=10,cfe=11,lfe=12,dfe=13,pfe=14,ffe=15,Afe=16,M7e=Wpe,P7e=Xpe,k7e=efe,U7e=tfe,L7e=nfe,Q7e=rfe,F7e=ofe,G7e=ife,j7e=afe,z7e=sfe,H7e=ufe,$7e=cfe,V7e=lfe,q7e=dfe,Y7e=pfe,K7e=ffe,J7e=Afe,Z7e={OK:Wpe,CANCELLED:Xpe,UNKNOWN:efe,INVALID_ARGUMENT:tfe,DEADLINE_EXCEEDED:nfe,NOT_FOUND:rfe,ALREADY_EXISTS:ofe,PERMISSION_DENIED:ife,RESOURCE_EXHAUSTED:afe,FAILED_PRECONDITION:sfe,ABORTED:ufe,OUT_OF_RANGE:cfe,UNIMPLEMENTED:lfe,INTERNAL:dfe,UNAVAILABLE:pfe,DATA_LOSS:ffe,UNAUTHENTICATED:Afe},mfe="SENT",gfe="RECEIVED",W7e=mfe,X7e=gfe,eYe=mi([mfe,gfe])});var _fe=O(()=>{A();hfe()});var Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,DYe,xYe,BYe,NYe,OYe,wYe,MYe,PYe,kYe,UYe,LYe,QYe,FYe,GYe,jYe,zYe,HYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,yH,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,VAe,qAe,YAe,KAe,DKe,xKe,BKe,NKe,OKe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,fme,Ame,ZKe,WKe,XKe,mme,gme,hme,_me,Eme,Sme,yme,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,Tme,Ime,Cme,bme,vme,Rme,Dme,xme,Bme,Nme,Ome,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,Gme,jme,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,zme=O(()=>{A();sH();Efe="cloud.provider",Sfe="cloud.account.id",yfe="cloud.region",Tfe="cloud.availability_zone",Ife="cloud.platform",Cfe="aws.ecs.container.arn",bfe="aws.ecs.cluster.arn",vfe="aws.ecs.launchtype",Rfe="aws.ecs.task.arn",Dfe="aws.ecs.task.family",xfe="aws.ecs.task.revision",Bfe="aws.eks.cluster.arn",Nfe="aws.log.group.names",Ofe="aws.log.group.arns",wfe="aws.log.stream.names",Mfe="aws.log.stream.arns",Pfe="container.name",kfe="container.id",Ufe="container.runtime",Lfe="container.image.name",Qfe="container.image.tag",Ffe="deployment.environment",Gfe="device.id",jfe="device.model.identifier",zfe="device.model.name",Hfe="faas.name",$fe="faas.id",Vfe="faas.version",qfe="faas.instance",Yfe="faas.max_memory",Kfe="host.id",Jfe="host.name",Zfe="host.type",Wfe="host.arch",Xfe="host.image.name",eAe="host.image.id",tAe="host.image.version",nAe="k8s.cluster.name",rAe="k8s.node.name",oAe="k8s.node.uid",iAe="k8s.namespace.name",aAe="k8s.pod.uid",sAe="k8s.pod.name",uAe="k8s.container.name",cAe="k8s.replicaset.uid",lAe="k8s.replicaset.name",dAe="k8s.deployment.uid",pAe="k8s.deployment.name",fAe="k8s.statefulset.uid",AAe="k8s.statefulset.name",mAe="k8s.daemonset.uid",gAe="k8s.daemonset.name",hAe="k8s.job.uid",_Ae="k8s.job.name",EAe="k8s.cronjob.uid",SAe="k8s.cronjob.name",yAe="os.type",TAe="os.description",IAe="os.name",CAe="os.version",bAe="process.pid",vAe="process.executable.name",RAe="process.executable.path",DAe="process.command",xAe="process.command_line",BAe="process.command_args",NAe="process.owner",OAe="process.runtime.name",wAe="process.runtime.version",MAe="process.runtime.description",PAe="service.name",kAe="service.namespace",UAe="service.instance.id",LAe="service.version",QAe="telemetry.sdk.name",FAe="telemetry.sdk.language",GAe="telemetry.sdk.version",jAe="telemetry.auto.version",zAe="webengine.name",HAe="webengine.version",$Ae="webengine.description",tYe=Efe,nYe=Sfe,rYe=yfe,oYe=Tfe,iYe=Ife,aYe=Cfe,sYe=bfe,uYe=vfe,cYe=Rfe,lYe=Dfe,dYe=xfe,pYe=Bfe,fYe=Nfe,AYe=Ofe,mYe=wfe,gYe=Mfe,hYe=Pfe,_Ye=kfe,EYe=Ufe,SYe=Lfe,yYe=Qfe,TYe=Ffe,IYe=Gfe,CYe=jfe,bYe=zfe,vYe=Hfe,RYe=$fe,DYe=Vfe,xYe=qfe,BYe=Yfe,NYe=Kfe,OYe=Jfe,wYe=Zfe,MYe=Wfe,PYe=Xfe,kYe=eAe,UYe=tAe,LYe=nAe,QYe=rAe,FYe=oAe,GYe=iAe,jYe=aAe,zYe=sAe,HYe=uAe,$Ye=cAe,VYe=lAe,qYe=dAe,YYe=pAe,KYe=fAe,JYe=AAe,ZYe=mAe,WYe=gAe,XYe=hAe,eKe=_Ae,tKe=EAe,nKe=SAe,rKe=yAe,oKe=TAe,iKe=IAe,aKe=CAe,sKe=bAe,uKe=vAe,cKe=RAe,lKe=DAe,dKe=xAe,pKe=BAe,fKe=NAe,AKe=OAe,mKe=wAe,gKe=MAe,hKe=PAe,yH=kAe,_Ke=UAe,EKe=LAe,SKe=QAe,yKe=FAe,TKe=GAe,IKe=jAe,CKe=zAe,bKe=HAe,vKe=$Ae,RKe=mi([Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae]),VAe="alibaba_cloud",qAe="aws",YAe="azure",KAe="gcp",DKe=VAe,xKe=qAe,BKe=YAe,NKe=KAe,OKe=mi([VAe,qAe,YAe,KAe]),JAe="alibaba_cloud_ecs",ZAe="alibaba_cloud_fc",WAe="aws_ec2",XAe="aws_ecs",eme="aws_eks",tme="aws_lambda",nme="aws_elastic_beanstalk",rme="azure_vm",ome="azure_container_instances",ime="azure_aks",ame="azure_functions",sme="azure_app_service",ume="gcp_compute_engine",cme="gcp_cloud_run",lme="gcp_kubernetes_engine",dme="gcp_cloud_functions",pme="gcp_app_engine",wKe=JAe,MKe=ZAe,PKe=WAe,kKe=XAe,UKe=eme,LKe=tme,QKe=nme,FKe=rme,GKe=ome,jKe=ime,zKe=ame,HKe=sme,$Ke=ume,VKe=cme,qKe=lme,YKe=dme,KKe=pme,JKe=mi([JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme]),fme="ec2",Ame="fargate",ZKe=fme,WKe=Ame,XKe=mi([fme,Ame]),mme="amd64",gme="arm32",hme="arm64",_me="ia64",Eme="ppc32",Sme="ppc64",yme="x86",eJe=mme,tJe=gme,nJe=hme,rJe=_me,oJe=Eme,iJe=Sme,aJe=yme,sJe=mi([mme,gme,hme,_me,Eme,Sme,yme]),Tme="windows",Ime="linux",Cme="darwin",bme="freebsd",vme="netbsd",Rme="openbsd",Dme="dragonflybsd",xme="hpux",Bme="aix",Nme="solaris",Ome="z_os",uJe=Tme,cJe=Ime,lJe=Cme,dJe=bme,pJe=vme,fJe=Rme,AJe=Dme,mJe=xme,gJe=Bme,hJe=Nme,_Je=Ome,EJe=mi([Tme,Ime,Cme,bme,vme,Rme,Dme,xme,Bme,Nme,Ome]),wme="cpp",Mme="dotnet",Pme="erlang",kme="go",Ume="java",Lme="nodejs",Qme="php",Fme="python",Gme="ruby",jme="webjs",SJe=wme,yJe=Mme,TJe=Pme,IJe=kme,CJe=Ume,bJe=Lme,vJe=Qme,RJe=Fme,DJe=Gme,xJe=jme,BJe=mi([wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,Gme,jme])});var Hme=O(()=>{A();zme()});var NJe,OJe,wJe,MJe,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,TH,IH,nZe,VI,rZe,CH,bH,oZe,M0,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,vH,mZe,gZe,hZe,_Ze,EZe,SZe,P0,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,xZe,BZe,NZe,OZe,wZe,Sm,ym,MZe,PZe,kZe,UZe,LZe,QZe,FZe,GZe,jZe,zZe,HZe,$Ze,VZe,qZe,YZe,KZe,RH,DH,JZe,xH,BH,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,NH,OH,dWe,wH,pWe,MH,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,hh,UWe,LWe,QWe,PH,$me=O(()=>{A();NJe="aspnetcore.diagnostics.exception.result",OJe="aborted",wJe="handled",MJe="skipped",PJe="unhandled",kJe="aspnetcore.diagnostics.handler.type",UJe="aspnetcore.rate_limiting.policy",LJe="aspnetcore.rate_limiting.result",QJe="acquired",FJe="endpoint_limiter",GJe="global_limiter",jJe="request_canceled",zJe="aspnetcore.request.is_unhandled",HJe="aspnetcore.routing.is_fallback",$Je="aspnetcore.routing.match_status",VJe="failure",qJe="success",YJe="aspnetcore.user.is_authenticated",KJe="client.address",JJe="client.port",ZJe="code.column.number",WJe="code.file.path",XJe="code.function.name",eZe="code.line.number",tZe="code.stacktrace",TH="db.collection.name",IH="db.namespace",nZe="db.operation.batch.size",VI="db.operation.name",rZe="db.query.summary",CH="db.query.text",bH="db.response.status_code",oZe="db.stored_procedure.name",M0="db.system.name",iZe="mariadb",aZe="microsoft.sql_server",sZe="mysql",uZe="postgresql",cZe="dotnet.gc.heap.generation",lZe="gen0",dZe="gen1",pZe="gen2",fZe="loh",AZe="poh",vH="error.type",mZe="_OTHER",gZe="exception.escaped",hZe="exception.message",_Ze="exception.stacktrace",EZe="exception.type",SZe=e=>`http.request.header.${e}`,P0="http.request.method",yZe="_OTHER",TZe="CONNECT",IZe="DELETE",CZe="GET",bZe="HEAD",vZe="OPTIONS",RZe="PATCH",DZe="POST",xZe="PUT",BZe="TRACE",NZe="http.request.method_original",OZe="http.request.resend_count",wZe=e=>`http.response.header.${e}`,Sm="http.response.status_code",ym="http.route",MZe="jvm.gc.action",PZe="jvm.gc.name",kZe="jvm.memory.pool.name",UZe="jvm.memory.type",LZe="heap",QZe="non_heap",FZe="jvm.thread.daemon",GZe="jvm.thread.state",jZe="blocked",zZe="new",HZe="runnable",$Ze="terminated",VZe="timed_waiting",qZe="waiting",YZe="network.local.address",KZe="network.local.port",RH="network.peer.address",DH="network.peer.port",JZe="network.protocol.name",xH="network.protocol.version",BH="network.transport",ZZe="pipe",WZe="quic",XZe="tcp",eWe="udp",tWe="unix",nWe="network.type",rWe="ipv4",oWe="ipv6",iWe="otel.scope.name",aWe="otel.scope.version",sWe="otel.status_code",uWe="ERROR",cWe="OK",lWe="otel.status_description",NH="server.address",OH="server.port",dWe="service.instance.id",wH="service.name",pWe="service.namespace",MH="service.version",fWe="signalr.connection.status",AWe="app_shutdown",mWe="normal_closure",gWe="timeout",hWe="signalr.transport",_We="long_polling",EWe="server_sent_events",SWe="web_sockets",yWe="telemetry.sdk.language",TWe="cpp",IWe="dotnet",CWe="erlang",bWe="go",vWe="java",RWe="nodejs",DWe="php",xWe="python",BWe="ruby",NWe="rust",OWe="swift",wWe="webjs",MWe="telemetry.sdk.name",PWe="telemetry.sdk.version",kWe="url.fragment",hh="url.full",UWe="url.path",LWe="url.query",QWe="url.scheme",PH="user_agent.original"});var FWe,GWe,jWe,zWe,HWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,DXe,xXe,BXe,NXe,OXe,wXe,MXe,PXe,kXe,Vme=O(()=>{A();FWe="aspnetcore.diagnostics.exceptions",GWe="aspnetcore.rate_limiting.active_request_leases",jWe="aspnetcore.rate_limiting.queued_requests",zWe="aspnetcore.rate_limiting.request.time_in_queue",HWe="aspnetcore.rate_limiting.request_lease.duration",$We="aspnetcore.rate_limiting.requests",VWe="aspnetcore.routing.match_attempts",qWe="db.client.operation.duration",YWe="dotnet.assembly.count",KWe="dotnet.exceptions",JWe="dotnet.gc.collections",ZWe="dotnet.gc.heap.total_allocated",WWe="dotnet.gc.last_collection.heap.fragmentation.size",XWe="dotnet.gc.last_collection.heap.size",eXe="dotnet.gc.last_collection.memory.committed_size",tXe="dotnet.gc.pause.time",nXe="dotnet.jit.compilation.time",rXe="dotnet.jit.compiled_il.size",oXe="dotnet.jit.compiled_methods",iXe="dotnet.monitor.lock_contentions",aXe="dotnet.process.cpu.count",sXe="dotnet.process.cpu.time",uXe="dotnet.process.memory.working_set",cXe="dotnet.thread_pool.queue.length",lXe="dotnet.thread_pool.thread.count",dXe="dotnet.thread_pool.work_item.count",pXe="dotnet.timer.count",fXe="http.client.request.duration",AXe="http.server.request.duration",mXe="jvm.class.count",gXe="jvm.class.loaded",hXe="jvm.class.unloaded",_Xe="jvm.cpu.count",EXe="jvm.cpu.recent_utilization",SXe="jvm.cpu.time",yXe="jvm.gc.duration",TXe="jvm.memory.committed",IXe="jvm.memory.limit",CXe="jvm.memory.used",bXe="jvm.memory.used_after_last_gc",vXe="jvm.thread.count",RXe="kestrel.active_connections",DXe="kestrel.active_tls_handshakes",xXe="kestrel.connection.duration",BXe="kestrel.queued_connections",NXe="kestrel.queued_requests",OXe="kestrel.rejected_connections",wXe="kestrel.tls_handshake.duration",MXe="kestrel.upgraded_connections",PXe="signalr.server.active_connections",kXe="signalr.server.connection.duration"});var UXe,qme=O(()=>{A();UXe="exception"});var Nr={};es(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>OJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>wJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>MJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>PJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>QJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>FJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>GJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>jJe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>VJe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>qJe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>NJe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>kJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>UJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>LJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>zJe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>HJe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>$Je,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>YJe,ATTR_CLIENT_ADDRESS:()=>KJe,ATTR_CLIENT_PORT:()=>JJe,ATTR_CODE_COLUMN_NUMBER:()=>ZJe,ATTR_CODE_FILE_PATH:()=>WJe,ATTR_CODE_FUNCTION_NAME:()=>XJe,ATTR_CODE_LINE_NUMBER:()=>eZe,ATTR_CODE_STACKTRACE:()=>tZe,ATTR_DB_COLLECTION_NAME:()=>TH,ATTR_DB_NAMESPACE:()=>IH,ATTR_DB_OPERATION_BATCH_SIZE:()=>nZe,ATTR_DB_OPERATION_NAME:()=>VI,ATTR_DB_QUERY_SUMMARY:()=>rZe,ATTR_DB_QUERY_TEXT:()=>CH,ATTR_DB_RESPONSE_STATUS_CODE:()=>bH,ATTR_DB_STORED_PROCEDURE_NAME:()=>oZe,ATTR_DB_SYSTEM_NAME:()=>M0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>cZe,ATTR_ERROR_TYPE:()=>vH,ATTR_EXCEPTION_ESCAPED:()=>gZe,ATTR_EXCEPTION_MESSAGE:()=>hZe,ATTR_EXCEPTION_STACKTRACE:()=>_Ze,ATTR_EXCEPTION_TYPE:()=>EZe,ATTR_HTTP_REQUEST_HEADER:()=>SZe,ATTR_HTTP_REQUEST_METHOD:()=>P0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>NZe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>OZe,ATTR_HTTP_RESPONSE_HEADER:()=>wZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Sm,ATTR_HTTP_ROUTE:()=>ym,ATTR_JVM_GC_ACTION:()=>MZe,ATTR_JVM_GC_NAME:()=>PZe,ATTR_JVM_MEMORY_POOL_NAME:()=>kZe,ATTR_JVM_MEMORY_TYPE:()=>UZe,ATTR_JVM_THREAD_DAEMON:()=>FZe,ATTR_JVM_THREAD_STATE:()=>GZe,ATTR_NETWORK_LOCAL_ADDRESS:()=>YZe,ATTR_NETWORK_LOCAL_PORT:()=>KZe,ATTR_NETWORK_PEER_ADDRESS:()=>RH,ATTR_NETWORK_PEER_PORT:()=>DH,ATTR_NETWORK_PROTOCOL_NAME:()=>JZe,ATTR_NETWORK_PROTOCOL_VERSION:()=>xH,ATTR_NETWORK_TRANSPORT:()=>BH,ATTR_NETWORK_TYPE:()=>nWe,ATTR_OTEL_SCOPE_NAME:()=>iWe,ATTR_OTEL_SCOPE_VERSION:()=>aWe,ATTR_OTEL_STATUS_CODE:()=>sWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>lWe,ATTR_SERVER_ADDRESS:()=>NH,ATTR_SERVER_PORT:()=>OH,ATTR_SERVICE_INSTANCE_ID:()=>dWe,ATTR_SERVICE_NAME:()=>wH,ATTR_SERVICE_NAMESPACE:()=>pWe,ATTR_SERVICE_VERSION:()=>MH,ATTR_SIGNALR_CONNECTION_STATUS:()=>fWe,ATTR_SIGNALR_TRANSPORT:()=>hWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>yWe,ATTR_TELEMETRY_SDK_NAME:()=>MWe,ATTR_TELEMETRY_SDK_VERSION:()=>PWe,ATTR_URL_FRAGMENT:()=>kWe,ATTR_URL_FULL:()=>hh,ATTR_URL_PATH:()=>UWe,ATTR_URL_QUERY:()=>LWe,ATTR_URL_SCHEME:()=>QWe,ATTR_USER_AGENT_ORIGINAL:()=>PH,AWSECSLAUNCHTYPEVALUES_EC2:()=>ZKe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>WKe,AwsEcsLaunchtypeValues:()=>XKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>wKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>MKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>PKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>kKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>UKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>QKe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>LKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>jKe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>HKe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>GKe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>zKe,CLOUDPLATFORMVALUES_AZURE_VM:()=>FKe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>KKe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>YKe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>VKe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>$Ke,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>qKe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>DKe,CLOUDPROVIDERVALUES_AWS:()=>xKe,CLOUDPROVIDERVALUES_AZURE:()=>BKe,CLOUDPROVIDERVALUES_GCP:()=>NKe,CloudPlatformValues:()=>JKe,CloudProviderValues:()=>OKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>fqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>yqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Aqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Sqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>gqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Iqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>hqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>mqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Tqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Eqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>_qe,DBSYSTEMVALUES_ADABAS:()=>kVe,DBSYSTEMVALUES_CACHE:()=>PVe,DBSYSTEMVALUES_CASSANDRA:()=>XVe,DBSYSTEMVALUES_CLOUDSCAPE:()=>RVe,DBSYSTEMVALUES_COCKROACHDB:()=>dqe,DBSYSTEMVALUES_COLDFUSION:()=>WVe,DBSYSTEMVALUES_COSMOSDB:()=>iqe,DBSYSTEMVALUES_COUCHBASE:()=>rqe,DBSYSTEMVALUES_COUCHDB:()=>oqe,DBSYSTEMVALUES_DB2:()=>IVe,DBSYSTEMVALUES_DERBY:()=>LVe,DBSYSTEMVALUES_DYNAMODB:()=>aqe,DBSYSTEMVALUES_EDB:()=>MVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>cqe,DBSYSTEMVALUES_FILEMAKER:()=>QVe,DBSYSTEMVALUES_FIREBIRD:()=>UVe,DBSYSTEMVALUES_FIRSTSQL:()=>wVe,DBSYSTEMVALUES_GEODE:()=>uqe,DBSYSTEMVALUES_H2:()=>ZVe,DBSYSTEMVALUES_HANADB:()=>NVe,DBSYSTEMVALUES_HBASE:()=>eqe,DBSYSTEMVALUES_HIVE:()=>vVe,DBSYSTEMVALUES_HSQLDB:()=>DVe,DBSYSTEMVALUES_INFORMIX:()=>FVe,DBSYSTEMVALUES_INGRES:()=>OVe,DBSYSTEMVALUES_INSTANTDB:()=>GVe,DBSYSTEMVALUES_INTERBASE:()=>jVe,DBSYSTEMVALUES_MARIADB:()=>zVe,DBSYSTEMVALUES_MAXDB:()=>BVe,DBSYSTEMVALUES_MEMCACHED:()=>lqe,DBSYSTEMVALUES_MONGODB:()=>tqe,DBSYSTEMVALUES_MSSQL:()=>SVe,DBSYSTEMVALUES_MYSQL:()=>yVe,DBSYSTEMVALUES_NEO4J:()=>sqe,DBSYSTEMVALUES_NETEZZA:()=>HVe,DBSYSTEMVALUES_ORACLE:()=>TVe,DBSYSTEMVALUES_OTHER_SQL:()=>EVe,DBSYSTEMVALUES_PERVASIVE:()=>$Ve,DBSYSTEMVALUES_POINTBASE:()=>VVe,DBSYSTEMVALUES_POSTGRESQL:()=>CVe,DBSYSTEMVALUES_PROGRESS:()=>xVe,DBSYSTEMVALUES_REDIS:()=>nqe,DBSYSTEMVALUES_REDSHIFT:()=>bVe,DBSYSTEMVALUES_SQLITE:()=>qVe,DBSYSTEMVALUES_SYBASE:()=>YVe,DBSYSTEMVALUES_TERADATA:()=>KVe,DBSYSTEMVALUES_VERTICA:()=>JVe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>iZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>aZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>sZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>uZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>lZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>dZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>pZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>fZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>AZe,DbCassandraConsistencyLevelValues:()=>Cqe,DbSystemValues:()=>pqe,ERROR_TYPE_VALUE_OTHER:()=>mZe,EVENT_EXCEPTION:()=>UXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>wqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Oqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Nqe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Pqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>kqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Uqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Lqe,FAASTRIGGERVALUES_DATASOURCE:()=>bqe,FAASTRIGGERVALUES_HTTP:()=>vqe,FAASTRIGGERVALUES_OTHER:()=>xqe,FAASTRIGGERVALUES_PUBSUB:()=>Rqe,FAASTRIGGERVALUES_TIMER:()=>Dqe,FaasDocumentOperationValues:()=>Mqe,FaasInvokedProviderValues:()=>Qqe,FaasTriggerValues:()=>Bqe,HOSTARCHVALUES_AMD64:()=>eJe,HOSTARCHVALUES_ARM32:()=>tJe,HOSTARCHVALUES_ARM64:()=>nJe,HOSTARCHVALUES_IA64:()=>rJe,HOSTARCHVALUES_PPC32:()=>oJe,HOSTARCHVALUES_PPC64:()=>iJe,HOSTARCHVALUES_X86:()=>aJe,HTTPFLAVORVALUES_HTTP_1_0:()=>T7e,HTTPFLAVORVALUES_HTTP_1_1:()=>I7e,HTTPFLAVORVALUES_HTTP_2_0:()=>C7e,HTTPFLAVORVALUES_QUIC:()=>v7e,HTTPFLAVORVALUES_SPDY:()=>b7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>TZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>IZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>CZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>bZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>vZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>yZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>RZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>DZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>xZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>BZe,HostArchValues:()=>sJe,HttpFlavorValues:()=>R7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>LZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>QZe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>jZe,JVM_THREAD_STATE_VALUE_NEW:()=>zZe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>HZe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>$Ze,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>VZe,JVM_THREAD_STATE_VALUE_WAITING:()=>qZe,MESSAGETYPEVALUES_RECEIVED:()=>X7e,MESSAGETYPEVALUES_SENT:()=>W7e,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>D7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>x7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>O7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>N7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>FWe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>GWe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>jWe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>$We,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>HWe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>zWe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>VWe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>qWe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>YWe,METRIC_DOTNET_EXCEPTIONS:()=>KWe,METRIC_DOTNET_GC_COLLECTIONS:()=>JWe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>ZWe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>WWe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>XWe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>eXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>tXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>nXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>rXe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>oXe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>iXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>aXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>sXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>uXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>cXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>lXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>dXe,METRIC_DOTNET_TIMER_COUNT:()=>pXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>fXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>AXe,METRIC_JVM_CLASS_COUNT:()=>mXe,METRIC_JVM_CLASS_LOADED:()=>gXe,METRIC_JVM_CLASS_UNLOADED:()=>hXe,METRIC_JVM_CPU_COUNT:()=>_Xe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>EXe,METRIC_JVM_CPU_TIME:()=>SXe,METRIC_JVM_GC_DURATION:()=>yXe,METRIC_JVM_MEMORY_COMMITTED:()=>TXe,METRIC_JVM_MEMORY_LIMIT:()=>IXe,METRIC_JVM_MEMORY_USED:()=>CXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>bXe,METRIC_JVM_THREAD_COUNT:()=>vXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>RXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>DXe,METRIC_KESTREL_CONNECTION_DURATION:()=>xXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>BXe,METRIC_KESTREL_QUEUED_REQUESTS:()=>NXe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>OXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>wXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>MXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>PXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>kXe,MessageTypeValues:()=>eYe,MessagingDestinationKindValues:()=>B7e,MessagingOperationValues:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>r7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>a7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>t7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>f7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>o7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>i7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>d7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>e7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>s7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>c7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>A7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>u7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>l7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>h7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>p7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>g7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>n7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Jqe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Zqe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Wqe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Yqe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Kqe,NETTRANSPORTVALUES_INPROC:()=>$qe,NETTRANSPORTVALUES_IP:()=>jqe,NETTRANSPORTVALUES_IP_TCP:()=>Fqe,NETTRANSPORTVALUES_IP_UDP:()=>Gqe,NETTRANSPORTVALUES_OTHER:()=>Vqe,NETTRANSPORTVALUES_PIPE:()=>Hqe,NETTRANSPORTVALUES_UNIX:()=>zqe,NETWORK_TRANSPORT_VALUE_PIPE:()=>ZZe,NETWORK_TRANSPORT_VALUE_QUIC:()=>WZe,NETWORK_TRANSPORT_VALUE_TCP:()=>XZe,NETWORK_TRANSPORT_VALUE_UDP:()=>eWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>tWe,NETWORK_TYPE_VALUE_IPV4:()=>rWe,NETWORK_TYPE_VALUE_IPV6:()=>oWe,NetHostConnectionSubtypeValues:()=>y7e,NetHostConnectionTypeValues:()=>Xqe,NetTransportValues:()=>qqe,OSTYPEVALUES_AIX:()=>gJe,OSTYPEVALUES_DARWIN:()=>lJe,OSTYPEVALUES_DRAGONFLYBSD:()=>AJe,OSTYPEVALUES_FREEBSD:()=>dJe,OSTYPEVALUES_HPUX:()=>mJe,OSTYPEVALUES_LINUX:()=>cJe,OSTYPEVALUES_NETBSD:()=>pJe,OSTYPEVALUES_OPENBSD:()=>fJe,OSTYPEVALUES_SOLARIS:()=>hJe,OSTYPEVALUES_WINDOWS:()=>uJe,OSTYPEVALUES_Z_OS:()=>_Je,OTEL_STATUS_CODE_VALUE_ERROR:()=>uWe,OTEL_STATUS_CODE_VALUE_OK:()=>cWe,OsTypeValues:()=>EJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>H7e,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>F7e,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>P7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>K7e,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>L7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>z7e,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>q7e,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>U7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Q7e,RPCGRPCSTATUSCODEVALUES_OK:()=>M7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>$7e,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>G7e,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>j7e,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>J7e,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Y7e,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>V7e,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>k7e,RpcGrpcStatusCodeValues:()=>Z7e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>B9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>j9e,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>R9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>I9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>F9e,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>P9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>w9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>z9e,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>N9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>C9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>x9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>M9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>D9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>b9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>v9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>G9e,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>U9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>L9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>O9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>k9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>T9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Q9e,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>A$e,SEMATTRS_CODE_FILEPATH:()=>p9e,SEMATTRS_CODE_FUNCTION:()=>l9e,SEMATTRS_CODE_LINENO:()=>f9e,SEMATTRS_CODE_NAMESPACE:()=>d9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>I$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>D$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>R$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>b$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>y$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>T$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>v$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>C$e,SEMATTRS_DB_CONNECTION_STRING:()=>m$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>x$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>h$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>N$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>S$e,SEMATTRS_DB_NAME:()=>_$e,SEMATTRS_DB_OPERATION:()=>E$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>B$e,SEMATTRS_DB_SQL_TABLE:()=>O$e,SEMATTRS_DB_STATEMENT:()=>cH,SEMATTRS_DB_SYSTEM:()=>uH,SEMATTRS_DB_USER:()=>g$e,SEMATTRS_ENDUSER_ID:()=>i9e,SEMATTRS_ENDUSER_ROLE:()=>a9e,SEMATTRS_ENDUSER_SCOPE:()=>s9e,SEMATTRS_EXCEPTION_ESCAPED:()=>k$e,SEMATTRS_EXCEPTION_MESSAGE:()=>M$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>P$e,SEMATTRS_EXCEPTION_TYPE:()=>w$e,SEMATTRS_FAAS_COLDSTART:()=>H$e,SEMATTRS_FAAS_CRON:()=>z$e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>L$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>G$e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Q$e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>F$e,SEMATTRS_FAAS_EXECUTION:()=>U$e,SEMATTRS_FAAS_INVOKED_NAME:()=>$$e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>V$e,SEMATTRS_FAAS_INVOKED_REGION:()=>q$e,SEMATTRS_FAAS_TIME:()=>j$e,SEMATTRS_FAAS_TRIGGER:()=>lH,SEMATTRS_HTTP_CLIENT_IP:()=>y9e,SEMATTRS_HTTP_FLAVOR:()=>g9e,SEMATTRS_HTTP_HOST:()=>A9e,SEMATTRS_HTTP_METHOD:()=>Zx,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>_9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>E9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>mH,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>gH,SEMATTRS_HTTP_ROUTE:()=>hH,SEMATTRS_HTTP_SCHEME:()=>m9e,SEMATTRS_HTTP_SERVER_NAME:()=>S9e,SEMATTRS_HTTP_STATUS_CODE:()=>w0,SEMATTRS_HTTP_TARGET:()=>AH,SEMATTRS_HTTP_URL:()=>$I,SEMATTRS_HTTP_USER_AGENT:()=>h9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>gVe,SEMATTRS_MESSAGE_ID:()=>mVe,SEMATTRS_MESSAGE_TYPE:()=>AVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>hVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>tVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Z9e,SEMATTRS_MESSAGING_DESTINATION:()=>H9e,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>$9e,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>iVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>oVe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>rVe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>aVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>sVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>J9e,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>X9e,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>W9e,SEMATTRS_MESSAGING_OPERATION:()=>eVe,SEMATTRS_MESSAGING_PROTOCOL:()=>q9e,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Y9e,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>nVe,SEMATTRS_MESSAGING_SYSTEM:()=>_H,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>V9e,SEMATTRS_MESSAGING_URL:()=>K9e,SEMATTRS_NET_HOST_CARRIER_ICC:()=>r9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>t9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>n9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>e9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>X$e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>W$e,SEMATTRS_NET_HOST_IP:()=>pH,SEMATTRS_NET_HOST_NAME:()=>Z$e,SEMATTRS_NET_HOST_PORT:()=>fH,SEMATTRS_NET_PEER_IP:()=>dH,SEMATTRS_NET_PEER_NAME:()=>J$e,SEMATTRS_NET_PEER_PORT:()=>K$e,SEMATTRS_NET_TRANSPORT:()=>Y$e,SEMATTRS_PEER_SERVICE:()=>o9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>SH,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>pVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>fVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>dVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>lVe,SEMATTRS_RPC_METHOD:()=>cVe,SEMATTRS_RPC_SERVICE:()=>EH,SEMATTRS_RPC_SYSTEM:()=>uVe,SEMATTRS_THREAD_ID:()=>u9e,SEMATTRS_THREAD_NAME:()=>c9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>sYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>aYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>uYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>cYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>lYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>dYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>pYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>AYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>fYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>gYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>mYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>nYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>oYe,SEMRESATTRS_CLOUD_PLATFORM:()=>iYe,SEMRESATTRS_CLOUD_PROVIDER:()=>tYe,SEMRESATTRS_CLOUD_REGION:()=>rYe,SEMRESATTRS_CONTAINER_ID:()=>_Ye,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>SYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>yYe,SEMRESATTRS_CONTAINER_NAME:()=>hYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>EYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>TYe,SEMRESATTRS_DEVICE_ID:()=>IYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>CYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>bYe,SEMRESATTRS_FAAS_ID:()=>RYe,SEMRESATTRS_FAAS_INSTANCE:()=>xYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>BYe,SEMRESATTRS_FAAS_NAME:()=>vYe,SEMRESATTRS_FAAS_VERSION:()=>DYe,SEMRESATTRS_HOST_ARCH:()=>MYe,SEMRESATTRS_HOST_ID:()=>NYe,SEMRESATTRS_HOST_IMAGE_ID:()=>kYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>PYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>UYe,SEMRESATTRS_HOST_NAME:()=>OYe,SEMRESATTRS_HOST_TYPE:()=>wYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>LYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>HYe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>nKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>tKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>WYe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>ZYe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>YYe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>qYe,SEMRESATTRS_K8S_JOB_NAME:()=>eKe,SEMRESATTRS_K8S_JOB_UID:()=>XYe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>GYe,SEMRESATTRS_K8S_NODE_NAME:()=>QYe,SEMRESATTRS_K8S_NODE_UID:()=>FYe,SEMRESATTRS_K8S_POD_NAME:()=>zYe,SEMRESATTRS_K8S_POD_UID:()=>jYe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>VYe,SEMRESATTRS_K8S_REPLICASET_UID:()=>$Ye,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>JYe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>KYe,SEMRESATTRS_OS_DESCRIPTION:()=>oKe,SEMRESATTRS_OS_NAME:()=>iKe,SEMRESATTRS_OS_TYPE:()=>rKe,SEMRESATTRS_OS_VERSION:()=>aKe,SEMRESATTRS_PROCESS_COMMAND:()=>lKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>pKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>dKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>uKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>cKe,SEMRESATTRS_PROCESS_OWNER:()=>fKe,SEMRESATTRS_PROCESS_PID:()=>sKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>gKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>AKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>mKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>_Ke,SEMRESATTRS_SERVICE_NAME:()=>hKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>yH,SEMRESATTRS_SERVICE_VERSION:()=>EKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>IKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>yKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>SKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>TKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>vKe,SEMRESATTRS_WEBENGINE_NAME:()=>CKe,SEMRESATTRS_WEBENGINE_VERSION:()=>bKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>AWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>mWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>gWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>_We,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>EWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>SWe,SemanticAttributes:()=>_Ve,SemanticResourceAttributes:()=>RKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>SJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>yJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>TJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>IJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>CJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>bJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>vJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>RJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>DJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>TWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>IWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>CWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>bWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>vWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>RWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>DWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>xWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>BWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>NWe,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>OWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>wWe,TelemetrySdkLanguageValues:()=>BJe});var $n=O(()=>{A();_fe();Hme();$me();Vme();qme()});var Yme=Q($M=>{"use strict";A();Object.defineProperty($M,"__esModule",{value:!0});$M.ATTR_PROCESS_RUNTIME_NAME=void 0;$M.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var Kme=Q(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.SDK_INFO=void 0;var LXe=Rue(),VM=($n(),we(Nr)),QXe=Yme();qM.SDK_INFO={[VM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[QXe.ATTR_PROCESS_RUNTIME_NAME]:"node",[VM.ATTR_TELEMETRY_SDK_LANGUAGE]:VM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[VM.ATTR_TELEMETRY_SDK_VERSION]:LXe.VERSION}});var Jme=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.otperformance=Bs.SDK_INFO=Bs._globalThis=Bs.getStringListFromEnv=Bs.getNumberFromEnv=Bs.getBooleanFromEnv=Bs.getStringFromEnv=void 0;var YM=bue();Object.defineProperty(Bs,"getStringFromEnv",{enumerable:!0,get:function(){return YM.getStringFromEnv}});Object.defineProperty(Bs,"getBooleanFromEnv",{enumerable:!0,get:function(){return YM.getBooleanFromEnv}});Object.defineProperty(Bs,"getNumberFromEnv",{enumerable:!0,get:function(){return YM.getNumberFromEnv}});Object.defineProperty(Bs,"getStringListFromEnv",{enumerable:!0,get:function(){return YM.getStringListFromEnv}});var FXe=vue();Object.defineProperty(Bs,"_globalThis",{enumerable:!0,get:function(){return FXe._globalThis}});var GXe=Kme();Object.defineProperty(Bs,"SDK_INFO",{enumerable:!0,get:function(){return GXe.SDK_INFO}});Bs.otperformance=performance});var kH=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getStringFromEnv=Ns.getBooleanFromEnv=Ns.otperformance=Ns._globalThis=Ns.SDK_INFO=void 0;var k0=Jme();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return k0.SDK_INFO}});Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return k0._globalThis}});Object.defineProperty(Ns,"otperformance",{enumerable:!0,get:function(){return k0.otperformance}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return k0.getBooleanFromEnv}});Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return k0.getStringFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return k0.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return k0.getStringListFromEnv}})});var ege=Q(Wr=>{"use strict";A();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.addHrTimes=Wr.isTimeInput=Wr.isTimeInputHrTime=Wr.hrTimeToMicroseconds=Wr.hrTimeToMilliseconds=Wr.hrTimeToNanoseconds=Wr.hrTimeToTimeStamp=Wr.hrTimeDuration=Wr.timeInputToHrTime=Wr.hrTime=Wr.getTimeOrigin=Wr.millisToHrTime=void 0;var KM=kH(),Zme=9,jXe=6,zXe=Math.pow(10,jXe),JM=Math.pow(10,Zme);function Wx(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*zXe);return[n,r]}Wr.millisToHrTime=Wx;function HXe(){return KM.otperformance.timeOrigin}Wr.getTimeOrigin=HXe;function Wme(e){let t=Wx(KM.otperformance.timeOrigin),n=Wx(typeof e=="number"?e:KM.otperformance.now());return Xme(t,n)}Wr.hrTime=Wme;function $Xe(e){if(UH(e))return e;if(typeof e=="number")return e<KM.otperformance.timeOrigin?Wme(e):Wx(e);if(e instanceof Date)return Wx(e.getTime());throw TypeError("Invalid input type")}Wr.timeInputToHrTime=$Xe;function VXe(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=JM),[n,r]}Wr.hrTimeDuration=VXe;function qXe(e){let t=Zme,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Wr.hrTimeToTimeStamp=qXe;function YXe(e){return e[0]*JM+e[1]}Wr.hrTimeToNanoseconds=YXe;function KXe(e){return e[0]*1e3+e[1]/1e6}Wr.hrTimeToMilliseconds=KXe;function JXe(e){return e[0]*1e6+e[1]/1e3}Wr.hrTimeToMicroseconds=JXe;function UH(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Wr.isTimeInputHrTime=UH;function ZXe(e){return UH(e)||typeof e=="number"||e instanceof Date}Wr.isTimeInput=ZXe;function Xme(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=JM&&(n[1]-=JM,n[0]+=1),n}Wr.addHrTimes=Xme});var tge=Q(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.unrefTimer=void 0;function WXe(e){typeof e!="number"&&e.unref()}ZM.unrefTimer=WXe});var nge=Q(Xx=>{"use strict";A();Object.defineProperty(Xx,"__esModule",{value:!0});Xx.ExportResultCode=void 0;var XXe;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(XXe=Xx.ExportResultCode||(Xx.ExportResultCode={}))});var oge=Q(WM=>{"use strict";A();Object.defineProperty(WM,"__esModule",{value:!0});WM.CompositePropagator=void 0;var rge=(Le(),we(Je)),LH=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){rge.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){rge.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};WM.CompositePropagator=LH});var ige=Q(qI=>{"use strict";A();Object.defineProperty(qI,"__esModule",{value:!0});qI.validateValue=qI.validateKey=void 0;var QH="[_0-9a-z-*/]",eet=`[a-z]${QH}{0,255}`,tet=`[a-z0-9]${QH}{0,240}@[a-z]${QH}{0,13}`,net=new RegExp(`^(?:${eet}|${tet})$`),ret=/^[ -~]{0,255}[!-~]$/,oet=/,|=/;function iet(e){return net.test(e)}qI.validateKey=iet;function aet(e){return ret.test(e)&&!oet.test(e)}qI.validateValue=aet});var GH=Q(XM=>{"use strict";A();Object.defineProperty(XM,"__esModule",{value:!0});XM.TraceState=void 0;var age=ige(),sge=32,set=512,uge=",",cge="=",FH=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+cge+this.get(n)),t),[]).join(uge)}_parse(t){t.length>set||(this._internalState=t.split(uge).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(cge);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,age.validateKey)(a)&&(0,age.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>sge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,sge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};XM.TraceState=FH});var dge=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.W3CTraceContextPropagator=Os.parseTraceParent=Os.TRACE_STATE_HEADER=Os.TRACE_PARENT_HEADER=void 0;var eP=(Le(),we(Je)),uet=Jx(),cet=GH();Os.TRACE_PARENT_HEADER="traceparent";Os.TRACE_STATE_HEADER="tracestate";var det="00",pet="(?!ff)[\\da-f]{2}",fet="(?![0]{32})[\\da-f]{32}",Aet="(?![0]{16})[\\da-f]{16}",met="[\\da-f]{2}",get=new RegExp(`^\\s?(${pet})-(${fet})-(${Aet})-(${met})(-.*)?\\s?$`);function lge(e){let t=get.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Os.parseTraceParent=lge;var jH=class{inject(t,n,r){let o=eP.trace.getSpanContext(t);if(!o||(0,uet.isTracingSuppressed)(t)||!(0,eP.isSpanContextValid)(o))return;let i=`${det}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||eP.TraceFlags.NONE).toString(16)}`;r.set(n,Os.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Os.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Os.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=lge(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Os.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new cet.TraceState(typeof d=="string"?d:void 0)}return eP.trace.setSpanContext(t,a)}fields(){return[Os.TRACE_PARENT_HEADER,Os.TRACE_STATE_HEADER]}};Os.W3CTraceContextPropagator=jH});var pge=Q(Cp=>{"use strict";A();Object.defineProperty(Cp,"__esModule",{value:!0});Cp.getRPCMetadata=Cp.deleteRPCMetadata=Cp.setRPCMetadata=Cp.RPCType=void 0;var het=(Le(),we(Je)),zH=(0,het.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),_et;(function(e){e.HTTP="http"})(_et=Cp.RPCType||(Cp.RPCType={}));function Eet(e,t){return e.setValue(zH,t)}Cp.setRPCMetadata=Eet;function yet(e){return e.deleteValue(zH)}Cp.deleteRPCMetadata=yet;function Tet(e){return e.getValue(zH)}Cp.getRPCMetadata=Tet});var hge=Q(tP=>{"use strict";A();Object.defineProperty(tP,"__esModule",{value:!0});tP.isPlainObject=void 0;var Iet="[object Object]",Cet="[object Null]",bet="[object Undefined]",vet=Function.prototype,fge=vet.toString,Ret=fge.call(Object),Det=Object.getPrototypeOf,Age=Object.prototype,mge=Age.hasOwnProperty,U0=Symbol?Symbol.toStringTag:void 0,gge=Age.toString;function xet(e){if(!Bet(e)||Net(e)!==Iet)return!1;let t=Det(e);if(t===null)return!0;let n=mge.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fge.call(n)===Ret}tP.isPlainObject=xet;function Bet(e){return e!=null&&typeof e=="object"}function Net(e){return e==null?e===void 0?bet:Cet:U0&&U0 in Object(e)?Oet(e):wet(e)}function Oet(e){let t=mge.call(e,U0),n=e[U0],r=!1;try{e[U0]=void 0,r=!0}catch{}let o=gge.call(e);return r&&(t?e[U0]=n:delete e[U0]),o}function wet(e){return gge.call(e)}});var Tge=Q(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.merge=void 0;var _ge=hge(),Met=20;function Pet(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Sge(t,e.shift(),0,n);return t}oP.merge=Pet;function HH(e){return rP(e)?e.slice():e}function Sge(e,t,n=0,r){let o;if(!(n>Met)){if(n++,nP(e)||nP(t)||yge(t))o=HH(t);else if(rP(e)){if(o=e.slice(),rP(t))for(let i=0,a=t.length;i<a;i++)o.push(HH(t[i]));else if(e1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=HH(t[d])}}}else if(e1(e))if(e1(t)){if(!ket(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(nP(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],y=m;if(Ege(e,d,r)||Ege(t,d,r))delete o[d];else{if(e1(h)&&e1(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:d}),b.push({obj:t,key:d}),r.set(h,S),r.set(y,b)}o[d]=Sge(o[d],m,n,r)}}}}else o=t;return o}}function Ege(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 rP(e){return Array.isArray(e)}function yge(e){return typeof e=="function"}function e1(e){return!nP(e)&&!rP(e)&&!yge(e)&&typeof e=="object"}function nP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function ket(e,t){return!(!(0,_ge.isPlainObject)(e)||!(0,_ge.isPlainObject)(t))}});var Ige=Q(YI=>{"use strict";A();Object.defineProperty(YI,"__esModule",{value:!0});YI.callWithTimeout=YI.TimeoutError=void 0;var iP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};YI.TimeoutError=iP;function Uet(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new iP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}YI.callWithTimeout=Uet});var bge=Q(KI=>{"use strict";A();Object.defineProperty(KI,"__esModule",{value:!0});KI.isUrlIgnored=KI.urlMatches=void 0;function Cge(e,t){return typeof t=="string"?e===t:!!e.match(t)}KI.urlMatches=Cge;function Let(e,t){if(!t)return!1;for(let n of t)if(Cge(e,n))return!0;return!1}KI.isUrlIgnored=Let});var vge=Q(aP=>{"use strict";A();Object.defineProperty(aP,"__esModule",{value:!0});aP.Deferred=void 0;var $H=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)}};aP.Deferred=$H});var Rge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.BindOnceFuture=void 0;var Qet=vge(),VH=class{_isCalled=!1;_deferred=new Qet.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}};sP.BindOnceFuture=VH});var xge=Q(uP=>{"use strict";A();Object.defineProperty(uP,"__esModule",{value:!0});uP.diagLogLevelFromString=void 0;var Tm=(Le(),we(Je)),Dge={ALL:Tm.DiagLogLevel.ALL,VERBOSE:Tm.DiagLogLevel.VERBOSE,DEBUG:Tm.DiagLogLevel.DEBUG,INFO:Tm.DiagLogLevel.INFO,WARN:Tm.DiagLogLevel.WARN,ERROR:Tm.DiagLogLevel.ERROR,NONE:Tm.DiagLogLevel.NONE};function Fet(e){if(e==null)return;let t=Dge[e.toUpperCase()];return t??(Tm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(Dge)}, using default`),Tm.DiagLogLevel.INFO)}uP.diagLogLevelFromString=Fet});var Nge=Q(cP=>{"use strict";A();Object.defineProperty(cP,"__esModule",{value:!0});cP._export=void 0;var Bge=(Le(),we(Je)),Get=Jx();function jet(e,t){return new Promise(n=>{Bge.context.with((0,Get.suppressTracing)(Bge.context.active()),()=>{e.export(t,n)})})}cP._export=jet});var hr=Q(xe=>{"use strict";A();Object.defineProperty(xe,"__esModule",{value:!0});xe.internal=xe.diagLogLevelFromString=xe.BindOnceFuture=xe.urlMatches=xe.isUrlIgnored=xe.callWithTimeout=xe.TimeoutError=xe.merge=xe.TraceState=xe.unsuppressTracing=xe.suppressTracing=xe.isTracingSuppressed=xe.setRPCMetadata=xe.getRPCMetadata=xe.deleteRPCMetadata=xe.RPCType=xe.parseTraceParent=xe.W3CTraceContextPropagator=xe.TRACE_STATE_HEADER=xe.TRACE_PARENT_HEADER=xe.CompositePropagator=xe.otperformance=xe.getStringListFromEnv=xe.getNumberFromEnv=xe.getBooleanFromEnv=xe.getStringFromEnv=xe._globalThis=xe.SDK_INFO=xe.parseKeyPairsIntoRecord=xe.ExportResultCode=xe.unrefTimer=xe.timeInputToHrTime=xe.millisToHrTime=xe.isTimeInputHrTime=xe.isTimeInput=xe.hrTimeToTimeStamp=xe.hrTimeToNanoseconds=xe.hrTimeToMilliseconds=xe.hrTimeToMicroseconds=xe.hrTimeDuration=xe.hrTime=xe.getTimeOrigin=xe.addHrTimes=xe.loggingErrorHandler=xe.setGlobalErrorHandler=xe.globalErrorHandler=xe.sanitizeAttributes=xe.isAttributeValue=xe.AnchoredClock=xe.W3CBaggagePropagator=void 0;var zet=fue();Object.defineProperty(xe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return zet.W3CBaggagePropagator}});var Het=Aue();Object.defineProperty(xe,"AnchoredClock",{enumerable:!0,get:function(){return Het.AnchoredClock}});var Oge=Eue();Object.defineProperty(xe,"isAttributeValue",{enumerable:!0,get:function(){return Oge.isAttributeValue}});Object.defineProperty(xe,"sanitizeAttributes",{enumerable:!0,get:function(){return Oge.sanitizeAttributes}});var wge=yue();Object.defineProperty(xe,"globalErrorHandler",{enumerable:!0,get:function(){return wge.globalErrorHandler}});Object.defineProperty(xe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return wge.setGlobalErrorHandler}});var $et=aH();Object.defineProperty(xe,"loggingErrorHandler",{enumerable:!0,get:function(){return $et.loggingErrorHandler}});var ld=ege();Object.defineProperty(xe,"addHrTimes",{enumerable:!0,get:function(){return ld.addHrTimes}});Object.defineProperty(xe,"getTimeOrigin",{enumerable:!0,get:function(){return ld.getTimeOrigin}});Object.defineProperty(xe,"hrTime",{enumerable:!0,get:function(){return ld.hrTime}});Object.defineProperty(xe,"hrTimeDuration",{enumerable:!0,get:function(){return ld.hrTimeDuration}});Object.defineProperty(xe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return ld.hrTimeToMicroseconds}});Object.defineProperty(xe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return ld.hrTimeToMilliseconds}});Object.defineProperty(xe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return ld.hrTimeToNanoseconds}});Object.defineProperty(xe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return ld.hrTimeToTimeStamp}});Object.defineProperty(xe,"isTimeInput",{enumerable:!0,get:function(){return ld.isTimeInput}});Object.defineProperty(xe,"isTimeInputHrTime",{enumerable:!0,get:function(){return ld.isTimeInputHrTime}});Object.defineProperty(xe,"millisToHrTime",{enumerable:!0,get:function(){return ld.millisToHrTime}});Object.defineProperty(xe,"timeInputToHrTime",{enumerable:!0,get:function(){return ld.timeInputToHrTime}});var Vet=tge();Object.defineProperty(xe,"unrefTimer",{enumerable:!0,get:function(){return Vet.unrefTimer}});var qet=nge();Object.defineProperty(xe,"ExportResultCode",{enumerable:!0,get:function(){return qet.ExportResultCode}});var Yet=tH();Object.defineProperty(xe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Yet.parseKeyPairsIntoRecord}});var L0=kH();Object.defineProperty(xe,"SDK_INFO",{enumerable:!0,get:function(){return L0.SDK_INFO}});Object.defineProperty(xe,"_globalThis",{enumerable:!0,get:function(){return L0._globalThis}});Object.defineProperty(xe,"getStringFromEnv",{enumerable:!0,get:function(){return L0.getStringFromEnv}});Object.defineProperty(xe,"getBooleanFromEnv",{enumerable:!0,get:function(){return L0.getBooleanFromEnv}});Object.defineProperty(xe,"getNumberFromEnv",{enumerable:!0,get:function(){return L0.getNumberFromEnv}});Object.defineProperty(xe,"getStringListFromEnv",{enumerable:!0,get:function(){return L0.getStringListFromEnv}});Object.defineProperty(xe,"otperformance",{enumerable:!0,get:function(){return L0.otperformance}});var Ket=oge();Object.defineProperty(xe,"CompositePropagator",{enumerable:!0,get:function(){return Ket.CompositePropagator}});var lP=dge();Object.defineProperty(xe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return lP.TRACE_PARENT_HEADER}});Object.defineProperty(xe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return lP.TRACE_STATE_HEADER}});Object.defineProperty(xe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return lP.W3CTraceContextPropagator}});Object.defineProperty(xe,"parseTraceParent",{enumerable:!0,get:function(){return lP.parseTraceParent}});var dP=pge();Object.defineProperty(xe,"RPCType",{enumerable:!0,get:function(){return dP.RPCType}});Object.defineProperty(xe,"deleteRPCMetadata",{enumerable:!0,get:function(){return dP.deleteRPCMetadata}});Object.defineProperty(xe,"getRPCMetadata",{enumerable:!0,get:function(){return dP.getRPCMetadata}});Object.defineProperty(xe,"setRPCMetadata",{enumerable:!0,get:function(){return dP.setRPCMetadata}});var qH=Jx();Object.defineProperty(xe,"isTracingSuppressed",{enumerable:!0,get:function(){return qH.isTracingSuppressed}});Object.defineProperty(xe,"suppressTracing",{enumerable:!0,get:function(){return qH.suppressTracing}});Object.defineProperty(xe,"unsuppressTracing",{enumerable:!0,get:function(){return qH.unsuppressTracing}});var Jet=GH();Object.defineProperty(xe,"TraceState",{enumerable:!0,get:function(){return Jet.TraceState}});var Zet=Tge();Object.defineProperty(xe,"merge",{enumerable:!0,get:function(){return Zet.merge}});var Mge=Ige();Object.defineProperty(xe,"TimeoutError",{enumerable:!0,get:function(){return Mge.TimeoutError}});Object.defineProperty(xe,"callWithTimeout",{enumerable:!0,get:function(){return Mge.callWithTimeout}});var Pge=bge();Object.defineProperty(xe,"isUrlIgnored",{enumerable:!0,get:function(){return Pge.isUrlIgnored}});Object.defineProperty(xe,"urlMatches",{enumerable:!0,get:function(){return Pge.urlMatches}});var Wet=Rge();Object.defineProperty(xe,"BindOnceFuture",{enumerable:!0,get:function(){return Wet.BindOnceFuture}});var Xet=xge();Object.defineProperty(xe,"diagLogLevelFromString",{enumerable:!0,get:function(){return Xet.diagLogLevelFromString}});var ett=Nge();xe.internal={_export:ett._export}});var kge=Q(pP=>{"use strict";A();Object.defineProperty(pP,"__esModule",{value:!0});pP.VERSION=void 0;pP.VERSION="0.214.0"});var Uge=Q(t1=>{"use strict";A();Object.defineProperty(t1,"__esModule",{value:!0});t1.SeverityNumber=void 0;var ttt;(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"})(ttt=t1.SeverityNumber||(t1.SeverityNumber={}))});var AP=Q(JI=>{"use strict";A();Object.defineProperty(JI,"__esModule",{value:!0});JI.NOOP_LOGGER=JI.NoopLogger=void 0;var fP=class{emit(t){}};JI.NoopLogger=fP;JI.NOOP_LOGGER=new fP});var Lge=Q(Lf=>{"use strict";A();Object.defineProperty(Lf,"__esModule",{value:!0});Lf.API_BACKWARDS_COMPATIBILITY_VERSION=Lf.makeGetter=Lf._global=Lf.GLOBAL_LOGS_API_KEY=void 0;Lf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Lf._global=globalThis;function ntt(e,t,n){return r=>r===e?t:n}Lf.makeGetter=ntt;Lf.API_BACKWARDS_COMPATIBILITY_VERSION=1});var YH=Q(ZI=>{"use strict";A();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.NOOP_LOGGER_PROVIDER=ZI.NoopLoggerProvider=void 0;var rtt=AP(),mP=class{getLogger(t,n,r){return new rtt.NoopLogger}};ZI.NoopLoggerProvider=mP;ZI.NOOP_LOGGER_PROVIDER=new mP});var Qge=Q(gP=>{"use strict";A();Object.defineProperty(gP,"__esModule",{value:!0});gP.ProxyLogger=void 0;var ott=AP(),KH=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):ott.NOOP_LOGGER}};gP.ProxyLogger=KH});var Fge=Q(hP=>{"use strict";A();Object.defineProperty(hP,"__esModule",{value:!0});hP.ProxyLoggerProvider=void 0;var itt=YH(),att=Qge(),JH=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new att.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:itt.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)}};hP.ProxyLoggerProvider=JH});var jge=Q(_P=>{"use strict";A();Object.defineProperty(_P,"__esModule",{value:!0});_P.LogsAPI=void 0;var dd=Lge(),stt=YH(),Gge=Fge(),ZH=class e{constructor(){this._proxyLoggerProvider=new Gge.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return dd._global[dd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(dd._global[dd.GLOBAL_LOGS_API_KEY]=(0,dd.makeGetter)(dd.API_BACKWARDS_COMPATIBILITY_VERSION,t,stt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=dd._global[dd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(dd._global,dd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete dd._global[dd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Gge.ProxyLoggerProvider}};_P.LogsAPI=ZH});var WH=Q(Qf=>{"use strict";A();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.logs=Qf.NoopLogger=Qf.NOOP_LOGGER=Qf.SeverityNumber=void 0;var utt=Uge();Object.defineProperty(Qf,"SeverityNumber",{enumerable:!0,get:function(){return utt.SeverityNumber}});var zge=AP();Object.defineProperty(Qf,"NOOP_LOGGER",{enumerable:!0,get:function(){return zge.NOOP_LOGGER}});Object.defineProperty(Qf,"NoopLogger",{enumerable:!0,get:function(){return zge.NoopLogger}});var ctt=jge();Qf.logs=ctt.LogsAPI.getInstance()});var Hge=Q(WI=>{"use strict";A();Object.defineProperty(WI,"__esModule",{value:!0});WI.disableInstrumentations=WI.enableInstrumentations=void 0;function ltt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}WI.enableInstrumentations=ltt;function dtt(e){e.forEach(t=>t.disable())}WI.disableInstrumentations=dtt});var qge=Q(EP=>{"use strict";A();Object.defineProperty(EP,"__esModule",{value:!0});EP.registerInstrumentations=void 0;var $ge=(Le(),we(Je)),ptt=WH(),Vge=Hge();function ftt(e){let t=e.tracerProvider||$ge.trace.getTracerProvider(),n=e.meterProvider||$ge.metrics.getMeterProvider(),r=e.loggerProvider||ptt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Vge.enableInstrumentations)(o,t,n,r),()=>{(0,Vge.disableInstrumentations)(o)}}EP.registerInstrumentations=ftt});var nhe=Q(SP=>{"use strict";A();Object.defineProperty(SP,"__esModule",{value:!0});SP.satisfies=void 0;var n5=(Le(),we(Je)),Wge=/^(?: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-]+)*))?$/,Att=/^(?<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-]+)*))?$/,mtt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function gtt(e,t,n){if(!htt(e))return n5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=ytt(e);if(!r)return!1;let o=[],i=Xge(r,t,o,n);return i&&!n?.includePrerelease?Ett(r,o):i}SP.satisfies=gtt;function htt(e){return typeof e=="string"&&Wge.test(e)}function Xge(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(XH(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=jtt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!XH(e,i,n,r))return!1;return!0}return XH(e,t,n,r)}function XH(e,t,n,r){if(t=Stt(t,r),t.includes(" "))return Xge(e,t,n,r);{let o=Ttt(t);return n.push(o),_tt(e,o)}}function _tt(e,t){if(t.invalid)return!1;if(!t.version||t5(t.version))return!0;let n=Kge(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=Kge(r,o)}return mtt[t.op]?.includes(n)}function Ett(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Stt(e,t){return e=e.trim(),e=Ftt(e,t),e=Qtt(e),e=Gtt(e,t),e=e.trim(),e}function Au(e){return!e||e.toLowerCase()==="x"||e==="*"}function ytt(e){let t=e.match(Wge);if(!t){n5.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 Ttt(e){if(!e)return{};let t=e.match(Att);if(!t)return n5.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 t5(e){return e==="*"||e==="x"||e==="X"}function Yge(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Itt(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 Ctt(e,t){if(t5(e)||t5(t))return 0;let[n,r]=Itt(Yge(e),Yge(t));return n>r?1:n<r?-1:0}function Kge(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Ctt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var ehe="[a-zA-Z0-9-]",the="0|[1-9]\\d*",btt=`\\d*[a-zA-Z-]${ehe}*`,vtt="((?:<|>)?=?)",Jge=`(?:${the}|${btt})`,Rtt=`(?:-(${Jge}(?:\\.${Jge})*))`,Zge=`${ehe}+`,Dtt=`(?:\\+(${Zge}(?:\\.${Zge})*))`,e5=`${the}|x|X|\\*`,n1=`[v=\\s]*(${e5})(?:\\.(${e5})(?:\\.(${e5})(?:${Rtt})?${Dtt}?)?)?`,xtt=`^${vtt}\\s*${n1}$`,Btt=new RegExp(xtt),Ntt=`^\\s*(${n1})\\s+-\\s+(${n1})\\s*$`,Ott=new RegExp(Ntt),wtt="(?:~>?)",Mtt=`^${wtt}${n1}$`,Ptt=new RegExp(Mtt),ktt="(?:\\^)",Utt=`^${ktt}${n1}$`,Ltt=new RegExp(Utt);function Qtt(e){let t=Ptt;return e.replace(t,(n,r,o,i,a)=>{let c;return Au(r)?c="":Au(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Au(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 Ftt(e,t){let n=Ltt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Au(i)?m="":Au(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Au(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Gtt(e,t){let n=Btt;return e.replace(n,(r,o,i,a,c,d)=>{let m=Au(i),h=m||Au(a),y=h||Au(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?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==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function jtt(e,t){let n=Ott;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,b,R)=>(Au(i)?o="":Au(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Au(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Au(y)?h="":Au(S)?h=`<${+y+1}.0.0-0`:Au(b)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${b}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var r5=Q(ts=>{"use strict";A();Object.defineProperty(ts,"__esModule",{value:!0});ts.massUnwrap=ts.unwrap=ts.massWrap=ts.wrap=void 0;var mu=console.error.bind(console);function r1(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var ztt=(e,t,n)=>{if(!e||!e[t]){mu("no original function "+String(t)+" to wrap");return}if(!n){mu("no wrapper function"),mu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){mu("original object and wrapper must be functions");return}let o=n(r,t);return r1(o,"__original",r),r1(o,"__unwrap",()=>{e[t]===o&&r1(e,t,r)}),r1(o,"__wrapped",!0),r1(e,t,o),o};ts.wrap=ztt;var Htt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{mu("must provide one or more modules to patch"),mu(new Error().stack);return}if(!(t&&Array.isArray(t))){mu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ts.wrap)(r,o,n)})})};ts.massWrap=Htt;var $tt=(e,t)=>{if(!e||!e[t]){mu("no function to unwrap."),mu(new Error().stack);return}let n=e[t];if(!n.__unwrap)mu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ts.unwrap=$tt;var Vtt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{mu("must provide one or more modules to patch"),mu(new Error().stack);return}if(!(t&&Array.isArray(t))){mu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ts.unwrap)(n,r)})})};ts.massUnwrap=Vtt;function o1(e){e&&e.logger&&(typeof e.logger!="function"?mu("new logger isn't a function, not replacing"):mu=e.logger)}ts.default=o1;o1.wrap=ts.wrap;o1.massWrap=ts.massWrap;o1.unwrap=ts.unwrap;o1.massUnwrap=ts.massUnwrap});var rhe=Q(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.InstrumentationAbstract=void 0;var o5=(Le(),we(Je)),qtt=WH(),yP=r5(),i5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=o5.diag.createComponentLogger({namespace:t}),this._tracer=o5.trace.getTracer(t,n),this._meter=o5.metrics.getMeter(t,n),this._logger=qtt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=yP.wrap;_unwrap=yP.unwrap;_massWrap=yP.massWrap;_massUnwrap=yP.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)}}};TP.InstrumentationAbstract=i5});var ihe=Q((R8t,ohe)=>{A();var XI=1e3,eC=XI*60,tC=eC*60,Q0=tC*24,Ytt=Q0*7,Ktt=Q0*365.25;ohe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Jtt(e);if(n==="number"&&isFinite(e))return t.long?Wtt(e):Ztt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Jtt(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*Ktt;case"weeks":case"week":case"w":return n*Ytt;case"days":case"day":case"d":return n*Q0;case"hours":case"hour":case"hrs":case"hr":case"h":return n*tC;case"minutes":case"minute":case"mins":case"min":case"m":return n*eC;case"seconds":case"second":case"secs":case"sec":case"s":return n*XI;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Ztt(e){var t=Math.abs(e);return t>=Q0?Math.round(e/Q0)+"d":t>=tC?Math.round(e/tC)+"h":t>=eC?Math.round(e/eC)+"m":t>=XI?Math.round(e/XI)+"s":e+"ms"}function Wtt(e){var t=Math.abs(e);return t>=Q0?IP(e,t,Q0,"day"):t>=tC?IP(e,t,tC,"hour"):t>=eC?IP(e,t,eC,"minute"):t>=XI?IP(e,t,XI,"second"):e+" ms"}function IP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var a5=Q((x8t,ahe)=>{A();function Xtt(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=ihe(),n.destroy=m,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,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),$=F-(y||F);M.diff=$,M.prev=y,M.curr=F,y=F,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let H=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(fe,he)=>{if(fe==="%%")return"%";H++;let ve=n.formatters[he];if(typeof ve=="function"){let Te=N[H];fe=ve.call(M,Te),N.splice(H,1),H--}return fe}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,N)}return B.namespace=h,B.useColors=n.useColors(),B.color=n.selectColor(h),B.extend=r,B.destroy=n.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,R=n.enabled(h)),R),set:N=>{S=N}}),typeof n.init=="function"&&n.init(B),B}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,R=-1,B=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(R=b,B=S,b++):(S++,b++);else if(R!==-1)b=R+1,B++,S=B;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 d(h){return h instanceof Error?h.stack||h.message:h}function m(){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}ahe.exports=Xtt});var she=Q((cc,CP)=>{A();cc.formatArgs=tnt;cc.save=nnt;cc.load=rnt;cc.useColors=ent;cc.storage=ont();cc.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`."))}})();cc.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 ent(){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 tnt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+CP.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)}cc.log=console.debug||console.log||(()=>{});function nnt(e){try{e?cc.storage.setItem("debug",e):cc.storage.removeItem("debug")}catch{}}function rnt(){let e;try{e=cc.storage.getItem("debug")||cc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ont(){try{return localStorage}catch{}}CP.exports=a5()(cc);var{formatters:int}=CP.exports;int.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var che=Q((O8t,uhe)=>{"use strict";A();uhe.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 phe=Q((M8t,dhe)=>{"use strict";A();var ant=Ue("os"),lhe=Ue("tty"),pd=che(),{env:Ca}=process,_h;pd("no-color")||pd("no-colors")||pd("color=false")||pd("color=never")?_h=0:(pd("color")||pd("colors")||pd("color=true")||pd("color=always"))&&(_h=1);"FORCE_COLOR"in Ca&&(Ca.FORCE_COLOR==="true"?_h=1:Ca.FORCE_COLOR==="false"?_h=0:_h=Ca.FORCE_COLOR.length===0?1:Math.min(parseInt(Ca.FORCE_COLOR,10),3));function s5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u5(e,t){if(_h===0)return 0;if(pd("color=16m")||pd("color=full")||pd("color=truecolor"))return 3;if(pd("color=256"))return 2;if(e&&!t&&_h===void 0)return 0;let n=_h||0;if(Ca.TERM==="dumb")return n;if(process.platform==="win32"){let r=ant.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ca)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ca)||Ca.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ca)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ca.TEAMCITY_VERSION)?1:0;if(Ca.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ca){let r=parseInt((Ca.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ca.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ca.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ca.TERM)||"COLORTERM"in Ca?1:n}function snt(e){let t=u5(e,e&&e.isTTY);return s5(t)}dhe.exports={supportsColor:snt,stdout:s5(u5(!0,lhe.isatty(1))),stderr:s5(u5(!0,lhe.isatty(2)))}});var Ahe=Q((ba,vP)=>{A();var unt=Ue("tty"),bP=Ue("util");ba.init=mnt;ba.log=pnt;ba.formatArgs=lnt;ba.save=fnt;ba.load=Ant;ba.useColors=cnt;ba.destroy=bP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ba.colors=[6,2,3,4,5,1];try{let e=phe();e&&(e.stderr||e).level>=2&&(ba.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{}ba.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 cnt(){return"colors"in ba.inspectOpts?!!ba.inspectOpts.colors:unt.isatty(process.stderr.fd)}function lnt(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 E5e=Object.create;var hM=Object.defineProperty;var S5e=Object.getOwnPropertyDescriptor;var y5e=Object.getOwnPropertyNames;var T5e=Object.getPrototypeOf,I5e=Object.prototype.hasOwnProperty;var Ue=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t)=>()=>(e&&(t=e(e=0)),t);var Q=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),es=(e,t)=>{for(var n in t)hM(e,n,{get:t[n],enumerable:!0})},hse=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of y5e(t))!I5e.call(e,o)&&o!==n&&hM(e,o,{get:()=>t[o],enumerable:!(r=S5e(t,o))||r.enumerable});return e};var ue=(e,t,n)=>(n=e!=null?E5e(T5e(e)):{},hse(t||!e||!e.__esModule?hM(n,"default",{value:e,enumerable:!0}):n,e)),we=e=>hse(hM({},"__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.58"}}catch{}})()});var _m,Ez=O(()=>{A();_m="1.9.1"});function C5e(e){let t=new Set([e]),n=new Set,r=e.match(_se);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(d){return d===e};function i(c){return n.add(c),!1}function a(c){return t.add(c),!0}return function(d){if(t.has(d))return!0;if(n.has(d))return!1;let m=d.match(_se);if(!m)return i(d);let h={major:+m[1],minor:+m[2],patch:+m[3],prerelease:m[4]};return h.prerelease!=null||o.major!==h.major?i(d):o.major===0?o.minor===h.minor&&o.patch<=h.patch?a(d):i(d):o.minor<=h.minor?a(d):i(d)}}var _se,Ese,Sse=O(()=>{A();Ez();_se=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;Ese=C5e(_m)});function Of(e,t,n,r=!1){var o;let i=zx[jx]=(o=zx[jx])!==null&&o!==void 0?o:{version:_m};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!==_m){let a=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${_m}`);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${_m}.`),!0}function ol(e){var t,n;let r=(t=zx[jx])===null||t===void 0?void 0:t.version;if(!(!r||!Ese(r)))return(n=zx[jx])===null||n===void 0?void 0:n[e]}function wf(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${_m}.`);let n=zx[jx];n&&delete n[e]}var b5e,jx,zx,D0=O(()=>{A();Ez();Sse();b5e=_m.split(".")[0],jx=Symbol.for(`opentelemetry.js.api.${b5e}`),zx=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function Hx(e,t,n){let r=ol("diag");if(r)return r[e](t,...n)}var _M,yse=O(()=>{A();D0();_M=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return Hx("debug",this._namespace,t)}error(...t){return Hx("error",this._namespace,t)}info(...t){return Hx("info",this._namespace,t)}warn(...t){return Hx("warn",this._namespace,t)}verbose(...t){return Hx("verbose",this._namespace,t)}}});var oa,EM=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"})(oa||(oa={}))});function Tse(e,t){e<oa.NONE?e=oa.NONE:e>oa.ALL&&(e=oa.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",oa.ERROR),warn:n("warn",oa.WARN),info:n("info",oa.INFO),debug:n("debug",oa.DEBUG),verbose:n("verbose",oa.VERBOSE)}}var Ise=O(()=>{A();EM()});var v5e,Ia,x0=O(()=>{A();yse();Ise();EM();D0();v5e="diag",Ia=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let a=ol("diag");if(a)return a[o](...i)}}let n=this,r=(o,i={logLevel:oa.INFO})=>{var a,c,d;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 m=ol("diag"),h=Tse((c=i.logLevel)!==null&&c!==void 0?c:oa.INFO,o);if(m&&!i.suppressOverrideMessage){let y=(d=new Error().stack)!==null&&d!==void 0?d:"<failed to generate stacktrace>";m.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return Of("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{wf(v5e,n)},n.createComponentLogger=o=>new _M(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var SM,Cse=O(()=>{A();SM=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 bse,vse=O(()=>{A();bse=Symbol("BaggageEntryMetadata")});function Rse(e={}){return new SM(new Map(Object.entries(e)))}function Dse(e){return typeof e!="string"&&(R5e.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:bse,toString(){return e}}}var R5e,Sz=O(()=>{A();x0();Cse();vse();R5e=Ia.instance()});function il(e){return Symbol.for(e)}var yz,QI,$x=O(()=>{A();yz=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}}},QI=new yz});var Tz,Iz,yM,xse=O(()=>{A();Tz=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],Iz={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(Iz[t]=console[t])}yM=class{constructor(){function t(n){return function(...r){let o=Iz[n];if(typeof o!="function"&&(o=Iz.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<Tz.length;n++)this[Tz[n].n]=t(Tz[n].c)}}});function Bse(){return Oz}var Cz,FI,bz,vz,Rz,Dz,Vx,xz,Bz,Nz,Oz,D5e,x5e,B5e,N5e,O5e,w5e,M5e,wz=O(()=>{A();Cz=class{constructor(){}createGauge(t,n){return x5e}createHistogram(t,n){return B5e}createCounter(t,n){return D5e}createUpDownCounter(t,n){return N5e}createObservableGauge(t,n){return w5e}createObservableCounter(t,n){return O5e}createObservableUpDownCounter(t,n){return M5e}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},FI=class{},bz=class extends FI{add(t,n){}},vz=class extends FI{add(t,n){}},Rz=class extends FI{record(t,n){}},Dz=class extends FI{record(t,n){}},Vx=class{addCallback(t){}removeCallback(t){}},xz=class extends Vx{},Bz=class extends Vx{},Nz=class extends Vx{},Oz=new Cz,D5e=new bz,x5e=new Rz,B5e=new Dz,N5e=new vz,O5e=new xz,w5e=new Bz,M5e=new Nz});var TM,Nse=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(TM||(TM={}))});var IM,CM,Mz=O(()=>{A();IM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},CM={set(e,t,n){e!=null&&(e[t]=n)}}});var bM,Ose=O(()=>{A();$x();bM=class{active(){return QI}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var Pz,P5e,Mf,qx=O(()=>{A();Ose();D0();x0();Pz="context",P5e=new bM,Mf=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return Of(Pz,t,Ia.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 ol(Pz)||P5e}disable(){this._getContextManager().disable(),wf(Pz,Ia.instance())}}});var Ds,kz=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ds||(Ds={}))});var Yx,B0,vM,RM=O(()=>{A();kz();Yx="0000000000000000",B0="00000000000000000000000000000000",vM={traceId:B0,spanId:Yx,traceFlags:Ds.NONE}});var Pf,DM=O(()=>{A();RM();Pf=class{constructor(t=vM){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 xM(e){return e.getValue(Uz)||void 0}function wse(){return xM(Mf.getInstance().active())}function Kx(e,t){return e.setValue(Uz,t)}function Mse(e){return e.deleteValue(Uz)}function Pse(e,t){return Kx(e,new Pf(t))}function BM(e){var t;return(t=xM(e))===null||t===void 0?void 0:t.spanContext()}var Uz,Lz=O(()=>{A();$x();DM();qx();Uz=il("OpenTelemetry Context Key SPAN")});function kse(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(NM[e.charCodeAt(r)]|0)+(NM[e.charCodeAt(r+1)]|0)+(NM[e.charCodeAt(r+2)]|0)+(NM[e.charCodeAt(r+3)]|0);return n===t}function Qz(e){return kse(e,32)&&e!==B0}function Fz(e){return kse(e,16)&&e!==Yx}function Em(e){return Qz(e.traceId)&&Fz(e.spanId)}function Use(e){return new Pf(e)}var NM,OM=O(()=>{A();RM();DM();NM=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 k5e(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 Gz,GI,jz=O(()=>{A();qx();Lz();DM();OM();Gz=Mf.getInstance(),GI=class{startSpan(t,n,r=Gz.active()){if(!!n?.root)return new Pf;let i=r&&BM(r);return k5e(i)&&Em(i)?new Pf(i):new Pf}startActiveSpan(t,n,r,o){let i,a,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,a=r,c=o);let d=a??Gz.active(),m=this.startSpan(t,i,d),h=Kx(d,m);return Gz.with(h,c,void 0,m)}}});var U5e,jI,zz=O(()=>{A();jz();U5e=new GI,jI=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):U5e}}});var wM,Lse=O(()=>{A();jz();wM=class{getTracer(t,n,r){return new GI}}});var L5e,N0,Hz=O(()=>{A();zz();Lse();L5e=new wM,N0=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new jI(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:L5e}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 MM,Qse=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"})(MM||(MM={}))});var Zr,Fse=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"})(Zr||(Zr={}))});var Wo,Gse=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(Wo||(Wo={}))});function jse(e){return G5e.test(e)}function zse(e){return j5e.test(e)&&!z5e.test(e)}var $z,Q5e,F5e,G5e,j5e,z5e,Hse=O(()=>{A();$z="[_0-9a-z-*/]",Q5e=`[a-z]${$z}{0,255}`,F5e=`[a-z0-9]${$z}{0,240}@[a-z]${$z}{0,13}`,G5e=new RegExp(`^(?:${Q5e}|${F5e})$`),j5e=/^[ -~]{0,255}[!-~]$/,z5e=/,|=/});var $se,H5e,Vse,qse,PM,Yse=O(()=>{A();Hse();$se=32,H5e=512,Vse=",",qse="=",PM=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+qse+this.get(n)),t),[]).join(Vse)}_parse(t){t.length>H5e||(this._internalState=t.split(Vse).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(qse);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);jse(a)&&zse(c)&&n.set(a,c)}return n},new Map),this._internalState.size>$se&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,$se))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Kse(e){return new PM(e)}var Jse=O(()=>{A();Yse()});var qe,Zse=O(()=>{A();qx();qe=Mf.getInstance()});var al,Wse=O(()=>{A();x0();al=Ia.instance()});var Vz,Xse,eue=O(()=>{A();wz();Vz=class{getMeter(t,n,r){return Oz}},Xse=new Vz});var qz,kM,tue=O(()=>{A();eue();D0();x0();qz="metrics",kM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return Of(qz,t,Ia.instance())}getMeterProvider(){return ol(qz)||Xse}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){wf(qz,Ia.instance())}}});var Yz,nue=O(()=>{A();tue();Yz=kM.getInstance()});var UM,rue=O(()=>{A();UM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function Jz(e){return e.getValue(Kz)||void 0}function oue(){return Jz(Mf.getInstance().active())}function iue(e,t){return e.setValue(Kz,t)}function aue(e){return e.deleteValue(Kz)}var Kz,sue=O(()=>{A();qx();$x();Kz=il("OpenTelemetry Baggage Key")});var Zz,$5e,LM,uue=O(()=>{A();D0();rue();Mz();sue();Sz();x0();Zz="propagation",$5e=new UM,LM=class e{constructor(){this.createBaggage=Rse,this.getBaggage=Jz,this.getActiveBaggage=oue,this.setBaggage=iue,this.deleteBaggage=aue}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return Of(Zz,t,Ia.instance())}inject(t,n,r=CM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=IM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){wf(Zz,Ia.instance())}_getGlobalPropagator(){return ol(Zz)||$5e}}});var Ip,cue=O(()=>{A();uue();Ip=LM.getInstance()});var Wz,QM,lue=O(()=>{A();D0();Hz();OM();Lz();x0();Wz="trace",QM=class e{constructor(){this._proxyTracerProvider=new N0,this.wrapSpanContext=Use,this.isSpanContextValid=Em,this.deleteSpan=Mse,this.getSpan=xM,this.getActiveSpan=wse,this.getSpanContext=BM,this.setSpan=Kx,this.setSpanContext=Pse}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=Of(Wz,this._proxyTracerProvider,Ia.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return ol(Wz)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){wf(Wz,Ia.instance()),this._proxyTracerProvider=new N0}}});var Ft,due=O(()=>{A();lue();Ft=QM.getInstance()});var Je={};es(Je,{DiagConsoleLogger:()=>yM,DiagLogLevel:()=>oa,INVALID_SPANID:()=>Yx,INVALID_SPAN_CONTEXT:()=>vM,INVALID_TRACEID:()=>B0,ProxyTracer:()=>jI,ProxyTracerProvider:()=>N0,ROOT_CONTEXT:()=>QI,SamplingDecision:()=>MM,SpanKind:()=>Zr,SpanStatusCode:()=>Wo,TraceFlags:()=>Ds,ValueType:()=>TM,baggageEntryMetadataFromString:()=>Dse,context:()=>qe,createContextKey:()=>il,createNoopMeter:()=>Bse,createTraceState:()=>Kse,default:()=>V5e,defaultTextMapGetter:()=>IM,defaultTextMapSetter:()=>CM,diag:()=>al,isSpanContextValid:()=>Em,isValidSpanId:()=>Fz,isValidTraceId:()=>Qz,metrics:()=>Yz,propagation:()=>Ip,trace:()=>Ft});var V5e,Le=O(()=>{A();Sz();$x();xse();EM();wz();Nse();Mz();zz();Hz();Qse();Fse();Gse();kz();Jse();OM();RM();Zse();Wse();nue();cue();due();V5e={context:qe,diag:al,metrics:Yz,propagation:Ip,trace:Ft}});var Jx=Q(mh=>{"use strict";A();Object.defineProperty(mh,"__esModule",{value:!0});mh.isTracingSuppressed=mh.unsuppressTracing=mh.suppressTracing=void 0;var q5e=(Le(),we(Je)),Xz=(0,q5e.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Y5e(e){return e.setValue(Xz,!0)}mh.suppressTracing=Y5e;function K5e(e){return e.deleteValue(Xz)}mh.unsuppressTracing=K5e;function J5e(e){return e.getValue(Xz)===!0}mh.isTracingSuppressed=J5e});var eH=Q(xs=>{"use strict";A();Object.defineProperty(xs,"__esModule",{value:!0});xs.BAGGAGE_MAX_TOTAL_LENGTH=xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=xs.BAGGAGE_HEADER=xs.BAGGAGE_ITEMS_SEPARATOR=xs.BAGGAGE_PROPERTIES_SEPARATOR=xs.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;xs.BAGGAGE_KEY_PAIR_SEPARATOR="=";xs.BAGGAGE_PROPERTIES_SEPARATOR=";";xs.BAGGAGE_ITEMS_SEPARATOR=",";xs.BAGGAGE_HEADER="baggage";xs.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;xs.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;xs.BAGGAGE_MAX_TOTAL_LENGTH=8192});var tH=Q(kf=>{"use strict";A();Object.defineProperty(kf,"__esModule",{value:!0});kf.parseKeyPairsIntoRecord=kf.parsePairKeyValue=kf.getKeyPairs=kf.serializeKeyPairs=void 0;var Z5e=(Le(),we(Je)),zI=eH();function W5e(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?zI.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>zI.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}kf.serializeKeyPairs=W5e;function X5e(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=zI.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}kf.getKeyPairs=X5e;function pue(e){if(!e)return;let t=e.indexOf(zI.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(zI.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let a,c;try{a=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let d;if(t!==-1&&t<e.length-1){let m=e.substring(t+1);d=(0,Z5e.baggageEntryMetadataFromString)(m)}return{key:a,value:c,metadata:d}}kf.parsePairKeyValue=pue;function e$e(e){let t={};return typeof e=="string"&&e.length>0&&e.split(zI.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=pue(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}kf.parseKeyPairsIntoRecord=e$e});var fue=Q(FM=>{"use strict";A();Object.defineProperty(FM,"__esModule",{value:!0});FM.W3CBaggagePropagator=void 0;var nH=(Le(),we(Je)),t$e=Jx(),O0=eH(),rH=tH(),oH=class{inject(t,n,r){let o=nH.propagation.getBaggage(t);if(!o||(0,t$e.isTracingSuppressed)(t))return;let i=(0,rH.getKeyPairs)(o).filter(c=>c.length<=O0.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,O0.BAGGAGE_MAX_NAME_VALUE_PAIRS),a=(0,rH.serializeKeyPairs)(i);a.length>0&&r.set(n,O0.BAGGAGE_HEADER,a)}extract(t,n,r){let o=r.get(n,O0.BAGGAGE_HEADER),i=Array.isArray(o)?o.join(O0.BAGGAGE_ITEMS_SEPARATOR):o;if(!i)return t;let a={};return i.length===0||(i.split(O0.BAGGAGE_ITEMS_SEPARATOR).forEach(d=>{let m=(0,rH.parsePairKeyValue)(d);if(m){let h={value:m.value};m.metadata&&(h.metadata=m.metadata),a[m.key]=h}}),Object.entries(a).length===0)?t:nH.propagation.setBaggage(t,nH.propagation.createBaggage(a))}fields(){return[O0.BAGGAGE_HEADER]}};FM.W3CBaggagePropagator=oH});var Aue=Q(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.AnchoredClock=void 0;var iH=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}};GM.AnchoredClock=iH});var Eue=Q(gh=>{"use strict";A();Object.defineProperty(gh,"__esModule",{value:!0});gh.isAttributeValue=gh.isAttributeKey=gh.sanitizeAttributes=void 0;var mue=(Le(),we(Je));function n$e(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(!gue(n)){mue.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!hue(r)){mue.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}gh.sanitizeAttributes=n$e;function gue(e){return typeof e=="string"&&e!==""}gh.isAttributeKey=gue;function hue(e){return e==null?!0:Array.isArray(e)?r$e(e):_ue(typeof e)}gh.isAttributeValue=hue;function r$e(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(_ue(r)){t=r;continue}return!1}return!1}}return!0}function _ue(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var aH=Q(jM=>{"use strict";A();Object.defineProperty(jM,"__esModule",{value:!0});jM.loggingErrorHandler=void 0;var o$e=(Le(),we(Je));function i$e(){return e=>{o$e.diag.error(a$e(e))}}jM.loggingErrorHandler=i$e;function a$e(e){return typeof e=="string"?e:JSON.stringify(s$e(e))}function s$e(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 yue=Q(HI=>{"use strict";A();Object.defineProperty(HI,"__esModule",{value:!0});HI.globalErrorHandler=HI.setGlobalErrorHandler=void 0;var u$e=aH(),Sue=(0,u$e.loggingErrorHandler)();function c$e(e){Sue=e}HI.setGlobalErrorHandler=c$e;function l$e(e){try{Sue(e)}catch{}}HI.globalErrorHandler=l$e});var bue=Q(Uf=>{"use strict";A();Object.defineProperty(Uf,"__esModule",{value:!0});Uf.getStringListFromEnv=Uf.getBooleanFromEnv=Uf.getStringFromEnv=Uf.getNumberFromEnv=void 0;var Tue=(Le(),we(Je)),Iue=Ue("util");function d$e(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){Tue.diag.warn(`Unknown value ${(0,Iue.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Uf.getNumberFromEnv=d$e;function Cue(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Uf.getStringFromEnv=Cue;function p$e(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||Tue.diag.warn(`Unknown value ${(0,Iue.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Uf.getBooleanFromEnv=p$e;function f$e(e){return Cue(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Uf.getStringListFromEnv=f$e});var vue=Q(zM=>{"use strict";A();Object.defineProperty(zM,"__esModule",{value:!0});zM._globalThis=void 0;zM._globalThis=globalThis});var Rue=Q(HM=>{"use strict";A();Object.defineProperty(HM,"__esModule",{value:!0});HM.VERSION=void 0;HM.VERSION="2.6.1"});function mi(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 sH=O(()=>{A()});var Due,xue,Bue,Nue,Oue,wue,Mue,Pue,kue,Uue,Lue,Que,Fue,Gue,jue,zue,Hue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,zce,Hce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,zle,Hle,$le,Vle,qle,A$e,uH,m$e,g$e,h$e,_$e,cH,E$e,S$e,y$e,T$e,I$e,C$e,b$e,v$e,R$e,D$e,x$e,B$e,N$e,O$e,w$e,M$e,P$e,k$e,lH,U$e,L$e,Q$e,F$e,G$e,j$e,z$e,H$e,$$e,V$e,q$e,Y$e,dH,K$e,J$e,pH,fH,Z$e,W$e,X$e,e9e,t9e,n9e,r9e,o9e,i9e,a9e,s9e,u9e,c9e,l9e,d9e,p9e,f9e,Zx,$I,AH,A9e,m9e,w0,g9e,h9e,_9e,E9e,mH,gH,S9e,hH,y9e,T9e,I9e,C9e,b9e,v9e,R9e,D9e,x9e,B9e,N9e,O9e,w9e,M9e,P9e,k9e,U9e,L9e,Q9e,F9e,G9e,j9e,z9e,_H,H9e,$9e,V9e,q9e,Y9e,K9e,J9e,Z9e,W9e,X9e,eVe,tVe,nVe,rVe,oVe,iVe,aVe,sVe,uVe,EH,cVe,SH,lVe,dVe,pVe,fVe,AVe,mVe,gVe,hVe,_Ve,Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde,EVe,SVe,yVe,TVe,IVe,CVe,bVe,vVe,RVe,DVe,xVe,BVe,NVe,OVe,wVe,MVe,PVe,kVe,UVe,LVe,QVe,FVe,GVe,jVe,zVe,HVe,$Ve,VVe,qVe,YVe,KVe,JVe,ZVe,WVe,XVe,eqe,tqe,nqe,rqe,oqe,iqe,aqe,sqe,uqe,cqe,lqe,dqe,pqe,Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde,fqe,Aqe,mqe,gqe,hqe,_qe,Eqe,Sqe,yqe,Tqe,Iqe,Cqe,Wde,Xde,epe,tpe,npe,bqe,vqe,Rqe,Dqe,xqe,Bqe,rpe,ope,ipe,Nqe,Oqe,wqe,Mqe,ape,spe,upe,cpe,Pqe,kqe,Uqe,Lqe,Qqe,lpe,dpe,ppe,fpe,Ape,mpe,gpe,Fqe,Gqe,jqe,zqe,Hqe,$qe,Vqe,qqe,hpe,_pe,Epe,Spe,ype,Yqe,Kqe,Jqe,Zqe,Wqe,Xqe,Tpe,Ipe,Cpe,bpe,vpe,Rpe,Dpe,xpe,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe,e7e,t7e,n7e,r7e,o7e,i7e,a7e,s7e,u7e,c7e,l7e,d7e,p7e,f7e,A7e,m7e,g7e,h7e,_7e,E7e,S7e,y7e,zpe,Hpe,$pe,Vpe,qpe,T7e,I7e,C7e,b7e,v7e,R7e,Ype,Kpe,D7e,x7e,B7e,Jpe,Zpe,N7e,O7e,w7e,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,afe,sfe,ufe,cfe,lfe,dfe,pfe,ffe,Afe,M7e,P7e,k7e,U7e,L7e,Q7e,F7e,G7e,j7e,z7e,H7e,$7e,V7e,q7e,Y7e,K7e,J7e,Z7e,mfe,gfe,W7e,X7e,eYe,hfe=O(()=>{A();sH();Due="aws.lambda.invoked_arn",xue="db.system",Bue="db.connection_string",Nue="db.user",Oue="db.jdbc.driver_classname",wue="db.name",Mue="db.statement",Pue="db.operation",kue="db.mssql.instance_name",Uue="db.cassandra.keyspace",Lue="db.cassandra.page_size",Que="db.cassandra.consistency_level",Fue="db.cassandra.table",Gue="db.cassandra.idempotence",jue="db.cassandra.speculative_execution_count",zue="db.cassandra.coordinator.id",Hue="db.cassandra.coordinator.dc",$ue="db.hbase.namespace",Vue="db.redis.database_index",que="db.mongodb.collection",Yue="db.sql.table",Kue="exception.type",Jue="exception.message",Zue="exception.stacktrace",Wue="exception.escaped",Xue="faas.trigger",ece="faas.execution",tce="faas.document.collection",nce="faas.document.operation",rce="faas.document.time",oce="faas.document.name",ice="faas.time",ace="faas.cron",sce="faas.coldstart",uce="faas.invoked_name",cce="faas.invoked_provider",lce="faas.invoked_region",dce="net.transport",pce="net.peer.ip",fce="net.peer.port",Ace="net.peer.name",mce="net.host.ip",gce="net.host.port",hce="net.host.name",_ce="net.host.connection.type",Ece="net.host.connection.subtype",Sce="net.host.carrier.name",yce="net.host.carrier.mcc",Tce="net.host.carrier.mnc",Ice="net.host.carrier.icc",Cce="peer.service",bce="enduser.id",vce="enduser.role",Rce="enduser.scope",Dce="thread.id",xce="thread.name",Bce="code.function",Nce="code.namespace",Oce="code.filepath",wce="code.lineno",Mce="http.method",Pce="http.url",kce="http.target",Uce="http.host",Lce="http.scheme",Qce="http.status_code",Fce="http.flavor",Gce="http.user_agent",jce="http.request_content_length",zce="http.request_content_length_uncompressed",Hce="http.response_content_length",$ce="http.response_content_length_uncompressed",Vce="http.server_name",qce="http.route",Yce="http.client_ip",Kce="aws.dynamodb.table_names",Jce="aws.dynamodb.consumed_capacity",Zce="aws.dynamodb.item_collection_metrics",Wce="aws.dynamodb.provisioned_read_capacity",Xce="aws.dynamodb.provisioned_write_capacity",ele="aws.dynamodb.consistent_read",tle="aws.dynamodb.projection",nle="aws.dynamodb.limit",rle="aws.dynamodb.attributes_to_get",ole="aws.dynamodb.index_name",ile="aws.dynamodb.select",ale="aws.dynamodb.global_secondary_indexes",sle="aws.dynamodb.local_secondary_indexes",ule="aws.dynamodb.exclusive_start_table",cle="aws.dynamodb.table_count",lle="aws.dynamodb.scan_forward",dle="aws.dynamodb.segment",ple="aws.dynamodb.total_segments",fle="aws.dynamodb.count",Ale="aws.dynamodb.scanned_count",mle="aws.dynamodb.attribute_definitions",gle="aws.dynamodb.global_secondary_index_updates",hle="messaging.system",_le="messaging.destination",Ele="messaging.destination_kind",Sle="messaging.temp_destination",yle="messaging.protocol",Tle="messaging.protocol_version",Ile="messaging.url",Cle="messaging.message_id",ble="messaging.conversation_id",vle="messaging.message_payload_size_bytes",Rle="messaging.message_payload_compressed_size_bytes",Dle="messaging.operation",xle="messaging.consumer_id",Ble="messaging.rabbitmq.routing_key",Nle="messaging.kafka.message_key",Ole="messaging.kafka.consumer_group",wle="messaging.kafka.client_id",Mle="messaging.kafka.partition",Ple="messaging.kafka.tombstone",kle="rpc.system",Ule="rpc.service",Lle="rpc.method",Qle="rpc.grpc.status_code",Fle="rpc.jsonrpc.version",Gle="rpc.jsonrpc.request_id",jle="rpc.jsonrpc.error_code",zle="rpc.jsonrpc.error_message",Hle="message.type",$le="message.id",Vle="message.compressed_size",qle="message.uncompressed_size",A$e=Due,uH=xue,m$e=Bue,g$e=Nue,h$e=Oue,_$e=wue,cH=Mue,E$e=Pue,S$e=kue,y$e=Uue,T$e=Lue,I$e=Que,C$e=Fue,b$e=Gue,v$e=jue,R$e=zue,D$e=Hue,x$e=$ue,B$e=Vue,N$e=que,O$e=Yue,w$e=Kue,M$e=Jue,P$e=Zue,k$e=Wue,lH=Xue,U$e=ece,L$e=tce,Q$e=nce,F$e=rce,G$e=oce,j$e=ice,z$e=ace,H$e=sce,$$e=uce,V$e=cce,q$e=lce,Y$e=dce,dH=pce,K$e=fce,J$e=Ace,pH=mce,fH=gce,Z$e=hce,W$e=_ce,X$e=Ece,e9e=Sce,t9e=yce,n9e=Tce,r9e=Ice,o9e=Cce,i9e=bce,a9e=vce,s9e=Rce,u9e=Dce,c9e=xce,l9e=Bce,d9e=Nce,p9e=Oce,f9e=wce,Zx=Mce,$I=Pce,AH=kce,A9e=Uce,m9e=Lce,w0=Qce,g9e=Fce,h9e=Gce,_9e=jce,E9e=zce,mH=Hce,gH=$ce,S9e=Vce,hH=qce,y9e=Yce,T9e=Kce,I9e=Jce,C9e=Zce,b9e=Wce,v9e=Xce,R9e=ele,D9e=tle,x9e=nle,B9e=rle,N9e=ole,O9e=ile,w9e=ale,M9e=sle,P9e=ule,k9e=cle,U9e=lle,L9e=dle,Q9e=ple,F9e=fle,G9e=Ale,j9e=mle,z9e=gle,_H=hle,H9e=_le,$9e=Ele,V9e=Sle,q9e=yle,Y9e=Tle,K9e=Ile,J9e=Cle,Z9e=ble,W9e=vle,X9e=Rle,eVe=Dle,tVe=xle,nVe=Ble,rVe=Nle,oVe=Ole,iVe=wle,aVe=Mle,sVe=Ple,uVe=kle,EH=Ule,cVe=Lle,SH=Qle,lVe=Fle,dVe=Gle,pVe=jle,fVe=zle,AVe=Hle,mVe=$le,gVe=Vle,hVe=qle,_Ve=mi([Due,xue,Bue,Nue,Oue,wue,Mue,Pue,kue,Uue,Lue,Que,Fue,Gue,jue,zue,Hue,$ue,Vue,que,Yue,Kue,Jue,Zue,Wue,Xue,ece,tce,nce,rce,oce,ice,ace,sce,uce,cce,lce,dce,pce,fce,Ace,mce,gce,hce,_ce,Ece,Sce,yce,Tce,Ice,Cce,bce,vce,Rce,Dce,xce,Bce,Nce,Oce,wce,Mce,Pce,kce,Uce,Lce,Qce,Fce,Gce,jce,zce,Hce,$ce,Vce,qce,Yce,Kce,Jce,Zce,Wce,Xce,ele,tle,nle,rle,ole,ile,ale,sle,ule,cle,lle,dle,ple,fle,Ale,mle,gle,hle,_le,Ele,Sle,yle,Tle,Ile,Cle,ble,vle,Rle,Dle,xle,Ble,Nle,Ole,wle,Mle,Ple,kle,Ule,Lle,Qle,Fle,Gle,jle,zle,Hle,$le,Vle,qle]),Yle="other_sql",Kle="mssql",Jle="mysql",Zle="oracle",Wle="db2",Xle="postgresql",ede="redshift",tde="hive",nde="cloudscape",rde="hsqldb",ode="progress",ide="maxdb",ade="hanadb",sde="ingres",ude="firstsql",cde="edb",lde="cache",dde="adabas",pde="firebird",fde="derby",Ade="filemaker",mde="informix",gde="instantdb",hde="interbase",_de="mariadb",Ede="netezza",Sde="pervasive",yde="pointbase",Tde="sqlite",Ide="sybase",Cde="teradata",bde="vertica",vde="h2",Rde="coldfusion",Dde="cassandra",xde="hbase",Bde="mongodb",Nde="redis",Ode="couchbase",wde="couchdb",Mde="cosmosdb",Pde="dynamodb",kde="neo4j",Ude="geode",Lde="elasticsearch",Qde="memcached",Fde="cockroachdb",EVe=Yle,SVe=Kle,yVe=Jle,TVe=Zle,IVe=Wle,CVe=Xle,bVe=ede,vVe=tde,RVe=nde,DVe=rde,xVe=ode,BVe=ide,NVe=ade,OVe=sde,wVe=ude,MVe=cde,PVe=lde,kVe=dde,UVe=pde,LVe=fde,QVe=Ade,FVe=mde,GVe=gde,jVe=hde,zVe=_de,HVe=Ede,$Ve=Sde,VVe=yde,qVe=Tde,YVe=Ide,KVe=Cde,JVe=bde,ZVe=vde,WVe=Rde,XVe=Dde,eqe=xde,tqe=Bde,nqe=Nde,rqe=Ode,oqe=wde,iqe=Mde,aqe=Pde,sqe=kde,uqe=Ude,cqe=Lde,lqe=Qde,dqe=Fde,pqe=mi([Yle,Kle,Jle,Zle,Wle,Xle,ede,tde,nde,rde,ode,ide,ade,sde,ude,cde,lde,dde,pde,fde,Ade,mde,gde,hde,_de,Ede,Sde,yde,Tde,Ide,Cde,bde,vde,Rde,Dde,xde,Bde,Nde,Ode,wde,Mde,Pde,kde,Ude,Lde,Qde,Fde]),Gde="all",jde="each_quorum",zde="quorum",Hde="local_quorum",$de="one",Vde="two",qde="three",Yde="local_one",Kde="any",Jde="serial",Zde="local_serial",fqe=Gde,Aqe=jde,mqe=zde,gqe=Hde,hqe=$de,_qe=Vde,Eqe=qde,Sqe=Yde,yqe=Kde,Tqe=Jde,Iqe=Zde,Cqe=mi([Gde,jde,zde,Hde,$de,Vde,qde,Yde,Kde,Jde,Zde]),Wde="datasource",Xde="http",epe="pubsub",tpe="timer",npe="other",bqe=Wde,vqe=Xde,Rqe=epe,Dqe=tpe,xqe=npe,Bqe=mi([Wde,Xde,epe,tpe,npe]),rpe="insert",ope="edit",ipe="delete",Nqe=rpe,Oqe=ope,wqe=ipe,Mqe=mi([rpe,ope,ipe]),ape="alibaba_cloud",spe="aws",upe="azure",cpe="gcp",Pqe=ape,kqe=spe,Uqe=upe,Lqe=cpe,Qqe=mi([ape,spe,upe,cpe]),lpe="ip_tcp",dpe="ip_udp",ppe="ip",fpe="unix",Ape="pipe",mpe="inproc",gpe="other",Fqe=lpe,Gqe=dpe,jqe=ppe,zqe=fpe,Hqe=Ape,$qe=mpe,Vqe=gpe,qqe=mi([lpe,dpe,ppe,fpe,Ape,mpe,gpe]),hpe="wifi",_pe="wired",Epe="cell",Spe="unavailable",ype="unknown",Yqe=hpe,Kqe=_pe,Jqe=Epe,Zqe=Spe,Wqe=ype,Xqe=mi([hpe,_pe,Epe,Spe,ype]),Tpe="gprs",Ipe="edge",Cpe="umts",bpe="cdma",vpe="evdo_0",Rpe="evdo_a",Dpe="cdma2000_1xrtt",xpe="hsdpa",Bpe="hsupa",Npe="hspa",Ope="iden",wpe="evdo_b",Mpe="lte",Ppe="ehrpd",kpe="hspap",Upe="gsm",Lpe="td_scdma",Qpe="iwlan",Fpe="nr",Gpe="nrnsa",jpe="lte_ca",e7e=Tpe,t7e=Ipe,n7e=Cpe,r7e=bpe,o7e=vpe,i7e=Rpe,a7e=Dpe,s7e=xpe,u7e=Bpe,c7e=Npe,l7e=Ope,d7e=wpe,p7e=Mpe,f7e=Ppe,A7e=kpe,m7e=Upe,g7e=Lpe,h7e=Qpe,_7e=Fpe,E7e=Gpe,S7e=jpe,y7e=mi([Tpe,Ipe,Cpe,bpe,vpe,Rpe,Dpe,xpe,Bpe,Npe,Ope,wpe,Mpe,Ppe,kpe,Upe,Lpe,Qpe,Fpe,Gpe,jpe]),zpe="1.0",Hpe="1.1",$pe="2.0",Vpe="SPDY",qpe="QUIC",T7e=zpe,I7e=Hpe,C7e=$pe,b7e=Vpe,v7e=qpe,R7e={HTTP_1_0:zpe,HTTP_1_1:Hpe,HTTP_2_0:$pe,SPDY:Vpe,QUIC:qpe},Ype="queue",Kpe="topic",D7e=Ype,x7e=Kpe,B7e=mi([Ype,Kpe]),Jpe="receive",Zpe="process",N7e=Jpe,O7e=Zpe,w7e=mi([Jpe,Zpe]),Wpe=0,Xpe=1,efe=2,tfe=3,nfe=4,rfe=5,ofe=6,ife=7,afe=8,sfe=9,ufe=10,cfe=11,lfe=12,dfe=13,pfe=14,ffe=15,Afe=16,M7e=Wpe,P7e=Xpe,k7e=efe,U7e=tfe,L7e=nfe,Q7e=rfe,F7e=ofe,G7e=ife,j7e=afe,z7e=sfe,H7e=ufe,$7e=cfe,V7e=lfe,q7e=dfe,Y7e=pfe,K7e=ffe,J7e=Afe,Z7e={OK:Wpe,CANCELLED:Xpe,UNKNOWN:efe,INVALID_ARGUMENT:tfe,DEADLINE_EXCEEDED:nfe,NOT_FOUND:rfe,ALREADY_EXISTS:ofe,PERMISSION_DENIED:ife,RESOURCE_EXHAUSTED:afe,FAILED_PRECONDITION:sfe,ABORTED:ufe,OUT_OF_RANGE:cfe,UNIMPLEMENTED:lfe,INTERNAL:dfe,UNAVAILABLE:pfe,DATA_LOSS:ffe,UNAUTHENTICATED:Afe},mfe="SENT",gfe="RECEIVED",W7e=mfe,X7e=gfe,eYe=mi([mfe,gfe])});var _fe=O(()=>{A();hfe()});var Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae,tYe,nYe,rYe,oYe,iYe,aYe,sYe,uYe,cYe,lYe,dYe,pYe,fYe,AYe,mYe,gYe,hYe,_Ye,EYe,SYe,yYe,TYe,IYe,CYe,bYe,vYe,RYe,DYe,xYe,BYe,NYe,OYe,wYe,MYe,PYe,kYe,UYe,LYe,QYe,FYe,GYe,jYe,zYe,HYe,$Ye,VYe,qYe,YYe,KYe,JYe,ZYe,WYe,XYe,eKe,tKe,nKe,rKe,oKe,iKe,aKe,sKe,uKe,cKe,lKe,dKe,pKe,fKe,AKe,mKe,gKe,hKe,yH,_Ke,EKe,SKe,yKe,TKe,IKe,CKe,bKe,vKe,RKe,VAe,qAe,YAe,KAe,DKe,xKe,BKe,NKe,OKe,JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme,wKe,MKe,PKe,kKe,UKe,LKe,QKe,FKe,GKe,jKe,zKe,HKe,$Ke,VKe,qKe,YKe,KKe,JKe,fme,Ame,ZKe,WKe,XKe,mme,gme,hme,_me,Eme,Sme,yme,eJe,tJe,nJe,rJe,oJe,iJe,aJe,sJe,Tme,Ime,Cme,bme,vme,Rme,Dme,xme,Bme,Nme,Ome,uJe,cJe,lJe,dJe,pJe,fJe,AJe,mJe,gJe,hJe,_Je,EJe,wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,Gme,jme,SJe,yJe,TJe,IJe,CJe,bJe,vJe,RJe,DJe,xJe,BJe,zme=O(()=>{A();sH();Efe="cloud.provider",Sfe="cloud.account.id",yfe="cloud.region",Tfe="cloud.availability_zone",Ife="cloud.platform",Cfe="aws.ecs.container.arn",bfe="aws.ecs.cluster.arn",vfe="aws.ecs.launchtype",Rfe="aws.ecs.task.arn",Dfe="aws.ecs.task.family",xfe="aws.ecs.task.revision",Bfe="aws.eks.cluster.arn",Nfe="aws.log.group.names",Ofe="aws.log.group.arns",wfe="aws.log.stream.names",Mfe="aws.log.stream.arns",Pfe="container.name",kfe="container.id",Ufe="container.runtime",Lfe="container.image.name",Qfe="container.image.tag",Ffe="deployment.environment",Gfe="device.id",jfe="device.model.identifier",zfe="device.model.name",Hfe="faas.name",$fe="faas.id",Vfe="faas.version",qfe="faas.instance",Yfe="faas.max_memory",Kfe="host.id",Jfe="host.name",Zfe="host.type",Wfe="host.arch",Xfe="host.image.name",eAe="host.image.id",tAe="host.image.version",nAe="k8s.cluster.name",rAe="k8s.node.name",oAe="k8s.node.uid",iAe="k8s.namespace.name",aAe="k8s.pod.uid",sAe="k8s.pod.name",uAe="k8s.container.name",cAe="k8s.replicaset.uid",lAe="k8s.replicaset.name",dAe="k8s.deployment.uid",pAe="k8s.deployment.name",fAe="k8s.statefulset.uid",AAe="k8s.statefulset.name",mAe="k8s.daemonset.uid",gAe="k8s.daemonset.name",hAe="k8s.job.uid",_Ae="k8s.job.name",EAe="k8s.cronjob.uid",SAe="k8s.cronjob.name",yAe="os.type",TAe="os.description",IAe="os.name",CAe="os.version",bAe="process.pid",vAe="process.executable.name",RAe="process.executable.path",DAe="process.command",xAe="process.command_line",BAe="process.command_args",NAe="process.owner",OAe="process.runtime.name",wAe="process.runtime.version",MAe="process.runtime.description",PAe="service.name",kAe="service.namespace",UAe="service.instance.id",LAe="service.version",QAe="telemetry.sdk.name",FAe="telemetry.sdk.language",GAe="telemetry.sdk.version",jAe="telemetry.auto.version",zAe="webengine.name",HAe="webengine.version",$Ae="webengine.description",tYe=Efe,nYe=Sfe,rYe=yfe,oYe=Tfe,iYe=Ife,aYe=Cfe,sYe=bfe,uYe=vfe,cYe=Rfe,lYe=Dfe,dYe=xfe,pYe=Bfe,fYe=Nfe,AYe=Ofe,mYe=wfe,gYe=Mfe,hYe=Pfe,_Ye=kfe,EYe=Ufe,SYe=Lfe,yYe=Qfe,TYe=Ffe,IYe=Gfe,CYe=jfe,bYe=zfe,vYe=Hfe,RYe=$fe,DYe=Vfe,xYe=qfe,BYe=Yfe,NYe=Kfe,OYe=Jfe,wYe=Zfe,MYe=Wfe,PYe=Xfe,kYe=eAe,UYe=tAe,LYe=nAe,QYe=rAe,FYe=oAe,GYe=iAe,jYe=aAe,zYe=sAe,HYe=uAe,$Ye=cAe,VYe=lAe,qYe=dAe,YYe=pAe,KYe=fAe,JYe=AAe,ZYe=mAe,WYe=gAe,XYe=hAe,eKe=_Ae,tKe=EAe,nKe=SAe,rKe=yAe,oKe=TAe,iKe=IAe,aKe=CAe,sKe=bAe,uKe=vAe,cKe=RAe,lKe=DAe,dKe=xAe,pKe=BAe,fKe=NAe,AKe=OAe,mKe=wAe,gKe=MAe,hKe=PAe,yH=kAe,_Ke=UAe,EKe=LAe,SKe=QAe,yKe=FAe,TKe=GAe,IKe=jAe,CKe=zAe,bKe=HAe,vKe=$Ae,RKe=mi([Efe,Sfe,yfe,Tfe,Ife,Cfe,bfe,vfe,Rfe,Dfe,xfe,Bfe,Nfe,Ofe,wfe,Mfe,Pfe,kfe,Ufe,Lfe,Qfe,Ffe,Gfe,jfe,zfe,Hfe,$fe,Vfe,qfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eAe,tAe,nAe,rAe,oAe,iAe,aAe,sAe,uAe,cAe,lAe,dAe,pAe,fAe,AAe,mAe,gAe,hAe,_Ae,EAe,SAe,yAe,TAe,IAe,CAe,bAe,vAe,RAe,DAe,xAe,BAe,NAe,OAe,wAe,MAe,PAe,kAe,UAe,LAe,QAe,FAe,GAe,jAe,zAe,HAe,$Ae]),VAe="alibaba_cloud",qAe="aws",YAe="azure",KAe="gcp",DKe=VAe,xKe=qAe,BKe=YAe,NKe=KAe,OKe=mi([VAe,qAe,YAe,KAe]),JAe="alibaba_cloud_ecs",ZAe="alibaba_cloud_fc",WAe="aws_ec2",XAe="aws_ecs",eme="aws_eks",tme="aws_lambda",nme="aws_elastic_beanstalk",rme="azure_vm",ome="azure_container_instances",ime="azure_aks",ame="azure_functions",sme="azure_app_service",ume="gcp_compute_engine",cme="gcp_cloud_run",lme="gcp_kubernetes_engine",dme="gcp_cloud_functions",pme="gcp_app_engine",wKe=JAe,MKe=ZAe,PKe=WAe,kKe=XAe,UKe=eme,LKe=tme,QKe=nme,FKe=rme,GKe=ome,jKe=ime,zKe=ame,HKe=sme,$Ke=ume,VKe=cme,qKe=lme,YKe=dme,KKe=pme,JKe=mi([JAe,ZAe,WAe,XAe,eme,tme,nme,rme,ome,ime,ame,sme,ume,cme,lme,dme,pme]),fme="ec2",Ame="fargate",ZKe=fme,WKe=Ame,XKe=mi([fme,Ame]),mme="amd64",gme="arm32",hme="arm64",_me="ia64",Eme="ppc32",Sme="ppc64",yme="x86",eJe=mme,tJe=gme,nJe=hme,rJe=_me,oJe=Eme,iJe=Sme,aJe=yme,sJe=mi([mme,gme,hme,_me,Eme,Sme,yme]),Tme="windows",Ime="linux",Cme="darwin",bme="freebsd",vme="netbsd",Rme="openbsd",Dme="dragonflybsd",xme="hpux",Bme="aix",Nme="solaris",Ome="z_os",uJe=Tme,cJe=Ime,lJe=Cme,dJe=bme,pJe=vme,fJe=Rme,AJe=Dme,mJe=xme,gJe=Bme,hJe=Nme,_Je=Ome,EJe=mi([Tme,Ime,Cme,bme,vme,Rme,Dme,xme,Bme,Nme,Ome]),wme="cpp",Mme="dotnet",Pme="erlang",kme="go",Ume="java",Lme="nodejs",Qme="php",Fme="python",Gme="ruby",jme="webjs",SJe=wme,yJe=Mme,TJe=Pme,IJe=kme,CJe=Ume,bJe=Lme,vJe=Qme,RJe=Fme,DJe=Gme,xJe=jme,BJe=mi([wme,Mme,Pme,kme,Ume,Lme,Qme,Fme,Gme,jme])});var Hme=O(()=>{A();zme()});var NJe,OJe,wJe,MJe,PJe,kJe,UJe,LJe,QJe,FJe,GJe,jJe,zJe,HJe,$Je,VJe,qJe,YJe,KJe,JJe,ZJe,WJe,XJe,eZe,tZe,TH,IH,nZe,VI,rZe,CH,bH,oZe,M0,iZe,aZe,sZe,uZe,cZe,lZe,dZe,pZe,fZe,AZe,vH,mZe,gZe,hZe,_Ze,EZe,SZe,P0,yZe,TZe,IZe,CZe,bZe,vZe,RZe,DZe,xZe,BZe,NZe,OZe,wZe,Sm,ym,MZe,PZe,kZe,UZe,LZe,QZe,FZe,GZe,jZe,zZe,HZe,$Ze,VZe,qZe,YZe,KZe,RH,DH,JZe,xH,BH,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,aWe,sWe,uWe,cWe,lWe,NH,OH,dWe,wH,pWe,MH,fWe,AWe,mWe,gWe,hWe,_We,EWe,SWe,yWe,TWe,IWe,CWe,bWe,vWe,RWe,DWe,xWe,BWe,NWe,OWe,wWe,MWe,PWe,kWe,hh,UWe,LWe,QWe,PH,$me=O(()=>{A();NJe="aspnetcore.diagnostics.exception.result",OJe="aborted",wJe="handled",MJe="skipped",PJe="unhandled",kJe="aspnetcore.diagnostics.handler.type",UJe="aspnetcore.rate_limiting.policy",LJe="aspnetcore.rate_limiting.result",QJe="acquired",FJe="endpoint_limiter",GJe="global_limiter",jJe="request_canceled",zJe="aspnetcore.request.is_unhandled",HJe="aspnetcore.routing.is_fallback",$Je="aspnetcore.routing.match_status",VJe="failure",qJe="success",YJe="aspnetcore.user.is_authenticated",KJe="client.address",JJe="client.port",ZJe="code.column.number",WJe="code.file.path",XJe="code.function.name",eZe="code.line.number",tZe="code.stacktrace",TH="db.collection.name",IH="db.namespace",nZe="db.operation.batch.size",VI="db.operation.name",rZe="db.query.summary",CH="db.query.text",bH="db.response.status_code",oZe="db.stored_procedure.name",M0="db.system.name",iZe="mariadb",aZe="microsoft.sql_server",sZe="mysql",uZe="postgresql",cZe="dotnet.gc.heap.generation",lZe="gen0",dZe="gen1",pZe="gen2",fZe="loh",AZe="poh",vH="error.type",mZe="_OTHER",gZe="exception.escaped",hZe="exception.message",_Ze="exception.stacktrace",EZe="exception.type",SZe=e=>`http.request.header.${e}`,P0="http.request.method",yZe="_OTHER",TZe="CONNECT",IZe="DELETE",CZe="GET",bZe="HEAD",vZe="OPTIONS",RZe="PATCH",DZe="POST",xZe="PUT",BZe="TRACE",NZe="http.request.method_original",OZe="http.request.resend_count",wZe=e=>`http.response.header.${e}`,Sm="http.response.status_code",ym="http.route",MZe="jvm.gc.action",PZe="jvm.gc.name",kZe="jvm.memory.pool.name",UZe="jvm.memory.type",LZe="heap",QZe="non_heap",FZe="jvm.thread.daemon",GZe="jvm.thread.state",jZe="blocked",zZe="new",HZe="runnable",$Ze="terminated",VZe="timed_waiting",qZe="waiting",YZe="network.local.address",KZe="network.local.port",RH="network.peer.address",DH="network.peer.port",JZe="network.protocol.name",xH="network.protocol.version",BH="network.transport",ZZe="pipe",WZe="quic",XZe="tcp",eWe="udp",tWe="unix",nWe="network.type",rWe="ipv4",oWe="ipv6",iWe="otel.scope.name",aWe="otel.scope.version",sWe="otel.status_code",uWe="ERROR",cWe="OK",lWe="otel.status_description",NH="server.address",OH="server.port",dWe="service.instance.id",wH="service.name",pWe="service.namespace",MH="service.version",fWe="signalr.connection.status",AWe="app_shutdown",mWe="normal_closure",gWe="timeout",hWe="signalr.transport",_We="long_polling",EWe="server_sent_events",SWe="web_sockets",yWe="telemetry.sdk.language",TWe="cpp",IWe="dotnet",CWe="erlang",bWe="go",vWe="java",RWe="nodejs",DWe="php",xWe="python",BWe="ruby",NWe="rust",OWe="swift",wWe="webjs",MWe="telemetry.sdk.name",PWe="telemetry.sdk.version",kWe="url.fragment",hh="url.full",UWe="url.path",LWe="url.query",QWe="url.scheme",PH="user_agent.original"});var FWe,GWe,jWe,zWe,HWe,$We,VWe,qWe,YWe,KWe,JWe,ZWe,WWe,XWe,eXe,tXe,nXe,rXe,oXe,iXe,aXe,sXe,uXe,cXe,lXe,dXe,pXe,fXe,AXe,mXe,gXe,hXe,_Xe,EXe,SXe,yXe,TXe,IXe,CXe,bXe,vXe,RXe,DXe,xXe,BXe,NXe,OXe,wXe,MXe,PXe,kXe,Vme=O(()=>{A();FWe="aspnetcore.diagnostics.exceptions",GWe="aspnetcore.rate_limiting.active_request_leases",jWe="aspnetcore.rate_limiting.queued_requests",zWe="aspnetcore.rate_limiting.request.time_in_queue",HWe="aspnetcore.rate_limiting.request_lease.duration",$We="aspnetcore.rate_limiting.requests",VWe="aspnetcore.routing.match_attempts",qWe="db.client.operation.duration",YWe="dotnet.assembly.count",KWe="dotnet.exceptions",JWe="dotnet.gc.collections",ZWe="dotnet.gc.heap.total_allocated",WWe="dotnet.gc.last_collection.heap.fragmentation.size",XWe="dotnet.gc.last_collection.heap.size",eXe="dotnet.gc.last_collection.memory.committed_size",tXe="dotnet.gc.pause.time",nXe="dotnet.jit.compilation.time",rXe="dotnet.jit.compiled_il.size",oXe="dotnet.jit.compiled_methods",iXe="dotnet.monitor.lock_contentions",aXe="dotnet.process.cpu.count",sXe="dotnet.process.cpu.time",uXe="dotnet.process.memory.working_set",cXe="dotnet.thread_pool.queue.length",lXe="dotnet.thread_pool.thread.count",dXe="dotnet.thread_pool.work_item.count",pXe="dotnet.timer.count",fXe="http.client.request.duration",AXe="http.server.request.duration",mXe="jvm.class.count",gXe="jvm.class.loaded",hXe="jvm.class.unloaded",_Xe="jvm.cpu.count",EXe="jvm.cpu.recent_utilization",SXe="jvm.cpu.time",yXe="jvm.gc.duration",TXe="jvm.memory.committed",IXe="jvm.memory.limit",CXe="jvm.memory.used",bXe="jvm.memory.used_after_last_gc",vXe="jvm.thread.count",RXe="kestrel.active_connections",DXe="kestrel.active_tls_handshakes",xXe="kestrel.connection.duration",BXe="kestrel.queued_connections",NXe="kestrel.queued_requests",OXe="kestrel.rejected_connections",wXe="kestrel.tls_handshake.duration",MXe="kestrel.upgraded_connections",PXe="signalr.server.active_connections",kXe="signalr.server.connection.duration"});var UXe,qme=O(()=>{A();UXe="exception"});var Nr={};es(Nr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>OJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>wJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>MJe,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>PJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>QJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>FJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>GJe,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>jJe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>VJe,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>qJe,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>NJe,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>kJe,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>UJe,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>LJe,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>zJe,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>HJe,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>$Je,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>YJe,ATTR_CLIENT_ADDRESS:()=>KJe,ATTR_CLIENT_PORT:()=>JJe,ATTR_CODE_COLUMN_NUMBER:()=>ZJe,ATTR_CODE_FILE_PATH:()=>WJe,ATTR_CODE_FUNCTION_NAME:()=>XJe,ATTR_CODE_LINE_NUMBER:()=>eZe,ATTR_CODE_STACKTRACE:()=>tZe,ATTR_DB_COLLECTION_NAME:()=>TH,ATTR_DB_NAMESPACE:()=>IH,ATTR_DB_OPERATION_BATCH_SIZE:()=>nZe,ATTR_DB_OPERATION_NAME:()=>VI,ATTR_DB_QUERY_SUMMARY:()=>rZe,ATTR_DB_QUERY_TEXT:()=>CH,ATTR_DB_RESPONSE_STATUS_CODE:()=>bH,ATTR_DB_STORED_PROCEDURE_NAME:()=>oZe,ATTR_DB_SYSTEM_NAME:()=>M0,ATTR_DOTNET_GC_HEAP_GENERATION:()=>cZe,ATTR_ERROR_TYPE:()=>vH,ATTR_EXCEPTION_ESCAPED:()=>gZe,ATTR_EXCEPTION_MESSAGE:()=>hZe,ATTR_EXCEPTION_STACKTRACE:()=>_Ze,ATTR_EXCEPTION_TYPE:()=>EZe,ATTR_HTTP_REQUEST_HEADER:()=>SZe,ATTR_HTTP_REQUEST_METHOD:()=>P0,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>NZe,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>OZe,ATTR_HTTP_RESPONSE_HEADER:()=>wZe,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>Sm,ATTR_HTTP_ROUTE:()=>ym,ATTR_JVM_GC_ACTION:()=>MZe,ATTR_JVM_GC_NAME:()=>PZe,ATTR_JVM_MEMORY_POOL_NAME:()=>kZe,ATTR_JVM_MEMORY_TYPE:()=>UZe,ATTR_JVM_THREAD_DAEMON:()=>FZe,ATTR_JVM_THREAD_STATE:()=>GZe,ATTR_NETWORK_LOCAL_ADDRESS:()=>YZe,ATTR_NETWORK_LOCAL_PORT:()=>KZe,ATTR_NETWORK_PEER_ADDRESS:()=>RH,ATTR_NETWORK_PEER_PORT:()=>DH,ATTR_NETWORK_PROTOCOL_NAME:()=>JZe,ATTR_NETWORK_PROTOCOL_VERSION:()=>xH,ATTR_NETWORK_TRANSPORT:()=>BH,ATTR_NETWORK_TYPE:()=>nWe,ATTR_OTEL_SCOPE_NAME:()=>iWe,ATTR_OTEL_SCOPE_VERSION:()=>aWe,ATTR_OTEL_STATUS_CODE:()=>sWe,ATTR_OTEL_STATUS_DESCRIPTION:()=>lWe,ATTR_SERVER_ADDRESS:()=>NH,ATTR_SERVER_PORT:()=>OH,ATTR_SERVICE_INSTANCE_ID:()=>dWe,ATTR_SERVICE_NAME:()=>wH,ATTR_SERVICE_NAMESPACE:()=>pWe,ATTR_SERVICE_VERSION:()=>MH,ATTR_SIGNALR_CONNECTION_STATUS:()=>fWe,ATTR_SIGNALR_TRANSPORT:()=>hWe,ATTR_TELEMETRY_SDK_LANGUAGE:()=>yWe,ATTR_TELEMETRY_SDK_NAME:()=>MWe,ATTR_TELEMETRY_SDK_VERSION:()=>PWe,ATTR_URL_FRAGMENT:()=>kWe,ATTR_URL_FULL:()=>hh,ATTR_URL_PATH:()=>UWe,ATTR_URL_QUERY:()=>LWe,ATTR_URL_SCHEME:()=>QWe,ATTR_USER_AGENT_ORIGINAL:()=>PH,AWSECSLAUNCHTYPEVALUES_EC2:()=>ZKe,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>WKe,AwsEcsLaunchtypeValues:()=>XKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>wKe,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>MKe,CLOUDPLATFORMVALUES_AWS_EC2:()=>PKe,CLOUDPLATFORMVALUES_AWS_ECS:()=>kKe,CLOUDPLATFORMVALUES_AWS_EKS:()=>UKe,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>QKe,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>LKe,CLOUDPLATFORMVALUES_AZURE_AKS:()=>jKe,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>HKe,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>GKe,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>zKe,CLOUDPLATFORMVALUES_AZURE_VM:()=>FKe,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>KKe,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>YKe,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>VKe,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>$Ke,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>qKe,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>DKe,CLOUDPROVIDERVALUES_AWS:()=>xKe,CLOUDPROVIDERVALUES_AZURE:()=>BKe,CLOUDPROVIDERVALUES_GCP:()=>NKe,CloudPlatformValues:()=>JKe,CloudProviderValues:()=>OKe,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>fqe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>yqe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>Aqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>Sqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>gqe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>Iqe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>hqe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>mqe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>Tqe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>Eqe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>_qe,DBSYSTEMVALUES_ADABAS:()=>kVe,DBSYSTEMVALUES_CACHE:()=>PVe,DBSYSTEMVALUES_CASSANDRA:()=>XVe,DBSYSTEMVALUES_CLOUDSCAPE:()=>RVe,DBSYSTEMVALUES_COCKROACHDB:()=>dqe,DBSYSTEMVALUES_COLDFUSION:()=>WVe,DBSYSTEMVALUES_COSMOSDB:()=>iqe,DBSYSTEMVALUES_COUCHBASE:()=>rqe,DBSYSTEMVALUES_COUCHDB:()=>oqe,DBSYSTEMVALUES_DB2:()=>IVe,DBSYSTEMVALUES_DERBY:()=>LVe,DBSYSTEMVALUES_DYNAMODB:()=>aqe,DBSYSTEMVALUES_EDB:()=>MVe,DBSYSTEMVALUES_ELASTICSEARCH:()=>cqe,DBSYSTEMVALUES_FILEMAKER:()=>QVe,DBSYSTEMVALUES_FIREBIRD:()=>UVe,DBSYSTEMVALUES_FIRSTSQL:()=>wVe,DBSYSTEMVALUES_GEODE:()=>uqe,DBSYSTEMVALUES_H2:()=>ZVe,DBSYSTEMVALUES_HANADB:()=>NVe,DBSYSTEMVALUES_HBASE:()=>eqe,DBSYSTEMVALUES_HIVE:()=>vVe,DBSYSTEMVALUES_HSQLDB:()=>DVe,DBSYSTEMVALUES_INFORMIX:()=>FVe,DBSYSTEMVALUES_INGRES:()=>OVe,DBSYSTEMVALUES_INSTANTDB:()=>GVe,DBSYSTEMVALUES_INTERBASE:()=>jVe,DBSYSTEMVALUES_MARIADB:()=>zVe,DBSYSTEMVALUES_MAXDB:()=>BVe,DBSYSTEMVALUES_MEMCACHED:()=>lqe,DBSYSTEMVALUES_MONGODB:()=>tqe,DBSYSTEMVALUES_MSSQL:()=>SVe,DBSYSTEMVALUES_MYSQL:()=>yVe,DBSYSTEMVALUES_NEO4J:()=>sqe,DBSYSTEMVALUES_NETEZZA:()=>HVe,DBSYSTEMVALUES_ORACLE:()=>TVe,DBSYSTEMVALUES_OTHER_SQL:()=>EVe,DBSYSTEMVALUES_PERVASIVE:()=>$Ve,DBSYSTEMVALUES_POINTBASE:()=>VVe,DBSYSTEMVALUES_POSTGRESQL:()=>CVe,DBSYSTEMVALUES_PROGRESS:()=>xVe,DBSYSTEMVALUES_REDIS:()=>nqe,DBSYSTEMVALUES_REDSHIFT:()=>bVe,DBSYSTEMVALUES_SQLITE:()=>qVe,DBSYSTEMVALUES_SYBASE:()=>YVe,DBSYSTEMVALUES_TERADATA:()=>KVe,DBSYSTEMVALUES_VERTICA:()=>JVe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>iZe,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>aZe,DB_SYSTEM_NAME_VALUE_MYSQL:()=>sZe,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>uZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>lZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>dZe,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>pZe,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>fZe,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>AZe,DbCassandraConsistencyLevelValues:()=>Cqe,DbSystemValues:()=>pqe,ERROR_TYPE_VALUE_OTHER:()=>mZe,EVENT_EXCEPTION:()=>UXe,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>wqe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>Oqe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>Nqe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>Pqe,FAASINVOKEDPROVIDERVALUES_AWS:()=>kqe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>Uqe,FAASINVOKEDPROVIDERVALUES_GCP:()=>Lqe,FAASTRIGGERVALUES_DATASOURCE:()=>bqe,FAASTRIGGERVALUES_HTTP:()=>vqe,FAASTRIGGERVALUES_OTHER:()=>xqe,FAASTRIGGERVALUES_PUBSUB:()=>Rqe,FAASTRIGGERVALUES_TIMER:()=>Dqe,FaasDocumentOperationValues:()=>Mqe,FaasInvokedProviderValues:()=>Qqe,FaasTriggerValues:()=>Bqe,HOSTARCHVALUES_AMD64:()=>eJe,HOSTARCHVALUES_ARM32:()=>tJe,HOSTARCHVALUES_ARM64:()=>nJe,HOSTARCHVALUES_IA64:()=>rJe,HOSTARCHVALUES_PPC32:()=>oJe,HOSTARCHVALUES_PPC64:()=>iJe,HOSTARCHVALUES_X86:()=>aJe,HTTPFLAVORVALUES_HTTP_1_0:()=>T7e,HTTPFLAVORVALUES_HTTP_1_1:()=>I7e,HTTPFLAVORVALUES_HTTP_2_0:()=>C7e,HTTPFLAVORVALUES_QUIC:()=>v7e,HTTPFLAVORVALUES_SPDY:()=>b7e,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>TZe,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>IZe,HTTP_REQUEST_METHOD_VALUE_GET:()=>CZe,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>bZe,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>vZe,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>yZe,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>RZe,HTTP_REQUEST_METHOD_VALUE_POST:()=>DZe,HTTP_REQUEST_METHOD_VALUE_PUT:()=>xZe,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>BZe,HostArchValues:()=>sJe,HttpFlavorValues:()=>R7e,JVM_MEMORY_TYPE_VALUE_HEAP:()=>LZe,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>QZe,JVM_THREAD_STATE_VALUE_BLOCKED:()=>jZe,JVM_THREAD_STATE_VALUE_NEW:()=>zZe,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>HZe,JVM_THREAD_STATE_VALUE_TERMINATED:()=>$Ze,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>VZe,JVM_THREAD_STATE_VALUE_WAITING:()=>qZe,MESSAGETYPEVALUES_RECEIVED:()=>X7e,MESSAGETYPEVALUES_SENT:()=>W7e,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>D7e,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>x7e,MESSAGINGOPERATIONVALUES_PROCESS:()=>O7e,MESSAGINGOPERATIONVALUES_RECEIVE:()=>N7e,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>FWe,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>GWe,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>jWe,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>$We,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>HWe,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>zWe,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>VWe,METRIC_DB_CLIENT_OPERATION_DURATION:()=>qWe,METRIC_DOTNET_ASSEMBLY_COUNT:()=>YWe,METRIC_DOTNET_EXCEPTIONS:()=>KWe,METRIC_DOTNET_GC_COLLECTIONS:()=>JWe,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>ZWe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>WWe,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>XWe,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>eXe,METRIC_DOTNET_GC_PAUSE_TIME:()=>tXe,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>nXe,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>rXe,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>oXe,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>iXe,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>aXe,METRIC_DOTNET_PROCESS_CPU_TIME:()=>sXe,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>uXe,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>cXe,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>lXe,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>dXe,METRIC_DOTNET_TIMER_COUNT:()=>pXe,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>fXe,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>AXe,METRIC_JVM_CLASS_COUNT:()=>mXe,METRIC_JVM_CLASS_LOADED:()=>gXe,METRIC_JVM_CLASS_UNLOADED:()=>hXe,METRIC_JVM_CPU_COUNT:()=>_Xe,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>EXe,METRIC_JVM_CPU_TIME:()=>SXe,METRIC_JVM_GC_DURATION:()=>yXe,METRIC_JVM_MEMORY_COMMITTED:()=>TXe,METRIC_JVM_MEMORY_LIMIT:()=>IXe,METRIC_JVM_MEMORY_USED:()=>CXe,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>bXe,METRIC_JVM_THREAD_COUNT:()=>vXe,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>RXe,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>DXe,METRIC_KESTREL_CONNECTION_DURATION:()=>xXe,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>BXe,METRIC_KESTREL_QUEUED_REQUESTS:()=>NXe,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>OXe,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>wXe,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>MXe,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>PXe,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>kXe,MessageTypeValues:()=>eYe,MessagingDestinationKindValues:()=>B7e,MessagingOperationValues:()=>w7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>r7e,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>a7e,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>t7e,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>f7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>o7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>i7e,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>d7e,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>e7e,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>m7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>s7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>c7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>A7e,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>u7e,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>l7e,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>h7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>p7e,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>S7e,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>_7e,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>E7e,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>g7e,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>n7e,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>Jqe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>Zqe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>Wqe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>Yqe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>Kqe,NETTRANSPORTVALUES_INPROC:()=>$qe,NETTRANSPORTVALUES_IP:()=>jqe,NETTRANSPORTVALUES_IP_TCP:()=>Fqe,NETTRANSPORTVALUES_IP_UDP:()=>Gqe,NETTRANSPORTVALUES_OTHER:()=>Vqe,NETTRANSPORTVALUES_PIPE:()=>Hqe,NETTRANSPORTVALUES_UNIX:()=>zqe,NETWORK_TRANSPORT_VALUE_PIPE:()=>ZZe,NETWORK_TRANSPORT_VALUE_QUIC:()=>WZe,NETWORK_TRANSPORT_VALUE_TCP:()=>XZe,NETWORK_TRANSPORT_VALUE_UDP:()=>eWe,NETWORK_TRANSPORT_VALUE_UNIX:()=>tWe,NETWORK_TYPE_VALUE_IPV4:()=>rWe,NETWORK_TYPE_VALUE_IPV6:()=>oWe,NetHostConnectionSubtypeValues:()=>y7e,NetHostConnectionTypeValues:()=>Xqe,NetTransportValues:()=>qqe,OSTYPEVALUES_AIX:()=>gJe,OSTYPEVALUES_DARWIN:()=>lJe,OSTYPEVALUES_DRAGONFLYBSD:()=>AJe,OSTYPEVALUES_FREEBSD:()=>dJe,OSTYPEVALUES_HPUX:()=>mJe,OSTYPEVALUES_LINUX:()=>cJe,OSTYPEVALUES_NETBSD:()=>pJe,OSTYPEVALUES_OPENBSD:()=>fJe,OSTYPEVALUES_SOLARIS:()=>hJe,OSTYPEVALUES_WINDOWS:()=>uJe,OSTYPEVALUES_Z_OS:()=>_Je,OTEL_STATUS_CODE_VALUE_ERROR:()=>uWe,OTEL_STATUS_CODE_VALUE_OK:()=>cWe,OsTypeValues:()=>EJe,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>H7e,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>F7e,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>P7e,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>K7e,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>L7e,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>z7e,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>q7e,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>U7e,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Q7e,RPCGRPCSTATUSCODEVALUES_OK:()=>M7e,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>$7e,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>G7e,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>j7e,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>J7e,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Y7e,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>V7e,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>k7e,RpcGrpcStatusCodeValues:()=>Z7e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>B9e,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>j9e,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>R9e,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>I9e,SEMATTRS_AWS_DYNAMODB_COUNT:()=>F9e,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>P9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>w9e,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>z9e,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>N9e,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>C9e,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>x9e,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>M9e,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>D9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>b9e,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>v9e,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>G9e,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>U9e,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>L9e,SEMATTRS_AWS_DYNAMODB_SELECT:()=>O9e,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>k9e,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>T9e,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>Q9e,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>A$e,SEMATTRS_CODE_FILEPATH:()=>p9e,SEMATTRS_CODE_FUNCTION:()=>l9e,SEMATTRS_CODE_LINENO:()=>f9e,SEMATTRS_CODE_NAMESPACE:()=>d9e,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>I$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>D$e,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>R$e,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>b$e,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>y$e,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>T$e,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>v$e,SEMATTRS_DB_CASSANDRA_TABLE:()=>C$e,SEMATTRS_DB_CONNECTION_STRING:()=>m$e,SEMATTRS_DB_HBASE_NAMESPACE:()=>x$e,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>h$e,SEMATTRS_DB_MONGODB_COLLECTION:()=>N$e,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>S$e,SEMATTRS_DB_NAME:()=>_$e,SEMATTRS_DB_OPERATION:()=>E$e,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>B$e,SEMATTRS_DB_SQL_TABLE:()=>O$e,SEMATTRS_DB_STATEMENT:()=>cH,SEMATTRS_DB_SYSTEM:()=>uH,SEMATTRS_DB_USER:()=>g$e,SEMATTRS_ENDUSER_ID:()=>i9e,SEMATTRS_ENDUSER_ROLE:()=>a9e,SEMATTRS_ENDUSER_SCOPE:()=>s9e,SEMATTRS_EXCEPTION_ESCAPED:()=>k$e,SEMATTRS_EXCEPTION_MESSAGE:()=>M$e,SEMATTRS_EXCEPTION_STACKTRACE:()=>P$e,SEMATTRS_EXCEPTION_TYPE:()=>w$e,SEMATTRS_FAAS_COLDSTART:()=>H$e,SEMATTRS_FAAS_CRON:()=>z$e,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>L$e,SEMATTRS_FAAS_DOCUMENT_NAME:()=>G$e,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>Q$e,SEMATTRS_FAAS_DOCUMENT_TIME:()=>F$e,SEMATTRS_FAAS_EXECUTION:()=>U$e,SEMATTRS_FAAS_INVOKED_NAME:()=>$$e,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>V$e,SEMATTRS_FAAS_INVOKED_REGION:()=>q$e,SEMATTRS_FAAS_TIME:()=>j$e,SEMATTRS_FAAS_TRIGGER:()=>lH,SEMATTRS_HTTP_CLIENT_IP:()=>y9e,SEMATTRS_HTTP_FLAVOR:()=>g9e,SEMATTRS_HTTP_HOST:()=>A9e,SEMATTRS_HTTP_METHOD:()=>Zx,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>_9e,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>E9e,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>mH,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>gH,SEMATTRS_HTTP_ROUTE:()=>hH,SEMATTRS_HTTP_SCHEME:()=>m9e,SEMATTRS_HTTP_SERVER_NAME:()=>S9e,SEMATTRS_HTTP_STATUS_CODE:()=>w0,SEMATTRS_HTTP_TARGET:()=>AH,SEMATTRS_HTTP_URL:()=>$I,SEMATTRS_HTTP_USER_AGENT:()=>h9e,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>gVe,SEMATTRS_MESSAGE_ID:()=>mVe,SEMATTRS_MESSAGE_TYPE:()=>AVe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>hVe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>tVe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>Z9e,SEMATTRS_MESSAGING_DESTINATION:()=>H9e,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>$9e,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>iVe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>oVe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>rVe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>aVe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>sVe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>J9e,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>X9e,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>W9e,SEMATTRS_MESSAGING_OPERATION:()=>eVe,SEMATTRS_MESSAGING_PROTOCOL:()=>q9e,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>Y9e,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>nVe,SEMATTRS_MESSAGING_SYSTEM:()=>_H,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>V9e,SEMATTRS_MESSAGING_URL:()=>K9e,SEMATTRS_NET_HOST_CARRIER_ICC:()=>r9e,SEMATTRS_NET_HOST_CARRIER_MCC:()=>t9e,SEMATTRS_NET_HOST_CARRIER_MNC:()=>n9e,SEMATTRS_NET_HOST_CARRIER_NAME:()=>e9e,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>X$e,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>W$e,SEMATTRS_NET_HOST_IP:()=>pH,SEMATTRS_NET_HOST_NAME:()=>Z$e,SEMATTRS_NET_HOST_PORT:()=>fH,SEMATTRS_NET_PEER_IP:()=>dH,SEMATTRS_NET_PEER_NAME:()=>J$e,SEMATTRS_NET_PEER_PORT:()=>K$e,SEMATTRS_NET_TRANSPORT:()=>Y$e,SEMATTRS_PEER_SERVICE:()=>o9e,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>SH,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>pVe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>fVe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>dVe,SEMATTRS_RPC_JSONRPC_VERSION:()=>lVe,SEMATTRS_RPC_METHOD:()=>cVe,SEMATTRS_RPC_SERVICE:()=>EH,SEMATTRS_RPC_SYSTEM:()=>uVe,SEMATTRS_THREAD_ID:()=>u9e,SEMATTRS_THREAD_NAME:()=>c9e,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>sYe,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>aYe,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>uYe,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>cYe,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>lYe,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>dYe,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>pYe,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>AYe,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>fYe,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>gYe,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>mYe,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>nYe,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>oYe,SEMRESATTRS_CLOUD_PLATFORM:()=>iYe,SEMRESATTRS_CLOUD_PROVIDER:()=>tYe,SEMRESATTRS_CLOUD_REGION:()=>rYe,SEMRESATTRS_CONTAINER_ID:()=>_Ye,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>SYe,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>yYe,SEMRESATTRS_CONTAINER_NAME:()=>hYe,SEMRESATTRS_CONTAINER_RUNTIME:()=>EYe,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>TYe,SEMRESATTRS_DEVICE_ID:()=>IYe,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>CYe,SEMRESATTRS_DEVICE_MODEL_NAME:()=>bYe,SEMRESATTRS_FAAS_ID:()=>RYe,SEMRESATTRS_FAAS_INSTANCE:()=>xYe,SEMRESATTRS_FAAS_MAX_MEMORY:()=>BYe,SEMRESATTRS_FAAS_NAME:()=>vYe,SEMRESATTRS_FAAS_VERSION:()=>DYe,SEMRESATTRS_HOST_ARCH:()=>MYe,SEMRESATTRS_HOST_ID:()=>NYe,SEMRESATTRS_HOST_IMAGE_ID:()=>kYe,SEMRESATTRS_HOST_IMAGE_NAME:()=>PYe,SEMRESATTRS_HOST_IMAGE_VERSION:()=>UYe,SEMRESATTRS_HOST_NAME:()=>OYe,SEMRESATTRS_HOST_TYPE:()=>wYe,SEMRESATTRS_K8S_CLUSTER_NAME:()=>LYe,SEMRESATTRS_K8S_CONTAINER_NAME:()=>HYe,SEMRESATTRS_K8S_CRONJOB_NAME:()=>nKe,SEMRESATTRS_K8S_CRONJOB_UID:()=>tKe,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>WYe,SEMRESATTRS_K8S_DAEMONSET_UID:()=>ZYe,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>YYe,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>qYe,SEMRESATTRS_K8S_JOB_NAME:()=>eKe,SEMRESATTRS_K8S_JOB_UID:()=>XYe,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>GYe,SEMRESATTRS_K8S_NODE_NAME:()=>QYe,SEMRESATTRS_K8S_NODE_UID:()=>FYe,SEMRESATTRS_K8S_POD_NAME:()=>zYe,SEMRESATTRS_K8S_POD_UID:()=>jYe,SEMRESATTRS_K8S_REPLICASET_NAME:()=>VYe,SEMRESATTRS_K8S_REPLICASET_UID:()=>$Ye,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>JYe,SEMRESATTRS_K8S_STATEFULSET_UID:()=>KYe,SEMRESATTRS_OS_DESCRIPTION:()=>oKe,SEMRESATTRS_OS_NAME:()=>iKe,SEMRESATTRS_OS_TYPE:()=>rKe,SEMRESATTRS_OS_VERSION:()=>aKe,SEMRESATTRS_PROCESS_COMMAND:()=>lKe,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>pKe,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>dKe,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>uKe,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>cKe,SEMRESATTRS_PROCESS_OWNER:()=>fKe,SEMRESATTRS_PROCESS_PID:()=>sKe,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>gKe,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>AKe,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>mKe,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>_Ke,SEMRESATTRS_SERVICE_NAME:()=>hKe,SEMRESATTRS_SERVICE_NAMESPACE:()=>yH,SEMRESATTRS_SERVICE_VERSION:()=>EKe,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>IKe,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>yKe,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>SKe,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>TKe,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>vKe,SEMRESATTRS_WEBENGINE_NAME:()=>CKe,SEMRESATTRS_WEBENGINE_VERSION:()=>bKe,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>AWe,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>mWe,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>gWe,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>_We,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>EWe,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>SWe,SemanticAttributes:()=>_Ve,SemanticResourceAttributes:()=>RKe,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>SJe,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>yJe,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>TJe,TELEMETRYSDKLANGUAGEVALUES_GO:()=>IJe,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>CJe,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>bJe,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>vJe,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>RJe,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>DJe,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>xJe,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>TWe,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>IWe,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>CWe,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>bWe,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>vWe,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>RWe,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>DWe,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>xWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>BWe,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>NWe,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>OWe,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>wWe,TelemetrySdkLanguageValues:()=>BJe});var $n=O(()=>{A();_fe();Hme();$me();Vme();qme()});var Yme=Q($M=>{"use strict";A();Object.defineProperty($M,"__esModule",{value:!0});$M.ATTR_PROCESS_RUNTIME_NAME=void 0;$M.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var Kme=Q(qM=>{"use strict";A();Object.defineProperty(qM,"__esModule",{value:!0});qM.SDK_INFO=void 0;var LXe=Rue(),VM=($n(),we(Nr)),QXe=Yme();qM.SDK_INFO={[VM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[QXe.ATTR_PROCESS_RUNTIME_NAME]:"node",[VM.ATTR_TELEMETRY_SDK_LANGUAGE]:VM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[VM.ATTR_TELEMETRY_SDK_VERSION]:LXe.VERSION}});var Jme=Q(Bs=>{"use strict";A();Object.defineProperty(Bs,"__esModule",{value:!0});Bs.otperformance=Bs.SDK_INFO=Bs._globalThis=Bs.getStringListFromEnv=Bs.getNumberFromEnv=Bs.getBooleanFromEnv=Bs.getStringFromEnv=void 0;var YM=bue();Object.defineProperty(Bs,"getStringFromEnv",{enumerable:!0,get:function(){return YM.getStringFromEnv}});Object.defineProperty(Bs,"getBooleanFromEnv",{enumerable:!0,get:function(){return YM.getBooleanFromEnv}});Object.defineProperty(Bs,"getNumberFromEnv",{enumerable:!0,get:function(){return YM.getNumberFromEnv}});Object.defineProperty(Bs,"getStringListFromEnv",{enumerable:!0,get:function(){return YM.getStringListFromEnv}});var FXe=vue();Object.defineProperty(Bs,"_globalThis",{enumerable:!0,get:function(){return FXe._globalThis}});var GXe=Kme();Object.defineProperty(Bs,"SDK_INFO",{enumerable:!0,get:function(){return GXe.SDK_INFO}});Bs.otperformance=performance});var kH=Q(Ns=>{"use strict";A();Object.defineProperty(Ns,"__esModule",{value:!0});Ns.getStringListFromEnv=Ns.getNumberFromEnv=Ns.getStringFromEnv=Ns.getBooleanFromEnv=Ns.otperformance=Ns._globalThis=Ns.SDK_INFO=void 0;var k0=Jme();Object.defineProperty(Ns,"SDK_INFO",{enumerable:!0,get:function(){return k0.SDK_INFO}});Object.defineProperty(Ns,"_globalThis",{enumerable:!0,get:function(){return k0._globalThis}});Object.defineProperty(Ns,"otperformance",{enumerable:!0,get:function(){return k0.otperformance}});Object.defineProperty(Ns,"getBooleanFromEnv",{enumerable:!0,get:function(){return k0.getBooleanFromEnv}});Object.defineProperty(Ns,"getStringFromEnv",{enumerable:!0,get:function(){return k0.getStringFromEnv}});Object.defineProperty(Ns,"getNumberFromEnv",{enumerable:!0,get:function(){return k0.getNumberFromEnv}});Object.defineProperty(Ns,"getStringListFromEnv",{enumerable:!0,get:function(){return k0.getStringListFromEnv}})});var ege=Q(Wr=>{"use strict";A();Object.defineProperty(Wr,"__esModule",{value:!0});Wr.addHrTimes=Wr.isTimeInput=Wr.isTimeInputHrTime=Wr.hrTimeToMicroseconds=Wr.hrTimeToMilliseconds=Wr.hrTimeToNanoseconds=Wr.hrTimeToTimeStamp=Wr.hrTimeDuration=Wr.timeInputToHrTime=Wr.hrTime=Wr.getTimeOrigin=Wr.millisToHrTime=void 0;var KM=kH(),Zme=9,jXe=6,zXe=Math.pow(10,jXe),JM=Math.pow(10,Zme);function Wx(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*zXe);return[n,r]}Wr.millisToHrTime=Wx;function HXe(){return KM.otperformance.timeOrigin}Wr.getTimeOrigin=HXe;function Wme(e){let t=Wx(KM.otperformance.timeOrigin),n=Wx(typeof e=="number"?e:KM.otperformance.now());return Xme(t,n)}Wr.hrTime=Wme;function $Xe(e){if(UH(e))return e;if(typeof e=="number")return e<KM.otperformance.timeOrigin?Wme(e):Wx(e);if(e instanceof Date)return Wx(e.getTime());throw TypeError("Invalid input type")}Wr.timeInputToHrTime=$Xe;function VXe(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=JM),[n,r]}Wr.hrTimeDuration=VXe;function qXe(e){let t=Zme,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Wr.hrTimeToTimeStamp=qXe;function YXe(e){return e[0]*JM+e[1]}Wr.hrTimeToNanoseconds=YXe;function KXe(e){return e[0]*1e3+e[1]/1e6}Wr.hrTimeToMilliseconds=KXe;function JXe(e){return e[0]*1e6+e[1]/1e3}Wr.hrTimeToMicroseconds=JXe;function UH(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Wr.isTimeInputHrTime=UH;function ZXe(e){return UH(e)||typeof e=="number"||e instanceof Date}Wr.isTimeInput=ZXe;function Xme(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=JM&&(n[1]-=JM,n[0]+=1),n}Wr.addHrTimes=Xme});var tge=Q(ZM=>{"use strict";A();Object.defineProperty(ZM,"__esModule",{value:!0});ZM.unrefTimer=void 0;function WXe(e){typeof e!="number"&&e.unref()}ZM.unrefTimer=WXe});var nge=Q(Xx=>{"use strict";A();Object.defineProperty(Xx,"__esModule",{value:!0});Xx.ExportResultCode=void 0;var XXe;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(XXe=Xx.ExportResultCode||(Xx.ExportResultCode={}))});var oge=Q(WM=>{"use strict";A();Object.defineProperty(WM,"__esModule",{value:!0});WM.CompositePropagator=void 0;var rge=(Le(),we(Je)),LH=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[],this._fields=Array.from(new Set(this._propagators.map(n=>typeof n.fields=="function"?n.fields():[]).reduce((n,r)=>n.concat(r),[])))}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){rge.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){rge.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${a.message}`)}return o},t)}fields(){return this._fields.slice()}};WM.CompositePropagator=LH});var ige=Q(qI=>{"use strict";A();Object.defineProperty(qI,"__esModule",{value:!0});qI.validateValue=qI.validateKey=void 0;var QH="[_0-9a-z-*/]",eet=`[a-z]${QH}{0,255}`,tet=`[a-z0-9]${QH}{0,240}@[a-z]${QH}{0,13}`,net=new RegExp(`^(?:${eet}|${tet})$`),ret=/^[ -~]{0,255}[!-~]$/,oet=/,|=/;function iet(e){return net.test(e)}qI.validateKey=iet;function aet(e){return ret.test(e)&&!oet.test(e)}qI.validateValue=aet});var GH=Q(XM=>{"use strict";A();Object.defineProperty(XM,"__esModule",{value:!0});XM.TraceState=void 0;var age=ige(),sge=32,set=512,uge=",",cge="=",FH=class e{_internalState=new Map;constructor(t){t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return this._keys().reduce((t,n)=>(t.push(n+cge+this.get(n)),t),[]).join(uge)}_parse(t){t.length>set||(this._internalState=t.split(uge).reverse().reduce((n,r)=>{let o=r.trim(),i=o.indexOf(cge);if(i!==-1){let a=o.slice(0,i),c=o.slice(i+1,r.length);(0,age.validateKey)(a)&&(0,age.validateValue)(c)&&n.set(a,c)}return n},new Map),this._internalState.size>sge&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,sge))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}};XM.TraceState=FH});var dge=Q(Os=>{"use strict";A();Object.defineProperty(Os,"__esModule",{value:!0});Os.W3CTraceContextPropagator=Os.parseTraceParent=Os.TRACE_STATE_HEADER=Os.TRACE_PARENT_HEADER=void 0;var eP=(Le(),we(Je)),uet=Jx(),cet=GH();Os.TRACE_PARENT_HEADER="traceparent";Os.TRACE_STATE_HEADER="tracestate";var det="00",pet="(?!ff)[\\da-f]{2}",fet="(?![0]{32})[\\da-f]{32}",Aet="(?![0]{16})[\\da-f]{16}",met="[\\da-f]{2}",get=new RegExp(`^\\s?(${pet})-(${fet})-(${Aet})-(${met})(-.*)?\\s?$`);function lge(e){let t=get.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}Os.parseTraceParent=lge;var jH=class{inject(t,n,r){let o=eP.trace.getSpanContext(t);if(!o||(0,uet.isTracingSuppressed)(t)||!(0,eP.isSpanContextValid)(o))return;let i=`${det}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||eP.TraceFlags.NONE).toString(16)}`;r.set(n,Os.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,Os.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,Os.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let a=lge(i);if(!a)return t;a.isRemote=!0;let c=r.get(n,Os.TRACE_STATE_HEADER);if(c){let d=Array.isArray(c)?c.join(","):c;a.traceState=new cet.TraceState(typeof d=="string"?d:void 0)}return eP.trace.setSpanContext(t,a)}fields(){return[Os.TRACE_PARENT_HEADER,Os.TRACE_STATE_HEADER]}};Os.W3CTraceContextPropagator=jH});var pge=Q(Cp=>{"use strict";A();Object.defineProperty(Cp,"__esModule",{value:!0});Cp.getRPCMetadata=Cp.deleteRPCMetadata=Cp.setRPCMetadata=Cp.RPCType=void 0;var het=(Le(),we(Je)),zH=(0,het.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),_et;(function(e){e.HTTP="http"})(_et=Cp.RPCType||(Cp.RPCType={}));function Eet(e,t){return e.setValue(zH,t)}Cp.setRPCMetadata=Eet;function yet(e){return e.deleteValue(zH)}Cp.deleteRPCMetadata=yet;function Tet(e){return e.getValue(zH)}Cp.getRPCMetadata=Tet});var hge=Q(tP=>{"use strict";A();Object.defineProperty(tP,"__esModule",{value:!0});tP.isPlainObject=void 0;var Iet="[object Object]",Cet="[object Null]",bet="[object Undefined]",vet=Function.prototype,fge=vet.toString,Ret=fge.call(Object),Det=Object.getPrototypeOf,Age=Object.prototype,mge=Age.hasOwnProperty,U0=Symbol?Symbol.toStringTag:void 0,gge=Age.toString;function xet(e){if(!Bet(e)||Net(e)!==Iet)return!1;let t=Det(e);if(t===null)return!0;let n=mge.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fge.call(n)===Ret}tP.isPlainObject=xet;function Bet(e){return e!=null&&typeof e=="object"}function Net(e){return e==null?e===void 0?bet:Cet:U0&&U0 in Object(e)?Oet(e):wet(e)}function Oet(e){let t=mge.call(e,U0),n=e[U0],r=!1;try{e[U0]=void 0,r=!0}catch{}let o=gge.call(e);return r&&(t?e[U0]=n:delete e[U0]),o}function wet(e){return gge.call(e)}});var Tge=Q(oP=>{"use strict";A();Object.defineProperty(oP,"__esModule",{value:!0});oP.merge=void 0;var _ge=hge(),Met=20;function Pet(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=Sge(t,e.shift(),0,n);return t}oP.merge=Pet;function HH(e){return rP(e)?e.slice():e}function Sge(e,t,n=0,r){let o;if(!(n>Met)){if(n++,nP(e)||nP(t)||yge(t))o=HH(t);else if(rP(e)){if(o=e.slice(),rP(t))for(let i=0,a=t.length;i<a;i++)o.push(HH(t[i]));else if(e1(t)){let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a];o[d]=HH(t[d])}}}else if(e1(e))if(e1(t)){if(!ket(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let a=0,c=i.length;a<c;a++){let d=i[a],m=t[d];if(nP(m))typeof m>"u"?delete o[d]:o[d]=m;else{let h=o[d],y=m;if(Ege(e,d,r)||Ege(t,d,r))delete o[d];else{if(e1(h)&&e1(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:d}),b.push({obj:t,key:d}),r.set(h,S),r.set(y,b)}o[d]=Sge(o[d],m,n,r)}}}}else o=t;return o}}function Ege(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 rP(e){return Array.isArray(e)}function yge(e){return typeof e=="function"}function e1(e){return!nP(e)&&!rP(e)&&!yge(e)&&typeof e=="object"}function nP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function ket(e,t){return!(!(0,_ge.isPlainObject)(e)||!(0,_ge.isPlainObject)(t))}});var Ige=Q(YI=>{"use strict";A();Object.defineProperty(YI,"__esModule",{value:!0});YI.callWithTimeout=YI.TimeoutError=void 0;var iP=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};YI.TimeoutError=iP;function Uet(e,t){let n,r=new Promise(function(i,a){n=setTimeout(function(){a(new iP("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}YI.callWithTimeout=Uet});var bge=Q(KI=>{"use strict";A();Object.defineProperty(KI,"__esModule",{value:!0});KI.isUrlIgnored=KI.urlMatches=void 0;function Cge(e,t){return typeof t=="string"?e===t:!!e.match(t)}KI.urlMatches=Cge;function Let(e,t){if(!t)return!1;for(let n of t)if(Cge(e,n))return!0;return!1}KI.isUrlIgnored=Let});var vge=Q(aP=>{"use strict";A();Object.defineProperty(aP,"__esModule",{value:!0});aP.Deferred=void 0;var $H=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)}};aP.Deferred=$H});var Rge=Q(sP=>{"use strict";A();Object.defineProperty(sP,"__esModule",{value:!0});sP.BindOnceFuture=void 0;var Qet=vge(),VH=class{_isCalled=!1;_deferred=new Qet.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}};sP.BindOnceFuture=VH});var xge=Q(uP=>{"use strict";A();Object.defineProperty(uP,"__esModule",{value:!0});uP.diagLogLevelFromString=void 0;var Tm=(Le(),we(Je)),Dge={ALL:Tm.DiagLogLevel.ALL,VERBOSE:Tm.DiagLogLevel.VERBOSE,DEBUG:Tm.DiagLogLevel.DEBUG,INFO:Tm.DiagLogLevel.INFO,WARN:Tm.DiagLogLevel.WARN,ERROR:Tm.DiagLogLevel.ERROR,NONE:Tm.DiagLogLevel.NONE};function Fet(e){if(e==null)return;let t=Dge[e.toUpperCase()];return t??(Tm.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(Dge)}, using default`),Tm.DiagLogLevel.INFO)}uP.diagLogLevelFromString=Fet});var Nge=Q(cP=>{"use strict";A();Object.defineProperty(cP,"__esModule",{value:!0});cP._export=void 0;var Bge=(Le(),we(Je)),Get=Jx();function jet(e,t){return new Promise(n=>{Bge.context.with((0,Get.suppressTracing)(Bge.context.active()),()=>{e.export(t,n)})})}cP._export=jet});var hr=Q(xe=>{"use strict";A();Object.defineProperty(xe,"__esModule",{value:!0});xe.internal=xe.diagLogLevelFromString=xe.BindOnceFuture=xe.urlMatches=xe.isUrlIgnored=xe.callWithTimeout=xe.TimeoutError=xe.merge=xe.TraceState=xe.unsuppressTracing=xe.suppressTracing=xe.isTracingSuppressed=xe.setRPCMetadata=xe.getRPCMetadata=xe.deleteRPCMetadata=xe.RPCType=xe.parseTraceParent=xe.W3CTraceContextPropagator=xe.TRACE_STATE_HEADER=xe.TRACE_PARENT_HEADER=xe.CompositePropagator=xe.otperformance=xe.getStringListFromEnv=xe.getNumberFromEnv=xe.getBooleanFromEnv=xe.getStringFromEnv=xe._globalThis=xe.SDK_INFO=xe.parseKeyPairsIntoRecord=xe.ExportResultCode=xe.unrefTimer=xe.timeInputToHrTime=xe.millisToHrTime=xe.isTimeInputHrTime=xe.isTimeInput=xe.hrTimeToTimeStamp=xe.hrTimeToNanoseconds=xe.hrTimeToMilliseconds=xe.hrTimeToMicroseconds=xe.hrTimeDuration=xe.hrTime=xe.getTimeOrigin=xe.addHrTimes=xe.loggingErrorHandler=xe.setGlobalErrorHandler=xe.globalErrorHandler=xe.sanitizeAttributes=xe.isAttributeValue=xe.AnchoredClock=xe.W3CBaggagePropagator=void 0;var zet=fue();Object.defineProperty(xe,"W3CBaggagePropagator",{enumerable:!0,get:function(){return zet.W3CBaggagePropagator}});var Het=Aue();Object.defineProperty(xe,"AnchoredClock",{enumerable:!0,get:function(){return Het.AnchoredClock}});var Oge=Eue();Object.defineProperty(xe,"isAttributeValue",{enumerable:!0,get:function(){return Oge.isAttributeValue}});Object.defineProperty(xe,"sanitizeAttributes",{enumerable:!0,get:function(){return Oge.sanitizeAttributes}});var wge=yue();Object.defineProperty(xe,"globalErrorHandler",{enumerable:!0,get:function(){return wge.globalErrorHandler}});Object.defineProperty(xe,"setGlobalErrorHandler",{enumerable:!0,get:function(){return wge.setGlobalErrorHandler}});var $et=aH();Object.defineProperty(xe,"loggingErrorHandler",{enumerable:!0,get:function(){return $et.loggingErrorHandler}});var ld=ege();Object.defineProperty(xe,"addHrTimes",{enumerable:!0,get:function(){return ld.addHrTimes}});Object.defineProperty(xe,"getTimeOrigin",{enumerable:!0,get:function(){return ld.getTimeOrigin}});Object.defineProperty(xe,"hrTime",{enumerable:!0,get:function(){return ld.hrTime}});Object.defineProperty(xe,"hrTimeDuration",{enumerable:!0,get:function(){return ld.hrTimeDuration}});Object.defineProperty(xe,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return ld.hrTimeToMicroseconds}});Object.defineProperty(xe,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return ld.hrTimeToMilliseconds}});Object.defineProperty(xe,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return ld.hrTimeToNanoseconds}});Object.defineProperty(xe,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return ld.hrTimeToTimeStamp}});Object.defineProperty(xe,"isTimeInput",{enumerable:!0,get:function(){return ld.isTimeInput}});Object.defineProperty(xe,"isTimeInputHrTime",{enumerable:!0,get:function(){return ld.isTimeInputHrTime}});Object.defineProperty(xe,"millisToHrTime",{enumerable:!0,get:function(){return ld.millisToHrTime}});Object.defineProperty(xe,"timeInputToHrTime",{enumerable:!0,get:function(){return ld.timeInputToHrTime}});var Vet=tge();Object.defineProperty(xe,"unrefTimer",{enumerable:!0,get:function(){return Vet.unrefTimer}});var qet=nge();Object.defineProperty(xe,"ExportResultCode",{enumerable:!0,get:function(){return qet.ExportResultCode}});var Yet=tH();Object.defineProperty(xe,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return Yet.parseKeyPairsIntoRecord}});var L0=kH();Object.defineProperty(xe,"SDK_INFO",{enumerable:!0,get:function(){return L0.SDK_INFO}});Object.defineProperty(xe,"_globalThis",{enumerable:!0,get:function(){return L0._globalThis}});Object.defineProperty(xe,"getStringFromEnv",{enumerable:!0,get:function(){return L0.getStringFromEnv}});Object.defineProperty(xe,"getBooleanFromEnv",{enumerable:!0,get:function(){return L0.getBooleanFromEnv}});Object.defineProperty(xe,"getNumberFromEnv",{enumerable:!0,get:function(){return L0.getNumberFromEnv}});Object.defineProperty(xe,"getStringListFromEnv",{enumerable:!0,get:function(){return L0.getStringListFromEnv}});Object.defineProperty(xe,"otperformance",{enumerable:!0,get:function(){return L0.otperformance}});var Ket=oge();Object.defineProperty(xe,"CompositePropagator",{enumerable:!0,get:function(){return Ket.CompositePropagator}});var lP=dge();Object.defineProperty(xe,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return lP.TRACE_PARENT_HEADER}});Object.defineProperty(xe,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return lP.TRACE_STATE_HEADER}});Object.defineProperty(xe,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return lP.W3CTraceContextPropagator}});Object.defineProperty(xe,"parseTraceParent",{enumerable:!0,get:function(){return lP.parseTraceParent}});var dP=pge();Object.defineProperty(xe,"RPCType",{enumerable:!0,get:function(){return dP.RPCType}});Object.defineProperty(xe,"deleteRPCMetadata",{enumerable:!0,get:function(){return dP.deleteRPCMetadata}});Object.defineProperty(xe,"getRPCMetadata",{enumerable:!0,get:function(){return dP.getRPCMetadata}});Object.defineProperty(xe,"setRPCMetadata",{enumerable:!0,get:function(){return dP.setRPCMetadata}});var qH=Jx();Object.defineProperty(xe,"isTracingSuppressed",{enumerable:!0,get:function(){return qH.isTracingSuppressed}});Object.defineProperty(xe,"suppressTracing",{enumerable:!0,get:function(){return qH.suppressTracing}});Object.defineProperty(xe,"unsuppressTracing",{enumerable:!0,get:function(){return qH.unsuppressTracing}});var Jet=GH();Object.defineProperty(xe,"TraceState",{enumerable:!0,get:function(){return Jet.TraceState}});var Zet=Tge();Object.defineProperty(xe,"merge",{enumerable:!0,get:function(){return Zet.merge}});var Mge=Ige();Object.defineProperty(xe,"TimeoutError",{enumerable:!0,get:function(){return Mge.TimeoutError}});Object.defineProperty(xe,"callWithTimeout",{enumerable:!0,get:function(){return Mge.callWithTimeout}});var Pge=bge();Object.defineProperty(xe,"isUrlIgnored",{enumerable:!0,get:function(){return Pge.isUrlIgnored}});Object.defineProperty(xe,"urlMatches",{enumerable:!0,get:function(){return Pge.urlMatches}});var Wet=Rge();Object.defineProperty(xe,"BindOnceFuture",{enumerable:!0,get:function(){return Wet.BindOnceFuture}});var Xet=xge();Object.defineProperty(xe,"diagLogLevelFromString",{enumerable:!0,get:function(){return Xet.diagLogLevelFromString}});var ett=Nge();xe.internal={_export:ett._export}});var kge=Q(pP=>{"use strict";A();Object.defineProperty(pP,"__esModule",{value:!0});pP.VERSION=void 0;pP.VERSION="0.214.0"});var Uge=Q(t1=>{"use strict";A();Object.defineProperty(t1,"__esModule",{value:!0});t1.SeverityNumber=void 0;var ttt;(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"})(ttt=t1.SeverityNumber||(t1.SeverityNumber={}))});var AP=Q(JI=>{"use strict";A();Object.defineProperty(JI,"__esModule",{value:!0});JI.NOOP_LOGGER=JI.NoopLogger=void 0;var fP=class{emit(t){}};JI.NoopLogger=fP;JI.NOOP_LOGGER=new fP});var Lge=Q(Lf=>{"use strict";A();Object.defineProperty(Lf,"__esModule",{value:!0});Lf.API_BACKWARDS_COMPATIBILITY_VERSION=Lf.makeGetter=Lf._global=Lf.GLOBAL_LOGS_API_KEY=void 0;Lf.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Lf._global=globalThis;function ntt(e,t,n){return r=>r===e?t:n}Lf.makeGetter=ntt;Lf.API_BACKWARDS_COMPATIBILITY_VERSION=1});var YH=Q(ZI=>{"use strict";A();Object.defineProperty(ZI,"__esModule",{value:!0});ZI.NOOP_LOGGER_PROVIDER=ZI.NoopLoggerProvider=void 0;var rtt=AP(),mP=class{getLogger(t,n,r){return new rtt.NoopLogger}};ZI.NoopLoggerProvider=mP;ZI.NOOP_LOGGER_PROVIDER=new mP});var Qge=Q(gP=>{"use strict";A();Object.defineProperty(gP,"__esModule",{value:!0});gP.ProxyLogger=void 0;var ott=AP(),KH=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):ott.NOOP_LOGGER}};gP.ProxyLogger=KH});var Fge=Q(hP=>{"use strict";A();Object.defineProperty(hP,"__esModule",{value:!0});hP.ProxyLoggerProvider=void 0;var itt=YH(),att=Qge(),JH=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new att.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:itt.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)}};hP.ProxyLoggerProvider=JH});var jge=Q(_P=>{"use strict";A();Object.defineProperty(_P,"__esModule",{value:!0});_P.LogsAPI=void 0;var dd=Lge(),stt=YH(),Gge=Fge(),ZH=class e{constructor(){this._proxyLoggerProvider=new Gge.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return dd._global[dd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(dd._global[dd.GLOBAL_LOGS_API_KEY]=(0,dd.makeGetter)(dd.API_BACKWARDS_COMPATIBILITY_VERSION,t,stt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=dd._global[dd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(dd._global,dd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete dd._global[dd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Gge.ProxyLoggerProvider}};_P.LogsAPI=ZH});var WH=Q(Qf=>{"use strict";A();Object.defineProperty(Qf,"__esModule",{value:!0});Qf.logs=Qf.NoopLogger=Qf.NOOP_LOGGER=Qf.SeverityNumber=void 0;var utt=Uge();Object.defineProperty(Qf,"SeverityNumber",{enumerable:!0,get:function(){return utt.SeverityNumber}});var zge=AP();Object.defineProperty(Qf,"NOOP_LOGGER",{enumerable:!0,get:function(){return zge.NOOP_LOGGER}});Object.defineProperty(Qf,"NoopLogger",{enumerable:!0,get:function(){return zge.NoopLogger}});var ctt=jge();Qf.logs=ctt.LogsAPI.getInstance()});var Hge=Q(WI=>{"use strict";A();Object.defineProperty(WI,"__esModule",{value:!0});WI.disableInstrumentations=WI.enableInstrumentations=void 0;function ltt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}WI.enableInstrumentations=ltt;function dtt(e){e.forEach(t=>t.disable())}WI.disableInstrumentations=dtt});var qge=Q(EP=>{"use strict";A();Object.defineProperty(EP,"__esModule",{value:!0});EP.registerInstrumentations=void 0;var $ge=(Le(),we(Je)),ptt=WH(),Vge=Hge();function ftt(e){let t=e.tracerProvider||$ge.trace.getTracerProvider(),n=e.meterProvider||$ge.metrics.getMeterProvider(),r=e.loggerProvider||ptt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Vge.enableInstrumentations)(o,t,n,r),()=>{(0,Vge.disableInstrumentations)(o)}}EP.registerInstrumentations=ftt});var nhe=Q(SP=>{"use strict";A();Object.defineProperty(SP,"__esModule",{value:!0});SP.satisfies=void 0;var n5=(Le(),we(Je)),Wge=/^(?: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-]+)*))?$/,Att=/^(?<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-]+)*))?$/,mtt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function gtt(e,t,n){if(!htt(e))return n5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=ytt(e);if(!r)return!1;let o=[],i=Xge(r,t,o,n);return i&&!n?.includePrerelease?Ett(r,o):i}SP.satisfies=gtt;function htt(e){return typeof e=="string"&&Wge.test(e)}function Xge(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(XH(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=jtt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!XH(e,i,n,r))return!1;return!0}return XH(e,t,n,r)}function XH(e,t,n,r){if(t=Stt(t,r),t.includes(" "))return Xge(e,t,n,r);{let o=Ttt(t);return n.push(o),_tt(e,o)}}function _tt(e,t){if(t.invalid)return!1;if(!t.version||t5(t.version))return!0;let n=Kge(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=Kge(r,o)}return mtt[t.op]?.includes(n)}function Ett(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Stt(e,t){return e=e.trim(),e=Ftt(e,t),e=Qtt(e),e=Gtt(e,t),e=e.trim(),e}function Au(e){return!e||e.toLowerCase()==="x"||e==="*"}function ytt(e){let t=e.match(Wge);if(!t){n5.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 Ttt(e){if(!e)return{};let t=e.match(Att);if(!t)return n5.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 t5(e){return e==="*"||e==="x"||e==="X"}function Yge(e){let t=parseInt(e,10);return isNaN(t)?e:t}function Itt(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 Ctt(e,t){if(t5(e)||t5(t))return 0;let[n,r]=Itt(Yge(e),Yge(t));return n>r?1:n<r?-1:0}function Kge(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=Ctt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var ehe="[a-zA-Z0-9-]",the="0|[1-9]\\d*",btt=`\\d*[a-zA-Z-]${ehe}*`,vtt="((?:<|>)?=?)",Jge=`(?:${the}|${btt})`,Rtt=`(?:-(${Jge}(?:\\.${Jge})*))`,Zge=`${ehe}+`,Dtt=`(?:\\+(${Zge}(?:\\.${Zge})*))`,e5=`${the}|x|X|\\*`,n1=`[v=\\s]*(${e5})(?:\\.(${e5})(?:\\.(${e5})(?:${Rtt})?${Dtt}?)?)?`,xtt=`^${vtt}\\s*${n1}$`,Btt=new RegExp(xtt),Ntt=`^\\s*(${n1})\\s+-\\s+(${n1})\\s*$`,Ott=new RegExp(Ntt),wtt="(?:~>?)",Mtt=`^${wtt}${n1}$`,Ptt=new RegExp(Mtt),ktt="(?:\\^)",Utt=`^${ktt}${n1}$`,Ltt=new RegExp(Utt);function Qtt(e){let t=Ptt;return e.replace(t,(n,r,o,i,a)=>{let c;return Au(r)?c="":Au(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Au(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 Ftt(e,t){let n=Ltt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Au(i)?m="":Au(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Au(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Gtt(e,t){let n=Btt;return e.replace(n,(r,o,i,a,c,d)=>{let m=Au(i),h=m||Au(a),y=h||Au(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?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==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function jtt(e,t){let n=Ott;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,b,R)=>(Au(i)?o="":Au(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Au(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Au(y)?h="":Au(S)?h=`<${+y+1}.0.0-0`:Au(b)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${b}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var r5=Q(ts=>{"use strict";A();Object.defineProperty(ts,"__esModule",{value:!0});ts.massUnwrap=ts.unwrap=ts.massWrap=ts.wrap=void 0;var mu=console.error.bind(console);function r1(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var ztt=(e,t,n)=>{if(!e||!e[t]){mu("no original function "+String(t)+" to wrap");return}if(!n){mu("no wrapper function"),mu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){mu("original object and wrapper must be functions");return}let o=n(r,t);return r1(o,"__original",r),r1(o,"__unwrap",()=>{e[t]===o&&r1(e,t,r)}),r1(o,"__wrapped",!0),r1(e,t,o),o};ts.wrap=ztt;var Htt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{mu("must provide one or more modules to patch"),mu(new Error().stack);return}if(!(t&&Array.isArray(t))){mu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ts.wrap)(r,o,n)})})};ts.massWrap=Htt;var $tt=(e,t)=>{if(!e||!e[t]){mu("no function to unwrap."),mu(new Error().stack);return}let n=e[t];if(!n.__unwrap)mu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ts.unwrap=$tt;var Vtt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{mu("must provide one or more modules to patch"),mu(new Error().stack);return}if(!(t&&Array.isArray(t))){mu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ts.unwrap)(n,r)})})};ts.massUnwrap=Vtt;function o1(e){e&&e.logger&&(typeof e.logger!="function"?mu("new logger isn't a function, not replacing"):mu=e.logger)}ts.default=o1;o1.wrap=ts.wrap;o1.massWrap=ts.massWrap;o1.unwrap=ts.unwrap;o1.massUnwrap=ts.massUnwrap});var rhe=Q(TP=>{"use strict";A();Object.defineProperty(TP,"__esModule",{value:!0});TP.InstrumentationAbstract=void 0;var o5=(Le(),we(Je)),qtt=WH(),yP=r5(),i5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=o5.diag.createComponentLogger({namespace:t}),this._tracer=o5.trace.getTracer(t,n),this._meter=o5.metrics.getMeter(t,n),this._logger=qtt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=yP.wrap;_unwrap=yP.unwrap;_massWrap=yP.massWrap;_massUnwrap=yP.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)}}};TP.InstrumentationAbstract=i5});var ihe=Q((R8t,ohe)=>{A();var XI=1e3,eC=XI*60,tC=eC*60,Q0=tC*24,Ytt=Q0*7,Ktt=Q0*365.25;ohe.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Jtt(e);if(n==="number"&&isFinite(e))return t.long?Wtt(e):Ztt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Jtt(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*Ktt;case"weeks":case"week":case"w":return n*Ytt;case"days":case"day":case"d":return n*Q0;case"hours":case"hour":case"hrs":case"hr":case"h":return n*tC;case"minutes":case"minute":case"mins":case"min":case"m":return n*eC;case"seconds":case"second":case"secs":case"sec":case"s":return n*XI;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function Ztt(e){var t=Math.abs(e);return t>=Q0?Math.round(e/Q0)+"d":t>=tC?Math.round(e/tC)+"h":t>=eC?Math.round(e/eC)+"m":t>=XI?Math.round(e/XI)+"s":e+"ms"}function Wtt(e){var t=Math.abs(e);return t>=Q0?IP(e,t,Q0,"day"):t>=tC?IP(e,t,tC,"hour"):t>=eC?IP(e,t,eC,"minute"):t>=XI?IP(e,t,XI,"second"):e+" ms"}function IP(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var a5=Q((x8t,ahe)=>{A();function Xtt(e){n.debug=n,n.default=n,n.coerce=d,n.disable=a,n.enable=o,n.enabled=c,n.humanize=ihe(),n.destroy=m,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,R;function B(...N){if(!B.enabled)return;let M=B,F=Number(new Date),$=F-(y||F);M.diff=$,M.prev=y,M.curr=F,y=F,N[0]=n.coerce(N[0]),typeof N[0]!="string"&&N.unshift("%O");let H=0;N[0]=N[0].replace(/%([a-zA-Z%])/g,(fe,he)=>{if(fe==="%%")return"%";H++;let ve=n.formatters[he];if(typeof ve=="function"){let Te=N[H];fe=ve.call(M,Te),N.splice(H,1),H--}return fe}),n.formatArgs.call(M,N),(M.log||n.log).apply(M,N)}return B.namespace=h,B.useColors=n.useColors(),B.color=n.selectColor(h),B.extend=r,B.destroy=n.destroy,Object.defineProperty(B,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,R=n.enabled(h)),R),set:N=>{S=N}}),typeof n.init=="function"&&n.init(B),B}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,R=-1,B=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(R=b,B=S,b++):(S++,b++);else if(R!==-1)b=R+1,B++,S=B;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 d(h){return h instanceof Error?h.stack||h.message:h}function m(){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}ahe.exports=Xtt});var she=Q((cc,CP)=>{A();cc.formatArgs=tnt;cc.save=nnt;cc.load=rnt;cc.useColors=ent;cc.storage=ont();cc.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`."))}})();cc.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 ent(){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 tnt(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+CP.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)}cc.log=console.debug||console.log||(()=>{});function nnt(e){try{e?cc.storage.setItem("debug",e):cc.storage.removeItem("debug")}catch{}}function rnt(){let e;try{e=cc.storage.getItem("debug")||cc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ont(){try{return localStorage}catch{}}CP.exports=a5()(cc);var{formatters:int}=CP.exports;int.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var che=Q((O8t,uhe)=>{"use strict";A();uhe.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 phe=Q((M8t,dhe)=>{"use strict";A();var ant=Ue("os"),lhe=Ue("tty"),pd=che(),{env:Ca}=process,_h;pd("no-color")||pd("no-colors")||pd("color=false")||pd("color=never")?_h=0:(pd("color")||pd("colors")||pd("color=true")||pd("color=always"))&&(_h=1);"FORCE_COLOR"in Ca&&(Ca.FORCE_COLOR==="true"?_h=1:Ca.FORCE_COLOR==="false"?_h=0:_h=Ca.FORCE_COLOR.length===0?1:Math.min(parseInt(Ca.FORCE_COLOR,10),3));function s5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function u5(e,t){if(_h===0)return 0;if(pd("color=16m")||pd("color=full")||pd("color=truecolor"))return 3;if(pd("color=256"))return 2;if(e&&!t&&_h===void 0)return 0;let n=_h||0;if(Ca.TERM==="dumb")return n;if(process.platform==="win32"){let r=ant.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Ca)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Ca)||Ca.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Ca)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Ca.TEAMCITY_VERSION)?1:0;if(Ca.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Ca){let r=parseInt((Ca.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Ca.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Ca.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Ca.TERM)||"COLORTERM"in Ca?1:n}function snt(e){let t=u5(e,e&&e.isTTY);return s5(t)}dhe.exports={supportsColor:snt,stdout:s5(u5(!0,lhe.isatty(1))),stderr:s5(u5(!0,lhe.isatty(2)))}});var Ahe=Q((ba,vP)=>{A();var unt=Ue("tty"),bP=Ue("util");ba.init=mnt;ba.log=pnt;ba.formatArgs=lnt;ba.save=fnt;ba.load=Ant;ba.useColors=cnt;ba.destroy=bP.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");ba.colors=[6,2,3,4,5,1];try{let e=phe();e&&(e.stderr||e).level>=2&&(ba.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{}ba.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 cnt(){return"colors"in ba.inspectOpts?!!ba.inspectOpts.colors:unt.isatty(process.stderr.fd)}function lnt(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+"+vP.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=dnt()+t+" "+e[0]}function dnt(){return ba.inspectOpts.hideDate?"":new Date().toISOString()+" "}function pnt(...e){return process.stderr.write(bP.formatWithOptions(ba.inspectOpts,...e)+`
|
|
6
6
|
`)}function fnt(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function Ant(){return process.env.DEBUG}function mnt(e){e.inspectOpts={};let t=Object.keys(ba.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=ba.inspectOpts[t[n]]}vP.exports=a5()(ba);var{formatters:fhe}=vP.exports;fhe.o=function(e){return this.inspectOpts.colors=this.useColors,bP.inspect(e,this.inspectOpts).split(`
|
|
@@ -35,7 +35,7 @@ Url: ${Uk(e)}`),!0}return!1}function Rit(e,t){return t?.length?Ok(e).some(n=>Rh(
|
|
|
35
35
|
`);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let a=o.substring(0,i).toLowerCase(),c=o.substring(i+1).trim(),d=n.get(a);d&&Array.isArray(d)?d.push(c):d?n.set(a,[d,c]):n.set(a,c)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,EB.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),fe=>fe&&this._diag.error("caught ignoreRequestHook error: ",fe),!0))return;let i=(0,bL.hrTime)(),a;try{a=new Cpt.URL(t.path,t.origin)}catch(fe){this._diag.warn("could not determine url.full:",fe);return}let c=a.protocol.replace(":",""),d=this.getRequestMethod(t.method),m={[Li.ATTR_HTTP_REQUEST_METHOD]:d,[Li.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[Li.ATTR_URL_FULL]:a.toString(),[Li.ATTR_URL_PATH]:a.pathname,[Li.ATTR_URL_QUERY]:a.search,[Li.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},y=a.hostname,S=a.port||h[c];m[Li.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(m[Li.ATTR_SERVER_PORT]=Number(S));let R=this.parseRequestHeaders(t).get("user-agent");if(R){let fe=Array.isArray(R)?R[R.length-1]:R;m[Li.ATTR_USER_AGENT_ORIGINAL]=fe}let B=(0,EB.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),fe=>fe&&this._diag.error("caught startSpanHook error: ",fe),!0);B&&Object.entries(B).forEach(([fe,he])=>{m[fe]=he});let N=ml.context.active(),M=ml.trace.getSpan(N),F;n.requireParentforSpans&&(!M||!ml.trace.isSpanContextValid(M.spanContext()))?F=ml.trace.wrapSpanContext(ml.INVALID_SPAN_CONTEXT):F=this.tracer.startSpan(d==="_OTHER"?"HTTP":d,{kind:ml.SpanKind.CLIENT,attributes:m},N),(0,EB.safeExecuteInTheMiddle)(()=>n.requestHook?.(F,t),fe=>fe&&this._diag.error("caught requestHook error: ",fe),!0);let $=ml.trace.setSpan(ml.context.active(),F),H={};ml.propagation.inject($,H);let re=Object.entries(H);for(let fe=0;fe<re.length;fe++){let[he,ve]=re[fe];typeof t.addHeader=="function"?t.addHeader(he,ve):typeof t.headers=="string"?t.headers+=`${he}: ${ve}\r
|
|
36
36
|
`:Array.isArray(t.headers)&&t.headers.push(he,ve)}this._recordFromReq.set(t,{span:F,attributes:m,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:a,remotePort:c}=n,d={[Li.ATTR_NETWORK_PEER_ADDRESS]:a,[Li.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let m=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(m.has(y)){let b=Array.isArray(S)?S:[S];d[`http.request.header.${y}`]=b}}i.setAttributes(d)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,a={[Li.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,EB.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),d=>d&&this._diag.error("caught responseHook error: ",d),!0),c.headersToSpanAttributes?.responseHeaders){let d=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(m=>d.add(m.toLowerCase()));for(let m=0;m<n.headers.length;m=m+2){let h=n.headers[m].toString().toLowerCase(),y=n.headers[m+1];if(d.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?ml.SpanStatusCode.ERROR:ml.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,a)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:a}=r;o.recordException(n),o.setStatus({code:ml.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[Li.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,a)}recordRequestDuration(t,n){let r={};[Li.ATTR_HTTP_RESPONSE_STATUS_CODE,Li.ATTR_HTTP_REQUEST_METHOD,Li.ATTR_SERVER_ADDRESS,Li.ATTR_SERVER_PORT,Li.ATTR_URL_SCHEME,Li.ATTR_ERROR_TYPE].forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,bL.hrTimeToMilliseconds)((0,bL.hrTimeDuration)(n,(0,bL.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"}};vL.UndiciInstrumentation=Cq});var Ibe=Q(RL=>{"use strict";A();Object.defineProperty(RL,"__esModule",{value:!0});RL.UndiciInstrumentation=void 0;var bpt=Tbe();Object.defineProperty(RL,"UndiciInstrumentation",{enumerable:!0,get:function(){return bpt.UndiciInstrumentation}})});function Cbe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function xpt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&Ei(t)}function Bpt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=Cbe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=Cbe(n.origin,n.path);if(r.startsWith("data:")){let o=wC(r);return{[Nt]:"auto.http.otel.node_fetch","http.url":o,[Mh]:o,[gd]:`${n.method||"GET"} ${o}`}}return{[Nt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var bbe,vbe,vpt,Rpt,Dpt,Rbe,Dbe=O(()=>{A();bbe=ue(Ibe(),1);dt();pr();vbe="NodeFetch",vpt=it(vbe,bbe.UndiciInstrumentation,e=>Bpt(e)),Rpt=it(`${vbe}.sentry`,uS,e=>e),Dpt=(e={})=>({name:"NodeFetch",setupOnce(){xpt(e,_t()?.getOptions())&&vpt(e),Rpt(e)}}),Rbe=Dpt});var DL=Q(SB=>{"use strict";A();Object.defineProperty(SB,"__esModule",{value:!0});SB.ExpressLayerType=void 0;var Npt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(Npt=SB.ExpressLayerType||(SB.ExpressLayerType={}))});var xL=Q(yB=>{"use strict";A();Object.defineProperty(yB,"__esModule",{value:!0});yB.AttributeNames=void 0;var Opt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(Opt=yB.AttributeNames||(yB.AttributeNames={}))});var bq=Q(cb=>{"use strict";A();Object.defineProperty(cb,"__esModule",{value:!0});cb._LAYERS_STORE_PROPERTY=cb.kLayerPatched=void 0;cb.kLayerPatched=Symbol("express-layer-patched");cb._LAYERS_STORE_PROPERTY="__ot_middlewares"});var Nbe=Q(Qi=>{"use strict";A();Object.defineProperty(Qi,"__esModule",{value:!0});Qi.getActualMatchedRoute=Qi.getConstructedRoute=Qi.getLayerPath=Qi.asErrorAndMessage=Qi.isLayerIgnored=Qi.getLayerMetadata=Qi.getRouterPath=Qi.storeLayerPath=void 0;var vq=DL(),lb=xL(),fS=bq(),wpt=(e,t)=>(Array.isArray(e[fS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,fS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[fS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));Qi.storeLayerPath=wpt;var Mpt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,Qi.getRouterPath)(e,n):e};Qi.getRouterPath=Mpt;var Ppt=(e,t,n)=>{if(t.name==="router"){let r=(0,Qi.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[lb.AttributeNames.EXPRESS_NAME]:o,[lb.AttributeNames.EXPRESS_TYPE]:vq.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[lb.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[lb.AttributeNames.EXPRESS_TYPE]:vq.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[lb.AttributeNames.EXPRESS_NAME]:t.name,[lb.AttributeNames.EXPRESS_TYPE]:vq.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};Qi.getLayerMetadata=Ppt;var kpt=(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")},Upt=(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(kpt(e,r))return!0}catch{}return!1};Qi.isLayerIgnored=Upt;var Lpt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];Qi.asErrorAndMessage=Lpt;var Qpt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>xbe(n)||"").join(","):xbe(t)};Qi.getLayerPath=Qpt;var xbe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function Bbe(e){let n=(Array.isArray(e[fS._LAYERS_STORE_PROPERTY])?e[fS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}Qi.getConstructedRoute=Bbe;function Fpt(e){let t=Array.isArray(e[fS._LAYERS_STORE_PROPERTY])?e[fS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=Bbe(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)||Gpt(r))?r:void 0}Qi.getActualMatchedRoute=Fpt;function Gpt(e){return e.includes(":")||e.includes("*")}});var Obe=Q(db=>{"use strict";A();Object.defineProperty(db,"__esModule",{value:!0});db.PACKAGE_NAME=db.PACKAGE_VERSION=void 0;db.PACKAGE_VERSION="0.62.0";db.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var Ube=Q(NL=>{"use strict";A();Object.defineProperty(NL,"__esModule",{value:!0});NL.ExpressInstrumentation=void 0;var wbe=hr(),mc=(Le(),we(Je)),Mbe=DL(),Pbe=xL(),rA=Nbe(),kbe=Obe(),pb=Xt(),jpt=($n(),we(Nr)),BL=bq(),Rq=class extends pb.InstrumentationBase{constructor(t={}){super(kbe.PACKAGE_NAME,kbe.PACKAGE_VERSION,t)}init(){return[new pb.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,pb.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,pb.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,pb.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,rA.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,rA.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let a=t?this.router:this._router,c=r.apply(this,i);if(a){let d=a.stack[a.stack.length-1];n._applyPatch(d,(0,rA.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[BL.kLayerPatched]!==!0&&(t[BL.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(a,c){let{isLayerPathStored:d}=(0,rA.storeLayerPath)(a,n),m=(0,rA.getConstructedRoute)(a),h=(0,rA.getActualMatchedRoute)(a),y={[jpt.ATTR_HTTP_ROUTE]:h},S=(0,rA.getLayerMetadata)(m,t,n),b=S.attributes[Pbe.AttributeNames.EXPRESS_TYPE],R=(0,wbe.getRPCMetadata)(mc.context.active());if(R?.type===wbe.RPCType.HTTP&&(R.route=h),(0,rA.isLayerIgnored)(S.name,b,r.getConfig()))return b===Mbe.ExpressLayerType.MIDDLEWARE&&a[BL._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(mc.trace.getSpan(mc.context.active())===void 0)return o.apply(this,arguments);let B=r._getSpanName({request:a,layerType:b,route:m},S.name),N=r.tracer.startSpan(B,{attributes:Object.assign(y,S.attributes)}),M=mc.context.active(),F=mc.trace.setSpan(M,N),{requestHook:$}=r.getConfig();$&&(0,pb.safeExecuteInTheMiddle)(()=>$(N,{request:a,layerType:b,route:m}),ve=>{ve&&mc.diag.error("express instrumentation: request hook failed",ve)},!0);let H=!1;S.attributes[Pbe.AttributeNames.EXPRESS_TYPE]===Mbe.ExpressLayerType.ROUTER&&(N.end(),H=!0,F=M);let re=()=>{H===!1&&(H=!0,N.end())},fe=Array.from(arguments),he=fe.findIndex(ve=>typeof ve=="function");he>=0&&(arguments[he]=function(){let ve=arguments[0],Te=![void 0,null,"route","router"].includes(ve);if(!H&&Te){let[Tn,Ce]=(0,rA.asErrorAndMessage)(ve);N.recordException(Tn),N.setStatus({code:mc.SpanStatusCode.ERROR,message:Ce})}H===!1&&(H=!0,a.res?.removeListener("finish",re),N.end()),!(a.route&&Te)&&d&&a[BL._LAYERS_STORE_PROPERTY].pop();let tt=fe[he],Pt=mc.context.active(),nt=mc.trace.getSpan(M),Kt=nt?mc.trace.setSpan(Pt,nt):Pt;return mc.context.bind(Kt,tt).apply(this,arguments)});try{return mc.context.bind(F,o).apply(this,arguments)}catch(ve){let[Te,tt]=(0,rA.asErrorAndMessage)(ve);throw N.recordException(Te),N.setStatus({code:mc.SpanStatusCode.ERROR,message:tt}),ve}finally{H||c.once("finish",re)}};for(let a in o)Object.defineProperty(i,a,{get(){return o[a]},set(c){o[a]=c}});return i}))}_getSpanName(t,n){let{spanNameHook:r}=this.getConfig();if(!(r instanceof Function))return n;try{return r(t,n)??n}catch(o){return mc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};NL.ExpressInstrumentation=Rq});var Lbe=Q(t_=>{"use strict";A();Object.defineProperty(t_,"__esModule",{value:!0});t_.AttributeNames=t_.ExpressLayerType=t_.ExpressInstrumentation=void 0;var zpt=Ube();Object.defineProperty(t_,"ExpressInstrumentation",{enumerable:!0,get:function(){return zpt.ExpressInstrumentation}});var Hpt=DL();Object.defineProperty(t_,"ExpressLayerType",{enumerable:!0,get:function(){return Hpt.ExpressLayerType}});var $pt=xL();Object.defineProperty(t_,"AttributeNames",{enumerable:!0,get:function(){return $pt.AttributeNames}})});var sa,AS=O(()=>{A();sa=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function Vpt(e){Or(e,"auto.http.otel.express");let t=xt(e).data,n=t["express.type"];n&&e.setAttribute(Yt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function qpt(e,t){if(Nn()===md())return sa&&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";Nn().setTransactionName(`${r} ${e.route}`)}return t}var Qbe,Fbe,Gbe,Ypt,jbe,zbe=O(()=>{A();Qbe=ue(Lbe(),1);dt();pr();AS();Fbe="Express";Gbe=it(Fbe,()=>new Qbe.ExpressInstrumentation({requestHook:e=>Vpt(e),spanNameHook:(e,t)=>qpt(e,t)})),Ypt=()=>({name:Fbe,setupOnce(){Gbe()}}),jbe=Ypt});var Hbe=Q(TB=>{"use strict";A();Object.defineProperty(TB,"__esModule",{value:!0});TB.SeverityNumber=void 0;var Kpt;(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"})(Kpt=TB.SeverityNumber||(TB.SeverityNumber={}))});var ML=Q(fb=>{"use strict";A();Object.defineProperty(fb,"__esModule",{value:!0});fb.NOOP_LOGGER=fb.NoopLogger=void 0;var wL=class{emit(t){}};fb.NoopLogger=wL;fb.NOOP_LOGGER=new wL});var $be=Q(oA=>{"use strict";A();Object.defineProperty(oA,"__esModule",{value:!0});oA.API_BACKWARDS_COMPATIBILITY_VERSION=oA.makeGetter=oA._global=oA.GLOBAL_LOGS_API_KEY=void 0;oA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");oA._global=globalThis;function Jpt(e,t,n){return r=>r===e?t:n}oA.makeGetter=Jpt;oA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var Dq=Q(Ab=>{"use strict";A();Object.defineProperty(Ab,"__esModule",{value:!0});Ab.NOOP_LOGGER_PROVIDER=Ab.NoopLoggerProvider=void 0;var Zpt=ML(),PL=class{getLogger(t,n,r){return new Zpt.NoopLogger}};Ab.NoopLoggerProvider=PL;Ab.NOOP_LOGGER_PROVIDER=new PL});var Vbe=Q(kL=>{"use strict";A();Object.defineProperty(kL,"__esModule",{value:!0});kL.ProxyLogger=void 0;var Wpt=ML(),xq=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):Wpt.NOOP_LOGGER}};kL.ProxyLogger=xq});var qbe=Q(UL=>{"use strict";A();Object.defineProperty(UL,"__esModule",{value:!0});UL.ProxyLoggerProvider=void 0;var Xpt=Dq(),eft=Vbe(),Bq=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new eft.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:Xpt.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)}};UL.ProxyLoggerProvider=Bq});var Kbe=Q(LL=>{"use strict";A();Object.defineProperty(LL,"__esModule",{value:!0});LL.LogsAPI=void 0;var Td=$be(),tft=Dq(),Ybe=qbe(),Nq=class e{constructor(){this._proxyLoggerProvider=new Ybe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Td._global[Td.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Td._global[Td.GLOBAL_LOGS_API_KEY]=(0,Td.makeGetter)(Td.API_BACKWARDS_COMPATIBILITY_VERSION,t,tft.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Td._global[Td.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Td._global,Td.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Td._global[Td.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new Ybe.ProxyLoggerProvider}};LL.LogsAPI=Nq});var Oq=Q(iA=>{"use strict";A();Object.defineProperty(iA,"__esModule",{value:!0});iA.logs=iA.NoopLogger=iA.NOOP_LOGGER=iA.SeverityNumber=void 0;var nft=Hbe();Object.defineProperty(iA,"SeverityNumber",{enumerable:!0,get:function(){return nft.SeverityNumber}});var Jbe=ML();Object.defineProperty(iA,"NOOP_LOGGER",{enumerable:!0,get:function(){return Jbe.NOOP_LOGGER}});Object.defineProperty(iA,"NoopLogger",{enumerable:!0,get:function(){return Jbe.NoopLogger}});var rft=Kbe();iA.logs=rft.LogsAPI.getInstance()});var Zbe=Q(mb=>{"use strict";A();Object.defineProperty(mb,"__esModule",{value:!0});mb.disableInstrumentations=mb.enableInstrumentations=void 0;function oft(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()}}mb.enableInstrumentations=oft;function ift(e){e.forEach(t=>t.disable())}mb.disableInstrumentations=ift});var eve=Q(QL=>{"use strict";A();Object.defineProperty(QL,"__esModule",{value:!0});QL.registerInstrumentations=void 0;var Wbe=(Le(),we(Je)),aft=Oq(),Xbe=Zbe();function sft(e){let t=e.tracerProvider||Wbe.trace.getTracerProvider(),n=e.meterProvider||Wbe.metrics.getMeterProvider(),r=e.loggerProvider||aft.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Xbe.enableInstrumentations)(o,t,n,r),()=>{(0,Xbe.disableInstrumentations)(o)}}QL.registerInstrumentations=sft});var cve=Q(FL=>{"use strict";A();Object.defineProperty(FL,"__esModule",{value:!0});FL.satisfies=void 0;var kq=(Le(),we(Je)),ive=/^(?: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-]+)*))?$/,uft=/^(?<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-]+)*))?$/,cft={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function lft(e,t,n){if(!dft(e))return kq.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=mft(e);if(!r)return!1;let o=[],i=ave(r,t,o,n);return i&&!n?.includePrerelease?fft(r,o):i}FL.satisfies=lft;function dft(e){return typeof e=="string"&&ive.test(e)}function ave(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(wq(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=kft(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!wq(e,i,n,r))return!1;return!0}return wq(e,t,n,r)}function wq(e,t,n,r){if(t=Aft(t,r),t.includes(" "))return ave(e,t,n,r);{let o=gft(t);return n.push(o),pft(e,o)}}function pft(e,t){if(t.invalid)return!1;if(!t.version||Pq(t.version))return!0;let n=nve(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=nve(r,o)}return cft[t.op]?.includes(n)}function fft(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Aft(e,t){return e=e.trim(),e=Mft(e,t),e=wft(e),e=Pft(e,t),e=e.trim(),e}function Tu(e){return!e||e.toLowerCase()==="x"||e==="*"}function mft(e){let t=e.match(ive);if(!t){kq.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 gft(e){if(!e)return{};let t=e.match(uft);if(!t)return kq.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 Pq(e){return e==="*"||e==="x"||e==="X"}function tve(e){let t=parseInt(e,10);return isNaN(t)?e:t}function hft(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 _ft(e,t){if(Pq(e)||Pq(t))return 0;let[n,r]=hft(tve(e),tve(t));return n>r?1:n<r?-1:0}function nve(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=_ft(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var sve="[a-zA-Z0-9-]",uve="0|[1-9]\\d*",Eft=`\\d*[a-zA-Z-]${sve}*`,Sft="((?:<|>)?=?)",rve=`(?:${uve}|${Eft})`,yft=`(?:-(${rve}(?:\\.${rve})*))`,ove=`${sve}+`,Tft=`(?:\\+(${ove}(?:\\.${ove})*))`,Mq=`${uve}|x|X|\\*`,IB=`[v=\\s]*(${Mq})(?:\\.(${Mq})(?:\\.(${Mq})(?:${yft})?${Tft}?)?)?`,Ift=`^${Sft}\\s*${IB}$`,Cft=new RegExp(Ift),bft=`^\\s*(${IB})\\s+-\\s+(${IB})\\s*$`,vft=new RegExp(bft),Rft="(?:~>?)",Dft=`^${Rft}${IB}$`,xft=new RegExp(Dft),Bft="(?:\\^)",Nft=`^${Bft}${IB}$`,Oft=new RegExp(Nft);function wft(e){let t=xft;return e.replace(t,(n,r,o,i,a)=>{let c;return Tu(r)?c="":Tu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Tu(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 Mft(e,t){let n=Oft,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return Tu(i)?m="":Tu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Tu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function Pft(e,t){let n=Cft;return e.replace(n,(r,o,i,a,c,d)=>{let m=Tu(i),h=m||Tu(a),y=h||Tu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?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==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function kft(e,t){let n=vft;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,b,R)=>(Tu(i)?o="":Tu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Tu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Tu(y)?h="":Tu(S)?h=`<${+y+1}.0.0-0`:Tu(b)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${b}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var Uq=Q(us=>{"use strict";A();Object.defineProperty(us,"__esModule",{value:!0});us.massUnwrap=us.unwrap=us.massWrap=us.wrap=void 0;var Iu=console.error.bind(console);function CB(e,t,n){let r=!!e[t]&&Object.prototype.propertyIsEnumerable.call(e,t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}var Uft=(e,t,n)=>{if(!e||!e[t]){Iu("no original function "+String(t)+" to wrap");return}if(!n){Iu("no wrapper function"),Iu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Iu("original object and wrapper must be functions");return}let o=n(r,t);return CB(o,"__original",r),CB(o,"__unwrap",()=>{e[t]===o&&CB(e,t,r)}),CB(o,"__wrapped",!0),CB(e,t,o),o};us.wrap=Uft;var Lft=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Iu("must provide one or more modules to patch"),Iu(new Error().stack);return}if(!(t&&Array.isArray(t))){Iu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,us.wrap)(r,o,n)})})};us.massWrap=Lft;var Qft=(e,t)=>{if(!e||!e[t]){Iu("no function to unwrap."),Iu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Iu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};us.unwrap=Qft;var Fft=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Iu("must provide one or more modules to patch"),Iu(new Error().stack);return}if(!(t&&Array.isArray(t))){Iu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,us.unwrap)(n,r)})})};us.massUnwrap=Fft;function bB(e){e&&e.logger&&(typeof e.logger!="function"?Iu("new logger isn't a function, not replacing"):Iu=e.logger)}us.default=bB;bB.wrap=us.wrap;bB.massWrap=us.massWrap;bB.unwrap=us.unwrap;bB.massUnwrap=us.massUnwrap});var lve=Q(jL=>{"use strict";A();Object.defineProperty(jL,"__esModule",{value:!0});jL.InstrumentationAbstract=void 0;var Lq=(Le(),we(Je)),Gft=Oq(),GL=Uq(),Qq=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=Lq.diag.createComponentLogger({namespace:t}),this._tracer=Lq.trace.getTracer(t,n),this._meter=Lq.metrics.getMeter(t,n),this._logger=Gft.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=GL.wrap;_unwrap=GL.unwrap;_massWrap=GL.massWrap;_massUnwrap=GL.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)}}};jL.InstrumentationAbstract=Qq});var dve=Q(n_=>{"use strict";A();Object.defineProperty(n_,"__esModule",{value:!0});n_.ModuleNameTrie=n_.ModuleNameSeparator=void 0;n_.ModuleNameSeparator="/";var zL=class{hooks=[];children=new Map},Fq=class{_trie=new zL;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(n_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new zL,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(n_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};n_.ModuleNameTrie=Fq});var fve=Q(HL=>{"use strict";A();Object.defineProperty(HL,"__esModule",{value:!0});HL.RequireInTheMiddleSingleton=void 0;var jft=F0(),pve=Ue("path"),Gq=dve(),zft=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),jq=class e{_moduleNameTrie=new Gq.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new jft.Hook(null,{internals:!0},(t,n,r)=>{let o=Hft(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 zft?new e:this._instance=this._instance??new e}};HL.RequireInTheMiddleSingleton=jq;function Hft(e){return pve.sep!==Gq.ModuleNameSeparator?e.split(pve.sep).join(Gq.ModuleNameSeparator):e}});var _ve=Q(vB=>{A();var Ave=[],zq=new WeakMap,mve=new WeakMap,gve=new Map,hve=[],$ft={set(e,t,n){let r=zq.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=mve.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=zq.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function Vft(e,t,n,r,o){gve.set(e,o),zq.set(t,n),mve.set(t,r);let i=new Proxy(t,$ft);Ave.forEach(a=>a(e,i,o)),hve.push([e,i,o])}vB.register=Vft;vB.importHooks=Ave;vB.specifiers=gve;vB.toHook=hve});var qq=Q((Ean,hb)=>{A();var Eve=Ue("path"),qft=RP(),{fileURLToPath:Yft}=Ue("url"),{MessageChannel:Kft}=Ue("worker_threads"),{isBuiltin:Hq}=Ue("module");Hq||(Hq=()=>!0);var{importHooks:$q,specifiers:Jft,toHook:Zft}=_ve();function Sve(e){$q.push(e),Zft.forEach(([t,n,r])=>e(t,n,r))}function yve(e){let t=$q.indexOf(e);t>-1&&$q.splice(t,1)}function gb(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var Vq;function Wft(){let{port1:e,port2:t}=new Kft,n=0,r;Vq=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),d=new Promise(m=>{r=m}).then(()=>{clearInterval(c)});return n===0&&r(),d}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function RB(e,t,n){if(!(this instanceof RB))return new RB(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;Vq&&Array.isArray(e)&&Vq(e),this._iitmHook=(o,i,a)=>{let c=o,d=c.startsWith("node:"),m,h;if(d){let y=o.slice(5);Hq(y)&&(o=y)}else if(c.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{m=Yft(o),o=m}catch{}if(Error.stackTraceLimit=y,m){let S=qft(m);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(m&&y===m)gb(n,i,m,void 0);else if(y===o){if(!h)gb(n,i,o,h);else if(h.endsWith(Jft.get(c)))gb(n,i,o,h);else if(r){let S=o+Eve.sep+Eve.relative(h,m);gb(n,i,S,h)}}else y===a&&gb(n,i,a,h);else gb(n,i,o,h)},Sve(this._iitmHook)}RB.prototype.unhook=function(){yve(this._iitmHook)};hb.exports=RB;hb.exports.Hook=RB;hb.exports.addHook=Sve;hb.exports.removeHook=yve;hb.exports.createAddHookMessageChannel=Wft});var Yq=Q(r_=>{"use strict";A();Object.defineProperty(r_,"__esModule",{value:!0});r_.isWrapped=r_.safeExecuteInTheMiddleAsync=r_.safeExecuteInTheMiddle=void 0;function Xft(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}r_.safeExecuteInTheMiddle=Xft;async function eAt(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}}r_.safeExecuteInTheMiddleAsync=eAt;function tAt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}r_.isWrapped=tAt});var Cve=Q($L=>{"use strict";A();Object.defineProperty($L,"__esModule",{value:!0});$L.InstrumentationBase=void 0;var DB=Ue("path"),Tve=Ue("util"),nAt=cve(),Kq=Uq(),rAt=lve(),oAt=fve(),iAt=qq(),xB=(Le(),we(Je)),aAt=F0(),sAt=Ue("fs"),uAt=Yq(),Jq=class extends rAt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=oAt.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,uAt.isWrapped)(t[n])&&this._unwrap(t,n),Tve.types.isProxy(t)){let o=(0,Kq.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,Kq.wrap)(t,n,r)};_unwrap=(t,n)=>Tve.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,Kq.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{xB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xB.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{xB.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){xB.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=Ue.resolve(n);Ue.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,sAt.readFileSync)(DB.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{xB.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 Ive(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=DB.normalize(r);return a.filter(m=>m.name===c&&Ive(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,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(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&DB.isAbsolute(c)){let m=DB.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=DB.isAbsolute(t.name)?new aAt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new iAt.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}};$L.InstrumentationBase=Jq;function Ive(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,nAt.satisfies)(t,r,{includePrerelease:n}))}});var bve=Q(VL=>{"use strict";A();Object.defineProperty(VL,"__esModule",{value:!0});VL.normalize=void 0;var cAt=Ue("path");Object.defineProperty(VL,"normalize",{enumerable:!0,get:function(){return cAt.normalize}})});var vve=Q(_b=>{"use strict";A();Object.defineProperty(_b,"__esModule",{value:!0});_b.normalize=_b.InstrumentationBase=void 0;var lAt=Cve();Object.defineProperty(_b,"InstrumentationBase",{enumerable:!0,get:function(){return lAt.InstrumentationBase}});var dAt=bve();Object.defineProperty(_b,"normalize",{enumerable:!0,get:function(){return dAt.normalize}})});var Zq=Q(Eb=>{"use strict";A();Object.defineProperty(Eb,"__esModule",{value:!0});Eb.normalize=Eb.InstrumentationBase=void 0;var Rve=vve();Object.defineProperty(Eb,"InstrumentationBase",{enumerable:!0,get:function(){return Rve.InstrumentationBase}});Object.defineProperty(Eb,"normalize",{enumerable:!0,get:function(){return Rve.normalize}})});var Dve=Q(qL=>{"use strict";A();Object.defineProperty(qL,"__esModule",{value:!0});qL.InstrumentationNodeModuleDefinition=void 0;var Wq=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}};qL.InstrumentationNodeModuleDefinition=Wq});var xve=Q(YL=>{"use strict";A();Object.defineProperty(YL,"__esModule",{value:!0});YL.InstrumentationNodeModuleFile=void 0;var pAt=Zq(),Xq=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,pAt.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};YL.InstrumentationNodeModuleFile=Xq});var Bve=Q(mS=>{"use strict";A();Object.defineProperty(mS,"__esModule",{value:!0});mS.semconvStabilityFromStr=mS.SemconvStability=void 0;var KL;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(KL=mS.SemconvStability||(mS.SemconvStability={}));function fAt(e,t){let n=KL.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=KL.DUPLICATE;break}else o.toLowerCase()===e&&(n=KL.STABLE);return n}mS.semconvStabilityFromStr=fAt});var Ove=Q(Fi=>{"use strict";A();Object.defineProperty(Fi,"__esModule",{value:!0});Fi.semconvStabilityFromStr=Fi.SemconvStability=Fi.safeExecuteInTheMiddleAsync=Fi.safeExecuteInTheMiddle=Fi.isWrapped=Fi.InstrumentationNodeModuleFile=Fi.InstrumentationNodeModuleDefinition=Fi.InstrumentationBase=Fi.registerInstrumentations=void 0;var AAt=eve();Object.defineProperty(Fi,"registerInstrumentations",{enumerable:!0,get:function(){return AAt.registerInstrumentations}});var mAt=Zq();Object.defineProperty(Fi,"InstrumentationBase",{enumerable:!0,get:function(){return mAt.InstrumentationBase}});var gAt=Dve();Object.defineProperty(Fi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return gAt.InstrumentationNodeModuleDefinition}});var hAt=xve();Object.defineProperty(Fi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return hAt.InstrumentationNodeModuleFile}});var e7=Yq();Object.defineProperty(Fi,"isWrapped",{enumerable:!0,get:function(){return e7.isWrapped}});Object.defineProperty(Fi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return e7.safeExecuteInTheMiddle}});Object.defineProperty(Fi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return e7.safeExecuteInTheMiddleAsync}});var Nve=Bve();Object.defineProperty(Fi,"SemconvStability",{enumerable:!0,get:function(){return Nve.SemconvStability}});Object.defineProperty(Fi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return Nve.semconvStabilityFromStr}})});var wve=Q((Fan,_At)=>{_At.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 Pve=Q(gS=>{"use strict";A();Object.defineProperty(gS,"__esModule",{value:!0});gS.range=gS.balanced=void 0;var EAt=(e,t,n)=>{let r=e instanceof RegExp?Mve(e,n):e,o=t instanceof RegExp?Mve(t,n):t,i=r!==null&&o!=null&&(0,gS.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)}};gS.balanced=EAt;var Mve=(e,t)=>{let n=t.match(e);return n?n[0]:null},SAt=(e,t,n)=>{let r,o,i,a,c,d=n.indexOf(e),m=n.indexOf(t,d+1),h=d;if(d>=0&&m>0){if(e===t)return[d,m];for(r=[],i=n.length;h>=0&&!c;){if(h===d)r.push(h),d=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(c=[y,m])}else o=r.pop(),o!==void 0&&o<i&&(i=o,a=m),m=n.indexOf(t,h+1);h=d<m&&d>=0?d:m}r.length&&a!==void 0&&(c=[i,a])}return c};gS.range=SAt});var jve=Q(Sb=>{"use strict";A();Object.defineProperty(Sb,"__esModule",{value:!0});Sb.EXPANSION_MAX=void 0;Sb.expand=wAt;var kve=Pve(),Uve="\0SLASH"+Math.random()+"\0",Lve="\0OPEN"+Math.random()+"\0",n7="\0CLOSE"+Math.random()+"\0",Qve="\0COMMA"+Math.random()+"\0",Fve="\0PERIOD"+Math.random()+"\0",yAt=new RegExp(Uve,"g"),TAt=new RegExp(Lve,"g"),IAt=new RegExp(n7,"g"),CAt=new RegExp(Qve,"g"),bAt=new RegExp(Fve,"g"),vAt=/\\\\/g,RAt=/\\{/g,DAt=/\\}/g,xAt=/\\,/g,BAt=/\\\./g;Sb.EXPANSION_MAX=1e5;function t7(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function NAt(e){return e.replace(vAt,Uve).replace(RAt,Lve).replace(DAt,n7).replace(xAt,Qve).replace(BAt,Fve)}function OAt(e){return e.replace(yAt,"\\").replace(TAt,"{").replace(IAt,"}").replace(CAt,",").replace(bAt,".")}function Gve(e){if(!e)return[""];let t=[],n=(0,kve.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=Gve(i);return i.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function wAt(e,t={}){if(!e)return[];let{max:n=Sb.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),BB(NAt(e),n,!0).map(OAt)}function MAt(e){return"{"+e+"}"}function PAt(e){return/^-?0\d/.test(e)}function kAt(e,t){return e<=t}function UAt(e,t){return e>=t}function BB(e,t,n){let r=[],o=(0,kve.balanced)("{","}",e);if(!o)return[e];let i=o.pre,a=o.post.length?BB(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<a.length&&c<t;c++){let d=i+"{"+o.body+"}"+a[c];r.push(d)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),m=c||d,h=o.body.indexOf(",")>=0;if(!m&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+n7+o.post,BB(e,t,!0)):[e];let y;if(m)y=o.body.split(/\.\./);else if(y=Gve(o.body),y.length===1&&y[0]!==void 0&&(y=BB(y[0],t,!1).map(MAt),y.length===1))return a.map(b=>o.pre+y[0]+b);let S;if(m&&y[0]!==void 0&&y[1]!==void 0){let b=t7(y[0]),R=t7(y[1]),B=Math.max(y[0].length,y[1].length),N=y.length===3&&y[2]!==void 0?Math.abs(t7(y[2])):1,M=kAt;R<b&&(N*=-1,M=UAt);let $=y.some(PAt);S=[];for(let H=b;M(H,R);H+=N){let re;if(d)re=String.fromCharCode(H),re==="\\"&&(re="");else if(re=String(H),$){let fe=B-re.length;if(fe>0){let he=new Array(fe+1).join("0");H<0?re="-"+he+re.slice(1):re=he+re}}S.push(re)}}else{S=[];for(let b=0;b<y.length;b++)S.push.apply(S,BB(y[b],t,!1))}for(let b=0;b<S.length;b++)for(let R=0;R<a.length&&r.length<t;R++){let B=i+S[b]+a[R];(!n||m||B)&&r.push(B)}}return r}});var zve=Q(JL=>{"use strict";A();Object.defineProperty(JL,"__esModule",{value:!0});JL.assertValidPattern=void 0;var LAt=1024*64,QAt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>LAt)throw new TypeError("pattern is too long")};JL.assertValidPattern=QAt});var $ve=Q(ZL=>{"use strict";A();Object.defineProperty(ZL,"__esModule",{value:!0});ZL.parseClass=void 0;var FAt={"[: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]},NB=e=>e.replace(/[[\]\\-]/g,"\\$&"),GAt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Hve=e=>e.join(""),jAt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,a=!1,c=!1,d=!1,m=!1,h=n,y="";e:for(;i<e.length;){let B=e.charAt(i);if((B==="!"||B==="^")&&i===n+1){m=!0,i++;continue}if(B==="]"&&a&&!d){h=i+1;break}if(a=!0,B==="\\"&&!d){d=!0,i++;continue}if(B==="["&&!d){for(let[N,[M,F,$]]of Object.entries(FAt))if(e.startsWith(N,i)){if(y)return["$.",!1,e.length-n,!0];i+=N.length,$?o.push(M):r.push(M),c=c||F;continue e}}if(d=!1,y){B>y?r.push(NB(y)+"-"+NB(B)):B===y&&r.push(NB(B)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(NB(B+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=B,i+=2;continue}r.push(NB(B)),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])&&!m){let B=r[0].length===2?r[0].slice(-1):r[0];return[GAt(B),!1,h-n,!1]}let S="["+(m?"^":"")+Hve(r)+"]",b="["+(m?"":"^")+Hve(o)+"]";return[r.length&&o.length?"("+S+"|"+b+")":r.length?S:b,c,h-n,!0]};ZL.parseClass=jAt});var XL=Q(WL=>{"use strict";A();Object.defineProperty(WL,"__esModule",{value:!0});WL.unescape=void 0;var zAt=(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");WL.unescape=zAt});var i7=Q(rQ=>{"use strict";A();var gc;Object.defineProperty(rQ,"__esModule",{value:!0});rQ.AST=void 0;var HAt=$ve(),eQ=XL(),$At=new Set(["!","?","+","*","@"]),r7=e=>$At.has(e),Vve=e=>r7(e.type),VAt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),qAt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),YAt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),qve=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),KAt="(?!(?:^|/)\\.\\.?(?:$|/))",tQ="(?!\\.)",JAt=new Set(["[","."]),ZAt=new Set(["..","."]),WAt=new Set("().*{}+?[]^$\\!"),XAt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),o7="[^/]",Yve=o7+"*?",Kve=o7+"+?",emt=0,nQ=class{type;#n;#r;#o=!1;#e=[];#t;#s;#c;#u=!1;#i;#a;#l=!1;id=++emt;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,d=!1,m=-1,h=!1;if(n.type===null){let B=r,N="";for(;B<t.length;){let M=t.charAt(B++);if(c||M==="\\"){c=!c,N+=M;continue}if(d){B===m+1?(M==="^"||M==="!")&&(h=!0):M==="]"&&!(B===m+2&&h)&&(d=!1),N+=M;continue}else if(M==="["){d=!0,m=B,h=!1,N+=M;continue}if(!o.noext&&r7(M)&&t.charAt(B)==="("&&i<=a){n.push(N),N="";let $=new gc(M,n);B=gc.#d(t,$,B,o,i+1),n.push($);continue}N+=M}return n.push(N),B}let y=r+1,S=new gc(null,n),b=[],R="";for(;y<t.length;){let B=t.charAt(y++);if(c||B==="\\"){c=!c,R+=B;continue}if(d){y===m+1?(B==="^"||B==="!")&&(h=!0):B==="]"&&!(y===m+2&&h)&&(d=!1),R+=B;continue}else if(B==="["){d=!0,m=y,h=!1,R+=B;continue}if(!o.noext&&r7(B)&&t.charAt(y)==="("&&(i<=a||n&&n.#p(B))){let M=n&&n.#p(B)?0:1;S.push(R),R="";let F=new gc(B,S);S.push(F),y=gc.#d(t,F,y,o,i+M);continue}if(B==="|"){S.push(R),R="",b.push(S),S=new gc(null,n);continue}if(B===")")return R===""&&n.#e.length===0&&(n.#l=!0),S.push(R),R="",n.push(...b,S),y;R+=B}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#A(t,qAt)}#A(t,n=VAt){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=YAt){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.#m(t,n)}#m(t,n){let r=t.#e[0];this.#e.splice(n,1,...r.#e);for(let o of r.#e)typeof o=="object"&&(o.#t=this);this.#a=void 0}#S(t){return!!qve.get(this.type)?.has(t)}#y(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=t.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#S(n.type)}#T(t){let n=qve.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()),!Vve(this)){let d=this.isStart()&&this.isEnd()&&!this.#e.some(b=>typeof b!="string"),m=this.#e.map(b=>{let[R,B,N,M]=typeof b=="string"?gc.#I(b,this.#r,d):b.toRegExpSource(t);return this.#r=this.#r||N,this.#o=this.#o||M,R}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&ZAt.has(this.#e[0]))){let R=JAt,B=n&&R.has(m.charAt(0))||m.startsWith("\\.")&&R.has(m.charAt(2))||m.startsWith("\\.\\.")&&R.has(m.charAt(4)),N=!n&&!t&&R.has(m.charAt(0));h=B?KAt:N?tQ:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+m+y,(0,eQ.unescape)(m),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let d=this.toString(),m=this;return m.#e=[d],m.type=null,m.#r=void 0,[d,(0,eQ.unescape)(this.toString()),!1,!1]}let a=!r||t||n||!tQ?"":this.#g(!0);a===i&&(a=""),a&&(i=`(?:${i})(?:${a})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?tQ:"")+Kve;else{let d=this.type==="!"?"))"+(this.isStart()&&!n&&!t?tQ:"")+Yve+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&a?")":this.type==="*"&&a?")?":`)${this.type}`;c=o+i+d}return[c,(0,eQ.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(Vve(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#A(o)?(n=!1,this.#m(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#y(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#a=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,a]=n.toRegExpSource(t);return this.#o=this.#o||a,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",a=!1,c=!1;for(let d=0;d<t.length;d++){let m=t.charAt(d);if(o){o=!1,i+=(WAt.has(m)?"\\":"")+m;continue}if(m==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?Kve:Yve,n=!0;continue}else c=!1;if(m==="\\"){d===t.length-1?i+="\\\\":o=!0;continue}if(m==="["){let[h,y,S,b]=(0,HAt.parseClass)(t,d);if(S){i+=h,a=a||y,d+=S-1,n=n||b;continue}}if(m==="?"){i+=o7,n=!0;continue}i+=XAt(m)}return[i,(0,eQ.unescape)(t),!!n,a]}};rQ.AST=nQ;gc=nQ});var a7=Q(oQ=>{"use strict";A();Object.defineProperty(oQ,"__esModule",{value:!0});oQ.escape=void 0;var tmt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");oQ.escape=tmt});var nRe=Q(lt=>{"use strict";A();Object.defineProperty(lt,"__esModule",{value:!0});lt.unescape=lt.escape=lt.AST=lt.Minimatch=lt.match=lt.makeRe=lt.braceExpand=lt.defaults=lt.filter=lt.GLOBSTAR=lt.sep=lt.minimatch=void 0;var nmt=jve(),iQ=zve(),Wve=i7(),rmt=a7(),omt=XL(),imt=(e,t,n={})=>((0,iQ.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new hS(t,n).match(e));lt.minimatch=imt;var amt=/^\*+([^+@!?\*\[\(]*)$/,smt=e=>t=>!t.startsWith(".")&&t.endsWith(e),umt=e=>t=>t.endsWith(e),cmt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),lmt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),dmt=/^\*+\.\*+$/,pmt=e=>!e.startsWith(".")&&e.includes("."),fmt=e=>e!=="."&&e!==".."&&e.includes("."),Amt=/^\.\*+$/,mmt=e=>e!=="."&&e!==".."&&e.startsWith("."),gmt=/^\*+$/,hmt=e=>e.length!==0&&!e.startsWith("."),_mt=e=>e.length!==0&&e!=="."&&e!=="..",Emt=/^\?+([^+@!?\*\[\(]*)?$/,Smt=([e,t=""])=>{let n=Xve([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},ymt=([e,t=""])=>{let n=eRe([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Tmt=([e,t=""])=>{let n=eRe([e]);return t?r=>n(r)&&r.endsWith(t):n},Imt=([e,t=""])=>{let n=Xve([e]);return t?r=>n(r)&&r.endsWith(t):n},Xve=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},eRe=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},tRe=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Jve={win32:{sep:"\\"},posix:{sep:"/"}};lt.sep=tRe==="win32"?Jve.win32.sep:Jve.posix.sep;lt.minimatch.sep=lt.sep;lt.GLOBSTAR=Symbol("globstar **");lt.minimatch.GLOBSTAR=lt.GLOBSTAR;var Cmt="[^/]",bmt=Cmt+"*?",vmt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Rmt="(?:(?!(?:\\/|^)\\.).)*?",Dmt=(e,t={})=>n=>(0,lt.minimatch)(n,e,t);lt.filter=Dmt;lt.minimatch.filter=lt.filter;var Id=(e,t={})=>Object.assign({},e,t),xmt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return lt.minimatch;let t=lt.minimatch;return Object.assign((r,o,i={})=>t(r,o,Id(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,Id(e,i))}static defaults(o){return t.defaults(Id(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,a={}){super(o,i,Id(e,a))}static fromGlob(o,i={}){return t.AST.fromGlob(o,Id(e,i))}},unescape:(r,o={})=>t.unescape(r,Id(e,o)),escape:(r,o={})=>t.escape(r,Id(e,o)),filter:(r,o={})=>t.filter(r,Id(e,o)),defaults:r=>t.defaults(Id(e,r)),makeRe:(r,o={})=>t.makeRe(r,Id(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,Id(e,o)),match:(r,o,i={})=>t.match(r,o,Id(e,i)),sep:t.sep,GLOBSTAR:lt.GLOBSTAR})};lt.defaults=xmt;lt.minimatch.defaults=lt.defaults;var Bmt=(e,t={})=>((0,iQ.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,nmt.expand)(e,{max:t.braceExpandMax}));lt.braceExpand=Bmt;lt.minimatch.braceExpand=lt.braceExpand;var Nmt=(e,t={})=>new hS(e,t).makeRe();lt.makeRe=Nmt;lt.minimatch.makeRe=lt.makeRe;var Omt=(e,t,n={})=>{let r=new hS(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};lt.match=Omt;lt.minimatch.match=lt.match;var Zve=/[?*]|[+@!]\(.*?\)|\[|\]/,wmt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),hS=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,iQ.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||tRe,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,a,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let d=i[0]===""&&i[1]===""&&(i[2]==="?"||!Zve.test(i[2]))&&!Zve.test(i[3]),m=/^[a-z]:/i.test(i[0]);if(d)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(m)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(d=>this.parse(d))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let a=this.set[i];a[0]===""&&a[1]===""&&this.globParts[i][2]==="?"&&typeof a[3]=="string"&&/^[a-z]:$/i.test(a[3])&&(a[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let a=o;for(;r[a+1]==="**";)a++;a>o&&r.splice(o+1,a-o);let c=r[o+1],d=r[o+2],m=r[o+3];if(c!==".."||!d||d==="."||d===".."||!m||m==="."||m==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){let c=r[a];a===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let a=r[i-1];if(a&&a!=="."&&a!==".."&&a!=="**"){n=!0;let d=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...d),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,a=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])a.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])a.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])a.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",a.push(t[o]),o++,i++}else if(n[i]==="*"&&t[o]&&(this.options.dot||!t[o].startsWith("."))&&t[o]!=="**"){if(c==="a")return!1;c="b",a.push(n[i]),o++,i++}else return!1;return t.length===n.length&&a}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),d=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),m=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!m&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=d?3:c?0:void 0,S=h?3:m?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[b,R]=[t[y],n[S]];b.toLowerCase()===R.toLowerCase()&&(n[S]=b,i=S,o=y)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(lt.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(lt.GLOBSTAR,i),c=n.lastIndexOf(lt.GLOBSTAR),[d,m,h]=r?[n.slice(i,a),n.slice(a+1),[]]:[n.slice(i,a),n.slice(a+1,c),n.slice(c+1)];if(d.length){let F=t.slice(o,o+d.length);if(!this.#o(F,d,r,0,0))return!1;o+=d.length,i+=d.length}let y=0;if(h.length){if(h.length+o>t.length)return!1;let F=t.length-h.length;if(this.#o(t,h,r,F,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(F--,!this.#o(t,h,r,F,0)))return!1;y=h.length+1}}if(!m.length){let F=!!y;for(let $=o;$<t.length-y;$++){let H=String(t[$]);if(F=!0,H==="."||H===".."||!this.options.dot&&H.startsWith("."))return!1}return r||F}let S=[[[],0]],b=S[0],R=0,B=[0];for(let F of m)F===lt.GLOBSTAR?(B.push(R),b=[[],0],S.push(b)):(b[0].push(F),R++);let N=S.length-1,M=t.length-y;for(let F of S)F[1]=M-(B[N--]+F[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,a,c){let d=n[o];if(!d){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[m,h]=d;for(;r<=h;){if(this.#o(t.slice(0,r+m.length),m,i,r,0)&&a<this.maxGlobstarRecursion){let b=this.#r(t,n,r+m.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,d,m;for(a=o,c=i,m=t.length,d=n.length;a<m&&c<d;a++,c++){this.debug("matchOne loop");let h=n[c],y=t[a];if(this.debug(n,h,y),h===!1||h===lt.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===m&&c===d)return!0;if(a===m)return r;if(c===d)return a===m-1&&t[a]==="";throw new Error("wtf?")}braceExpand(){return(0,lt.braceExpand)(this.pattern,this.options)}parse(t){(0,iQ.assertValidPattern)(t);let n=this.options;if(t==="**")return lt.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(gmt))?o=n.dot?_mt:hmt:(r=t.match(amt))?o=(n.nocase?n.dot?lmt:cmt:n.dot?umt:smt)(r[1]):(r=t.match(Emt))?o=(n.nocase?n.dot?ymt:Smt:n.dot?Tmt:Imt)(r):(r=t.match(dmt))?o=n.dot?fmt:pmt:(r=t.match(Amt))&&(o=mmt);let i=Wve.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?bmt:n.dot?vmt:Rmt,o=new Set(n.nocase?["i"]:[]),i=t.map(d=>{let m=d.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?wmt(y):y===lt.GLOBSTAR?lt.GLOBSTAR:y._src});m.forEach((y,S)=>{let b=m[S+1],R=m[S-1];y!==lt.GLOBSTAR||R===lt.GLOBSTAR||(R===void 0?b!==void 0&&b!==lt.GLOBSTAR?m[S+1]="(?:\\/|"+r+"\\/)?"+b:m[S]=r:b===void 0?m[S-1]=R+"(?:\\/|\\/"+r+")?":b!==lt.GLOBSTAR&&(m[S-1]=R+"(?:\\/|\\/"+r+"\\/)"+b,m[S+1]=lt.GLOBSTAR))});let h=m.filter(y=>y!==lt.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 d=i[c],m=o;if(r.matchBase&&d.length===1&&(m=[a]),this.matchOne(m,d,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return lt.minimatch.defaults(t).Minimatch}};lt.Minimatch=hS;var Mmt=i7();Object.defineProperty(lt,"AST",{enumerable:!0,get:function(){return Mmt.AST}});var Pmt=a7();Object.defineProperty(lt,"escape",{enumerable:!0,get:function(){return Pmt.escape}});var kmt=XL();Object.defineProperty(lt,"unescape",{enumerable:!0,get:function(){return kmt.unescape}});lt.minimatch.AST=Wve.AST;lt.minimatch.Minimatch=hS;lt.minimatch.escape=rmt.escape;lt.minimatch.unescape=omt.unescape});var cRe=Q((isn,c7)=>{"use strict";A();var rRe=Ue("node:diagnostics_channel"),{context:aQ,trace:s7,SpanStatusCode:sQ,propagation:u7,diag:Umt}=(Le(),we(Je)),{getRPCMetadata:Lmt,RPCType:Qmt}=hr(),{ATTR_HTTP_ROUTE:uQ,ATTR_HTTP_RESPONSE_STATUS_CODE:oRe,ATTR_HTTP_REQUEST_METHOD:Fmt,ATTR_URL_PATH:Gmt}=($n(),we(Nr)),{InstrumentationBase:jmt}=Ove(),{version:zmt,name:iRe}=wve(),Hmt=">=4.0.0 <6",aRe=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],co={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},o_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},Fm="anonymous",i_=Symbol("fastify otel instance"),a_=Symbol("fastify otel request spans"),OB=Symbol("fastify otel request context"),sRe=Symbol("fastify otel addhook original"),uRe=Symbol("fastify otel setnotfound original"),wB=Symbol("fastify otel ignore path"),MB=Symbol("fastify otel record exceptions"),cQ=class extends jmt{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(iRe,zmt,t),this.logger=Umt.createComponentLogger({namespace:iRe}),this[wB]=null,this[MB]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[MB]=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[wB]=o=>typeof n=="function"?n(o):(r==null&&(r=nRe().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)},rRe.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(rRe.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:Hmt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(i_,t),r.decorate(sRe,r.addHook),r.decorate(uRe,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let b=this[OB],R=this[a_];return{enabled:this.routeOptions.config?.otel!==!1,span:R,tracer:t.tracer,context:b,inject:(B,N)=>u7.inject(b,B,N),extract:(B,N)=>u7.extract(b,B,N)}}),r.decorateRequest(a_,null),r.decorateRequest(OB,null),r.addHook("onRoute",function(b){if(t[wB]?.(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 R of aRe)if(b[R]!=null){let B=b[R];if(typeof B=="function")b[R]=y(B,R,{[co.HOOK_NAME]:`${this.pluginName} - route -> ${R}`,[co.FASTIFY_TYPE]:o_.ROUTE,[uQ]:b.url,[co.HOOK_CALLBACK_NAME]:B.name?.length>0?B.name:Fm});else if(Array.isArray(B)){let N=[];for(let M of B)N.push(y(M,R,{[co.HOOK_NAME]:`${this.pluginName} - route -> ${R}`,[co.FASTIFY_TYPE]:o_.ROUTE,[uQ]:b.url,[co.HOOK_CALLBACK_NAME]:M.name?.length>0?M.name:Fm}));b[R]=N}}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",{[co.HOOK_NAME]:`${this.pluginName} - route-handler`,[co.FASTIFY_TYPE]:o_.HANDLER,[uQ]:b.url,[co.HOOK_CALLBACK_NAME]:b.handler.name.length>0?b.handler.name:Fm})}),r.addHook("onRequest",function(b,R,B){if(this[i_].isEnabled()===!1||b.routeOptions.config?.otel===!1)return B();if(this[i_][wB]?.({url:b.url,method:b.method})===!0)return this[i_].logger.debug(`Ignoring request ${b.method} ${b.url} because it matches the ignore path`),B();let N=aQ.active();s7.getSpan(N)==null&&(N=u7.extract(N,b.headers));let M=Lmt(N);b.routeOptions.url!=null&&M?.type===Qmt.HTTP&&(M.route=b.routeOptions.url);let F={[co.ROOT]:"@fastify/otel",[Fmt]:b.method,[Gmt]:b.url};b.routeOptions.url!=null&&(F[uQ]=b.routeOptions.url);let $=this[i_].tracer.startSpan("request",{attributes:F},N);try{this[i_]._requestHook?.($,b)}catch(H){this[i_].logger.error({err:H},"requestHook threw")}b[OB]=s7.setSpan(N,$),b[a_]=$,aQ.with(b[OB],()=>{B()})}),r.addHook("onResponse",function(b,R,B){let N=b[a_];N!=null&&(N.setAttributes({[oRe]:R.statusCode}),N.end()),b[a_]=null,B()}),r.addHook=d,r.setNotFoundHandler=m,i();function a(S,b,R,B){let N=S[a_];N!=null&&(b.statusCode>=500&&N.setStatus({code:sQ.ERROR}),N.setAttributes({[oRe]:b.statusCode}),N.end()),S[a_]=null,B(null,R)}function c(S,b,R,B){let N=S[a_];N!=null&&(N.setStatus({code:sQ.ERROR,message:R.message}),t[MB]!==!1&&N.recordException(R)),B()}function d(S,b){let R=this[sRe];return aRe.includes(S)?R.call(this,S,y(b,S,{[co.HOOK_NAME]:`${this.pluginName} - ${S}`,[co.FASTIFY_TYPE]:o_.INSTANCE,[co.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:Fm})):R.call(this,S,b)}function m(S,b){let R=this[uRe];typeof S=="function"?(b=y(S,"notFoundHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[co.FASTIFY_TYPE]:o_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:Fm}),R.call(this,b)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[co.FASTIFY_TYPE]:o_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:Fm})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[co.FASTIFY_TYPE]:o_.INSTANCE,[co.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:Fm})),b=y(b,"notFoundHandler",{[co.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[co.FASTIFY_TYPE]:o_.INSTANCE,[co.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:Fm}),R.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,R={}){return function(...N){let M=this[i_],F=h(N);if(F===null)return M.logger.debug(`Ignoring route instrumentation because ${b} was called without a Fastify request argument`),S.call(this,...N);if(M.isEnabled()===!1||F.routeOptions.config?.otel===!1)return M.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it is disabled`),S.call(this,...N);if(M[wB]?.({url:F.url,method:F.method})===!0)return M.logger.debug(`Ignoring route instrumentation ${F.routeOptions.method} ${F.routeOptions.url} because it matches the ignore path`),S.call(this,...N);let $=F[OB]??aQ.active(),H=S.name?.length>0?S.name:this.pluginName??Fm,re=M.tracer.startSpan(`${b} - ${H}`,{attributes:R},$);if(M._lifecycleHook!=null)try{M._lifecycleHook(re,{hookName:b,request:F,handler:H})}catch(fe){M.logger.error({err:fe},"Execution of lifecycleHook failed")}return aQ.with(s7.setSpan($,re),function(){try{let fe=S.call(this,...N);return typeof fe?.then=="function"?fe.then(he=>(re.end(),he),he=>(re.setStatus({code:sQ.ERROR,message:he.message}),M[MB]!==!1&&re.recordException(he),re.end(),Promise.reject(he))):(re.end(),fe)}catch(fe){throw re.setStatus({code:sQ.ERROR,message:fe.message}),M[MB]!==!1&&re.recordException(fe),re.end(),fe}},this)}}}}};c7.exports=cQ;c7.exports.FastifyOtelInstrumentation=cQ});var Gm,PB,kB,lRe=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})(Gm||(Gm={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(PB||(PB={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(kB||(kB={}))});var UB,dRe=O(()=>{A();UB=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function l7(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[UB]||[];return i.push(o),Object.defineProperty(e,UB,{enumerable:!1,configurable:!0,value:i}),o}function lQ(e,t){let n=e[UB]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:Wo.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[UB])}function fRe(e,t,n){let r,o;try{o=e(),pRe(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!pRe(o)&&(t(r,o),r))throw r;return o}}function pRe(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var ARe=O(()=>{A();Le();dRe()});function Ymt(){let e=_t();e&&e.on("spanStart",t=>{gRe(t)})}function gRe(e){let t=xt(e).data,n=t["fastify.type"];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.fastify",[Yt]:`${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 pQ,_S,$mt,Vmt,mRe,qmt,dQ,hRe=O(()=>{A();Le();pQ=ue(hr(),1),_S=ue(Xt(),1);$n();dt();lRe();ARe();$mt="0.1.0",Vmt="@sentry/instrumentation-fastify-v3",mRe="anonymous",qmt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),dQ=class extends _S.InstrumentationBase{constructor(t={}){super(Vmt,$mt,t)}init(){return[new _S.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,pQ.getRPCMetadata)(qe.active()),d=a.routeOptions?a.routeOptions.url:r.routerPath;d&&c?.type===pQ.RPCType.HTTP&&(c.route=d);let m=r.method||"GET";Nn().setTransactionName(`${m} ${d}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...a){if(!i.isEnabled())return r.apply(this,a);let c=r.name||t||mRe,d=`${kB.MIDDLEWARE} - ${c}`,m=a[1],h=l7(m,i.tracer,d,{[Gm.FASTIFY_TYPE]:PB.MIDDLEWARE,[Gm.PLUGIN_NAME]:t,[Gm.HOOK_NAME]:n}),y=o&&a[a.length-1];return y&&(a[a.length-1]=function(...S){lQ(m),y.apply(this,S)}),qe.with(Ft.setSpan(qe.active(),h),()=>fRe(()=>r.apply(this,a),S=>{S instanceof Error&&(h.setStatus({code:Wo.ERROR,message:S.message}),h.recordException(S)),o||lQ(m)}))}}_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(!qmt.has(i))return n.apply(this,o);let d=typeof o[o.length-1]=="function"&&a.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(c,i,a,d)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),Ymt(),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,_S.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&a instanceof Error&&(c=a),lQ(this,c)}):r.apply(this,i)}}}_hookPreHandler(){let t=this;return this._diag.debug("Patching fastify preHandler function"),function(r,o,i){if(!t.isEnabled())return i();let a=r,c=a.routeOptions?.handler||a.context?.handler,d=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,m=`${kB.REQUEST_HANDLER} - ${d||this.pluginName||mRe}`,h={[Gm.PLUGIN_NAME]:this.pluginName,[Gm.FASTIFY_TYPE]:PB.REQUEST_HANDLER,[hH]:a.routeOptions?a.routeOptions.url:r.routerPath};d&&(h[Gm.FASTIFY_NAME]=d);let y=l7(o,t.tracer,m,h);gRe(y);let{requestHook:S}=t.getConfig();return S&&(0,_S.safeExecuteInTheMiddle)(()=>S(y,{request:r}),b=>{b&&t._diag.error("request hook failed",b)},!0),qe.with(Ft.setSpan(qe.active(),y),()=>{i()})}}}});import*as d7 from"node:diagnostics_channel";function Kmt(){let e=_t();if(e)return e.getIntegrationByName(fQ)}function _Re(e,t,n,r){let o=Kmt()?.getShouldHandleError()||IRe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){sa&&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)&&Wt(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function IRe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function CRe(e){let t=xt(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[Yt]||!a&&!c&&!i)return;let d=i?"hook":a?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[Nt]:"auto.http.otel.fastify",[Yt]:`${d}.fastify`});let m=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof m=="string"){let h=m.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function Zmt(){let e=_t();e&&e.on("spanStart",t=>{CRe(t)})}function Wmt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&CRe(i)}let r=t.routeOptions?.url,o=t.method||"GET";Nn().setTransactionName(`${o} ${r}`)})}var ERe,fQ,SRe,yRe,Jmt,TRe,bRe=O(()=>{A();ERe=ue(cRe(),1);dt();pr();AS();hRe();fQ="Fastify",SRe=it(`${fQ}.v3`,()=>new dQ);yRe=it(`${fQ}.v5`,()=>{let e=new ERe.FastifyOtelInstrumentation,t=e.plugin();return d7.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?sa&&Z.error("Failed to setup Fastify instrumentation",o):(Zmt(),r&&Wmt(r))})}),d7.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;_Re.call(_Re,r,o,i,"diagnostics-channel")}),e}),Jmt=({shouldHandleError:e})=>{let t;return{name:fQ,setupOnce(){t=e||IRe,SRe(),yRe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}},TRe=(e={})=>Jmt(e)});var p7=Q(Lp=>{"use strict";A();Object.defineProperty(Lp,"__esModule",{value:!0});Lp.SpanNames=Lp.TokenKind=Lp.AllowedOperationTypes=void 0;var Xmt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(Xmt=Lp.AllowedOperationTypes||(Lp.AllowedOperationTypes={}));var egt;(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"})(egt=Lp.TokenKind||(Lp.TokenKind={}));var tgt;(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"})(tgt=Lp.SpanNames||(Lp.SpanNames={}))});var f7=Q(LB=>{"use strict";A();Object.defineProperty(LB,"__esModule",{value:!0});LB.AttributeNames=void 0;var ngt;(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"})(ngt=LB.AttributeNames||(LB.AttributeNames={}))});var AQ=Q(yb=>{"use strict";A();Object.defineProperty(yb,"__esModule",{value:!0});yb.OTEL_GRAPHQL_DATA_SYMBOL=yb.OTEL_PATCHED_SYMBOL=void 0;yb.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");yb.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var vRe=Q(mQ=>{"use strict";A();Object.defineProperty(mQ,"__esModule",{value:!0});mQ.OPERATION_NOT_SUPPORTED=void 0;var Msn=AQ();mQ.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var FRe=Q(ua=>{"use strict";A();Object.defineProperty(ua,"__esModule",{value:!0});ua.wrapFieldResolver=ua.wrapFields=ua.getSourceFromLocation=ua.getOperation=ua.endSpan=ua.addSpanSource=ua.addInputVariableAttributes=ua.isPromise=void 0;var Tb=(Le(),we(Je)),s_=p7(),ES=f7(),jm=AQ(),RRe=Object.values(s_.AllowedOperationTypes),rgt=e=>typeof e?.then=="function";ua.isPromise=rgt;var ogt=e=>typeof e=="object"&&e!==null;function A7(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{A7(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{A7(e,`${t}.${r}`,o)}):e.setAttribute(`${ES.AttributeNames.VARIABLES}${String(t)}`,n)}function igt(e,t){Object.entries(t).forEach(([n,r])=>{A7(e,n,r)})}ua.addInputVariableAttributes=igt;function NRe(e,t,n,r,o){let i=kRe(t,n,r,o);e.setAttribute(ES.AttributeNames.SOURCE,i)}ua.addSpanSource=NRe;function agt(e,t,n,r,o){let i=ORe(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?MRe(n):wRe(n,o);return i={span:sgt(e,t,n,r,o,c)},lgt(n,o,i),{field:i,spanAdded:!0}}function sgt(e,t,n,r,o,i){let a={[ES.AttributeNames.FIELD_NAME]:r.fieldName,[ES.AttributeNames.FIELD_PATH]:o.join("."),[ES.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[ES.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${s_.SpanNames.RESOLVE} ${a[ES.AttributeNames.FIELD_PATH]}`,{attributes:a},i?Tb.trace.setSpan(Tb.context.active(),i):void 0),d=n[jm.OTEL_GRAPHQL_DATA_SYMBOL].source,m=r.fieldNodes.find(h=>h.kind==="Field");return m&&NRe(c,d.loc,t().allowValues,m.loc?.start,m.loc?.end),c}function ugt(e,t){t&&e.recordException(t),e.end()}ua.endSpan=ugt;function cgt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>RRe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>RRe.indexOf(n?.operation)!==-1)}ua.getOperation=cgt;function lgt(e,t,n){return e[jm.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function ORe(e,t){return e[jm.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function wRe(e,t){for(let n=t.length-1;n>0;n--){let r=ORe(e,t.slice(0,n));if(r)return r.span}return MRe(e)}function MRe(e){return e[jm.OTEL_GRAPHQL_DATA_SYMBOL].span}function dgt(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 pgt(e){return PRe(`
|
|
37
37
|
`,e)}function DRe(e){return PRe(" ",e)}function PRe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var fgt=[s_.TokenKind.FLOAT,s_.TokenKind.STRING,s_.TokenKind.INT,s_.TokenKind.BLOCK_STRING];function kRe(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,a=typeof r=="number"?r:e.end,c=e.startToken.next,d=1;for(;c;){if(c.start<i){c=c.next,d=c?.line;continue}if(c.end>a){c=c.next,d=c?.line;continue}let m=c.value||c.kind,h="";!t&&fgt.indexOf(c.kind)>=0&&(m="*"),c.kind===s_.TokenKind.STRING&&(m=`"${m}"`),c.kind===s_.TokenKind.EOF&&(m=""),c.line>d?(o+=pgt(c.line-d),d=c.line,h=DRe(c.column-1)):c.line===c.prev?.line&&(h=DRe(c.start-(c.prev?.end||0))),o+=h+m,c&&(c=c.next)}}return o}ua.getSourceFromLocation=kRe;function URe(e,t,n){if(!e||e[jm.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[jm.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=QRe(t,n,i.resolve)),i.type)){let a=LRe(i.type);for(let c of a)URe(c,t,n)}})}ua.wrapFields=URe;function LRe(e){return"ofType"in e?LRe(e.ofType):Agt(e)?e.getTypes():mgt(e)?[e]:[]}function Agt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function mgt(e){return"getFields"in e&&typeof e.getFields=="function"}var xRe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:Tb.SpanStatusCode.ERROR,message:t.message}),e.end())},BRe=(e,t)=>{t&&e.end()};function QRe(e,t,n,r=!1){if(o[jm.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,a,c,d){if(!n)return;let m=t();if(m.ignoreTrivialResolveSpans&&r&&(ogt(i)||typeof i=="function")&&typeof i[d.fieldName]!="function")return n.call(this,i,a,c,d);if(!c[jm.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,a,c,d);let h=dgt(m.mergeItems,d&&d.path),y=h.filter(R=>typeof R=="string").length,S,b=!1;if(m.depth>=0&&m.depth<y)S=wRe(c,h);else{let{field:R,spanAdded:B}=agt(e,t,c,d,h);S=R.span,b=B}return Tb.context.with(Tb.trace.setSpan(Tb.context.active(),S),()=>{try{let R=n.call(this,i,a,c,d);return(0,ua.isPromise)(R)?R.then(B=>(BRe(S,b),B),B=>{throw xRe(S,B,b),B}):(BRe(S,b),R)}catch(R){throw xRe(S,R,b),R}})}return o[jm.OTEL_PATCHED_SYMBOL]=!0,o}ua.wrapFieldResolver=QRe});var GRe=Q(Ib=>{"use strict";A();Object.defineProperty(Ib,"__esModule",{value:!0});Ib.PACKAGE_NAME=Ib.PACKAGE_VERSION=void 0;Ib.PACKAGE_VERSION="0.62.0";Ib.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var HRe=Q(_Q=>{"use strict";A();Object.defineProperty(_Q,"__esModule",{value:!0});_Q.GraphQLInstrumentation=void 0;var zm=(Le(),we(Je)),Cd=Xt(),QB=p7(),gQ=f7(),m7=AQ(),ggt=vRe(),Ls=FRe(),jRe=GRe(),zRe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},hQ=[">=14.0.0 <17"],g7=class extends Cd.InstrumentationBase{constructor(t={}){super(jRe.PACKAGE_NAME,jRe.PACKAGE_VERSION,{...zRe,...t})}setConfig(t={}){super.setConfig({...zRe,...t})}init(){let t=new Cd.InstrumentationNodeModuleDefinition("graphql",hQ);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Cd.InstrumentationNodeModuleFile("graphql/execution/execute.js",hQ,t=>((0,Cd.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 Cd.InstrumentationNodeModuleFile("graphql/language/parser.js",hQ,t=>((0,Cd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Cd.InstrumentationNodeModuleFile("graphql/validation/validate.js",hQ,t=>((0,Cd.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 m=arguments;a=n._wrapExecuteArgs(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],t)}else{let m=arguments[0];a=n._wrapExecuteArgs(m.schema,m.document,m.rootValue,m.contextValue,m.variableValues,m.operationName,m.fieldResolver,m.typeResolver,t)}let c=(0,Ls.getOperation)(a.document,a.operationName),d=n._createExecuteSpan(c,a);return a.contextValue[m7.OTEL_GRAPHQL_DATA_SYMBOL]={source:a.document?a.document||a.document[m7.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:d,fields:{}},zm.context.with(zm.trace.setSpan(zm.context.active(),d),()=>(0,Cd.safeExecuteInTheMiddle)(()=>o.apply(this,[a]),(m,h)=>{n._handleExecutionResult(d,m,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,Ls.endSpan)(t,n);return}if((0,Ls.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,Ls.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,Ls.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,Ls.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,Cd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,Ls.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,a){return t._parse(this,r,i,a)}}}_patchValidate(){let t=this;return function(r){return function(i,a,c,d,m){return t._validate(this,r,i,a,c,m,d)}}}_parse(t,n,r,o){let i=this.getConfig(),a=this.tracer.startSpan(QB.SpanNames.PARSE);return zm.context.with(zm.trace.setSpan(zm.context.active(),a),()=>(0,Cd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,d)=>{d&&((0,Ls.getOperation)(d)?d.loc&&(0,Ls.addSpanSource)(a,d.loc,i.allowValues):a.updateName(QB.SpanNames.SCHEMA_PARSE)),(0,Ls.endSpan)(a,c)}))}_validate(t,n,r,o,i,a,c){let d=this.tracer.startSpan(QB.SpanNames.VALIDATE,{});return zm.context.with(zm.trace.setSpan(zm.context.active(),d),()=>(0,Cd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,a),(m,h)=>{o.loc||d.updateName(QB.SpanNames.SCHEMA_VALIDATE),h&&h.length&&d.recordException({name:gQ.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,Ls.endSpan)(d,m)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(QB.SpanNames.EXECUTE,{});if(t){let{operation:i,name:a}=t;o.setAttribute(gQ.AttributeNames.OPERATION_TYPE,i);let c=a?.value;c?(o.setAttribute(gQ.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=ggt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(gQ.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,Ls.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,Ls.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,a,c,d,m){if(o||(o={}),o[m7.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d};let h=c==null,y=c??m;return c=(0,Ls.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,Ls.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,Ls.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:a,fieldResolver:c,typeResolver:d}}};_Q.GraphQLInstrumentation=g7});var $Re=Q(EQ=>{"use strict";A();Object.defineProperty(EQ,"__esModule",{value:!0});EQ.GraphQLInstrumentation=void 0;var hgt=HRe();Object.defineProperty(EQ,"GraphQLInstrumentation",{enumerable:!0,get:function(){return hgt.GraphQLInstrumentation}})});function JRe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function Egt(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 VRe,qRe,YRe,_gt,KRe,ZRe=O(()=>{A();Le();VRe=ue($Re(),1);dt();pr();sb();qRe="Graphql",YRe=it(qRe,VRe.GraphQLInstrumentation,e=>{let t=JRe(e);return{...t,responseHook(n,r){Or(n,"auto.graphql.otel.graphql"),r.errors?.length&&!xt(n).status&&n.setStatus({code:Wo.ERROR});let i=xt(n).data,a=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&a){let d=Xo(n),h=xt(d).data[ib]||[],y=c?`${a} ${c}`:`${a}`;Array.isArray(h)?(h.push(y),d.setAttribute(ib,h)):typeof h=="string"?d.setAttribute(ib,[h,y]):d.setAttribute(ib,y),xt(d).data["original-description"]||d.setAttribute("original-description",xt(d).description),d.updateName(`${xt(d).data["original-description"]} (${Egt(h)})`)}}}}),_gt=(e={})=>({name:qRe,setupOnce(){YRe(JRe(e))}}),KRe=_gt});var WRe=Q(SQ=>{"use strict";A();Object.defineProperty(SQ,"__esModule",{value:!0});SQ.EVENT_LISTENERS_SET=void 0;SQ.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var XRe=Q(yQ=>{"use strict";A();Object.defineProperty(yQ,"__esModule",{value:!0});yQ.bufferTextMapGetter=void 0;yQ.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 eDe=Q(Jn=>{"use strict";A();Object.defineProperty(Jn,"__esModule",{value:!0});Jn.METRIC_MESSAGING_PROCESS_DURATION=Jn.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=Jn.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=Jn.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=Jn.MESSAGING_SYSTEM_VALUE_KAFKA=Jn.MESSAGING_OPERATION_TYPE_VALUE_SEND=Jn.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=Jn.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=Jn.ATTR_MESSAGING_SYSTEM=Jn.ATTR_MESSAGING_OPERATION_TYPE=Jn.ATTR_MESSAGING_OPERATION_NAME=Jn.ATTR_MESSAGING_KAFKA_OFFSET=Jn.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=Jn.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=Jn.ATTR_MESSAGING_DESTINATION_PARTITION_ID=Jn.ATTR_MESSAGING_DESTINATION_NAME=Jn.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;Jn.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";Jn.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";Jn.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";Jn.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";Jn.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";Jn.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";Jn.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";Jn.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";Jn.ATTR_MESSAGING_SYSTEM="messaging.system";Jn.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";Jn.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";Jn.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";Jn.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";Jn.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";Jn.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";Jn.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";Jn.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var tDe=Q(Cb=>{"use strict";A();Object.defineProperty(Cb,"__esModule",{value:!0});Cb.PACKAGE_NAME=Cb.PACKAGE_VERSION=void 0;Cb.PACKAGE_VERSION="0.23.0";Cb.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var sDe=Q(IQ=>{"use strict";A();Object.defineProperty(IQ,"__esModule",{value:!0});IQ.KafkaJsInstrumentation=void 0;var wr=(Le(),we(Je)),bd=Xt(),bb=($n(),we(Nr)),nDe=WRe(),rDe=XRe(),pt=eDe(),oDe=tDe();function TQ(e,t,n){return r=>{e.add(t,{...n,...r?{[bb.ATTR_ERROR_TYPE]:r}:{}})}}function iDe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[bb.ATTR_ERROR_TYPE]:r}:{}})}}var aDe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],h7=class extends bd.InstrumentationBase{constructor(t={}){super(oDe.PACKAGE_NAME,oDe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(pt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:aDe}}),this._sentMessages=this.meter.createCounter(pt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(pt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(pt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:aDe}})}init(){let t=r=>{(0,bd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,bd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new bd.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,bd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[nDe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[nDe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[bb.ATTR_SERVER_ADDRESS]:n,[bb.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,bd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,bd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,bd.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,bd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,bd.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=wr.propagation.extract(wr.ROOT_CONTEXT,i.message.headers,rDe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:a,attributes:{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),d=[iDe(t._processDuration,Date.now(),{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),TQ(t._consumedMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],m=wr.context.with(wr.trace.setSpan(a,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],d,m)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],a=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:wr.ROOT_CONTEXT,attributes:{[pt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return wr.context.with(wr.trace.setSpan(wr.context.active(),a),()=>{let c=Date.now(),d=[],m=[TQ(n._consumedMessages,i.batch.messages.length,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=wr.propagation.extract(wr.ROOT_CONTEXT,y.headers,rDe.bufferTextMapGetter),b=wr.trace.getSpan(S)?.spanContext(),R;b&&(R={context:b}),d.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:pt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:R,attributes:{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),m.push(iDe(n._processDuration,c,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"process",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return d.unshift(a),n._endSpansOnPromise(d,m,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),a=n.apply(this,o);return a.then(c=>{let d=c.send;c.send=function(...b){return wr.context.with(wr.trace.setSpan(wr.context.active(),i),()=>t._getSendPatch()(d).apply(this,b).catch(B=>{throw i.setStatus({code:wr.SpanStatusCode.ERROR,message:B?.message}),i.recordException(B),B}))};let m=c.sendBatch;c.sendBatch=function(...b){return wr.context.with(wr.trace.setSpan(wr.context.active(),i),()=>t._getSendBatchPatch()(m).apply(this,b).catch(B=>{throw i.setStatus({code:wr.SpanStatusCode.ERROR,message:B?.message}),i.recordException(B),B}))};let h=c.commit;c.commit=function(...b){let R=h.apply(this,b).then(()=>{i.setStatus({code:wr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],R)};let y=c.abort;c.abort=function(...b){let R=y.apply(this,b);return t._endSpansOnPromise([i],[],R)}}).catch(c=>{i.setStatus({code:wr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),a}}_getSendBatchPatch(){let t=this;return n=>function(...o){let a=o[0].topicMessages||[],c=[],d=[];a.forEach(h=>{h.messages.forEach(y=>{c.push(t._startProducerSpan(h.topic,y)),d.push(TQ(t._sentMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let m=n.apply(this,o);return t._endSpansOnPromise(c,d,m)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],a=i.messages.map(m=>t._startProducerSpan(i.topic,m)),c=i.messages.map(m=>TQ(t._sentMessages,1,{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...m.partition!==void 0?{[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(m.partition)}:{}})),d=n.apply(this,o);return t._endSpansOnPromise(a,c,d)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,a=bb.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(bb.ATTR_ERROR_TYPE,a),c.setStatus({code:wr.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===pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,d=this.tracer.startSpan(`${c} ${t}`,{kind:r===pt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?wr.SpanKind.CLIENT:wr.SpanKind.CONSUMER,attributes:{...a,[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_DESTINATION_NAME]:t,[pt.ATTR_MESSAGING_OPERATION_TYPE]:r,[pt.ATTR_MESSAGING_OPERATION_NAME]:c,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[pt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:m}=this.getConfig();return m&&n&&(0,bd.safeExecuteInTheMiddle)(()=>m(d,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),d}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:wr.SpanKind.PRODUCER,attributes:{[pt.ATTR_MESSAGING_SYSTEM]:pt.MESSAGING_SYSTEM_VALUE_KAFKA,[pt.ATTR_MESSAGING_DESTINATION_NAME]:t,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[pt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[pt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[pt.ATTR_MESSAGING_OPERATION_NAME]:"send",[pt.ATTR_MESSAGING_OPERATION_TYPE]:pt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},wr.propagation.inject(wr.trace.setSpan(wr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,bd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};IQ.KafkaJsInstrumentation=h7});var uDe=Q(CQ=>{"use strict";A();Object.defineProperty(CQ,"__esModule",{value:!0});CQ.KafkaJsInstrumentation=void 0;var Sgt=sDe();Object.defineProperty(CQ,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return Sgt.KafkaJsInstrumentation}})});var cDe,lDe,dDe,ygt,pDe,fDe=O(()=>{A();cDe=ue(uDe(),1);pr();lDe="Kafka",dDe=it(lDe,()=>new cDe.KafkaJsInstrumentation({consumerHook(e){Or(e,"auto.kafkajs.otel.consumer")},producerHook(e){Or(e,"auto.kafkajs.otel.producer")}})),ygt=()=>({name:lDe,setupOnce(){dDe()}}),pDe=ygt});var ADe=Q(vb=>{"use strict";A();Object.defineProperty(vb,"__esModule",{value:!0});vb.PACKAGE_NAME=vb.PACKAGE_VERSION=void 0;vb.PACKAGE_VERSION="0.58.0";vb.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var _De=Q(bQ=>{"use strict";A();Object.defineProperty(bQ,"__esModule",{value:!0});bQ.LruMemoizerInstrumentation=void 0;var mDe=(Le(),we(Je)),gDe=Xt(),hDe=ADe(),_7=class extends gDe.InstrumentationBase{constructor(t={}){super(hDe.PACKAGE_NAME,hDe.PACKAGE_VERSION,t)}init(){return[new gDe.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"?mDe.context.bind(mDe.context.active(),i):i;return o.push(a),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};bQ.LruMemoizerInstrumentation=_7});var EDe=Q(vQ=>{"use strict";A();Object.defineProperty(vQ,"__esModule",{value:!0});vQ.LruMemoizerInstrumentation=void 0;var Tgt=_De();Object.defineProperty(vQ,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return Tgt.LruMemoizerInstrumentation}})});var SDe,yDe,TDe,Igt,IDe,CDe=O(()=>{A();SDe=ue(EDe(),1);pr();yDe="LruMemoizer",TDe=it(yDe,()=>new SDe.LruMemoizerInstrumentation),Igt=()=>({name:yDe,setupOnce(){TDe()}}),IDe=Igt});var bDe=Q(To=>{"use strict";A();Object.defineProperty(To,"__esModule",{value:!0});To.METRIC_DB_CLIENT_CONNECTIONS_USAGE=To.DB_SYSTEM_VALUE_MONGODB=To.DB_SYSTEM_NAME_VALUE_MONGODB=To.ATTR_NET_PEER_PORT=To.ATTR_NET_PEER_NAME=To.ATTR_DB_SYSTEM=To.ATTR_DB_STATEMENT=To.ATTR_DB_OPERATION=To.ATTR_DB_NAME=To.ATTR_DB_MONGODB_COLLECTION=To.ATTR_DB_CONNECTION_STRING=void 0;To.ATTR_DB_CONNECTION_STRING="db.connection_string";To.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";To.ATTR_DB_NAME="db.name";To.ATTR_DB_OPERATION="db.operation";To.ATTR_DB_STATEMENT="db.statement";To.ATTR_DB_SYSTEM="db.system";To.ATTR_NET_PEER_NAME="net.peer.name";To.ATTR_NET_PEER_PORT="net.peer.port";To.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";To.DB_SYSTEM_VALUE_MONGODB="mongodb";To.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var vDe=Q(FB=>{"use strict";A();Object.defineProperty(FB,"__esModule",{value:!0});FB.MongodbCommandType=void 0;var Cgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(Cgt=FB.MongodbCommandType||(FB.MongodbCommandType={}))});var RDe=Q(Rb=>{"use strict";A();Object.defineProperty(Rb,"__esModule",{value:!0});Rb.PACKAGE_NAME=Rb.PACKAGE_VERSION=void 0;Rb.PACKAGE_VERSION="0.67.0";Rb.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var BDe=Q(RQ=>{"use strict";A();Object.defineProperty(RQ,"__esModule",{value:!0});RQ.MongoDBInstrumentation=void 0;var Qo=(Le(),we(Je)),Zn=Xt(),Hm=($n(),we(Nr)),gl=bDe(),SS=vDe(),DDe=RDe(),xDe={requireParentSpan:!0},E7=class e extends Zn.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(DDe.PACKAGE_NAME,DDe.PACKAGE_VERSION,{...xDe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Zn.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Zn.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...xDe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(gl.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:a,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:d,v4UnpatchConnectionPool:m}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new Zn.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new Zn.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new Zn.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new Zn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new Zn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],a,c),new Zn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],d,m),new Zn.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new Zn.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,Zn.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,Zn.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,Zn.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,Zn.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,Zn.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,Zn.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,Zn.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,Zn.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,Zn.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,Zn.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,Zn.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,Zn.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=Qo.context.bind(Qo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let a=function(c,d){if(c||!d){i(c,d);return}t.setPoolName(o),i(c,d)};return n.call(this,o,a)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,Zn.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,Zn.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=n._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function"||typeof c!="object")return typeof d=="function"?r.call(this,i,a,c,d):r.call(this,i,a,c,d,m);let b=n._getV3SpanAttributes(a,i,c[0],t),R=n._spanNameFromAttrs(b),B=n.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:b}),N=n._patchEnd(B,S);return typeof d=="function"?r.call(this,i,a,c,N):r.call(this,i,a,c,d,N)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,a,c,d){let m=Qo.trace.getSpan(Qo.context.active()),h=t._checkSkipInstrumentation(m),y=typeof c=="function"?c:d;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,d);let S=e._getCommandType(a),b=S===SS.MongodbCommandType.UNKNOWN?void 0:S,R=t._getV3SpanAttributes(i,o,a,b),B=t._spanNameFromAttrs(R),N=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R}),M=t._patchEnd(N,y);return typeof c=="function"?n.call(this,o,i,a,M):n.call(this,o,i,a,c,M)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,a,c){let d=Qo.trace.getSpan(Qo.context.active()),m=t._checkSkipInstrumentation(d),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(!m){let R=t._getV4SpanAttributes(this,o,i,y),B=t._spanNameFromAttrs(R);S=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}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=Qo.trace.getSpan(Qo.context.active()),d=t._checkSkipInstrumentation(c),m=Object.keys(a)[0],h=()=>{};if(typeof a!="object"||a.ismaster||a.hello)return n.apply(this,o);let y;if(!d){let R=t._getV4SpanAttributes(this,i,a,m),B=t._spanNameFromAttrs(R);y=t.tracer.startSpan(B,{kind:Qo.SpanKind.CLIENT,attributes:R})}let S=t._patchEnd(y,h,this.id,m),b=n.apply(this,o);return b.then(R=>S(null,R),R=>S(R)),b}}_getV3PatchFind(){let t=this;return n=>function(o,i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function"||typeof a!="object")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let b=t._getV3SpanAttributes(i,o,a,"find"),R=t._spanNameFromAttrs(b),B=t.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:b}),N=t._patchEnd(B,S);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,a,c,d,m){let h=Qo.trace.getSpan(Qo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof d=="function"?d:m;if(y||typeof S!="function")return typeof d=="function"?n.call(this,o,i,a,c,d):n.call(this,o,i,a,c,d,m);let b=t._getV3SpanAttributes(i,o,a.cmd,"getMore"),R=t._spanNameFromAttrs(b),B=t.tracer.startSpan(R,{kind:Qo.SpanKind.CLIENT,attributes:b}),N=t._patchEnd(B,S);return typeof d=="function"?n.call(this,o,i,a,c,N):n.call(this,o,i,a,c,d,N)}}static _getCommandType(t){return t.createIndexes!==void 0?SS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?SS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?SS.MongodbCommandType.IS_MASTER:t.count!==void 0?SS.MongodbCommandType.COUNT:t.aggregate!==void 0?SS.MongodbCommandType.AGGREGATE:SS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,a;if(t){let d=typeof t.address=="string"?t.address.split(":"):"";d.length===2&&(i=d[0],a=d[1])}let c;return r?.documents&&r.documents[0]?c=r.documents[0]:r?.cursors?c=r.cursors:c=r,this._getSpanAttributes(n.db,n.collection,i,a,c,o)}_getV3SpanAttributes(t,n,r,o){let i,a;if(n&&n.s&&(i=n.s.options?.host??n.s.host,a=(n.s.options?.port??n.s.port)?.toString(),i==null||a==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],a=y[1]}}let[c,d]=t.toString().split("."),m=r?.query??r?.q??r;return this._getSpanAttributes(c,d,i,a,m,o)}_getSpanAttributes(t,n,r,o,i,a){let c={};if(this._dbSemconvStability&Zn.SemconvStability.OLD&&(c[gl.ATTR_DB_SYSTEM]=gl.DB_SYSTEM_VALUE_MONGODB,c[gl.ATTR_DB_NAME]=t,c[gl.ATTR_DB_MONGODB_COLLECTION]=n,c[gl.ATTR_DB_OPERATION]=a,c[gl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&Zn.SemconvStability.STABLE&&(c[Hm.ATTR_DB_SYSTEM_NAME]=gl.DB_SYSTEM_NAME_VALUE_MONGODB,c[Hm.ATTR_DB_NAMESPACE]=t,c[Hm.ATTR_DB_OPERATION_NAME]=a,c[Hm.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&Zn.SemconvStability.OLD&&(c[gl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&Zn.SemconvStability.STABLE&&(c[Hm.ATTR_SERVER_ADDRESS]=r);let d=parseInt(o,10);isNaN(d)||(this._netSemconvStability&Zn.SemconvStability.OLD&&(c[gl.ATTR_NET_PEER_PORT]=d),this._netSemconvStability&Zn.SemconvStability.STABLE&&(c[Hm.ATTR_SERVER_PORT]=d))}if(i){let{dbStatementSerializer:d}=this.getConfig(),m=typeof d=="function"?d:this._defaultDbStatementSerializer.bind(this);(0,Zn.safeExecuteInTheMiddle)(()=>{let h=m(i);this._dbSemconvStability&Zn.SemconvStability.OLD&&(c[gl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&Zn.SemconvStability.STABLE&&(c[Hm.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&Zn.SemconvStability.STABLE?n=[t[Hm.ATTR_DB_OPERATION_NAME],t[Hm.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||gl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[gl.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,Zn.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Qo.context.active(),a=this,c=!1;return function(...m){if(!c){c=!0;let h=m[0];if(t){if(h instanceof Error)t.setStatus({code:Qo.SpanStatusCode.ERROR,message:h.message});else{let y=m[1];a._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&a._connCountAdd(-1,a._poolName,"idle")}return Qo.context.with(i,()=>n.apply(this,m))}}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}};RQ.MongoDBInstrumentation=E7});var NDe=Q(GB=>{"use strict";A();Object.defineProperty(GB,"__esModule",{value:!0});GB.MongodbCommandType=void 0;var bgt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(bgt=GB.MongodbCommandType||(GB.MongodbCommandType={}))});var ODe=Q(Db=>{"use strict";A();Object.defineProperty(Db,"__esModule",{value:!0});Db.MongodbCommandType=Db.MongoDBInstrumentation=void 0;var vgt=BDe();Object.defineProperty(Db,"MongoDBInstrumentation",{enumerable:!0,get:function(){return vgt.MongoDBInstrumentation}});var Rgt=NDe();Object.defineProperty(Db,"MongodbCommandType",{enumerable:!0,get:function(){return Rgt.MongodbCommandType}})});function Dgt(e){let t=S7(e);return JSON.stringify(t)}function S7(e){if(Array.isArray(e))return e.map(t=>S7(t));if(xgt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,S7(r)]).reduce((n,r)=>(Ngt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function xgt(e){return typeof e=="object"&&e!==null&&!Bgt(e)}function Bgt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function Ngt(e){return Array.isArray(e)}var wDe,MDe,PDe,Ogt,kDe,UDe=O(()=>{A();wDe=ue(ODe(),1);pr();MDe="Mongo",PDe=it(MDe,()=>new wDe.MongoDBInstrumentation({dbStatementSerializer:Dgt,responseHook(e){Or(e,"auto.db.otel.mongo")}}));Ogt=()=>({name:MDe,setupOnce(){PDe()}}),kDe=Ogt});var y7=Q(Gi=>{"use strict";A();Object.defineProperty(Gi,"__esModule",{value:!0});Gi.DB_SYSTEM_NAME_VALUE_MONGODB=Gi.ATTR_NET_PEER_PORT=Gi.ATTR_NET_PEER_NAME=Gi.ATTR_DB_USER=Gi.ATTR_DB_SYSTEM=Gi.ATTR_DB_STATEMENT=Gi.ATTR_DB_OPERATION=Gi.ATTR_DB_NAME=Gi.ATTR_DB_MONGODB_COLLECTION=void 0;Gi.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";Gi.ATTR_DB_NAME="db.name";Gi.ATTR_DB_OPERATION="db.operation";Gi.ATTR_DB_STATEMENT="db.statement";Gi.ATTR_DB_SYSTEM="db.system";Gi.ATTR_DB_USER="db.user";Gi.ATTR_NET_PEER_NAME="net.peer.name";Gi.ATTR_NET_PEER_PORT="net.peer.port";Gi.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var FDe=Q(u_=>{"use strict";A();Object.defineProperty(u_,"__esModule",{value:!0});u_.handleCallbackResponse=u_.handlePromiseResponse=u_.getAttributesFromCollection=void 0;var LDe=(Le(),we(Je)),zB=Xt(),jB=y7(),DQ=($n(),we(Nr));function wgt(e,t,n){let r={};return t&zB.SemconvStability.OLD&&(r[jB.ATTR_DB_MONGODB_COLLECTION]=e.name,r[jB.ATTR_DB_NAME]=e.conn.name,r[jB.ATTR_DB_USER]=e.conn.user),t&zB.SemconvStability.STABLE&&(r[DQ.ATTR_DB_COLLECTION_NAME]=e.name,r[DQ.ATTR_DB_NAMESPACE]=e.conn.name),n&zB.SemconvStability.OLD&&(r[jB.ATTR_NET_PEER_NAME]=e.conn.host,r[jB.ATTR_NET_PEER_PORT]=e.conn.port),n&zB.SemconvStability.STABLE&&(r[DQ.ATTR_SERVER_ADDRESS]=e.conn.host,r[DQ.ATTR_SERVER_PORT]=e.conn.port),r}u_.getAttributesFromCollection=wgt;function QDe(e,t={}){e.recordException(t),e.setStatus({code:LDe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
|
|
38
|
-
Mongoose Error Code: ${t.code}`:""}`})}function T7(e,t,n,r=void 0){n&&(0,zB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LDe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Mgt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(T7(t,o,n,r),o)).catch(o=>{throw QDe(t,o),o}).finally(()=>t.end()):(T7(t,e,n,r),t.end(),e)}u_.handlePromiseResponse=Mgt;function Pgt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?QDe(r,d):T7(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}u_.handleCallbackResponse=Pgt});var GDe=Q(xb=>{"use strict";A();Object.defineProperty(xb,"__esModule",{value:!0});xb.PACKAGE_NAME=xb.PACKAGE_VERSION=void 0;xb.PACKAGE_VERSION="0.60.0";xb.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VDe=Q(hc=>{"use strict";A();Object.defineProperty(hc,"__esModule",{value:!0});hc.MongooseInstrumentation=hc._ALREADY_INSTRUMENTED=hc._STORED_PARENT_SPAN=void 0;var ca=(Le(),we(Je)),kgt=hr(),I7=FDe(),cs=Xt(),jDe=GDe(),c_=y7(),yS=($n(),we(Nr)),xQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Ugt=["remove","count","findOneAndRemove",...xQ],Lgt=["count","findOneAndRemove",...xQ],Qgt=[...xQ];function zDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Ugt:e.startsWith("7.")?Lgt:Qgt:xQ}function HDe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $De(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}hc._STORED_PARENT_SPAN=Symbol("stored-parent-span");hc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var C7=class extends cs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jDe.PACKAGE_NAME,jDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new cs.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,HDe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$De(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)),zDe(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=zDe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HDe(n)&&this._unwrap(r.Model.prototype,"remove"),$De(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[hc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[c_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[yS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[hc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[hc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[c_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[yS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,d);r._dbSemconvStability&cs.SemconvStability.OLD&&(m[c_.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&cs.SemconvStability.STABLE&&(m[yS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);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,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,y=c;typeof a=="function"?(m=a,h=void 0,y=void 0):typeof c=="function"&&(m=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let N=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&cs.SemconvStability.OLD&&(S[c_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&cs.SemconvStability.STABLE&&(S[yS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),B=r._handleResponse(R,o,this,arguments,m,n);return B&&typeof B=="object"&&(B[hc._ALREADY_INSTRUMENTED]=!0),B}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,m);r._dbSemconvStability&cs.SemconvStability.OLD&&(h[c_.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&cs.SemconvStability.STABLE&&(h[yS.ATTR_DB_QUERY_TEXT]=b)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ca.trace.getSpan(ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[hc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[hc._STORED_PARENT_SPAN]=ca.trace.getSpan(ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,I7.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&cs.SemconvStability.OLD&&(a[c_.ATTR_DB_OPERATION]=r,a[c_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&cs.SemconvStability.STABLE&&(a[yS.ATTR_DB_OPERATION_NAME]=r,a[yS.ATTR_DB_SYSTEM_NAME]=c_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&cs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ca.SpanKind.CLIENT,attributes:a},i?ca.trace.setSpan(ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,I7.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,I7.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ca.context.with((0,kgt.suppressTracing)(ca.context.active()),t):t()}};hc.MongooseInstrumentation=C7});var qDe=Q(BQ=>{"use strict";A();Object.defineProperty(BQ,"__esModule",{value:!0});BQ.MongooseInstrumentation=void 0;var Fgt=VDe();Object.defineProperty(BQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return Fgt.MongooseInstrumentation}})});var YDe,KDe,JDe,Ggt,ZDe,WDe=O(()=>{A();YDe=ue(qDe(),1);pr();KDe="Mongoose",JDe=it(KDe,()=>new YDe.MongooseInstrumentation({responseHook(e){Or(e,"auto.db.otel.mongoose")}})),Ggt=()=>({name:KDe,setupOnce(){JDe()}}),ZDe=Ggt});var XDe=Q(ji=>{"use strict";A();Object.defineProperty(ji,"__esModule",{value:!0});ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ji.DB_SYSTEM_VALUE_MYSQL=ji.ATTR_NET_PEER_PORT=ji.ATTR_NET_PEER_NAME=ji.ATTR_DB_USER=ji.ATTR_DB_SYSTEM=ji.ATTR_DB_STATEMENT=ji.ATTR_DB_NAME=ji.ATTR_DB_CONNECTION_STRING=void 0;ji.ATTR_DB_CONNECTION_STRING="db.connection_string";ji.ATTR_DB_NAME="db.name";ji.ATTR_DB_STATEMENT="db.statement";ji.ATTR_DB_SYSTEM="db.system";ji.ATTR_DB_USER="db.user";ji.ATTR_NET_PEER_NAME="net.peer.name";ji.ATTR_NET_PEER_PORT="net.peer.port";ji.DB_SYSTEM_VALUE_MYSQL="mysql";ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var exe=Q(HB=>{"use strict";A();Object.defineProperty(HB,"__esModule",{value:!0});HB.AttributeNames=void 0;var jgt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(jgt=HB.AttributeNames||(HB.AttributeNames={}))});var txe=Q(Qs=>{"use strict";A();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getPoolNameOld=Qs.arrayStringifyHelper=Qs.getSpanName=Qs.getDbValues=Qs.getDbQueryText=Qs.getJDBCString=Qs.getConfig=void 0;function zgt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Qs.getConfig=zgt;function Hgt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Qs.getJDBCString=Hgt;function $gt(e){return typeof e=="string"?e:e.sql}Qs.getDbQueryText=$gt;function Vgt(e,t){return b7(typeof e=="string"?t:t||e.values)}Qs.getDbValues=Vgt;function qgt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qs.getSpanName=qgt;function b7(e){return e?`[${e.toString()}]`:""}Qs.arrayStringifyHelper=b7;function Ygt(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()}Qs.getPoolNameOld=Ygt});var nxe=Q(Bb=>{"use strict";A();Object.defineProperty(Bb,"__esModule",{value:!0});Bb.PACKAGE_NAME=Bb.PACKAGE_VERSION=void 0;Bb.PACKAGE_VERSION="0.60.0";Bb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oxe=Q(NQ=>{"use strict";A();Object.defineProperty(NQ,"__esModule",{value:!0});NQ.MySQLInstrumentation=void 0;var _c=(Le(),we(Je)),vd=Xt(),Nb=($n(),we(Nr)),$m=XDe(),Kgt=exe(),TS=txe(),rxe=nxe(),v7=class extends vd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rxe.PACKAGE_NAME,rxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter($m.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 vd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,vd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,vd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,vd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,TS.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=_c.context.active();return function(o,i){i&&((0,vd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&_c.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:y}=(0,TS.getConfig)(t.config),S=parseInt(m,10),b=(0,TS.getDbQueryText)(o);r._dbSemconvStability&vd.SemconvStability.OLD&&(c[$m.ATTR_DB_SYSTEM]=$m.DB_SYSTEM_VALUE_MYSQL,c[$m.ATTR_DB_CONNECTION_STRING]=(0,TS.getJDBCString)(d,m,h),c[$m.ATTR_DB_NAME]=h,c[$m.ATTR_DB_USER]=y,c[$m.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&vd.SemconvStability.STABLE&&(c[Nb.ATTR_DB_SYSTEM_NAME]=Nb.DB_SYSTEM_NAME_VALUE_MYSQL,c[Nb.ATTR_DB_NAMESPACE]=h,c[Nb.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&vd.SemconvStability.OLD&&(c[$m.ATTR_NET_PEER_NAME]=d,isNaN(S)||(c[$m.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&vd.SemconvStability.STABLE&&(c[Nb.ATTR_SERVER_ADDRESS]=d,isNaN(S)||(c[Nb.ATTR_SERVER_PORT]=S));let R=r.tracer.startSpan((0,TS.getSpanName)(o),{kind:_c.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),R.setAttribute(Kgt.AttributeNames.MYSQL_VALUES,(0,TS.getDbValues)(o,M))}let B=Array.from(arguments).findIndex(M=>typeof M=="function"),N=_c.context.active();if(B===-1){let M=_c.context.with(_c.trace.setSpan(_c.context.active(),R),()=>n.apply(t,arguments));return _c.context.bind(N,M),M.on("error",F=>R.setStatus({code:_c.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{R.end()})}else return r._wrap(arguments,B,r._patchCallbackQuery(R,N)),_c.context.with(_c.trace.setSpan(_c.context.active(),R),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:_c.SpanStatusCode.ERROR,message:o.message}),t.end(),_c.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,TS.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")})}};NQ.MySQLInstrumentation=v7});var ixe=Q(OQ=>{"use strict";A();Object.defineProperty(OQ,"__esModule",{value:!0});OQ.MySQLInstrumentation=void 0;var Jgt=oxe();Object.defineProperty(OQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return Jgt.MySQLInstrumentation}})});var axe,sxe,uxe,Zgt,cxe,lxe=O(()=>{A();axe=ue(ixe(),1);pr();sxe="Mysql",uxe=it(sxe,()=>new axe.MySQLInstrumentation({})),Zgt=()=>({name:sxe,setupOnce(){uxe()}}),cxe=Zgt});var R7=Q(Ma=>{"use strict";A();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DB_SYSTEM_VALUE_MYSQL=Ma.ATTR_NET_PEER_PORT=Ma.ATTR_NET_PEER_NAME=Ma.ATTR_DB_USER=Ma.ATTR_DB_SYSTEM=Ma.ATTR_DB_STATEMENT=Ma.ATTR_DB_NAME=Ma.ATTR_DB_CONNECTION_STRING=void 0;Ma.ATTR_DB_CONNECTION_STRING="db.connection_string";Ma.ATTR_DB_NAME="db.name";Ma.ATTR_DB_STATEMENT="db.statement";Ma.ATTR_DB_SYSTEM="db.system";Ma.ATTR_DB_USER="db.user";Ma.ATTR_NET_PEER_NAME="net.peer.name";Ma.ATTR_NET_PEER_PORT="net.peer.port";Ma.DB_SYSTEM_VALUE_MYSQL="mysql"});var x7=Q(wQ=>{"use strict";A();Object.defineProperty(wQ,"__esModule",{value:!0});wQ.addSqlCommenterComment=void 0;var D7=(Le(),we(Je)),Wgt=hr();function Xgt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function eht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function tht(e,t){if(typeof t!="string"||t.length===0||Xgt(t))return t;let n=new Wgt.W3CTraceContextPropagator,r={};n.inject(D7.trace.setSpan(D7.ROOT_CONTEXT,e),r,D7.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=eht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}wQ.addSqlCommenterComment=tht});var dxe=Q(Rd=>{"use strict";A();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.getConnectionPrototypeToInstrument=Rd.once=Rd.getSpanName=Rd.getQueryText=Rd.getConnectionAttributes=void 0;var $B=R7(),MQ=Xt(),B7=($n(),we(Nr));function nht(e,t,n){let{host:r,port:o,database:i,user:a}=rht(e),c={};t&MQ.SemconvStability.OLD&&(c[$B.ATTR_DB_CONNECTION_STRING]=oht(r,o,i),c[$B.ATTR_DB_NAME]=i,c[$B.ATTR_DB_USER]=a),t&MQ.SemconvStability.STABLE&&(c[B7.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&MQ.SemconvStability.OLD&&(c[$B.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[$B.ATTR_NET_PEER_PORT]=d)),n&MQ.SemconvStability.STABLE&&(c[B7.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[B7.ATTR_SERVER_PORT]=d)),c}Rd.getConnectionAttributes=nht;function rht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function oht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function iht(e,t,n,r=!1,o=aht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,sht(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"}}Rd.getQueryText=iht;function aht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function sht(e){return"values"in e}function uht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Rd.getSpanName=uht;var cht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Rd.once=cht;function lht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Rd.getConnectionPrototypeToInstrument=lht});var pxe=Q(Ob=>{"use strict";A();Object.defineProperty(Ob,"__esModule",{value:!0});Ob.PACKAGE_NAME=Ob.PACKAGE_VERSION=void 0;Ob.PACKAGE_VERSION="0.60.0";Ob.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gxe=Q(PQ=>{"use strict";A();Object.defineProperty(PQ,"__esModule",{value:!0});PQ.MySQL2Instrumentation=void 0;var fxe=(Le(),we(Je)),Qp=Xt(),N7=R7(),Axe=x7(),wb=dxe(),mxe=pxe(),O7=($n(),we(Nr)),w7=[">=1.4.2 <4"],M7=class extends Qp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mxe.PACKAGE_NAME,mxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qp.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,Qp.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Qp.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 Qp.InstrumentationNodeModuleDefinition("mysql2",w7,i=>(n(i),i),()=>{},[new Qp.InstrumentationNodeModuleFile("mysql2/promise.js",w7,i=>(n(i),i),()=>{}),new Qp.InstrumentationNodeModuleFile("mysql2/lib/connection.js",w7,i=>{let a=(0,wb.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,wb.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,wb.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,wb.getQueryText)(i,t,d,m,h);o._dbSemconvStability&Qp.SemconvStability.OLD&&(S[N7.ATTR_DB_SYSTEM]=N7.DB_SYSTEM_VALUE_MYSQL,S[N7.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&Qp.SemconvStability.STABLE&&(S[O7.ATTR_DB_SYSTEM_NAME]=O7.DB_SYSTEM_NAME_VALUE_MYSQL,S[O7.ATTR_DB_QUERY_TEXT]=b);let R=o.tracer.startSpan((0,wb.getSpanName)(i),{kind:fxe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Axe.addSqlCommenterComment)(R,i):Object.assign(i,{sql:(0,Axe.addSqlCommenterComment)(R,i.sql)}));let B=(0,wb.once)((N,M)=>{N?R.setStatus({code:fxe.SpanStatusCode.ERROR,message:N.message}):typeof y=="function"&&(0,Qp.safeExecuteInTheMiddle)(()=>{y(R,{queryResults:M})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),R.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(B));let N=r.apply(this,arguments);return N.once("error",M=>{B(M)}).once("result",M=>{B(void 0,M)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(B)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(B)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};PQ.MySQL2Instrumentation=M7});var hxe=Q(kQ=>{"use strict";A();Object.defineProperty(kQ,"__esModule",{value:!0});kQ.MySQL2Instrumentation=void 0;var dht=gxe();Object.defineProperty(kQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return dht.MySQL2Instrumentation}})});var _xe,Exe,Sxe,pht,yxe,Txe=O(()=>{A();_xe=ue(hxe(),1);pr();Exe="Mysql2",Sxe=it(Exe,()=>new _xe.MySQL2Instrumentation({responseHook(e){Or(e,"auto.db.otel.mysql2")}})),pht=()=>({name:Exe,setupOnce(){Sxe()}}),yxe=pht});var Ixe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.DB_SYSTEM_VALUE_REDIS=Fs.DB_SYSTEM_NAME_VALUE_REDIS=Fs.ATTR_NET_PEER_PORT=Fs.ATTR_NET_PEER_NAME=Fs.ATTR_DB_SYSTEM=Fs.ATTR_DB_STATEMENT=Fs.ATTR_DB_CONNECTION_STRING=void 0;Fs.ATTR_DB_CONNECTION_STRING="db.connection_string";Fs.ATTR_DB_STATEMENT="db.statement";Fs.ATTR_DB_SYSTEM="db.system";Fs.ATTR_NET_PEER_NAME="net.peer.name";Fs.ATTR_NET_PEER_PORT="net.peer.port";Fs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Fs.DB_SYSTEM_VALUE_REDIS="redis"});var Cxe=Q(UQ=>{"use strict";A();Object.defineProperty(UQ,"__esModule",{value:!0});UQ.endSpan=void 0;var fht=(Le(),we(Je)),Aht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:fht.SpanStatusCode.ERROR,message:t.message})),e.end()};UQ.endSpan=Aht});var QQ=Q(LQ=>{"use strict";A();Object.defineProperty(LQ,"__esModule",{value:!0});LQ.defaultDbStatementSerializer=void 0;var mht=[{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}],ght=(e,t)=>{if(Array.isArray(t)&&t.length){let n=mht.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};LQ.defaultDbStatementSerializer=ght});var bxe=Q(Mb=>{"use strict";A();Object.defineProperty(Mb,"__esModule",{value:!0});Mb.PACKAGE_NAME=Mb.PACKAGE_VERSION=void 0;Mb.PACKAGE_VERSION="0.62.0";Mb.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var xxe=Q(FQ=>{"use strict";A();Object.defineProperty(FQ,"__esModule",{value:!0});FQ.IORedisInstrumentation=void 0;var l_=(Le(),we(Je)),Ec=Xt(),d_=($n(),we(Nr)),Sc=Ixe(),vxe=Xt(),VB=Cxe(),hht=QQ(),Rxe=bxe(),Dxe={requireParentSpan:!0},P7=class extends Ec.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Rxe.PACKAGE_NAME,Rxe.PACKAGE_VERSION,{...Dxe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ec.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ec.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Dxe,...t})}init(){return[new Ec.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Ec.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Ec.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||hht.defaultDbStatementSerializer,c=l_.trace.getSpan(l_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&Ec.SemconvStability.OLD&&(d[Sc.ATTR_DB_SYSTEM]=Sc.DB_SYSTEM_VALUE_REDIS,d[Sc.ATTR_DB_STATEMENT]=y,d[Sc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&Ec.SemconvStability.STABLE&&(d[d_.ATTR_DB_SYSTEM_NAME]=Sc.DB_SYSTEM_NAME_VALUE_REDIS,d[d_.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Ec.SemconvStability.OLD&&(d[Sc.ATTR_NET_PEER_NAME]=m,d[Sc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Ec.SemconvStability.STABLE&&(d[d_.ATTR_SERVER_ADDRESS]=m,d[d_.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:l_.SpanKind.CLIENT,attributes:d}),{requestHook:b}=i;b&&(0,vxe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),R=>{R&&l_.diag.error("ioredis instrumentation: request hook failed",R)},!0);try{let R=t.apply(this,arguments),B=o.resolve;o.resolve=function(M){(0,vxe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,M),F=>{F&&l_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,VB.endSpan)(S,null),B(M)};let N=o.reject;return o.reject=function(M){(0,VB.endSpan)(S,M),N(M)},R}catch(R){throw(0,VB.endSpan)(S,R),R}}}_traceConnection(t){let n=this;return function(){let r=l_.trace.getSpan(l_.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&Ec.SemconvStability.OLD&&(o[Sc.ATTR_DB_SYSTEM]=Sc.DB_SYSTEM_VALUE_REDIS,o[Sc.ATTR_DB_STATEMENT]="connect",o[Sc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Ec.SemconvStability.STABLE&&(o[d_.ATTR_DB_SYSTEM_NAME]=Sc.DB_SYSTEM_NAME_VALUE_REDIS,o[d_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Ec.SemconvStability.OLD&&(o[Sc.ATTR_NET_PEER_NAME]=i,o[Sc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Ec.SemconvStability.STABLE&&(o[d_.ATTR_SERVER_ADDRESS]=i,o[d_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:l_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,VB.endSpan)(c,null),d}catch(d){throw(0,VB.endSpan)(c,d),d}}}};FQ.IORedisInstrumentation=P7});var Bxe=Q(GQ=>{"use strict";A();Object.defineProperty(GQ,"__esModule",{value:!0});GQ.IORedisInstrumentation=void 0;var _ht=xxe();Object.defineProperty(GQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return _ht.IORedisInstrumentation}})});var jQ=Q(Pb=>{"use strict";A();Object.defineProperty(Pb,"__esModule",{value:!0});Pb.PACKAGE_NAME=Pb.PACKAGE_VERSION=void 0;Pb.PACKAGE_VERSION="0.62.0";Pb.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var Nxe=Q(p_=>{"use strict";A();Object.defineProperty(p_,"__esModule",{value:!0});p_.getTracedCreateStreamTrace=p_.getTracedCreateClient=p_.endSpan=void 0;var qB=(Le(),we(Je)),Eht=(e,t)=>{t&&e.setStatus({code:qB.SpanStatusCode.ERROR,message:t.message}),e.end()};p_.endSpan=Eht;var Sht=e=>function(){let n=e.apply(this,arguments);return qB.context.bind(qB.context.active(),n)};p_.getTracedCreateClient=Sht;var yht=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){qB.context.bind(qB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};p_.getTracedCreateStreamTrace=yht});var zQ=Q(Gs=>{"use strict";A();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.DB_SYSTEM_VALUE_REDIS=Gs.DB_SYSTEM_NAME_VALUE_REDIS=Gs.ATTR_NET_PEER_PORT=Gs.ATTR_NET_PEER_NAME=Gs.ATTR_DB_SYSTEM=Gs.ATTR_DB_STATEMENT=Gs.ATTR_DB_CONNECTION_STRING=void 0;Gs.ATTR_DB_CONNECTION_STRING="db.connection_string";Gs.ATTR_DB_STATEMENT="db.statement";Gs.ATTR_DB_SYSTEM="db.system";Gs.ATTR_NET_PEER_NAME="net.peer.name";Gs.ATTR_NET_PEER_PORT="net.peer.port";Gs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Gs.DB_SYSTEM_VALUE_REDIS="redis"});var wxe=Q($Q=>{"use strict";A();Object.defineProperty($Q,"__esModule",{value:!0});$Q.RedisInstrumentationV2_V3=void 0;var hl=Xt(),HQ=Nxe(),Oxe=jQ(),YB=(Le(),we(Je)),KB=($n(),we(Nr)),IS=zQ(),Tht=QQ(),k7=class e extends hl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Oxe.PACKAGE_NAME,Oxe.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=YB.trace.getSpan(YB.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||Tht.defaultDbStatementSerializer,m={};t._semconvStability&hl.SemconvStability.OLD&&Object.assign(m,{[IS.ATTR_DB_SYSTEM]:IS.DB_SYSTEM_VALUE_REDIS,[IS.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&hl.SemconvStability.STABLE&&Object.assign(m,{[KB.ATTR_DB_SYSTEM_NAME]:IS.DB_SYSTEM_NAME_VALUE_REDIS,[KB.ATTR_DB_OPERATION_NAME]:i.command,[KB.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:YB.SpanKind.CLIENT,attributes:m});if(this.connection_options){let S={};t._semconvStability&hl.SemconvStability.OLD&&Object.assign(S,{[IS.ATTR_NET_PEER_NAME]:this.connection_options.host,[IS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&hl.SemconvStability.STABLE&&Object.assign(S,{[KB.ATTR_SERVER_ADDRESS]:this.connection_options.host,[KB.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&hl.SemconvStability.OLD&&h.setAttribute(IS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=YB.context.active();arguments[0].callback=function(R,B){if(a?.responseHook){let N=a.responseHook;(0,hl.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,B)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,HQ.endSpan)(h,R),YB.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,HQ.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,HQ.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,HQ.getTracedCreateStreamTrace)(n)}}};$Q.RedisInstrumentationV2_V3=k7});var Pxe=Q(VQ=>{"use strict";A();Object.defineProperty(VQ,"__esModule",{value:!0});VQ.getClientAttributes=void 0;var U7=($n(),we(Nr)),kb=zQ(),Mxe=Xt();function Iht(e,t,n){let r={};return n&Mxe.SemconvStability.OLD&&Object.assign(r,{[kb.ATTR_DB_SYSTEM]:kb.DB_SYSTEM_VALUE_REDIS,[kb.ATTR_NET_PEER_NAME]:t?.socket?.host,[kb.ATTR_NET_PEER_PORT]:t?.socket?.port,[kb.ATTR_DB_CONNECTION_STRING]:Cht(e,t?.url)}),n&Mxe.SemconvStability.STABLE&&Object.assign(r,{[U7.ATTR_DB_SYSTEM_NAME]:kb.DB_SYSTEM_NAME_VALUE_REDIS,[U7.ATTR_SERVER_ADDRESS]:t?.socket?.host,[U7.ATTR_SERVER_PORT]:t?.socket?.port}),r}VQ.getClientAttributes=Iht;function Cht(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 Qxe=Q(qQ=>{"use strict";A();Object.defineProperty(qQ,"__esModule",{value:!0});qQ.RedisInstrumentationV4_V5=void 0;var Dd=(Le(),we(Je)),lo=Xt(),kxe=Pxe(),bht=QQ(),Uxe=jQ(),L7=($n(),we(Nr)),vht=zQ(),JB=Symbol("opentelemetry.instrumentation.redis.open_spans"),Lxe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),Q7=class e extends lo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Uxe.PACKAGE_NAME,Uxe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.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 lo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,lo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,lo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,lo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,lo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,lo.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,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new lo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[JB];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[JB];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,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[Lxe]=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,kxe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Dd.SpanKind.CLIENT,attributes:a});return Dd.context.with(Dd.trace.setSpan(Dd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Dd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Dd.trace.getSpan(Dd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[Lxe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||bht.defaultDbStatementSerializer,h=(0,kxe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&lo.SemconvStability.STABLE&&(h[L7.ATTR_DB_OPERATION_NAME]=c);try{let b=m(c,d);b!=null&&(this._semconvStability&lo.SemconvStability.OLD&&(h[vht.ATTR_DB_STATEMENT]=b),this._semconvStability&lo.SemconvStability.STABLE&&(h[L7.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:Dd.SpanKind.CLIENT,attributes:h}),S=Dd.context.with(Dd.trace.setSpan(Dd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,d,b,void 0)},b=>{this._endSpanWithResponse(y,c,d,null,b)});else{let b=S;b[JB]=b[JB]||[],b[JB].push({span:y,commandName:c,commandArgs:d})}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:d,commandArgs:m}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&lo.SemconvStability.STABLE&&d.setAttribute(L7.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,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:Dd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};qQ.RedisInstrumentationV4_V5=Q7});var jxe=Q(YQ=>{"use strict";A();Object.defineProperty(YQ,"__esModule",{value:!0});YQ.RedisInstrumentation=void 0;var Rht=Xt(),Fxe=jQ(),Dht=wxe(),xht=Qxe(),Gxe={requireParentSpan:!1},F7=class extends Rht.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Gxe,...t};super(Fxe.PACKAGE_NAME,Fxe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Dht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new xht.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Gxe,...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())}};YQ.RedisInstrumentation=F7});var zxe=Q(KQ=>{"use strict";A();Object.defineProperty(KQ,"__esModule",{value:!0});KQ.RedisInstrumentation=void 0;var Bht=jxe();Object.defineProperty(KQ,"RedisInstrumentation",{enumerable:!0,get:function(){return Bht.RedisInstrumentation}})});function ZB(e,t){return e.includes(t.toLowerCase())}function j7(e){return ZB(G7,e)?"cache.get":ZB(Oht,e)?"cache.put":void 0}function wht(e,t){return t.some(n=>e.startsWith(n))}function $xe(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)?Hxe(o.map(i=>n(i))):["<unknown>"],r=t[0];return ZB(Nht,e)&&r!=null?n(r):Hxe(t.map(o=>n(o)))}catch{return}}function Vxe(e,t,n){if(!j7(e))return!1;for(let r of t)if(wht(r,n))return!0;return!1}function qxe(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 Hxe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Nht,G7,Oht,Yxe=O(()=>{A();Nht=["get","set","setex"],G7=["get","mget"],Oht=["set","setex"]});var Kxe,Jxe,JQ,WB,Zxe,Mht,Pht,Wxe,kht,Xxe,e1e=O(()=>{A();Kxe=ue(Bxe(),1),Jxe=ue(zxe(),1);dt();pr();Yxe();JQ="Redis",WB={},Zxe=(e,t,n,r)=>{e.setAttribute(Nt,"auto.db.otel.redis");let o=$xe(t,n),i=j7(t);if(!o||!i||!WB.cachePrefixes||!Vxe(t,o,WB.cachePrefixes))return;let a=xt(e).data["net.peer.name"],c=xt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qxe(r);d&&e.setAttribute(l$,d),ZB(G7,t)&&d!==void 0&&e.setAttribute(u$,d>0),e.setAttributes({[Yt]:i,[c$]:o});let m=o.join(", ");e.updateName(WB.maxCacheKeyLength?vh(m,WB.maxCacheKeyLength):m)},Mht=it(`${JQ}.IORedis`,()=>new Kxe.IORedisInstrumentation({responseHook:Zxe})),Pht=it(`${JQ}.Redis`,()=>new Jxe.RedisInstrumentation({responseHook:Zxe})),Wxe=Object.assign(()=>{Mht(),Pht()},{id:JQ}),kht=(e={})=>({name:JQ,setupOnce(){WB=e,Wxe()}}),Xxe=kht});var t1e=Q(ZQ=>{"use strict";A();Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.EVENT_LISTENERS_SET=void 0;ZQ.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var z7=Q(XB=>{"use strict";A();Object.defineProperty(XB,"__esModule",{value:!0});XB.AttributeNames=void 0;var Uht;(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"})(Uht=XB.AttributeNames||(XB.AttributeNames={}))});var H7=Q(Ir=>{"use strict";A();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Ir.METRIC_DB_CLIENT_CONNECTION_COUNT=Ir.DB_SYSTEM_VALUE_POSTGRESQL=Ir.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Ir.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Ir.ATTR_NET_PEER_PORT=Ir.ATTR_NET_PEER_NAME=Ir.ATTR_DB_USER=Ir.ATTR_DB_SYSTEM=Ir.ATTR_DB_STATEMENT=Ir.ATTR_DB_NAME=Ir.ATTR_DB_CONNECTION_STRING=Ir.ATTR_DB_CLIENT_CONNECTION_STATE=Ir.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Ir.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Ir.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Ir.ATTR_DB_CONNECTION_STRING="db.connection_string";Ir.ATTR_DB_NAME="db.name";Ir.ATTR_DB_STATEMENT="db.statement";Ir.ATTR_DB_SYSTEM="db.system";Ir.ATTR_DB_USER="db.user";Ir.ATTR_NET_PEER_NAME="net.peer.name";Ir.ATTR_NET_PEER_PORT="net.peer.port";Ir.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Ir.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Ir.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Ir.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Ir.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var $7=Q(eN=>{"use strict";A();Object.defineProperty(eN,"__esModule",{value:!0});eN.SpanNames=void 0;var Lht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Lht=eN.SpanNames||(eN.SpanNames={}))});var u1e=Q(Wn=>{"use strict";A();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.sanitizedErrorMessage=Wn.isObjectWithTextString=Wn.getErrorMessage=Wn.patchClientConnectCallback=Wn.patchCallbackPGPool=Wn.updateCounter=Wn.getPoolName=Wn.patchCallback=Wn.handleExecutionResult=Wn.handleConfigQuery=Wn.shouldSkipInstrumentation=Wn.getSemanticAttributesFromPoolConnection=Wn.getSemanticAttributesFromConnection=Wn.getConnectionString=Wn.parseAndMaskConnectionString=Wn.parseNormalizedOperationName=Wn.getQuerySpanName=void 0;var f_=(Le(),we(Je)),WQ=z7(),xd=($n(),we(Nr)),ni=H7(),CS=Xt(),n1e=$7();function r1e(e,t){if(!t)return n1e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:o1e(t.text);return`${n1e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}Wn.getQuerySpanName=r1e;function o1e(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}Wn.parseNormalizedOperationName=o1e;function i1e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}Wn.parseAndMaskConnectionString=i1e;function V7(e){if("connectionString"in e&&e.connectionString)return i1e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}Wn.getConnectionString=V7;function XQ(e){if(Number.isInteger(e))return e}function a1e(e,t){let n={};return t&CS.SemconvStability.OLD&&(n={...n,[ni.ATTR_DB_SYSTEM]:ni.DB_SYSTEM_VALUE_POSTGRESQL,[ni.ATTR_DB_NAME]:e.database,[ni.ATTR_DB_CONNECTION_STRING]:V7(e),[ni.ATTR_DB_USER]:e.user,[ni.ATTR_NET_PEER_NAME]:e.host,[ni.ATTR_NET_PEER_PORT]:XQ(e.port)}),t&CS.SemconvStability.STABLE&&(n={...n,[xd.ATTR_DB_SYSTEM_NAME]:xd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[xd.ATTR_DB_NAMESPACE]:e.namespace,[xd.ATTR_SERVER_ADDRESS]:e.host,[xd.ATTR_SERVER_PORT]:XQ(e.port)}),n}Wn.getSemanticAttributesFromConnection=a1e;function Qht(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[WQ.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[WQ.AttributeNames.MAX_CLIENT]:e.maxClient};return t&CS.SemconvStability.OLD&&(r={...r,[ni.ATTR_DB_SYSTEM]:ni.DB_SYSTEM_VALUE_POSTGRESQL,[ni.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[ni.ATTR_DB_CONNECTION_STRING]:V7(e),[ni.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[ni.ATTR_NET_PEER_PORT]:Number(n?.port)||XQ(e.port),[ni.ATTR_DB_USER]:n?.username??e.user}),t&CS.SemconvStability.STABLE&&(r={...r,[xd.ATTR_DB_SYSTEM_NAME]:xd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[xd.ATTR_DB_NAMESPACE]:e.namespace,[xd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[xd.ATTR_SERVER_PORT]:Number(n?.port)||XQ(e.port)}),r}Wn.getSemanticAttributesFromPoolConnection=Qht;function Fht(e){return e.requireParentSpan===!0&&f_.trace.getSpan(f_.context.active())===void 0}Wn.shouldSkipInstrumentation=Fht;function Ght(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=r1e(i,r),c=e.startSpan(a,{kind:f_.SpanKind.CLIENT,attributes:a1e(o,n)});if(!r)return c;if(r.text&&(n&CS.SemconvStability.OLD&&c.setAttribute(ni.ATTR_DB_STATEMENT,r.text),n&CS.SemconvStability.STABLE&&c.setAttribute(xd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(WQ.AttributeNames.PG_VALUES,d)}catch(d){f_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(WQ.AttributeNames.PG_PLAN,r.name),c}Wn.handleConfigQuery=Ght;function s1e(e,t,n){typeof e.responseHook=="function"&&(0,CS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&f_.diag.error("Error running response hook",r)},!0)}Wn.handleExecutionResult=s1e;function jht(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[xd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(e4(a)),t.setStatus({code:f_.SpanStatusCode.ERROR,message:a.message})):s1e(e,t,c),o(),t.end(),n.call(this,a,c)}}Wn.patchCallback=jht;function zht(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()}Wn.getPoolName=zht;function Hht(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[ni.ATTR_DB_CLIENT_CONNECTION_STATE]:ni.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[ni.ATTR_DB_CLIENT_CONNECTION_STATE]:ni.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}Wn.updateCounter=Hht;function $ht(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(e4(r)),e.setStatus({code:f_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}Wn.patchCallbackPGPool=$ht;function Vht(e,t){return function(r){r&&(r instanceof Error&&e.recordException(e4(r)),e.setStatus({code:f_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}Wn.patchClientConnectCallback=Vht;function qht(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Wn.getErrorMessage=qht;function Yht(e){return typeof e=="object"&&typeof e?.text=="string"}Wn.isObjectWithTextString=Yht;function e4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}Wn.sanitizedErrorMessage=e4});var c1e=Q(Ub=>{"use strict";A();Object.defineProperty(Ub,"__esModule",{value:!0});Ub.PACKAGE_NAME=Ub.PACKAGE_VERSION=void 0;Ub.PACKAGE_VERSION="0.66.0";Ub.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var m1e=Q(n4=>{"use strict";A();Object.defineProperty(n4,"__esModule",{value:!0});n4.PgInstrumentation=void 0;var Cu=Xt(),Mr=(Le(),we(Je)),l1e=t1e(),Fo=u1e(),d1e=x7(),p1e=c1e(),f1e=$7(),t4=hr(),Fp=($n(),we(Nr)),tN=H7();function Lb(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var q7=class extends Cu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(p1e.PACKAGE_NAME,p1e.PACKAGE_VERSION,t),this._semconvStability=(0,Cu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Fp.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Mr.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(tN.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(tN.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 Cu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Cu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Cu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Lb(c);return this._patchPgClient(d.Client),c},c=>{let d=Lb(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Cu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Lb(c);return(0,Cu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Lb(c);(0,Cu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Lb(t);return(0,Cu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Cu.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=Lb(t);return(0,Cu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Cu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(f1e.SpanNames.CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchClientConnectCallback(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return A1e(a,c)}}recordOperationDuration(t,n){let r={},o=[Fp.ATTR_DB_NAMESPACE,Fp.ATTR_ERROR_TYPE,Fp.ATTR_SERVER_PORT,Fp.ATTR_SERVER_ADDRESS,Fp.ATTR_DB_OPERATION_NAME];this._semconvStability&Cu.SemconvStability.OLD&&o.push(tN.ATTR_DB_SYSTEM),this._semconvStability&Cu.SemconvStability.STABLE&&o.push(Fp.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,t4.hrTimeToMilliseconds)((0,t4.hrTimeDuration)(n,(0,t4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Fo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,t4.hrTime)(),a=o[0],c=typeof a=="string",d=Fo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[tN.ATTR_DB_SYSTEM]:tN.DB_SYSTEM_VALUE_POSTGRESQL,[Fp.ATTR_DB_NAMESPACE]:this.database,[Fp.ATTR_SERVER_PORT]:this.connectionParameters.port,[Fp.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[Fp.ATTR_DB_OPERATION_NAME]=Fo.parseNormalizedOperationName(m?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Fo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,m);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,d1e.addSqlCommenterComment)(b,a):d&&!("name"in a)&&(o[0]={...a,text:(0,d1e.addSqlCommenterComment)(b,a.text)})),o.length>0){let N=Mr.trace.getSpan(Mr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Fo.patchCallback(S,b,o[o.length-1],h,y),N&&(o[o.length-1]=Mr.context.bind(Mr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Fo.patchCallback(t.getConfig(),b,m.callback,h,y);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=S;typeof R=="function"&&m&&(0,Cu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:F,user:$}=this.connectionParameters;R(b,{connection:{database:N,host:M,port:F,user:$},query:{text:m.text,values:m.values,name:m.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let B;try{B=n.apply(this,o)}catch(N){throw N instanceof Error&&b.recordException(Fo.sanitizedErrorMessage(N)),b.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(N)}),b.end(),N}return B instanceof Promise?B.then(N=>new Promise(M=>{Fo.handleExecutionResult(t.getConfig(),b,N),y(),b.end(),M(N)})).catch(N=>new Promise((M,F)=>{N instanceof Error&&b.recordException(Fo.sanitizedErrorMessage(N)),b.setStatus({code:Mr.SpanStatusCode.ERROR,message:N.message}),y(),b.end(),F(N)})):B})}_setPoolConnectEventListeners(t){if(t[l1e.EVENT_LISTENERS_SET])return;let n=Fo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[l1e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(f1e.SpanNames.POOL_CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchCallbackPGPool(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return A1e(a,c)}}};n4.PgInstrumentation=q7;function A1e(e,t){if(!(t instanceof Promise))return t;let n=t;return Mr.context.bind(Mr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Fo.sanitizedErrorMessage(r)),e.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var g1e=Q(Qb=>{"use strict";A();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.AttributeNames=Qb.PgInstrumentation=void 0;var Kht=m1e();Object.defineProperty(Qb,"PgInstrumentation",{enumerable:!0,get:function(){return Kht.PgInstrumentation}});var Jht=z7();Object.defineProperty(Qb,"AttributeNames",{enumerable:!0,get:function(){return Jht.AttributeNames}})});var h1e,_1e,E1e,Zht,S1e,y1e=O(()=>{A();h1e=ue(g1e(),1);pr();_1e="Postgres",E1e=it(_1e,h1e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Or(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Zht=e=>({name:_1e,setupOnce(){E1e(e)}}),S1e=Zht});var A_,K7,T1e,Wht,Xht,I1e,Y7,e_t,C1e,b1e=O(()=>{A();Le();A_=ue(Xt(),1);$n();dt();pr();AS();K7="PostgresJs",T1e=[">=3.0.0 <4"],Wht=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Xht=Symbol.for("sentry.query.from.instrumented.sql"),I1e=it(K7,e=>new Y7({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),Y7=class extends A_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Vn,t)}init(){let t=new A_.InstrumentationNodeModuleDefinition("postgres",T1e,n=>{try{return this._patchPostgres(n)}catch(r){return sa&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new A_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,T1e,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 sa&&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 sa&&Z.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return a9(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(J1(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ft.getSpan(qe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(VI,r);return}let o=n?.match(Wht);o?.[1]&&t.setAttribute(VI,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[Xht])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ba({name:a||"postgresjs.query",op:"db"},c=>{Or(c,"auto.db.postgresjs"),c.setAttributes({[M0]:"postgres",[CH]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,A_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),sa&&Z.error(`Error in requestHook for ${K7} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){sa&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(S,b,R)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,R)=>{try{c.setStatus({code:2,message:R?.[0]?.message||"unknown_error"}),c.setAttribute(bH,R?.[0]?.code||"unknown"),c.setAttribute(vH,R?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(B){sa&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(S,b,R)}});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}},e_t=e=>({name:K7,setupOnce(){I1e(e)}}),C1e=e_t});var v1e=Q(nN=>{"use strict";A();Object.defineProperty(nN,"__esModule",{value:!0});nN.SeverityNumber=void 0;var t_t;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(t_t=nN.SeverityNumber||(nN.SeverityNumber={}))});var o4=Q(Fb=>{"use strict";A();Object.defineProperty(Fb,"__esModule",{value:!0});Fb.NOOP_LOGGER=Fb.NoopLogger=void 0;var r4=class{emit(t){}};Fb.NoopLogger=r4;Fb.NOOP_LOGGER=new r4});var a4=Q(Gb=>{"use strict";A();Object.defineProperty(Gb,"__esModule",{value:!0});Gb.NOOP_LOGGER_PROVIDER=Gb.NoopLoggerProvider=void 0;var n_t=o4(),i4=class{getLogger(t,n,r){return new n_t.NoopLogger}};Gb.NoopLoggerProvider=i4;Gb.NOOP_LOGGER_PROVIDER=new i4});var Z7=Q(s4=>{"use strict";A();Object.defineProperty(s4,"__esModule",{value:!0});s4.ProxyLogger=void 0;var r_t=o4(),J7=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):r_t.NOOP_LOGGER}};s4.ProxyLogger=J7});var X7=Q(u4=>{"use strict";A();Object.defineProperty(u4,"__esModule",{value:!0});u4.ProxyLoggerProvider=void 0;var o_t=a4(),i_t=Z7(),W7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new i_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:o_t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};u4.ProxyLoggerProvider=W7});var R1e=Q(c4=>{"use strict";A();Object.defineProperty(c4,"__esModule",{value:!0});c4._globalThis=void 0;c4._globalThis=typeof globalThis=="object"?globalThis:global});var D1e=Q(l4=>{"use strict";A();Object.defineProperty(l4,"__esModule",{value:!0});l4._globalThis=void 0;var a_t=R1e();Object.defineProperty(l4,"_globalThis",{enumerable:!0,get:function(){return a_t._globalThis}})});var x1e=Q(d4=>{"use strict";A();Object.defineProperty(d4,"__esModule",{value:!0});d4._globalThis=void 0;var s_t=D1e();Object.defineProperty(d4,"_globalThis",{enumerable:!0,get:function(){return s_t._globalThis}})});var B1e=Q(aA=>{"use strict";A();Object.defineProperty(aA,"__esModule",{value:!0});aA.API_BACKWARDS_COMPATIBILITY_VERSION=aA.makeGetter=aA._global=aA.GLOBAL_LOGS_API_KEY=void 0;var u_t=x1e();aA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");aA._global=u_t._globalThis;function c_t(e,t,n){return r=>r===e?t:n}aA.makeGetter=c_t;aA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var O1e=Q(p4=>{"use strict";A();Object.defineProperty(p4,"__esModule",{value:!0});p4.LogsAPI=void 0;var Bd=B1e(),l_t=a4(),N1e=X7(),eY=class e{constructor(){this._proxyLoggerProvider=new N1e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,l_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new N1e.ProxyLoggerProvider}};p4.LogsAPI=eY});var tY=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.logs=Pa.ProxyLoggerProvider=Pa.ProxyLogger=Pa.NoopLoggerProvider=Pa.NOOP_LOGGER_PROVIDER=Pa.NoopLogger=Pa.NOOP_LOGGER=Pa.SeverityNumber=void 0;var d_t=v1e();Object.defineProperty(Pa,"SeverityNumber",{enumerable:!0,get:function(){return d_t.SeverityNumber}});var w1e=o4();Object.defineProperty(Pa,"NOOP_LOGGER",{enumerable:!0,get:function(){return w1e.NOOP_LOGGER}});Object.defineProperty(Pa,"NoopLogger",{enumerable:!0,get:function(){return w1e.NoopLogger}});var M1e=a4();Object.defineProperty(Pa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return M1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Pa,"NoopLoggerProvider",{enumerable:!0,get:function(){return M1e.NoopLoggerProvider}});var p_t=Z7();Object.defineProperty(Pa,"ProxyLogger",{enumerable:!0,get:function(){return p_t.ProxyLogger}});var f_t=X7();Object.defineProperty(Pa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return f_t.ProxyLoggerProvider}});var A_t=O1e();Pa.logs=A_t.LogsAPI.getInstance()});var P1e=Q(jb=>{"use strict";A();Object.defineProperty(jb,"__esModule",{value:!0});jb.disableInstrumentations=jb.enableInstrumentations=void 0;function m_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}jb.enableInstrumentations=m_t;function g_t(e){e.forEach(t=>t.disable())}jb.disableInstrumentations=g_t});var L1e=Q(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.registerInstrumentations=void 0;var k1e=(Le(),we(Je)),h_t=tY(),U1e=P1e();function __t(e){let t=e.tracerProvider||k1e.trace.getTracerProvider(),n=e.meterProvider||k1e.metrics.getMeterProvider(),r=e.loggerProvider||h_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,U1e.enableInstrumentations)(o,t,n,r),()=>{(0,U1e.disableInstrumentations)(o)}}f4.registerInstrumentations=__t});var q1e=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.satisfies=void 0;var iY=(Le(),we(Je)),z1e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,E_t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,S_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function y_t(e,t,n){if(!T_t(e))return iY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=v_t(e);if(!r)return!1;let o=[],i=H1e(r,t,o,n);return i&&!n?.includePrerelease?C_t(r,o):i}A4.satisfies=y_t;function T_t(e){return typeof e=="string"&&z1e.test(e)}function H1e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(nY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=q_t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!nY(e,i,n,r))return!1;return!0}return nY(e,t,n,r)}function nY(e,t,n,r){if(t=b_t(t,r),t.includes(" "))return H1e(e,t,n,r);{let o=R_t(t);return n.push(o),I_t(e,o)}}function I_t(e,t){if(t.invalid)return!1;if(!t.version||oY(t.version))return!0;let n=F1e(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=F1e(r,o)}return S_t[t.op]?.includes(n)}function C_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function b_t(e,t){return e=e.trim(),e=$_t(e,t),e=H_t(e),e=V_t(e,t),e=e.trim(),e}function bu(e){return!e||e.toLowerCase()==="x"||e==="*"}function v_t(e){let t=e.match(z1e);if(!t){iY.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 R_t(e){if(!e)return{};let t=e.match(E_t);if(!t)return iY.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 oY(e){return e==="*"||e==="x"||e==="X"}function Q1e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function D_t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function x_t(e,t){if(oY(e)||oY(t))return 0;let[n,r]=D_t(Q1e(e),Q1e(t));return n>r?1:n<r?-1:0}function F1e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=x_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $1e="[a-zA-Z0-9-]",V1e="0|[1-9]\\d*",B_t=`\\d*[a-zA-Z-]${$1e}*`,N_t="((?:<|>)?=?)",G1e=`(?:${V1e}|${B_t})`,O_t=`(?:-(${G1e}(?:\\.${G1e})*))`,j1e=`${$1e}+`,w_t=`(?:\\+(${j1e}(?:\\.${j1e})*))`,rY=`${V1e}|x|X|\\*`,rN=`[v=\\s]*(${rY})(?:\\.(${rY})(?:\\.(${rY})(?:${O_t})?${w_t}?)?)?`,M_t=`^${N_t}\\s*${rN}$`,P_t=new RegExp(M_t),k_t=`^\\s*(${rN})\\s+-\\s+(${rN})\\s*$`,U_t=new RegExp(k_t),L_t="(?:~>?)",Q_t=`^${L_t}${rN}$`,F_t=new RegExp(Q_t),G_t="(?:\\^)",j_t=`^${G_t}${rN}$`,z_t=new RegExp(j_t);function H_t(e){let t=F_t;return e.replace(t,(n,r,o,i,a)=>{let c;return bu(r)?c="":bu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:bu(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 $_t(e,t){let n=z_t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return bu(i)?m="":bu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:bu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function V_t(e,t){let n=P_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=bu(i),h=m||bu(a),y=h||bu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?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==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function q_t(e,t){let n=U_t;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,b,R)=>(bu(i)?o="":bu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:bu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,bu(y)?h="":bu(S)?h=`<${+y+1}.0.0-0`:bu(b)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${b}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var aY=Q(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.massUnwrap=ls.unwrap=ls.massWrap=ls.wrap=void 0;var vu=console.error.bind(console);function oN(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 Y_t=(e,t,n)=>{if(!e||!e[t]){vu("no original function "+String(t)+" to wrap");return}if(!n){vu("no wrapper function"),vu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){vu("original object and wrapper must be functions");return}let o=n(r,t);return oN(o,"__original",r),oN(o,"__unwrap",()=>{e[t]===o&&oN(e,t,r)}),oN(o,"__wrapped",!0),oN(e,t,o),o};ls.wrap=Y_t;var K_t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{vu("must provide one or more modules to patch"),vu(new Error().stack);return}if(!(t&&Array.isArray(t))){vu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ls.wrap)(r,o,n)})})};ls.massWrap=K_t;var J_t=(e,t)=>{if(!e||!e[t]){vu("no function to unwrap."),vu(new Error().stack);return}let n=e[t];if(!n.__unwrap)vu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ls.unwrap=J_t;var Z_t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{vu("must provide one or more modules to patch"),vu(new Error().stack);return}if(!(t&&Array.isArray(t))){vu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ls.unwrap)(n,r)})})};ls.massUnwrap=Z_t;function iN(e){e&&e.logger&&(typeof e.logger!="function"?vu("new logger isn't a function, not replacing"):vu=e.logger)}ls.default=iN;iN.wrap=ls.wrap;iN.massWrap=ls.massWrap;iN.unwrap=ls.unwrap;iN.massUnwrap=ls.massUnwrap});var Y1e=Q(g4=>{"use strict";A();Object.defineProperty(g4,"__esModule",{value:!0});g4.InstrumentationAbstract=void 0;var sY=(Le(),we(Je)),W_t=tY(),m4=aY(),uY=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=sY.diag.createComponentLogger({namespace:t}),this._tracer=sY.trace.getTracer(t,n),this._meter=sY.metrics.getMeter(t,n),this._logger=W_t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=m4.wrap;_unwrap=m4.unwrap;_massWrap=m4.massWrap;_massUnwrap=m4.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)}}};g4.InstrumentationAbstract=uY});var K1e=Q(m_=>{"use strict";A();Object.defineProperty(m_,"__esModule",{value:!0});m_.ModuleNameTrie=m_.ModuleNameSeparator=void 0;m_.ModuleNameSeparator="/";var h4=class{hooks=[];children=new Map},cY=class{_trie=new h4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(m_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new h4,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(m_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};m_.ModuleNameTrie=cY});var Z1e=Q(_4=>{"use strict";A();Object.defineProperty(_4,"__esModule",{value:!0});_4.RequireInTheMiddleSingleton=void 0;var X_t=F0(),J1e=Ue("path"),lY=K1e(),eEt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),dY=class e{_moduleNameTrie=new lY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new X_t.Hook(null,{internals:!0},(t,n,r)=>{let o=tEt(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 eEt?new e:this._instance=this._instance??new e}};_4.RequireInTheMiddleSingleton=dY;function tEt(e){return J1e.sep!==lY.ModuleNameSeparator?e.split(J1e.sep).join(lY.ModuleNameSeparator):e}});var pY=Q(g_=>{"use strict";A();Object.defineProperty(g_,"__esModule",{value:!0});g_.isWrapped=g_.safeExecuteInTheMiddleAsync=g_.safeExecuteInTheMiddle=void 0;function nEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}g_.safeExecuteInTheMiddle=nEt;async function rEt(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}}g_.safeExecuteInTheMiddleAsync=rEt;function oEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}g_.isWrapped=oEt});var eBe=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.InstrumentationBase=void 0;var aN=Ue("path"),W1e=Ue("util"),iEt=q1e(),fY=aY(),aEt=Y1e(),sEt=Z1e(),uEt=qq(),sN=(Le(),we(Je)),cEt=F0(),lEt=Ue("fs"),dEt=pY(),AY=class extends aEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=sEt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,dEt.isWrapped)(t[n])&&this._unwrap(t,n),W1e.types.isProxy(t)){let o=(0,fY.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,fY.wrap)(t,n,r)};_unwrap=(t,n)=>W1e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,fY.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{sN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){sN.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{sN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){sN.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=Ue.resolve(n);Ue.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,lEt.readFileSync)(aN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{sN.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 X1e(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=aN.normalize(r);return a.filter(m=>m.name===c).filter(m=>X1e(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,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(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&aN.isAbsolute(c)){let m=aN.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=aN.isAbsolute(t.name)?new cEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new uEt.Hook([t.name],{internals:!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}};E4.InstrumentationBase=AY;function X1e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,iEt.satisfies)(t,r,{includePrerelease:n}))}});var tBe=Q(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.normalize=void 0;var pEt=Ue("path");Object.defineProperty(S4,"normalize",{enumerable:!0,get:function(){return pEt.normalize}})});var nBe=Q(zb=>{"use strict";A();Object.defineProperty(zb,"__esModule",{value:!0});zb.normalize=zb.InstrumentationBase=void 0;var fEt=eBe();Object.defineProperty(zb,"InstrumentationBase",{enumerable:!0,get:function(){return fEt.InstrumentationBase}});var AEt=tBe();Object.defineProperty(zb,"normalize",{enumerable:!0,get:function(){return AEt.normalize}})});var mY=Q(Hb=>{"use strict";A();Object.defineProperty(Hb,"__esModule",{value:!0});Hb.normalize=Hb.InstrumentationBase=void 0;var rBe=nBe();Object.defineProperty(Hb,"InstrumentationBase",{enumerable:!0,get:function(){return rBe.InstrumentationBase}});Object.defineProperty(Hb,"normalize",{enumerable:!0,get:function(){return rBe.normalize}})});var oBe=Q(y4=>{"use strict";A();Object.defineProperty(y4,"__esModule",{value:!0});y4.InstrumentationNodeModuleDefinition=void 0;var gY=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||[]}};y4.InstrumentationNodeModuleDefinition=gY});var iBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationNodeModuleFile=void 0;var mEt=mY(),hY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,mEt.normalize)(t)}};T4.InstrumentationNodeModuleFile=hY});var aBe=Q(bS=>{"use strict";A();Object.defineProperty(bS,"__esModule",{value:!0});bS.semconvStabilityFromStr=bS.SemconvStability=void 0;var I4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(I4=bS.SemconvStability||(bS.SemconvStability={}));function gEt(e,t){let n=I4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=I4.DUPLICATE;break}else o.toLowerCase()===e&&(n=I4.STABLE);return n}bS.semconvStabilityFromStr=gEt});var uBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.semconvStabilityFromStr=zi.SemconvStability=zi.safeExecuteInTheMiddleAsync=zi.safeExecuteInTheMiddle=zi.isWrapped=zi.InstrumentationNodeModuleFile=zi.InstrumentationNodeModuleDefinition=zi.InstrumentationBase=zi.registerInstrumentations=void 0;var hEt=L1e();Object.defineProperty(zi,"registerInstrumentations",{enumerable:!0,get:function(){return hEt.registerInstrumentations}});var _Et=mY();Object.defineProperty(zi,"InstrumentationBase",{enumerable:!0,get:function(){return _Et.InstrumentationBase}});var EEt=oBe();Object.defineProperty(zi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return EEt.InstrumentationNodeModuleDefinition}});var SEt=iBe();Object.defineProperty(zi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return SEt.InstrumentationNodeModuleFile}});var _Y=pY();Object.defineProperty(zi,"isWrapped",{enumerable:!0,get:function(){return _Y.isWrapped}});Object.defineProperty(zi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return _Y.safeExecuteInTheMiddle}});Object.defineProperty(zi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return _Y.safeExecuteInTheMiddleAsync}});var sBe=aBe();Object.defineProperty(zi,"SemconvStability",{enumerable:!0,get:function(){return sBe.SemconvStability}});Object.defineProperty(zi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return sBe.semconvStabilityFromStr}})});function IEt(){let e=$b[SY];return e?.helper?e.helper:$b[EY]?.helper}function CEt(e){let t={helper:e};$b[SY]=t,$b[EY]=t}function bEt(){delete $b[SY],delete $b[EY]}function DEt(e){switch(e){case"client":return Zr.CLIENT;case"internal":default:return Zr.INTERNAL}}function dBe(e,t,n,r,o){if(pBe(t.name,o))return;let i={attributes:t.attributes,kind:DEt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dBe(e,d,n,r,o);a.end(t.endTime)})}function cBe(e,t){return BEt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function BEt(e){return e!=null&&typeof e.then=="function"}function pBe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var C4,yEt,TEt,EY,SY,$b,vEt,REt,xEt,fBe,lBe,NEt,OEt,ABe,mBe=O(()=>{A();Le();C4=ue(uBe(),1);Le();yEt={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"}},TEt=yEt.version.split(".")[0],EY="PRISMA_INSTRUMENTATION",SY=`V${TEt}_PRISMA_INSTRUMENTATION`,$b=globalThis;vEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",REt="00-10-10-00";xEt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ft.getSpanContext(e??qe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:REt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dBe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return qe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!vEt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pBe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cBe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cBe(i,t(i,r)))}};fBe={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},lBe=fBe.version,NEt=fBe.name,OEt="@prisma/client",ABe=class extends C4.InstrumentationBase{tracerProvider;constructor(e={}){super(NEt,lBe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new C4.InstrumentationNodeModuleDefinition(OEt,[lBe])]}enable(){let e=this._config;CEt(new xEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){bEt()}isEnabled(){return IEt()!==void 0}}});function wEt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hBe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function MEt(e){switch(e){case"client":return Zr.CLIENT;case"internal":default:return Zr.INTERNAL}}var gBe,yY,PEt,_Be,EBe=O(()=>{A();Le();mBe();dt();pr();gBe="Prisma";yY=class extends ABe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hBe();wEt(t)&&(t.createEngineSpan=n=>{let r=Ft.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){_i(()=>{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=MEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ds.SAMPLED}})),y=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:Ds.SAMPLED});qe.with(y,()=>{let S={generateTraceId:()=>m,generateSpanId:()=>d};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}})}};PEt=it(gBe,e=>new yY(e)),_Be=e=>({name:gBe,setupOnce(){PEt(e)},setup(t){hBe()&&t.on("spanStart",n=>{let r=xt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Nt,"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 SBe=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.PACKAGE_NAME=Vb.PACKAGE_VERSION=void 0;Vb.PACKAGE_VERSION="0.60.0";Vb.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var TY=Q(sA=>{"use strict";A();Object.defineProperty(sA,"__esModule",{value:!0});sA.HapiLifecycleMethodNames=sA.HapiLayerType=sA.handlerPatched=sA.HapiComponentName=void 0;sA.HapiComponentName="@hapi/hapi";sA.handlerPatched=Symbol("hapi-handler-patched");sA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};sA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var yBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.ATTR_HTTP_METHOD=void 0;b4.ATTR_HTTP_METHOD="http.method"});var IY=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.AttributeNames=void 0;var kEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(kEt=uN.AttributeNames||(uN.AttributeNames={}))});var CBe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.getPluginFromInput=Hi.getExtMetadata=Hi.getRouteMetadata=Hi.isPatchableExtMethod=Hi.isDirectExtInput=Hi.isLifecycleExtEventObj=Hi.isLifecycleExtType=Hi.getPluginName=void 0;var TBe=($n(),we(Nr)),UEt=yBe(),cN=TY(),h_=IY(),IBe=Xt();function LEt(e){return e.name?e.name:e.pkg.name}Hi.getPluginName=LEt;var QEt=e=>typeof e=="string"&&cN.HapiLifecycleMethodNames.has(e);Hi.isLifecycleExtType=QEt;var FEt=e=>{let t=e?.type;return t!==void 0&&(0,Hi.isLifecycleExtType)(t)};Hi.isLifecycleExtEventObj=FEt;var GEt=e=>Array.isArray(e)&&e.length<=3&&(0,Hi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";Hi.isDirectExtInput=GEt;var jEt=e=>!Array.isArray(e);Hi.isPatchableExtMethod=jEt;var zEt=(e,t,n)=>{let r={[TBe.ATTR_HTTP_ROUTE]:e.path};t&IBe.SemconvStability.OLD&&(r[UEt.ATTR_HTTP_METHOD]=e.method),t&IBe.SemconvStability.STABLE&&(r[TBe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[h_.AttributeNames.HAPI_TYPE]=cN.HapiLayerType.PLUGIN,r[h_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[h_.AttributeNames.HAPI_TYPE]=cN.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};Hi.getRouteMetadata=zEt;var HEt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[h_.AttributeNames.EXT_TYPE]:e,[h_.AttributeNames.HAPI_TYPE]:cN.HapiLayerType.EXT,[h_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[h_.AttributeNames.EXT_TYPE]:e,[h_.AttributeNames.HAPI_TYPE]:cN.HapiLayerType.EXT},name:r}};Hi.getExtMetadata=HEt;var $Et=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;Hi.getPluginFromInput=$Et});var RBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.HapiInstrumentation=void 0;var _l=(Le(),we(Je)),bBe=hr(),lN=Xt(),vBe=SBe(),dN=TY(),Vm=CBe(),CY=class extends lN.InstrumentationBase{_semconvStability;constructor(t={}){super(vBe.PACKAGE_NAME,vBe.PACKAGE_VERSION,t),this._semconvStability=(0,lN.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new lN.InstrumentationNodeModuleDefinition(dN.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,lN.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,lN.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,Vm.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Vm.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Vm.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,Vm.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Vm.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,Vm.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Vm.isPatchableExtMethod)(t))return t[dN.handlerPatched]===!0?t:(t[dN.handlerPatched]=!0,async function(...a){if(_l.trace.getSpan(_l.context.active())===void 0)return await t.apply(this,a);let c=(0,Vm.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await _l.context.with(_l.trace.setSpan(_l.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:_l.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[dN.handlerPatched]===!0)return t;t[dN.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,bBe.getRPCMetadata)(_l.context.active());c?.type===bBe.RPCType.HTTP&&(c.route=t.path);let d=(0,Vm.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await _l.context.with(_l.trace.setSpan(_l.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:_l.SpanStatusCode.ERROR,message:h.message}),h}finally{m.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}};v4.HapiInstrumentation=CY});var DBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.AttributeNames=qb.HapiInstrumentation=void 0;var VEt=RBe();Object.defineProperty(qb,"HapiInstrumentation",{enumerable:!0,get:function(){return VEt.HapiInstrumentation}});var qEt=IY();Object.defineProperty(qb,"AttributeNames",{enumerable:!0,get:function(){return qEt.AttributeNames}})});var xBe,BBe,NBe,YEt,OBe,wBe=O(()=>{A();xBe=ue(DBe(),1);pr();BBe="Hapi",NBe=it(BBe,()=>new xBe.HapiInstrumentation),YEt=()=>({name:BBe,setupOnce(){NBe()}}),OBe=YEt});var __,pN,bY=O(()=>{A();__={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},pN={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var D4,KEt,JEt,R4,MBe=O(()=>{A();Le();D4=ue(Xt(),1);dt();bY();KEt="@sentry/instrumentation-hono",JEt="0.0.1",R4=class extends D4.InstrumentationBase{constructor(t={}){super(KEt,JEt,t)}init(){return[new D4.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 qe.with(Ft.setSpan(qe.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ns(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[__.HONO_TYPE]:m,[__.HONO_NAME]:m===pN.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[__.HONO_TYPE]:d,[__.HONO_NAME]:d===pN.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 ns(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?pN.MIDDLEWARE:pN.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Wo.ERROR,message:n.message}),t.recordException(n))}}});function ZEt(e){let t=xt(e).data,n=t[__.HONO_TYPE];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.hono",[Yt]:`${n}.hono`});let r=t[__.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Nn()===md()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ym],i=t[P0];typeof o=="string"&&typeof i=="string"&&Nn().setTransactionName(`${i} ${o}`)}var PBe,kBe,WEt,UBe,LBe=O(()=>{A();$n();dt();pr();AS();bY();MBe();PBe="Hono";kBe=it(PBe,()=>new R4({responseHook:e=>{ZEt(e)}})),WEt=()=>({name:PBe,setupOnce(){kBe()}}),UBe=WEt});var x4=Q(fN=>{"use strict";A();Object.defineProperty(fN,"__esModule",{value:!0});fN.KoaLayerType=void 0;var XEt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(XEt=fN.KoaLayerType||(fN.KoaLayerType={}))});var QBe=Q(Yb=>{"use strict";A();Object.defineProperty(Yb,"__esModule",{value:!0});Yb.PACKAGE_NAME=Yb.PACKAGE_VERSION=void 0;Yb.PACKAGE_VERSION="0.62.0";Yb.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var vY=Q(AN=>{"use strict";A();Object.defineProperty(AN,"__esModule",{value:!0});AN.AttributeNames=void 0;var e0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(e0t=AN.AttributeNames||(AN.AttributeNames={}))});var GBe=Q(Kb=>{"use strict";A();Object.defineProperty(Kb,"__esModule",{value:!0});Kb.isLayerIgnored=Kb.getMiddlewareMetadata=void 0;var FBe=x4(),B4=vY(),t0t=($n(),we(Nr)),n0t=(e,t,n,r)=>n?{attributes:{[B4.AttributeNames.KOA_NAME]:r?.toString(),[B4.AttributeNames.KOA_TYPE]:FBe.KoaLayerType.ROUTER,[t0t.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[B4.AttributeNames.KOA_NAME]:t.name??"middleware",[B4.AttributeNames.KOA_TYPE]:FBe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Kb.getMiddlewareMetadata=n0t;var r0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Kb.isLayerIgnored=r0t});var jBe=Q(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.kLayerPatched=void 0;N4.kLayerPatched=Symbol("koa-layer-patched")});var YBe=Q(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.KoaInstrumentation=void 0;var uA=(Le(),we(Je)),mN=Xt(),zBe=x4(),HBe=QBe(),$Be=GBe(),VBe=hr(),qBe=jBe(),RY=class extends mN.InstrumentationBase{constructor(t={}){super(HBe.PACKAGE_NAME,HBe.PACKAGE_VERSION,t)}init(){return new mN.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,mN.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,mN.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){uA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?zBe.KoaLayerType.ROUTER:zBe.KoaLayerType.MIDDLEWARE;return t[qBe.kLayerPatched]===!0||(0,$Be.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(uA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qBe.kLayerPatched]=!0,uA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(uA.trace.getSpan(uA.context.active())===void 0)return t(i,a);let d=(0,$Be.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,VBe.getRPCMetadata)(uA.context.active());h?.type===VBe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,mN.safeExecuteInTheMiddle)(()=>y(m,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&uA.diag.error("koa instrumentation: request hook failed",b)},!0);let S=uA.trace.setSpan(uA.context.active(),m);return uA.context.with(S,async()=>{try{return await t(i,a)}catch(b){throw m.recordException(b),b}finally{m.end()}})})}};O4.KoaInstrumentation=RY});var KBe=Q(E_=>{"use strict";A();Object.defineProperty(E_,"__esModule",{value:!0});E_.KoaLayerType=E_.AttributeNames=E_.KoaInstrumentation=void 0;var o0t=YBe();Object.defineProperty(E_,"KoaInstrumentation",{enumerable:!0,get:function(){return o0t.KoaInstrumentation}});var i0t=vY();Object.defineProperty(E_,"AttributeNames",{enumerable:!0,get:function(){return i0t.AttributeNames}});var a0t=x4();Object.defineProperty(E_,"KoaLayerType",{enumerable:!0,get:function(){return a0t.KoaLayerType}})});var JBe,ZBe,WBe,s0t,XBe,eNe=O(()=>{A();JBe=ue(KBe(),1);$n();dt();pr();AS();ZBe="Koa",WBe=it(ZBe,JBe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Or(t,"auto.http.otel.koa");let r=xt(t).data,o=r["koa.type"];o&&t.setAttribute(Yt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Nn()===md()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ym],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Nn().setTransactionName(`${c} ${a}`)}})),s0t=(e={})=>({name:ZBe,setupOnce(){WBe(e)}}),XBe=s0t});var DY=Q(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.ConnectNames=Gp.ConnectTypes=Gp.AttributeNames=void 0;var u0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(u0t=Gp.AttributeNames||(Gp.AttributeNames={}));var c0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(c0t=Gp.ConnectTypes||(Gp.ConnectTypes={}));var l0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(l0t=Gp.ConnectNames||(Gp.ConnectNames={}))});var tNe=Q(Jb=>{"use strict";A();Object.defineProperty(Jb,"__esModule",{value:!0});Jb.PACKAGE_NAME=Jb.PACKAGE_VERSION=void 0;Jb.PACKAGE_VERSION="0.57.0";Jb.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nNe=Q(w4=>{"use strict";A();Object.defineProperty(w4,"__esModule",{value:!0});w4._LAYERS_STORE_PROPERTY=void 0;w4._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rNe=Q(y_=>{"use strict";A();Object.defineProperty(y_,"__esModule",{value:!0});y_.generateRoute=y_.replaceCurrentStackRoute=y_.addNewStackLayer=void 0;var d0t=(Le(),we(Je)),S_=nNe(),p0t=e=>{Array.isArray(e[S_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,S_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[S_._LAYERS_STORE_PROPERTY].push("/");let t=e[S_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[S_._LAYERS_STORE_PROPERTY].length?e[S_._LAYERS_STORE_PROPERTY].pop():d0t.diag.warn("Connect: Trying to pop the stack multiple time")}};y_.addNewStackLayer=p0t;var f0t=(e,t)=>{t&&e[S_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};y_.replaceCurrentStackRoute=f0t;var A0t=e=>e[S_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);y_.generateRoute=A0t});var aNe=Q(T_=>{"use strict";A();Object.defineProperty(T_,"__esModule",{value:!0});T_.ConnectInstrumentation=T_.ANONYMOUS_NAME=void 0;var m0t=(Le(),we(Je)),oNe=hr(),Zb=DY(),iNe=tNe(),M4=Xt(),g0t=($n(),we(Nr)),xY=rNe();T_.ANONYMOUS_NAME="anonymous";var BY=class extends M4.InstrumentationBase{constructor(t={}){super(iNe.PACKAGE_NAME,iNe.PACKAGE_VERSION,t)}init(){return[new M4.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,M4.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,M4.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=Zb.ConnectTypes.REQUEST_HANDLER,i=Zb.ConnectNames.REQUEST_HANDLER,o=t):(r=Zb.ConnectTypes.MIDDLEWARE,i=Zb.ConnectNames.MIDDLEWARE,o=n.name||T_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[g0t.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Zb.AttributeNames.CONNECT_TYPE]:r,[Zb.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],y=arguments[d];(0,xY.replaceCurrentStackRoute)(m,t);let S=(0,oNe.getRPCMetadata)(m0t.context.active());t&&S?.type===oNe.RPCType.HTTP&&(S.route=(0,xY.generateRoute)(m));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||T_.ANONYMOUS_NAME}`;let R=r._startSpan(t,n);r._diag.debug("start span",b);let B=!1;function N(){B?r._diag.debug(`span ${R.name} - already finished`):(B=!0,r._diag.debug(`finishing span ${R.name}`),R.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(y,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,xY.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)}}};T_.ConnectInstrumentation=BY});var uNe=Q(Nd=>{"use strict";A();Object.defineProperty(Nd,"__esModule",{value:!0});Nd.ConnectTypes=Nd.ConnectNames=Nd.AttributeNames=Nd.ANONYMOUS_NAME=Nd.ConnectInstrumentation=void 0;var sNe=aNe();Object.defineProperty(Nd,"ConnectInstrumentation",{enumerable:!0,get:function(){return sNe.ConnectInstrumentation}});Object.defineProperty(Nd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return sNe.ANONYMOUS_NAME}});var NY=DY();Object.defineProperty(Nd,"AttributeNames",{enumerable:!0,get:function(){return NY.AttributeNames}});Object.defineProperty(Nd,"ConnectNames",{enumerable:!0,get:function(){return NY.ConnectNames}});Object.defineProperty(Nd,"ConnectTypes",{enumerable:!0,get:function(){return NY.ConnectTypes}})});var cNe,lNe,dNe,h0t,pNe,fNe=O(()=>{A();cNe=ue(uNe(),1);pr();lNe="Connect",dNe=it(lNe,()=>new cNe.ConnectInstrumentation),h0t=()=>({name:lNe,setupOnce(){dNe()}}),pNe=h0t});var ANe=Q(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.DB_SYSTEM_VALUE_MSSQL=ka.ATTR_NET_PEER_PORT=ka.ATTR_NET_PEER_NAME=ka.ATTR_DB_USER=ka.ATTR_DB_SYSTEM=ka.ATTR_DB_STATEMENT=ka.ATTR_DB_SQL_TABLE=ka.ATTR_DB_NAME=void 0;ka.ATTR_DB_NAME="db.name";ka.ATTR_DB_SQL_TABLE="db.sql.table";ka.ATTR_DB_STATEMENT="db.statement";ka.ATTR_DB_SYSTEM="db.system";ka.ATTR_DB_USER="db.user";ka.ATTR_NET_PEER_NAME="net.peer.name";ka.ATTR_NET_PEER_PORT="net.peer.port";ka.DB_SYSTEM_VALUE_MSSQL="mssql"});var mNe=Q(Wb=>{"use strict";A();Object.defineProperty(Wb,"__esModule",{value:!0});Wb.once=Wb.getSpanName=void 0;function _0t(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Wb.getSpanName=_0t;var E0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wb.once=E0t});var gNe=Q(Xb=>{"use strict";A();Object.defineProperty(Xb,"__esModule",{value:!0});Xb.PACKAGE_NAME=Xb.PACKAGE_VERSION=void 0;Xb.PACKAGE_VERSION="0.33.0";Xb.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yNe=Q(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.TediousInstrumentation=C_.INJECTED_CTX=void 0;var ev=(Le(),we(Je)),S0t=Ue("events"),cA=Xt(),vS=($n(),we(Nr)),I_=ANe(),hNe=mNe(),_Ne=gNe(),SNe=Symbol("opentelemetry.instrumentation-tedious.current-database");C_.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var ENe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function P4(e){Object.defineProperty(this,SNe,{value:e,writable:!0})}var OY=class e extends cA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_Ne.PACKAGE_NAME,_Ne.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new cA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of ENe)(0,cA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,cA.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 ENe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return P4.call(this,this.config?.options?.database),this.removeListener("databaseChange",P4),this.on("databaseChange",P4),this.once("end",()=>{this.removeListener("databaseChange",P4)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ev.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,C_.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?.[C_.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof S0t.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,y=this[SNe],S=(H=>H.sqlTextOrProcedure==="sp_prepare"&&H.parametersByName?.stmt?.value?H.parametersByName.stmt.value:H.sqlTextOrProcedure)(a),b={};o._dbSemconvStability&cA.SemconvStability.OLD&&(b[I_.ATTR_DB_SYSTEM]=I_.DB_SYSTEM_VALUE_MSSQL,b[I_.ATTR_DB_NAME]=y,b[I_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[I_.ATTR_DB_STATEMENT]=S,b[I_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&cA.SemconvStability.STABLE&&(b[vS.ATTR_DB_NAMESPACE]=y,b[vS.ATTR_DB_SYSTEM_NAME]=vS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[vS.ATTR_DB_QUERY_TEXT]=S,b[vS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&cA.SemconvStability.OLD&&(b[I_.ATTR_NET_PEER_NAME]=this.config?.server,b[I_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&cA.SemconvStability.STABLE&&(b[vS.ATTR_SERVER_ADDRESS]=this.config?.server,b[vS.ATTR_SERVER_PORT]=this.config?.options?.port);let R=o.tracer.startSpan((0,hNe.getSpanName)(t,y,S,a.table),{kind:ev.SpanKind.CLIENT,attributes:b}),B=(0,hNe.once)(H=>{a.removeListener("done",m),a.removeListener("doneInProc",m),a.removeListener("doneProc",h),a.removeListener("error",B),this.removeListener("end",B),R.setAttribute("tedious.procedure_count",c),R.setAttribute("tedious.statement_count",d),H&&R.setStatus({code:ev.SpanStatusCode.ERROR,message:H.message}),R.end()});a.on("done",m),a.on("doneInProc",m),a.on("doneProc",h),a.once("error",B),this.on("end",B),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(B)):o._diag.error("Expected request.callback to be a function");let N=()=>ev.context.with(ev.trace.setSpan(ev.context.active(),R),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let $=o._buildTraceparent(R);o._injectContextInfo(this,n,$).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};C_.TediousInstrumentation=OY});var TNe=Q(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.TediousInstrumentation=void 0;var y0t=yNe();Object.defineProperty(k4,"TediousInstrumentation",{enumerable:!0,get:function(){return y0t.TediousInstrumentation}})});var INe,T0t,CNe,bNe,I0t,vNe,RNe=O(()=>{A();INe=ue(TNe(),1);dt();pr();T0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),CNe="Tedious",bNe=it(CNe,()=>new INe.TediousInstrumentation({})),I0t=()=>{let e;return{name:CNe,setupOnce(){let t=bNe();e=W1(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=xt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";T0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},vNe=I0t});var DNe=Q(tv=>{"use strict";A();Object.defineProperty(tv,"__esModule",{value:!0});tv.PACKAGE_NAME=tv.PACKAGE_VERSION=void 0;tv.PACKAGE_VERSION="0.57.0";tv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var BNe=Q(U4=>{"use strict";A();Object.defineProperty(U4,"__esModule",{value:!0});U4.GenericPoolInstrumentation=void 0;var nv=(Le(),we(Je)),RS=Xt(),xNe=DNe(),wY="generic-pool",MY=class extends RS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(xNe.PACKAGE_NAME,xNe.PACKAGE_VERSION,t)}init(){return[new RS.InstrumentationNodeModuleDefinition(wY,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,RS.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 RS.InstrumentationNodeModuleDefinition(wY,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,RS.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 RS.InstrumentationNodeModuleDefinition(wY,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,RS.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=nv.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return nv.context.with(nv.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=nv.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return nv.context.with(nv.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};U4.GenericPoolInstrumentation=MY});var NNe=Q(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.GenericPoolInstrumentation=void 0;var C0t=BNe();Object.defineProperty(L4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return C0t.GenericPoolInstrumentation}})});var ONe,wNe,MNe,b0t,PNe,kNe=O(()=>{A();ONe=ue(NNe(),1);dt();pr();wNe="GenericPool",MNe=it(wNe,()=>new ONe.GenericPoolInstrumentation({})),b0t=()=>{let e;return{name:wNe,setupOnce(){let t=MNe();e=W1(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=xt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Nt,"auto.db.otel.generic_pool")}))}}},PNe=b0t});var PY=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.ATTR_NET_PEER_PORT=lA.ATTR_NET_PEER_NAME=lA.ATTR_MESSAGING_SYSTEM=lA.ATTR_MESSAGING_OPERATION=void 0;lA.ATTR_MESSAGING_OPERATION="messaging.operation";lA.ATTR_MESSAGING_SYSTEM="messaging.system";lA.ATTR_NET_PEER_NAME="net.peer.name";lA.ATTR_NET_PEER_PORT="net.peer.port"});var kY=Q(ri=>{"use strict";A();Object.defineProperty(ri,"__esModule",{value:!0});ri.ATTR_MESSAGING_CONVERSATION_ID=ri.OLD_ATTR_MESSAGING_MESSAGE_ID=ri.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=ri.ATTR_MESSAGING_URL=ri.ATTR_MESSAGING_PROTOCOL_VERSION=ri.ATTR_MESSAGING_PROTOCOL=ri.MESSAGING_OPERATION_VALUE_PROCESS=ri.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=ri.ATTR_MESSAGING_DESTINATION_KIND=ri.ATTR_MESSAGING_DESTINATION=void 0;ri.ATTR_MESSAGING_DESTINATION="messaging.destination";ri.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";ri.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";ri.MESSAGING_OPERATION_VALUE_PROCESS="process";ri.ATTR_MESSAGING_PROTOCOL="messaging.protocol";ri.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";ri.ATTR_MESSAGING_URL="messaging.url";ri.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";ri.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";ri.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var UY=Q(DS=>{"use strict";A();Object.defineProperty(DS,"__esModule",{value:!0});DS.DEFAULT_CONFIG=DS.EndOperation=void 0;var v0t;(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"})(v0t=DS.EndOperation||(DS.EndOperation={}));DS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var FNe=Q(oi=>{"use strict";A();Object.defineProperty(oi,"__esModule",{value:!0});oi.isConfirmChannelTracing=oi.unmarkConfirmChannelTracing=oi.markConfirmChannelTracing=oi.getConnectionAttributesFromUrl=oi.getConnectionAttributesFromServer=oi.normalizeExchange=oi.CONNECTION_ATTRIBUTES=oi.CHANNEL_CONSUME_TIMEOUT_TIMER=oi.CHANNEL_SPANS_NOT_ENDED=oi.MESSAGE_STORED_SPAN=void 0;var LY=(Le(),we(Je)),b_=Xt(),Q4=($n(),we(Nr)),gN=PY(),F4=kY();oi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");oi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");oi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");oi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var QY=(0,LY.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),R0t=e=>e!==""?e:"<default>";oi.normalizeExchange=R0t;var D0t=e=>e.replace(/:[^:@/]*@/,":***@"),UNe=(e,t)=>e||(t==="AMQP"?5672:5671),LNe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},QNe=e=>e||"localhost",dA=(e,t,n,r)=>n?{[t]:n}:(LY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),x0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[gN.ATTR_MESSAGING_SYSTEM]:t}:{}};oi.getConnectionAttributesFromServer=x0t;var B0t=(e,t)=>{let n={[F4.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=LNe(r?.protocol);Object.assign(n,{...dA(e,F4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=QNe(r?.hostname);t&b_.SemconvStability.OLD&&Object.assign(n,{...dA(e,gN.ATTR_NET_PEER_NAME,i,"hostname")}),t&b_.SemconvStability.STABLE&&Object.assign(n,{...dA(e,Q4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=UNe(r.port,o);t&b_.SemconvStability.OLD&&Object.assign(n,dA(e,gN.ATTR_NET_PEER_PORT,a,"port")),t&b_.SemconvStability.STABLE&&Object.assign(n,dA(e,Q4.ATTR_SERVER_PORT,a,"port"))}else{let r=D0t(e);n[F4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=LNe(o.protocol);Object.assign(n,{...dA(r,F4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=QNe(o.hostname);t&b_.SemconvStability.OLD&&Object.assign(n,{...dA(r,gN.ATTR_NET_PEER_NAME,a,"hostname")}),t&b_.SemconvStability.STABLE&&Object.assign(n,{...dA(r,Q4.ATTR_SERVER_ADDRESS,a,"hostname")});let c=UNe(o.port?parseInt(o.port):void 0,i);t&b_.SemconvStability.OLD&&Object.assign(n,dA(r,gN.ATTR_NET_PEER_PORT,c,"port")),t&b_.SemconvStability.STABLE&&Object.assign(n,dA(r,Q4.ATTR_SERVER_PORT,c,"port"))}catch(o){LY.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};oi.getConnectionAttributesFromUrl=B0t;var N0t=e=>e.setValue(QY,!0);oi.markConfirmChannelTracing=N0t;var O0t=e=>e.deleteValue(QY);oi.unmarkConfirmChannelTracing=O0t;var w0t=e=>e.getValue(QY)===!0;oi.isConfirmChannelTracing=w0t});var GNe=Q(rv=>{"use strict";A();Object.defineProperty(rv,"__esModule",{value:!0});rv.PACKAGE_NAME=rv.PACKAGE_VERSION=void 0;rv.PACKAGE_VERSION="0.61.0";rv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var zNe=Q(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.AmqplibInstrumentation=void 0;var Go=(Le(),we(Je)),G4=hr(),_r=Xt(),M0t=PY(),El=kY(),Ru=UY(),ii=FNe(),jNe=GNe(),j4=[">=0.5.5 <1"],FY=class extends _r.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jNe.PACKAGE_NAME,jNe.PACKAGE_VERSION,{...Ru.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,_r.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ru.DEFAULT_CONFIG,...t})}init(){let t=new _r.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",j4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new _r.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",j4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new _r.InstrumentationNodeModuleFile("amqplib/lib/connect.js",j4,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new _r.InstrumentationNodeModuleDefinition("amqplib",j4,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,_r.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,_r.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,_r.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,_r.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,_r.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ru.EndOperation.Ack)),(0,_r.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ru.EndOperation.Nack)),(0,_r.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ru.EndOperation.Reject)),(0,_r.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ru.EndOperation.AckAll)),(0,_r.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ru.EndOperation.NackAll)),(0,_r.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,_r.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,_r.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,_r.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,_r.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,_r.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,_r.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,_r.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,_r.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,_r.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,_r.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let m=(0,ii.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,ii.getConnectionAttributesFromServer)(d);d[ii.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ru.EndOperation.ChannelClosed,void 0);let i=this[ii.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ru.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Ru.EndOperation.Reject?c:d,y=m[ii.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Ru.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 d=this;if(!Object.prototype.hasOwnProperty.call(d,ii.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);y.unref(),d[ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}d[ii.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Go.propagation.extract(Go.ROOT_CONTEXT,y),b=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=S?Go.trace.getSpan(S)?.spanContext():void 0;S=void 0,F&&(R=[{context:F}])}let B=r.tracer.startSpan(`${i} process`,{kind:Go.SpanKind.CONSUMER,attributes:{...d?.connection?.[ii.CONNECTION_ATTRIBUTES],[El.ATTR_MESSAGING_DESTINATION]:b,[El.ATTR_MESSAGING_DESTINATION_KIND]:El.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[El.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[M0t.ATTR_MESSAGING_OPERATION]:El.MESSAGING_OPERATION_VALUE_PROCESS,[El.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[El.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:R},S),{consumeHook:N}=r.getConfig();N&&(0,_r.safeExecuteInTheMiddle)(()=>N(B,{moduleVersion:t,msg:h}),F=>{F&&Go.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[ii.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,G4.hrTime)()}),h[ii.MESSAGE_STORED_SPAN]=B);let M=S||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,Ru.EndOperation.AutoAck),B.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,d),{publishHook:b}=r.getConfig();b&&(0,_r.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),M=>{M&&Go.diag.error("amqplib instrumentation: publishHook error",M)},!0);let R=function(M,F){try{m?.call(this,M,F)}finally{let{publishConfirmHook:$}=r.getConfig();$&&(0,_r.safeExecuteInTheMiddle)(()=>$(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:M}),H=>{H&&Go.diag.error("amqplib instrumentation: publishConfirmHook error",H)},!0),M&&y.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},B=(0,ii.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=S,N[4]=Go.context.bind((0,ii.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,y)),R),Go.context.with(B,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,ii.isConfirmChannelTracing)(Go.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,m,d),{publishHook:S}=r.getConfig();S&&(0,_r.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let b=[...arguments];b[3]=y;let R=n.apply(this,b);return h.end(),R}}}createPublishSpan(t,n,r,o,i){let a=(0,ii.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Go.SpanKind.PRODUCER,attributes:{...o.connection[ii.CONNECTION_ATTRIBUTES],[El.ATTR_MESSAGING_DESTINATION]:n,[El.ATTR_MESSAGING_DESTINATION_KIND]:El.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[El.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[El.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[El.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Go.propagation.inject(Go.trace.setSpan(Go.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[ii.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Go.SpanStatusCode.ERROR,message:r!==Ru.EndOperation.ChannelClosed&&r!==Ru.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[ii.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[ii.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[ii.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,_r.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Go.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,G4.hrTime)(),r=t[ii.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,G4.hrTimeDuration)(a.timeOfConsume,n);if((0,G4.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Ru.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};z4.AmqplibInstrumentation=FY});var $Ne=Q(v_=>{"use strict";A();Object.defineProperty(v_,"__esModule",{value:!0});v_.EndOperation=v_.DEFAULT_CONFIG=v_.AmqplibInstrumentation=void 0;var P0t=zNe();Object.defineProperty(v_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return P0t.AmqplibInstrumentation}});var HNe=UY();Object.defineProperty(v_,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return HNe.DEFAULT_CONFIG}});Object.defineProperty(v_,"EndOperation",{enumerable:!0,get:function(){return HNe.EndOperation}})});var VNe,qNe,k0t,YNe,U0t,KNe,JNe=O(()=>{A();VNe=ue($Ne(),1);pr();qNe="Amqplib",k0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},YNe=it(qNe,()=>new VNe.AmqplibInstrumentation(k0t)),U0t=()=>({name:qNe,setupOnce(){YNe()}}),KNe=U0t});var hN,GY=O(()=>{A();hN="VercelAI"});function Q0t(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 F0t(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(G0t(t.content),j0t(t.content))}function G0t(e){for(let t of e){if(!Q0t(t))continue;let n=x9(t.toolCallId);n?ul(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"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):ul(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function j0t(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&B9(t.toolCallId)}function z0t(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 $4,L0t,ZNe,H4,WNe=O(()=>{A();$4=ue(Xt(),1);dt();GY();L0t=[">=3.0.0 <7"],ZNe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];H4=class e extends $4.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Vn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new $4.InstrumentationNodeModuleDefinition("ai",L0t,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=_t(),h=m?.getIntegrationByName(hN),y=h?.options,S=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:R}=z0t(y,c,d,S);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:b,recordOutputs:R},wp(()=>Reflect.apply(o,i,a),B=>{B&&typeof B=="object"&&ki(B,"_sentry_active_span",hd())},()=>{},B=>{F0t(B)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of ZNe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=ZNe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function H0t(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var XNe,$0t,eOe,tOe=O(()=>{A();dt();pr();GY();WNe();XNe=it(hN,()=>new H4({}));$0t=(e={})=>{let t;return{name:hN,options:e,setupOnce(){t=XNe()},afterAllSetup(n){e.force??H0t(n)?Zk(n):t?.callWhenPatched(()=>Zk(n))}}},eOe=$0t});var q4,V0t,V4,nOe=O(()=>{A();q4=ue(Xt(),1);dt();V0t=[">=4.0.0 <7"],V4=class extends q4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new q4.InstrumentationNodeModuleDefinition("openai",V0t,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(W0(Jh))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return eU(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 rOe,q0t,oOe,iOe=O(()=>{A();dt();pr();nOe();rOe=it(Jh,e=>new V4(e)),q0t=(e={})=>({name:Jh,setupOnce(){rOe(e)}}),oOe=q0t});var K4,Y0t,Y4,aOe=O(()=>{A();K4=ue(Xt(),1);dt();Y0t=[">=0.19.2 <1.0.0"],Y4=class extends K4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Vn,t)}init(){return new K4.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",Y0t,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(W0(Zh))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return tU(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 sOe,K0t,uOe,cOe=O(()=>{A();dt();pr();aOe();sOe=it(Zh,e=>new Y4(e)),K0t=(e={})=>({name:Zh,options:e,setupOnce(){sOe(e)}}),uOe=K0t});var ov,lOe,J4,dOe=O(()=>{A();ov=ue(Xt(),1);dt();lOe=[">=0.10.0 <2"],J4=class extends ov.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Vn,t)}init(){return new ov.InstrumentationNodeModuleDefinition("@google/genai",lOe,n=>this._patch(n),n=>n,[new ov.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lOe,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(W0(Wh))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return nU(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 J1(t,"GoogleGenAI",o),t}}});var pOe,J0t,fOe,AOe=O(()=>{A();dt();pr();dOe();pOe=it(Wh,e=>new J4(e)),J0t=(e={})=>({name:Wh,setupOnce(){pOe(e)}}),fOe=J0t});function Z0t(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function W0t(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=Z0t(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var R_,Z4,W4,mOe=O(()=>{A();R_=ue(Xt(),1);dt();Z4=[">=0.1.0 <2.0.0"];W4=class extends R_.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Vn,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 R_.InstrumentationNodeModuleDefinition(r,Z4,this._patch.bind(this),o=>o,[new R_.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,Z4,this._patch.bind(this),o=>o)]));return t.push(new R_.InstrumentationNodeModuleDefinition("langchain",Z4,this._patch.bind(this),r=>r,[new R_.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",Z4,this._patch.bind(this),r=>r)])),t}_patch(t){Y$([Jh,Zh,Wh]);let n=aU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=W0t(m,n))}}}});var gOe,X0t,hOe,_Oe=O(()=>{A();dt();pr();mOe();gOe=it(rU,e=>new W4(e)),X0t=(e={})=>({name:rU,setupOnce(){gOe(e)}}),hOe=X0t});var iv,EOe,X4,SOe=O(()=>{A();iv=ue(Xt(),1);dt();EOe=[">=0.0.0 <2.0.0"],X4=class extends iv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Vn,t)}init(){return new iv.InstrumentationNodeModuleDefinition("@langchain/langgraph",EOe,this._patch.bind(this),n=>n,[new iv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EOe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&uU(t.StateGraph.prototype,this.getConfig()),t}}});var yOe,eSt,TOe,IOe=O(()=>{A();dt();pr();SOe();yOe=it(sU,e=>new X4(e)),eSt=(e={})=>({name:sU,setupOnce(){yOe(e)}}),TOe=eSt});import*as bOe from"node:net";function vOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,qm.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&al.error(y?.message)},!0)});let d=new qm.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>COe(h,n,r,e,a)),m=["@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 m)d.files.push(new qm.InstrumentationNodeModuleFile(h,t,y=>COe(y,n,r,e,a),y=>ROe(y,r)));return d}function COe(e,t,n,r,o){return ROe(e,n),t(e,"addDoc",tSt(r,o)),t(e,"getDocs",rSt(r,o)),t(e,"setDoc",oSt(r,o)),t(e,"deleteDoc",nSt(r,o)),e}function ROe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,qm.isWrapped)(e[n])&&t(e,n);return e}function tSt(e,t){return function(r){return function(o,i){let a=t3(e,"addDoc",o);return t(a),e3(a,()=>r(o,i))}}}function nSt(e,t){return function(r){return function(o){let i=t3(e,"deleteDoc",o.parent||o);return t(i),e3(i,()=>r(o))}}}function rSt(e,t){return function(r){return function(o){let i=t3(e,"getDocs",o);return t(i),e3(i,()=>r(o))}}}function oSt(e,t){return function(r){return function(o,i,a){let c=t3(e,"setDoc",o.parent||o);return t(c),e3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function e3(e,t){return qe.with(Ft.setSpan(qe.active(),e),()=>(0,qm.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function t3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Zr.CLIENT});return aSt(r,n),r.setAttribute(VI,t),r}function iSt(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(bOe.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 aSt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[TH]:t.path,[IH]:n.name,[M0]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=iSt(i);c&&(a[NH]=c),d&&(a[OH]=d),e.setAttributes(a)}var qm,DOe=O(()=>{A();Le();qm=ue(Xt(),1);$n()});function xOe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(S,b)=>{(0,Ym.safeExecuteInTheMiddle)(()=>m(S,b),R=>{R&&al.error(R?.message)},!0)}),typeof d=="function"&&(i=S=>{(0,Ym.safeExecuteInTheMiddle)(()=>d(S),b=>{b&&al.error(b?.message)},!0)});let h=new Ym.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 Ym.InstrumentationNodeModuleFile(S,t,R=>sSt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},b),R=>BOe(R,r)))}),h}function Du(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:Zr.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),qe.with(Ft.setSpan(qe.active(),y),async()=>{let b,R;try{R=await a.apply(this,m)}catch(B){b=B}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function sSt(e,t,n,r,o,i){switch(BOe(e,n),i){case"function":t(e,"onRequest",Du(r,o,"http.request")),t(e,"onCall",Du(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Du(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Du(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Du(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Du(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Du(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Du(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Du(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Du(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Du(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Du(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Du(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Du(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Du(r,o,"storage.object.metadataUpdated"));break}return e}function BOe(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,Ym.isWrapped)(e[r])&&t(e,r);return e}var Ym,NOe=O(()=>{A();Le();Ym=ue(Xt(),1)});var wOe,OOe,uSt,cSt,n3,MOe=O(()=>{A();wOe=ue(Xt(),1);dt();DOe();NOe();OOe={},uSt=[">=3.0.0 <5"],cSt=[">=6.0.0 <7"],n3=class extends wOe.InstrumentationBase{constructor(t=OOe){super("@sentry/instrumentation-firebase",Vn,t)}setConfig(t={}){super.setConfig({...OOe,...t})}init(){let t=[];return t.push(vOe(this.tracer,uSt,this._wrap,this._unwrap,this.getConfig())),t.push(xOe(this.tracer,cSt,this._wrap,this._unwrap,this.getConfig())),t}}});var POe,lSt,kOe,dSt,UOe,LOe=O(()=>{A();dt();pr();MOe();POe="Firebase",lSt={firestoreSpanCreationHook:e=>{Or(e,"auto.firebase.otel.firestore"),e.setAttribute(Yt,"db.query")},functions:{requestHook:e=>{Or(e,"auto.firebase.otel.functions"),e.setAttribute(Yt,"http.request")},errorHook:async(e,t)=>{t&&(Wt(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await bk(2e3))}}},kOe=it(POe,()=>new n3(lSt)),dSt=()=>({name:POe,setupOnce(){kOe()}}),UOe=dSt});function QOe(){return[jbe(),TRe(),KRe(),UBe(),kDe(),ZDe(),cxe(),yxe(),Xxe(),S1e(),_Be(),OBe(),XBe(),pNe(),vNe(),PNe(),pDe(),KNe(),IDe(),hOe(),TOe(),eOe(),oOe(),uOe(),fOe(),C1e(),UOe()]}var FOe=O(()=>{A();JNe();cOe();fNe();zbe();bRe();LOe();kNe();AOe();ZRe();wBe();LBe();fDe();eNe();_Oe();IOe();CDe();UDe();WDe();lxe();Txe();iOe();y1e();b1e();EBe();e1e();RNe();tOe()});function jOe(e,t={}){e.getOptions().debug&&uq();let[n,r]=pSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function pSt(e,t={}){let n=new GOe.BasicTracerProvider({sampler:new AL(e),resource:(0,r3.defaultResource)().merge((0,r3.resourceFromAttributes)({[wH]:"node",[yH]:"sentry",[MH]:Vn})),forceFlushTimeoutMillis:500,spanProcessors:[new fL({timeout:fSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),Ip.setGlobalPropagator(new pL);let r=new sq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function fSt(e){if(e!=null){if(e>jY)return sa&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${jY}`),jY;if(e<=0||Number.isNaN(e)){sa&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var r3,GOe,jY,zOe=O(()=>{A();Le();r3=ue(SV(),1),GOe=ue(VV(),1);$n();dt();pr();sb();AS();jY=1e6});function HOe(){return IL().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_be(),Rbe())}function $Oe(e){return[...HOe(),...Ei(e)?QOe():[]]}function zY(e={}){return ASt(e,$Oe)}function ASt(e={},t){X0(e,"node");let n=Sq({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jOe(n,{spanProcessors:e.openTelemetrySpanProcessors}),yq()),n}var VOe=O(()=>{A();dt();pr();Ebe();Dbe();FOe();zOe()});var _N=O(()=>{A();VOe();dt()});function jo(){return mSt}function Sl(){return qOe}function YOe(){return gSt}var mSt,qOe,gSt,yl=O(()=>{"use strict";A();mSt="prod",qOe="0.1.57",gSt=`@tanagram/lore/${qOe}`});function ESt(e=""){if(!hSt.test(e))return e!==e.toLowerCase()}function KOe(e,t){let n=t??_St,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=ESt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function SSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function ySt(e){return e?e[0].toLowerCase()+e.slice(1):""}function TSt(e,t){return e?(Array.isArray(e)?e:KOe(e)).map(n=>SSt(t?.normalize?n.toLowerCase():n)).join(""):""}function EN(e,t){return ySt(TSt(e||"",t))}function i3(e,t){return e?(Array.isArray(e)?e:KOe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JOe(e){return i3(e||"","_")}var hSt,_St,ZOe=O(()=>{A();hSt=/\d/,_St=["-","_","/","."]});import{parseArgs as ISt}from"node:util";function c3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function HY(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 T7(e,t,n,r=void 0){n&&(0,zB.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&LDe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function Mgt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(T7(t,o,n,r),o)).catch(o=>{throw QDe(t,o),o}).finally(()=>t.end()):(T7(t,e,n,r),t.end(),e)}u_.handlePromiseResponse=Mgt;function Pgt(e,t,n,r,o,i,a=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(d,m)=>(d?QDe(r,d):T7(r,m,i,a),r.end(),e(d,m)),t.apply(n,o)}u_.handleCallbackResponse=Pgt});var GDe=Q(xb=>{"use strict";A();Object.defineProperty(xb,"__esModule",{value:!0});xb.PACKAGE_NAME=xb.PACKAGE_VERSION=void 0;xb.PACKAGE_VERSION="0.60.0";xb.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var VDe=Q(hc=>{"use strict";A();Object.defineProperty(hc,"__esModule",{value:!0});hc.MongooseInstrumentation=hc._ALREADY_INSTRUMENTED=hc._STORED_PARENT_SPAN=void 0;var ca=(Le(),we(Je)),kgt=hr(),I7=FDe(),cs=Xt(),jDe=GDe(),c_=y7(),yS=($n(),we(Nr)),xQ=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],Ugt=["remove","count","findOneAndRemove",...xQ],Lgt=["count","findOneAndRemove",...xQ],Qgt=[...xQ];function zDe(e){return e?e.startsWith("6.")||e.startsWith("5.")?Ugt:e.startsWith("7.")?Lgt:Qgt:xQ}function HDe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function $De(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}hc._STORED_PARENT_SPAN=Symbol("stored-parent-span");hc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var C7=class extends cs.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(jDe.PACKAGE_NAME,jDe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cs.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cs.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new cs.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,HDe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),$De(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)),zDe(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=zDe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,HDe(n)&&this._unwrap(r.Model.prototype,"remove"),$De(n)&&(this._unwrap(r.Model.prototype,"updateOne"),this._unwrap(r.Model.prototype,"deleteOne")),this._unwrap(r.Query.prototype,"exec"),this._unwrap(r.Aggregate.prototype,"exec"),o.forEach(i=>{this._unwrap(r.Query.prototype,i)}),this._unwrap(r.Model,"aggregate"),this._unwrap(r.Model,"insertMany"),this._unwrap(r.Model,"bulkWrite")}patchAggregateExec(t){let n=this;return r=>function(i){if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[hc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[c_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[yS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[hc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return r.apply(this,arguments);let a=this[hc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:d}=n.getConfig();if(d){let h=d(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&cs.SemconvStability.OLD&&(c[c_.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&cs.SemconvStability.STABLE&&(c[yS.ATTR_DB_QUERY_TEXT]=h)}let m=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,a);return n._handleResponse(m,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(a,c){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let d={document:this};a&&!(a instanceof Function)&&(d.options=a);let m={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,d);r._dbSemconvStability&cs.SemconvStability.OLD&&(m[c_.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&cs.SemconvStability.STABLE&&(m[yS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,m);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,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);let m=d,h=a,y=c;typeof a=="function"?(m=a,h=void 0,y=void 0):typeof c=="function"&&(m=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let N=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&cs.SemconvStability.OLD&&(S[c_.ATTR_DB_STATEMENT]=N),r._dbSemconvStability&cs.SemconvStability.STABLE&&(S[yS.ATTR_DB_QUERY_TEXT]=N)}let R=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),B=r._handleResponse(R,o,this,arguments,m,n);return B&&typeof B=="object"&&(B[hc._ALREADY_INSTRUMENTED]=!0),B}}patchModelStatic(t,n){let r=this;return o=>function(a,c,d){if(r.getConfig().requireParentSpan&&ca.trace.getSpan(ca.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(d=c,c=void 0);let m={};switch(t){case"insertMany":m.documents=a;break;case"bulkWrite":m.operations=a;break;default:m.document=a;break}c!==void 0&&(m.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,m);r._dbSemconvStability&cs.SemconvStability.OLD&&(h[c_.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&cs.SemconvStability.STABLE&&(h[yS.ATTR_DB_QUERY_TEXT]=b)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,d,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=ca.trace.getSpan(ca.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[hc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[hc._STORED_PARENT_SPAN]=ca.trace.getSpan(ca.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let a={...o,...(0,I7.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&cs.SemconvStability.OLD&&(a[c_.ATTR_DB_OPERATION]=r,a[c_.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&cs.SemconvStability.STABLE&&(a[yS.ATTR_DB_OPERATION_NAME]=r,a[yS.ATTR_DB_SYSTEM_NAME]=c_.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&cs.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:ca.SpanKind.CLIENT,attributes:a},i?ca.trace.setSpan(ca.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,a=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,I7.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,a));{let d=c._callOriginalFunction(()=>n.apply(r,o));return(0,I7.handlePromiseResponse)(d,t,c.getConfig().responseHook,a)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?ca.context.with((0,kgt.suppressTracing)(ca.context.active()),t):t()}};hc.MongooseInstrumentation=C7});var qDe=Q(BQ=>{"use strict";A();Object.defineProperty(BQ,"__esModule",{value:!0});BQ.MongooseInstrumentation=void 0;var Fgt=VDe();Object.defineProperty(BQ,"MongooseInstrumentation",{enumerable:!0,get:function(){return Fgt.MongooseInstrumentation}})});var YDe,KDe,JDe,Ggt,ZDe,WDe=O(()=>{A();YDe=ue(qDe(),1);pr();KDe="Mongoose",JDe=it(KDe,()=>new YDe.MongooseInstrumentation({responseHook(e){Or(e,"auto.db.otel.mongoose")}})),Ggt=()=>({name:KDe,setupOnce(){JDe()}}),ZDe=Ggt});var XDe=Q(ji=>{"use strict";A();Object.defineProperty(ji,"__esModule",{value:!0});ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE=ji.DB_SYSTEM_VALUE_MYSQL=ji.ATTR_NET_PEER_PORT=ji.ATTR_NET_PEER_NAME=ji.ATTR_DB_USER=ji.ATTR_DB_SYSTEM=ji.ATTR_DB_STATEMENT=ji.ATTR_DB_NAME=ji.ATTR_DB_CONNECTION_STRING=void 0;ji.ATTR_DB_CONNECTION_STRING="db.connection_string";ji.ATTR_DB_NAME="db.name";ji.ATTR_DB_STATEMENT="db.statement";ji.ATTR_DB_SYSTEM="db.system";ji.ATTR_DB_USER="db.user";ji.ATTR_NET_PEER_NAME="net.peer.name";ji.ATTR_NET_PEER_PORT="net.peer.port";ji.DB_SYSTEM_VALUE_MYSQL="mysql";ji.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var exe=Q(HB=>{"use strict";A();Object.defineProperty(HB,"__esModule",{value:!0});HB.AttributeNames=void 0;var jgt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(jgt=HB.AttributeNames||(HB.AttributeNames={}))});var txe=Q(Qs=>{"use strict";A();Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getPoolNameOld=Qs.arrayStringifyHelper=Qs.getSpanName=Qs.getDbValues=Qs.getDbQueryText=Qs.getJDBCString=Qs.getConfig=void 0;function zgt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}Qs.getConfig=zgt;function Hgt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}Qs.getJDBCString=Hgt;function $gt(e){return typeof e=="string"?e:e.sql}Qs.getDbQueryText=$gt;function Vgt(e,t){return b7(typeof e=="string"?t:t||e.values)}Qs.getDbValues=Vgt;function qgt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Qs.getSpanName=qgt;function b7(e){return e?`[${e.toString()}]`:""}Qs.arrayStringifyHelper=b7;function Ygt(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()}Qs.getPoolNameOld=Ygt});var nxe=Q(Bb=>{"use strict";A();Object.defineProperty(Bb,"__esModule",{value:!0});Bb.PACKAGE_NAME=Bb.PACKAGE_VERSION=void 0;Bb.PACKAGE_VERSION="0.60.0";Bb.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var oxe=Q(NQ=>{"use strict";A();Object.defineProperty(NQ,"__esModule",{value:!0});NQ.MySQLInstrumentation=void 0;var _c=(Le(),we(Je)),vd=Xt(),Nb=($n(),we(Nr)),$m=XDe(),Kgt=exe(),TS=txe(),rxe=nxe(),v7=class extends vd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(rxe.PACKAGE_NAME,rxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,vd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter($m.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 vd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,vd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,vd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,vd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let a=t._allConnections.length,c=t._freeConnections.length,d=a-c,m=(0,TS.getPoolNameOld)(t);r._connCountAdd(-d,m,"used"),r._connCountAdd(-c,m,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,a){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let d=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),m=c[d].pool;r._setPoolCallbacks(m,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,a,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let d=r._getConnectionCallbackPatchFn(i);return n.call(t,d)}if(arguments.length===2&&typeof a=="function"){let d=r._getConnectionCallbackPatchFn(a);return n.call(t,i,d)}if(arguments.length===3&&typeof c=="function"){let d=r._getConnectionCallbackPatchFn(c);return n.call(t,i,a,d)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=_c.context.active();return function(o,i){i&&((0,vd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&_c.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,a){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:d,port:m,database:h,user:y}=(0,TS.getConfig)(t.config),S=parseInt(m,10),b=(0,TS.getDbQueryText)(o);r._dbSemconvStability&vd.SemconvStability.OLD&&(c[$m.ATTR_DB_SYSTEM]=$m.DB_SYSTEM_VALUE_MYSQL,c[$m.ATTR_DB_CONNECTION_STRING]=(0,TS.getJDBCString)(d,m,h),c[$m.ATTR_DB_NAME]=h,c[$m.ATTR_DB_USER]=y,c[$m.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&vd.SemconvStability.STABLE&&(c[Nb.ATTR_DB_SYSTEM_NAME]=Nb.DB_SYSTEM_NAME_VALUE_MYSQL,c[Nb.ATTR_DB_NAMESPACE]=h,c[Nb.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&vd.SemconvStability.OLD&&(c[$m.ATTR_NET_PEER_NAME]=d,isNaN(S)||(c[$m.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&vd.SemconvStability.STABLE&&(c[Nb.ATTR_SERVER_ADDRESS]=d,isNaN(S)||(c[Nb.ATTR_SERVER_PORT]=S));let R=r.tracer.startSpan((0,TS.getSpanName)(o),{kind:_c.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let M;Array.isArray(i)?M=i:arguments[2]&&(M=[i]),R.setAttribute(Kgt.AttributeNames.MYSQL_VALUES,(0,TS.getDbValues)(o,M))}let B=Array.from(arguments).findIndex(M=>typeof M=="function"),N=_c.context.active();if(B===-1){let M=_c.context.with(_c.trace.setSpan(_c.context.active(),R),()=>n.apply(t,arguments));return _c.context.bind(N,M),M.on("error",F=>R.setStatus({code:_c.SpanStatusCode.ERROR,message:F.message})).on("end",()=>{R.end()})}else return r._wrap(arguments,B,r._patchCallbackQuery(R,N)),_c.context.with(_c.trace.setSpan(_c.context.active(),R),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,a){return o&&t.setStatus({code:_c.SpanStatusCode.ERROR,message:o.message}),t.end(),_c.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,TS.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")})}};NQ.MySQLInstrumentation=v7});var ixe=Q(OQ=>{"use strict";A();Object.defineProperty(OQ,"__esModule",{value:!0});OQ.MySQLInstrumentation=void 0;var Jgt=oxe();Object.defineProperty(OQ,"MySQLInstrumentation",{enumerable:!0,get:function(){return Jgt.MySQLInstrumentation}})});var axe,sxe,uxe,Zgt,cxe,lxe=O(()=>{A();axe=ue(ixe(),1);pr();sxe="Mysql",uxe=it(sxe,()=>new axe.MySQLInstrumentation({})),Zgt=()=>({name:sxe,setupOnce(){uxe()}}),cxe=Zgt});var R7=Q(Ma=>{"use strict";A();Object.defineProperty(Ma,"__esModule",{value:!0});Ma.DB_SYSTEM_VALUE_MYSQL=Ma.ATTR_NET_PEER_PORT=Ma.ATTR_NET_PEER_NAME=Ma.ATTR_DB_USER=Ma.ATTR_DB_SYSTEM=Ma.ATTR_DB_STATEMENT=Ma.ATTR_DB_NAME=Ma.ATTR_DB_CONNECTION_STRING=void 0;Ma.ATTR_DB_CONNECTION_STRING="db.connection_string";Ma.ATTR_DB_NAME="db.name";Ma.ATTR_DB_STATEMENT="db.statement";Ma.ATTR_DB_SYSTEM="db.system";Ma.ATTR_DB_USER="db.user";Ma.ATTR_NET_PEER_NAME="net.peer.name";Ma.ATTR_NET_PEER_PORT="net.peer.port";Ma.DB_SYSTEM_VALUE_MYSQL="mysql"});var x7=Q(wQ=>{"use strict";A();Object.defineProperty(wQ,"__esModule",{value:!0});wQ.addSqlCommenterComment=void 0;var D7=(Le(),we(Je)),Wgt=hr();function Xgt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function eht(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function tht(e,t){if(typeof t!="string"||t.length===0||Xgt(t))return t;let n=new Wgt.W3CTraceContextPropagator,r={};n.inject(D7.trace.setSpan(D7.ROOT_CONTEXT,e),r,D7.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(a=>{let c=eht(r[a]);return`${a}='${c}'`}).join(",");return`${t} /*${i}*/`}wQ.addSqlCommenterComment=tht});var dxe=Q(Rd=>{"use strict";A();Object.defineProperty(Rd,"__esModule",{value:!0});Rd.getConnectionPrototypeToInstrument=Rd.once=Rd.getSpanName=Rd.getQueryText=Rd.getConnectionAttributes=void 0;var $B=R7(),MQ=Xt(),B7=($n(),we(Nr));function nht(e,t,n){let{host:r,port:o,database:i,user:a}=rht(e),c={};t&MQ.SemconvStability.OLD&&(c[$B.ATTR_DB_CONNECTION_STRING]=oht(r,o,i),c[$B.ATTR_DB_NAME]=i,c[$B.ATTR_DB_USER]=a),t&MQ.SemconvStability.STABLE&&(c[B7.ATTR_DB_NAMESPACE]=i);let d=parseInt(o,10);return n&MQ.SemconvStability.OLD&&(c[$B.ATTR_NET_PEER_NAME]=r,isNaN(d)||(c[$B.ATTR_NET_PEER_PORT]=d)),n&MQ.SemconvStability.STABLE&&(c[B7.ATTR_SERVER_ADDRESS]=r,isNaN(d)||(c[B7.ATTR_SERVER_PORT]=d)),c}Rd.getConnectionAttributes=nht;function rht(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function oht(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function iht(e,t,n,r=!1,o=aht){let[i,a]=typeof e=="string"?[e,n]:[e.sql,sht(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"}}Rd.getQueryText=iht;function aht(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function sht(e){return"values"in e}function uht(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Rd.getSpanName=uht;var cht=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Rd.once=cht;function lht(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Rd.getConnectionPrototypeToInstrument=lht});var pxe=Q(Ob=>{"use strict";A();Object.defineProperty(Ob,"__esModule",{value:!0});Ob.PACKAGE_NAME=Ob.PACKAGE_VERSION=void 0;Ob.PACKAGE_VERSION="0.60.0";Ob.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var gxe=Q(PQ=>{"use strict";A();Object.defineProperty(PQ,"__esModule",{value:!0});PQ.MySQL2Instrumentation=void 0;var fxe=(Le(),we(Je)),Qp=Xt(),N7=R7(),Axe=x7(),wb=dxe(),mxe=pxe(),O7=($n(),we(Nr)),w7=[">=1.4.2 <4"],M7=class extends Qp.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(mxe.PACKAGE_NAME,mxe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Qp.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Qp.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,Qp.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Qp.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 Qp.InstrumentationNodeModuleDefinition("mysql2",w7,i=>(n(i),i),()=>{},[new Qp.InstrumentationNodeModuleFile("mysql2/promise.js",w7,i=>(n(i),i),()=>{}),new Qp.InstrumentationNodeModuleFile("mysql2/lib/connection.js",w7,i=>{let a=(0,wb.getConnectionPrototypeToInstrument)(i);return r(a),i},i=>{if(i===void 0)return;let a=(0,wb.getConnectionPrototypeToInstrument)(i);o(a)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,a,c){let d;Array.isArray(a)?d=a:arguments[2]&&(d=[a]);let{maskStatement:m,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,wb.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,wb.getQueryText)(i,t,d,m,h);o._dbSemconvStability&Qp.SemconvStability.OLD&&(S[N7.ATTR_DB_SYSTEM]=N7.DB_SYSTEM_VALUE_MYSQL,S[N7.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&Qp.SemconvStability.STABLE&&(S[O7.ATTR_DB_SYSTEM_NAME]=O7.DB_SYSTEM_NAME_VALUE_MYSQL,S[O7.ATTR_DB_QUERY_TEXT]=b);let R=o.tracer.startSpan((0,wb.getSpanName)(i),{kind:fxe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,Axe.addSqlCommenterComment)(R,i):Object.assign(i,{sql:(0,Axe.addSqlCommenterComment)(R,i.sql)}));let B=(0,wb.once)((N,M)=>{N?R.setStatus({code:fxe.SpanStatusCode.ERROR,message:N.message}):typeof y=="function"&&(0,Qp.safeExecuteInTheMiddle)(()=>{y(R,{queryResults:M})},F=>{F&&o._diag.warn("Failed executing responseHook",F)},!0),R.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(B));let N=r.apply(this,arguments);return N.once("error",M=>{B(M)}).once("result",M=>{B(void 0,M)}),N}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(B)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(B)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};PQ.MySQL2Instrumentation=M7});var hxe=Q(kQ=>{"use strict";A();Object.defineProperty(kQ,"__esModule",{value:!0});kQ.MySQL2Instrumentation=void 0;var dht=gxe();Object.defineProperty(kQ,"MySQL2Instrumentation",{enumerable:!0,get:function(){return dht.MySQL2Instrumentation}})});var _xe,Exe,Sxe,pht,yxe,Txe=O(()=>{A();_xe=ue(hxe(),1);pr();Exe="Mysql2",Sxe=it(Exe,()=>new _xe.MySQL2Instrumentation({responseHook(e){Or(e,"auto.db.otel.mysql2")}})),pht=()=>({name:Exe,setupOnce(){Sxe()}}),yxe=pht});var Ixe=Q(Fs=>{"use strict";A();Object.defineProperty(Fs,"__esModule",{value:!0});Fs.DB_SYSTEM_VALUE_REDIS=Fs.DB_SYSTEM_NAME_VALUE_REDIS=Fs.ATTR_NET_PEER_PORT=Fs.ATTR_NET_PEER_NAME=Fs.ATTR_DB_SYSTEM=Fs.ATTR_DB_STATEMENT=Fs.ATTR_DB_CONNECTION_STRING=void 0;Fs.ATTR_DB_CONNECTION_STRING="db.connection_string";Fs.ATTR_DB_STATEMENT="db.statement";Fs.ATTR_DB_SYSTEM="db.system";Fs.ATTR_NET_PEER_NAME="net.peer.name";Fs.ATTR_NET_PEER_PORT="net.peer.port";Fs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Fs.DB_SYSTEM_VALUE_REDIS="redis"});var Cxe=Q(UQ=>{"use strict";A();Object.defineProperty(UQ,"__esModule",{value:!0});UQ.endSpan=void 0;var fht=(Le(),we(Je)),Aht=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:fht.SpanStatusCode.ERROR,message:t.message})),e.end()};UQ.endSpan=Aht});var QQ=Q(LQ=>{"use strict";A();Object.defineProperty(LQ,"__esModule",{value:!0});LQ.defaultDbStatementSerializer=void 0;var mht=[{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}],ght=(e,t)=>{if(Array.isArray(t)&&t.length){let n=mht.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};LQ.defaultDbStatementSerializer=ght});var bxe=Q(Mb=>{"use strict";A();Object.defineProperty(Mb,"__esModule",{value:!0});Mb.PACKAGE_NAME=Mb.PACKAGE_VERSION=void 0;Mb.PACKAGE_VERSION="0.62.0";Mb.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var xxe=Q(FQ=>{"use strict";A();Object.defineProperty(FQ,"__esModule",{value:!0});FQ.IORedisInstrumentation=void 0;var l_=(Le(),we(Je)),Ec=Xt(),d_=($n(),we(Nr)),Sc=Ixe(),vxe=Xt(),VB=Cxe(),hht=QQ(),Rxe=bxe(),Dxe={requireParentSpan:!0},P7=class extends Ec.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(Rxe.PACKAGE_NAME,Rxe.PACKAGE_VERSION,{...Dxe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Ec.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Ec.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Dxe,...t})}init(){return[new Ec.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,Ec.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,Ec.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||hht.defaultDbStatementSerializer,c=l_.trace.getSpan(l_.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let d={},{host:m,port:h}=this.options,y=a(o.name,o.args);r._dbSemconvStability&Ec.SemconvStability.OLD&&(d[Sc.ATTR_DB_SYSTEM]=Sc.DB_SYSTEM_VALUE_REDIS,d[Sc.ATTR_DB_STATEMENT]=y,d[Sc.ATTR_DB_CONNECTION_STRING]=`redis://${m}:${h}`),r._dbSemconvStability&Ec.SemconvStability.STABLE&&(d[d_.ATTR_DB_SYSTEM_NAME]=Sc.DB_SYSTEM_NAME_VALUE_REDIS,d[d_.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&Ec.SemconvStability.OLD&&(d[Sc.ATTR_NET_PEER_NAME]=m,d[Sc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&Ec.SemconvStability.STABLE&&(d[d_.ATTR_SERVER_ADDRESS]=m,d[d_.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:l_.SpanKind.CLIENT,attributes:d}),{requestHook:b}=i;b&&(0,vxe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),R=>{R&&l_.diag.error("ioredis instrumentation: request hook failed",R)},!0);try{let R=t.apply(this,arguments),B=o.resolve;o.resolve=function(M){(0,vxe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,M),F=>{F&&l_.diag.error("ioredis instrumentation: response hook failed",F)},!0),(0,VB.endSpan)(S,null),B(M)};let N=o.reject;return o.reject=function(M){(0,VB.endSpan)(S,M),N(M)},R}catch(R){throw(0,VB.endSpan)(S,R),R}}}_traceConnection(t){let n=this;return function(){let r=l_.trace.getSpan(l_.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&Ec.SemconvStability.OLD&&(o[Sc.ATTR_DB_SYSTEM]=Sc.DB_SYSTEM_VALUE_REDIS,o[Sc.ATTR_DB_STATEMENT]="connect",o[Sc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${a}`),n._dbSemconvStability&Ec.SemconvStability.STABLE&&(o[d_.ATTR_DB_SYSTEM_NAME]=Sc.DB_SYSTEM_NAME_VALUE_REDIS,o[d_.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&Ec.SemconvStability.OLD&&(o[Sc.ATTR_NET_PEER_NAME]=i,o[Sc.ATTR_NET_PEER_PORT]=a),n._netSemconvStability&Ec.SemconvStability.STABLE&&(o[d_.ATTR_SERVER_ADDRESS]=i,o[d_.ATTR_SERVER_PORT]=a);let c=n.tracer.startSpan("connect",{kind:l_.SpanKind.CLIENT,attributes:o});try{let d=t.apply(this,arguments);return(0,VB.endSpan)(c,null),d}catch(d){throw(0,VB.endSpan)(c,d),d}}}};FQ.IORedisInstrumentation=P7});var Bxe=Q(GQ=>{"use strict";A();Object.defineProperty(GQ,"__esModule",{value:!0});GQ.IORedisInstrumentation=void 0;var _ht=xxe();Object.defineProperty(GQ,"IORedisInstrumentation",{enumerable:!0,get:function(){return _ht.IORedisInstrumentation}})});var jQ=Q(Pb=>{"use strict";A();Object.defineProperty(Pb,"__esModule",{value:!0});Pb.PACKAGE_NAME=Pb.PACKAGE_VERSION=void 0;Pb.PACKAGE_VERSION="0.62.0";Pb.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var Nxe=Q(p_=>{"use strict";A();Object.defineProperty(p_,"__esModule",{value:!0});p_.getTracedCreateStreamTrace=p_.getTracedCreateClient=p_.endSpan=void 0;var qB=(Le(),we(Je)),Eht=(e,t)=>{t&&e.setStatus({code:qB.SpanStatusCode.ERROR,message:t.message}),e.end()};p_.endSpan=Eht;var Sht=e=>function(){let n=e.apply(this,arguments);return qB.context.bind(qB.context.active(),n)};p_.getTracedCreateClient=Sht;var yht=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){qB.context.bind(qB.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};p_.getTracedCreateStreamTrace=yht});var zQ=Q(Gs=>{"use strict";A();Object.defineProperty(Gs,"__esModule",{value:!0});Gs.DB_SYSTEM_VALUE_REDIS=Gs.DB_SYSTEM_NAME_VALUE_REDIS=Gs.ATTR_NET_PEER_PORT=Gs.ATTR_NET_PEER_NAME=Gs.ATTR_DB_SYSTEM=Gs.ATTR_DB_STATEMENT=Gs.ATTR_DB_CONNECTION_STRING=void 0;Gs.ATTR_DB_CONNECTION_STRING="db.connection_string";Gs.ATTR_DB_STATEMENT="db.statement";Gs.ATTR_DB_SYSTEM="db.system";Gs.ATTR_NET_PEER_NAME="net.peer.name";Gs.ATTR_NET_PEER_PORT="net.peer.port";Gs.DB_SYSTEM_NAME_VALUE_REDIS="redis";Gs.DB_SYSTEM_VALUE_REDIS="redis"});var wxe=Q($Q=>{"use strict";A();Object.defineProperty($Q,"__esModule",{value:!0});$Q.RedisInstrumentationV2_V3=void 0;var hl=Xt(),HQ=Nxe(),Oxe=jQ(),YB=(Le(),we(Je)),KB=($n(),we(Nr)),IS=zQ(),Tht=QQ(),k7=class e extends hl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Oxe.PACKAGE_NAME,Oxe.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=YB.trace.getSpan(YB.context.active())===void 0;if(a.requireParentSpan===!0&&c)return r.apply(this,arguments);let d=a?.dbStatementSerializer||Tht.defaultDbStatementSerializer,m={};t._semconvStability&hl.SemconvStability.OLD&&Object.assign(m,{[IS.ATTR_DB_SYSTEM]:IS.DB_SYSTEM_VALUE_REDIS,[IS.ATTR_DB_STATEMENT]:d(i.command,i.args)}),t._semconvStability&hl.SemconvStability.STABLE&&Object.assign(m,{[KB.ATTR_DB_SYSTEM_NAME]:IS.DB_SYSTEM_NAME_VALUE_REDIS,[KB.ATTR_DB_OPERATION_NAME]:i.command,[KB.ATTR_DB_QUERY_TEXT]:d(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:YB.SpanKind.CLIENT,attributes:m});if(this.connection_options){let S={};t._semconvStability&hl.SemconvStability.OLD&&Object.assign(S,{[IS.ATTR_NET_PEER_NAME]:this.connection_options.host,[IS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&hl.SemconvStability.STABLE&&Object.assign(S,{[KB.ATTR_SERVER_ADDRESS]:this.connection_options.host,[KB.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&hl.SemconvStability.OLD&&h.setAttribute(IS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=YB.context.active();arguments[0].callback=function(R,B){if(a?.responseHook){let N=a.responseHook;(0,hl.safeExecuteInTheMiddle)(()=>{N(h,i.command,i.args,B)},M=>{M&&t._diag.error("Error executing responseHook",M)},!0)}return(0,HQ.endSpan)(h,R),YB.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,HQ.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,HQ.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,HQ.getTracedCreateStreamTrace)(n)}}};$Q.RedisInstrumentationV2_V3=k7});var Pxe=Q(VQ=>{"use strict";A();Object.defineProperty(VQ,"__esModule",{value:!0});VQ.getClientAttributes=void 0;var U7=($n(),we(Nr)),kb=zQ(),Mxe=Xt();function Iht(e,t,n){let r={};return n&Mxe.SemconvStability.OLD&&Object.assign(r,{[kb.ATTR_DB_SYSTEM]:kb.DB_SYSTEM_VALUE_REDIS,[kb.ATTR_NET_PEER_NAME]:t?.socket?.host,[kb.ATTR_NET_PEER_PORT]:t?.socket?.port,[kb.ATTR_DB_CONNECTION_STRING]:Cht(e,t?.url)}),n&Mxe.SemconvStability.STABLE&&Object.assign(r,{[U7.ATTR_DB_SYSTEM_NAME]:kb.DB_SYSTEM_NAME_VALUE_REDIS,[U7.ATTR_SERVER_ADDRESS]:t?.socket?.host,[U7.ATTR_SERVER_PORT]:t?.socket?.port}),r}VQ.getClientAttributes=Iht;function Cht(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 Qxe=Q(qQ=>{"use strict";A();Object.defineProperty(qQ,"__esModule",{value:!0});qQ.RedisInstrumentationV4_V5=void 0;var Dd=(Le(),we(Je)),lo=Xt(),kxe=Pxe(),bht=QQ(),Uxe=jQ(),L7=($n(),we(Nr)),vht=zQ(),JB=Symbol("opentelemetry.instrumentation.redis.open_spans"),Lxe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),Q7=class e extends lo.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(Uxe.PACKAGE_NAME,Uxe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,lo.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 lo.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,a)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let d=a?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,lo.isWrapped)(i?.[d])&&this._unwrap(i,d),this._wrap(i,d,this._getPatchExtendWithCommands(c)),i},i=>{(0,lo.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,lo.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),this._wrap(a,"exec",this._getPatchMultiCommandsExec(!1)),(0,lo.isWrapped)(a?.execAsPipeline)&&this._unwrap(a,"execAsPipeline"),this._wrap(a,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand"),this._wrap(a,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let a=i?.default?.prototype;(0,lo.isWrapped)(a?.exec)&&this._unwrap(a,"exec"),(0,lo.isWrapped)(a?.addCommand)&&this._unwrap(a,"addCommand")}),o=new lo.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let a=i?.default?.prototype;return a?.multi&&((0,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),this._wrap(a,"multi",this._getPatchRedisClientMulti())),a?.MULTI&&((0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),this._wrap(a,"MULTI",this._getPatchRedisClientMulti())),(0,lo.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,lo.isWrapped)(a?.multi)&&this._unwrap(a,"multi"),(0,lo.isWrapped)(a?.MULTI)&&this._unwrap(a,"MULTI"),(0,lo.isWrapped)(a?.sendCommand)&&this._unwrap(a,"sendCommand")});return new lo.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(a){if(a?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=a.executor;return a.executor=function(d,m){let h=t(d,m).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let a=o.apply(this,arguments);return typeof a?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),a):a.then(c=>{let d=this[JB];return n._endSpansWithRedisReplies(d,c,t),c}).catch(c=>{let d=this[JB];if(!d)n._diag.error("cannot find open spans to end for multi/pipeline");else{let m=c.constructor.name==="MultiErrorReply"?c.replies:new Array(d.length).fill(c);n._endSpansWithRedisReplies(d,m,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[Lxe]=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,kxe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Dd.SpanKind.CLIENT,attributes:a});return Dd.context.with(Dd.trace.setSpan(Dd.context.active(),c),()=>r.apply(this)).then(m=>(c.end(),m)).catch(m=>(c.recordException(m),c.setStatus({code:Dd.SpanStatusCode.ERROR,message:m.message}),c.end(),Promise.reject(m)))}}}_traceClientCommand(t,n,r,o){if(Dd.trace.getSpan(Dd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let a=n.options||n[Lxe],c=o[0],d=o.slice(1),m=this.getConfig().dbStatementSerializer||bht.defaultDbStatementSerializer,h=(0,kxe.getClientAttributes)(this._diag,a,this._semconvStability);this._semconvStability&lo.SemconvStability.STABLE&&(h[L7.ATTR_DB_OPERATION_NAME]=c);try{let b=m(c,d);b!=null&&(this._semconvStability&lo.SemconvStability.OLD&&(h[vht.ATTR_DB_STATEMENT]=b),this._semconvStability&lo.SemconvStability.STABLE&&(h[L7.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:Dd.SpanKind.CLIENT,attributes:h}),S=Dd.context.with(Dd.trace.setSpan(Dd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,d,b,void 0)},b=>{this._endSpanWithResponse(y,c,d,null,b)});else{let b=S;b[JB]=b[JB]||[],b[JB].push({span:y,commandName:c,commandArgs:d})}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:d,commandArgs:m}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&lo.SemconvStability.STABLE&&d.setAttribute(L7.ATTR_DB_OPERATION_NAME,a),this._endSpanWithResponse(d,o[c],m,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:Dd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};qQ.RedisInstrumentationV4_V5=Q7});var jxe=Q(YQ=>{"use strict";A();Object.defineProperty(YQ,"__esModule",{value:!0});YQ.RedisInstrumentation=void 0;var Rht=Xt(),Fxe=jQ(),Dht=wxe(),xht=Qxe(),Gxe={requireParentSpan:!1},F7=class extends Rht.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...Gxe,...t};super(Fxe.PACKAGE_NAME,Fxe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new Dht.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new xht.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...Gxe,...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())}};YQ.RedisInstrumentation=F7});var zxe=Q(KQ=>{"use strict";A();Object.defineProperty(KQ,"__esModule",{value:!0});KQ.RedisInstrumentation=void 0;var Bht=jxe();Object.defineProperty(KQ,"RedisInstrumentation",{enumerable:!0,get:function(){return Bht.RedisInstrumentation}})});function ZB(e,t){return e.includes(t.toLowerCase())}function j7(e){return ZB(G7,e)?"cache.get":ZB(Oht,e)?"cache.put":void 0}function wht(e,t){return t.some(n=>e.startsWith(n))}function $xe(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)?Hxe(o.map(i=>n(i))):["<unknown>"],r=t[0];return ZB(Nht,e)&&r!=null?n(r):Hxe(t.map(o=>n(o)))}catch{return}}function Vxe(e,t,n){if(!j7(e))return!1;for(let r of t)if(wht(r,n))return!0;return!1}function qxe(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 Hxe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var Nht,G7,Oht,Yxe=O(()=>{A();Nht=["get","set","setex"],G7=["get","mget"],Oht=["set","setex"]});var Kxe,Jxe,JQ,WB,Zxe,Mht,Pht,Wxe,kht,Xxe,e1e=O(()=>{A();Kxe=ue(Bxe(),1),Jxe=ue(zxe(),1);dt();pr();Yxe();JQ="Redis",WB={},Zxe=(e,t,n,r)=>{e.setAttribute(Nt,"auto.db.otel.redis");let o=$xe(t,n),i=j7(t);if(!o||!i||!WB.cachePrefixes||!Vxe(t,o,WB.cachePrefixes))return;let a=xt(e).data["net.peer.name"],c=xt(e).data["net.peer.port"];c&&a&&e.setAttributes({"network.peer.address":a,"network.peer.port":c});let d=qxe(r);d&&e.setAttribute(l$,d),ZB(G7,t)&&d!==void 0&&e.setAttribute(u$,d>0),e.setAttributes({[Yt]:i,[c$]:o});let m=o.join(", ");e.updateName(WB.maxCacheKeyLength?vh(m,WB.maxCacheKeyLength):m)},Mht=it(`${JQ}.IORedis`,()=>new Kxe.IORedisInstrumentation({responseHook:Zxe})),Pht=it(`${JQ}.Redis`,()=>new Jxe.RedisInstrumentation({responseHook:Zxe})),Wxe=Object.assign(()=>{Mht(),Pht()},{id:JQ}),kht=(e={})=>({name:JQ,setupOnce(){WB=e,Wxe()}}),Xxe=kht});var t1e=Q(ZQ=>{"use strict";A();Object.defineProperty(ZQ,"__esModule",{value:!0});ZQ.EVENT_LISTENERS_SET=void 0;ZQ.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var z7=Q(XB=>{"use strict";A();Object.defineProperty(XB,"__esModule",{value:!0});XB.AttributeNames=void 0;var Uht;(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"})(Uht=XB.AttributeNames||(XB.AttributeNames={}))});var H7=Q(Ir=>{"use strict";A();Object.defineProperty(Ir,"__esModule",{value:!0});Ir.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Ir.METRIC_DB_CLIENT_CONNECTION_COUNT=Ir.DB_SYSTEM_VALUE_POSTGRESQL=Ir.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Ir.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Ir.ATTR_NET_PEER_PORT=Ir.ATTR_NET_PEER_NAME=Ir.ATTR_DB_USER=Ir.ATTR_DB_SYSTEM=Ir.ATTR_DB_STATEMENT=Ir.ATTR_DB_NAME=Ir.ATTR_DB_CONNECTION_STRING=Ir.ATTR_DB_CLIENT_CONNECTION_STATE=Ir.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Ir.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Ir.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Ir.ATTR_DB_CONNECTION_STRING="db.connection_string";Ir.ATTR_DB_NAME="db.name";Ir.ATTR_DB_STATEMENT="db.statement";Ir.ATTR_DB_SYSTEM="db.system";Ir.ATTR_DB_USER="db.user";Ir.ATTR_NET_PEER_NAME="net.peer.name";Ir.ATTR_NET_PEER_PORT="net.peer.port";Ir.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Ir.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Ir.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Ir.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Ir.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var $7=Q(eN=>{"use strict";A();Object.defineProperty(eN,"__esModule",{value:!0});eN.SpanNames=void 0;var Lht;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(Lht=eN.SpanNames||(eN.SpanNames={}))});var u1e=Q(Wn=>{"use strict";A();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.sanitizedErrorMessage=Wn.isObjectWithTextString=Wn.getErrorMessage=Wn.patchClientConnectCallback=Wn.patchCallbackPGPool=Wn.updateCounter=Wn.getPoolName=Wn.patchCallback=Wn.handleExecutionResult=Wn.handleConfigQuery=Wn.shouldSkipInstrumentation=Wn.getSemanticAttributesFromPoolConnection=Wn.getSemanticAttributesFromConnection=Wn.getConnectionString=Wn.parseAndMaskConnectionString=Wn.parseNormalizedOperationName=Wn.getQuerySpanName=void 0;var f_=(Le(),we(Je)),WQ=z7(),xd=($n(),we(Nr)),ni=H7(),CS=Xt(),n1e=$7();function r1e(e,t){if(!t)return n1e.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:o1e(t.text);return`${n1e.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}Wn.getQuerySpanName=r1e;function o1e(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}Wn.parseNormalizedOperationName=o1e;function i1e(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}Wn.parseAndMaskConnectionString=i1e;function V7(e){if("connectionString"in e&&e.connectionString)return i1e(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}Wn.getConnectionString=V7;function XQ(e){if(Number.isInteger(e))return e}function a1e(e,t){let n={};return t&CS.SemconvStability.OLD&&(n={...n,[ni.ATTR_DB_SYSTEM]:ni.DB_SYSTEM_VALUE_POSTGRESQL,[ni.ATTR_DB_NAME]:e.database,[ni.ATTR_DB_CONNECTION_STRING]:V7(e),[ni.ATTR_DB_USER]:e.user,[ni.ATTR_NET_PEER_NAME]:e.host,[ni.ATTR_NET_PEER_PORT]:XQ(e.port)}),t&CS.SemconvStability.STABLE&&(n={...n,[xd.ATTR_DB_SYSTEM_NAME]:xd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[xd.ATTR_DB_NAMESPACE]:e.namespace,[xd.ATTR_SERVER_ADDRESS]:e.host,[xd.ATTR_SERVER_PORT]:XQ(e.port)}),n}Wn.getSemanticAttributesFromConnection=a1e;function Qht(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[WQ.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[WQ.AttributeNames.MAX_CLIENT]:e.maxClient};return t&CS.SemconvStability.OLD&&(r={...r,[ni.ATTR_DB_SYSTEM]:ni.DB_SYSTEM_VALUE_POSTGRESQL,[ni.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[ni.ATTR_DB_CONNECTION_STRING]:V7(e),[ni.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[ni.ATTR_NET_PEER_PORT]:Number(n?.port)||XQ(e.port),[ni.ATTR_DB_USER]:n?.username??e.user}),t&CS.SemconvStability.STABLE&&(r={...r,[xd.ATTR_DB_SYSTEM_NAME]:xd.DB_SYSTEM_NAME_VALUE_POSTGRESQL,[xd.ATTR_DB_NAMESPACE]:e.namespace,[xd.ATTR_SERVER_ADDRESS]:n?.hostname??e.host,[xd.ATTR_SERVER_PORT]:Number(n?.port)||XQ(e.port)}),r}Wn.getSemanticAttributesFromPoolConnection=Qht;function Fht(e){return e.requireParentSpan===!0&&f_.trace.getSpan(f_.context.active())===void 0}Wn.shouldSkipInstrumentation=Fht;function Ght(e,t,n,r){let{connectionParameters:o}=this,i=o.database,a=r1e(i,r),c=e.startSpan(a,{kind:f_.SpanKind.CLIENT,attributes:a1e(o,n)});if(!r)return c;if(r.text&&(n&CS.SemconvStability.OLD&&c.setAttribute(ni.ATTR_DB_STATEMENT,r.text),n&CS.SemconvStability.STABLE&&c.setAttribute(xd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let d=r.values.map(m=>m==null?"null":m instanceof Buffer?m.toString():typeof m=="object"?typeof m.toPostgres=="function"?m.toPostgres():JSON.stringify(m):m.toString());c.setAttribute(WQ.AttributeNames.PG_VALUES,d)}catch(d){f_.diag.error("failed to stringify ",r.values,d)}return typeof r.name=="string"&&c.setAttribute(WQ.AttributeNames.PG_PLAN,r.name),c}Wn.handleConfigQuery=Ght;function s1e(e,t,n){typeof e.responseHook=="function"&&(0,CS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&f_.diag.error("Error running response hook",r)},!0)}Wn.handleExecutionResult=s1e;function jht(e,t,n,r,o){return function(a,c){a?(Object.prototype.hasOwnProperty.call(a,"code")&&(r[xd.ATTR_ERROR_TYPE]=a.code),a instanceof Error&&t.recordException(e4(a)),t.setStatus({code:f_.SpanStatusCode.ERROR,message:a.message})):s1e(e,t,c),o(),t.end(),n.call(this,a,c)}}Wn.patchCallback=jht;function zht(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()}Wn.getPoolName=zht;function Hht(e,t,n,r,o){let i=t.totalCount,a=t.waitingCount,c=t.idleCount,d=i-c;return n.add(d-o.used,{[ni.ATTR_DB_CLIENT_CONNECTION_STATE]:ni.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[ni.ATTR_DB_CLIENT_CONNECTION_STATE]:ni.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(a-o.pending,{[ni.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:d,idle:c,pending:a}}Wn.updateCounter=Hht;function $ht(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(e4(r)),e.setStatus({code:f_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}Wn.patchCallbackPGPool=$ht;function Vht(e,t){return function(r){r&&(r instanceof Error&&e.recordException(e4(r)),e.setStatus({code:f_.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}Wn.patchClientConnectCallback=Vht;function qht(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}Wn.getErrorMessage=qht;function Yht(e){return typeof e=="object"&&typeof e?.text=="string"}Wn.isObjectWithTextString=Yht;function e4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}Wn.sanitizedErrorMessage=e4});var c1e=Q(Ub=>{"use strict";A();Object.defineProperty(Ub,"__esModule",{value:!0});Ub.PACKAGE_NAME=Ub.PACKAGE_VERSION=void 0;Ub.PACKAGE_VERSION="0.66.0";Ub.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var m1e=Q(n4=>{"use strict";A();Object.defineProperty(n4,"__esModule",{value:!0});n4.PgInstrumentation=void 0;var Cu=Xt(),Mr=(Le(),we(Je)),l1e=t1e(),Fo=u1e(),d1e=x7(),p1e=c1e(),f1e=$7(),t4=hr(),Fp=($n(),we(Nr)),tN=H7();function Lb(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var q7=class extends Cu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(p1e.PACKAGE_NAME,p1e.PACKAGE_VERSION,t),this._semconvStability=(0,Cu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(Fp.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Mr.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(tN.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(tN.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 Cu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new Cu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new Cu.InstrumentationNodeModuleDefinition("pg",t,c=>{let d=Lb(c);return this._patchPgClient(d.Client),c},c=>{let d=Lb(c);return this._unpatchPgClient(d.Client),c},[o,r]),a=new Cu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let d=Lb(c);return(0,Cu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect"),this._wrap(d.prototype,"connect",this._getPoolConnectPatch()),d},c=>{let d=Lb(c);(0,Cu.isWrapped)(d.prototype.connect)&&this._unwrap(d.prototype,"connect")});return[i,a]}_patchPgClient(t){if(!t)return;let n=Lb(t);return(0,Cu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Cu.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=Lb(t);return(0,Cu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,Cu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(f1e.SpanNames.CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchClientConnectCallback(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return A1e(a,c)}}recordOperationDuration(t,n){let r={},o=[Fp.ATTR_DB_NAMESPACE,Fp.ATTR_ERROR_TYPE,Fp.ATTR_SERVER_PORT,Fp.ATTR_SERVER_ADDRESS,Fp.ATTR_DB_OPERATION_NAME];this._semconvStability&Cu.SemconvStability.OLD&&o.push(tN.ATTR_DB_SYSTEM),this._semconvStability&Cu.SemconvStability.STABLE&&o.push(Fp.ATTR_DB_SYSTEM_NAME),o.forEach(a=>{a in t&&(r[a]=t[a])});let i=(0,t4.hrTimeToMilliseconds)((0,t4.hrTimeDuration)(n,(0,t4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Fo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,t4.hrTime)(),a=o[0],c=typeof a=="string",d=Fo.isObjectWithTextString(a),m=c?{text:a,values:Array.isArray(o[1])?o[1]:void 0}:d?{...a,name:a.name,text:a.text,values:a.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[tN.ATTR_DB_SYSTEM]:tN.DB_SYSTEM_VALUE_POSTGRESQL,[Fp.ATTR_DB_NAMESPACE]:this.database,[Fp.ATTR_SERVER_PORT]:this.connectionParameters.port,[Fp.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};m?.text&&(h[Fp.ATTR_DB_OPERATION_NAME]=Fo.parseNormalizedOperationName(m?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Fo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,m);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,d1e.addSqlCommenterComment)(b,a):d&&!("name"in a)&&(o[0]={...a,text:(0,d1e.addSqlCommenterComment)(b,a.text)})),o.length>0){let N=Mr.trace.getSpan(Mr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Fo.patchCallback(S,b,o[o.length-1],h,y),N&&(o[o.length-1]=Mr.context.bind(Mr.context.active(),o[o.length-1]));else if(typeof m?.callback=="function"){let M=Fo.patchCallback(t.getConfig(),b,m.callback,h,y);N&&(M=Mr.context.bind(Mr.context.active(),M)),o[0].callback=M}}let{requestHook:R}=S;typeof R=="function"&&m&&(0,Cu.safeExecuteInTheMiddle)(()=>{let{database:N,host:M,port:F,user:$}=this.connectionParameters;R(b,{connection:{database:N,host:M,port:F,user:$},query:{text:m.text,values:m.values,name:m.name}})},N=>{N&&t._diag.error("Error running query hook",N)},!0);let B;try{B=n.apply(this,o)}catch(N){throw N instanceof Error&&b.recordException(Fo.sanitizedErrorMessage(N)),b.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(N)}),b.end(),N}return B instanceof Promise?B.then(N=>new Promise(M=>{Fo.handleExecutionResult(t.getConfig(),b,N),y(),b.end(),M(N)})).catch(N=>new Promise((M,F)=>{N instanceof Error&&b.recordException(Fo.sanitizedErrorMessage(N)),b.setStatus({code:Mr.SpanStatusCode.ERROR,message:N.message}),y(),b.end(),F(N)})):B})}_setPoolConnectEventListeners(t){if(t[l1e.EVENT_LISTENERS_SET])return;let n=Fo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Fo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[l1e.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Fo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let a=t.tracer.startSpan(f1e.SpanNames.POOL_CONNECT,{kind:Mr.SpanKind.CLIENT,attributes:Fo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let d=Mr.trace.getSpan(Mr.context.active());o=Fo.patchCallbackPGPool(a,o),d&&(o=Mr.context.bind(Mr.context.active(),o))}let c=Mr.context.with(Mr.trace.setSpan(Mr.context.active(),a),()=>n.call(this,o));return A1e(a,c)}}};n4.PgInstrumentation=q7;function A1e(e,t){if(!(t instanceof Promise))return t;let n=t;return Mr.context.bind(Mr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Fo.sanitizedErrorMessage(r)),e.setStatus({code:Mr.SpanStatusCode.ERROR,message:Fo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var g1e=Q(Qb=>{"use strict";A();Object.defineProperty(Qb,"__esModule",{value:!0});Qb.AttributeNames=Qb.PgInstrumentation=void 0;var Kht=m1e();Object.defineProperty(Qb,"PgInstrumentation",{enumerable:!0,get:function(){return Kht.PgInstrumentation}});var Jht=z7();Object.defineProperty(Qb,"AttributeNames",{enumerable:!0,get:function(){return Jht.AttributeNames}})});var h1e,_1e,E1e,Zht,S1e,y1e=O(()=>{A();h1e=ue(g1e(),1);pr();_1e="Postgres",E1e=it(_1e,h1e.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){Or(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),Zht=e=>({name:_1e,setupOnce(){E1e(e)}}),S1e=Zht});var A_,K7,T1e,Wht,Xht,I1e,Y7,e_t,C1e,b1e=O(()=>{A();Le();A_=ue(Xt(),1);$n();dt();pr();AS();K7="PostgresJs",T1e=[">=3.0.0 <4"],Wht=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,Xht=Symbol.for("sentry.query.from.instrumented.sql"),I1e=it(K7,e=>new Y7({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),Y7=class extends A_.InstrumentationBase{constructor(t){super("sentry-postgres-js",Vn,t)}init(){let t=new A_.InstrumentationNodeModuleDefinition("postgres",T1e,n=>{try{return this._patchPostgres(n)}catch(r){return sa&&Z.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new A_.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,T1e,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 sa&&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 sa&&Z.warn("postgres() did not return a valid instance"),c;let d=o.getConfig();return a9(c,{requireParentSpan:d.requireParentSpan,requestHook:d.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let a of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(a)){let c=Object.getOwnPropertyDescriptor(r,a);c&&Object.defineProperty(i,a,c)}return n?i:(J1(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return Ft.getSpan(qe.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(VI,r);return}let o=n?.match(Wht);o?.[1]&&t.setAttribute(VI,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[Xht])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),a=n._sanitizeSqlQuery(i);return Ba({name:a||"postgresjs.query",op:"db"},c=>{Or(c,"auto.db.postgresjs"),c.setAttributes({[M0]:"postgres",[CH]:a});let d=n.getConfig(),{requestHook:m}=d;m&&(0,A_.safeExecuteInTheMiddle)(()=>m(c,a,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),sa&&Z.error(`Error in requestHook for ${K7} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,R)=>{try{n._setOperationName(c,a,R?.[0]?.command),c.end()}catch(B){sa&&Z.error("Error ending span in resolve callback:",B)}return Reflect.apply(S,b,R)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,R)=>{try{c.setStatus({code:2,message:R?.[0]?.message||"unknown_error"}),c.setAttribute(bH,R?.[0]?.code||"unknown"),c.setAttribute(vH,R?.[0]?.name||"unknown"),n._setOperationName(c,a),c.end()}catch(B){sa&&Z.error("Error ending span in reject callback:",B)}return Reflect.apply(S,b,R)}});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}},e_t=e=>({name:K7,setupOnce(){I1e(e)}}),C1e=e_t});var v1e=Q(nN=>{"use strict";A();Object.defineProperty(nN,"__esModule",{value:!0});nN.SeverityNumber=void 0;var t_t;(function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"})(t_t=nN.SeverityNumber||(nN.SeverityNumber={}))});var o4=Q(Fb=>{"use strict";A();Object.defineProperty(Fb,"__esModule",{value:!0});Fb.NOOP_LOGGER=Fb.NoopLogger=void 0;var r4=class{emit(t){}};Fb.NoopLogger=r4;Fb.NOOP_LOGGER=new r4});var a4=Q(Gb=>{"use strict";A();Object.defineProperty(Gb,"__esModule",{value:!0});Gb.NOOP_LOGGER_PROVIDER=Gb.NoopLoggerProvider=void 0;var n_t=o4(),i4=class{getLogger(t,n,r){return new n_t.NoopLogger}};Gb.NoopLoggerProvider=i4;Gb.NOOP_LOGGER_PROVIDER=new i4});var Z7=Q(s4=>{"use strict";A();Object.defineProperty(s4,"__esModule",{value:!0});s4.ProxyLogger=void 0;var r_t=o4(),J7=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):r_t.NOOP_LOGGER}};s4.ProxyLogger=J7});var X7=Q(u4=>{"use strict";A();Object.defineProperty(u4,"__esModule",{value:!0});u4.ProxyLoggerProvider=void 0;var o_t=a4(),i_t=Z7(),W7=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new i_t.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:o_t.NOOP_LOGGER_PROVIDER}_setDelegate(t){this._delegate=t}_getDelegateLogger(t,n,r){var o;return(o=this._delegate)===null||o===void 0?void 0:o.getLogger(t,n,r)}};u4.ProxyLoggerProvider=W7});var R1e=Q(c4=>{"use strict";A();Object.defineProperty(c4,"__esModule",{value:!0});c4._globalThis=void 0;c4._globalThis=typeof globalThis=="object"?globalThis:global});var D1e=Q(l4=>{"use strict";A();Object.defineProperty(l4,"__esModule",{value:!0});l4._globalThis=void 0;var a_t=R1e();Object.defineProperty(l4,"_globalThis",{enumerable:!0,get:function(){return a_t._globalThis}})});var x1e=Q(d4=>{"use strict";A();Object.defineProperty(d4,"__esModule",{value:!0});d4._globalThis=void 0;var s_t=D1e();Object.defineProperty(d4,"_globalThis",{enumerable:!0,get:function(){return s_t._globalThis}})});var B1e=Q(aA=>{"use strict";A();Object.defineProperty(aA,"__esModule",{value:!0});aA.API_BACKWARDS_COMPATIBILITY_VERSION=aA.makeGetter=aA._global=aA.GLOBAL_LOGS_API_KEY=void 0;var u_t=x1e();aA.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");aA._global=u_t._globalThis;function c_t(e,t,n){return r=>r===e?t:n}aA.makeGetter=c_t;aA.API_BACKWARDS_COMPATIBILITY_VERSION=1});var O1e=Q(p4=>{"use strict";A();Object.defineProperty(p4,"__esModule",{value:!0});p4.LogsAPI=void 0;var Bd=B1e(),l_t=a4(),N1e=X7(),eY=class e{constructor(){this._proxyLoggerProvider=new N1e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Bd._global[Bd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Bd._global[Bd.GLOBAL_LOGS_API_KEY]=(0,Bd.makeGetter)(Bd.API_BACKWARDS_COMPATIBILITY_VERSION,t,l_t.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Bd._global[Bd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Bd._global,Bd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Bd._global[Bd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new N1e.ProxyLoggerProvider}};p4.LogsAPI=eY});var tY=Q(Pa=>{"use strict";A();Object.defineProperty(Pa,"__esModule",{value:!0});Pa.logs=Pa.ProxyLoggerProvider=Pa.ProxyLogger=Pa.NoopLoggerProvider=Pa.NOOP_LOGGER_PROVIDER=Pa.NoopLogger=Pa.NOOP_LOGGER=Pa.SeverityNumber=void 0;var d_t=v1e();Object.defineProperty(Pa,"SeverityNumber",{enumerable:!0,get:function(){return d_t.SeverityNumber}});var w1e=o4();Object.defineProperty(Pa,"NOOP_LOGGER",{enumerable:!0,get:function(){return w1e.NOOP_LOGGER}});Object.defineProperty(Pa,"NoopLogger",{enumerable:!0,get:function(){return w1e.NoopLogger}});var M1e=a4();Object.defineProperty(Pa,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return M1e.NOOP_LOGGER_PROVIDER}});Object.defineProperty(Pa,"NoopLoggerProvider",{enumerable:!0,get:function(){return M1e.NoopLoggerProvider}});var p_t=Z7();Object.defineProperty(Pa,"ProxyLogger",{enumerable:!0,get:function(){return p_t.ProxyLogger}});var f_t=X7();Object.defineProperty(Pa,"ProxyLoggerProvider",{enumerable:!0,get:function(){return f_t.ProxyLoggerProvider}});var A_t=O1e();Pa.logs=A_t.LogsAPI.getInstance()});var P1e=Q(jb=>{"use strict";A();Object.defineProperty(jb,"__esModule",{value:!0});jb.disableInstrumentations=jb.enableInstrumentations=void 0;function m_t(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}jb.enableInstrumentations=m_t;function g_t(e){e.forEach(t=>t.disable())}jb.disableInstrumentations=g_t});var L1e=Q(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.registerInstrumentations=void 0;var k1e=(Le(),we(Je)),h_t=tY(),U1e=P1e();function __t(e){let t=e.tracerProvider||k1e.trace.getTracerProvider(),n=e.meterProvider||k1e.metrics.getMeterProvider(),r=e.loggerProvider||h_t.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,U1e.enableInstrumentations)(o,t,n,r),()=>{(0,U1e.disableInstrumentations)(o)}}f4.registerInstrumentations=__t});var q1e=Q(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.satisfies=void 0;var iY=(Le(),we(Je)),z1e=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,E_t=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,S_t={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function y_t(e,t,n){if(!T_t(e))return iY.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=v_t(e);if(!r)return!1;let o=[],i=H1e(r,t,o,n);return i&&!n?.includePrerelease?C_t(r,o):i}A4.satisfies=y_t;function T_t(e){return typeof e=="string"&&z1e.test(e)}function H1e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(nY(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=q_t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!nY(e,i,n,r))return!1;return!0}return nY(e,t,n,r)}function nY(e,t,n,r){if(t=b_t(t,r),t.includes(" "))return H1e(e,t,n,r);{let o=R_t(t);return n.push(o),I_t(e,o)}}function I_t(e,t){if(t.invalid)return!1;if(!t.version||oY(t.version))return!0;let n=F1e(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=F1e(r,o)}return S_t[t.op]?.includes(n)}function C_t(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function b_t(e,t){return e=e.trim(),e=$_t(e,t),e=H_t(e),e=V_t(e,t),e=e.trim(),e}function bu(e){return!e||e.toLowerCase()==="x"||e==="*"}function v_t(e){let t=e.match(z1e);if(!t){iY.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 R_t(e){if(!e)return{};let t=e.match(E_t);if(!t)return iY.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 oY(e){return e==="*"||e==="x"||e==="X"}function Q1e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function D_t(e,t){if(typeof e==typeof t){if(typeof e=="number")return[e,t];if(typeof e=="string")return[e,t];throw new Error("Version segments can only be strings or numbers")}else return[String(e),String(t)]}function x_t(e,t){if(oY(e)||oY(t))return 0;let[n,r]=D_t(Q1e(e),Q1e(t));return n>r?1:n<r?-1:0}function F1e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=x_t(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var $1e="[a-zA-Z0-9-]",V1e="0|[1-9]\\d*",B_t=`\\d*[a-zA-Z-]${$1e}*`,N_t="((?:<|>)?=?)",G1e=`(?:${V1e}|${B_t})`,O_t=`(?:-(${G1e}(?:\\.${G1e})*))`,j1e=`${$1e}+`,w_t=`(?:\\+(${j1e}(?:\\.${j1e})*))`,rY=`${V1e}|x|X|\\*`,rN=`[v=\\s]*(${rY})(?:\\.(${rY})(?:\\.(${rY})(?:${O_t})?${w_t}?)?)?`,M_t=`^${N_t}\\s*${rN}$`,P_t=new RegExp(M_t),k_t=`^\\s*(${rN})\\s+-\\s+(${rN})\\s*$`,U_t=new RegExp(k_t),L_t="(?:~>?)",Q_t=`^${L_t}${rN}$`,F_t=new RegExp(Q_t),G_t="(?:\\^)",j_t=`^${G_t}${rN}$`,z_t=new RegExp(j_t);function H_t(e){let t=F_t;return e.replace(t,(n,r,o,i,a)=>{let c;return bu(r)?c="":bu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:bu(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 $_t(e,t){let n=z_t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,a,c,d)=>{let m;return bu(i)?m="":bu(a)?m=`>=${i}.0.0${r} <${+i+1}.0.0-0`:bu(c)?i==="0"?m=`>=${i}.${a}.0${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.0${r} <${+i+1}.0.0-0`:d?i==="0"?a==="0"?m=`>=${i}.${a}.${c}-${d} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}-${d} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c}-${d} <${+i+1}.0.0-0`:i==="0"?a==="0"?m=`>=${i}.${a}.${c}${r} <${i}.${a}.${+c+1}-0`:m=`>=${i}.${a}.${c}${r} <${i}.${+a+1}.0-0`:m=`>=${i}.${a}.${c} <${+i+1}.0.0-0`,m})}function V_t(e,t){let n=P_t;return e.replace(n,(r,o,i,a,c,d)=>{let m=bu(i),h=m||bu(a),y=h||bu(c),S=y;return o==="="&&S&&(o=""),d=t?.includePrerelease?"-0":"",m?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==="<"&&(d="-0"),r=`${o+i}.${a}.${c}${d}`):h?r=`>=${i}.0.0${d} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${a}.0${d} <${i}.${+a+1}.0-0`),r})}function q_t(e,t){let n=U_t;return e.replace(n,(r,o,i,a,c,d,m,h,y,S,b,R)=>(bu(i)?o="":bu(a)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:bu(c)?o=`>=${i}.${a}.0${t?.includePrerelease?"-0":""}`:d?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,bu(y)?h="":bu(S)?h=`<${+y+1}.0.0-0`:bu(b)?h=`<${y}.${+S+1}.0-0`:R?h=`<=${y}.${S}.${b}-${R}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var aY=Q(ls=>{"use strict";A();Object.defineProperty(ls,"__esModule",{value:!0});ls.massUnwrap=ls.unwrap=ls.massWrap=ls.wrap=void 0;var vu=console.error.bind(console);function oN(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 Y_t=(e,t,n)=>{if(!e||!e[t]){vu("no original function "+String(t)+" to wrap");return}if(!n){vu("no wrapper function"),vu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){vu("original object and wrapper must be functions");return}let o=n(r,t);return oN(o,"__original",r),oN(o,"__unwrap",()=>{e[t]===o&&oN(e,t,r)}),oN(o,"__wrapped",!0),oN(e,t,o),o};ls.wrap=Y_t;var K_t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{vu("must provide one or more modules to patch"),vu(new Error().stack);return}if(!(t&&Array.isArray(t))){vu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,ls.wrap)(r,o,n)})})};ls.massWrap=K_t;var J_t=(e,t)=>{if(!e||!e[t]){vu("no function to unwrap."),vu(new Error().stack);return}let n=e[t];if(!n.__unwrap)vu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};ls.unwrap=J_t;var Z_t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{vu("must provide one or more modules to patch"),vu(new Error().stack);return}if(!(t&&Array.isArray(t))){vu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,ls.unwrap)(n,r)})})};ls.massUnwrap=Z_t;function iN(e){e&&e.logger&&(typeof e.logger!="function"?vu("new logger isn't a function, not replacing"):vu=e.logger)}ls.default=iN;iN.wrap=ls.wrap;iN.massWrap=ls.massWrap;iN.unwrap=ls.unwrap;iN.massUnwrap=ls.massUnwrap});var Y1e=Q(g4=>{"use strict";A();Object.defineProperty(g4,"__esModule",{value:!0});g4.InstrumentationAbstract=void 0;var sY=(Le(),we(Je)),W_t=tY(),m4=aY(),uY=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=sY.diag.createComponentLogger({namespace:t}),this._tracer=sY.trace.getTracer(t,n),this._meter=sY.metrics.getMeter(t,n),this._logger=W_t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=m4.wrap;_unwrap=m4.unwrap;_massWrap=m4.massWrap;_massUnwrap=m4.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)}}};g4.InstrumentationAbstract=uY});var K1e=Q(m_=>{"use strict";A();Object.defineProperty(m_,"__esModule",{value:!0});m_.ModuleNameTrie=m_.ModuleNameSeparator=void 0;m_.ModuleNameSeparator="/";var h4=class{hooks=[];children=new Map},cY=class{_trie=new h4;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(m_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new h4,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(m_.ModuleNameSeparator)){let d=o.children.get(c);if(!d){a=!1;break}r||i.push(...d.hooks),o=d}return r&&a&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,d)=>c.insertedId-d.insertedId),i.map(({hook:c})=>c))}};m_.ModuleNameTrie=cY});var Z1e=Q(_4=>{"use strict";A();Object.defineProperty(_4,"__esModule",{value:!0});_4.RequireInTheMiddleSingleton=void 0;var X_t=F0(),J1e=Ue("path"),lY=K1e(),eEt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),dY=class e{_moduleNameTrie=new lY.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new X_t.Hook(null,{internals:!0},(t,n,r)=>{let o=tEt(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 eEt?new e:this._instance=this._instance??new e}};_4.RequireInTheMiddleSingleton=dY;function tEt(e){return J1e.sep!==lY.ModuleNameSeparator?e.split(J1e.sep).join(lY.ModuleNameSeparator):e}});var pY=Q(g_=>{"use strict";A();Object.defineProperty(g_,"__esModule",{value:!0});g_.isWrapped=g_.safeExecuteInTheMiddleAsync=g_.safeExecuteInTheMiddle=void 0;function nEt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}g_.safeExecuteInTheMiddle=nEt;async function rEt(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}}g_.safeExecuteInTheMiddleAsync=rEt;function oEt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}g_.isWrapped=oEt});var eBe=Q(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.InstrumentationBase=void 0;var aN=Ue("path"),W1e=Ue("util"),iEt=q1e(),fY=aY(),aEt=Y1e(),sEt=Z1e(),uEt=qq(),sN=(Le(),we(Je)),cEt=F0(),lEt=Ue("fs"),dEt=pY(),AY=class extends aEt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=sEt.RequireInTheMiddleSingleton.getInstance();_enabled=!1;constructor(t,n,r){super(t,n,r);let o=this.init();o&&!Array.isArray(o)&&(o=[o]),this._modules=o||[],this._config.enabled&&this.enable()}_wrap=(t,n,r)=>{if((0,dEt.isWrapped)(t[n])&&this._unwrap(t,n),W1e.types.isProxy(t)){let o=(0,fY.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,fY.wrap)(t,n,r)};_unwrap=(t,n)=>W1e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,fY.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{sN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){sN.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{sN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){sN.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=Ue.resolve(n);Ue.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,lEt.readFileSync)(aN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{sN.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 X1e(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=aN.normalize(r);return a.filter(m=>m.name===c).filter(m=>X1e(m.supportedVersions,i,t.includePrerelease)).reduce((m,h)=>(h.moduleExports=m,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(m,t.moduleVersion)):m),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(a,c,d)=>{if(!d&&aN.isAbsolute(c)){let m=aN.parse(c);c=m.name,d=m.dir}return this._onRequire(t,a,c,d)},r=(a,c,d)=>this._onRequire(t,a,c,d),o=aN.isAbsolute(t.name)?new cEt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new uEt.Hook([t.name],{internals:!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}};E4.InstrumentationBase=AY;function X1e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,iEt.satisfies)(t,r,{includePrerelease:n}))}});var tBe=Q(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.normalize=void 0;var pEt=Ue("path");Object.defineProperty(S4,"normalize",{enumerable:!0,get:function(){return pEt.normalize}})});var nBe=Q(zb=>{"use strict";A();Object.defineProperty(zb,"__esModule",{value:!0});zb.normalize=zb.InstrumentationBase=void 0;var fEt=eBe();Object.defineProperty(zb,"InstrumentationBase",{enumerable:!0,get:function(){return fEt.InstrumentationBase}});var AEt=tBe();Object.defineProperty(zb,"normalize",{enumerable:!0,get:function(){return AEt.normalize}})});var mY=Q(Hb=>{"use strict";A();Object.defineProperty(Hb,"__esModule",{value:!0});Hb.normalize=Hb.InstrumentationBase=void 0;var rBe=nBe();Object.defineProperty(Hb,"InstrumentationBase",{enumerable:!0,get:function(){return rBe.InstrumentationBase}});Object.defineProperty(Hb,"normalize",{enumerable:!0,get:function(){return rBe.normalize}})});var oBe=Q(y4=>{"use strict";A();Object.defineProperty(y4,"__esModule",{value:!0});y4.InstrumentationNodeModuleDefinition=void 0;var gY=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||[]}};y4.InstrumentationNodeModuleDefinition=gY});var iBe=Q(T4=>{"use strict";A();Object.defineProperty(T4,"__esModule",{value:!0});T4.InstrumentationNodeModuleFile=void 0;var mEt=mY(),hY=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,mEt.normalize)(t)}};T4.InstrumentationNodeModuleFile=hY});var aBe=Q(bS=>{"use strict";A();Object.defineProperty(bS,"__esModule",{value:!0});bS.semconvStabilityFromStr=bS.SemconvStability=void 0;var I4;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(I4=bS.SemconvStability||(bS.SemconvStability={}));function gEt(e,t){let n=I4.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=I4.DUPLICATE;break}else o.toLowerCase()===e&&(n=I4.STABLE);return n}bS.semconvStabilityFromStr=gEt});var uBe=Q(zi=>{"use strict";A();Object.defineProperty(zi,"__esModule",{value:!0});zi.semconvStabilityFromStr=zi.SemconvStability=zi.safeExecuteInTheMiddleAsync=zi.safeExecuteInTheMiddle=zi.isWrapped=zi.InstrumentationNodeModuleFile=zi.InstrumentationNodeModuleDefinition=zi.InstrumentationBase=zi.registerInstrumentations=void 0;var hEt=L1e();Object.defineProperty(zi,"registerInstrumentations",{enumerable:!0,get:function(){return hEt.registerInstrumentations}});var _Et=mY();Object.defineProperty(zi,"InstrumentationBase",{enumerable:!0,get:function(){return _Et.InstrumentationBase}});var EEt=oBe();Object.defineProperty(zi,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return EEt.InstrumentationNodeModuleDefinition}});var SEt=iBe();Object.defineProperty(zi,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return SEt.InstrumentationNodeModuleFile}});var _Y=pY();Object.defineProperty(zi,"isWrapped",{enumerable:!0,get:function(){return _Y.isWrapped}});Object.defineProperty(zi,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return _Y.safeExecuteInTheMiddle}});Object.defineProperty(zi,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return _Y.safeExecuteInTheMiddleAsync}});var sBe=aBe();Object.defineProperty(zi,"SemconvStability",{enumerable:!0,get:function(){return sBe.SemconvStability}});Object.defineProperty(zi,"semconvStabilityFromStr",{enumerable:!0,get:function(){return sBe.semconvStabilityFromStr}})});function IEt(){let e=$b[SY];return e?.helper?e.helper:$b[EY]?.helper}function CEt(e){let t={helper:e};$b[SY]=t,$b[EY]=t}function bEt(){delete $b[SY],delete $b[EY]}function DEt(e){switch(e){case"client":return Zr.CLIENT;case"internal":default:return Zr.INTERNAL}}function dBe(e,t,n,r,o){if(pBe(t.name,o))return;let i={attributes:t.attributes,kind:DEt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,a=>{r.set(t.id,a.spanContext().spanId),t.links&&a.addLinks(t.links.flatMap(d=>{let m=r.get(d);return m?{context:{spanId:m,traceId:a.spanContext().traceId,traceFlags:a.spanContext().traceFlags}}:[]}));let c=n.filter(d=>d.parentId===t.id);for(let d of c)dBe(e,d,n,r,o);a.end(t.endTime)})}function cBe(e,t){return BEt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function BEt(e){return e!=null&&typeof e.then=="function"}function pBe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var C4,yEt,TEt,EY,SY,$b,vEt,REt,xEt,fBe,lBe,NEt,OEt,ABe,mBe=O(()=>{A();Le();C4=ue(uBe(),1);Le();yEt={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"}},TEt=yEt.version.split(".")[0],EY="PRISMA_INSTRUMENTATION",SY=`V${TEt}_PRISMA_INSTRUMENTATION`,$b=globalThis;vEt=process.env.PRISMA_SHOW_ALL_TRACES==="true",REt="00-10-10-00";xEt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=Ft.getSpanContext(e??qe.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:REt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)dBe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return qe.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!vEt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(pBe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return cBe(i,t(i,r))}return n.startActiveSpan(o,e,i=>cBe(i,t(i,r)))}};fBe={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},lBe=fBe.version,NEt=fBe.name,OEt="@prisma/client",ABe=class extends C4.InstrumentationBase{tracerProvider;constructor(e={}){super(NEt,lBe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new C4.InstrumentationNodeModuleDefinition(OEt,[lBe])]}enable(){let e=this._config;CEt(new xEt({tracerProvider:this.tracerProvider??Ft.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){bEt()}isEnabled(){return IEt()!==void 0}}});function wEt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function hBe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function MEt(e){switch(e){case"client":return Zr.CLIENT;case"internal":default:return Zr.INTERNAL}}var gBe,yY,PEt,_Be,EBe=O(()=>{A();Le();mBe();dt();pr();gBe="Prisma";yY=class extends ABe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=hBe();wEt(t)&&(t.createEngineSpan=n=>{let r=Ft.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){_i(()=>{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=MEt(i.kind),c=i.parent_span_id,d=i.span_id,m=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ds.SAMPLED}})),y=Ft.setSpanContext(qe.active(),{traceId:m,spanId:c,traceFlags:Ds.SAMPLED});qe.with(y,()=>{let S={generateTraceId:()=>m,generateSpanId:()=>d};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}})}};PEt=it(gBe,e=>new yY(e)),_Be=e=>({name:gBe,setupOnce(){PEt(e)},setup(t){hBe()&&t.on("spanStart",n=>{let r=xt(n);r.description?.startsWith("prisma:")&&n.setAttribute(Nt,"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 SBe=Q(Vb=>{"use strict";A();Object.defineProperty(Vb,"__esModule",{value:!0});Vb.PACKAGE_NAME=Vb.PACKAGE_VERSION=void 0;Vb.PACKAGE_VERSION="0.60.0";Vb.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var TY=Q(sA=>{"use strict";A();Object.defineProperty(sA,"__esModule",{value:!0});sA.HapiLifecycleMethodNames=sA.HapiLayerType=sA.handlerPatched=sA.HapiComponentName=void 0;sA.HapiComponentName="@hapi/hapi";sA.handlerPatched=Symbol("hapi-handler-patched");sA.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};sA.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var yBe=Q(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.ATTR_HTTP_METHOD=void 0;b4.ATTR_HTTP_METHOD="http.method"});var IY=Q(uN=>{"use strict";A();Object.defineProperty(uN,"__esModule",{value:!0});uN.AttributeNames=void 0;var kEt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(kEt=uN.AttributeNames||(uN.AttributeNames={}))});var CBe=Q(Hi=>{"use strict";A();Object.defineProperty(Hi,"__esModule",{value:!0});Hi.getPluginFromInput=Hi.getExtMetadata=Hi.getRouteMetadata=Hi.isPatchableExtMethod=Hi.isDirectExtInput=Hi.isLifecycleExtEventObj=Hi.isLifecycleExtType=Hi.getPluginName=void 0;var TBe=($n(),we(Nr)),UEt=yBe(),cN=TY(),h_=IY(),IBe=Xt();function LEt(e){return e.name?e.name:e.pkg.name}Hi.getPluginName=LEt;var QEt=e=>typeof e=="string"&&cN.HapiLifecycleMethodNames.has(e);Hi.isLifecycleExtType=QEt;var FEt=e=>{let t=e?.type;return t!==void 0&&(0,Hi.isLifecycleExtType)(t)};Hi.isLifecycleExtEventObj=FEt;var GEt=e=>Array.isArray(e)&&e.length<=3&&(0,Hi.isLifecycleExtType)(e[0])&&typeof e[1]=="function";Hi.isDirectExtInput=GEt;var jEt=e=>!Array.isArray(e);Hi.isPatchableExtMethod=jEt;var zEt=(e,t,n)=>{let r={[TBe.ATTR_HTTP_ROUTE]:e.path};t&IBe.SemconvStability.OLD&&(r[UEt.ATTR_HTTP_METHOD]=e.method),t&IBe.SemconvStability.STABLE&&(r[TBe.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[h_.AttributeNames.HAPI_TYPE]=cN.HapiLayerType.PLUGIN,r[h_.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[h_.AttributeNames.HAPI_TYPE]=cN.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};Hi.getRouteMetadata=zEt;var HEt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[h_.AttributeNames.EXT_TYPE]:e,[h_.AttributeNames.HAPI_TYPE]:cN.HapiLayerType.EXT,[h_.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[h_.AttributeNames.EXT_TYPE]:e,[h_.AttributeNames.HAPI_TYPE]:cN.HapiLayerType.EXT},name:r}};Hi.getExtMetadata=HEt;var $Et=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;Hi.getPluginFromInput=$Et});var RBe=Q(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.HapiInstrumentation=void 0;var _l=(Le(),we(Je)),bBe=hr(),lN=Xt(),vBe=SBe(),dN=TY(),Vm=CBe(),CY=class extends lN.InstrumentationBase{_semconvStability;constructor(t={}){super(vBe.PACKAGE_NAME,vBe.PACKAGE_VERSION,t),this._semconvStability=(0,lN.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new lN.InstrumentationNodeModuleDefinition(dN.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,lN.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,lN.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,Vm.getPluginFromInput)(a);n._wrapRegisterHandler(c)}else{let a=(0,Vm.getPluginFromInput)(o);n._wrapRegisterHandler(a)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let a=i[0];for(let c=0;c<a.length;c++){let d=a[c];if((0,Vm.isLifecycleExtType)(d.type)){let m=d,h=r._wrapExtMethods(m.method,d.type,n);m.method=h,a[c]=m}}return t.apply(this,i)}else if((0,Vm.isDirectExtInput)(i)){let a=i,c=a[1],d=r._wrapExtMethods(c,a[0],n);return t.apply(this,[a[0],d,a[2]])}else if((0,Vm.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,Vm.getPluginName)(t),o=t.register,i=this,a=function(c,d){return i._wrap(c,"route",m=>n._getServerRoutePatch.bind(n)(m,r)),i._wrap(c,"ext",m=>n._getServerExtPatch.bind(n)(m,r)),o.call(this,c,d)};t.register=a}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Vm.isPatchableExtMethod)(t))return t[dN.handlerPatched]===!0?t:(t[dN.handlerPatched]=!0,async function(...a){if(_l.trace.getSpan(_l.context.active())===void 0)return await t.apply(this,a);let c=(0,Vm.getExtMetadata)(n,r,t.name),d=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await _l.context.with(_l.trace.setSpan(_l.context.active(),d),t,void 0,...a)}catch(m){throw d.recordException(m),d.setStatus({code:_l.SpanStatusCode.ERROR,message:m.message}),m}finally{d.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[dN.handlerPatched]===!0)return t;t[dN.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,bBe.getRPCMetadata)(_l.context.active());c?.type===bBe.RPCType.HTTP&&(c.route=t.path);let d=(0,Vm.getRouteMetadata)(t,r._semconvStability,n),m=r.tracer.startSpan(d.name,{attributes:d.attributes});try{return await _l.context.with(_l.trace.setSpan(_l.context.active(),m),()=>i.call(this,...a))}catch(h){throw m.recordException(h),m.setStatus({code:_l.SpanStatusCode.ERROR,message:h.message}),h}finally{m.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}};v4.HapiInstrumentation=CY});var DBe=Q(qb=>{"use strict";A();Object.defineProperty(qb,"__esModule",{value:!0});qb.AttributeNames=qb.HapiInstrumentation=void 0;var VEt=RBe();Object.defineProperty(qb,"HapiInstrumentation",{enumerable:!0,get:function(){return VEt.HapiInstrumentation}});var qEt=IY();Object.defineProperty(qb,"AttributeNames",{enumerable:!0,get:function(){return qEt.AttributeNames}})});var xBe,BBe,NBe,YEt,OBe,wBe=O(()=>{A();xBe=ue(DBe(),1);pr();BBe="Hapi",NBe=it(BBe,()=>new xBe.HapiInstrumentation),YEt=()=>({name:BBe,setupOnce(){NBe()}}),OBe=YEt});var __,pN,bY=O(()=>{A();__={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},pN={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var D4,KEt,JEt,R4,MBe=O(()=>{A();Le();D4=ue(Xt(),1);dt();bY();KEt="@sentry/instrumentation-hono",JEt="0.0.1",R4=class extends D4.InstrumentationBase{constructor(t={}){super(KEt,JEt,t)}init(){return[new D4.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 qe.with(Ft.setSpan(qe.active(),a),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ns(c))return c.then(d=>{let m=n._determineHandlerType(d);return a.setAttributes({[__.HONO_TYPE]:m,[__.HONO_NAME]:m===pN.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(a),d});{let d=n._determineHandlerType(c);return a.setAttributes({[__.HONO_TYPE]:d,[__.HONO_NAME]:d===pN.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 ns(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?pN.MIDDLEWARE:pN.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:Wo.ERROR,message:n.message}),t.recordException(n))}}});function ZEt(e){let t=xt(e).data,n=t[__.HONO_TYPE];if(t[Yt]||!n)return;e.setAttributes({[Nt]:"auto.http.otel.hono",[Yt]:`${n}.hono`});let r=t[__.HONO_NAME];if(typeof r=="string"&&e.updateName(r),Nn()===md()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[ym],i=t[P0];typeof o=="string"&&typeof i=="string"&&Nn().setTransactionName(`${i} ${o}`)}var PBe,kBe,WEt,UBe,LBe=O(()=>{A();$n();dt();pr();AS();bY();MBe();PBe="Hono";kBe=it(PBe,()=>new R4({responseHook:e=>{ZEt(e)}})),WEt=()=>({name:PBe,setupOnce(){kBe()}}),UBe=WEt});var x4=Q(fN=>{"use strict";A();Object.defineProperty(fN,"__esModule",{value:!0});fN.KoaLayerType=void 0;var XEt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(XEt=fN.KoaLayerType||(fN.KoaLayerType={}))});var QBe=Q(Yb=>{"use strict";A();Object.defineProperty(Yb,"__esModule",{value:!0});Yb.PACKAGE_NAME=Yb.PACKAGE_VERSION=void 0;Yb.PACKAGE_VERSION="0.62.0";Yb.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var vY=Q(AN=>{"use strict";A();Object.defineProperty(AN,"__esModule",{value:!0});AN.AttributeNames=void 0;var e0t;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(e0t=AN.AttributeNames||(AN.AttributeNames={}))});var GBe=Q(Kb=>{"use strict";A();Object.defineProperty(Kb,"__esModule",{value:!0});Kb.isLayerIgnored=Kb.getMiddlewareMetadata=void 0;var FBe=x4(),B4=vY(),t0t=($n(),we(Nr)),n0t=(e,t,n,r)=>n?{attributes:{[B4.AttributeNames.KOA_NAME]:r?.toString(),[B4.AttributeNames.KOA_TYPE]:FBe.KoaLayerType.ROUTER,[t0t.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[B4.AttributeNames.KOA_NAME]:t.name??"middleware",[B4.AttributeNames.KOA_TYPE]:FBe.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};Kb.getMiddlewareMetadata=n0t;var r0t=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));Kb.isLayerIgnored=r0t});var jBe=Q(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.kLayerPatched=void 0;N4.kLayerPatched=Symbol("koa-layer-patched")});var YBe=Q(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.KoaInstrumentation=void 0;var uA=(Le(),we(Je)),mN=Xt(),zBe=x4(),HBe=QBe(),$Be=GBe(),VBe=hr(),qBe=jBe(),RY=class extends mN.InstrumentationBase{constructor(t={}){super(HBe.PACKAGE_NAME,HBe.PACKAGE_VERSION,t)}init(){return new mN.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,mN.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,mN.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){uA.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,a=o.stack;for(let c=0;c<a.length;c++){let d=a[c];a[c]=this._patchLayer(d,!0,i)}}return t}_patchLayer(t,n,r){let o=n?zBe.KoaLayerType.ROUTER:zBe.KoaLayerType.MIDDLEWARE;return t[qBe.kLayerPatched]===!0||(0,$Be.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(uA.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[qBe.kLayerPatched]=!0,uA.diag.debug("patching Koa middleware layer"),async(i,a)=>{if(uA.trace.getSpan(uA.context.active())===void 0)return t(i,a);let d=(0,$Be.getMiddlewareMetadata)(i,t,n,r),m=this.tracer.startSpan(d.name,{attributes:d.attributes}),h=(0,VBe.getRPCMetadata)(uA.context.active());h?.type===VBe.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,mN.safeExecuteInTheMiddle)(()=>y(m,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&uA.diag.error("koa instrumentation: request hook failed",b)},!0);let S=uA.trace.setSpan(uA.context.active(),m);return uA.context.with(S,async()=>{try{return await t(i,a)}catch(b){throw m.recordException(b),b}finally{m.end()}})})}};O4.KoaInstrumentation=RY});var KBe=Q(E_=>{"use strict";A();Object.defineProperty(E_,"__esModule",{value:!0});E_.KoaLayerType=E_.AttributeNames=E_.KoaInstrumentation=void 0;var o0t=YBe();Object.defineProperty(E_,"KoaInstrumentation",{enumerable:!0,get:function(){return o0t.KoaInstrumentation}});var i0t=vY();Object.defineProperty(E_,"AttributeNames",{enumerable:!0,get:function(){return i0t.AttributeNames}});var a0t=x4();Object.defineProperty(E_,"KoaLayerType",{enumerable:!0,get:function(){return a0t.KoaLayerType}})});var JBe,ZBe,WBe,s0t,XBe,eNe=O(()=>{A();JBe=ue(KBe(),1);$n();dt();pr();AS();ZBe="Koa",WBe=it(ZBe,JBe.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){Or(t,"auto.http.otel.koa");let r=xt(t).data,o=r["koa.type"];o&&t.setAttribute(Yt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),Nn()===md()){sa&&Z.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let a=r[ym],c=n.context?.request?.method?.toUpperCase()||"GET";a&&Nn().setTransactionName(`${c} ${a}`)}})),s0t=(e={})=>({name:ZBe,setupOnce(){WBe(e)}}),XBe=s0t});var DY=Q(Gp=>{"use strict";A();Object.defineProperty(Gp,"__esModule",{value:!0});Gp.ConnectNames=Gp.ConnectTypes=Gp.AttributeNames=void 0;var u0t;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(u0t=Gp.AttributeNames||(Gp.AttributeNames={}));var c0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(c0t=Gp.ConnectTypes||(Gp.ConnectTypes={}));var l0t;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(l0t=Gp.ConnectNames||(Gp.ConnectNames={}))});var tNe=Q(Jb=>{"use strict";A();Object.defineProperty(Jb,"__esModule",{value:!0});Jb.PACKAGE_NAME=Jb.PACKAGE_VERSION=void 0;Jb.PACKAGE_VERSION="0.57.0";Jb.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var nNe=Q(w4=>{"use strict";A();Object.defineProperty(w4,"__esModule",{value:!0});w4._LAYERS_STORE_PROPERTY=void 0;w4._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var rNe=Q(y_=>{"use strict";A();Object.defineProperty(y_,"__esModule",{value:!0});y_.generateRoute=y_.replaceCurrentStackRoute=y_.addNewStackLayer=void 0;var d0t=(Le(),we(Je)),S_=nNe(),p0t=e=>{Array.isArray(e[S_._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,S_._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[S_._LAYERS_STORE_PROPERTY].push("/");let t=e[S_._LAYERS_STORE_PROPERTY].length;return()=>{t===e[S_._LAYERS_STORE_PROPERTY].length?e[S_._LAYERS_STORE_PROPERTY].pop():d0t.diag.warn("Connect: Trying to pop the stack multiple time")}};y_.addNewStackLayer=p0t;var f0t=(e,t)=>{t&&e[S_._LAYERS_STORE_PROPERTY].splice(-1,1,t)};y_.replaceCurrentStackRoute=f0t;var A0t=e=>e[S_._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);y_.generateRoute=A0t});var aNe=Q(T_=>{"use strict";A();Object.defineProperty(T_,"__esModule",{value:!0});T_.ConnectInstrumentation=T_.ANONYMOUS_NAME=void 0;var m0t=(Le(),we(Je)),oNe=hr(),Zb=DY(),iNe=tNe(),M4=Xt(),g0t=($n(),we(Nr)),xY=rNe();T_.ANONYMOUS_NAME="anonymous";var BY=class extends M4.InstrumentationBase{constructor(t={}){super(iNe.PACKAGE_NAME,iNe.PACKAGE_VERSION,t)}init(){return[new M4.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,M4.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,M4.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=Zb.ConnectTypes.REQUEST_HANDLER,i=Zb.ConnectNames.REQUEST_HANDLER,o=t):(r=Zb.ConnectTypes.MIDDLEWARE,i=Zb.ConnectNames.MIDDLEWARE,o=n.name||T_.ANONYMOUS_NAME);let a=`${i} - ${o}`,c={attributes:{[g0t.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[Zb.AttributeNames.CONNECT_TYPE]:r,[Zb.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(a,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[a,c,d]=o?[1,2,3]:[0,1,2],m=arguments[a],h=arguments[c],y=arguments[d];(0,xY.replaceCurrentStackRoute)(m,t);let S=(0,oNe.getRPCMetadata)(m0t.context.active());t&&S?.type===oNe.RPCType.HTTP&&(S.route=(0,xY.generateRoute)(m));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||T_.ANONYMOUS_NAME}`;let R=r._startSpan(t,n);r._diag.debug("start span",b);let B=!1;function N(){B?r._diag.debug(`span ${R.name} - already finished`):(B=!0,r._diag.debug(`finishing span ${R.name}`),R.end()),h.removeListener("close",N)}return h.addListener("close",N),arguments[d]=r._patchNext(y,N),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],a=arguments[o],c=(0,xY.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)}}};T_.ConnectInstrumentation=BY});var uNe=Q(Nd=>{"use strict";A();Object.defineProperty(Nd,"__esModule",{value:!0});Nd.ConnectTypes=Nd.ConnectNames=Nd.AttributeNames=Nd.ANONYMOUS_NAME=Nd.ConnectInstrumentation=void 0;var sNe=aNe();Object.defineProperty(Nd,"ConnectInstrumentation",{enumerable:!0,get:function(){return sNe.ConnectInstrumentation}});Object.defineProperty(Nd,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return sNe.ANONYMOUS_NAME}});var NY=DY();Object.defineProperty(Nd,"AttributeNames",{enumerable:!0,get:function(){return NY.AttributeNames}});Object.defineProperty(Nd,"ConnectNames",{enumerable:!0,get:function(){return NY.ConnectNames}});Object.defineProperty(Nd,"ConnectTypes",{enumerable:!0,get:function(){return NY.ConnectTypes}})});var cNe,lNe,dNe,h0t,pNe,fNe=O(()=>{A();cNe=ue(uNe(),1);pr();lNe="Connect",dNe=it(lNe,()=>new cNe.ConnectInstrumentation),h0t=()=>({name:lNe,setupOnce(){dNe()}}),pNe=h0t});var ANe=Q(ka=>{"use strict";A();Object.defineProperty(ka,"__esModule",{value:!0});ka.DB_SYSTEM_VALUE_MSSQL=ka.ATTR_NET_PEER_PORT=ka.ATTR_NET_PEER_NAME=ka.ATTR_DB_USER=ka.ATTR_DB_SYSTEM=ka.ATTR_DB_STATEMENT=ka.ATTR_DB_SQL_TABLE=ka.ATTR_DB_NAME=void 0;ka.ATTR_DB_NAME="db.name";ka.ATTR_DB_SQL_TABLE="db.sql.table";ka.ATTR_DB_STATEMENT="db.statement";ka.ATTR_DB_SYSTEM="db.system";ka.ATTR_DB_USER="db.user";ka.ATTR_NET_PEER_NAME="net.peer.name";ka.ATTR_NET_PEER_PORT="net.peer.port";ka.DB_SYSTEM_VALUE_MSSQL="mssql"});var mNe=Q(Wb=>{"use strict";A();Object.defineProperty(Wb,"__esModule",{value:!0});Wb.once=Wb.getSpanName=void 0;function _0t(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}Wb.getSpanName=_0t;var E0t=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Wb.once=E0t});var gNe=Q(Xb=>{"use strict";A();Object.defineProperty(Xb,"__esModule",{value:!0});Xb.PACKAGE_NAME=Xb.PACKAGE_VERSION=void 0;Xb.PACKAGE_VERSION="0.33.0";Xb.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var yNe=Q(C_=>{"use strict";A();Object.defineProperty(C_,"__esModule",{value:!0});C_.TediousInstrumentation=C_.INJECTED_CTX=void 0;var ev=(Le(),we(Je)),S0t=Ue("events"),cA=Xt(),vS=($n(),we(Nr)),I_=ANe(),hNe=mNe(),_Ne=gNe(),SNe=Symbol("opentelemetry.instrumentation-tedious.current-database");C_.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var ENe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function P4(e){Object.defineProperty(this,SNe,{value:e,writable:!0})}var OY=class e extends cA.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(_Ne.PACKAGE_NAME,_Ne.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,cA.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,cA.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new cA.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of ENe)(0,cA.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,cA.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 ENe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return P4.call(this,this.config?.options?.database),this.removeListener("databaseChange",P4),this.on("databaseChange",P4),this.once("end",()=>{this.removeListener("databaseChange",P4)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||ev.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",a=new n.Request(i,d=>{o()});Object.defineProperty(a,C_.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?.[C_.INJECTED_CTX])return r.apply(this,arguments);if(!(a instanceof S0t.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,d=0,m=()=>d++,h=()=>c++,y=this[SNe],S=(H=>H.sqlTextOrProcedure==="sp_prepare"&&H.parametersByName?.stmt?.value?H.parametersByName.stmt.value:H.sqlTextOrProcedure)(a),b={};o._dbSemconvStability&cA.SemconvStability.OLD&&(b[I_.ATTR_DB_SYSTEM]=I_.DB_SYSTEM_VALUE_MSSQL,b[I_.ATTR_DB_NAME]=y,b[I_.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[I_.ATTR_DB_STATEMENT]=S,b[I_.ATTR_DB_SQL_TABLE]=a.table),o._dbSemconvStability&cA.SemconvStability.STABLE&&(b[vS.ATTR_DB_NAMESPACE]=y,b[vS.ATTR_DB_SYSTEM_NAME]=vS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[vS.ATTR_DB_QUERY_TEXT]=S,b[vS.ATTR_DB_COLLECTION_NAME]=a.table),o._netSemconvStability&cA.SemconvStability.OLD&&(b[I_.ATTR_NET_PEER_NAME]=this.config?.server,b[I_.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&cA.SemconvStability.STABLE&&(b[vS.ATTR_SERVER_ADDRESS]=this.config?.server,b[vS.ATTR_SERVER_PORT]=this.config?.options?.port);let R=o.tracer.startSpan((0,hNe.getSpanName)(t,y,S,a.table),{kind:ev.SpanKind.CLIENT,attributes:b}),B=(0,hNe.once)(H=>{a.removeListener("done",m),a.removeListener("doneInProc",m),a.removeListener("doneProc",h),a.removeListener("error",B),this.removeListener("end",B),R.setAttribute("tedious.procedure_count",c),R.setAttribute("tedious.statement_count",d),H&&R.setStatus({code:ev.SpanStatusCode.ERROR,message:H.message}),R.end()});a.on("done",m),a.on("doneInProc",m),a.on("doneProc",h),a.once("error",B),this.on("end",B),typeof a.callback=="function"?o._wrap(a,"callback",o._patchCallbackQuery(B)):o._diag.error("Expected request.callback to be a function");let N=()=>ev.context.with(ev.trace.setSpan(ev.context.active(),R),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return N();let $=o._buildTraceparent(R);o._injectContextInfo(this,n,$).finally(N)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};C_.TediousInstrumentation=OY});var TNe=Q(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.TediousInstrumentation=void 0;var y0t=yNe();Object.defineProperty(k4,"TediousInstrumentation",{enumerable:!0,get:function(){return y0t.TediousInstrumentation}})});var INe,T0t,CNe,bNe,I0t,vNe,RNe=O(()=>{A();INe=ue(TNe(),1);dt();pr();T0t=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),CNe="Tedious",bNe=it(CNe,()=>new INe.TediousInstrumentation({})),I0t=()=>{let e;return{name:CNe,setupOnce(){let t=bNe();e=W1(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=xt(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";T0t.has(i)&&n.setAttribute(Nt,"auto.db.otel.tedious")}))}}},vNe=I0t});var DNe=Q(tv=>{"use strict";A();Object.defineProperty(tv,"__esModule",{value:!0});tv.PACKAGE_NAME=tv.PACKAGE_VERSION=void 0;tv.PACKAGE_VERSION="0.57.0";tv.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var BNe=Q(U4=>{"use strict";A();Object.defineProperty(U4,"__esModule",{value:!0});U4.GenericPoolInstrumentation=void 0;var nv=(Le(),we(Je)),RS=Xt(),xNe=DNe(),wY="generic-pool",MY=class extends RS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(xNe.PACKAGE_NAME,xNe.PACKAGE_VERSION,t)}init(){return[new RS.InstrumentationNodeModuleDefinition(wY,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,RS.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 RS.InstrumentationNodeModuleDefinition(wY,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,RS.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 RS.InstrumentationNodeModuleDefinition(wY,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,RS.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=nv.context.active(),a=n.tracer.startSpan("generic-pool.acquire",{},i);return nv.context.with(nv.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=nv.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},a);return nv.context.with(nv.trace.setSpan(a,c),()=>{t.call(this,(d,m)=>{if(c.end(),o)return o(d,m)},i)})}}};U4.GenericPoolInstrumentation=MY});var NNe=Q(L4=>{"use strict";A();Object.defineProperty(L4,"__esModule",{value:!0});L4.GenericPoolInstrumentation=void 0;var C0t=BNe();Object.defineProperty(L4,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return C0t.GenericPoolInstrumentation}})});var ONe,wNe,MNe,b0t,PNe,kNe=O(()=>{A();ONe=ue(NNe(),1);dt();pr();wNe="GenericPool",MNe=it(wNe,()=>new ONe.GenericPoolInstrumentation({})),b0t=()=>{let e;return{name:wNe,setupOnce(){let t=MNe();e=W1(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=xt(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(Nt,"auto.db.otel.generic_pool")}))}}},PNe=b0t});var PY=Q(lA=>{"use strict";A();Object.defineProperty(lA,"__esModule",{value:!0});lA.ATTR_NET_PEER_PORT=lA.ATTR_NET_PEER_NAME=lA.ATTR_MESSAGING_SYSTEM=lA.ATTR_MESSAGING_OPERATION=void 0;lA.ATTR_MESSAGING_OPERATION="messaging.operation";lA.ATTR_MESSAGING_SYSTEM="messaging.system";lA.ATTR_NET_PEER_NAME="net.peer.name";lA.ATTR_NET_PEER_PORT="net.peer.port"});var kY=Q(ri=>{"use strict";A();Object.defineProperty(ri,"__esModule",{value:!0});ri.ATTR_MESSAGING_CONVERSATION_ID=ri.OLD_ATTR_MESSAGING_MESSAGE_ID=ri.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=ri.ATTR_MESSAGING_URL=ri.ATTR_MESSAGING_PROTOCOL_VERSION=ri.ATTR_MESSAGING_PROTOCOL=ri.MESSAGING_OPERATION_VALUE_PROCESS=ri.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=ri.ATTR_MESSAGING_DESTINATION_KIND=ri.ATTR_MESSAGING_DESTINATION=void 0;ri.ATTR_MESSAGING_DESTINATION="messaging.destination";ri.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";ri.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";ri.MESSAGING_OPERATION_VALUE_PROCESS="process";ri.ATTR_MESSAGING_PROTOCOL="messaging.protocol";ri.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";ri.ATTR_MESSAGING_URL="messaging.url";ri.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";ri.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";ri.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var UY=Q(DS=>{"use strict";A();Object.defineProperty(DS,"__esModule",{value:!0});DS.DEFAULT_CONFIG=DS.EndOperation=void 0;var v0t;(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"})(v0t=DS.EndOperation||(DS.EndOperation={}));DS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var FNe=Q(oi=>{"use strict";A();Object.defineProperty(oi,"__esModule",{value:!0});oi.isConfirmChannelTracing=oi.unmarkConfirmChannelTracing=oi.markConfirmChannelTracing=oi.getConnectionAttributesFromUrl=oi.getConnectionAttributesFromServer=oi.normalizeExchange=oi.CONNECTION_ATTRIBUTES=oi.CHANNEL_CONSUME_TIMEOUT_TIMER=oi.CHANNEL_SPANS_NOT_ENDED=oi.MESSAGE_STORED_SPAN=void 0;var LY=(Le(),we(Je)),b_=Xt(),Q4=($n(),we(Nr)),gN=PY(),F4=kY();oi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");oi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");oi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");oi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var QY=(0,LY.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),R0t=e=>e!==""?e:"<default>";oi.normalizeExchange=R0t;var D0t=e=>e.replace(/:[^:@/]*@/,":***@"),UNe=(e,t)=>e||(t==="AMQP"?5672:5671),LNe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},QNe=e=>e||"localhost",dA=(e,t,n,r)=>n?{[t]:n}:(LY.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),x0t=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[gN.ATTR_MESSAGING_SYSTEM]:t}:{}};oi.getConnectionAttributesFromServer=x0t;var B0t=(e,t)=>{let n={[F4.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=LNe(r?.protocol);Object.assign(n,{...dA(e,F4.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=QNe(r?.hostname);t&b_.SemconvStability.OLD&&Object.assign(n,{...dA(e,gN.ATTR_NET_PEER_NAME,i,"hostname")}),t&b_.SemconvStability.STABLE&&Object.assign(n,{...dA(e,Q4.ATTR_SERVER_ADDRESS,i,"hostname")});let a=UNe(r.port,o);t&b_.SemconvStability.OLD&&Object.assign(n,dA(e,gN.ATTR_NET_PEER_PORT,a,"port")),t&b_.SemconvStability.STABLE&&Object.assign(n,dA(e,Q4.ATTR_SERVER_PORT,a,"port"))}else{let r=D0t(e);n[F4.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=LNe(o.protocol);Object.assign(n,{...dA(r,F4.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let a=QNe(o.hostname);t&b_.SemconvStability.OLD&&Object.assign(n,{...dA(r,gN.ATTR_NET_PEER_NAME,a,"hostname")}),t&b_.SemconvStability.STABLE&&Object.assign(n,{...dA(r,Q4.ATTR_SERVER_ADDRESS,a,"hostname")});let c=UNe(o.port?parseInt(o.port):void 0,i);t&b_.SemconvStability.OLD&&Object.assign(n,dA(r,gN.ATTR_NET_PEER_PORT,c,"port")),t&b_.SemconvStability.STABLE&&Object.assign(n,dA(r,Q4.ATTR_SERVER_PORT,c,"port"))}catch(o){LY.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};oi.getConnectionAttributesFromUrl=B0t;var N0t=e=>e.setValue(QY,!0);oi.markConfirmChannelTracing=N0t;var O0t=e=>e.deleteValue(QY);oi.unmarkConfirmChannelTracing=O0t;var w0t=e=>e.getValue(QY)===!0;oi.isConfirmChannelTracing=w0t});var GNe=Q(rv=>{"use strict";A();Object.defineProperty(rv,"__esModule",{value:!0});rv.PACKAGE_NAME=rv.PACKAGE_VERSION=void 0;rv.PACKAGE_VERSION="0.61.0";rv.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var zNe=Q(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.AmqplibInstrumentation=void 0;var Go=(Le(),we(Je)),G4=hr(),_r=Xt(),M0t=PY(),El=kY(),Ru=UY(),ii=FNe(),jNe=GNe(),j4=[">=0.5.5 <1"],FY=class extends _r.InstrumentationBase{_netSemconvStability;constructor(t={}){super(jNe.PACKAGE_NAME,jNe.PACKAGE_VERSION,{...Ru.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,_r.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ru.DEFAULT_CONFIG,...t})}init(){let t=new _r.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",j4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new _r.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",j4,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new _r.InstrumentationNodeModuleFile("amqplib/lib/connect.js",j4,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new _r.InstrumentationNodeModuleDefinition("amqplib",j4,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,_r.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,_r.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,_r.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,_r.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,_r.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ru.EndOperation.Ack)),(0,_r.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ru.EndOperation.Nack)),(0,_r.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ru.EndOperation.Reject)),(0,_r.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ru.EndOperation.AckAll)),(0,_r.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ru.EndOperation.NackAll)),(0,_r.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,_r.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,_r.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,_r.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,_r.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,_r.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,_r.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,_r.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,_r.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,_r.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,_r.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,a){return t.call(this,o,i,function(c,d){if(c==null){let m=(0,ii.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,ii.getConnectionAttributesFromServer)(d);d[ii.CONNECTION_ATTRIBUTES]={...m,...h}}a.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ru.EndOperation.ChannelClosed,void 0);let i=this[ii.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ru.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(a){return o.endAllSpansOnChannel(this,t,n,a),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(a,c,d){let m=this,h=n===Ru.EndOperation.Reject?c:d,y=m[ii.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===a);if(S<0)o.endConsumerSpan(a,t,n,h);else if(n!==Ru.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 d=this;if(!Object.prototype.hasOwnProperty.call(d,ii.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(d)},h);y.unref(),d[ii.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}d[ii.CHANNEL_SPANS_NOT_ENDED]=[]}let m=function(h){if(!h)return a.call(this,h);let y=h.properties.headers??{},S=Go.propagation.extract(Go.ROOT_CONTEXT,y),b=h.fields?.exchange,R;if(r._config.useLinksForConsume){let F=S?Go.trace.getSpan(S)?.spanContext():void 0;S=void 0,F&&(R=[{context:F}])}let B=r.tracer.startSpan(`${i} process`,{kind:Go.SpanKind.CONSUMER,attributes:{...d?.connection?.[ii.CONNECTION_ATTRIBUTES],[El.ATTR_MESSAGING_DESTINATION]:b,[El.ATTR_MESSAGING_DESTINATION_KIND]:El.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[El.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[M0t.ATTR_MESSAGING_OPERATION]:El.MESSAGING_OPERATION_VALUE_PROCESS,[El.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[El.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:R},S),{consumeHook:N}=r.getConfig();N&&(0,_r.safeExecuteInTheMiddle)(()=>N(B,{moduleVersion:t,msg:h}),F=>{F&&Go.diag.error("amqplib instrumentation: consumerHook error",F)},!0),c?.noAck||(d[ii.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,G4.hrTime)()}),h[ii.MESSAGE_STORED_SPAN]=B);let M=S||Go.ROOT_CONTEXT;Go.context.with(Go.trace.setSpan(M,B),()=>{a.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(B,h,!1,Ru.EndOperation.AutoAck),B.end())};return arguments[1]=m,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,a,c,d,m){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,a,h,d),{publishHook:b}=r.getConfig();b&&(0,_r.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:S,isConfirmChannel:!0}),M=>{M&&Go.diag.error("amqplib instrumentation: publishHook error",M)},!0);let R=function(M,F){try{m?.call(this,M,F)}finally{let{publishConfirmHook:$}=r.getConfig();$&&(0,_r.safeExecuteInTheMiddle)(()=>$(y,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:d,isConfirmChannel:!0,confirmError:M}),H=>{H&&Go.diag.error("amqplib instrumentation: publishConfirmHook error",H)},!0),M&&y.setStatus({code:Go.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},B=(0,ii.markConfirmChannelTracing)(Go.context.active()),N=[...arguments];return N[3]=S,N[4]=Go.context.bind((0,ii.unmarkConfirmChannelTracing)(Go.trace.setSpan(B,y)),R),Go.context.with(B,n.bind(this,...N))}}getPublishPatch(t,n){let r=this;return function(i,a,c,d){if((0,ii.isConfirmChannelTracing)(Go.context.active()))return n.apply(this,arguments);{let m=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,a,m,d),{publishHook:S}=r.getConfig();S&&(0,_r.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:a,content:c,options:y,isConfirmChannel:!1}),B=>{B&&Go.diag.error("amqplib instrumentation: publishHook error",B)},!0);let b=[...arguments];b[3]=y;let R=n.apply(this,b);return h.end(),R}}}createPublishSpan(t,n,r,o,i){let a=(0,ii.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${a}`,{kind:Go.SpanKind.PRODUCER,attributes:{...o.connection[ii.CONNECTION_ATTRIBUTES],[El.ATTR_MESSAGING_DESTINATION]:n,[El.ATTR_MESSAGING_DESTINATION_KIND]:El.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[El.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[El.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[El.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),d=i??{};return d.headers=d.headers??{},Go.propagation.inject(Go.trace.setSpan(Go.context.active(),c),d.headers),{span:c,modifiedOptions:d}}endConsumerSpan(t,n,r,o){let i=t[ii.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Go.SpanStatusCode.ERROR,message:r!==Ru.EndOperation.ChannelClosed&&r!==Ru.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[ii.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[ii.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(a=>{this.endConsumerSpan(a.msg,n,r,o)}),t[ii.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,_r.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),a=>{a&&Go.diag.error("amqplib instrumentation: consumerEndHook error",a)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,G4.hrTime)(),r=t[ii.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let a=r[o],c=(0,G4.hrTimeDuration)(a.timeOfConsume,n);if((0,G4.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(a.msg,null,Ru.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};z4.AmqplibInstrumentation=FY});var $Ne=Q(v_=>{"use strict";A();Object.defineProperty(v_,"__esModule",{value:!0});v_.EndOperation=v_.DEFAULT_CONFIG=v_.AmqplibInstrumentation=void 0;var P0t=zNe();Object.defineProperty(v_,"AmqplibInstrumentation",{enumerable:!0,get:function(){return P0t.AmqplibInstrumentation}});var HNe=UY();Object.defineProperty(v_,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return HNe.DEFAULT_CONFIG}});Object.defineProperty(v_,"EndOperation",{enumerable:!0,get:function(){return HNe.EndOperation}})});var VNe,qNe,k0t,YNe,U0t,KNe,JNe=O(()=>{A();VNe=ue($Ne(),1);pr();qNe="Amqplib",k0t={consumeEndHook:e=>{Or(e,"auto.amqplib.otel.consumer")},publishHook:e=>{Or(e,"auto.amqplib.otel.publisher")}},YNe=it(qNe,()=>new VNe.AmqplibInstrumentation(k0t)),U0t=()=>({name:qNe,setupOnce(){YNe()}}),KNe=U0t});var hN,GY=O(()=>{A();hN="VercelAI"});function Q0t(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 F0t(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(G0t(t.content),j0t(t.content))}function G0t(e){for(let t of e){if(!Q0t(t))continue;let n=x9(t.toolCallId);n?ul(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"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):ul(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),Wt(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function j0t(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&B9(t.toolCallId)}function z0t(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 $4,L0t,ZNe,H4,WNe=O(()=>{A();$4=ue(Xt(),1);dt();GY();L0t=[">=3.0.0 <7"],ZNe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];H4=class e extends $4.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Vn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new $4.InstrumentationNodeModuleDefinition("ai",L0t,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,a)=>{let c=a[0].experimental_telemetry||{},d=c.isEnabled,m=_t(),h=m?.getIntegrationByName(hN),y=h?.options,S=h?!!m?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:R}=z0t(y,c,d,S);return a[0].experimental_telemetry={...c,isEnabled:d!==void 0?d:!0,recordInputs:b,recordOutputs:R},wp(()=>Reflect.apply(o,i,a),B=>{B&&typeof B=="object"&&ki(B,"_sentry_active_span",hd())},()=>{},B=>{F0t(B)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of ZNe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=ZNe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function H0t(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var XNe,$0t,eOe,tOe=O(()=>{A();dt();pr();GY();WNe();XNe=it(hN,()=>new H4({}));$0t=(e={})=>{let t;return{name:hN,options:e,setupOnce(){t=XNe()},afterAllSetup(n){e.force??H0t(n)?Zk(n):t?.callWhenPatched(()=>Zk(n))}}},eOe=$0t});var q4,V0t,V4,nOe=O(()=>{A();q4=ue(Xt(),1);dt();V0t=[">=4.0.0 <7"],V4=class extends q4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Vn,t)}init(){return new q4.InstrumentationNodeModuleDefinition("openai",V0t,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(W0(Jh))return Reflect.construct(r,a);let c=Reflect.construct(r,a);return eU(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 rOe,q0t,oOe,iOe=O(()=>{A();dt();pr();nOe();rOe=it(Jh,e=>new V4(e)),q0t=(e={})=>({name:Jh,setupOnce(){rOe(e)}}),oOe=q0t});var K4,Y0t,Y4,aOe=O(()=>{A();K4=ue(Xt(),1);dt();Y0t=[">=0.19.2 <1.0.0"],Y4=class extends K4.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Vn,t)}init(){return new K4.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",Y0t,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(W0(Zh))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return tU(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 sOe,K0t,uOe,cOe=O(()=>{A();dt();pr();aOe();sOe=it(Zh,e=>new Y4(e)),K0t=(e={})=>({name:Zh,options:e,setupOnce(){sOe(e)}}),uOe=K0t});var ov,lOe,J4,dOe=O(()=>{A();ov=ue(Xt(),1);dt();lOe=[">=0.10.0 <2"],J4=class extends ov.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Vn,t)}init(){return new ov.InstrumentationNodeModuleDefinition("@google/genai",lOe,n=>this._patch(n),n=>n,[new ov.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",lOe,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(W0(Wh))return Reflect.construct(n,i);let a=Reflect.construct(n,i);return nU(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 J1(t,"GoogleGenAI",o),t}}});var pOe,J0t,fOe,AOe=O(()=>{A();dt();pr();dOe();pOe=it(Wh,e=>new J4(e)),J0t=(e={})=>({name:Wh,setupOnce(){pOe(e)}}),fOe=J0t});function Z0t(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function W0t(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let d=c.callbacks,m=Z0t(d,t);return c.callbacks=m,Reflect.apply(r,o,i)}})}var R_,Z4,W4,mOe=O(()=>{A();R_=ue(Xt(),1);dt();Z4=[">=0.1.0 <2.0.0"];W4=class extends R_.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Vn,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 R_.InstrumentationNodeModuleDefinition(r,Z4,this._patch.bind(this),o=>o,[new R_.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,Z4,this._patch.bind(this),o=>o)]));return t.push(new R_.InstrumentationNodeModuleDefinition("langchain",Z4,this._patch.bind(this),r=>r,[new R_.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",Z4,this._patch.bind(this),r=>r)])),t}_patch(t){Y$([Jh,Zh,Wh]);let n=aU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(d=>typeof d=="function"&&r.includes(d.name));if(!i)return;let a=i.prototype;if(a.__sentry_patched__)return;a.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let d of c){let m=a[d];typeof m=="function"&&(a[d]=W0t(m,n))}}}});var gOe,X0t,hOe,_Oe=O(()=>{A();dt();pr();mOe();gOe=it(rU,e=>new W4(e)),X0t=(e={})=>({name:rU,setupOnce(){gOe(e)}}),hOe=X0t});var iv,EOe,X4,SOe=O(()=>{A();iv=ue(Xt(),1);dt();EOe=[">=0.0.0 <2.0.0"],X4=class extends iv.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Vn,t)}init(){return new iv.InstrumentationNodeModuleDefinition("@langchain/langgraph",EOe,this._patch.bind(this),n=>n,[new iv.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",EOe,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&uU(t.StateGraph.prototype,this.getConfig()),t}}});var yOe,eSt,TOe,IOe=O(()=>{A();dt();pr();SOe();yOe=it(sU,e=>new X4(e)),eSt=(e={})=>({name:sU,setupOnce(){yOe(e)}}),TOe=eSt});import*as bOe from"node:net";function vOe(e,t,n,r,o){let a=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(a=h=>{(0,qm.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&al.error(y?.message)},!0)});let d=new qm.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>COe(h,n,r,e,a)),m=["@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 m)d.files.push(new qm.InstrumentationNodeModuleFile(h,t,y=>COe(y,n,r,e,a),y=>ROe(y,r)));return d}function COe(e,t,n,r,o){return ROe(e,n),t(e,"addDoc",tSt(r,o)),t(e,"getDocs",rSt(r,o)),t(e,"setDoc",oSt(r,o)),t(e,"deleteDoc",nSt(r,o)),e}function ROe(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,qm.isWrapped)(e[n])&&t(e,n);return e}function tSt(e,t){return function(r){return function(o,i){let a=t3(e,"addDoc",o);return t(a),e3(a,()=>r(o,i))}}}function nSt(e,t){return function(r){return function(o){let i=t3(e,"deleteDoc",o.parent||o);return t(i),e3(i,()=>r(o))}}}function rSt(e,t){return function(r){return function(o){let i=t3(e,"getDocs",o);return t(i),e3(i,()=>r(o))}}}function oSt(e,t){return function(r){return function(o,i,a){let c=t3(e,"setDoc",o.parent||o);return t(c),e3(c,()=>typeof a<"u"?r(o,i,a):r(o,i))}}}function e3(e,t){return qe.with(Ft.setSpan(qe.active(),e),()=>(0,qm.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function t3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:Zr.CLIENT});return aSt(r,n),r.setAttribute(VI,t),r}function iSt(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(bOe.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 aSt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},a={[TH]:t.path,[IH]:n.name,[M0]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:d}=iSt(i);c&&(a[NH]=c),d&&(a[OH]=d),e.setAttributes(a)}var qm,DOe=O(()=>{A();Le();qm=ue(Xt(),1);$n()});function xOe(e,t,n,r,o){let i=()=>{},a=()=>{},c=o.functions?.errorHook,d=o.functions?.requestHook,m=o.functions?.responseHook;typeof m=="function"&&(a=(S,b)=>{(0,Ym.safeExecuteInTheMiddle)(()=>m(S,b),R=>{R&&al.error(R?.message)},!0)}),typeof d=="function"&&(i=S=>{(0,Ym.safeExecuteInTheMiddle)(()=>d(S),b=>{b&&al.error(b?.message)},!0)});let h=new Ym.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 Ym.InstrumentationNodeModuleFile(S,t,R=>sSt(R,n,r,e,{requestHook:i,responseHook:a,errorHook:c},b),R=>BOe(R,r)))}),h}function Du(e,t,n){return function(o){return function(...i){let a=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!a)return o.call(this,...i);let d=async function(...m){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:Zr.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),qe.with(Ft.setSpan(qe.active(),y),async()=>{let b,R;try{R=await a.apply(this,m)}catch(B){b=B}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return R})};return c?o.call(this,c,d):o.call(this,d)}}}function sSt(e,t,n,r,o,i){switch(BOe(e,n),i){case"function":t(e,"onRequest",Du(r,o,"http.request")),t(e,"onCall",Du(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Du(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Du(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Du(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Du(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Du(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Du(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Du(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Du(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Du(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Du(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Du(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Du(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Du(r,o,"storage.object.metadataUpdated"));break}return e}function BOe(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,Ym.isWrapped)(e[r])&&t(e,r);return e}var Ym,NOe=O(()=>{A();Le();Ym=ue(Xt(),1)});var wOe,OOe,uSt,cSt,n3,MOe=O(()=>{A();wOe=ue(Xt(),1);dt();DOe();NOe();OOe={},uSt=[">=3.0.0 <5"],cSt=[">=6.0.0 <7"],n3=class extends wOe.InstrumentationBase{constructor(t=OOe){super("@sentry/instrumentation-firebase",Vn,t)}setConfig(t={}){super.setConfig({...OOe,...t})}init(){let t=[];return t.push(vOe(this.tracer,uSt,this._wrap,this._unwrap,this.getConfig())),t.push(xOe(this.tracer,cSt,this._wrap,this._unwrap,this.getConfig())),t}}});var POe,lSt,kOe,dSt,UOe,LOe=O(()=>{A();dt();pr();MOe();POe="Firebase",lSt={firestoreSpanCreationHook:e=>{Or(e,"auto.firebase.otel.firestore"),e.setAttribute(Yt,"db.query")},functions:{requestHook:e=>{Or(e,"auto.firebase.otel.functions"),e.setAttribute(Yt,"http.request")},errorHook:async(e,t)=>{t&&(Wt(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await bk(2e3))}}},kOe=it(POe,()=>new n3(lSt)),dSt=()=>({name:POe,setupOnce(){kOe()}}),UOe=dSt});function QOe(){return[jbe(),TRe(),KRe(),UBe(),kDe(),ZDe(),cxe(),yxe(),Xxe(),S1e(),_Be(),OBe(),XBe(),pNe(),vNe(),PNe(),pDe(),KNe(),IDe(),hOe(),TOe(),eOe(),oOe(),uOe(),fOe(),C1e(),UOe()]}var FOe=O(()=>{A();JNe();cOe();fNe();zbe();bRe();LOe();kNe();AOe();ZRe();wBe();LBe();fDe();eNe();_Oe();IOe();CDe();UDe();WDe();lxe();Txe();iOe();y1e();b1e();EBe();e1e();RNe();tOe()});function jOe(e,t={}){e.getOptions().debug&&uq();let[n,r]=pSt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function pSt(e,t={}){let n=new GOe.BasicTracerProvider({sampler:new AL(e),resource:(0,r3.defaultResource)().merge((0,r3.resourceFromAttributes)({[wH]:"node",[yH]:"sentry",[MH]:Vn})),forceFlushTimeoutMillis:500,spanProcessors:[new fL({timeout:fSt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});Ft.setGlobalTracerProvider(n),Ip.setGlobalPropagator(new pL);let r=new sq;return qe.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function fSt(e){if(e!=null){if(e>jY)return sa&&Z.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${jY}`),jY;if(e<=0||Number.isNaN(e)){sa&&Z.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var r3,GOe,jY,zOe=O(()=>{A();Le();r3=ue(SV(),1),GOe=ue(VV(),1);$n();dt();pr();sb();AS();jY=1e6});function HOe(){return IL().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(_be(),Rbe())}function $Oe(e){return[...HOe(),...Ei(e)?QOe():[]]}function zY(e={}){return ASt(e,$Oe)}function ASt(e={},t){X0(e,"node");let n=Sq({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(jOe(n,{spanProcessors:e.openTelemetrySpanProcessors}),yq()),n}var VOe=O(()=>{A();dt();pr();Ebe();Dbe();FOe();zOe()});var _N=O(()=>{A();VOe();dt()});function jo(){return mSt}function Sl(){return qOe}function YOe(){return gSt}var mSt,qOe,gSt,yl=O(()=>{"use strict";A();mSt="prod",qOe="0.1.58",gSt=`@tanagram/lore/${qOe}`});function ESt(e=""){if(!hSt.test(e))return e!==e.toLowerCase()}function KOe(e,t){let n=t??_St,r=[];if(!e||typeof e!="string")return r;let o="",i,a;for(let c of e){let d=n.includes(c);if(d===!0){r.push(o),o="",i=void 0;continue}let m=ESt(c);if(a===!1){if(i===!1&&m===!0){r.push(o),o=c,i=m;continue}if(i===!0&&m===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=m;continue}}o+=c,i=m,a=d}return r.push(o),r}function SSt(e){return e?e[0].toUpperCase()+e.slice(1):""}function ySt(e){return e?e[0].toLowerCase()+e.slice(1):""}function TSt(e,t){return e?(Array.isArray(e)?e:KOe(e)).map(n=>SSt(t?.normalize?n.toLowerCase():n)).join(""):""}function EN(e,t){return ySt(TSt(e||"",t))}function i3(e,t){return e?(Array.isArray(e)?e:KOe(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function JOe(e){return i3(e||"","_")}var hSt,_St,ZOe=O(()=>{A();hSt=/\d/,_St=["-","_","/","."]});import{parseArgs as ISt}from"node:util";function c3(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function HY(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 Tl(e){return typeof e=="function"?e():e}function CSt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},a=new Map,c=new Map;for(let[N,M]of Object.entries(o)){let F=M;for(let $ of F)a.set(N,$),c.has($)||c.set($,[]),c.get($).push(N),a.set($,N),c.has(N)||c.set(N,[]),c.get(N).push($)}let d={};function m(N){if(n.has(N))return"boolean";let M=c.get(N)||[];for(let F of M)if(n.has(F))return"boolean";return"string"}function h(N){if(r.has(N))return!0;let M=c.get(N)||[];for(let F of M)if(r.has(F))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let N of y)d[N]||(d[N]={type:m(N),default:i[N]});for(let[N,M]of a.entries())N.length===1&&d[M]&&!d[M].short&&(d[M].short=N);let S=[],b={};for(let N=0;N<e.length;N++){let M=e[N];if(M==="--"){S.push(...e.slice(N));break}if(M.startsWith("--no-")){let F=M.slice(5);b[F]=!0;continue}S.push(M)}let R;try{R=ISt({args:S,options:Object.keys(d).length>0?d:void 0,allowPositionals:!0,strict:!1})}catch{R={values:{},positionals:S}}let B={_:[]};B._=R.positionals;for(let[N,M]of Object.entries(R.values)){let F=M;m(N)==="boolean"&&typeof M=="string"?F=M!=="false":h(N)&&typeof M=="boolean"&&(F=""),B[N]=F}for(let[N]of Object.entries(b)){B[N]=!1;let M=a.get(N);M&&(B[M]=!1);let F=c.get(N);if(F)for(let $ of F)B[$]=!1}for(let[N,M]of a.entries())B[N]!==void 0&&B[M]===void 0&&(B[M]=B[N]),B[M]!==void 0&&B[N]===void 0&&(B[N]=B[M]),B[N]!==B[M]&&i[M]===B[M]&&(B[M]=B[N]);return B}function vSt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=e2e(t);for(let c of r){if(c.type==="positional")continue;c.type==="string"||c.type==="enum"?n.string.push(c.name):c.type==="boolean"&&n.boolean.push(c.name),c.default!==void 0&&(n.default[c.name]=c.default),c.alias&&(n.alias[c.name]=c.alias);let d=EN(c.name),m=i3(c.name);if(d!==c.name||m!==c.name){let h=c3(n.alias[c.name]||[]);d!==c.name&&!h.includes(d)&&h.push(d),m!==c.name&&!h.includes(m)&&h.push(m),h.length>0&&(n.alias[c.name]=h)}}let o=CSt(e,n),[...i]=o._,a=new Proxy(o,{get(c,d){return c[d]??c[EN(d)]??c[i3(d)]}});for(let[,c]of r.entries())if(c.type==="positional"){let d=i.shift();if(d!==void 0)a[c.name]=d;else{if(c.default===void 0&&c.required!==!1)throw new xS(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");a[c.name]=c.default}}else if(c.type==="enum"){let d=a[c.name],m=c.options||[];if(d!==void 0&&m.length>0&&!m.includes(d))throw new xS(`Invalid value for argument: ${jp(`--${c.name}`)} (${jp(d)}). Expected one of: ${m.map(h=>jp(h)).join(", ")}.`,"EARG")}else if(c.required&&a[c.name]===void 0)throw new xS(`Missing required argument: --${c.name}`,"EARG");return a}function e2e(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:c3(r.alias)});return t}async function RSt(e){return Promise.all(e.map(t=>Tl(t)))}async function D_(e,t){let n=await Tl(e.args||{}),r=vSt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await RSt(e.plugins??[]),a,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let m=await Tl(e.subCommands);if(m&&Object.keys(m).length>0){let h=DSt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await WOe(m,y);if(!S)throw new xS(`Unknown command ${jp(y)}`,"E_UNKNOWN_COMMAND");await D_(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await Tl(e.default);if(S){if(e.run)throw new xS("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let b=await WOe(m,S);if(!b)throw new xS(`Default sub command ${jp(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await D_(b,{rawArgs:t.rawArgs})}else if(!e.run)throw new xS("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(a=await e.run(o))}catch(m){c=m}let d=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(m){d.push(m)}for(let m of[...i].reverse())try{await m.cleanup?.(o)}catch(h){d.push(h)}if(c)throw c;if(d.length===1)throw d[0];if(d.length>1)throw new Error("Multiple cleanup errors",{cause:d});return{result:a}}async function WOe(e,t){if(t in e)return Tl(e[t]);for(let n of Object.values(e)){let r=await Tl(n),o=await Tl(r?.meta);if(o?.alias&&c3(o.alias).includes(t))return r}}function DSt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&xSt(r,t)&&n++;continue}return n}return-1}function xSt(e,t){let n=e.replace(/^-{1,2}/,""),r=EN(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===EN(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function VY(e,t){let n=await Tl(e.meta||{}),r=e2e(await Tl(e.args||{})),o=await Tl(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),a=[],c=[],d=[],m=[];for(let b of r)if(b.type==="positional"){let R=b.name.toUpperCase(),B=b.required!==!1&&b.default===void 0;c.push([jp(R+$Y(b)),XOe(b,B)]),m.push(B?`<${R}>`:`[${R}]`)}else{let R=b.required===!0&&b.default===void 0,B=[...(b.alias||[]).map(N=>`-${N}`),`--${b.name}`].join(", ")+$Y(b);if(a.push([jp(B),XOe(b,R)]),b.type==="boolean"&&(b.default===!0||b.negativeDescription)&&!BSt.test(b.name)){let N=[...(b.alias||[]).map(M=>`--no-${M}`),`--no-${b.name}`].join(", ");a.push([jp(N),[b.negativeDescription,R?u3("(Required)"):""].filter(Boolean).join(" ")])}R&&m.push(`--${b.name}`+$Y(b))}if(e.subCommands){let b=[],R=await Tl(e.subCommands);for(let[B,N]of Object.entries(R)){let M=await Tl((await Tl(N))?.meta);if(M?.hidden)continue;let F=c3(M?.alias),$=[B,...F].join(", ");d.push([jp($),M?.description||""]),b.push(B,...F)}m.push(b.join("|"))}let h=[],y=n.version||o.version;h.push(u3(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=a.length>0||c.length>0;return h.push(`${s3(a3("USAGE"))} ${jp(`${i}${S?" [OPTIONS]":""} ${m.join(" ")}`)}`,""),c.length>0&&(h.push(s3(a3("ARGUMENTS")),""),h.push(HY(c," ")),h.push("")),a.length>0&&(h.push(s3(a3("OPTIONS")),""),h.push(HY(a," ")),h.push("")),d.length>0&&(h.push(s3(a3("COMMANDS")),""),h.push(HY(d," ")),h.push("",`Use ${jp(`${i} <command> --help`)} for more information about a command.`)),h.filter(b=>typeof b=="string").join(`
|
|
40
40
|
`)}function $Y(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${JOe(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function XOe(e,t){let n=t?u3("(Required)"):"",r=e.default===void 0?"":u3(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var xS,bSt,l3,a3,jp,u3,s3,BSt,qY=O(()=>{A();ZOe();xS=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};bSt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),l3=(e,t=39)=>n=>bSt?n:`\x1B[${e}m${n}\x1B[${t}m`,a3=l3(1,22),jp=l3(36),u3=l3(90),s3=l3(4,24);BSt=/^no[-A-Z]/});function OSt(e){o2e=e}function p3(){return o2e}function at(e,t){let n=f3({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,p3(),SN].filter(r=>!!r)});e.common.issues.push(n)}function _n(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 zSt(e,t){return!!((t==="v4"||!t)&&FSt.test(e)||(t==="v6"||!t)&&GSt.test(e))}function HSt(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 av(e){if(e instanceof Hs){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=zp.create(av(r))}return new Hs({...e._def,shape:()=>t})}else return e instanceof Jm?new Jm({...e._def,type:av(e.element)}):e instanceof zp?zp.create(av(e.unwrap())):e instanceof Zm?Zm.create(av(e.unwrap())):e instanceof pA?pA.create(e.items.map(t=>av(t))):e}function XY(e,t){let n=x_(e),r=x_(t);if(e===t)return{valid:!0,data:e};if(n===ot.object&&r===ot.object){let o=fr.objectKeys(t),i=fr.objectKeys(e).filter(c=>o.indexOf(c)!==-1),a={...e,...t};for(let c of i){let d=XY(e[c],t[c]);if(!d.valid)return{valid:!1};a[c]=d.data}return{valid:!0,data:a}}else if(n===ot.array&&r===ot.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let a=e[i],c=t[i],d=XY(a,c);if(!d.valid)return{valid:!1};o.push(d.data)}return{valid:!0,data:o}}else return n===ot.date&&r===ot.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function a2e(e,t){return new FS({values:e,typeName:zt.ZodEnum,..._n(t)})}var fr,JY,ot,x_,ze,NSt,yc,SN,o2e,f3,wSt,zs,ln,i2e,xu,ZY,WY,yN,A3,wt,wd,t2e,En,MSt,PSt,kSt,USt,LSt,QSt,FSt,GSt,jSt,B_,BS,NS,OS,wS,sv,MS,PS,N_,Km,Hp,uv,Jm,Hs,kS,d3,m3,US,pA,g3,cv,lv,h3,LS,QS,FS,GS,O_,Il,zp,Zm,jS,dv,pv,$St,_3,TN,fv,s2e,VSt,zt,qSt,u2e,c2e,YSt,KSt,l2e,JSt,ZSt,WSt,XSt,eyt,tyt,nyt,ryt,oyt,iyt,ayt,syt,uyt,cyt,lyt,dyt,pyt,fyt,Ayt,myt,gyt,hyt,_yt,Eyt,n2e,Syt,yyt,Tyt,Iyt,Cyt,byt,vyt,Ryt,Dyt,js,xyt,YY,Byt,Od,eK,xgn,Bgn,Ngn,d2e,Nyt,Oyt,wyt,Myt,p2e,f2e,A2e,KY,$s,Pyt,kyt,Uyt,Lyt,tK,nK,rK,Qyt,r2e,Fyt,Gyt,jyt,zyt,oK,fA=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})(fr||(fr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(JY||(JY={}));ot=fr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),x_=e=>{switch(typeof e){case"undefined":return ot.undefined;case"string":return ot.string;case"number":return isNaN(e)?ot.nan:ot.number;case"boolean":return ot.boolean;case"function":return ot.function;case"bigint":return ot.bigint;case"symbol":return ot.symbol;case"object":return Array.isArray(e)?ot.array:e===null?ot.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ot.promise:typeof Map<"u"&&e instanceof Map?ot.map:typeof Set<"u"&&e instanceof Set?ot.set:typeof Date<"u"&&e instanceof Date?ot.date:ot.object;default:return ot.unknown}},ze=fr.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"]),NSt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),yc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let c=r,d=0;for(;d<a.path.length;){let m=a.path[d];d===a.path.length-1?(c[m]=c[m]||{_errors:[]},c[m]._errors.push(n(a))):c[m]=c[m]||{_errors:[]},c=c[m],d++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,fr.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()}};yc.create=e=>new yc(e);SN=(e,t)=>{let n;switch(e.code){case ze.invalid_type:e.received===ot.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ze.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,fr.jsonStringifyReplacer)}`;break;case ze.unrecognized_keys:n=`Unrecognized key(s) in object: ${fr.joinValues(e.keys,", ")}`;break;case ze.invalid_union:n="Invalid input";break;case ze.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${fr.joinValues(e.options)}`;break;case ze.invalid_enum_value:n=`Invalid enum value. Expected ${fr.joinValues(e.options)}, received '${e.received}'`;break;case ze.invalid_arguments:n="Invalid function arguments";break;case ze.invalid_return_type:n="Invalid function return type";break;case ze.invalid_date:n="Invalid date";break;case ze.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}"`:fr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ze.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 ze.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 ze.custom:n="Invalid input";break;case ze.invalid_intersection_types:n="Intersection results could not be merged";break;case ze.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ze.not_finite:n="Number must be finite";break;default:n=t.defaultError,fr.assertNever(e)}return{message:n}},o2e=SN;f3=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],a={...o,path:i},c="",d=r.filter(m=>!!m).slice().reverse();for(let m of d)c=m(a,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},wSt=[];zs=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 ln;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 ln;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}}},ln=Object.freeze({status:"aborted"}),i2e=e=>({status:"dirty",value:e}),xu=e=>({status:"valid",value:e}),ZY=e=>e.status==="aborted",WY=e=>e.status==="dirty",yN=e=>e.status==="valid",A3=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})(wt||(wt={}));wd=class{constructor(t,n,r,o){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=o}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},t2e=(e,t)=>{if(yN(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 yc(e.common.issues);return this._error=n,this._error}}};En=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 x_(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:x_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new zs,ctx:{common:t.parent.common,data:t.data,parsedType:x_(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(A3(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:x_(t)},i=this._parseSync({data:t,path:o.path,parent:o});return t2e(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:x_(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(A3(o)?o:Promise.resolve(o));return t2e(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:ze.custom,...r(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(d=>d?!0:(c(),!1)):a?!0:(c(),!1)})}refinement(t,n){return this._refinement((r,o)=>t(r)?!0:(o.addIssue(typeof n=="function"?n(r,o):n),!1))}_refinement(t){return new Il({schema:this,typeName:zt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return zp.create(this,this._def)}nullable(){return Zm.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Jm.create(this,this._def)}promise(){return O_.create(this,this._def)}or(t){return kS.create([this,t],this._def)}and(t){return US.create(this,t,this._def)}transform(t){return new Il({..._n(this._def),schema:this,typeName:zt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new jS({..._n(this._def),innerType:this,defaultValue:n,typeName:zt.ZodDefault})}brand(){return new _3({typeName:zt.ZodBranded,type:this,..._n(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new dv({..._n(this._def),innerType:this,catchValue:n,typeName:zt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return TN.create(this,t)}readonly(){return fv.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},MSt=/^c[^\s-]{8,}$/i,PSt=/^[a-z][a-z0-9]*$/,kSt=/[0-9A-HJKMNP-TV-Z]{26}/,USt=/^[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,LSt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,QSt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),FSt=/^(((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}))$/,GSt=/^(([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})))$/,jSt=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$");B_=class e extends En{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:ze.invalid_string,...wt.errToObj(r)}),this.nonempty=t=>this.min(1,wt.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)!==ot.string){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.string,received:i.parsedType}),ln}let r=new zs,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.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),at(o,{code:ze.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?at(o,{code:ze.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&at(o,{code:ze.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")LSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"email",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")QSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"emoji",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")USt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"uuid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")MSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"cuid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")PSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"cuid2",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")kSt.test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"ulid",code:ze.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),at(o,{validation:"url",code:ze.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),at(o,{validation:"regex",code:ze.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),at(o,{code:ze.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),at(o,{code:ze.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?jSt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),at(o,{code:ze.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?zSt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),at(o,{validation:"ip",code:ze.invalid_string,message:i.message}),r.dirty()):fr.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",...wt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...wt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...wt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...wt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...wt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...wt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...wt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...wt.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,...wt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...wt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...wt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...wt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...wt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...wt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...wt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...wt.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}};B_.create=e=>{var t;return new B_({checks:[],typeName:zt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,..._n(e)})};BS=class e extends En{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)!==ot.number){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.number,received:i.parsedType}),ln}let r,o=new zs;for(let i of this._def.checks)i.kind==="int"?fr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),at(r,{code:ze.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),at(r,{code:ze.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),at(r,{code:ze.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?HSt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),at(r,{code:ze.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),at(r,{code:ze.not_finite,message:i.message}),o.dirty()):fr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,wt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,wt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,wt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,wt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:wt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:wt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:wt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:wt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:wt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:wt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:wt.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"&&fr.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)}};BS.create=e=>new BS({checks:[],typeName:zt.ZodNumber,coerce:e?.coerce||!1,..._n(e)});NS=class e extends En{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)!==ot.bigint){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.bigint,received:i.parsedType}),ln}let r,o=new zs;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),at(r,{code:ze.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),at(r,{code:ze.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),at(r,{code:ze.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):fr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,wt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,wt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,wt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,wt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:wt.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:wt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:wt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:wt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:wt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:wt.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}};NS.create=e=>{var t;return new NS({checks:[],typeName:zt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,..._n(e)})};OS=class extends En{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ot.boolean){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.boolean,received:r.parsedType}),ln}return xu(t.data)}};OS.create=e=>new OS({typeName:zt.ZodBoolean,coerce:e?.coerce||!1,..._n(e)});wS=class e extends En{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ot.date){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_type,expected:ot.date,received:i.parsedType}),ln}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return at(i,{code:ze.invalid_date}),ln}let r=new zs,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),at(o,{code:ze.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),at(o,{code:ze.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):fr.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:wt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:wt.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}};wS.create=e=>new wS({checks:[],coerce:e?.coerce||!1,typeName:zt.ZodDate,..._n(e)});sv=class extends En{_parse(t){if(this._getType(t)!==ot.symbol){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.symbol,received:r.parsedType}),ln}return xu(t.data)}};sv.create=e=>new sv({typeName:zt.ZodSymbol,..._n(e)});MS=class extends En{_parse(t){if(this._getType(t)!==ot.undefined){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.undefined,received:r.parsedType}),ln}return xu(t.data)}};MS.create=e=>new MS({typeName:zt.ZodUndefined,..._n(e)});PS=class extends En{_parse(t){if(this._getType(t)!==ot.null){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.null,received:r.parsedType}),ln}return xu(t.data)}};PS.create=e=>new PS({typeName:zt.ZodNull,..._n(e)});N_=class extends En{constructor(){super(...arguments),this._any=!0}_parse(t){return xu(t.data)}};N_.create=e=>new N_({typeName:zt.ZodAny,..._n(e)});Km=class extends En{constructor(){super(...arguments),this._unknown=!0}_parse(t){return xu(t.data)}};Km.create=e=>new Km({typeName:zt.ZodUnknown,..._n(e)});Hp=class extends En{_parse(t){let n=this._getOrReturnCtx(t);return at(n,{code:ze.invalid_type,expected:ot.never,received:n.parsedType}),ln}};Hp.create=e=>new Hp({typeName:zt.ZodNever,..._n(e)});uv=class extends En{_parse(t){if(this._getType(t)!==ot.undefined){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.void,received:r.parsedType}),ln}return xu(t.data)}};uv.create=e=>new uv({typeName:zt.ZodVoid,..._n(e)});Jm=class e extends En{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==ot.array)return at(n,{code:ze.invalid_type,expected:ot.array,received:n.parsedType}),ln;if(o.exactLength!==null){let a=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(a||c)&&(at(n,{code:a?ze.too_big:ze.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&&(at(n,{code:ze.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&&(at(n,{code:ze.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,c)=>o.type._parseAsync(new wd(n,a,n.path,c)))).then(a=>zs.mergeArray(r,a));let i=[...n.data].map((a,c)=>o.type._parseSync(new wd(n,a,n.path,c)));return zs.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:wt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:wt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:wt.toString(n)}})}nonempty(t){return this.min(1,t)}};Jm.create=(e,t)=>new Jm({type:e,minLength:null,maxLength:null,exactLength:null,typeName:zt.ZodArray,..._n(t)});Hs=class e extends En{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=fr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ot.object){let m=this._getOrReturnCtx(t);return at(m,{code:ze.invalid_type,expected:ot.object,received:m.parsedType}),ln}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),c=[];if(!(this._def.catchall instanceof Hp&&this._def.unknownKeys==="strip"))for(let m in o.data)a.includes(m)||c.push(m);let d=[];for(let m of a){let h=i[m],y=o.data[m];d.push({key:{status:"valid",value:m},value:h._parse(new wd(o,y,o.path,m)),alwaysSet:m in o.data})}if(this._def.catchall instanceof Hp){let m=this._def.unknownKeys;if(m==="passthrough")for(let h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(m==="strict")c.length>0&&(at(o,{code:ze.unrecognized_keys,keys:c}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let m=this._def.catchall;for(let h of c){let y=o.data[h];d.push({key:{status:"valid",value:h},value:m._parse(new wd(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let m=[];for(let h of d){let y=await h.key;m.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return m}).then(m=>zs.mergeObjectSync(r,m)):zs.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return wt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,a,c;let d=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=wt.errToObj(t).message)!==null&&c!==void 0?c:d}:{message:d}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:zt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return fr.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 fr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return av(this)}partial(t){let n={};return fr.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 fr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof zp;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return a2e(fr.objectKeys(this.shape))}};Hs.create=(e,t)=>new Hs({shape:()=>e,unknownKeys:"strip",catchall:Hp.create(),typeName:zt.ZodObject,..._n(t)});Hs.strictCreate=(e,t)=>new Hs({shape:()=>e,unknownKeys:"strict",catchall:Hp.create(),typeName:zt.ZodObject,..._n(t)});Hs.lazycreate=(e,t)=>new Hs({shape:e,unknownKeys:"strip",catchall:Hp.create(),typeName:zt.ZodObject,..._n(t)});kS=class extends En{_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 yc(c.ctx.common.issues));return at(n,{code:ze.invalid_union,unionErrors:a}),ln}if(n.common.async)return Promise.all(r.map(async i=>{let a={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(o);{let i,a=[];for(let d of r){let m={...n,common:{...n.common,issues:[]},parent:null},h=d._parseSync({data:n.data,path:n.path,parent:m});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:m}),m.common.issues.length&&a.push(m.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=a.map(d=>new yc(d));return at(n,{code:ze.invalid_union,unionErrors:c}),ln}}get options(){return this._def.options}};kS.create=(e,t)=>new kS({options:e,typeName:zt.ZodUnion,..._n(t)});d3=e=>e instanceof LS?d3(e.schema):e instanceof Il?d3(e.innerType()):e instanceof QS?[e.value]:e instanceof FS?e.options:e instanceof GS?Object.keys(e.enum):e instanceof jS?d3(e._def.innerType):e instanceof MS?[void 0]:e instanceof PS?[null]:null,m3=class e extends En{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.object)return at(n,{code:ze.invalid_type,expected:ot.object,received:n.parsedType}),ln;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}):(at(n,{code:ze.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ln)}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=d3(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:zt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,..._n(r)})}};US=class extends En{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,a)=>{if(ZY(i)||ZY(a))return ln;let c=XY(i.value,a.value);return c.valid?((WY(i)||WY(a))&&n.dirty(),{status:n.value,value:c.data}):(at(r,{code:ze.invalid_intersection_types}),ln)};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}))}};US.create=(e,t,n)=>new US({left:e,right:t,typeName:zt.ZodIntersection,..._n(n)});pA=class e extends En{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.array)return at(r,{code:ze.invalid_type,expected:ot.array,received:r.parsedType}),ln;if(r.data.length<this._def.items.length)return at(r,{code:ze.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ln;!this._def.rest&&r.data.length>this._def.items.length&&(at(r,{code:ze.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((a,c)=>{let d=this._def.items[c]||this._def.rest;return d?d._parse(new wd(r,a,r.path,c)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>zs.mergeArray(n,a)):zs.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};pA.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new pA({items:e,typeName:zt.ZodTuple,rest:null,..._n(t)})};g3=class e extends En{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!==ot.object)return at(r,{code:ze.invalid_type,expected:ot.object,received:r.parsedType}),ln;let o=[],i=this._def.keyType,a=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new wd(r,c,r.path,c)),value:a._parse(new wd(r,r.data[c],r.path,c))});return r.common.async?zs.mergeObjectAsync(n,o):zs.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof En?new e({keyType:t,valueType:n,typeName:zt.ZodRecord,..._n(r)}):new e({keyType:B_.create(),valueType:t,typeName:zt.ZodRecord,..._n(n)})}},cv=class extends En{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!==ot.map)return at(r,{code:ze.invalid_type,expected:ot.map,received:r.parsedType}),ln;let o=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([c,d],m)=>({key:o._parse(new wd(r,c,r.path,[m,"key"])),value:i._parse(new wd(r,d,r.path,[m,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let d of a){let m=await d.key,h=await d.value;if(m.status==="aborted"||h.status==="aborted")return ln;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let d of a){let m=d.key,h=d.value;if(m.status==="aborted"||h.status==="aborted")return ln;(m.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(m.value,h.value)}return{status:n.value,value:c}}}};cv.create=(e,t,n)=>new cv({valueType:t,keyType:e,typeName:zt.ZodMap,..._n(n)});lv=class e extends En{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ot.set)return at(r,{code:ze.invalid_type,expected:ot.set,received:r.parsedType}),ln;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(at(r,{code:ze.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&&(at(r,{code:ze.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function a(d){let m=new Set;for(let h of d){if(h.status==="aborted")return ln;h.status==="dirty"&&n.dirty(),m.add(h.value)}return{status:n.value,value:m}}let c=[...r.data.values()].map((d,m)=>i._parse(new wd(r,d,r.path,m)));return r.common.async?Promise.all(c).then(d=>a(d)):a(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:wt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:wt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};lv.create=(e,t)=>new lv({valueType:e,minSize:null,maxSize:null,typeName:zt.ZodSet,..._n(t)});h3=class e extends En{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.function)return at(n,{code:ze.invalid_type,expected:ot.function,received:n.parsedType}),ln;function r(c,d){return f3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,p3(),SN].filter(m=>!!m),issueData:{code:ze.invalid_arguments,argumentsError:d}})}function o(c,d){return f3({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,p3(),SN].filter(m=>!!m),issueData:{code:ze.invalid_return_type,returnTypeError:d}})}let i={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof O_){let c=this;return xu(async function(...d){let m=new yc([]),h=await c._def.args.parseAsync(d,i).catch(b=>{throw m.addIssue(r(d,b)),m}),y=await Reflect.apply(a,this,h);return await c._def.returns._def.type.parseAsync(y,i).catch(b=>{throw m.addIssue(o(y,b)),m})})}else{let c=this;return xu(function(...d){let m=c._def.args.safeParse(d,i);if(!m.success)throw new yc([r(d,m.error)]);let h=Reflect.apply(a,this,m.data),y=c._def.returns.safeParse(h,i);if(!y.success)throw new yc([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:pA.create(t).rest(Km.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||pA.create([]).rest(Km.create()),returns:n||Km.create(),typeName:zt.ZodFunction,..._n(r)})}},LS=class extends En{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})}};LS.create=(e,t)=>new LS({getter:e,typeName:zt.ZodLazy,..._n(t)});QS=class extends En{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return at(n,{received:n.data,code:ze.invalid_literal,expected:this._def.value}),ln}return{status:"valid",value:t.data}}get value(){return this._def.value}};QS.create=(e,t)=>new QS({value:e,typeName:zt.ZodLiteral,..._n(t)});FS=class e extends En{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return at(n,{expected:fr.joinValues(r),received:n.parsedType,code:ze.invalid_type}),ln}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return at(n,{received:n.data,code:ze.invalid_enum_value,options:r}),ln}return xu(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)))}};FS.create=a2e;GS=class extends En{_parse(t){let n=fr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ot.string&&r.parsedType!==ot.number){let o=fr.objectValues(n);return at(r,{expected:fr.joinValues(o),received:r.parsedType,code:ze.invalid_type}),ln}if(n.indexOf(t.data)===-1){let o=fr.objectValues(n);return at(r,{received:r.data,code:ze.invalid_enum_value,options:o}),ln}return xu(t.data)}get enum(){return this._def.values}};GS.create=(e,t)=>new GS({values:e,typeName:zt.ZodNativeEnum,..._n(t)});O_=class extends En{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==ot.promise&&n.common.async===!1)return at(n,{code:ze.invalid_type,expected:ot.promise,received:n.parsedType}),ln;let r=n.parsedType===ot.promise?n.data:Promise.resolve(n.data);return xu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};O_.create=(e,t)=>new O_({type:e,typeName:zt.ZodPromise,..._n(t)});Il=class extends En{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===zt.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=>{at(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let a=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(a).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:a,path:r.path,parent:r})}if(o.type==="refinement"){let a=c=>{let d=o.refinement(c,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?ln:(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"?ln:(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(!yN(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=>yN(a)?Promise.resolve(o.transform(a.value,i)).then(c=>({status:n.value,value:c})):a);fr.assertNever(o)}};Il.create=(e,t,n)=>new Il({schema:e,typeName:zt.ZodEffects,effect:t,..._n(n)});Il.createWithPreprocess=(e,t,n)=>new Il({schema:t,effect:{type:"preprocess",transform:e},typeName:zt.ZodEffects,..._n(n)});zp=class extends En{_parse(t){return this._getType(t)===ot.undefined?xu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};zp.create=(e,t)=>new zp({innerType:e,typeName:zt.ZodOptional,..._n(t)});Zm=class extends En{_parse(t){return this._getType(t)===ot.null?xu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Zm.create=(e,t)=>new Zm({innerType:e,typeName:zt.ZodNullable,..._n(t)});jS=class extends En{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===ot.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};jS.create=(e,t)=>new jS({innerType:e,typeName:zt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,..._n(t)});dv=class extends En{_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 A3(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new yc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new yc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};dv.create=(e,t)=>new dv({innerType:e,typeName:zt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,..._n(t)});pv=class extends En{_parse(t){if(this._getType(t)!==ot.nan){let r=this._getOrReturnCtx(t);return at(r,{code:ze.invalid_type,expected:ot.nan,received:r.parsedType}),ln}return{status:"valid",value:t.data}}};pv.create=e=>new pv({typeName:zt.ZodNaN,..._n(e)});$St=Symbol("zod_brand"),_3=class extends En{_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}},TN=class e extends En{_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"?ln:i.status==="dirty"?(n.dirty(),i2e(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"?ln: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:zt.ZodPipeline})}},fv=class extends En{_parse(t){let n=this._def.innerType._parse(t);return yN(n)&&(n.value=Object.freeze(n.value)),n}};fv.create=(e,t)=>new fv({innerType:e,typeName:zt.ZodReadonly,..._n(t)});s2e=(e,t={},n)=>e?N_.create().superRefine((r,o)=>{var i,a;if(!e(r)){let c=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,d=(a=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&a!==void 0?a:!0,m=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...m,fatal:d})}}):N_.create(),VSt={object:Hs.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"})(zt||(zt={}));qSt=(e,t={message:`Input not instance of ${e.name}`})=>s2e(n=>n instanceof e,t),u2e=B_.create,c2e=BS.create,YSt=pv.create,KSt=NS.create,l2e=OS.create,JSt=wS.create,ZSt=sv.create,WSt=MS.create,XSt=PS.create,eyt=N_.create,tyt=Km.create,nyt=Hp.create,ryt=uv.create,oyt=Jm.create,iyt=Hs.create,ayt=Hs.strictCreate,syt=kS.create,uyt=m3.create,cyt=US.create,lyt=pA.create,dyt=g3.create,pyt=cv.create,fyt=lv.create,Ayt=h3.create,myt=LS.create,gyt=QS.create,hyt=FS.create,_yt=GS.create,Eyt=O_.create,n2e=Il.create,Syt=zp.create,yyt=Zm.create,Tyt=Il.createWithPreprocess,Iyt=TN.create,Cyt=()=>u2e().optional(),byt=()=>c2e().optional(),vyt=()=>l2e().optional(),Ryt={string:e=>B_.create({...e,coerce:!0}),number:e=>BS.create({...e,coerce:!0}),boolean:e=>OS.create({...e,coerce:!0}),bigint:e=>NS.create({...e,coerce:!0}),date:e=>wS.create({...e,coerce:!0})},Dyt=ln,js=Object.freeze({__proto__:null,defaultErrorMap:SN,setErrorMap:OSt,getErrorMap:p3,makeIssue:f3,EMPTY_PATH:wSt,addIssueToContext:at,ParseStatus:zs,INVALID:ln,DIRTY:i2e,OK:xu,isAborted:ZY,isDirty:WY,isValid:yN,isAsync:A3,get util(){return fr},get objectUtil(){return JY},ZodParsedType:ot,getParsedType:x_,ZodType:En,ZodString:B_,ZodNumber:BS,ZodBigInt:NS,ZodBoolean:OS,ZodDate:wS,ZodSymbol:sv,ZodUndefined:MS,ZodNull:PS,ZodAny:N_,ZodUnknown:Km,ZodNever:Hp,ZodVoid:uv,ZodArray:Jm,ZodObject:Hs,ZodUnion:kS,ZodDiscriminatedUnion:m3,ZodIntersection:US,ZodTuple:pA,ZodRecord:g3,ZodMap:cv,ZodSet:lv,ZodFunction:h3,ZodLazy:LS,ZodLiteral:QS,ZodEnum:FS,ZodNativeEnum:GS,ZodPromise:O_,ZodEffects:Il,ZodTransformer:Il,ZodOptional:zp,ZodNullable:Zm,ZodDefault:jS,ZodCatch:dv,ZodNaN:pv,BRAND:$St,ZodBranded:_3,ZodPipeline:TN,ZodReadonly:fv,custom:s2e,Schema:En,ZodSchema:En,late:VSt,get ZodFirstPartyTypeKind(){return zt},coerce:Ryt,any:eyt,array:oyt,bigint:KSt,boolean:l2e,date:JSt,discriminatedUnion:uyt,effect:n2e,enum:hyt,function:Ayt,instanceof:qSt,intersection:cyt,lazy:myt,literal:gyt,map:pyt,nan:YSt,nativeEnum:_yt,never:nyt,null:XSt,nullable:yyt,number:c2e,object:iyt,oboolean:vyt,onumber:byt,optional:Syt,ostring:Cyt,pipeline:Iyt,preprocess:Tyt,promise:Eyt,record:dyt,set:fyt,strictObject:ayt,string:u2e,symbol:ZSt,transformer:n2e,tuple:lyt,undefined:WSt,union:syt,unknown:tyt,void:ryt,NEVER:Dyt,ZodIssueCode:ze,quotelessJson:NSt,ZodError:yc}),xyt=e=>typeof e?.safeParse=="function",YY=e=>typeof e?.passthrough=="function",Byt=(e,t)=>YY(e)?YY(t)?e.merge(t):e:YY(t)?t:Object.assign({},e,t),Od=js.object({name:js.literal("ZodError"),issues:js.array(js.object({path:js.array(js.union([js.string(),js.number()])),message:js.string().optional(),code:js.nativeEnum(js.ZodIssueCode)}).catchall(js.any()))}),eK=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}},xgn=js.object({message:js.literal("Request validation failed"),pathParameterErrors:Od.nullable(),headerErrors:Od.nullable(),queryParameterErrors:Od.nullable(),bodyErrors:Od.nullable()}),Bgn=js.object({pathParameterErrors:Od.nullable(),headerErrors:Od.nullable(),queryParameterErrors:Od.nullable(),bodyErrors:Od.nullable()}),Ngn=js.object({paramsResult:Od.nullable(),headersResult:Od.nullable(),queryResult:Od.nullable(),bodyResult:Od.nullable()}),d2e="zod-ts-rest-polyfill",Nyt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},Oyt=e=>Nyt(e)?e:xyt(e)?(Object.assign(e,{"~standard":{vendor:d2e,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,wyt=(e,t)=>e?t?e instanceof Hs&&t instanceof Hs?Byt(e,t):{...e,...t}:e:t,Myt=(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===d2e?{error:new yc(r.issues)}:{error:new eK(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},p2e=Symbol("ContractNoBody"),f2e=e=>"method"in e&&"path"in e,A2e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,a;return f2e(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:wyt(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,A2e(r,t)]})),KY=Symbol("ContractPlainType"),$s=()=>({router:(e,t)=>A2e(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>KY,body:()=>KY,type:()=>KY,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>p2e}),Pyt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},kyt=(e,t=!1)=>{let n=t?Uyt(e):Lyt(e);return n?.length>0?"?"+n:""},Uyt=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("&"):"",Lyt=e=>e?Object.keys(e).flatMap(t=>tK(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",tK=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>tK(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>tK(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],nK=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}},rK=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:a})=>{let c=await fetch(t,{...a,method:n,headers:r,body:o}),d=c.headers.get("content-type");if(d?.includes("application/")&&d?.includes("json")){let m=e.responses[c.status],h={status:c.status,body:m===p2e?void 0:await c.json(),headers:c.headers},y=Oyt(m);if(y&&(i??e.validateResponseOnClient)){let S=Myt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return d?.includes("text/")?{status:c.status,body:await c.text(),headers:c.headers}:{status:c.status,body:await c.blob(),headers:c.headers}},Qyt=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},r2e=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),Fyt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:a,headers:c,fetchOptions:d}=e,m=n.api||rK,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([b,R])=>typeof R=="function"?[b,R(e)]:[b,R])),y={...h&&r2e(h),...r2e(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},...d},...d?.signal&&{signal:d.signal},...d?.cache&&{cache:d.cache},...d&&"next"in d&&!!d?.next&&{next:d.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?S={...S,contentType:"multipart/form-data",body:o instanceof FormData?o:Qyt(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)})),m({...S,...a})},Gyt=(e,t,n)=>{let{query:r,params:o,body:i,headers:a,extraHeaders:c,overrideClientOptions:d,fetchOptions:m,cache:h,next:y,...S}=n||{},b={...t,...d},R=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([N,M])=>[N,String(M)])):{};return{path:jyt(r,b.baseUrl,R,e,!!b.jsonQuery),clientArgs:b,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...m},headers:{...c,...a}}},jyt=(e,t,n,r,o)=>{let i=Pyt({path:r.path,params:n}),a=kyt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${a}`:`${t}${i}${a}`},zyt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Gyt(e,t,r),i=await Fyt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new nK(i,n)}},oK=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>f2e(r)?[n,zyt(r,t)]:[n,oK(r,t)]))});function te(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);let m=a.prototype,h=Object.keys(m);for(let y=0;y<h.length;y++){let S=h[y];S in c||(c[S]=m[S].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(c){var d;let m=n?.Parent?new i:this;r(m,c),(d=m._zod).deferred??(d.deferred=[]);for(let h of m._zod.deferred)h();return m}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 ai(e){return e&&Object.assign(zS,e),zS}var m2e,iK,aK,$p,w_,zS,HS=O(()=>{A();iK=Object.freeze({status:"aborted"});aK=Symbol("zod_brand"),$p=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},w_=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(m2e=globalThis).__zod_globalConfig??(m2e.__zod_globalConfig={});zS=globalThis.__zod_globalConfig});var Me={};es(Me,{BIGINT_FORMAT_RANGES:()=>gK,Class:()=>uK,NUMBER_FORMAT_RANGES:()=>mK,aborted:()=>U_,allowsEval:()=>dK,assert:()=>Yyt,assertEqual:()=>Hyt,assertIs:()=>Vyt,assertNever:()=>qyt,assertNotEqual:()=>$yt,assignProp:()=>P_,base64ToUint8Array:()=>h2e,base64urlToUint8Array:()=>dTt,cached:()=>mv,captureStackTrace:()=>S3,cleanEnum:()=>lTt,cleanRegex:()=>bN,clone:()=>Bu,cloneDef:()=>Jyt,createTransparentProxy:()=>nTt,defineLazy:()=>Un,esc:()=>E3,escapeRegex:()=>Md,explicitlyAborted:()=>hK,extend:()=>iTt,finalizeIssue:()=>Nu,floatSafeRemainder:()=>cK,getElementAtPath:()=>Zyt,getEnumValues:()=>CN,getLengthableOrigin:()=>DN,getParsedType:()=>tTt,getSizableOrigin:()=>RN,hexToUint8Array:()=>fTt,isObject:()=>$S,isPlainObject:()=>k_,issue:()=>gv,joinValues:()=>ae,jsonStringifyReplacer:()=>Av,merge:()=>sTt,mergeDefs:()=>Wm,normalizeParams:()=>Fe,nullish:()=>M_,numKeys:()=>eTt,objectClone:()=>Kyt,omit:()=>oTt,optionalKeys:()=>AK,parsedType:()=>Be,partial:()=>uTt,pick:()=>rTt,prefixIssues:()=>Tc,primitiveTypes:()=>fK,promiseAllObject:()=>Wyt,propertyKeyTypes:()=>vN,randomString:()=>Xyt,required:()=>cTt,safeExtend:()=>aTt,shallowClone:()=>pK,slugify:()=>lK,stringifyPrimitive:()=>De,uint8ArrayToBase64:()=>_2e,uint8ArrayToBase64url:()=>pTt,uint8ArrayToHex:()=>ATt,unwrapMessage:()=>IN});function Hyt(e){return e}function $yt(e){return e}function Vyt(e){}function qyt(e){throw new Error("Unexpected value in exhaustive check")}function Yyt(e){}function CN(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 ae(e,t="|"){return e.map(n=>De(n)).join(t)}function Av(e,t){return typeof t=="bigint"?t.toString():t}function mv(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function M_(e){return e==null}function bN(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function cK(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 Un(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==g2e)return r===void 0&&(r=g2e,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Kyt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function P_(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Wm(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function Jyt(e){return Wm(e._zod.def)}function Zyt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function Wyt(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 Xyt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function E3(e){return JSON.stringify(e)}function lK(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function $S(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function k_(e){if($S(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!($S(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function pK(e){return k_(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function eTt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function Md(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bu(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Fe(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 nTt(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 De(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function AK(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function rTt(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=Wm(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 P_(this,"shape",a),a},checks:[]});return Bu(e,i)}function oTt(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=Wm(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 P_(this,"shape",a),a},checks:[]});return Bu(e,i)}function iTt(e,t){if(!k_(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=Wm(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return P_(this,"shape",i),i}});return Bu(e,o)}function aTt(e,t){if(!k_(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Wm(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return P_(this,"shape",r),r}});return Bu(e,n)}function sTt(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=Wm(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return P_(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Bu(e,n)}function uTt(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=Wm(t._zod.def,{get shape(){let c=t._zod.def.shape,d={...c};if(n)for(let m in n){if(!(m in c))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(d[m]=e?new e({type:"optional",innerType:c[m]}):c[m])}else for(let m in c)d[m]=e?new e({type:"optional",innerType:c[m]}):c[m];return P_(this,"shape",d),d},checks:[]});return Bu(t,a)}function cTt(e,t,n){let r=Wm(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 P_(this,"shape",i),i}});return Bu(t,r)}function U_(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 hK(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 Tc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function IN(e){return typeof e=="string"?e:e?.message}function Nu(e,t,n){let r=e.message?e.message:IN(e.inst?._zod.def?.error?.(e))??IN(t?.error?.(e))??IN(n.customError?.(e))??IN(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 RN(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function DN(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Be(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 gv(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function lTt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function h2e(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 _2e(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function dTt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return h2e(t+n)}function pTt(e){return _2e(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function fTt(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 ATt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var g2e,S3,dK,tTt,vN,fK,mK,gK,uK,mt=O(()=>{A();HS();g2e=Symbol("evaluating");S3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};dK=mv(()=>{if(zS.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});tTt=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}`)}},vN=new Set(["string","number","symbol"]),fK=new Set(["string","number","bigint","boolean","symbol","undefined"]);mK={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]},gK={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};uK=class{constructor(...t){}}});function BN(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 NN(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let a of o.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>r({issues:c},[...i,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...i,...a.path]);else{let c=[...i,...a.path];if(c.length===0)n._errors.push(t(a));else{let d=n,m=0;for(;m<c.length;){let h=c[m];m===c.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(t(a))):d[h]=d[h]||{_errors:[]},d=d[h],m++}}}};return r(e),n}function _K(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var a,c;for(let d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(m=>r({issues:m},[...i,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...i,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...i,...d.path]);else{let m=[...i,...d.path];if(m.length===0){n.errors.push(t(d));continue}let h=n,y=0;for(;y<m.length;){let S=m[y],b=y===m.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(d)),y++}}};return r(e),n}function S2e(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 EK(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 ${S2e(r.path)}`);return t.join(`
|
|
41
41
|
`)}var E2e,xN,Ic,SK=O(()=>{A();HS();mt();E2e=(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,Av,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},xN=te("$ZodError",E2e),Ic=te("$ZodError",E2e,{Parent:Error})});var hv,y3,_v,T3,Ev,yK,Sv,TK,I3,gTt,C3,hTt,b3,_Tt,v3,ETt,R3,STt,D3,yTt,x3,TTt,B3,ITt,IK=O(()=>{A();HS();SK();mt();hv=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 $p;if(a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Nu(d,i,ai())));throw S3(c,o?.callee),c}return a.value},y3=hv(Ic),_v=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(o?.Err??e)(a.issues.map(d=>Nu(d,i,ai())));throw S3(c,o?.callee),c}return a.value},T3=_v(Ic),Ev=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 $p;return i.issues.length?{success:!1,error:new(e??xN)(i.issues.map(a=>Nu(a,o,ai())))}:{success:!0,data:i.value}},yK=Ev(Ic),Sv=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=>Nu(a,o,ai())))}:{success:!0,data:i.value}},TK=Sv(Ic),I3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return hv(e)(t,n,o)},gTt=I3(Ic),C3=e=>(t,n,r)=>hv(e)(t,n,r),hTt=C3(Ic),b3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return _v(e)(t,n,o)},_Tt=b3(Ic),v3=e=>async(t,n,r)=>_v(e)(t,n,r),ETt=v3(Ic),R3=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Ev(e)(t,n,o)},STt=R3(Ic),D3=e=>(t,n,r)=>Ev(e)(t,n,r),yTt=D3(Ic),x3=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return Sv(e)(t,n,o)},TTt=x3(Ic),B3=e=>async(t,n,r)=>Sv(e)(t,n,r),ITt=B3(Ic)});var Cl={};es(Cl,{base64:()=>QK,base64url:()=>N3,bigint:()=>VK,boolean:()=>YK,browserEmail:()=>NTt,cidrv4:()=>UK,cidrv6:()=>LK,cuid:()=>CK,cuid2:()=>bK,date:()=>jK,datetime:()=>HK,domain:()=>MTt,duration:()=>BK,e164:()=>GK,email:()=>OK,emoji:()=>wK,extendedDuration:()=>CTt,guid:()=>NK,hex:()=>PTt,hostname:()=>wTt,html5Email:()=>DTt,httpProtocol:()=>FK,idnEmail:()=>BTt,integer:()=>qK,ipv4:()=>MK,ipv6:()=>PK,ksuid:()=>DK,lowercase:()=>ZK,mac:()=>kK,md5_base64:()=>UTt,md5_base64url:()=>LTt,md5_hex:()=>kTt,nanoid:()=>xK,null:()=>KK,number:()=>O3,rfc5322Email:()=>xTt,sha1_base64:()=>FTt,sha1_base64url:()=>GTt,sha1_hex:()=>QTt,sha256_base64:()=>zTt,sha256_base64url:()=>HTt,sha256_hex:()=>jTt,sha384_base64:()=>VTt,sha384_base64url:()=>qTt,sha384_hex:()=>$Tt,sha512_base64:()=>KTt,sha512_base64url:()=>JTt,sha512_hex:()=>YTt,string:()=>$K,time:()=>zK,ulid:()=>vK,undefined:()=>JK,unicodeEmail:()=>y2e,uppercase:()=>WK,uuid:()=>VS,uuid4:()=>bTt,uuid6:()=>vTt,uuid7:()=>RTt,xid:()=>RK});function wK(){return new RegExp(OTt,"u")}function I2e(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 zK(e){return new RegExp(`^${I2e(e)}$`)}function HK(e){let t=I2e({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(`^${T2e}T(?:${r})$`)}function ON(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function wN(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var CK,bK,vK,RK,DK,xK,BK,CTt,NK,VS,bTt,vTt,RTt,OK,DTt,xTt,y2e,BTt,NTt,OTt,MK,PK,kK,UK,LK,QK,N3,wTt,MTt,FK,GK,T2e,jK,$K,VK,qK,O3,YK,KK,JK,ZK,WK,PTt,kTt,UTt,LTt,QTt,FTt,GTt,jTt,zTt,HTt,$Tt,VTt,qTt,YTt,KTt,JTt,w3=O(()=>{A();mt();CK=/^[cC][0-9a-z]{6,}$/,bK=/^[0-9a-z]+$/,vK=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,RK=/^[0-9a-vA-V]{20}$/,DK=/^[A-Za-z0-9]{27}$/,xK=/^[a-zA-Z0-9_-]{21}$/,BK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,CTt=/^[-+]?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)?)??$/,NK=/^([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})$/,VS=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)$/,bTt=VS(4),vTt=VS(6),RTt=VS(7),OK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,DTt=/^[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])?)*$/,xTt=/^(([^<>()\[\]\\.,;:\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,}))$/,y2e=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,BTt=y2e,NTt=/^[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])?)*$/,OTt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";MK=/^(?:(?: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])$/,PK=/^(([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}|:))$/,kK=e=>{let t=Md(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},UK=/^((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])$/,LK=/^(([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])$/,QK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,N3=/^[A-Za-z0-9_-]*$/,wTt=/^(?=.{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])?)*\.?$/,MTt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,FK=/^https?$/,GK=/^\+[1-9]\d{6,14}$/,T2e="(?:(?:\\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])))",jK=new RegExp(`^${T2e}$`);$K=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},VK=/^-?\d+n?$/,qK=/^-?\d+$/,O3=/^-?\d+(?:\.\d+)?$/,YK=/^(?:true|false)$/i,KK=/^null$/i,JK=/^undefined$/i,ZK=/^[^A-Z]*$/,WK=/^[^a-z]*$/,PTt=/^[0-9a-fA-F]*$/;kTt=/^[0-9a-fA-F]{32}$/,UTt=ON(22,"=="),LTt=wN(22),QTt=/^[0-9a-fA-F]{40}$/,FTt=ON(27,"="),GTt=wN(27),jTt=/^[0-9a-fA-F]{64}$/,zTt=ON(43,"="),HTt=wN(43),$Tt=/^[0-9a-fA-F]{96}$/,VTt=ON(64,""),qTt=wN(64),YTt=/^[0-9a-fA-F]{128}$/,KTt=ON(86,"=="),JTt=wN(86)});function C2e(e,t,n){e.issues.length&&t.issues.push(...Tc(n,e.issues))}var jr,b2e,M3,P3,XK,eJ,tJ,nJ,rJ,oJ,iJ,aJ,sJ,yv,uJ,cJ,lJ,dJ,pJ,fJ,AJ,mJ,gJ,k3=O(()=>{A();HS();w3();mt();jr=te("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),b2e={number:"number",bigint:"bigint",object:"date"},M3=te("$ZodCheckLessThan",(e,t)=>{jr.init(e,t);let n=b2e[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})}}),P3=te("$ZodCheckGreaterThan",(e,t)=>{jr.init(e,t);let n=b2e[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})}}),XK=te("$ZodCheckMultipleOf",(e,t)=>{jr.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):cK(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})}}),eJ=te("$ZodCheckNumberFormat",(e,t)=>{jr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=mK[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=qK)}),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})}}),tJ=te("$ZodCheckBigIntFormat",(e,t)=>{jr.init(e,t);let[n,r]=gK[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})}}),nJ=te("$ZodCheckMaxSize",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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:RN(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),rJ=te("$ZodCheckMinSize",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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:RN(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),oJ=te("$ZodCheckSizeEquals",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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:RN(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})}}),iJ=te("$ZodCheckMaxLength",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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=DN(o);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),aJ=te("$ZodCheckMinLength",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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=DN(o);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),sJ=te("$ZodCheckLengthEquals",(e,t)=>{var n;jr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!M_(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=DN(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})}}),yv=te("$ZodCheckStringFormat",(e,t)=>{var n,r;jr.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=()=>{})}),uJ=te("$ZodCheckRegex",(e,t)=>{yv.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})}}),cJ=te("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ZK),yv.init(e,t)}),lJ=te("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=WK),yv.init(e,t)}),dJ=te("$ZodCheckIncludes",(e,t)=>{jr.init(e,t);let n=Md(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})}}),pJ=te("$ZodCheckStartsWith",(e,t)=>{jr.init(e,t);let n=new RegExp(`^${Md(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})}}),fJ=te("$ZodCheckEndsWith",(e,t)=>{jr.init(e,t);let n=new RegExp(`.*${Md(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})}});AJ=te("$ZodCheckProperty",(e,t)=>{jr.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=>C2e(o,n,t.property));C2e(r,n,t.property)}}),mJ=te("$ZodCheckMimeType",(e,t)=>{jr.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})}}),gJ=te("$ZodCheckOverwrite",(e,t)=>{jr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var MN,hJ=O(()=>{A();MN=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(`
|
|
@@ -477,7 +477,7 @@ exec ${lie(n)} ${lie(e)} "$@"
|
|
|
477
477
|
Authorization denied.
|
|
478
478
|
`);return;case"authorization_expired":console.log(`
|
|
479
479
|
Authorization expired. Please try again.
|
|
480
|
-
`);return}}});var Kje={};es(Kje,{getOpenBrowserCommand:()=>Dze,loginCommand:()=>mie,openBrowser:()=>Rze,pollForTokens:()=>vze,requestDeviceAuthorization:()=>bze,runLogin:()=>xze});import{spawn as tLt}from"node:child_process";async function oLt(e){let n=await cr({token:e}).whoAmI({headers:{}});n.status===200&&aUe(`lore_${n.body.user.id}`)}async function Tze(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function Ize(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function Cze(e,t){return new URL(t,e).toString()}async function bze({clientId:e,workosApiOrigin:t}){let n=await fetch(Cze(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await Tze(n);if(!n.ok)throw new Error(Ize(r));return r}async function vze({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(Cze(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:rLt,device_code:t,client_id:e}),signal:a})}catch(y){throw y instanceof Error&&y.name==="TimeoutError"?new Error("authorization timed out"):y}let m=await Tze(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await yze(c*1e3);break;case"slow_down":c+=1,await yze(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(Ize(h))}}}async function Rze(e){let{command:t,args:n}=Dze(process.platform,e);await new Promise((r,o)=>{let i=tLt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function Dze(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 iLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function aLt(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:Pd()})}catch(r){gt.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}async function xze({client:e=cr(),enableLaunchAgent:t=Q8,openBrowser:n=Rze,platform:r=process.platform,pollForTokens:o=vze,requestDeviceAuthorization:i=bze,setAccessToken:a=S6,setRefreshToken:c=y6,cacheAnalyticsDistinctId:d=oLt,timeoutMs:m=nLt,progress:h=Eze}={}){if(await iLt(e)){h({kind:"already_logged_in"});return}let y=await e.getCliAuthConfig();if(y.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let S=await i({clientId:y.body.workos_client_id,workosApiOrigin:y.body.workos_api_origin});h({kind:"device_authorized",userCode:S.user_code,verificationUri:S.verification_uri,verificationUriComplete:S.verification_uri_complete});try{await n(S.verification_uri_complete),h({kind:"browser_opened"})}catch(R){gt.warn("open_browser_failed",{error:R instanceof Error?R.message:String(R)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:S.verification_uri_complete}),h({kind:"waiting_for_authorization"});let b=await o({clientId:y.body.workos_client_id,deviceCode:S.device_code,expiresIn:S.expires_in,interval:S.interval,timeoutMs:m,workosApiOrigin:y.body.workos_api_origin});a(b.access_token),b.refresh_token&&c(b.refresh_token),d(b.access_token).catch(R=>{gt.warn("cache_analytics_distinct_id_failed",{error:R instanceof Error?R.message:String(R)})}),h({kind:"logged_in"}),await aLt(t,r,h)}catch(S){throw S instanceof Error&&S.message==="authorization timed out"?h({kind:"authorization_timed_out"}):S instanceof Error&&S.message==="Authorization denied"?h({kind:"authorization_denied"}):S instanceof Error&&S.message==="Authorization expired"&&h({kind:"authorization_expired"}),S}}var nLt,rLt,yze,mie,oie=O(async()=>{"use strict";A();ps();As();Ys();ry();await jje();await Yje();_2();Kv();Sze();nLt=5*60*1e3,rLt="urn:ietf:params:oauth:grant-type:device_code";yze=e=>new Promise(t=>setTimeout(t,e));mie={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){gt.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Rc()&&!e?.progress){await qje(t),await Gje({skipIfAlreadyConfigured:!0});return}await xze({...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]="2ddf4458-5a69-4527-b250-523a836a09dc",e._sentryDebugIdIdentifier="sentry-dbid-2ddf4458-5a69-4527-b250-523a836a09dc")}catch{}})();A();A();_N();yl();zY({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:jo(),release:Sl(),sendDefaultPii:!0});Ik("service_name","lore-cli");_N();qY();import{realpathSync as i4t}from"node:fs";import{fileURLToPath as a4t,pathToFileURL as KHe}from"node:url";A();A();kee();ps();fs();As();A();function dO(e){let t=e;return t._def??t.def??{}}function hxt(e){let t=dO(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function vc(e,t,n){let r=hxt(e);return r===t||r===n}function _Ue(e){let t=dO(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function _xt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=dO(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function jee(e){if(!e||!vc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=dO(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function EUe(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=dO(t);if(vc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(vc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(vc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(vc(t,"ZodEffects","effects"))t=i.schema;else if(vc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Ext(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=EUe(e),a=!1,c=n;vc(c,"ZodArray","array")&&(a=!0,c=_Ue(c)??c);let d=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:vc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:_xt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:vc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:d,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:d,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function zee(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=Ext(i,t);n[o]=a,r[o]={isArray:c,leafKind:Sxt(i)}}return{args:n,fields:r}}function Hee(e,t={}){let n=jee(e);return n?zee(n,t):{args:{},fields:{}}}function Sxt(e){let{inner:t}=EUe(e),n=t;return vc(n,"ZodArray","array")&&(n=_Ue(n)??n),vc(n,"ZodNumber","number")?"number":vc(n,"ZodBoolean","boolean")?"boolean":vc(n,"ZodEnum","enum")?"enum":vc(n,"ZodString","string")?"string":"other"}function yxt(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 Txt(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 $ee(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 Ixt(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 Cxt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Vee(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>Cxt(n,a))}function bxt(e,t,n){return e.resource==="threads"&&t==="id"?Ixt(n):n}function SUe(e){let t=yxt(g6,e.path),n=jee(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=zee(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Hee(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Hee(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},m=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:m},args:d,async run({args:h,data:y}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Ur)())throw new yn("not logged in \u2014 run 'lore login' first");let R={};for(let he of r){let ve=h[he],Te=$ee(ve,i.fields[he])??ve;R[he]=bxt(e,he,Te)}let B={};for(let[he,ve]of Object.entries(a.fields)){let Te=$ee(h[he],ve);Te!==void 0&&(B[he]=Te)}let N={};for(let[he,ve]of Object.entries(c.fields)){let Te=$ee(h[he],ve);Te!==void 0&&(N[he]=Te)}let M=[...Vee(t.pathParams,R,"path"),...Vee(t.query,B,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Vee(t.body,N,"body")];if(M.length>0)throw new yn(`Invalid request for \`lore ${e.resource} ${e.op}\`:
|
|
480
|
+
`);return}}});var Kje={};es(Kje,{getOpenBrowserCommand:()=>Dze,loginCommand:()=>mie,openBrowser:()=>Rze,pollForTokens:()=>vze,requestDeviceAuthorization:()=>bze,runLogin:()=>xze});import{spawn as tLt}from"node:child_process";async function oLt(e){let n=await cr({token:e}).whoAmI({headers:{}});n.status===200&&aUe(`lore_${n.body.user.id}`)}async function Tze(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function Ize(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}function Cze(e,t){return new URL(t,e).toString()}async function bze({clientId:e,workosApiOrigin:t}){let n=await fetch(Cze(t,"/user_management/authorize/device"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e})}),r=await Tze(n);if(!n.ok)throw new Error(Ize(r));return r}async function vze({clientId:e,deviceCode:t,expiresIn:n,interval:r,timeoutMs:o,workosApiOrigin:i}){let a=AbortSignal.timeout(Math.min(o,n*1e3)),c=r;for(;;){let d;try{d=await fetch(Cze(i,"/user_management/authenticate"),{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:rLt,device_code:t,client_id:e}),signal:a})}catch(y){throw y instanceof Error&&y.name==="TimeoutError"?new Error("authorization timed out"):y}let m=await Tze(d);if(d.ok)return m;let h=m;switch(h.error){case"authorization_pending":await yze(c*1e3);break;case"slow_down":c+=1,await yze(c*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(Ize(h))}}}async function Rze(e){let{command:t,args:n}=Dze(process.platform,e);await new Promise((r,o)=>{let i=tLt(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function Dze(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 iLt(e){if(!await Ur())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function aLt(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:Pd()})}catch(r){gt.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}async function xze({client:e=cr(),enableLaunchAgent:t=Q8,openBrowser:n=Rze,platform:r=process.platform,pollForTokens:o=vze,requestDeviceAuthorization:i=bze,setAccessToken:a=S6,setRefreshToken:c=y6,cacheAnalyticsDistinctId:d=oLt,timeoutMs:m=nLt,progress:h=Eze}={}){if(await iLt(e)){h({kind:"already_logged_in"});return}let y=await e.getCliAuthConfig();if(y.status!==200)throw new Error("WorkOS CLI Auth is not configured.");try{let S=await i({clientId:y.body.workos_client_id,workosApiOrigin:y.body.workos_api_origin});h({kind:"device_authorized",userCode:S.user_code,verificationUri:S.verification_uri,verificationUriComplete:S.verification_uri_complete});try{await n(S.verification_uri_complete),h({kind:"browser_opened"})}catch(R){gt.warn("open_browser_failed",{error:R instanceof Error?R.message:String(R)}),h({kind:"browser_open_failed"})}h({kind:"browser_url",url:S.verification_uri_complete}),h({kind:"waiting_for_authorization"});let b=await o({clientId:y.body.workos_client_id,deviceCode:S.device_code,expiresIn:S.expires_in,interval:S.interval,timeoutMs:m,workosApiOrigin:y.body.workos_api_origin});a(b.access_token),b.refresh_token&&c(b.refresh_token),d(b.access_token).catch(R=>{gt.warn("cache_analytics_distinct_id_failed",{error:R instanceof Error?R.message:String(R)})}),h({kind:"logged_in"}),await aLt(t,r,h)}catch(S){throw S instanceof Error&&S.message==="authorization timed out"?h({kind:"authorization_timed_out"}):S instanceof Error&&S.message==="Authorization denied"?h({kind:"authorization_denied"}):S instanceof Error&&S.message==="Authorization expired"&&h({kind:"authorization_expired"}),S}}var nLt,rLt,yze,mie,oie=O(async()=>{"use strict";A();ps();As();Ys();ry();await jje();await Yje();_2();Kv();Sze();nLt=5*60*1e3,rLt="urn:ietf:params:oauth:grant-type:device_code";yze=e=>new Promise(t=>setTimeout(t,e));mie={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){gt.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,pollForTokens:e?.pollForTokens,requestDeviceAuthorization:e?.requestDeviceAuthorization,setAccessToken:e?.setAccessToken,setRefreshToken:e?.setRefreshToken,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(Rc()&&!e?.progress){await qje(t),await Gje({skipIfAlreadyConfigured:!0});return}await xze({...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]="eb1d9626-5ece-4f45-bfbc-d83aad14ebfa",e._sentryDebugIdIdentifier="sentry-dbid-eb1d9626-5ece-4f45-bfbc-d83aad14ebfa")}catch{}})();A();A();_N();yl();zY({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:jo(),release:Sl(),sendDefaultPii:!0});Ik("service_name","lore-cli");_N();qY();import{realpathSync as i4t}from"node:fs";import{fileURLToPath as a4t,pathToFileURL as KHe}from"node:url";A();A();kee();ps();fs();As();A();function dO(e){let t=e;return t._def??t.def??{}}function hxt(e){let t=dO(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function vc(e,t,n){let r=hxt(e);return r===t||r===n}function _Ue(e){let t=dO(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function _xt(e){let t=e.options;if(Array.isArray(t))return[...t];let n=dO(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function jee(e){if(!e||!vc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=dO(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function EUe(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=dO(t);if(vc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(vc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(vc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(vc(t,"ZodEffects","effects"))t=i.schema;else if(vc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function Ext(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=EUe(e),a=!1,c=n;vc(c,"ZodArray","array")&&(a=!0,c=_Ue(c)??c);let d=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:vc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:_xt(c),required:d,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:a}:vc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:d,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:a}:{arg:{type:"string",description:a?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:d,...o!==void 0?{default:String(o)}:{},...a?{valueHint:"a,b,c"}:{}},optional:r,isArray:a}}function zee(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:a,isArray:c}=Ext(i,t);n[o]=a,r[o]={isArray:c,leafKind:Sxt(i)}}return{args:n,fields:r}}function Hee(e,t={}){let n=jee(e);return n?zee(n,t):{args:{},fields:{}}}function Sxt(e){let{inner:t}=EUe(e),n=t;return vc(n,"ZodArray","array")&&(n=_Ue(n)??n),vc(n,"ZodNumber","number")?"number":vc(n,"ZodBoolean","boolean")?"boolean":vc(n,"ZodEnum","enum")?"enum":vc(n,"ZodString","string")?"string":"other"}function yxt(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 Txt(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 $ee(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 Ixt(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 Cxt(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Vee(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(a=>Cxt(n,a))}function bxt(e,t,n){return e.resource==="threads"&&t==="id"?Ixt(n):n}function SUe(e){let t=yxt(g6,e.path),n=jee(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=zee(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),a=Hee(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Hee(t.body);for(let h of Object.keys(c.args))if(a.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let d={...i.args,...a.args,...c.args},m=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:m},args:d,async run({args:h,data:y}){gt.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Ur)())throw new yn("not logged in \u2014 run 'lore login' first");let R={};for(let he of r){let ve=h[he],Te=$ee(ve,i.fields[he])??ve;R[he]=bxt(e,he,Te)}let B={};for(let[he,ve]of Object.entries(a.fields)){let Te=$ee(h[he],ve);Te!==void 0&&(B[he]=Te)}let N={};for(let[he,ve]of Object.entries(c.fields)){let Te=$ee(h[he],ve);Te!==void 0&&(N[he]=Te)}let M=[...Vee(t.pathParams,R,"path"),...Vee(t.query,B,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Vee(t.body,N,"body")];if(M.length>0)throw new yn(`Invalid request for \`lore ${e.resource} ${e.op}\`:
|
|
481
481
|
${M.join(`
|
|
482
482
|
`)}`);let F=S?.client??cr(),$=Txt(F,e.path),H={headers:{}};r.length>0&&(H.params=R),Object.keys(B).length>0&&(H.query=B),Object.keys(c.fields).length>0&&(H.body=N);let re=await $(H);if(re.status>=200&&re.status<300){console.log(JSON.stringify(re.body,null,2));return}let fe=re.body?.message??`${e.path.join(".")} returned ${re.status}`;throw new yn(fe)}}}A();var yUe=[{path:["getThread"],resource:"threads",op:"get"},{path:["listThreads"],resource:"threads",op:"list"},{path:["forkThread"],resource:"threads",op:"fork"},{path:["projects","listProjects"],resource:"projects",op:"list"}];function TUe(e=yUe){let t=new Map;for(let r of e){let o=SUe(r),i=t.get(r.resource)??new Map;if(i.has(r.op))throw new Error(`cliRoutes has duplicate "${r.resource} ${r.op}" \u2014 operations must be unique within a resource`);i.set(r.op,o),t.set(r.resource,i)}let n={};for(let[r,o]of t)n[r]={meta:{name:r,description:`Operations on ${r}.`},subCommands:Object.fromEntries(o)};return n}await oie();A();As();A();As();Ys();import{createHash as fLt}from"node:crypto";import $8 from"node:fs/promises";import ALt from"node:path";A();import E2 from"node:fs/promises";import sLt from"node:os";import Xp from"node:path";var uLt=Xp.join(sLt.homedir(),".claude","skills"),$R=()=>uLt,gie=(e=process.cwd())=>Xp.join(e,".claude","skills"),j8="SKILL.md",cLt=/^[A-Za-z0-9_][A-Za-z0-9._:-]*$/,S2=e=>{if(typeof e!="string"||e.length===0||e.length>200||e==="."||e===".."||e.includes("/")||e.includes("\\")||/[\x00-\x1f]/.test(e)||!cLt.test(e))return!1;for(let t of e.split(":"))if(t===""||t==="."||t==="..")return!1;return!0},z8=(e,t)=>{let n=Xp.resolve(e),r=Xp.resolve(t),o=Xp.relative(n,r);if(o===""||o.startsWith("..")||Xp.isAbsolute(o))throw new Error(`refused to use a skill path outside ${n}: ${r}`);return r},lLt=(e,t)=>S2(e)?[z8(gie(t),Xp.join(gie(t),e,j8)),z8($R(),Xp.join($R(),e,j8))]:[],Bze=async e=>{try{return await E2.access(e),!0}catch{return!1}},VR=async(e,t=process.cwd())=>{for(let n of lLt(e,t))if(await Bze(n)){let r=await E2.readFile(n,"utf8"),o=pLt(r);return{name:o.name??e,description:o.description??null,bodyMd:r,filePath:n}}return null},dLt=/^---\s*\n([\s\S]*?)\n---\s*(?:\n|$)/,pLt=e=>{let t=dLt.exec(e);if(!t)return{name:null,description:null};let n=t[1];if(!n)return{name:null,description:null};let r={name:null,description:null};for(let o of n.split(`
|
|
483
483
|
`)){let i=o.trimEnd(),a=i.indexOf(":");if(a<=0)continue;let c=i.slice(0,a).trim(),d=i.slice(a+1).trim();(d.startsWith('"')&&d.endsWith('"')||d.startsWith("'")&&d.endsWith("'"))&&(d=d.slice(1,-1)),c==="name"&&(r.name=d||null),c==="description"&&(r.description=d||null)}return r},Nze=async(e,t)=>{if(!S2(e))throw new Error(`refusing to install skill with invalid name: ${JSON.stringify(e)}`);let n=z8($R(),Xp.join($R(),e)),r=z8($R(),Xp.join(n,j8));return await E2.mkdir(n,{recursive:!0}),await E2.writeFile(r,t,"utf8"),r},H8=async(e=process.cwd())=>{let t=new Set;for(let n of[gie(e),$R()])try{let r=await E2.readdir(n,{withFileTypes:!0});for(let o of r){if(!o.isDirectory()||!S2(o.name))continue;let i=Xp.join(n,o.name,j8);await Bze(i)&&t.add(o.name)}}catch{}return[...t].sort()};var mLt=e=>fLt("sha256").update(e,"utf8").digest("hex"),gLt=async()=>{try{let e=await $8.readFile(_6(),"utf8");return{pushedHashes:JSON.parse(e).pushedHashes??{}}}catch{return{pushedHashes:{}}}},hLt=async e=>{let t=_6();await $8.mkdir(ALt.dirname(t),{recursive:!0,mode:448}),await $8.writeFile(t,`${JSON.stringify(e,null,2)}
|