@tanagram/lore 0.1.156 → 0.1.157

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +5 -5
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 VYe=Object.create;var lM=Object.defineProperty;var YYe=Object.getOwnPropertyDescriptor;var KYe=Object.getOwnPropertyNames;var JYe=Object.getPrototypeOf,ZYe=Object.prototype.hasOwnProperty;var Fe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},$s=(e,t)=>{for(var n in t)lM(e,n,{get:t[n],enumerable:!0})},ide=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KYe(t))!ZYe.call(e,o)&&o!==n&&lM(e,o,{get:()=>t[o],enumerable:!(r=YYe(t,o))||r.enumerable});return e};var se=(e,t,n)=>(n=e!=null?VYe(JYe(e)):{},ide(t||!e||!e.__esModule?lM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>ide(lM({},"__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.156"}}catch{}})()});var lg,z$=O(()=>{A();lg="1.9.1"});function WYe(e){let t=new Set([e]),n=new Set,r=e.match(ude);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(c){return n.add(c),!1}function s(c){return t.add(c),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(ude);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var ude,cde,lde=O(()=>{A();z$();ude=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;cde=WYe(lg)});function mm(e,t,n,r=!1){var o;let i=sB[iB]=(o=sB[iB])!==null&&o!==void 0?o:{version:lg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==lg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${lg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${lg}.`),!0}function xl(e){var t,n;let r=(t=sB[iB])===null||t===void 0?void 0:t.version;if(!(!r||!cde(r)))return(n=sB[iB])===null||n===void 0?void 0:n[e]}function Am(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${lg}.`);let n=sB[iB];n&&delete n[e]}var XYe,iB,sB,By=O(()=>{A();z$();lde();XYe=lg.split(".")[0],iB=Symbol.for(`opentelemetry.js.api.${XYe}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function aB(e,t,n){let r=xl("diag");if(r)return r[e](t,...n)}var dM,dde=O(()=>{A();By();dM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return aB("debug",this._namespace,t)}error(...t){return aB("error",this._namespace,t)}info(...t){return aB("info",this._namespace,t)}warn(...t){return aB("warn",this._namespace,t)}verbose(...t){return aB("verbose",this._namespace,t)}}});var ys,pM=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"})(ys||(ys={}))});function pde(e,t){e<ys.NONE?e=ys.NONE:e>ys.ALL&&(e=ys.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",ys.ERROR),warn:n("warn",ys.WARN),info:n("info",ys.INFO),debug:n("debug",ys.DEBUG),verbose:n("verbose",ys.VERBOSE)}}var fde=O(()=>{A();pM()});var eKe,qs,Ny=O(()=>{A();dde();fde();pM();By();eKe="diag",qs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=xl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:ys.INFO})=>{var s,c,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let f=xl("diag"),h=pde((c=i.logLevel)!==null&&c!==void 0?c:ys.INFO,o);if(f&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return mm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Am(eKe,n)},n.createComponentLogger=o=>new dM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var fM,mde=O(()=>{A();fM=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 Ade,gde=O(()=>{A();Ade=Symbol("BaggageEntryMetadata")});function hde(e={}){return new fM(new Map(Object.entries(e)))}function _de(e){return typeof e!="string"&&(tKe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ade,toString(){return e}}}var tKe,j$=O(()=>{A();Ny();mde();gde();tKe=qs.instance()});function Dl(e){return Symbol.for(e)}var H$,Wb,uB=O(()=>{A();H$=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}}},Wb=new H$});var $$,q$,mM,Ede=O(()=>{A();$$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],q$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(q$[t]=console[t])}mM=class{constructor(){function t(n){return function(...r){let o=q$[n];if(typeof o!="function"&&(o=q$.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<$$.length;n++)this[$$[n].n]=t($$[n].c)}}});function yde(){return t9}var V$,Xb,Y$,K$,J$,Z$,cB,W$,X$,e9,t9,nKe,rKe,oKe,iKe,sKe,aKe,uKe,n9=O(()=>{A();V$=class{constructor(){}createGauge(t,n){return rKe}createHistogram(t,n){return oKe}createCounter(t,n){return nKe}createUpDownCounter(t,n){return iKe}createObservableGauge(t,n){return aKe}createObservableCounter(t,n){return sKe}createObservableUpDownCounter(t,n){return uKe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},Xb=class{},Y$=class extends Xb{add(t,n){}},K$=class extends Xb{add(t,n){}},J$=class extends Xb{record(t,n){}},Z$=class extends Xb{record(t,n){}},cB=class{addCallback(t){}removeCallback(t){}},W$=class extends cB{},X$=class extends cB{},e9=class extends cB{},t9=new V$,nKe=new Y$,rKe=new J$,oKe=new Z$,iKe=new K$,sKe=new W$,aKe=new X$,uKe=new e9});var AM,Sde=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(AM||(AM={}))});var gM,hM,r9=O(()=>{A();gM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},hM={set(e,t,n){e!=null&&(e[t]=n)}}});var _M,Tde=O(()=>{A();uB();_M=class{active(){return Wb}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var o9,cKe,gm,lB=O(()=>{A();Tde();By();Ny();o9="context",cKe=new _M,gm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return mm(o9,t,qs.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 xl(o9)||cKe}disable(){this._getContextManager().disable(),Am(o9,qs.instance())}}});var Ja,i9=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ja||(Ja={}))});var dB,Oy,EM,yM=O(()=>{A();i9();dB="0000000000000000",Oy="00000000000000000000000000000000",EM={traceId:Oy,spanId:dB,traceFlags:Ja.NONE}});var hm,SM=O(()=>{A();yM();hm=class{constructor(t=EM){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 TM(e){return e.getValue(s9)||void 0}function Ide(){return TM(gm.getInstance().active())}function pB(e,t){return e.setValue(s9,t)}function bde(e){return e.deleteValue(s9)}function Cde(e,t){return pB(e,new hm(t))}function IM(e){var t;return(t=TM(e))===null||t===void 0?void 0:t.spanContext()}var s9,a9=O(()=>{A();uB();SM();lB();s9=Dl("OpenTelemetry Context Key SPAN")});function vde(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(bM[e.charCodeAt(r)]|0)+(bM[e.charCodeAt(r+1)]|0)+(bM[e.charCodeAt(r+2)]|0)+(bM[e.charCodeAt(r+3)]|0);return n===t}function u9(e){return vde(e,32)&&e!==Oy}function c9(e){return vde(e,16)&&e!==dB}function dg(e){return u9(e.traceId)&&c9(e.spanId)}function Rde(e){return new hm(e)}var bM,CM=O(()=>{A();yM();SM();bM=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 lKe(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 l9,eC,d9=O(()=>{A();lB();a9();SM();CM();l9=gm.getInstance(),eC=class{startSpan(t,n,r=l9.active()){if(!!n?.root)return new hm;let i=r&&IM(r);return lKe(i)&&dg(i)?new hm(i):new hm}startActiveSpan(t,n,r,o){let i,s,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,s=r,c=o);let l=s??l9.active(),f=this.startSpan(t,i,l),h=pB(l,f);return l9.with(h,c,void 0,f)}}});var dKe,tC,p9=O(()=>{A();d9();dKe=new eC,tC=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):dKe}}});var vM,xde=O(()=>{A();d9();vM=class{getTracer(t,n,r){return new eC}}});var pKe,wy,f9=O(()=>{A();p9();xde();pKe=new vM,wy=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new tC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:pKe}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 RM,Dde=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"})(RM||(RM={}))});var co,Bde=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(co||(co={}))});var di,Nde=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(di||(di={}))});function Ode(e){return AKe.test(e)}function wde(e){return gKe.test(e)&&!hKe.test(e)}var m9,fKe,mKe,AKe,gKe,hKe,kde=O(()=>{A();m9="[_0-9a-z-*/]",fKe=`[a-z]${m9}{0,255}`,mKe=`[a-z0-9]${m9}{0,240}@[a-z]${m9}{0,13}`,AKe=new RegExp(`^(?:${fKe}|${mKe})$`),gKe=/^[ -~]{0,255}[!-~]$/,hKe=/,|=/});var Pde,_Ke,Mde,Lde,xM,Ude=O(()=>{A();kde();Pde=32,_Ke=512,Mde=",",Lde="=",xM=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+Lde+this.get(n)),t),[]).join(Mde)}_parse(t){t.length>_Ke||(this._internalState=t.split(Mde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Lde);if(i!==-1){let s=o.slice(0,i),c=o.slice(i+1,r.length);Ode(s)&&wde(c)&&n.set(s,c)}return n},new Map),this._internalState.size>Pde&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Pde))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Qde(e){return new xM(e)}var Fde=O(()=>{A();Ude()});var Ke,Gde=O(()=>{A();lB();Ke=gm.getInstance()});var Bl,zde=O(()=>{A();Ny();Bl=qs.instance()});var A9,jde,Hde=O(()=>{A();n9();A9=class{getMeter(t,n,r){return t9}},jde=new A9});var g9,DM,$de=O(()=>{A();Hde();By();Ny();g9="metrics",DM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return mm(g9,t,qs.instance())}getMeterProvider(){return xl(g9)||jde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Am(g9,qs.instance())}}});var h9,qde=O(()=>{A();$de();h9=DM.getInstance()});var BM,Vde=O(()=>{A();BM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function E9(e){return e.getValue(_9)||void 0}function Yde(){return E9(gm.getInstance().active())}function Kde(e,t){return e.setValue(_9,t)}function Jde(e){return e.deleteValue(_9)}var _9,Zde=O(()=>{A();lB();uB();_9=Dl("OpenTelemetry Baggage Key")});var y9,EKe,NM,Wde=O(()=>{A();By();Vde();r9();Zde();j$();Ny();y9="propagation",EKe=new BM,NM=class e{constructor(){this.createBaggage=hde,this.getBaggage=E9,this.getActiveBaggage=Yde,this.setBaggage=Kde,this.deleteBaggage=Jde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return mm(y9,t,qs.instance())}inject(t,n,r=hM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=gM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Am(y9,qs.instance())}_getGlobalPropagator(){return xl(y9)||EKe}}});var ef,Xde=O(()=>{A();Wde();ef=NM.getInstance()});var S9,OM,epe=O(()=>{A();By();f9();CM();a9();Ny();S9="trace",OM=class e{constructor(){this._proxyTracerProvider=new wy,this.wrapSpanContext=Rde,this.isSpanContextValid=dg,this.deleteSpan=bde,this.getSpan=TM,this.getActiveSpan=Ide,this.getSpanContext=IM,this.setSpan=pB,this.setSpanContext=Cde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=mm(S9,this._proxyTracerProvider,qs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return xl(S9)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Am(S9,qs.instance()),this._proxyTracerProvider=new wy}}});var $t,tpe=O(()=>{A();epe();$t=OM.getInstance()});var We={};$s(We,{DiagConsoleLogger:()=>mM,DiagLogLevel:()=>ys,INVALID_SPANID:()=>dB,INVALID_SPAN_CONTEXT:()=>EM,INVALID_TRACEID:()=>Oy,ProxyTracer:()=>tC,ProxyTracerProvider:()=>wy,ROOT_CONTEXT:()=>Wb,SamplingDecision:()=>RM,SpanKind:()=>co,SpanStatusCode:()=>di,TraceFlags:()=>Ja,ValueType:()=>AM,baggageEntryMetadataFromString:()=>_de,context:()=>Ke,createContextKey:()=>Dl,createNoopMeter:()=>yde,createTraceState:()=>Qde,default:()=>yKe,defaultTextMapGetter:()=>gM,defaultTextMapSetter:()=>hM,diag:()=>Bl,isSpanContextValid:()=>dg,isValidSpanId:()=>c9,isValidTraceId:()=>u9,metrics:()=>h9,propagation:()=>ef,trace:()=>$t});var yKe,ze=O(()=>{A();j$();uB();Ede();pM();n9();Sde();r9();p9();f9();Dde();Bde();Nde();i9();Fde();CM();yM();Gde();zde();qde();Xde();tpe();yKe={context:Ke,diag:Bl,metrics:h9,propagation:ef,trace:$t}});var fB=F(u_=>{"use strict";A();Object.defineProperty(u_,"__esModule",{value:!0});u_.isTracingSuppressed=u_.unsuppressTracing=u_.suppressTracing=void 0;var SKe=(ze(),Me(We)),T9=(0,SKe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function TKe(e){return e.setValue(T9,!0)}u_.suppressTracing=TKe;function IKe(e){return e.deleteValue(T9)}u_.unsuppressTracing=IKe;function bKe(e){return e.getValue(T9)===!0}u_.isTracingSuppressed=bKe});var I9=F(Za=>{"use strict";A();Object.defineProperty(Za,"__esModule",{value:!0});Za.BAGGAGE_MAX_TOTAL_LENGTH=Za.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Za.BAGGAGE_MAX_NAME_VALUE_PAIRS=Za.BAGGAGE_HEADER=Za.BAGGAGE_ITEMS_SEPARATOR=Za.BAGGAGE_PROPERTIES_SEPARATOR=Za.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Za.BAGGAGE_KEY_PAIR_SEPARATOR="=";Za.BAGGAGE_PROPERTIES_SEPARATOR=";";Za.BAGGAGE_ITEMS_SEPARATOR=",";Za.BAGGAGE_HEADER="baggage";Za.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Za.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Za.BAGGAGE_MAX_TOTAL_LENGTH=8192});var C9=F(kd=>{"use strict";A();Object.defineProperty(kd,"__esModule",{value:!0});kd.parseKeyPairsIntoRecord=kd.parseBaggageHeaderString=kd.parsePairKeyValue=kd.getKeyPairs=kd.serializeKeyPairs=void 0;var CKe=(ze(),Me(We)),_m=I9();function vKe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?_m.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>_m.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}kd.serializeKeyPairs=vKe;function RKe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=_m.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}kd.getKeyPairs=RKe;function b9(e){if(!e)return;let t=e.indexOf(_m.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(_m.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,c;try{s=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,CKe.baggageEntryMetadataFromString)(f)}return{key:s,value:c,metadata:l}}kd.parsePairKeyValue=b9;function xKe(e,t,n,r){let o=0;for(;o<e.length&&n<_m.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(_m.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,c=s-o;if(c<=_m.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=b9(e.substring(o,s));if(l){let f=(n===0?0:1)+c;if(r+f>_m.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}kd.parseBaggageHeaderString=xKe;function DKe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(_m.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=b9(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}kd.parseKeyPairsIntoRecord=DKe});var npe=F(kM=>{"use strict";A();Object.defineProperty(kM,"__esModule",{value:!0});kM.W3CBaggagePropagator=void 0;var v9=(ze(),Me(We)),BKe=fB(),mB=I9(),wM=C9(),R9=class{inject(t,n,r){let o=v9.propagation.getBaggage(t);if(!o||(0,BKe.isTracingSuppressed)(t))return;let i=(0,wM.getKeyPairs)(o).filter(c=>c.length<=mB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,mB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,wM.serializeKeyPairs)(i);s.length>0&&r.set(n,mB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,mB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,c=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,c]=(0,wM.parseBaggageHeaderString)(o[l],i,s,c);else[s]=(0,wM.parseBaggageHeaderString)(o,i,s,c);return s===0?t:v9.propagation.setBaggage(t,v9.propagation.createBaggage(i))}fields(){return[mB.BAGGAGE_HEADER]}};kM.W3CBaggagePropagator=R9});var rpe=F(PM=>{"use strict";A();Object.defineProperty(PM,"__esModule",{value:!0});PM.AnchoredClock=void 0;var x9=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}};PM.AnchoredClock=x9});var upe=F(c_=>{"use strict";A();Object.defineProperty(c_,"__esModule",{value:!0});c_.isAttributeValue=c_.isAttributeKey=c_.sanitizeAttributes=void 0;var ope=(ze(),Me(We));function NKe(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(!ipe(n)){ope.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!spe(r)){ope.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}c_.sanitizeAttributes=NKe;function ipe(e){return typeof e=="string"&&e!==""}c_.isAttributeKey=ipe;function spe(e){return e==null?!0:Array.isArray(e)?OKe(e):ape(typeof e)}c_.isAttributeValue=spe;function OKe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(ape(r)){t=r;continue}return!1}return!1}}return!0}function ape(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var D9=F(MM=>{"use strict";A();Object.defineProperty(MM,"__esModule",{value:!0});MM.loggingErrorHandler=void 0;var wKe=(ze(),Me(We));function kKe(){return e=>{wKe.diag.error(PKe(e))}}MM.loggingErrorHandler=kKe;function PKe(e){return typeof e=="string"?e:JSON.stringify(MKe(e))}function MKe(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 lpe=F(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.globalErrorHandler=nC.setGlobalErrorHandler=void 0;var LKe=D9(),cpe=(0,LKe.loggingErrorHandler)();function UKe(e){cpe=e}nC.setGlobalErrorHandler=UKe;function QKe(e){try{cpe(e)}catch{}}nC.globalErrorHandler=QKe});var mpe=F(Em=>{"use strict";A();Object.defineProperty(Em,"__esModule",{value:!0});Em.getStringListFromEnv=Em.getBooleanFromEnv=Em.getStringFromEnv=Em.getNumberFromEnv=void 0;var dpe=(ze(),Me(We)),ppe=Fe("util");function FKe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){dpe.diag.warn(`Unknown value ${(0,ppe.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Em.getNumberFromEnv=FKe;function fpe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Em.getStringFromEnv=fpe;function GKe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||dpe.diag.warn(`Unknown value ${(0,ppe.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Em.getBooleanFromEnv=GKe;function zKe(e){return fpe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Em.getStringListFromEnv=zKe});var Ape=F(LM=>{"use strict";A();Object.defineProperty(LM,"__esModule",{value:!0});LM._globalThis=void 0;LM._globalThis=globalThis});var gpe=F(UM=>{"use strict";A();Object.defineProperty(UM,"__esModule",{value:!0});UM.VERSION=void 0;UM.VERSION="2.8.0"});function Ni(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var B9=O(()=>{A()});var hpe,_pe,Epe,ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,sfe,afe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,sme,ame,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,jKe,N9,HKe,$Ke,qKe,VKe,O9,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,sJe,aJe,uJe,cJe,lJe,dJe,w9,pJe,fJe,mJe,AJe,gJe,hJe,_Je,EJe,yJe,SJe,TJe,IJe,k9,bJe,CJe,P9,M9,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,zJe,AB,rC,L9,jJe,HJe,ky,$Je,qJe,VJe,YJe,U9,Q9,KJe,F9,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,sZe,aZe,uZe,cZe,lZe,dZe,pZe,fZe,mZe,AZe,gZe,hZe,_Ze,G9,EZe,yZe,SZe,TZe,IZe,bZe,CZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,wZe,kZe,PZe,MZe,LZe,z9,UZe,j9,QZe,FZe,GZe,zZe,jZe,HZe,$Ze,qZe,VZe,Lme,Ume,Qme,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,sAe,aAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,sWe,aWe,uWe,cWe,lWe,dWe,pWe,fWe,mWe,AWe,gWe,hWe,_We,EWe,yWe,SWe,TWe,IWe,bWe,CWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,PWe,MWe,LWe,UWe,QWe,FWe,GWe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,zWe,jWe,HWe,$We,qWe,VWe,YWe,KWe,JWe,ZWe,WWe,XWe,GAe,zAe,jAe,HAe,$Ae,eXe,tXe,nXe,rXe,oXe,iXe,qAe,VAe,YAe,sXe,aXe,uXe,cXe,KAe,JAe,ZAe,WAe,lXe,dXe,pXe,fXe,mXe,XAe,ege,tge,nge,rge,oge,ige,AXe,gXe,hXe,_Xe,EXe,yXe,SXe,TXe,sge,age,uge,cge,lge,IXe,bXe,CXe,vXe,RXe,xXe,dge,pge,fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,zXe,jXe,HXe,$Xe,qXe,VXe,YXe,KXe,JXe,Oge,wge,kge,Pge,Mge,ZXe,WXe,XXe,eet,tet,net,Lge,Uge,ret,oet,iet,Qge,Fge,set,aet,uet,Gge,zge,jge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,cet,det,pet,fet,met,Aet,get,het,_et,Eet,yet,Tet,Iet,bet,Cet,vet,Ret,xet,ohe,ihe,Det,Bet,Net,she=O(()=>{A();B9();hpe="aws.lambda.invoked_arn",_pe="db.system",Epe="db.connection_string",ype="db.user",Spe="db.jdbc.driver_classname",Tpe="db.name",Ipe="db.statement",bpe="db.operation",Cpe="db.mssql.instance_name",vpe="db.cassandra.keyspace",Rpe="db.cassandra.page_size",xpe="db.cassandra.consistency_level",Dpe="db.cassandra.table",Bpe="db.cassandra.idempotence",Npe="db.cassandra.speculative_execution_count",Ope="db.cassandra.coordinator.id",wpe="db.cassandra.coordinator.dc",kpe="db.hbase.namespace",Ppe="db.redis.database_index",Mpe="db.mongodb.collection",Lpe="db.sql.table",Upe="exception.type",Qpe="exception.message",Fpe="exception.stacktrace",Gpe="exception.escaped",zpe="faas.trigger",jpe="faas.execution",Hpe="faas.document.collection",$pe="faas.document.operation",qpe="faas.document.time",Vpe="faas.document.name",Ype="faas.time",Kpe="faas.cron",Jpe="faas.coldstart",Zpe="faas.invoked_name",Wpe="faas.invoked_provider",Xpe="faas.invoked_region",efe="net.transport",tfe="net.peer.ip",nfe="net.peer.port",rfe="net.peer.name",ofe="net.host.ip",ife="net.host.port",sfe="net.host.name",afe="net.host.connection.type",ufe="net.host.connection.subtype",cfe="net.host.carrier.name",lfe="net.host.carrier.mcc",dfe="net.host.carrier.mnc",pfe="net.host.carrier.icc",ffe="peer.service",mfe="enduser.id",Afe="enduser.role",gfe="enduser.scope",hfe="thread.id",_fe="thread.name",Efe="code.function",yfe="code.namespace",Sfe="code.filepath",Tfe="code.lineno",Ife="http.method",bfe="http.url",Cfe="http.target",vfe="http.host",Rfe="http.scheme",xfe="http.status_code",Dfe="http.flavor",Bfe="http.user_agent",Nfe="http.request_content_length",Ofe="http.request_content_length_uncompressed",wfe="http.response_content_length",kfe="http.response_content_length_uncompressed",Pfe="http.server_name",Mfe="http.route",Lfe="http.client_ip",Ufe="aws.dynamodb.table_names",Qfe="aws.dynamodb.consumed_capacity",Ffe="aws.dynamodb.item_collection_metrics",Gfe="aws.dynamodb.provisioned_read_capacity",zfe="aws.dynamodb.provisioned_write_capacity",jfe="aws.dynamodb.consistent_read",Hfe="aws.dynamodb.projection",$fe="aws.dynamodb.limit",qfe="aws.dynamodb.attributes_to_get",Vfe="aws.dynamodb.index_name",Yfe="aws.dynamodb.select",Kfe="aws.dynamodb.global_secondary_indexes",Jfe="aws.dynamodb.local_secondary_indexes",Zfe="aws.dynamodb.exclusive_start_table",Wfe="aws.dynamodb.table_count",Xfe="aws.dynamodb.scan_forward",eme="aws.dynamodb.segment",tme="aws.dynamodb.total_segments",nme="aws.dynamodb.count",rme="aws.dynamodb.scanned_count",ome="aws.dynamodb.attribute_definitions",ime="aws.dynamodb.global_secondary_index_updates",sme="messaging.system",ame="messaging.destination",ume="messaging.destination_kind",cme="messaging.temp_destination",lme="messaging.protocol",dme="messaging.protocol_version",pme="messaging.url",fme="messaging.message_id",mme="messaging.conversation_id",Ame="messaging.message_payload_size_bytes",gme="messaging.message_payload_compressed_size_bytes",hme="messaging.operation",_me="messaging.consumer_id",Eme="messaging.rabbitmq.routing_key",yme="messaging.kafka.message_key",Sme="messaging.kafka.consumer_group",Tme="messaging.kafka.client_id",Ime="messaging.kafka.partition",bme="messaging.kafka.tombstone",Cme="rpc.system",vme="rpc.service",Rme="rpc.method",xme="rpc.grpc.status_code",Dme="rpc.jsonrpc.version",Bme="rpc.jsonrpc.request_id",Nme="rpc.jsonrpc.error_code",Ome="rpc.jsonrpc.error_message",wme="message.type",kme="message.id",Pme="message.compressed_size",Mme="message.uncompressed_size",jKe=hpe,N9=_pe,HKe=Epe,$Ke=ype,qKe=Spe,VKe=Tpe,O9=Ipe,YKe=bpe,KKe=Cpe,JKe=vpe,ZKe=Rpe,WKe=xpe,XKe=Dpe,eJe=Bpe,tJe=Npe,nJe=Ope,rJe=wpe,oJe=kpe,iJe=Ppe,sJe=Mpe,aJe=Lpe,uJe=Upe,cJe=Qpe,lJe=Fpe,dJe=Gpe,w9=zpe,pJe=jpe,fJe=Hpe,mJe=$pe,AJe=qpe,gJe=Vpe,hJe=Ype,_Je=Kpe,EJe=Jpe,yJe=Zpe,SJe=Wpe,TJe=Xpe,IJe=efe,k9=tfe,bJe=nfe,CJe=rfe,P9=ofe,M9=ife,vJe=sfe,RJe=afe,xJe=ufe,DJe=cfe,BJe=lfe,NJe=dfe,OJe=pfe,wJe=ffe,kJe=mfe,PJe=Afe,MJe=gfe,LJe=hfe,UJe=_fe,QJe=Efe,FJe=yfe,GJe=Sfe,zJe=Tfe,AB=Ife,rC=bfe,L9=Cfe,jJe=vfe,HJe=Rfe,ky=xfe,$Je=Dfe,qJe=Bfe,VJe=Nfe,YJe=Ofe,U9=wfe,Q9=kfe,KJe=Pfe,F9=Mfe,JJe=Lfe,ZJe=Ufe,WJe=Qfe,XJe=Ffe,eZe=Gfe,tZe=zfe,nZe=jfe,rZe=Hfe,oZe=$fe,iZe=qfe,sZe=Vfe,aZe=Yfe,uZe=Kfe,cZe=Jfe,lZe=Zfe,dZe=Wfe,pZe=Xfe,fZe=eme,mZe=tme,AZe=nme,gZe=rme,hZe=ome,_Ze=ime,G9=sme,EZe=ame,yZe=ume,SZe=cme,TZe=lme,IZe=dme,bZe=pme,CZe=fme,vZe=mme,RZe=Ame,xZe=gme,DZe=hme,BZe=_me,NZe=Eme,OZe=yme,wZe=Sme,kZe=Tme,PZe=Ime,MZe=bme,LZe=Cme,z9=vme,UZe=Rme,j9=xme,QZe=Dme,FZe=Bme,GZe=Nme,zZe=Ome,jZe=wme,HZe=kme,$Ze=Pme,qZe=Mme,VZe=Ni([hpe,_pe,Epe,ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,sfe,afe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,sme,ame,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme]),Lme="other_sql",Ume="mssql",Qme="mysql",Fme="oracle",Gme="db2",zme="postgresql",jme="redshift",Hme="hive",$me="cloudscape",qme="hsqldb",Vme="progress",Yme="maxdb",Kme="hanadb",Jme="ingres",Zme="firstsql",Wme="edb",Xme="cache",eAe="adabas",tAe="firebird",nAe="derby",rAe="filemaker",oAe="informix",iAe="instantdb",sAe="interbase",aAe="mariadb",uAe="netezza",cAe="pervasive",lAe="pointbase",dAe="sqlite",pAe="sybase",fAe="teradata",mAe="vertica",AAe="h2",gAe="coldfusion",hAe="cassandra",_Ae="hbase",EAe="mongodb",yAe="redis",SAe="couchbase",TAe="couchdb",IAe="cosmosdb",bAe="dynamodb",CAe="neo4j",vAe="geode",RAe="elasticsearch",xAe="memcached",DAe="cockroachdb",YZe=Lme,KZe=Ume,JZe=Qme,ZZe=Fme,WZe=Gme,XZe=zme,eWe=jme,tWe=Hme,nWe=$me,rWe=qme,oWe=Vme,iWe=Yme,sWe=Kme,aWe=Jme,uWe=Zme,cWe=Wme,lWe=Xme,dWe=eAe,pWe=tAe,fWe=nAe,mWe=rAe,AWe=oAe,gWe=iAe,hWe=sAe,_We=aAe,EWe=uAe,yWe=cAe,SWe=lAe,TWe=dAe,IWe=pAe,bWe=fAe,CWe=mAe,vWe=AAe,RWe=gAe,xWe=hAe,DWe=_Ae,BWe=EAe,NWe=yAe,OWe=SAe,wWe=TAe,kWe=IAe,PWe=bAe,MWe=CAe,LWe=vAe,UWe=RAe,QWe=xAe,FWe=DAe,GWe=Ni([Lme,Ume,Qme,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,sAe,aAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe]),BAe="all",NAe="each_quorum",OAe="quorum",wAe="local_quorum",kAe="one",PAe="two",MAe="three",LAe="local_one",UAe="any",QAe="serial",FAe="local_serial",zWe=BAe,jWe=NAe,HWe=OAe,$We=wAe,qWe=kAe,VWe=PAe,YWe=MAe,KWe=LAe,JWe=UAe,ZWe=QAe,WWe=FAe,XWe=Ni([BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe]),GAe="datasource",zAe="http",jAe="pubsub",HAe="timer",$Ae="other",eXe=GAe,tXe=zAe,nXe=jAe,rXe=HAe,oXe=$Ae,iXe=Ni([GAe,zAe,jAe,HAe,$Ae]),qAe="insert",VAe="edit",YAe="delete",sXe=qAe,aXe=VAe,uXe=YAe,cXe=Ni([qAe,VAe,YAe]),KAe="alibaba_cloud",JAe="aws",ZAe="azure",WAe="gcp",lXe=KAe,dXe=JAe,pXe=ZAe,fXe=WAe,mXe=Ni([KAe,JAe,ZAe,WAe]),XAe="ip_tcp",ege="ip_udp",tge="ip",nge="unix",rge="pipe",oge="inproc",ige="other",AXe=XAe,gXe=ege,hXe=tge,_Xe=nge,EXe=rge,yXe=oge,SXe=ige,TXe=Ni([XAe,ege,tge,nge,rge,oge,ige]),sge="wifi",age="wired",uge="cell",cge="unavailable",lge="unknown",IXe=sge,bXe=age,CXe=uge,vXe=cge,RXe=lge,xXe=Ni([sge,age,uge,cge,lge]),dge="gprs",pge="edge",fge="umts",mge="cdma",Age="evdo_0",gge="evdo_a",hge="cdma2000_1xrtt",_ge="hsdpa",Ege="hsupa",yge="hspa",Sge="iden",Tge="evdo_b",Ige="lte",bge="ehrpd",Cge="hspap",vge="gsm",Rge="td_scdma",xge="iwlan",Dge="nr",Bge="nrnsa",Nge="lte_ca",DXe=dge,BXe=pge,NXe=fge,OXe=mge,wXe=Age,kXe=gge,PXe=hge,MXe=_ge,LXe=Ege,UXe=yge,QXe=Sge,FXe=Tge,GXe=Ige,zXe=bge,jXe=Cge,HXe=vge,$Xe=Rge,qXe=xge,VXe=Dge,YXe=Bge,KXe=Nge,JXe=Ni([dge,pge,fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge]),Oge="1.0",wge="1.1",kge="2.0",Pge="SPDY",Mge="QUIC",ZXe=Oge,WXe=wge,XXe=kge,eet=Pge,tet=Mge,net={HTTP_1_0:Oge,HTTP_1_1:wge,HTTP_2_0:kge,SPDY:Pge,QUIC:Mge},Lge="queue",Uge="topic",ret=Lge,oet=Uge,iet=Ni([Lge,Uge]),Qge="receive",Fge="process",set=Qge,aet=Fge,uet=Ni([Qge,Fge]),Gge=0,zge=1,jge=2,Hge=3,$ge=4,qge=5,Vge=6,Yge=7,Kge=8,Jge=9,Zge=10,Wge=11,Xge=12,ehe=13,the=14,nhe=15,rhe=16,cet=Gge,det=zge,pet=jge,fet=Hge,met=$ge,Aet=qge,get=Vge,het=Yge,_et=Kge,Eet=Jge,yet=Zge,Tet=Wge,Iet=Xge,bet=ehe,Cet=the,vet=nhe,Ret=rhe,xet={OK:Gge,CANCELLED:zge,UNKNOWN:jge,INVALID_ARGUMENT:Hge,DEADLINE_EXCEEDED:$ge,NOT_FOUND:qge,ALREADY_EXISTS:Vge,PERMISSION_DENIED:Yge,RESOURCE_EXHAUSTED:Kge,FAILED_PRECONDITION:Jge,ABORTED:Zge,OUT_OF_RANGE:Wge,UNIMPLEMENTED:Xge,INTERNAL:ehe,UNAVAILABLE:the,DATA_LOSS:nhe,UNAUTHENTICATED:rhe},ohe="SENT",ihe="RECEIVED",Det=ohe,Bet=ihe,Net=Ni([ohe,ihe])});var ahe=O(()=>{A();she()});var uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,w_e,k_e,Oet,wet,ket,Pet,Met,Let,Uet,Qet,Fet,Get,zet,jet,Het,$et,qet,Vet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,stt,att,utt,ctt,ltt,dtt,ptt,ftt,mtt,Att,gtt,htt,_tt,Ett,ytt,Stt,Ttt,Itt,btt,Ctt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,ztt,jtt,Htt,$tt,qtt,Vtt,Ytt,H9,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,P_e,M_e,L_e,U_e,int,snt,ant,unt,cnt,Q_e,F_e,G_e,z_e,j_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,lnt,dnt,pnt,fnt,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,Int,bnt,Cnt,vnt,Rnt,nEe,rEe,xnt,Dnt,Bnt,oEe,iEe,sEe,aEe,uEe,cEe,lEe,Nnt,Ont,wnt,knt,Pnt,Mnt,Lnt,Unt,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,Qnt,Fnt,Gnt,znt,jnt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,TEe,IEe,bEe,CEe,vEe,REe,xEe,DEe,BEe,NEe,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,OEe=O(()=>{A();B9();uhe="cloud.provider",che="cloud.account.id",lhe="cloud.region",dhe="cloud.availability_zone",phe="cloud.platform",fhe="aws.ecs.container.arn",mhe="aws.ecs.cluster.arn",Ahe="aws.ecs.launchtype",ghe="aws.ecs.task.arn",hhe="aws.ecs.task.family",_he="aws.ecs.task.revision",Ehe="aws.eks.cluster.arn",yhe="aws.log.group.names",She="aws.log.group.arns",The="aws.log.stream.names",Ihe="aws.log.stream.arns",bhe="container.name",Che="container.id",vhe="container.runtime",Rhe="container.image.name",xhe="container.image.tag",Dhe="deployment.environment",Bhe="device.id",Nhe="device.model.identifier",Ohe="device.model.name",whe="faas.name",khe="faas.id",Phe="faas.version",Mhe="faas.instance",Lhe="faas.max_memory",Uhe="host.id",Qhe="host.name",Fhe="host.type",Ghe="host.arch",zhe="host.image.name",jhe="host.image.id",Hhe="host.image.version",$he="k8s.cluster.name",qhe="k8s.node.name",Vhe="k8s.node.uid",Yhe="k8s.namespace.name",Khe="k8s.pod.uid",Jhe="k8s.pod.name",Zhe="k8s.container.name",Whe="k8s.replicaset.uid",Xhe="k8s.replicaset.name",e_e="k8s.deployment.uid",t_e="k8s.deployment.name",n_e="k8s.statefulset.uid",r_e="k8s.statefulset.name",o_e="k8s.daemonset.uid",i_e="k8s.daemonset.name",s_e="k8s.job.uid",a_e="k8s.job.name",u_e="k8s.cronjob.uid",c_e="k8s.cronjob.name",l_e="os.type",d_e="os.description",p_e="os.name",f_e="os.version",m_e="process.pid",A_e="process.executable.name",g_e="process.executable.path",h_e="process.command",__e="process.command_line",E_e="process.command_args",y_e="process.owner",S_e="process.runtime.name",T_e="process.runtime.version",I_e="process.runtime.description",b_e="service.name",C_e="service.namespace",v_e="service.instance.id",R_e="service.version",x_e="telemetry.sdk.name",D_e="telemetry.sdk.language",B_e="telemetry.sdk.version",N_e="telemetry.auto.version",O_e="webengine.name",w_e="webengine.version",k_e="webengine.description",Oet=uhe,wet=che,ket=lhe,Pet=dhe,Met=phe,Let=fhe,Uet=mhe,Qet=Ahe,Fet=ghe,Get=hhe,zet=_he,jet=Ehe,Het=yhe,$et=She,qet=The,Vet=Ihe,Yet=bhe,Ket=Che,Jet=vhe,Zet=Rhe,Wet=xhe,Xet=Dhe,ett=Bhe,ttt=Nhe,ntt=Ohe,rtt=whe,ott=khe,itt=Phe,stt=Mhe,att=Lhe,utt=Uhe,ctt=Qhe,ltt=Fhe,dtt=Ghe,ptt=zhe,ftt=jhe,mtt=Hhe,Att=$he,gtt=qhe,htt=Vhe,_tt=Yhe,Ett=Khe,ytt=Jhe,Stt=Zhe,Ttt=Whe,Itt=Xhe,btt=e_e,Ctt=t_e,vtt=n_e,Rtt=r_e,xtt=o_e,Dtt=i_e,Btt=s_e,Ntt=a_e,Ott=u_e,wtt=c_e,ktt=l_e,Ptt=d_e,Mtt=p_e,Ltt=f_e,Utt=m_e,Qtt=A_e,Ftt=g_e,Gtt=h_e,ztt=__e,jtt=E_e,Htt=y_e,$tt=S_e,qtt=T_e,Vtt=I_e,Ytt=b_e,H9=C_e,Ktt=v_e,Jtt=R_e,Ztt=x_e,Wtt=D_e,Xtt=B_e,ent=N_e,tnt=O_e,nnt=w_e,rnt=k_e,ont=Ni([uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,w_e,k_e]),P_e="alibaba_cloud",M_e="aws",L_e="azure",U_e="gcp",int=P_e,snt=M_e,ant=L_e,unt=U_e,cnt=Ni([P_e,M_e,L_e,U_e]),Q_e="alibaba_cloud_ecs",F_e="alibaba_cloud_fc",G_e="aws_ec2",z_e="aws_ecs",j_e="aws_eks",H_e="aws_lambda",$_e="aws_elastic_beanstalk",q_e="azure_vm",V_e="azure_container_instances",Y_e="azure_aks",K_e="azure_functions",J_e="azure_app_service",Z_e="gcp_compute_engine",W_e="gcp_cloud_run",X_e="gcp_kubernetes_engine",eEe="gcp_cloud_functions",tEe="gcp_app_engine",lnt=Q_e,dnt=F_e,pnt=G_e,fnt=z_e,mnt=j_e,Ant=H_e,gnt=$_e,hnt=q_e,_nt=V_e,Ent=Y_e,ynt=K_e,Snt=J_e,Tnt=Z_e,Int=W_e,bnt=X_e,Cnt=eEe,vnt=tEe,Rnt=Ni([Q_e,F_e,G_e,z_e,j_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe]),nEe="ec2",rEe="fargate",xnt=nEe,Dnt=rEe,Bnt=Ni([nEe,rEe]),oEe="amd64",iEe="arm32",sEe="arm64",aEe="ia64",uEe="ppc32",cEe="ppc64",lEe="x86",Nnt=oEe,Ont=iEe,wnt=sEe,knt=aEe,Pnt=uEe,Mnt=cEe,Lnt=lEe,Unt=Ni([oEe,iEe,sEe,aEe,uEe,cEe,lEe]),dEe="windows",pEe="linux",fEe="darwin",mEe="freebsd",AEe="netbsd",gEe="openbsd",hEe="dragonflybsd",_Ee="hpux",EEe="aix",yEe="solaris",SEe="z_os",Qnt=dEe,Fnt=pEe,Gnt=fEe,znt=mEe,jnt=AEe,Hnt=gEe,$nt=hEe,qnt=_Ee,Vnt=EEe,Ynt=yEe,Knt=SEe,Jnt=Ni([dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe]),TEe="cpp",IEe="dotnet",bEe="erlang",CEe="go",vEe="java",REe="nodejs",xEe="php",DEe="python",BEe="ruby",NEe="webjs",Znt=TEe,Wnt=IEe,Xnt=bEe,ert=CEe,trt=vEe,nrt=REe,rrt=xEe,ort=DEe,irt=BEe,srt=NEe,art=Ni([TEe,IEe,bEe,CEe,vEe,REe,xEe,DEe,BEe,NEe])});var wEe=O(()=>{A();OEe()});var urt,crt,lrt,drt,prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,Irt,brt,Crt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,$9,q9,wrt,oC,krt,V9,Y9,Prt,Py,Mrt,Lrt,Urt,Qrt,Frt,Grt,zrt,jrt,lYt,dYt,K9,Hrt,$rt,qrt,Vrt,Yrt,Krt,My,Jrt,Zrt,Wrt,pYt,Xrt,eot,tot,not,fYt,rot,oot,iot,sot,pg,fg,aot,uot,cot,lot,dot,pot,fot,mot,Aot,mYt,got,hot,_ot,Eot,yot,Sot,J9,Z9,Tot,W9,X9,Iot,bot,AYt,gYt,Cot,vot,Rot,xot,Dot,Bot,Not,Oot,hYt,wot,e5,t5,kot,n5,Pot,r5,Mot,Lot,Uot,Qot,Fot,Got,zot,jot,Hot,_Yt,$ot,qot,EYt,Vot,Yot,yYt,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,l_,rit,oit,iit,o5,kEe=O(()=>{A();urt="aspnetcore.diagnostics.exception.result",crt="aborted",lrt="handled",drt="skipped",prt="unhandled",frt="aspnetcore.diagnostics.handler.type",mrt="aspnetcore.rate_limiting.policy",Art="aspnetcore.rate_limiting.result",grt="acquired",hrt="endpoint_limiter",_rt="global_limiter",Ert="request_canceled",yrt="aspnetcore.request.is_unhandled",Srt="aspnetcore.routing.is_fallback",Trt="aspnetcore.routing.match_status",Irt="failure",brt="success",Crt="aspnetcore.user.is_authenticated",vrt="client.address",Rrt="client.port",xrt="code.column.number",Drt="code.file.path",Brt="code.function.name",Nrt="code.line.number",Ort="code.stacktrace",$9="db.collection.name",q9="db.namespace",wrt="db.operation.batch.size",oC="db.operation.name",krt="db.query.summary",V9="db.query.text",Y9="db.response.status_code",Prt="db.stored_procedure.name",Py="db.system.name",Mrt="mariadb",Lrt="microsoft.sql_server",Urt="mysql",Qrt="postgresql",Frt="dotnet.gc.heap.generation",Grt="gen0",zrt="gen1",jrt="gen2",lYt="loh",dYt="poh",K9="error.type",Hrt="_OTHER",$rt="exception.escaped",qrt="exception.message",Vrt="exception.stacktrace",Yrt="exception.type",Krt=e=>`http.request.header.${e}`,My="http.request.method",Jrt="_OTHER",Zrt="CONNECT",Wrt="DELETE",pYt="GET",Xrt="HEAD",eot="OPTIONS",tot="PATCH",not="POST",fYt="PUT",rot="TRACE",oot="http.request.method_original",iot="http.request.resend_count",sot=e=>`http.response.header.${e}`,pg="http.response.status_code",fg="http.route",aot="jvm.gc.action",uot="jvm.gc.name",cot="jvm.memory.pool.name",lot="jvm.memory.type",dot="heap",pot="non_heap",fot="jvm.thread.daemon",mot="jvm.thread.state",Aot="blocked",mYt="new",got="runnable",hot="terminated",_ot="timed_waiting",Eot="waiting",yot="network.local.address",Sot="network.local.port",J9="network.peer.address",Z9="network.peer.port",Tot="network.protocol.name",W9="network.protocol.version",X9="network.transport",Iot="pipe",bot="quic",AYt="tcp",gYt="udp",Cot="unix",vot="network.type",Rot="ipv4",xot="ipv6",Dot="otel.scope.name",Bot="otel.scope.version",Not="otel.status_code",Oot="ERROR",hYt="OK",wot="otel.status_description",e5="server.address",t5="server.port",kot="service.instance.id",n5="service.name",Pot="service.namespace",r5="service.version",Mot="signalr.connection.status",Lot="app_shutdown",Uot="normal_closure",Qot="timeout",Fot="signalr.transport",Got="long_polling",zot="server_sent_events",jot="web_sockets",Hot="telemetry.sdk.language",_Yt="cpp",$ot="dotnet",qot="erlang",EYt="go",Vot="java",Yot="nodejs",yYt="php",Kot="python",Jot="ruby",Zot="rust",Wot="swift",Xot="webjs",eit="telemetry.sdk.name",tit="telemetry.sdk.version",nit="url.fragment",l_="url.full",rit="url.path",oit="url.query",iit="url.scheme",o5="user_agent.original"});var sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,Iit,bit,Cit,vit,Rit,xit,Dit,Bit,Nit,Oit,wit,kit,Pit,Mit,Lit,Uit,Qit,Fit,Git,zit,jit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,PEe=O(()=>{A();sit="aspnetcore.diagnostics.exceptions",ait="aspnetcore.rate_limiting.active_request_leases",uit="aspnetcore.rate_limiting.queued_requests",cit="aspnetcore.rate_limiting.request.time_in_queue",lit="aspnetcore.rate_limiting.request_lease.duration",dit="aspnetcore.rate_limiting.requests",pit="aspnetcore.routing.match_attempts",fit="db.client.operation.duration",mit="dotnet.assembly.count",Ait="dotnet.exceptions",git="dotnet.gc.collections",hit="dotnet.gc.heap.total_allocated",_it="dotnet.gc.last_collection.heap.fragmentation.size",Eit="dotnet.gc.last_collection.heap.size",yit="dotnet.gc.last_collection.memory.committed_size",Sit="dotnet.gc.pause.time",Tit="dotnet.jit.compilation.time",Iit="dotnet.jit.compiled_il.size",bit="dotnet.jit.compiled_methods",Cit="dotnet.monitor.lock_contentions",vit="dotnet.process.cpu.count",Rit="dotnet.process.cpu.time",xit="dotnet.process.memory.working_set",Dit="dotnet.thread_pool.queue.length",Bit="dotnet.thread_pool.thread.count",Nit="dotnet.thread_pool.work_item.count",Oit="dotnet.timer.count",wit="http.client.request.duration",kit="http.server.request.duration",Pit="jvm.class.count",Mit="jvm.class.loaded",Lit="jvm.class.unloaded",Uit="jvm.cpu.count",Qit="jvm.cpu.recent_utilization",Fit="jvm.cpu.time",Git="jvm.gc.duration",zit="jvm.memory.committed",jit="jvm.memory.limit",Hit="jvm.memory.used",$it="jvm.memory.used_after_last_gc",qit="jvm.thread.count",Vit="kestrel.active_connections",Yit="kestrel.active_tls_handshakes",Kit="kestrel.connection.duration",Jit="kestrel.queued_connections",Zit="kestrel.queued_requests",Wit="kestrel.rejected_connections",Xit="kestrel.tls_handshake.duration",est="kestrel.upgraded_connections",tst="signalr.server.active_connections",nst="signalr.server.connection.duration"});var rst,MEe=O(()=>{A();rst="exception"});var Fr={};$s(Fr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>crt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>lrt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>drt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>prt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>grt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>hrt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>_rt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Ert,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Irt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>brt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>urt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>frt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>mrt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Art,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>yrt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Srt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Trt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Crt,ATTR_CLIENT_ADDRESS:()=>vrt,ATTR_CLIENT_PORT:()=>Rrt,ATTR_CODE_COLUMN_NUMBER:()=>xrt,ATTR_CODE_FILE_PATH:()=>Drt,ATTR_CODE_FUNCTION_NAME:()=>Brt,ATTR_CODE_LINE_NUMBER:()=>Nrt,ATTR_CODE_STACKTRACE:()=>Ort,ATTR_DB_COLLECTION_NAME:()=>$9,ATTR_DB_NAMESPACE:()=>q9,ATTR_DB_OPERATION_BATCH_SIZE:()=>wrt,ATTR_DB_OPERATION_NAME:()=>oC,ATTR_DB_QUERY_SUMMARY:()=>krt,ATTR_DB_QUERY_TEXT:()=>V9,ATTR_DB_RESPONSE_STATUS_CODE:()=>Y9,ATTR_DB_STORED_PROCEDURE_NAME:()=>Prt,ATTR_DB_SYSTEM_NAME:()=>Py,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Frt,ATTR_ERROR_TYPE:()=>K9,ATTR_EXCEPTION_ESCAPED:()=>$rt,ATTR_EXCEPTION_MESSAGE:()=>qrt,ATTR_EXCEPTION_STACKTRACE:()=>Vrt,ATTR_EXCEPTION_TYPE:()=>Yrt,ATTR_HTTP_REQUEST_HEADER:()=>Krt,ATTR_HTTP_REQUEST_METHOD:()=>My,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>oot,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>iot,ATTR_HTTP_RESPONSE_HEADER:()=>sot,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>pg,ATTR_HTTP_ROUTE:()=>fg,ATTR_JVM_GC_ACTION:()=>aot,ATTR_JVM_GC_NAME:()=>uot,ATTR_JVM_MEMORY_POOL_NAME:()=>cot,ATTR_JVM_MEMORY_TYPE:()=>lot,ATTR_JVM_THREAD_DAEMON:()=>fot,ATTR_JVM_THREAD_STATE:()=>mot,ATTR_NETWORK_LOCAL_ADDRESS:()=>yot,ATTR_NETWORK_LOCAL_PORT:()=>Sot,ATTR_NETWORK_PEER_ADDRESS:()=>J9,ATTR_NETWORK_PEER_PORT:()=>Z9,ATTR_NETWORK_PROTOCOL_NAME:()=>Tot,ATTR_NETWORK_PROTOCOL_VERSION:()=>W9,ATTR_NETWORK_TRANSPORT:()=>X9,ATTR_NETWORK_TYPE:()=>vot,ATTR_OTEL_SCOPE_NAME:()=>Dot,ATTR_OTEL_SCOPE_VERSION:()=>Bot,ATTR_OTEL_STATUS_CODE:()=>Not,ATTR_OTEL_STATUS_DESCRIPTION:()=>wot,ATTR_SERVER_ADDRESS:()=>e5,ATTR_SERVER_PORT:()=>t5,ATTR_SERVICE_INSTANCE_ID:()=>kot,ATTR_SERVICE_NAME:()=>n5,ATTR_SERVICE_NAMESPACE:()=>Pot,ATTR_SERVICE_VERSION:()=>r5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Mot,ATTR_SIGNALR_TRANSPORT:()=>Fot,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Hot,ATTR_TELEMETRY_SDK_NAME:()=>eit,ATTR_TELEMETRY_SDK_VERSION:()=>tit,ATTR_URL_FRAGMENT:()=>nit,ATTR_URL_FULL:()=>l_,ATTR_URL_PATH:()=>rit,ATTR_URL_QUERY:()=>oit,ATTR_URL_SCHEME:()=>iit,ATTR_USER_AGENT_ORIGINAL:()=>o5,AWSECSLAUNCHTYPEVALUES_EC2:()=>xnt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Dnt,AwsEcsLaunchtypeValues:()=>Bnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>lnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>dnt,CLOUDPLATFORMVALUES_AWS_EC2:()=>pnt,CLOUDPLATFORMVALUES_AWS_ECS:()=>fnt,CLOUDPLATFORMVALUES_AWS_EKS:()=>mnt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>gnt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Ant,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Ent,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Snt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>_nt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>ynt,CLOUDPLATFORMVALUES_AZURE_VM:()=>hnt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>vnt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Cnt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Int,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Tnt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>bnt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>int,CLOUDPROVIDERVALUES_AWS:()=>snt,CLOUDPROVIDERVALUES_AZURE:()=>ant,CLOUDPROVIDERVALUES_GCP:()=>unt,CloudPlatformValues:()=>Rnt,CloudProviderValues:()=>cnt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>zWe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>JWe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>jWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>KWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>$We,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>WWe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>qWe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>HWe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>ZWe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>YWe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>VWe,DBSYSTEMVALUES_ADABAS:()=>dWe,DBSYSTEMVALUES_CACHE:()=>lWe,DBSYSTEMVALUES_CASSANDRA:()=>xWe,DBSYSTEMVALUES_CLOUDSCAPE:()=>nWe,DBSYSTEMVALUES_COCKROACHDB:()=>FWe,DBSYSTEMVALUES_COLDFUSION:()=>RWe,DBSYSTEMVALUES_COSMOSDB:()=>kWe,DBSYSTEMVALUES_COUCHBASE:()=>OWe,DBSYSTEMVALUES_COUCHDB:()=>wWe,DBSYSTEMVALUES_DB2:()=>WZe,DBSYSTEMVALUES_DERBY:()=>fWe,DBSYSTEMVALUES_DYNAMODB:()=>PWe,DBSYSTEMVALUES_EDB:()=>cWe,DBSYSTEMVALUES_ELASTICSEARCH:()=>UWe,DBSYSTEMVALUES_FILEMAKER:()=>mWe,DBSYSTEMVALUES_FIREBIRD:()=>pWe,DBSYSTEMVALUES_FIRSTSQL:()=>uWe,DBSYSTEMVALUES_GEODE:()=>LWe,DBSYSTEMVALUES_H2:()=>vWe,DBSYSTEMVALUES_HANADB:()=>sWe,DBSYSTEMVALUES_HBASE:()=>DWe,DBSYSTEMVALUES_HIVE:()=>tWe,DBSYSTEMVALUES_HSQLDB:()=>rWe,DBSYSTEMVALUES_INFORMIX:()=>AWe,DBSYSTEMVALUES_INGRES:()=>aWe,DBSYSTEMVALUES_INSTANTDB:()=>gWe,DBSYSTEMVALUES_INTERBASE:()=>hWe,DBSYSTEMVALUES_MARIADB:()=>_We,DBSYSTEMVALUES_MAXDB:()=>iWe,DBSYSTEMVALUES_MEMCACHED:()=>QWe,DBSYSTEMVALUES_MONGODB:()=>BWe,DBSYSTEMVALUES_MSSQL:()=>KZe,DBSYSTEMVALUES_MYSQL:()=>JZe,DBSYSTEMVALUES_NEO4J:()=>MWe,DBSYSTEMVALUES_NETEZZA:()=>EWe,DBSYSTEMVALUES_ORACLE:()=>ZZe,DBSYSTEMVALUES_OTHER_SQL:()=>YZe,DBSYSTEMVALUES_PERVASIVE:()=>yWe,DBSYSTEMVALUES_POINTBASE:()=>SWe,DBSYSTEMVALUES_POSTGRESQL:()=>XZe,DBSYSTEMVALUES_PROGRESS:()=>oWe,DBSYSTEMVALUES_REDIS:()=>NWe,DBSYSTEMVALUES_REDSHIFT:()=>eWe,DBSYSTEMVALUES_SQLITE:()=>TWe,DBSYSTEMVALUES_SYBASE:()=>IWe,DBSYSTEMVALUES_TERADATA:()=>bWe,DBSYSTEMVALUES_VERTICA:()=>CWe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Mrt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Lrt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Urt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Qrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Grt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>zrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>jrt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>lYt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>dYt,DbCassandraConsistencyLevelValues:()=>XWe,DbSystemValues:()=>GWe,ERROR_TYPE_VALUE_OTHER:()=>Hrt,EVENT_EXCEPTION:()=>rst,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>uXe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>aXe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>sXe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>lXe,FAASINVOKEDPROVIDERVALUES_AWS:()=>dXe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>pXe,FAASINVOKEDPROVIDERVALUES_GCP:()=>fXe,FAASTRIGGERVALUES_DATASOURCE:()=>eXe,FAASTRIGGERVALUES_HTTP:()=>tXe,FAASTRIGGERVALUES_OTHER:()=>oXe,FAASTRIGGERVALUES_PUBSUB:()=>nXe,FAASTRIGGERVALUES_TIMER:()=>rXe,FaasDocumentOperationValues:()=>cXe,FaasInvokedProviderValues:()=>mXe,FaasTriggerValues:()=>iXe,HOSTARCHVALUES_AMD64:()=>Nnt,HOSTARCHVALUES_ARM32:()=>Ont,HOSTARCHVALUES_ARM64:()=>wnt,HOSTARCHVALUES_IA64:()=>knt,HOSTARCHVALUES_PPC32:()=>Pnt,HOSTARCHVALUES_PPC64:()=>Mnt,HOSTARCHVALUES_X86:()=>Lnt,HTTPFLAVORVALUES_HTTP_1_0:()=>ZXe,HTTPFLAVORVALUES_HTTP_1_1:()=>WXe,HTTPFLAVORVALUES_HTTP_2_0:()=>XXe,HTTPFLAVORVALUES_QUIC:()=>tet,HTTPFLAVORVALUES_SPDY:()=>eet,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Zrt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Wrt,HTTP_REQUEST_METHOD_VALUE_GET:()=>pYt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Xrt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>eot,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Jrt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>tot,HTTP_REQUEST_METHOD_VALUE_POST:()=>not,HTTP_REQUEST_METHOD_VALUE_PUT:()=>fYt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>rot,HostArchValues:()=>Unt,HttpFlavorValues:()=>net,JVM_MEMORY_TYPE_VALUE_HEAP:()=>dot,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>pot,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Aot,JVM_THREAD_STATE_VALUE_NEW:()=>mYt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>got,JVM_THREAD_STATE_VALUE_TERMINATED:()=>hot,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>_ot,JVM_THREAD_STATE_VALUE_WAITING:()=>Eot,MESSAGETYPEVALUES_RECEIVED:()=>Bet,MESSAGETYPEVALUES_SENT:()=>Det,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>ret,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>oet,MESSAGINGOPERATIONVALUES_PROCESS:()=>aet,MESSAGINGOPERATIONVALUES_RECEIVE:()=>set,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>sit,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>ait,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>uit,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>dit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>lit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>cit,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>pit,METRIC_DB_CLIENT_OPERATION_DURATION:()=>fit,METRIC_DOTNET_ASSEMBLY_COUNT:()=>mit,METRIC_DOTNET_EXCEPTIONS:()=>Ait,METRIC_DOTNET_GC_COLLECTIONS:()=>git,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>hit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>_it,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Eit,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>yit,METRIC_DOTNET_GC_PAUSE_TIME:()=>Sit,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Tit,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Iit,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>bit,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Cit,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>vit,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Rit,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>xit,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Dit,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Bit,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Nit,METRIC_DOTNET_TIMER_COUNT:()=>Oit,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>wit,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>kit,METRIC_JVM_CLASS_COUNT:()=>Pit,METRIC_JVM_CLASS_LOADED:()=>Mit,METRIC_JVM_CLASS_UNLOADED:()=>Lit,METRIC_JVM_CPU_COUNT:()=>Uit,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Qit,METRIC_JVM_CPU_TIME:()=>Fit,METRIC_JVM_GC_DURATION:()=>Git,METRIC_JVM_MEMORY_COMMITTED:()=>zit,METRIC_JVM_MEMORY_LIMIT:()=>jit,METRIC_JVM_MEMORY_USED:()=>Hit,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>$it,METRIC_JVM_THREAD_COUNT:()=>qit,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Vit,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Yit,METRIC_KESTREL_CONNECTION_DURATION:()=>Kit,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Jit,METRIC_KESTREL_QUEUED_REQUESTS:()=>Zit,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Wit,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Xit,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>est,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>tst,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>nst,MessageTypeValues:()=>Net,MessagingDestinationKindValues:()=>iet,MessagingOperationValues:()=>uet,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>OXe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>PXe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>BXe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>zXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>wXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>kXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>FXe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>DXe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>HXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>MXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>UXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>jXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>LXe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>QXe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>qXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>GXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>KXe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>VXe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>YXe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>$Xe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>NXe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>CXe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>vXe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>RXe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>IXe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>bXe,NETTRANSPORTVALUES_INPROC:()=>yXe,NETTRANSPORTVALUES_IP:()=>hXe,NETTRANSPORTVALUES_IP_TCP:()=>AXe,NETTRANSPORTVALUES_IP_UDP:()=>gXe,NETTRANSPORTVALUES_OTHER:()=>SXe,NETTRANSPORTVALUES_PIPE:()=>EXe,NETTRANSPORTVALUES_UNIX:()=>_Xe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Iot,NETWORK_TRANSPORT_VALUE_QUIC:()=>bot,NETWORK_TRANSPORT_VALUE_TCP:()=>AYt,NETWORK_TRANSPORT_VALUE_UDP:()=>gYt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Cot,NETWORK_TYPE_VALUE_IPV4:()=>Rot,NETWORK_TYPE_VALUE_IPV6:()=>xot,NetHostConnectionSubtypeValues:()=>JXe,NetHostConnectionTypeValues:()=>xXe,NetTransportValues:()=>TXe,OSTYPEVALUES_AIX:()=>Vnt,OSTYPEVALUES_DARWIN:()=>Gnt,OSTYPEVALUES_DRAGONFLYBSD:()=>$nt,OSTYPEVALUES_FREEBSD:()=>znt,OSTYPEVALUES_HPUX:()=>qnt,OSTYPEVALUES_LINUX:()=>Fnt,OSTYPEVALUES_NETBSD:()=>jnt,OSTYPEVALUES_OPENBSD:()=>Hnt,OSTYPEVALUES_SOLARIS:()=>Ynt,OSTYPEVALUES_WINDOWS:()=>Qnt,OSTYPEVALUES_Z_OS:()=>Knt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Oot,OTEL_STATUS_CODE_VALUE_OK:()=>hYt,OsTypeValues:()=>Jnt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>yet,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>get,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>det,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>vet,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>met,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Eet,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>bet,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>fet,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Aet,RPCGRPCSTATUSCODEVALUES_OK:()=>cet,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Tet,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>het,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>_et,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Ret,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Cet,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Iet,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>pet,RpcGrpcStatusCodeValues:()=>xet,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>iZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>hZe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>nZe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>WJe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>AZe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>lZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>uZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>_Ze,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>sZe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>XJe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>oZe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>cZe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>rZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>eZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>tZe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>gZe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>pZe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>fZe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>aZe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>dZe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>ZJe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>mZe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>jKe,SEMATTRS_CODE_FILEPATH:()=>GJe,SEMATTRS_CODE_FUNCTION:()=>QJe,SEMATTRS_CODE_LINENO:()=>zJe,SEMATTRS_CODE_NAMESPACE:()=>FJe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>WKe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>rJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>nJe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>eJe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>JKe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>ZKe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>tJe,SEMATTRS_DB_CASSANDRA_TABLE:()=>XKe,SEMATTRS_DB_CONNECTION_STRING:()=>HKe,SEMATTRS_DB_HBASE_NAMESPACE:()=>oJe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>qKe,SEMATTRS_DB_MONGODB_COLLECTION:()=>sJe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>KKe,SEMATTRS_DB_NAME:()=>VKe,SEMATTRS_DB_OPERATION:()=>YKe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>iJe,SEMATTRS_DB_SQL_TABLE:()=>aJe,SEMATTRS_DB_STATEMENT:()=>O9,SEMATTRS_DB_SYSTEM:()=>N9,SEMATTRS_DB_USER:()=>$Ke,SEMATTRS_ENDUSER_ID:()=>kJe,SEMATTRS_ENDUSER_ROLE:()=>PJe,SEMATTRS_ENDUSER_SCOPE:()=>MJe,SEMATTRS_EXCEPTION_ESCAPED:()=>dJe,SEMATTRS_EXCEPTION_MESSAGE:()=>cJe,SEMATTRS_EXCEPTION_STACKTRACE:()=>lJe,SEMATTRS_EXCEPTION_TYPE:()=>uJe,SEMATTRS_FAAS_COLDSTART:()=>EJe,SEMATTRS_FAAS_CRON:()=>_Je,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>fJe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>gJe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>mJe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>AJe,SEMATTRS_FAAS_EXECUTION:()=>pJe,SEMATTRS_FAAS_INVOKED_NAME:()=>yJe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>SJe,SEMATTRS_FAAS_INVOKED_REGION:()=>TJe,SEMATTRS_FAAS_TIME:()=>hJe,SEMATTRS_FAAS_TRIGGER:()=>w9,SEMATTRS_HTTP_CLIENT_IP:()=>JJe,SEMATTRS_HTTP_FLAVOR:()=>$Je,SEMATTRS_HTTP_HOST:()=>jJe,SEMATTRS_HTTP_METHOD:()=>AB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>VJe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>YJe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>U9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Q9,SEMATTRS_HTTP_ROUTE:()=>F9,SEMATTRS_HTTP_SCHEME:()=>HJe,SEMATTRS_HTTP_SERVER_NAME:()=>KJe,SEMATTRS_HTTP_STATUS_CODE:()=>ky,SEMATTRS_HTTP_TARGET:()=>L9,SEMATTRS_HTTP_URL:()=>rC,SEMATTRS_HTTP_USER_AGENT:()=>qJe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>$Ze,SEMATTRS_MESSAGE_ID:()=>HZe,SEMATTRS_MESSAGE_TYPE:()=>jZe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>qZe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>BZe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>vZe,SEMATTRS_MESSAGING_DESTINATION:()=>EZe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>yZe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>kZe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>wZe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>OZe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>PZe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>MZe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>CZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>xZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>RZe,SEMATTRS_MESSAGING_OPERATION:()=>DZe,SEMATTRS_MESSAGING_PROTOCOL:()=>TZe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>IZe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>NZe,SEMATTRS_MESSAGING_SYSTEM:()=>G9,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>SZe,SEMATTRS_MESSAGING_URL:()=>bZe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>OJe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>BJe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>NJe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>DJe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>xJe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>RJe,SEMATTRS_NET_HOST_IP:()=>P9,SEMATTRS_NET_HOST_NAME:()=>vJe,SEMATTRS_NET_HOST_PORT:()=>M9,SEMATTRS_NET_PEER_IP:()=>k9,SEMATTRS_NET_PEER_NAME:()=>CJe,SEMATTRS_NET_PEER_PORT:()=>bJe,SEMATTRS_NET_TRANSPORT:()=>IJe,SEMATTRS_PEER_SERVICE:()=>wJe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>j9,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>GZe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>zZe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>FZe,SEMATTRS_RPC_JSONRPC_VERSION:()=>QZe,SEMATTRS_RPC_METHOD:()=>UZe,SEMATTRS_RPC_SERVICE:()=>z9,SEMATTRS_RPC_SYSTEM:()=>LZe,SEMATTRS_THREAD_ID:()=>LJe,SEMATTRS_THREAD_NAME:()=>UJe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Uet,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Let,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Qet,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Fet,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Get,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>zet,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>jet,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>$et,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Het,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Vet,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>qet,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>wet,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Pet,SEMRESATTRS_CLOUD_PLATFORM:()=>Met,SEMRESATTRS_CLOUD_PROVIDER:()=>Oet,SEMRESATTRS_CLOUD_REGION:()=>ket,SEMRESATTRS_CONTAINER_ID:()=>Ket,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Zet,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Wet,SEMRESATTRS_CONTAINER_NAME:()=>Yet,SEMRESATTRS_CONTAINER_RUNTIME:()=>Jet,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Xet,SEMRESATTRS_DEVICE_ID:()=>ett,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>ttt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>ntt,SEMRESATTRS_FAAS_ID:()=>ott,SEMRESATTRS_FAAS_INSTANCE:()=>stt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>att,SEMRESATTRS_FAAS_NAME:()=>rtt,SEMRESATTRS_FAAS_VERSION:()=>itt,SEMRESATTRS_HOST_ARCH:()=>dtt,SEMRESATTRS_HOST_ID:()=>utt,SEMRESATTRS_HOST_IMAGE_ID:()=>ftt,SEMRESATTRS_HOST_IMAGE_NAME:()=>ptt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>mtt,SEMRESATTRS_HOST_NAME:()=>ctt,SEMRESATTRS_HOST_TYPE:()=>ltt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Att,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Stt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>wtt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Ott,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Dtt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>xtt,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Ctt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>btt,SEMRESATTRS_K8S_JOB_NAME:()=>Ntt,SEMRESATTRS_K8S_JOB_UID:()=>Btt,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>_tt,SEMRESATTRS_K8S_NODE_NAME:()=>gtt,SEMRESATTRS_K8S_NODE_UID:()=>htt,SEMRESATTRS_K8S_POD_NAME:()=>ytt,SEMRESATTRS_K8S_POD_UID:()=>Ett,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Itt,SEMRESATTRS_K8S_REPLICASET_UID:()=>Ttt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Rtt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>vtt,SEMRESATTRS_OS_DESCRIPTION:()=>Ptt,SEMRESATTRS_OS_NAME:()=>Mtt,SEMRESATTRS_OS_TYPE:()=>ktt,SEMRESATTRS_OS_VERSION:()=>Ltt,SEMRESATTRS_PROCESS_COMMAND:()=>Gtt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>jtt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>ztt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Qtt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Ftt,SEMRESATTRS_PROCESS_OWNER:()=>Htt,SEMRESATTRS_PROCESS_PID:()=>Utt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Vtt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>$tt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>qtt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Ktt,SEMRESATTRS_SERVICE_NAME:()=>Ytt,SEMRESATTRS_SERVICE_NAMESPACE:()=>H9,SEMRESATTRS_SERVICE_VERSION:()=>Jtt,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>ent,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Wtt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Ztt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Xtt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>rnt,SEMRESATTRS_WEBENGINE_NAME:()=>tnt,SEMRESATTRS_WEBENGINE_VERSION:()=>nnt,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Lot,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Uot,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Qot,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Got,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>zot,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>jot,SemanticAttributes:()=>VZe,SemanticResourceAttributes:()=>ont,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Znt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Wnt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Xnt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ert,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>trt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>nrt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>rrt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ort,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>irt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>srt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>_Yt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>$ot,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>qot,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>EYt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Vot,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Yot,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>yYt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Kot,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Jot,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Zot,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Wot,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Xot,TelemetrySdkLanguageValues:()=>art});var Zn=O(()=>{A();ahe();wEe();kEe();PEe();MEe()});var LEe=F(QM=>{"use strict";A();Object.defineProperty(QM,"__esModule",{value:!0});QM.ATTR_PROCESS_RUNTIME_NAME=void 0;QM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var UEe=F(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.SDK_INFO=void 0;var ost=gpe(),FM=(Zn(),Me(Fr)),ist=LEe();GM.SDK_INFO={[FM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[ist.ATTR_PROCESS_RUNTIME_NAME]:"node",[FM.ATTR_TELEMETRY_SDK_LANGUAGE]:FM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[FM.ATTR_TELEMETRY_SDK_VERSION]:ost.VERSION}});var QEe=F(Wa=>{"use strict";A();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.otperformance=Wa.SDK_INFO=Wa._globalThis=Wa.getStringListFromEnv=Wa.getNumberFromEnv=Wa.getBooleanFromEnv=Wa.getStringFromEnv=void 0;var zM=mpe();Object.defineProperty(Wa,"getStringFromEnv",{enumerable:!0,get:function(){return zM.getStringFromEnv}});Object.defineProperty(Wa,"getBooleanFromEnv",{enumerable:!0,get:function(){return zM.getBooleanFromEnv}});Object.defineProperty(Wa,"getNumberFromEnv",{enumerable:!0,get:function(){return zM.getNumberFromEnv}});Object.defineProperty(Wa,"getStringListFromEnv",{enumerable:!0,get:function(){return zM.getStringListFromEnv}});var sst=Ape();Object.defineProperty(Wa,"_globalThis",{enumerable:!0,get:function(){return sst._globalThis}});var ast=UEe();Object.defineProperty(Wa,"SDK_INFO",{enumerable:!0,get:function(){return ast.SDK_INFO}});Wa.otperformance=performance});var i5=F(Xa=>{"use strict";A();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.getStringListFromEnv=Xa.getNumberFromEnv=Xa.getStringFromEnv=Xa.getBooleanFromEnv=Xa.otperformance=Xa._globalThis=Xa.SDK_INFO=void 0;var Ly=QEe();Object.defineProperty(Xa,"SDK_INFO",{enumerable:!0,get:function(){return Ly.SDK_INFO}});Object.defineProperty(Xa,"_globalThis",{enumerable:!0,get:function(){return Ly._globalThis}});Object.defineProperty(Xa,"otperformance",{enumerable:!0,get:function(){return Ly.otperformance}});Object.defineProperty(Xa,"getBooleanFromEnv",{enumerable:!0,get:function(){return Ly.getBooleanFromEnv}});Object.defineProperty(Xa,"getStringFromEnv",{enumerable:!0,get:function(){return Ly.getStringFromEnv}});Object.defineProperty(Xa,"getNumberFromEnv",{enumerable:!0,get:function(){return Ly.getNumberFromEnv}});Object.defineProperty(Xa,"getStringListFromEnv",{enumerable:!0,get:function(){return Ly.getStringListFromEnv}})});var jEe=F(Gr=>{"use strict";A();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.addHrTimes=Gr.isTimeInput=Gr.isTimeInputHrTime=Gr.hrTimeToSeconds=Gr.hrTimeToMilliseconds=Gr.hrTimeToMicroseconds=Gr.hrTimeToNanoseconds=Gr.hrTimeToTimeStamp=Gr.hrTimeDuration=Gr.timeInputToHrTime=Gr.hrTime=Gr.getTimeOrigin=Gr.millisToHrTime=void 0;var jM=i5(),FEe=9,ust=6,cst=Math.pow(10,ust),gB=Math.pow(10,FEe);function hB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*cst);return[n,r]}Gr.millisToHrTime=hB;function lst(){return jM.otperformance.timeOrigin}Gr.getTimeOrigin=lst;function GEe(e){let t=hB(jM.otperformance.timeOrigin),n=hB(typeof e=="number"?e:jM.otperformance.now());return zEe(t,n)}Gr.hrTime=GEe;function dst(e){if(s5(e))return e;if(typeof e=="number")return e<jM.otperformance.timeOrigin?GEe(e):hB(e);if(e instanceof Date)return hB(e.getTime());throw TypeError("Invalid input type")}Gr.timeInputToHrTime=dst;function pst(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=gB),[n,r]}Gr.hrTimeDuration=pst;function fst(e){let t=FEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Gr.hrTimeToTimeStamp=fst;function mst(e){return e[0]*gB+e[1]}Gr.hrTimeToNanoseconds=mst;function Ast(e){return e[0]*1e6+e[1]/1e3}Gr.hrTimeToMicroseconds=Ast;function gst(e){return e[0]*1e3+e[1]/1e6}Gr.hrTimeToMilliseconds=gst;function hst(e){return e[0]+e[1]/gB}Gr.hrTimeToSeconds=hst;function s5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Gr.isTimeInputHrTime=s5;function _st(e){return s5(e)||typeof e=="number"||e instanceof Date}Gr.isTimeInput=_st;function zEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=gB&&(n[1]-=gB,n[0]+=1),n}Gr.addHrTimes=zEe});var HEe=F(HM=>{"use strict";A();Object.defineProperty(HM,"__esModule",{value:!0});HM.unrefTimer=void 0;function Est(e){typeof e!="number"&&e.unref()}HM.unrefTimer=Est});var $Ee=F(_B=>{"use strict";A();Object.defineProperty(_B,"__esModule",{value:!0});_B.ExportResultCode=void 0;var yst;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(yst=_B.ExportResultCode||(_B.ExportResultCode={}))});var VEe=F($M=>{"use strict";A();Object.defineProperty($M,"__esModule",{value:!0});$M.CompositePropagator=void 0;var qEe=(ze(),Me(We)),a5=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){qEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(s){qEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};$M.CompositePropagator=a5});var YEe=F(iC=>{"use strict";A();Object.defineProperty(iC,"__esModule",{value:!0});iC.validateValue=iC.validateKey=void 0;var u5="[_0-9a-z-*/]",Sst=`[a-z]${u5}{0,255}`,Tst=`[a-z0-9]${u5}{0,240}@[a-z]${u5}{0,13}`,Ist=new RegExp(`^(?:${Sst}|${Tst})$`),bst=/^[ -~]{0,255}[!-~]$/,Cst=/,|=/;function vst(e){return Ist.test(e)}iC.validateKey=vst;function Rst(e){return bst.test(e)&&!Cst.test(e)}iC.validateValue=Rst});var l5=F(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.TraceState=void 0;var qM=YEe(),xst=32,KEe=512,JEe=",",ZEe="=",c5=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,qM.validateKey)(t)||!(0,qM.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>KEe)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=JEe+t),t=`${r[0]}${ZEe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(JEe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(ZEe);if(s===-1)continue;let c=i.slice(0,s),l=i.slice(s+1);if(!(0,qM.validateKey)(c)||!(0,qM.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>KEe)&&(n.set(c,l),r=f,n.size>=xst))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};VM.TraceState=c5});var XEe=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var YM=(ze(),Me(We)),Dst=fB(),Bst=l5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Nst="00",Ost="(?!ff)[\\da-f]{2}",wst="(?![0]{32})[\\da-f]{32}",kst="(?![0]{16})[\\da-f]{16}",Pst="[\\da-f]{2}",Mst=new RegExp(`^\\s?(${Ost})-(${wst})-(${kst})-(${Pst})(-.*)?\\s?$`);function WEe(e){let t=Mst.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=WEe;var d5=class{inject(t,n,r){let o=YM.trace.getSpanContext(t);if(!o||(0,Dst.isTracingSuppressed)(t)||!(0,YM.isSpanContextValid)(o))return;let i=`${Nst}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||YM.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=WEe(i);if(!s)return t;s.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let l=Array.isArray(c)?c.join(","):c;s.traceState=new Bst.TraceState(typeof l=="string"?l:void 0)}return YM.trace.setSpanContext(t,s)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=d5});var e0e=F(tf=>{"use strict";A();Object.defineProperty(tf,"__esModule",{value:!0});tf.getRPCMetadata=tf.deleteRPCMetadata=tf.setRPCMetadata=tf.RPCType=void 0;var Lst=(ze(),Me(We)),p5=(0,Lst.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Ust;(function(e){e.HTTP="http"})(Ust=tf.RPCType||(tf.RPCType={}));function Qst(e,t){return e.setValue(p5,t)}tf.setRPCMetadata=Qst;function Fst(e){return e.deleteValue(p5)}tf.deleteRPCMetadata=Fst;function Gst(e){return e.getValue(p5)}tf.getRPCMetadata=Gst});var i0e=F(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM.isPlainObject=void 0;var zst="[object Object]",jst="[object Null]",Hst="[object Undefined]",$st=Function.prototype,t0e=$st.toString,qst=t0e.call(Object),Vst=Object.getPrototypeOf,n0e=Object.prototype,r0e=n0e.hasOwnProperty,Uy=Symbol?Symbol.toStringTag:void 0,o0e=n0e.toString;function Yst(e){if(!Kst(e)||Jst(e)!==zst)return!1;let t=Vst(e);if(t===null)return!0;let n=r0e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&t0e.call(n)===qst}KM.isPlainObject=Yst;function Kst(e){return e!=null&&typeof e=="object"}function Jst(e){return e==null?e===void 0?Hst:jst:Uy&&Uy in Object(e)?Zst(e):Wst(e)}function Zst(e){let t=r0e.call(e,Uy),n=e[Uy],r=!1;try{e[Uy]=void 0,r=!0}catch{}let o=o0e.call(e);return r&&(t?e[Uy]=n:delete e[Uy]),o}function Wst(e){return o0e.call(e)}});var l0e=F(WM=>{"use strict";A();Object.defineProperty(WM,"__esModule",{value:!0});WM.merge=void 0;var s0e=i0e(),Xst=20;function eat(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=u0e(t,e.shift(),0,n);return t}WM.merge=eat;function f5(e){return ZM(e)?e.slice():e}function u0e(e,t,n=0,r){let o;if(!(n>Xst)){if(n++,JM(e)||JM(t)||c0e(t))o=f5(t);else if(ZM(e)){if(o=e.slice(),ZM(t))for(let i=0,s=t.length;i<s;i++)o.push(f5(t[i]));else if(EB(t)){let i=Object.keys(t);for(let s=0,c=i.length;s<c;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=f5(t[l]))}}}else if(EB(e))if(EB(t)){if(!tat(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,c=i.length;s<c;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(JM(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],y=f;if(a0e(e,l,r)||a0e(t,l,r))delete o[l];else{if(EB(h)&&EB(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:l}),b.push({obj:t,key:l}),r.set(h,S),r.set(y,b)}o[l]=u0e(o[l],f,n,r)}}}}else o=t;return o}}function a0e(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function ZM(e){return Array.isArray(e)}function c0e(e){return typeof e=="function"}function EB(e){return!JM(e)&&!ZM(e)&&!c0e(e)&&typeof e=="object"}function JM(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function tat(e,t){return!(!(0,s0e.isPlainObject)(e)||!(0,s0e.isPlainObject)(t))}});var d0e=F(sC=>{"use strict";A();Object.defineProperty(sC,"__esModule",{value:!0});sC.callWithTimeout=sC.TimeoutError=void 0;var XM=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};sC.TimeoutError=XM;function nat(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new XM("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}sC.callWithTimeout=nat});var f0e=F(aC=>{"use strict";A();Object.defineProperty(aC,"__esModule",{value:!0});aC.isUrlIgnored=aC.urlMatches=void 0;function p0e(e,t){return typeof t=="string"?e===t:!!e.match(t)}aC.urlMatches=p0e;function rat(e,t){if(!t)return!1;for(let n of t)if(p0e(e,n))return!0;return!1}aC.isUrlIgnored=rat});var m0e=F(eL=>{"use strict";A();Object.defineProperty(eL,"__esModule",{value:!0});eL.Deferred=void 0;var m5=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)}};eL.Deferred=m5});var A0e=F(tL=>{"use strict";A();Object.defineProperty(tL,"__esModule",{value:!0});tL.BindOnceFuture=void 0;var oat=m0e(),A5=class{_isCalled=!1;_deferred=new oat.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}};tL.BindOnceFuture=A5});var h0e=F(nL=>{"use strict";A();Object.defineProperty(nL,"__esModule",{value:!0});nL.diagLogLevelFromString=void 0;var mg=(ze(),Me(We)),g0e={ALL:mg.DiagLogLevel.ALL,VERBOSE:mg.DiagLogLevel.VERBOSE,DEBUG:mg.DiagLogLevel.DEBUG,INFO:mg.DiagLogLevel.INFO,WARN:mg.DiagLogLevel.WARN,ERROR:mg.DiagLogLevel.ERROR,NONE:mg.DiagLogLevel.NONE};function iat(e){if(e==null)return;let t=g0e[e.toUpperCase()];return t??(mg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(g0e)}, using default`),mg.DiagLogLevel.INFO)}nL.diagLogLevelFromString=iat});var E0e=F(rL=>{"use strict";A();Object.defineProperty(rL,"__esModule",{value:!0});rL._export=void 0;var _0e=(ze(),Me(We)),sat=fB();function aat(e,t){return new Promise(n=>{_0e.context.with((0,sat.suppressTracing)(_0e.context.active()),()=>{e.export(t,n)})})}rL._export=aat});var br=F(Ne=>{"use strict";A();Object.defineProperty(Ne,"__esModule",{value:!0});Ne.diagLogLevelFromString=Ne.BindOnceFuture=Ne.urlMatches=Ne.isUrlIgnored=Ne.callWithTimeout=Ne.TimeoutError=Ne.merge=Ne.TraceState=Ne.unsuppressTracing=Ne.suppressTracing=Ne.isTracingSuppressed=Ne.setRPCMetadata=Ne.getRPCMetadata=Ne.deleteRPCMetadata=Ne.RPCType=Ne.parseTraceParent=Ne.W3CTraceContextPropagator=Ne.TRACE_STATE_HEADER=Ne.TRACE_PARENT_HEADER=Ne.CompositePropagator=Ne.otperformance=Ne.getStringListFromEnv=Ne.getNumberFromEnv=Ne.getBooleanFromEnv=Ne.getStringFromEnv=Ne._globalThis=Ne.SDK_INFO=Ne.parseKeyPairsIntoRecord=Ne.ExportResultCode=Ne.unrefTimer=Ne.timeInputToHrTime=Ne.millisToHrTime=Ne.isTimeInputHrTime=Ne.isTimeInput=Ne.hrTimeToTimeStamp=Ne.hrTimeToSeconds=Ne.hrTimeToNanoseconds=Ne.hrTimeToMilliseconds=Ne.hrTimeToMicroseconds=Ne.hrTimeDuration=Ne.hrTime=Ne.getTimeOrigin=Ne.addHrTimes=Ne.loggingErrorHandler=Ne.setGlobalErrorHandler=Ne.globalErrorHandler=Ne.sanitizeAttributes=Ne.isAttributeValue=Ne.AnchoredClock=Ne.W3CBaggagePropagator=void 0;Ne.internal=void 0;var uat=npe();Object.defineProperty(Ne,"W3CBaggagePropagator",{enumerable:!0,get:function(){return uat.W3CBaggagePropagator}});var cat=rpe();Object.defineProperty(Ne,"AnchoredClock",{enumerable:!0,get:function(){return cat.AnchoredClock}});var y0e=upe();Object.defineProperty(Ne,"isAttributeValue",{enumerable:!0,get:function(){return y0e.isAttributeValue}});Object.defineProperty(Ne,"sanitizeAttributes",{enumerable:!0,get:function(){return y0e.sanitizeAttributes}});var S0e=lpe();Object.defineProperty(Ne,"globalErrorHandler",{enumerable:!0,get:function(){return S0e.globalErrorHandler}});Object.defineProperty(Ne,"setGlobalErrorHandler",{enumerable:!0,get:function(){return S0e.setGlobalErrorHandler}});var lat=D9();Object.defineProperty(Ne,"loggingErrorHandler",{enumerable:!0,get:function(){return lat.loggingErrorHandler}});var Nl=jEe();Object.defineProperty(Ne,"addHrTimes",{enumerable:!0,get:function(){return Nl.addHrTimes}});Object.defineProperty(Ne,"getTimeOrigin",{enumerable:!0,get:function(){return Nl.getTimeOrigin}});Object.defineProperty(Ne,"hrTime",{enumerable:!0,get:function(){return Nl.hrTime}});Object.defineProperty(Ne,"hrTimeDuration",{enumerable:!0,get:function(){return Nl.hrTimeDuration}});Object.defineProperty(Ne,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Nl.hrTimeToMicroseconds}});Object.defineProperty(Ne,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Nl.hrTimeToMilliseconds}});Object.defineProperty(Ne,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Nl.hrTimeToNanoseconds}});Object.defineProperty(Ne,"hrTimeToSeconds",{enumerable:!0,get:function(){return Nl.hrTimeToSeconds}});Object.defineProperty(Ne,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Nl.hrTimeToTimeStamp}});Object.defineProperty(Ne,"isTimeInput",{enumerable:!0,get:function(){return Nl.isTimeInput}});Object.defineProperty(Ne,"isTimeInputHrTime",{enumerable:!0,get:function(){return Nl.isTimeInputHrTime}});Object.defineProperty(Ne,"millisToHrTime",{enumerable:!0,get:function(){return Nl.millisToHrTime}});Object.defineProperty(Ne,"timeInputToHrTime",{enumerable:!0,get:function(){return Nl.timeInputToHrTime}});var dat=HEe();Object.defineProperty(Ne,"unrefTimer",{enumerable:!0,get:function(){return dat.unrefTimer}});var pat=$Ee();Object.defineProperty(Ne,"ExportResultCode",{enumerable:!0,get:function(){return pat.ExportResultCode}});var fat=C9();Object.defineProperty(Ne,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return fat.parseKeyPairsIntoRecord}});var Qy=i5();Object.defineProperty(Ne,"SDK_INFO",{enumerable:!0,get:function(){return Qy.SDK_INFO}});Object.defineProperty(Ne,"_globalThis",{enumerable:!0,get:function(){return Qy._globalThis}});Object.defineProperty(Ne,"getStringFromEnv",{enumerable:!0,get:function(){return Qy.getStringFromEnv}});Object.defineProperty(Ne,"getBooleanFromEnv",{enumerable:!0,get:function(){return Qy.getBooleanFromEnv}});Object.defineProperty(Ne,"getNumberFromEnv",{enumerable:!0,get:function(){return Qy.getNumberFromEnv}});Object.defineProperty(Ne,"getStringListFromEnv",{enumerable:!0,get:function(){return Qy.getStringListFromEnv}});Object.defineProperty(Ne,"otperformance",{enumerable:!0,get:function(){return Qy.otperformance}});var mat=VEe();Object.defineProperty(Ne,"CompositePropagator",{enumerable:!0,get:function(){return mat.CompositePropagator}});var oL=XEe();Object.defineProperty(Ne,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return oL.TRACE_PARENT_HEADER}});Object.defineProperty(Ne,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return oL.TRACE_STATE_HEADER}});Object.defineProperty(Ne,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return oL.W3CTraceContextPropagator}});Object.defineProperty(Ne,"parseTraceParent",{enumerable:!0,get:function(){return oL.parseTraceParent}});var iL=e0e();Object.defineProperty(Ne,"RPCType",{enumerable:!0,get:function(){return iL.RPCType}});Object.defineProperty(Ne,"deleteRPCMetadata",{enumerable:!0,get:function(){return iL.deleteRPCMetadata}});Object.defineProperty(Ne,"getRPCMetadata",{enumerable:!0,get:function(){return iL.getRPCMetadata}});Object.defineProperty(Ne,"setRPCMetadata",{enumerable:!0,get:function(){return iL.setRPCMetadata}});var g5=fB();Object.defineProperty(Ne,"isTracingSuppressed",{enumerable:!0,get:function(){return g5.isTracingSuppressed}});Object.defineProperty(Ne,"suppressTracing",{enumerable:!0,get:function(){return g5.suppressTracing}});Object.defineProperty(Ne,"unsuppressTracing",{enumerable:!0,get:function(){return g5.unsuppressTracing}});var Aat=l5();Object.defineProperty(Ne,"TraceState",{enumerable:!0,get:function(){return Aat.TraceState}});var gat=l0e();Object.defineProperty(Ne,"merge",{enumerable:!0,get:function(){return gat.merge}});var T0e=d0e();Object.defineProperty(Ne,"TimeoutError",{enumerable:!0,get:function(){return T0e.TimeoutError}});Object.defineProperty(Ne,"callWithTimeout",{enumerable:!0,get:function(){return T0e.callWithTimeout}});var I0e=f0e();Object.defineProperty(Ne,"isUrlIgnored",{enumerable:!0,get:function(){return I0e.isUrlIgnored}});Object.defineProperty(Ne,"urlMatches",{enumerable:!0,get:function(){return I0e.urlMatches}});var hat=A0e();Object.defineProperty(Ne,"BindOnceFuture",{enumerable:!0,get:function(){return hat.BindOnceFuture}});var _at=h0e();Object.defineProperty(Ne,"diagLogLevelFromString",{enumerable:!0,get:function(){return _at.diagLogLevelFromString}});var Eat=E0e();Ne.internal={_export:Eat._export}});var b0e=F(sL=>{"use strict";A();Object.defineProperty(sL,"__esModule",{value:!0});sL.VERSION=void 0;sL.VERSION="0.214.0"});var C0e=F(yB=>{"use strict";A();Object.defineProperty(yB,"__esModule",{value:!0});yB.SeverityNumber=void 0;var yat;(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"})(yat=yB.SeverityNumber||(yB.SeverityNumber={}))});var uL=F(uC=>{"use strict";A();Object.defineProperty(uC,"__esModule",{value:!0});uC.NOOP_LOGGER=uC.NoopLogger=void 0;var aL=class{emit(t){}};uC.NoopLogger=aL;uC.NOOP_LOGGER=new aL});var v0e=F(ym=>{"use strict";A();Object.defineProperty(ym,"__esModule",{value:!0});ym.API_BACKWARDS_COMPATIBILITY_VERSION=ym.makeGetter=ym._global=ym.GLOBAL_LOGS_API_KEY=void 0;ym.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");ym._global=globalThis;function Sat(e,t,n){return r=>r===e?t:n}ym.makeGetter=Sat;ym.API_BACKWARDS_COMPATIBILITY_VERSION=1});var h5=F(cC=>{"use strict";A();Object.defineProperty(cC,"__esModule",{value:!0});cC.NOOP_LOGGER_PROVIDER=cC.NoopLoggerProvider=void 0;var Tat=uL(),cL=class{getLogger(t,n,r){return new Tat.NoopLogger}};cC.NoopLoggerProvider=cL;cC.NOOP_LOGGER_PROVIDER=new cL});var R0e=F(lL=>{"use strict";A();Object.defineProperty(lL,"__esModule",{value:!0});lL.ProxyLogger=void 0;var Iat=uL(),_5=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):Iat.NOOP_LOGGER}};lL.ProxyLogger=_5});var x0e=F(dL=>{"use strict";A();Object.defineProperty(dL,"__esModule",{value:!0});dL.ProxyLoggerProvider=void 0;var bat=h5(),Cat=R0e(),E5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Cat.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:bat.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)}};dL.ProxyLoggerProvider=E5});var B0e=F(pL=>{"use strict";A();Object.defineProperty(pL,"__esModule",{value:!0});pL.LogsAPI=void 0;var Pd=v0e(),vat=h5(),D0e=x0e(),y5=class e{constructor(){this._proxyLoggerProvider=new D0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Pd._global[Pd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Pd._global[Pd.GLOBAL_LOGS_API_KEY]=(0,Pd.makeGetter)(Pd.API_BACKWARDS_COMPATIBILITY_VERSION,t,vat.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Pd._global[Pd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Pd._global,Pd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Pd._global[Pd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new D0e.ProxyLoggerProvider}};pL.LogsAPI=y5});var S5=F(Sm=>{"use strict";A();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.logs=Sm.NoopLogger=Sm.NOOP_LOGGER=Sm.SeverityNumber=void 0;var Rat=C0e();Object.defineProperty(Sm,"SeverityNumber",{enumerable:!0,get:function(){return Rat.SeverityNumber}});var N0e=uL();Object.defineProperty(Sm,"NOOP_LOGGER",{enumerable:!0,get:function(){return N0e.NOOP_LOGGER}});Object.defineProperty(Sm,"NoopLogger",{enumerable:!0,get:function(){return N0e.NoopLogger}});var xat=B0e();Sm.logs=xat.LogsAPI.getInstance()});var O0e=F(lC=>{"use strict";A();Object.defineProperty(lC,"__esModule",{value:!0});lC.disableInstrumentations=lC.enableInstrumentations=void 0;function Dat(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}lC.enableInstrumentations=Dat;function Bat(e){e.forEach(t=>t.disable())}lC.disableInstrumentations=Bat});var P0e=F(fL=>{"use strict";A();Object.defineProperty(fL,"__esModule",{value:!0});fL.registerInstrumentations=void 0;var w0e=(ze(),Me(We)),Nat=S5(),k0e=O0e();function Oat(e){let t=e.tracerProvider||w0e.trace.getTracerProvider(),n=e.meterProvider||w0e.metrics.getMeterProvider(),r=e.loggerProvider||Nat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,k0e.enableInstrumentations)(o,t,n,r),()=>{(0,k0e.disableInstrumentations)(o)}}fL.registerInstrumentations=Oat});var H0e=F(mL=>{"use strict";A();Object.defineProperty(mL,"__esModule",{value:!0});mL.satisfies=void 0;var C5=(ze(),Me(We)),F0e=/^(?: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-]+)*))?$/,wat=/^(?<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-]+)*))?$/,kat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Pat(e,t,n){if(!Mat(e))return C5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Fat(e);if(!r)return!1;let o=[],i=G0e(r,t,o,n);return i&&!n?.includePrerelease?Uat(r,o):i}mL.satisfies=Pat;function Mat(e){return typeof e=="string"&&F0e.test(e)}function G0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(T5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=aut(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!T5(e,i,n,r))return!1;return!0}return T5(e,t,n,r)}function T5(e,t,n,r){if(t=Qat(t,r),t.includes(" "))return G0e(e,t,n,r);{let o=Gat(t);return n.push(o),Lat(e,o)}}function Lat(e,t){if(t.invalid)return!1;if(!t.version||b5(t.version))return!0;let n=L0e(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=L0e(r,o)}return kat[t.op]?.includes(n)}function Uat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Qat(e,t){return e=e.trim(),e=iut(e,t),e=out(e),e=sut(e,t),e=e.trim(),e}function Mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Fat(e){let t=e.match(F0e);if(!t){C5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function Gat(e){if(!e)return{};let t=e.match(wat);if(!t)return C5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function b5(e){return e==="*"||e==="x"||e==="X"}function M0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function zat(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 jat(e,t){if(b5(e)||b5(t))return 0;let[n,r]=zat(M0e(e),M0e(t));return n>r?1:n<r?-1:0}function L0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=jat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var z0e="[a-zA-Z0-9-]",j0e="0|[1-9]\\d*",Hat=`\\d*[a-zA-Z-]${z0e}*`,$at="((?:<|>)?=?)",U0e=`(?:${j0e}|${Hat})`,qat=`(?:-(${U0e}(?:\\.${U0e})*))`,Q0e=`${z0e}+`,Vat=`(?:\\+(${Q0e}(?:\\.${Q0e})*))`,I5=`${j0e}|x|X|\\*`,SB=`[v=\\s]*(${I5})(?:\\.(${I5})(?:\\.(${I5})(?:${qat})?${Vat}?)?)?`,Yat=`^${$at}\\s*${SB}$`,Kat=new RegExp(Yat),Jat=`^\\s*(${SB})\\s+-\\s+(${SB})\\s*$`,Zat=new RegExp(Jat),Wat="(?:~>?)",Xat=`^${Wat}${SB}$`,eut=new RegExp(Xat),tut="(?:\\^)",nut=`^${tut}${SB}$`,rut=new RegExp(nut);function out(e){let t=eut;return e.replace(t,(n,r,o,i,s)=>{let c;return Mu(r)?c="":Mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?c=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function iut(e,t){let n=rut,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,c,l)=>{let f;return Mu(i)?f="":Mu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Mu(c)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${c}-${l} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${c}${r} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c} <${+i+1}.0.0-0`,f})}function sut(e,t){let n=Kat;return e.replace(n,(r,o,i,s,c,l)=>{let f=Mu(i),h=f||Mu(s),y=h||Mu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),c=0,o===">"?(o=">=",h?(i=+i+1,s=0,c=0):(s=+s+1,c=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function aut(e,t){let n=Zat;return e.replace(n,(r,o,i,s,c,l,f,h,y,S,b,v)=>(Mu(i)?o="":Mu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Mu(c)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Mu(y)?h="":Mu(S)?h=`<${+y+1}.0.0-0`:Mu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var v5=F(Ia=>{"use strict";A();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.massUnwrap=Ia.unwrap=Ia.massWrap=Ia.wrap=void 0;var Lu=console.error.bind(console);function TB(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 uut=(e,t,n)=>{if(!e||!e[t]){Lu("no original function "+String(t)+" to wrap");return}if(!n){Lu("no wrapper function"),Lu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Lu("original object and wrapper must be functions");return}let o=n(r,t);return TB(o,"__original",r),TB(o,"__unwrap",()=>{e[t]===o&&TB(e,t,r)}),TB(o,"__wrapped",!0),TB(e,t,o),o};Ia.wrap=uut;var cut=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ia.wrap)(r,o,n)})})};Ia.massWrap=cut;var lut=(e,t)=>{if(!e||!e[t]){Lu("no function to unwrap."),Lu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Lu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ia.unwrap=lut;var dut=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ia.unwrap)(n,r)})})};Ia.massUnwrap=dut;function IB(e){e&&e.logger&&(typeof e.logger!="function"?Lu("new logger isn't a function, not replacing"):Lu=e.logger)}Ia.default=IB;IB.wrap=Ia.wrap;IB.massWrap=Ia.massWrap;IB.unwrap=Ia.unwrap;IB.massUnwrap=Ia.massUnwrap});var $0e=F(gL=>{"use strict";A();Object.defineProperty(gL,"__esModule",{value:!0});gL.InstrumentationAbstract=void 0;var R5=(ze(),Me(We)),put=S5(),AL=v5(),x5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=R5.diag.createComponentLogger({namespace:t}),this._tracer=R5.trace.getTracer(t,n),this._meter=R5.metrics.getMeter(t,n),this._logger=put.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=AL.wrap;_unwrap=AL.unwrap;_massWrap=AL.massWrap;_massUnwrap=AL.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)}}};gL.InstrumentationAbstract=x5});var V0e=F((KKt,q0e)=>{A();var dC=1e3,pC=dC*60,fC=pC*60,Fy=fC*24,fut=Fy*7,mut=Fy*365.25;q0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Aut(e);if(n==="number"&&isFinite(e))return t.long?hut(e):gut(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Aut(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*mut;case"weeks":case"week":case"w":return n*fut;case"days":case"day":case"d":return n*Fy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*fC;case"minutes":case"minute":case"mins":case"min":case"m":return n*pC;case"seconds":case"second":case"secs":case"sec":case"s":return n*dC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function gut(e){var t=Math.abs(e);return t>=Fy?Math.round(e/Fy)+"d":t>=fC?Math.round(e/fC)+"h":t>=pC?Math.round(e/pC)+"m":t>=dC?Math.round(e/dC)+"s":e+"ms"}function hut(e){var t=Math.abs(e);return t>=Fy?hL(e,t,Fy,"day"):t>=fC?hL(e,t,fC,"hour"):t>=pC?hL(e,t,pC,"minute"):t>=dC?hL(e,t,dC,"second"):e+" ms"}function hL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var D5=F((ZKt,Y0e)=>{A();function _ut(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=c,n.humanize=V0e(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,b,v;function x(...D){if(!x.enabled)return;let k=x,Q=Number(new Date),z=Q-(y||Q);k.diff=z,k.prev=y,k.curr=Q,y=Q,D[0]=n.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let G=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(ie,ge)=>{if(ie==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let ve=D[G];ie=Ce.call(k,ve),D.splice(G,1),G--}return ie}),n.formatArgs.call(k,D),(k.log||n.log).apply(k,D)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,v=n.enabled(h)),v),set:D=>{S=D}}),typeof n.init=="function"&&n.init(x),x}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,b=0,v=-1,x=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(v=b,x=S,b++):(S++,b++);else if(v!==-1)b=v+1,x++,S=x;else return!1;for(;b<y.length&&y[b]==="*";)b++;return b===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Y0e.exports=_ut});var K0e=F((Oc,_L)=>{A();Oc.formatArgs=yut;Oc.save=Sut;Oc.load=Tut;Oc.useColors=Eut;Oc.storage=Iut();Oc.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`."))}})();Oc.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 Eut(){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 yut(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_L.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)}Oc.log=console.debug||console.log||(()=>{});function Sut(e){try{e?Oc.storage.setItem("debug",e):Oc.storage.removeItem("debug")}catch{}}function Tut(){let e;try{e=Oc.storage.getItem("debug")||Oc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Iut(){try{return localStorage}catch{}}_L.exports=D5()(Oc);var{formatters:but}=_L.exports;but.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Z0e=F((eJt,J0e)=>{"use strict";A();J0e.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 eye=F((nJt,X0e)=>{"use strict";A();var Cut=Fe("os"),W0e=Fe("tty"),Md=Z0e(),{env:Vs}=process,d_;Md("no-color")||Md("no-colors")||Md("color=false")||Md("color=never")?d_=0:(Md("color")||Md("colors")||Md("color=true")||Md("color=always"))&&(d_=1);"FORCE_COLOR"in Vs&&(Vs.FORCE_COLOR==="true"?d_=1:Vs.FORCE_COLOR==="false"?d_=0:d_=Vs.FORCE_COLOR.length===0?1:Math.min(parseInt(Vs.FORCE_COLOR,10),3));function B5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function N5(e,t){if(d_===0)return 0;if(Md("color=16m")||Md("color=full")||Md("color=truecolor"))return 3;if(Md("color=256"))return 2;if(e&&!t&&d_===void 0)return 0;let n=d_||0;if(Vs.TERM==="dumb")return n;if(process.platform==="win32"){let r=Cut.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Vs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Vs)||Vs.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Vs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vs.TEAMCITY_VERSION)?1:0;if(Vs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vs){let r=parseInt((Vs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vs.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vs.TERM)||"COLORTERM"in Vs?1:n}function vut(e){let t=N5(e,e&&e.isTTY);return B5(t)}X0e.exports={supportsColor:vut,stdout:B5(N5(!0,W0e.isatty(1))),stderr:B5(N5(!0,W0e.isatty(2)))}});var nye=F((Ys,yL)=>{A();var Rut=Fe("tty"),EL=Fe("util");Ys.init=kut;Ys.log=Nut;Ys.formatArgs=Dut;Ys.save=Out;Ys.load=wut;Ys.useColors=xut;Ys.destroy=EL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ys.colors=[6,2,3,4,5,1];try{let e=eye();e&&(e.stderr||e).level>=2&&(Ys.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{}Ys.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 xut(){return"colors"in Ys.inspectOpts?!!Ys.inspectOpts.colors:Rut.isatty(process.stderr.fd)}function Dut(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 VYe=Object.create;var lM=Object.defineProperty;var YYe=Object.getOwnPropertyDescriptor;var KYe=Object.getOwnPropertyNames;var JYe=Object.getPrototypeOf,ZYe=Object.prototype.hasOwnProperty;var Fe=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var O=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}};var F=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(n){throw t=0,n}},$s=(e,t)=>{for(var n in t)lM(e,n,{get:t[n],enumerable:!0})},ide=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of KYe(t))!ZYe.call(e,o)&&o!==n&&lM(e,o,{get:()=>t[o],enumerable:!(r=YYe(t,o))||r.enumerable});return e};var se=(e,t,n)=>(n=e!=null?VYe(JYe(e)):{},ide(t||!e||!e.__esModule?lM(n,"default",{value:e,enumerable:!0}):n,e)),Me=e=>ide(lM({},"__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.157"}}catch{}})()});var lg,z$=O(()=>{A();lg="1.9.1"});function WYe(e){let t=new Set([e]),n=new Set,r=e.match(ude);if(!r)return()=>!1;let o={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(o.prerelease!=null)return function(l){return l===e};function i(c){return n.add(c),!1}function s(c){return t.add(c),!0}return function(l){if(t.has(l))return!0;if(n.has(l))return!1;let f=l.match(ude);if(!f)return i(l);let h={major:+f[1],minor:+f[2],patch:+f[3],prerelease:f[4]};return h.prerelease!=null||o.major!==h.major?i(l):o.major===0?o.minor===h.minor&&o.patch<=h.patch?s(l):i(l):o.minor<=h.minor?s(l):i(l)}}var ude,cde,lde=O(()=>{A();z$();ude=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;cde=WYe(lg)});function mm(e,t,n,r=!1){var o;let i=sB[iB]=(o=sB[iB])!==null&&o!==void 0?o:{version:lg};if(!r&&i[e]){let s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return n.error(s.stack||s.message),!1}if(i.version!==lg){let s=new Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${lg}`);return n.error(s.stack||s.message),!1}return i[e]=t,n.debug(`@opentelemetry/api: Registered a global for ${e} v${lg}.`),!0}function xl(e){var t,n;let r=(t=sB[iB])===null||t===void 0?void 0:t.version;if(!(!r||!cde(r)))return(n=sB[iB])===null||n===void 0?void 0:n[e]}function Am(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${lg}.`);let n=sB[iB];n&&delete n[e]}var XYe,iB,sB,By=O(()=>{A();z$();lde();XYe=lg.split(".")[0],iB=Symbol.for(`opentelemetry.js.api.${XYe}`),sB=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{}});function aB(e,t,n){let r=xl("diag");if(r)return r[e](t,...n)}var dM,dde=O(()=>{A();By();dM=class{constructor(t){this._namespace=t.namespace||"DiagComponentLogger"}debug(...t){return aB("debug",this._namespace,t)}error(...t){return aB("error",this._namespace,t)}info(...t){return aB("info",this._namespace,t)}warn(...t){return aB("warn",this._namespace,t)}verbose(...t){return aB("verbose",this._namespace,t)}}});var ys,pM=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"})(ys||(ys={}))});function pde(e,t){e<ys.NONE?e=ys.NONE:e>ys.ALL&&(e=ys.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",ys.ERROR),warn:n("warn",ys.WARN),info:n("info",ys.INFO),debug:n("debug",ys.DEBUG),verbose:n("verbose",ys.VERBOSE)}}var fde=O(()=>{A();pM()});var eKe,qs,Ny=O(()=>{A();dde();fde();pM();By();eKe="diag",qs=class e{static instance(){return this._instance||(this._instance=new e),this._instance}constructor(){function t(o){return function(...i){let s=xl("diag");if(s)return s[o](...i)}}let n=this,r=(o,i={logLevel:ys.INFO})=>{var s,c,l;if(o===n){let y=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=y.stack)!==null&&s!==void 0?s:y.message),!1}typeof i=="number"&&(i={logLevel:i});let f=xl("diag"),h=pde((c=i.logLevel)!==null&&c!==void 0?c:ys.INFO,o);if(f&&!i.suppressOverrideMessage){let y=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";f.warn(`Current logger will be overwritten from ${y}`),h.warn(`Current logger will overwrite one already registered from ${y}`)}return mm("diag",h,n,!0)};n.setLogger=r,n.disable=()=>{Am(eKe,n)},n.createComponentLogger=o=>new dM(o),n.verbose=t("verbose"),n.debug=t("debug"),n.info=t("info"),n.warn=t("warn"),n.error=t("error")}}});var fM,mde=O(()=>{A();fM=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 Ade,gde=O(()=>{A();Ade=Symbol("BaggageEntryMetadata")});function hde(e={}){return new fM(new Map(Object.entries(e)))}function _de(e){return typeof e!="string"&&(tKe.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:Ade,toString(){return e}}}var tKe,j$=O(()=>{A();Ny();mde();gde();tKe=qs.instance()});function Dl(e){return Symbol.for(e)}var H$,Wb,uB=O(()=>{A();H$=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}}},Wb=new H$});var $$,q$,mM,Ede=O(()=>{A();$$=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],q$={};if(typeof console<"u"){let e=["error","warn","info","debug","trace","log"];for(let t of e)typeof console[t]=="function"&&(q$[t]=console[t])}mM=class{constructor(){function t(n){return function(...r){let o=q$[n];if(typeof o!="function"&&(o=q$.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<$$.length;n++)this[$$[n].n]=t($$[n].c)}}});function yde(){return t9}var V$,Xb,Y$,K$,J$,Z$,cB,W$,X$,e9,t9,nKe,rKe,oKe,iKe,sKe,aKe,uKe,n9=O(()=>{A();V$=class{constructor(){}createGauge(t,n){return rKe}createHistogram(t,n){return oKe}createCounter(t,n){return nKe}createUpDownCounter(t,n){return iKe}createObservableGauge(t,n){return aKe}createObservableCounter(t,n){return sKe}createObservableUpDownCounter(t,n){return uKe}addBatchObservableCallback(t,n){}removeBatchObservableCallback(t){}},Xb=class{},Y$=class extends Xb{add(t,n){}},K$=class extends Xb{add(t,n){}},J$=class extends Xb{record(t,n){}},Z$=class extends Xb{record(t,n){}},cB=class{addCallback(t){}removeCallback(t){}},W$=class extends cB{},X$=class extends cB{},e9=class extends cB{},t9=new V$,nKe=new Y$,rKe=new J$,oKe=new Z$,iKe=new K$,sKe=new W$,aKe=new X$,uKe=new e9});var AM,Sde=O(()=>{A();(function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"})(AM||(AM={}))});var gM,hM,r9=O(()=>{A();gM={get(e,t){if(e!=null)return e[t]},keys(e){return e==null?[]:Object.keys(e)}},hM={set(e,t,n){e!=null&&(e[t]=n)}}});var _M,Tde=O(()=>{A();uB();_M=class{active(){return Wb}with(t,n,r,...o){return n.call(r,...o)}bind(t,n){return n}enable(){return this}disable(){return this}}});var o9,cKe,gm,lB=O(()=>{A();Tde();By();Ny();o9="context",cKe=new _M,gm=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalContextManager(t){return mm(o9,t,qs.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 xl(o9)||cKe}disable(){this._getContextManager().disable(),Am(o9,qs.instance())}}});var Ja,i9=O(()=>{A();(function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"})(Ja||(Ja={}))});var dB,Oy,EM,yM=O(()=>{A();i9();dB="0000000000000000",Oy="00000000000000000000000000000000",EM={traceId:Oy,spanId:dB,traceFlags:Ja.NONE}});var hm,SM=O(()=>{A();yM();hm=class{constructor(t=EM){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 TM(e){return e.getValue(s9)||void 0}function Ide(){return TM(gm.getInstance().active())}function pB(e,t){return e.setValue(s9,t)}function bde(e){return e.deleteValue(s9)}function Cde(e,t){return pB(e,new hm(t))}function IM(e){var t;return(t=TM(e))===null||t===void 0?void 0:t.spanContext()}var s9,a9=O(()=>{A();uB();SM();lB();s9=Dl("OpenTelemetry Context Key SPAN")});function vde(e,t){if(typeof e!="string"||e.length!==t)return!1;let n=0;for(let r=0;r<e.length;r+=4)n+=(bM[e.charCodeAt(r)]|0)+(bM[e.charCodeAt(r+1)]|0)+(bM[e.charCodeAt(r+2)]|0)+(bM[e.charCodeAt(r+3)]|0);return n===t}function u9(e){return vde(e,32)&&e!==Oy}function c9(e){return vde(e,16)&&e!==dB}function dg(e){return u9(e.traceId)&&c9(e.spanId)}function Rde(e){return new hm(e)}var bM,CM=O(()=>{A();yM();SM();bM=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 lKe(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 l9,eC,d9=O(()=>{A();lB();a9();SM();CM();l9=gm.getInstance(),eC=class{startSpan(t,n,r=l9.active()){if(!!n?.root)return new hm;let i=r&&IM(r);return lKe(i)&&dg(i)?new hm(i):new hm}startActiveSpan(t,n,r,o){let i,s,c;if(arguments.length<2)return;arguments.length===2?c=n:arguments.length===3?(i=n,c=r):(i=n,s=r,c=o);let l=s??l9.active(),f=this.startSpan(t,i,l),h=pB(l,f);return l9.with(h,c,void 0,f)}}});var dKe,tC,p9=O(()=>{A();d9();dKe=new eC,tC=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):dKe}}});var vM,xde=O(()=>{A();d9();vM=class{getTracer(t,n,r){return new eC}}});var pKe,wy,f9=O(()=>{A();p9();xde();pKe=new vM,wy=class{getTracer(t,n,r){var o;return(o=this.getDelegateTracer(t,n,r))!==null&&o!==void 0?o:new tC(this,t,n,r)}getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:pKe}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 RM,Dde=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"})(RM||(RM={}))});var co,Bde=O(()=>{A();(function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"})(co||(co={}))});var di,Nde=O(()=>{A();(function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"})(di||(di={}))});function Ode(e){return AKe.test(e)}function wde(e){return gKe.test(e)&&!hKe.test(e)}var m9,fKe,mKe,AKe,gKe,hKe,kde=O(()=>{A();m9="[_0-9a-z-*/]",fKe=`[a-z]${m9}{0,255}`,mKe=`[a-z0-9]${m9}{0,240}@[a-z]${m9}{0,13}`,AKe=new RegExp(`^(?:${fKe}|${mKe})$`),gKe=/^[ -~]{0,255}[!-~]$/,hKe=/,|=/});var Pde,_Ke,Mde,Lde,xM,Ude=O(()=>{A();kde();Pde=32,_Ke=512,Mde=",",Lde="=",xM=class e{constructor(t){this._internalState=new Map,t&&this._parse(t)}set(t,n){let r=this._clone();return r._internalState.has(t)&&r._internalState.delete(t),r._internalState.set(t,n),r}unset(t){let n=this._clone();return n._internalState.delete(t),n}get(t){return this._internalState.get(t)}serialize(){return Array.from(this._internalState.keys()).reduceRight((t,n)=>(t.push(n+Lde+this.get(n)),t),[]).join(Mde)}_parse(t){t.length>_Ke||(this._internalState=t.split(Mde).reduceRight((n,r)=>{let o=r.trim(),i=o.indexOf(Lde);if(i!==-1){let s=o.slice(0,i),c=o.slice(i+1,r.length);Ode(s)&&wde(c)&&n.set(s,c)}return n},new Map),this._internalState.size>Pde&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,Pde))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let t=new e;return t._internalState=new Map(this._internalState),t}}});function Qde(e){return new xM(e)}var Fde=O(()=>{A();Ude()});var Ke,Gde=O(()=>{A();lB();Ke=gm.getInstance()});var Bl,zde=O(()=>{A();Ny();Bl=qs.instance()});var A9,jde,Hde=O(()=>{A();n9();A9=class{getMeter(t,n,r){return t9}},jde=new A9});var g9,DM,$de=O(()=>{A();Hde();By();Ny();g9="metrics",DM=class e{constructor(){}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalMeterProvider(t){return mm(g9,t,qs.instance())}getMeterProvider(){return xl(g9)||jde}getMeter(t,n,r){return this.getMeterProvider().getMeter(t,n,r)}disable(){Am(g9,qs.instance())}}});var h9,qde=O(()=>{A();$de();h9=DM.getInstance()});var BM,Vde=O(()=>{A();BM=class{inject(t,n){}extract(t,n){return t}fields(){return[]}}});function E9(e){return e.getValue(_9)||void 0}function Yde(){return E9(gm.getInstance().active())}function Kde(e,t){return e.setValue(_9,t)}function Jde(e){return e.deleteValue(_9)}var _9,Zde=O(()=>{A();lB();uB();_9=Dl("OpenTelemetry Baggage Key")});var y9,EKe,NM,Wde=O(()=>{A();By();Vde();r9();Zde();j$();Ny();y9="propagation",EKe=new BM,NM=class e{constructor(){this.createBaggage=hde,this.getBaggage=E9,this.getActiveBaggage=Yde,this.setBaggage=Kde,this.deleteBaggage=Jde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalPropagator(t){return mm(y9,t,qs.instance())}inject(t,n,r=hM){return this._getGlobalPropagator().inject(t,n,r)}extract(t,n,r=gM){return this._getGlobalPropagator().extract(t,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){Am(y9,qs.instance())}_getGlobalPropagator(){return xl(y9)||EKe}}});var ef,Xde=O(()=>{A();Wde();ef=NM.getInstance()});var S9,OM,epe=O(()=>{A();By();f9();CM();a9();Ny();S9="trace",OM=class e{constructor(){this._proxyTracerProvider=new wy,this.wrapSpanContext=Rde,this.isSpanContextValid=dg,this.deleteSpan=bde,this.getSpan=TM,this.getActiveSpan=Ide,this.getSpanContext=IM,this.setSpan=pB,this.setSpanContext=Cde}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalTracerProvider(t){let n=mm(S9,this._proxyTracerProvider,qs.instance());return n&&this._proxyTracerProvider.setDelegate(t),n}getTracerProvider(){return xl(S9)||this._proxyTracerProvider}getTracer(t,n){return this.getTracerProvider().getTracer(t,n)}disable(){Am(S9,qs.instance()),this._proxyTracerProvider=new wy}}});var $t,tpe=O(()=>{A();epe();$t=OM.getInstance()});var We={};$s(We,{DiagConsoleLogger:()=>mM,DiagLogLevel:()=>ys,INVALID_SPANID:()=>dB,INVALID_SPAN_CONTEXT:()=>EM,INVALID_TRACEID:()=>Oy,ProxyTracer:()=>tC,ProxyTracerProvider:()=>wy,ROOT_CONTEXT:()=>Wb,SamplingDecision:()=>RM,SpanKind:()=>co,SpanStatusCode:()=>di,TraceFlags:()=>Ja,ValueType:()=>AM,baggageEntryMetadataFromString:()=>_de,context:()=>Ke,createContextKey:()=>Dl,createNoopMeter:()=>yde,createTraceState:()=>Qde,default:()=>yKe,defaultTextMapGetter:()=>gM,defaultTextMapSetter:()=>hM,diag:()=>Bl,isSpanContextValid:()=>dg,isValidSpanId:()=>c9,isValidTraceId:()=>u9,metrics:()=>h9,propagation:()=>ef,trace:()=>$t});var yKe,ze=O(()=>{A();j$();uB();Ede();pM();n9();Sde();r9();p9();f9();Dde();Bde();Nde();i9();Fde();CM();yM();Gde();zde();qde();Xde();tpe();yKe={context:Ke,diag:Bl,metrics:h9,propagation:ef,trace:$t}});var fB=F(u_=>{"use strict";A();Object.defineProperty(u_,"__esModule",{value:!0});u_.isTracingSuppressed=u_.unsuppressTracing=u_.suppressTracing=void 0;var SKe=(ze(),Me(We)),T9=(0,SKe.createContextKey)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function TKe(e){return e.setValue(T9,!0)}u_.suppressTracing=TKe;function IKe(e){return e.deleteValue(T9)}u_.unsuppressTracing=IKe;function bKe(e){return e.getValue(T9)===!0}u_.isTracingSuppressed=bKe});var I9=F(Za=>{"use strict";A();Object.defineProperty(Za,"__esModule",{value:!0});Za.BAGGAGE_MAX_TOTAL_LENGTH=Za.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=Za.BAGGAGE_MAX_NAME_VALUE_PAIRS=Za.BAGGAGE_HEADER=Za.BAGGAGE_ITEMS_SEPARATOR=Za.BAGGAGE_PROPERTIES_SEPARATOR=Za.BAGGAGE_KEY_PAIR_SEPARATOR=void 0;Za.BAGGAGE_KEY_PAIR_SEPARATOR="=";Za.BAGGAGE_PROPERTIES_SEPARATOR=";";Za.BAGGAGE_ITEMS_SEPARATOR=",";Za.BAGGAGE_HEADER="baggage";Za.BAGGAGE_MAX_NAME_VALUE_PAIRS=180;Za.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096;Za.BAGGAGE_MAX_TOTAL_LENGTH=8192});var C9=F(kd=>{"use strict";A();Object.defineProperty(kd,"__esModule",{value:!0});kd.parseKeyPairsIntoRecord=kd.parseBaggageHeaderString=kd.parsePairKeyValue=kd.getKeyPairs=kd.serializeKeyPairs=void 0;var CKe=(ze(),Me(We)),_m=I9();function vKe(e){return e.reduce((t,n)=>{let r=`${t}${t!==""?_m.BAGGAGE_ITEMS_SEPARATOR:""}${n}`;return r.length>_m.BAGGAGE_MAX_TOTAL_LENGTH?t:r},"")}kd.serializeKeyPairs=vKe;function RKe(e){return e.getAllEntries().map(([t,n])=>{let r=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(r+=_m.BAGGAGE_PROPERTIES_SEPARATOR+n.metadata.toString()),r})}kd.getKeyPairs=RKe;function b9(e){if(!e)return;let t=e.indexOf(_m.BAGGAGE_PROPERTIES_SEPARATOR),n=t===-1?e:e.substring(0,t),r=n.indexOf(_m.BAGGAGE_KEY_PAIR_SEPARATOR);if(r<=0)return;let o=n.substring(0,r).trim(),i=n.substring(r+1).trim();if(!o||!i)return;let s,c;try{s=decodeURIComponent(o),c=decodeURIComponent(i)}catch{return}let l;if(t!==-1&&t<e.length-1){let f=e.substring(t+1);l=(0,CKe.baggageEntryMetadataFromString)(f)}return{key:s,value:c,metadata:l}}kd.parsePairKeyValue=b9;function xKe(e,t,n,r){let o=0;for(;o<e.length&&n<_m.BAGGAGE_MAX_NAME_VALUE_PAIRS;){let i=e.indexOf(_m.BAGGAGE_ITEMS_SEPARATOR,o),s=i===-1?e.length:i,c=s-o;if(c<=_m.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS){let l=b9(e.substring(o,s));if(l){let f=(n===0?0:1)+c;if(r+f>_m.BAGGAGE_MAX_TOTAL_LENGTH)break;t[l.key]=l.metadata?{value:l.value,metadata:l.metadata}:{value:l.value},n++,r+=f}}if(i===-1)break;o=i+1}return[n,r]}kd.parseBaggageHeaderString=xKe;function DKe(e){let t={};return typeof e=="string"&&e.length>0&&e.split(_m.BAGGAGE_ITEMS_SEPARATOR).forEach(n=>{let r=b9(n);r!==void 0&&r.value.length>0&&(t[r.key]=r.value)}),t}kd.parseKeyPairsIntoRecord=DKe});var npe=F(kM=>{"use strict";A();Object.defineProperty(kM,"__esModule",{value:!0});kM.W3CBaggagePropagator=void 0;var v9=(ze(),Me(We)),BKe=fB(),mB=I9(),wM=C9(),R9=class{inject(t,n,r){let o=v9.propagation.getBaggage(t);if(!o||(0,BKe.isTracingSuppressed)(t))return;let i=(0,wM.getKeyPairs)(o).filter(c=>c.length<=mB.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,mB.BAGGAGE_MAX_NAME_VALUE_PAIRS),s=(0,wM.serializeKeyPairs)(i);s.length>0&&r.set(n,mB.BAGGAGE_HEADER,s)}extract(t,n,r){let o=r.get(n,mB.BAGGAGE_HEADER);if(!o)return t;let i={},s=0,c=0;if(Array.isArray(o))for(let l=0;l<o.length;l++)[s,c]=(0,wM.parseBaggageHeaderString)(o[l],i,s,c);else[s]=(0,wM.parseBaggageHeaderString)(o,i,s,c);return s===0?t:v9.propagation.setBaggage(t,v9.propagation.createBaggage(i))}fields(){return[mB.BAGGAGE_HEADER]}};kM.W3CBaggagePropagator=R9});var rpe=F(PM=>{"use strict";A();Object.defineProperty(PM,"__esModule",{value:!0});PM.AnchoredClock=void 0;var x9=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}};PM.AnchoredClock=x9});var upe=F(c_=>{"use strict";A();Object.defineProperty(c_,"__esModule",{value:!0});c_.isAttributeValue=c_.isAttributeKey=c_.sanitizeAttributes=void 0;var ope=(ze(),Me(We));function NKe(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(!ipe(n)){ope.diag.warn(`Invalid attribute key: ${n}`);continue}let r=e[n];if(!spe(r)){ope.diag.warn(`Invalid attribute value set for key: ${n}`);continue}Array.isArray(r)?t[n]=r.slice():t[n]=r}return t}c_.sanitizeAttributes=NKe;function ipe(e){return typeof e=="string"&&e!==""}c_.isAttributeKey=ipe;function spe(e){return e==null?!0:Array.isArray(e)?OKe(e):ape(typeof e)}c_.isAttributeValue=spe;function OKe(e){let t;for(let n of e){if(n==null)continue;let r=typeof n;if(r!==t){if(!t){if(ape(r)){t=r;continue}return!1}return!1}}return!0}function ape(e){switch(e){case"number":case"boolean":case"string":return!0}return!1}});var D9=F(MM=>{"use strict";A();Object.defineProperty(MM,"__esModule",{value:!0});MM.loggingErrorHandler=void 0;var wKe=(ze(),Me(We));function kKe(){return e=>{wKe.diag.error(PKe(e))}}MM.loggingErrorHandler=kKe;function PKe(e){return typeof e=="string"?e:JSON.stringify(MKe(e))}function MKe(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 lpe=F(nC=>{"use strict";A();Object.defineProperty(nC,"__esModule",{value:!0});nC.globalErrorHandler=nC.setGlobalErrorHandler=void 0;var LKe=D9(),cpe=(0,LKe.loggingErrorHandler)();function UKe(e){cpe=e}nC.setGlobalErrorHandler=UKe;function QKe(e){try{cpe(e)}catch{}}nC.globalErrorHandler=QKe});var mpe=F(Em=>{"use strict";A();Object.defineProperty(Em,"__esModule",{value:!0});Em.getStringListFromEnv=Em.getBooleanFromEnv=Em.getStringFromEnv=Em.getNumberFromEnv=void 0;var dpe=(ze(),Me(We)),ppe=Fe("util");function FKe(e){let t=process.env[e];if(t==null||t.trim()==="")return;let n=Number(t);if(isNaN(n)){dpe.diag.warn(`Unknown value ${(0,ppe.inspect)(t)} for ${e}, expected a number, using defaults`);return}return n}Em.getNumberFromEnv=FKe;function fpe(e){let t=process.env[e];if(!(t==null||t.trim()===""))return t}Em.getStringFromEnv=fpe;function GKe(e){let t=process.env[e]?.trim().toLowerCase();return t==null||t===""?!1:t==="true"?!0:(t==="false"||dpe.diag.warn(`Unknown value ${(0,ppe.inspect)(t)} for ${e}, expected 'true' or 'false', falling back to 'false' (default)`),!1)}Em.getBooleanFromEnv=GKe;function zKe(e){return fpe(e)?.split(",").map(t=>t.trim()).filter(t=>t!=="")}Em.getStringListFromEnv=zKe});var Ape=F(LM=>{"use strict";A();Object.defineProperty(LM,"__esModule",{value:!0});LM._globalThis=void 0;LM._globalThis=globalThis});var gpe=F(UM=>{"use strict";A();Object.defineProperty(UM,"__esModule",{value:!0});UM.VERSION=void 0;UM.VERSION="2.8.0"});function Ni(e){let t={},n=e.length;for(let r=0;r<n;r++){let o=e[r];o&&(t[String(o).toUpperCase().replace(/[-.]/g,"_")]=o)}return t}var B9=O(()=>{A()});var hpe,_pe,Epe,ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,sfe,afe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,sme,ame,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme,jKe,N9,HKe,$Ke,qKe,VKe,O9,YKe,KKe,JKe,ZKe,WKe,XKe,eJe,tJe,nJe,rJe,oJe,iJe,sJe,aJe,uJe,cJe,lJe,dJe,w9,pJe,fJe,mJe,AJe,gJe,hJe,_Je,EJe,yJe,SJe,TJe,IJe,k9,bJe,CJe,P9,M9,vJe,RJe,xJe,DJe,BJe,NJe,OJe,wJe,kJe,PJe,MJe,LJe,UJe,QJe,FJe,GJe,zJe,AB,rC,L9,jJe,HJe,ky,$Je,qJe,VJe,YJe,U9,Q9,KJe,F9,JJe,ZJe,WJe,XJe,eZe,tZe,nZe,rZe,oZe,iZe,sZe,aZe,uZe,cZe,lZe,dZe,pZe,fZe,mZe,AZe,gZe,hZe,_Ze,G9,EZe,yZe,SZe,TZe,IZe,bZe,CZe,vZe,RZe,xZe,DZe,BZe,NZe,OZe,wZe,kZe,PZe,MZe,LZe,z9,UZe,j9,QZe,FZe,GZe,zZe,jZe,HZe,$Ze,qZe,VZe,Lme,Ume,Qme,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,sAe,aAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe,YZe,KZe,JZe,ZZe,WZe,XZe,eWe,tWe,nWe,rWe,oWe,iWe,sWe,aWe,uWe,cWe,lWe,dWe,pWe,fWe,mWe,AWe,gWe,hWe,_We,EWe,yWe,SWe,TWe,IWe,bWe,CWe,vWe,RWe,xWe,DWe,BWe,NWe,OWe,wWe,kWe,PWe,MWe,LWe,UWe,QWe,FWe,GWe,BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe,zWe,jWe,HWe,$We,qWe,VWe,YWe,KWe,JWe,ZWe,WWe,XWe,GAe,zAe,jAe,HAe,$Ae,eXe,tXe,nXe,rXe,oXe,iXe,qAe,VAe,YAe,sXe,aXe,uXe,cXe,KAe,JAe,ZAe,WAe,lXe,dXe,pXe,fXe,mXe,XAe,ege,tge,nge,rge,oge,ige,AXe,gXe,hXe,_Xe,EXe,yXe,SXe,TXe,sge,age,uge,cge,lge,IXe,bXe,CXe,vXe,RXe,xXe,dge,pge,fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge,DXe,BXe,NXe,OXe,wXe,kXe,PXe,MXe,LXe,UXe,QXe,FXe,GXe,zXe,jXe,HXe,$Xe,qXe,VXe,YXe,KXe,JXe,Oge,wge,kge,Pge,Mge,ZXe,WXe,XXe,eet,tet,net,Lge,Uge,ret,oet,iet,Qge,Fge,set,aet,uet,Gge,zge,jge,Hge,$ge,qge,Vge,Yge,Kge,Jge,Zge,Wge,Xge,ehe,the,nhe,rhe,cet,det,pet,fet,met,Aet,get,het,_et,Eet,yet,Tet,Iet,bet,Cet,vet,Ret,xet,ohe,ihe,Det,Bet,Net,she=O(()=>{A();B9();hpe="aws.lambda.invoked_arn",_pe="db.system",Epe="db.connection_string",ype="db.user",Spe="db.jdbc.driver_classname",Tpe="db.name",Ipe="db.statement",bpe="db.operation",Cpe="db.mssql.instance_name",vpe="db.cassandra.keyspace",Rpe="db.cassandra.page_size",xpe="db.cassandra.consistency_level",Dpe="db.cassandra.table",Bpe="db.cassandra.idempotence",Npe="db.cassandra.speculative_execution_count",Ope="db.cassandra.coordinator.id",wpe="db.cassandra.coordinator.dc",kpe="db.hbase.namespace",Ppe="db.redis.database_index",Mpe="db.mongodb.collection",Lpe="db.sql.table",Upe="exception.type",Qpe="exception.message",Fpe="exception.stacktrace",Gpe="exception.escaped",zpe="faas.trigger",jpe="faas.execution",Hpe="faas.document.collection",$pe="faas.document.operation",qpe="faas.document.time",Vpe="faas.document.name",Ype="faas.time",Kpe="faas.cron",Jpe="faas.coldstart",Zpe="faas.invoked_name",Wpe="faas.invoked_provider",Xpe="faas.invoked_region",efe="net.transport",tfe="net.peer.ip",nfe="net.peer.port",rfe="net.peer.name",ofe="net.host.ip",ife="net.host.port",sfe="net.host.name",afe="net.host.connection.type",ufe="net.host.connection.subtype",cfe="net.host.carrier.name",lfe="net.host.carrier.mcc",dfe="net.host.carrier.mnc",pfe="net.host.carrier.icc",ffe="peer.service",mfe="enduser.id",Afe="enduser.role",gfe="enduser.scope",hfe="thread.id",_fe="thread.name",Efe="code.function",yfe="code.namespace",Sfe="code.filepath",Tfe="code.lineno",Ife="http.method",bfe="http.url",Cfe="http.target",vfe="http.host",Rfe="http.scheme",xfe="http.status_code",Dfe="http.flavor",Bfe="http.user_agent",Nfe="http.request_content_length",Ofe="http.request_content_length_uncompressed",wfe="http.response_content_length",kfe="http.response_content_length_uncompressed",Pfe="http.server_name",Mfe="http.route",Lfe="http.client_ip",Ufe="aws.dynamodb.table_names",Qfe="aws.dynamodb.consumed_capacity",Ffe="aws.dynamodb.item_collection_metrics",Gfe="aws.dynamodb.provisioned_read_capacity",zfe="aws.dynamodb.provisioned_write_capacity",jfe="aws.dynamodb.consistent_read",Hfe="aws.dynamodb.projection",$fe="aws.dynamodb.limit",qfe="aws.dynamodb.attributes_to_get",Vfe="aws.dynamodb.index_name",Yfe="aws.dynamodb.select",Kfe="aws.dynamodb.global_secondary_indexes",Jfe="aws.dynamodb.local_secondary_indexes",Zfe="aws.dynamodb.exclusive_start_table",Wfe="aws.dynamodb.table_count",Xfe="aws.dynamodb.scan_forward",eme="aws.dynamodb.segment",tme="aws.dynamodb.total_segments",nme="aws.dynamodb.count",rme="aws.dynamodb.scanned_count",ome="aws.dynamodb.attribute_definitions",ime="aws.dynamodb.global_secondary_index_updates",sme="messaging.system",ame="messaging.destination",ume="messaging.destination_kind",cme="messaging.temp_destination",lme="messaging.protocol",dme="messaging.protocol_version",pme="messaging.url",fme="messaging.message_id",mme="messaging.conversation_id",Ame="messaging.message_payload_size_bytes",gme="messaging.message_payload_compressed_size_bytes",hme="messaging.operation",_me="messaging.consumer_id",Eme="messaging.rabbitmq.routing_key",yme="messaging.kafka.message_key",Sme="messaging.kafka.consumer_group",Tme="messaging.kafka.client_id",Ime="messaging.kafka.partition",bme="messaging.kafka.tombstone",Cme="rpc.system",vme="rpc.service",Rme="rpc.method",xme="rpc.grpc.status_code",Dme="rpc.jsonrpc.version",Bme="rpc.jsonrpc.request_id",Nme="rpc.jsonrpc.error_code",Ome="rpc.jsonrpc.error_message",wme="message.type",kme="message.id",Pme="message.compressed_size",Mme="message.uncompressed_size",jKe=hpe,N9=_pe,HKe=Epe,$Ke=ype,qKe=Spe,VKe=Tpe,O9=Ipe,YKe=bpe,KKe=Cpe,JKe=vpe,ZKe=Rpe,WKe=xpe,XKe=Dpe,eJe=Bpe,tJe=Npe,nJe=Ope,rJe=wpe,oJe=kpe,iJe=Ppe,sJe=Mpe,aJe=Lpe,uJe=Upe,cJe=Qpe,lJe=Fpe,dJe=Gpe,w9=zpe,pJe=jpe,fJe=Hpe,mJe=$pe,AJe=qpe,gJe=Vpe,hJe=Ype,_Je=Kpe,EJe=Jpe,yJe=Zpe,SJe=Wpe,TJe=Xpe,IJe=efe,k9=tfe,bJe=nfe,CJe=rfe,P9=ofe,M9=ife,vJe=sfe,RJe=afe,xJe=ufe,DJe=cfe,BJe=lfe,NJe=dfe,OJe=pfe,wJe=ffe,kJe=mfe,PJe=Afe,MJe=gfe,LJe=hfe,UJe=_fe,QJe=Efe,FJe=yfe,GJe=Sfe,zJe=Tfe,AB=Ife,rC=bfe,L9=Cfe,jJe=vfe,HJe=Rfe,ky=xfe,$Je=Dfe,qJe=Bfe,VJe=Nfe,YJe=Ofe,U9=wfe,Q9=kfe,KJe=Pfe,F9=Mfe,JJe=Lfe,ZJe=Ufe,WJe=Qfe,XJe=Ffe,eZe=Gfe,tZe=zfe,nZe=jfe,rZe=Hfe,oZe=$fe,iZe=qfe,sZe=Vfe,aZe=Yfe,uZe=Kfe,cZe=Jfe,lZe=Zfe,dZe=Wfe,pZe=Xfe,fZe=eme,mZe=tme,AZe=nme,gZe=rme,hZe=ome,_Ze=ime,G9=sme,EZe=ame,yZe=ume,SZe=cme,TZe=lme,IZe=dme,bZe=pme,CZe=fme,vZe=mme,RZe=Ame,xZe=gme,DZe=hme,BZe=_me,NZe=Eme,OZe=yme,wZe=Sme,kZe=Tme,PZe=Ime,MZe=bme,LZe=Cme,z9=vme,UZe=Rme,j9=xme,QZe=Dme,FZe=Bme,GZe=Nme,zZe=Ome,jZe=wme,HZe=kme,$Ze=Pme,qZe=Mme,VZe=Ni([hpe,_pe,Epe,ype,Spe,Tpe,Ipe,bpe,Cpe,vpe,Rpe,xpe,Dpe,Bpe,Npe,Ope,wpe,kpe,Ppe,Mpe,Lpe,Upe,Qpe,Fpe,Gpe,zpe,jpe,Hpe,$pe,qpe,Vpe,Ype,Kpe,Jpe,Zpe,Wpe,Xpe,efe,tfe,nfe,rfe,ofe,ife,sfe,afe,ufe,cfe,lfe,dfe,pfe,ffe,mfe,Afe,gfe,hfe,_fe,Efe,yfe,Sfe,Tfe,Ife,bfe,Cfe,vfe,Rfe,xfe,Dfe,Bfe,Nfe,Ofe,wfe,kfe,Pfe,Mfe,Lfe,Ufe,Qfe,Ffe,Gfe,zfe,jfe,Hfe,$fe,qfe,Vfe,Yfe,Kfe,Jfe,Zfe,Wfe,Xfe,eme,tme,nme,rme,ome,ime,sme,ame,ume,cme,lme,dme,pme,fme,mme,Ame,gme,hme,_me,Eme,yme,Sme,Tme,Ime,bme,Cme,vme,Rme,xme,Dme,Bme,Nme,Ome,wme,kme,Pme,Mme]),Lme="other_sql",Ume="mssql",Qme="mysql",Fme="oracle",Gme="db2",zme="postgresql",jme="redshift",Hme="hive",$me="cloudscape",qme="hsqldb",Vme="progress",Yme="maxdb",Kme="hanadb",Jme="ingres",Zme="firstsql",Wme="edb",Xme="cache",eAe="adabas",tAe="firebird",nAe="derby",rAe="filemaker",oAe="informix",iAe="instantdb",sAe="interbase",aAe="mariadb",uAe="netezza",cAe="pervasive",lAe="pointbase",dAe="sqlite",pAe="sybase",fAe="teradata",mAe="vertica",AAe="h2",gAe="coldfusion",hAe="cassandra",_Ae="hbase",EAe="mongodb",yAe="redis",SAe="couchbase",TAe="couchdb",IAe="cosmosdb",bAe="dynamodb",CAe="neo4j",vAe="geode",RAe="elasticsearch",xAe="memcached",DAe="cockroachdb",YZe=Lme,KZe=Ume,JZe=Qme,ZZe=Fme,WZe=Gme,XZe=zme,eWe=jme,tWe=Hme,nWe=$me,rWe=qme,oWe=Vme,iWe=Yme,sWe=Kme,aWe=Jme,uWe=Zme,cWe=Wme,lWe=Xme,dWe=eAe,pWe=tAe,fWe=nAe,mWe=rAe,AWe=oAe,gWe=iAe,hWe=sAe,_We=aAe,EWe=uAe,yWe=cAe,SWe=lAe,TWe=dAe,IWe=pAe,bWe=fAe,CWe=mAe,vWe=AAe,RWe=gAe,xWe=hAe,DWe=_Ae,BWe=EAe,NWe=yAe,OWe=SAe,wWe=TAe,kWe=IAe,PWe=bAe,MWe=CAe,LWe=vAe,UWe=RAe,QWe=xAe,FWe=DAe,GWe=Ni([Lme,Ume,Qme,Fme,Gme,zme,jme,Hme,$me,qme,Vme,Yme,Kme,Jme,Zme,Wme,Xme,eAe,tAe,nAe,rAe,oAe,iAe,sAe,aAe,uAe,cAe,lAe,dAe,pAe,fAe,mAe,AAe,gAe,hAe,_Ae,EAe,yAe,SAe,TAe,IAe,bAe,CAe,vAe,RAe,xAe,DAe]),BAe="all",NAe="each_quorum",OAe="quorum",wAe="local_quorum",kAe="one",PAe="two",MAe="three",LAe="local_one",UAe="any",QAe="serial",FAe="local_serial",zWe=BAe,jWe=NAe,HWe=OAe,$We=wAe,qWe=kAe,VWe=PAe,YWe=MAe,KWe=LAe,JWe=UAe,ZWe=QAe,WWe=FAe,XWe=Ni([BAe,NAe,OAe,wAe,kAe,PAe,MAe,LAe,UAe,QAe,FAe]),GAe="datasource",zAe="http",jAe="pubsub",HAe="timer",$Ae="other",eXe=GAe,tXe=zAe,nXe=jAe,rXe=HAe,oXe=$Ae,iXe=Ni([GAe,zAe,jAe,HAe,$Ae]),qAe="insert",VAe="edit",YAe="delete",sXe=qAe,aXe=VAe,uXe=YAe,cXe=Ni([qAe,VAe,YAe]),KAe="alibaba_cloud",JAe="aws",ZAe="azure",WAe="gcp",lXe=KAe,dXe=JAe,pXe=ZAe,fXe=WAe,mXe=Ni([KAe,JAe,ZAe,WAe]),XAe="ip_tcp",ege="ip_udp",tge="ip",nge="unix",rge="pipe",oge="inproc",ige="other",AXe=XAe,gXe=ege,hXe=tge,_Xe=nge,EXe=rge,yXe=oge,SXe=ige,TXe=Ni([XAe,ege,tge,nge,rge,oge,ige]),sge="wifi",age="wired",uge="cell",cge="unavailable",lge="unknown",IXe=sge,bXe=age,CXe=uge,vXe=cge,RXe=lge,xXe=Ni([sge,age,uge,cge,lge]),dge="gprs",pge="edge",fge="umts",mge="cdma",Age="evdo_0",gge="evdo_a",hge="cdma2000_1xrtt",_ge="hsdpa",Ege="hsupa",yge="hspa",Sge="iden",Tge="evdo_b",Ige="lte",bge="ehrpd",Cge="hspap",vge="gsm",Rge="td_scdma",xge="iwlan",Dge="nr",Bge="nrnsa",Nge="lte_ca",DXe=dge,BXe=pge,NXe=fge,OXe=mge,wXe=Age,kXe=gge,PXe=hge,MXe=_ge,LXe=Ege,UXe=yge,QXe=Sge,FXe=Tge,GXe=Ige,zXe=bge,jXe=Cge,HXe=vge,$Xe=Rge,qXe=xge,VXe=Dge,YXe=Bge,KXe=Nge,JXe=Ni([dge,pge,fge,mge,Age,gge,hge,_ge,Ege,yge,Sge,Tge,Ige,bge,Cge,vge,Rge,xge,Dge,Bge,Nge]),Oge="1.0",wge="1.1",kge="2.0",Pge="SPDY",Mge="QUIC",ZXe=Oge,WXe=wge,XXe=kge,eet=Pge,tet=Mge,net={HTTP_1_0:Oge,HTTP_1_1:wge,HTTP_2_0:kge,SPDY:Pge,QUIC:Mge},Lge="queue",Uge="topic",ret=Lge,oet=Uge,iet=Ni([Lge,Uge]),Qge="receive",Fge="process",set=Qge,aet=Fge,uet=Ni([Qge,Fge]),Gge=0,zge=1,jge=2,Hge=3,$ge=4,qge=5,Vge=6,Yge=7,Kge=8,Jge=9,Zge=10,Wge=11,Xge=12,ehe=13,the=14,nhe=15,rhe=16,cet=Gge,det=zge,pet=jge,fet=Hge,met=$ge,Aet=qge,get=Vge,het=Yge,_et=Kge,Eet=Jge,yet=Zge,Tet=Wge,Iet=Xge,bet=ehe,Cet=the,vet=nhe,Ret=rhe,xet={OK:Gge,CANCELLED:zge,UNKNOWN:jge,INVALID_ARGUMENT:Hge,DEADLINE_EXCEEDED:$ge,NOT_FOUND:qge,ALREADY_EXISTS:Vge,PERMISSION_DENIED:Yge,RESOURCE_EXHAUSTED:Kge,FAILED_PRECONDITION:Jge,ABORTED:Zge,OUT_OF_RANGE:Wge,UNIMPLEMENTED:Xge,INTERNAL:ehe,UNAVAILABLE:the,DATA_LOSS:nhe,UNAUTHENTICATED:rhe},ohe="SENT",ihe="RECEIVED",Det=ohe,Bet=ihe,Net=Ni([ohe,ihe])});var ahe=O(()=>{A();she()});var uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,w_e,k_e,Oet,wet,ket,Pet,Met,Let,Uet,Qet,Fet,Get,zet,jet,Het,$et,qet,Vet,Yet,Ket,Jet,Zet,Wet,Xet,ett,ttt,ntt,rtt,ott,itt,stt,att,utt,ctt,ltt,dtt,ptt,ftt,mtt,Att,gtt,htt,_tt,Ett,ytt,Stt,Ttt,Itt,btt,Ctt,vtt,Rtt,xtt,Dtt,Btt,Ntt,Ott,wtt,ktt,Ptt,Mtt,Ltt,Utt,Qtt,Ftt,Gtt,ztt,jtt,Htt,$tt,qtt,Vtt,Ytt,H9,Ktt,Jtt,Ztt,Wtt,Xtt,ent,tnt,nnt,rnt,ont,P_e,M_e,L_e,U_e,int,snt,ant,unt,cnt,Q_e,F_e,G_e,z_e,j_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe,lnt,dnt,pnt,fnt,mnt,Ant,gnt,hnt,_nt,Ent,ynt,Snt,Tnt,Int,bnt,Cnt,vnt,Rnt,nEe,rEe,xnt,Dnt,Bnt,oEe,iEe,sEe,aEe,uEe,cEe,lEe,Nnt,Ont,wnt,knt,Pnt,Mnt,Lnt,Unt,dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe,Qnt,Fnt,Gnt,znt,jnt,Hnt,$nt,qnt,Vnt,Ynt,Knt,Jnt,TEe,IEe,bEe,CEe,vEe,REe,xEe,DEe,BEe,NEe,Znt,Wnt,Xnt,ert,trt,nrt,rrt,ort,irt,srt,art,OEe=O(()=>{A();B9();uhe="cloud.provider",che="cloud.account.id",lhe="cloud.region",dhe="cloud.availability_zone",phe="cloud.platform",fhe="aws.ecs.container.arn",mhe="aws.ecs.cluster.arn",Ahe="aws.ecs.launchtype",ghe="aws.ecs.task.arn",hhe="aws.ecs.task.family",_he="aws.ecs.task.revision",Ehe="aws.eks.cluster.arn",yhe="aws.log.group.names",She="aws.log.group.arns",The="aws.log.stream.names",Ihe="aws.log.stream.arns",bhe="container.name",Che="container.id",vhe="container.runtime",Rhe="container.image.name",xhe="container.image.tag",Dhe="deployment.environment",Bhe="device.id",Nhe="device.model.identifier",Ohe="device.model.name",whe="faas.name",khe="faas.id",Phe="faas.version",Mhe="faas.instance",Lhe="faas.max_memory",Uhe="host.id",Qhe="host.name",Fhe="host.type",Ghe="host.arch",zhe="host.image.name",jhe="host.image.id",Hhe="host.image.version",$he="k8s.cluster.name",qhe="k8s.node.name",Vhe="k8s.node.uid",Yhe="k8s.namespace.name",Khe="k8s.pod.uid",Jhe="k8s.pod.name",Zhe="k8s.container.name",Whe="k8s.replicaset.uid",Xhe="k8s.replicaset.name",e_e="k8s.deployment.uid",t_e="k8s.deployment.name",n_e="k8s.statefulset.uid",r_e="k8s.statefulset.name",o_e="k8s.daemonset.uid",i_e="k8s.daemonset.name",s_e="k8s.job.uid",a_e="k8s.job.name",u_e="k8s.cronjob.uid",c_e="k8s.cronjob.name",l_e="os.type",d_e="os.description",p_e="os.name",f_e="os.version",m_e="process.pid",A_e="process.executable.name",g_e="process.executable.path",h_e="process.command",__e="process.command_line",E_e="process.command_args",y_e="process.owner",S_e="process.runtime.name",T_e="process.runtime.version",I_e="process.runtime.description",b_e="service.name",C_e="service.namespace",v_e="service.instance.id",R_e="service.version",x_e="telemetry.sdk.name",D_e="telemetry.sdk.language",B_e="telemetry.sdk.version",N_e="telemetry.auto.version",O_e="webengine.name",w_e="webengine.version",k_e="webengine.description",Oet=uhe,wet=che,ket=lhe,Pet=dhe,Met=phe,Let=fhe,Uet=mhe,Qet=Ahe,Fet=ghe,Get=hhe,zet=_he,jet=Ehe,Het=yhe,$et=She,qet=The,Vet=Ihe,Yet=bhe,Ket=Che,Jet=vhe,Zet=Rhe,Wet=xhe,Xet=Dhe,ett=Bhe,ttt=Nhe,ntt=Ohe,rtt=whe,ott=khe,itt=Phe,stt=Mhe,att=Lhe,utt=Uhe,ctt=Qhe,ltt=Fhe,dtt=Ghe,ptt=zhe,ftt=jhe,mtt=Hhe,Att=$he,gtt=qhe,htt=Vhe,_tt=Yhe,Ett=Khe,ytt=Jhe,Stt=Zhe,Ttt=Whe,Itt=Xhe,btt=e_e,Ctt=t_e,vtt=n_e,Rtt=r_e,xtt=o_e,Dtt=i_e,Btt=s_e,Ntt=a_e,Ott=u_e,wtt=c_e,ktt=l_e,Ptt=d_e,Mtt=p_e,Ltt=f_e,Utt=m_e,Qtt=A_e,Ftt=g_e,Gtt=h_e,ztt=__e,jtt=E_e,Htt=y_e,$tt=S_e,qtt=T_e,Vtt=I_e,Ytt=b_e,H9=C_e,Ktt=v_e,Jtt=R_e,Ztt=x_e,Wtt=D_e,Xtt=B_e,ent=N_e,tnt=O_e,nnt=w_e,rnt=k_e,ont=Ni([uhe,che,lhe,dhe,phe,fhe,mhe,Ahe,ghe,hhe,_he,Ehe,yhe,She,The,Ihe,bhe,Che,vhe,Rhe,xhe,Dhe,Bhe,Nhe,Ohe,whe,khe,Phe,Mhe,Lhe,Uhe,Qhe,Fhe,Ghe,zhe,jhe,Hhe,$he,qhe,Vhe,Yhe,Khe,Jhe,Zhe,Whe,Xhe,e_e,t_e,n_e,r_e,o_e,i_e,s_e,a_e,u_e,c_e,l_e,d_e,p_e,f_e,m_e,A_e,g_e,h_e,__e,E_e,y_e,S_e,T_e,I_e,b_e,C_e,v_e,R_e,x_e,D_e,B_e,N_e,O_e,w_e,k_e]),P_e="alibaba_cloud",M_e="aws",L_e="azure",U_e="gcp",int=P_e,snt=M_e,ant=L_e,unt=U_e,cnt=Ni([P_e,M_e,L_e,U_e]),Q_e="alibaba_cloud_ecs",F_e="alibaba_cloud_fc",G_e="aws_ec2",z_e="aws_ecs",j_e="aws_eks",H_e="aws_lambda",$_e="aws_elastic_beanstalk",q_e="azure_vm",V_e="azure_container_instances",Y_e="azure_aks",K_e="azure_functions",J_e="azure_app_service",Z_e="gcp_compute_engine",W_e="gcp_cloud_run",X_e="gcp_kubernetes_engine",eEe="gcp_cloud_functions",tEe="gcp_app_engine",lnt=Q_e,dnt=F_e,pnt=G_e,fnt=z_e,mnt=j_e,Ant=H_e,gnt=$_e,hnt=q_e,_nt=V_e,Ent=Y_e,ynt=K_e,Snt=J_e,Tnt=Z_e,Int=W_e,bnt=X_e,Cnt=eEe,vnt=tEe,Rnt=Ni([Q_e,F_e,G_e,z_e,j_e,H_e,$_e,q_e,V_e,Y_e,K_e,J_e,Z_e,W_e,X_e,eEe,tEe]),nEe="ec2",rEe="fargate",xnt=nEe,Dnt=rEe,Bnt=Ni([nEe,rEe]),oEe="amd64",iEe="arm32",sEe="arm64",aEe="ia64",uEe="ppc32",cEe="ppc64",lEe="x86",Nnt=oEe,Ont=iEe,wnt=sEe,knt=aEe,Pnt=uEe,Mnt=cEe,Lnt=lEe,Unt=Ni([oEe,iEe,sEe,aEe,uEe,cEe,lEe]),dEe="windows",pEe="linux",fEe="darwin",mEe="freebsd",AEe="netbsd",gEe="openbsd",hEe="dragonflybsd",_Ee="hpux",EEe="aix",yEe="solaris",SEe="z_os",Qnt=dEe,Fnt=pEe,Gnt=fEe,znt=mEe,jnt=AEe,Hnt=gEe,$nt=hEe,qnt=_Ee,Vnt=EEe,Ynt=yEe,Knt=SEe,Jnt=Ni([dEe,pEe,fEe,mEe,AEe,gEe,hEe,_Ee,EEe,yEe,SEe]),TEe="cpp",IEe="dotnet",bEe="erlang",CEe="go",vEe="java",REe="nodejs",xEe="php",DEe="python",BEe="ruby",NEe="webjs",Znt=TEe,Wnt=IEe,Xnt=bEe,ert=CEe,trt=vEe,nrt=REe,rrt=xEe,ort=DEe,irt=BEe,srt=NEe,art=Ni([TEe,IEe,bEe,CEe,vEe,REe,xEe,DEe,BEe,NEe])});var wEe=O(()=>{A();OEe()});var urt,crt,lrt,drt,prt,frt,mrt,Art,grt,hrt,_rt,Ert,yrt,Srt,Trt,Irt,brt,Crt,vrt,Rrt,xrt,Drt,Brt,Nrt,Ort,$9,q9,wrt,oC,krt,V9,Y9,Prt,Py,Mrt,Lrt,Urt,Qrt,Frt,Grt,zrt,jrt,lYt,dYt,K9,Hrt,$rt,qrt,Vrt,Yrt,Krt,My,Jrt,Zrt,Wrt,pYt,Xrt,eot,tot,not,fYt,rot,oot,iot,sot,pg,fg,aot,uot,cot,lot,dot,pot,fot,mot,Aot,mYt,got,hot,_ot,Eot,yot,Sot,J9,Z9,Tot,W9,X9,Iot,bot,AYt,gYt,Cot,vot,Rot,xot,Dot,Bot,Not,Oot,hYt,wot,e5,t5,kot,n5,Pot,r5,Mot,Lot,Uot,Qot,Fot,Got,zot,jot,Hot,_Yt,$ot,qot,EYt,Vot,Yot,yYt,Kot,Jot,Zot,Wot,Xot,eit,tit,nit,l_,rit,oit,iit,o5,kEe=O(()=>{A();urt="aspnetcore.diagnostics.exception.result",crt="aborted",lrt="handled",drt="skipped",prt="unhandled",frt="aspnetcore.diagnostics.handler.type",mrt="aspnetcore.rate_limiting.policy",Art="aspnetcore.rate_limiting.result",grt="acquired",hrt="endpoint_limiter",_rt="global_limiter",Ert="request_canceled",yrt="aspnetcore.request.is_unhandled",Srt="aspnetcore.routing.is_fallback",Trt="aspnetcore.routing.match_status",Irt="failure",brt="success",Crt="aspnetcore.user.is_authenticated",vrt="client.address",Rrt="client.port",xrt="code.column.number",Drt="code.file.path",Brt="code.function.name",Nrt="code.line.number",Ort="code.stacktrace",$9="db.collection.name",q9="db.namespace",wrt="db.operation.batch.size",oC="db.operation.name",krt="db.query.summary",V9="db.query.text",Y9="db.response.status_code",Prt="db.stored_procedure.name",Py="db.system.name",Mrt="mariadb",Lrt="microsoft.sql_server",Urt="mysql",Qrt="postgresql",Frt="dotnet.gc.heap.generation",Grt="gen0",zrt="gen1",jrt="gen2",lYt="loh",dYt="poh",K9="error.type",Hrt="_OTHER",$rt="exception.escaped",qrt="exception.message",Vrt="exception.stacktrace",Yrt="exception.type",Krt=e=>`http.request.header.${e}`,My="http.request.method",Jrt="_OTHER",Zrt="CONNECT",Wrt="DELETE",pYt="GET",Xrt="HEAD",eot="OPTIONS",tot="PATCH",not="POST",fYt="PUT",rot="TRACE",oot="http.request.method_original",iot="http.request.resend_count",sot=e=>`http.response.header.${e}`,pg="http.response.status_code",fg="http.route",aot="jvm.gc.action",uot="jvm.gc.name",cot="jvm.memory.pool.name",lot="jvm.memory.type",dot="heap",pot="non_heap",fot="jvm.thread.daemon",mot="jvm.thread.state",Aot="blocked",mYt="new",got="runnable",hot="terminated",_ot="timed_waiting",Eot="waiting",yot="network.local.address",Sot="network.local.port",J9="network.peer.address",Z9="network.peer.port",Tot="network.protocol.name",W9="network.protocol.version",X9="network.transport",Iot="pipe",bot="quic",AYt="tcp",gYt="udp",Cot="unix",vot="network.type",Rot="ipv4",xot="ipv6",Dot="otel.scope.name",Bot="otel.scope.version",Not="otel.status_code",Oot="ERROR",hYt="OK",wot="otel.status_description",e5="server.address",t5="server.port",kot="service.instance.id",n5="service.name",Pot="service.namespace",r5="service.version",Mot="signalr.connection.status",Lot="app_shutdown",Uot="normal_closure",Qot="timeout",Fot="signalr.transport",Got="long_polling",zot="server_sent_events",jot="web_sockets",Hot="telemetry.sdk.language",_Yt="cpp",$ot="dotnet",qot="erlang",EYt="go",Vot="java",Yot="nodejs",yYt="php",Kot="python",Jot="ruby",Zot="rust",Wot="swift",Xot="webjs",eit="telemetry.sdk.name",tit="telemetry.sdk.version",nit="url.fragment",l_="url.full",rit="url.path",oit="url.query",iit="url.scheme",o5="user_agent.original"});var sit,ait,uit,cit,lit,dit,pit,fit,mit,Ait,git,hit,_it,Eit,yit,Sit,Tit,Iit,bit,Cit,vit,Rit,xit,Dit,Bit,Nit,Oit,wit,kit,Pit,Mit,Lit,Uit,Qit,Fit,Git,zit,jit,Hit,$it,qit,Vit,Yit,Kit,Jit,Zit,Wit,Xit,est,tst,nst,PEe=O(()=>{A();sit="aspnetcore.diagnostics.exceptions",ait="aspnetcore.rate_limiting.active_request_leases",uit="aspnetcore.rate_limiting.queued_requests",cit="aspnetcore.rate_limiting.request.time_in_queue",lit="aspnetcore.rate_limiting.request_lease.duration",dit="aspnetcore.rate_limiting.requests",pit="aspnetcore.routing.match_attempts",fit="db.client.operation.duration",mit="dotnet.assembly.count",Ait="dotnet.exceptions",git="dotnet.gc.collections",hit="dotnet.gc.heap.total_allocated",_it="dotnet.gc.last_collection.heap.fragmentation.size",Eit="dotnet.gc.last_collection.heap.size",yit="dotnet.gc.last_collection.memory.committed_size",Sit="dotnet.gc.pause.time",Tit="dotnet.jit.compilation.time",Iit="dotnet.jit.compiled_il.size",bit="dotnet.jit.compiled_methods",Cit="dotnet.monitor.lock_contentions",vit="dotnet.process.cpu.count",Rit="dotnet.process.cpu.time",xit="dotnet.process.memory.working_set",Dit="dotnet.thread_pool.queue.length",Bit="dotnet.thread_pool.thread.count",Nit="dotnet.thread_pool.work_item.count",Oit="dotnet.timer.count",wit="http.client.request.duration",kit="http.server.request.duration",Pit="jvm.class.count",Mit="jvm.class.loaded",Lit="jvm.class.unloaded",Uit="jvm.cpu.count",Qit="jvm.cpu.recent_utilization",Fit="jvm.cpu.time",Git="jvm.gc.duration",zit="jvm.memory.committed",jit="jvm.memory.limit",Hit="jvm.memory.used",$it="jvm.memory.used_after_last_gc",qit="jvm.thread.count",Vit="kestrel.active_connections",Yit="kestrel.active_tls_handshakes",Kit="kestrel.connection.duration",Jit="kestrel.queued_connections",Zit="kestrel.queued_requests",Wit="kestrel.rejected_connections",Xit="kestrel.tls_handshake.duration",est="kestrel.upgraded_connections",tst="signalr.server.active_connections",nst="signalr.server.connection.duration"});var rst,MEe=O(()=>{A();rst="exception"});var Fr={};$s(Fr,{ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:()=>crt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:()=>lrt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:()=>drt,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:()=>prt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:()=>grt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:()=>hrt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:()=>_rt,ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:()=>Ert,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:()=>Irt,ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:()=>brt,ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:()=>urt,ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:()=>frt,ATTR_ASPNETCORE_RATE_LIMITING_POLICY:()=>mrt,ATTR_ASPNETCORE_RATE_LIMITING_RESULT:()=>Art,ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:()=>yrt,ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:()=>Srt,ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:()=>Trt,ATTR_ASPNETCORE_USER_IS_AUTHENTICATED:()=>Crt,ATTR_CLIENT_ADDRESS:()=>vrt,ATTR_CLIENT_PORT:()=>Rrt,ATTR_CODE_COLUMN_NUMBER:()=>xrt,ATTR_CODE_FILE_PATH:()=>Drt,ATTR_CODE_FUNCTION_NAME:()=>Brt,ATTR_CODE_LINE_NUMBER:()=>Nrt,ATTR_CODE_STACKTRACE:()=>Ort,ATTR_DB_COLLECTION_NAME:()=>$9,ATTR_DB_NAMESPACE:()=>q9,ATTR_DB_OPERATION_BATCH_SIZE:()=>wrt,ATTR_DB_OPERATION_NAME:()=>oC,ATTR_DB_QUERY_SUMMARY:()=>krt,ATTR_DB_QUERY_TEXT:()=>V9,ATTR_DB_RESPONSE_STATUS_CODE:()=>Y9,ATTR_DB_STORED_PROCEDURE_NAME:()=>Prt,ATTR_DB_SYSTEM_NAME:()=>Py,ATTR_DOTNET_GC_HEAP_GENERATION:()=>Frt,ATTR_ERROR_TYPE:()=>K9,ATTR_EXCEPTION_ESCAPED:()=>$rt,ATTR_EXCEPTION_MESSAGE:()=>qrt,ATTR_EXCEPTION_STACKTRACE:()=>Vrt,ATTR_EXCEPTION_TYPE:()=>Yrt,ATTR_HTTP_REQUEST_HEADER:()=>Krt,ATTR_HTTP_REQUEST_METHOD:()=>My,ATTR_HTTP_REQUEST_METHOD_ORIGINAL:()=>oot,ATTR_HTTP_REQUEST_RESEND_COUNT:()=>iot,ATTR_HTTP_RESPONSE_HEADER:()=>sot,ATTR_HTTP_RESPONSE_STATUS_CODE:()=>pg,ATTR_HTTP_ROUTE:()=>fg,ATTR_JVM_GC_ACTION:()=>aot,ATTR_JVM_GC_NAME:()=>uot,ATTR_JVM_MEMORY_POOL_NAME:()=>cot,ATTR_JVM_MEMORY_TYPE:()=>lot,ATTR_JVM_THREAD_DAEMON:()=>fot,ATTR_JVM_THREAD_STATE:()=>mot,ATTR_NETWORK_LOCAL_ADDRESS:()=>yot,ATTR_NETWORK_LOCAL_PORT:()=>Sot,ATTR_NETWORK_PEER_ADDRESS:()=>J9,ATTR_NETWORK_PEER_PORT:()=>Z9,ATTR_NETWORK_PROTOCOL_NAME:()=>Tot,ATTR_NETWORK_PROTOCOL_VERSION:()=>W9,ATTR_NETWORK_TRANSPORT:()=>X9,ATTR_NETWORK_TYPE:()=>vot,ATTR_OTEL_SCOPE_NAME:()=>Dot,ATTR_OTEL_SCOPE_VERSION:()=>Bot,ATTR_OTEL_STATUS_CODE:()=>Not,ATTR_OTEL_STATUS_DESCRIPTION:()=>wot,ATTR_SERVER_ADDRESS:()=>e5,ATTR_SERVER_PORT:()=>t5,ATTR_SERVICE_INSTANCE_ID:()=>kot,ATTR_SERVICE_NAME:()=>n5,ATTR_SERVICE_NAMESPACE:()=>Pot,ATTR_SERVICE_VERSION:()=>r5,ATTR_SIGNALR_CONNECTION_STATUS:()=>Mot,ATTR_SIGNALR_TRANSPORT:()=>Fot,ATTR_TELEMETRY_SDK_LANGUAGE:()=>Hot,ATTR_TELEMETRY_SDK_NAME:()=>eit,ATTR_TELEMETRY_SDK_VERSION:()=>tit,ATTR_URL_FRAGMENT:()=>nit,ATTR_URL_FULL:()=>l_,ATTR_URL_PATH:()=>rit,ATTR_URL_QUERY:()=>oit,ATTR_URL_SCHEME:()=>iit,ATTR_USER_AGENT_ORIGINAL:()=>o5,AWSECSLAUNCHTYPEVALUES_EC2:()=>xnt,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>Dnt,AwsEcsLaunchtypeValues:()=>Bnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>lnt,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>dnt,CLOUDPLATFORMVALUES_AWS_EC2:()=>pnt,CLOUDPLATFORMVALUES_AWS_ECS:()=>fnt,CLOUDPLATFORMVALUES_AWS_EKS:()=>mnt,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>gnt,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>Ant,CLOUDPLATFORMVALUES_AZURE_AKS:()=>Ent,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>Snt,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>_nt,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>ynt,CLOUDPLATFORMVALUES_AZURE_VM:()=>hnt,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>vnt,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>Cnt,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>Int,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>Tnt,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>bnt,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>int,CLOUDPROVIDERVALUES_AWS:()=>snt,CLOUDPROVIDERVALUES_AZURE:()=>ant,CLOUDPROVIDERVALUES_GCP:()=>unt,CloudPlatformValues:()=>Rnt,CloudProviderValues:()=>cnt,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>zWe,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>JWe,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>jWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>KWe,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>$We,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>WWe,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>qWe,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>HWe,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>ZWe,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>YWe,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>VWe,DBSYSTEMVALUES_ADABAS:()=>dWe,DBSYSTEMVALUES_CACHE:()=>lWe,DBSYSTEMVALUES_CASSANDRA:()=>xWe,DBSYSTEMVALUES_CLOUDSCAPE:()=>nWe,DBSYSTEMVALUES_COCKROACHDB:()=>FWe,DBSYSTEMVALUES_COLDFUSION:()=>RWe,DBSYSTEMVALUES_COSMOSDB:()=>kWe,DBSYSTEMVALUES_COUCHBASE:()=>OWe,DBSYSTEMVALUES_COUCHDB:()=>wWe,DBSYSTEMVALUES_DB2:()=>WZe,DBSYSTEMVALUES_DERBY:()=>fWe,DBSYSTEMVALUES_DYNAMODB:()=>PWe,DBSYSTEMVALUES_EDB:()=>cWe,DBSYSTEMVALUES_ELASTICSEARCH:()=>UWe,DBSYSTEMVALUES_FILEMAKER:()=>mWe,DBSYSTEMVALUES_FIREBIRD:()=>pWe,DBSYSTEMVALUES_FIRSTSQL:()=>uWe,DBSYSTEMVALUES_GEODE:()=>LWe,DBSYSTEMVALUES_H2:()=>vWe,DBSYSTEMVALUES_HANADB:()=>sWe,DBSYSTEMVALUES_HBASE:()=>DWe,DBSYSTEMVALUES_HIVE:()=>tWe,DBSYSTEMVALUES_HSQLDB:()=>rWe,DBSYSTEMVALUES_INFORMIX:()=>AWe,DBSYSTEMVALUES_INGRES:()=>aWe,DBSYSTEMVALUES_INSTANTDB:()=>gWe,DBSYSTEMVALUES_INTERBASE:()=>hWe,DBSYSTEMVALUES_MARIADB:()=>_We,DBSYSTEMVALUES_MAXDB:()=>iWe,DBSYSTEMVALUES_MEMCACHED:()=>QWe,DBSYSTEMVALUES_MONGODB:()=>BWe,DBSYSTEMVALUES_MSSQL:()=>KZe,DBSYSTEMVALUES_MYSQL:()=>JZe,DBSYSTEMVALUES_NEO4J:()=>MWe,DBSYSTEMVALUES_NETEZZA:()=>EWe,DBSYSTEMVALUES_ORACLE:()=>ZZe,DBSYSTEMVALUES_OTHER_SQL:()=>YZe,DBSYSTEMVALUES_PERVASIVE:()=>yWe,DBSYSTEMVALUES_POINTBASE:()=>SWe,DBSYSTEMVALUES_POSTGRESQL:()=>XZe,DBSYSTEMVALUES_PROGRESS:()=>oWe,DBSYSTEMVALUES_REDIS:()=>NWe,DBSYSTEMVALUES_REDSHIFT:()=>eWe,DBSYSTEMVALUES_SQLITE:()=>TWe,DBSYSTEMVALUES_SYBASE:()=>IWe,DBSYSTEMVALUES_TERADATA:()=>bWe,DBSYSTEMVALUES_VERTICA:()=>CWe,DB_SYSTEM_NAME_VALUE_MARIADB:()=>Mrt,DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:()=>Lrt,DB_SYSTEM_NAME_VALUE_MYSQL:()=>Urt,DB_SYSTEM_NAME_VALUE_POSTGRESQL:()=>Qrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:()=>Grt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:()=>zrt,DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:()=>jrt,DOTNET_GC_HEAP_GENERATION_VALUE_LOH:()=>lYt,DOTNET_GC_HEAP_GENERATION_VALUE_POH:()=>dYt,DbCassandraConsistencyLevelValues:()=>XWe,DbSystemValues:()=>GWe,ERROR_TYPE_VALUE_OTHER:()=>Hrt,EVENT_EXCEPTION:()=>rst,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>uXe,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>aXe,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>sXe,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>lXe,FAASINVOKEDPROVIDERVALUES_AWS:()=>dXe,FAASINVOKEDPROVIDERVALUES_AZURE:()=>pXe,FAASINVOKEDPROVIDERVALUES_GCP:()=>fXe,FAASTRIGGERVALUES_DATASOURCE:()=>eXe,FAASTRIGGERVALUES_HTTP:()=>tXe,FAASTRIGGERVALUES_OTHER:()=>oXe,FAASTRIGGERVALUES_PUBSUB:()=>nXe,FAASTRIGGERVALUES_TIMER:()=>rXe,FaasDocumentOperationValues:()=>cXe,FaasInvokedProviderValues:()=>mXe,FaasTriggerValues:()=>iXe,HOSTARCHVALUES_AMD64:()=>Nnt,HOSTARCHVALUES_ARM32:()=>Ont,HOSTARCHVALUES_ARM64:()=>wnt,HOSTARCHVALUES_IA64:()=>knt,HOSTARCHVALUES_PPC32:()=>Pnt,HOSTARCHVALUES_PPC64:()=>Mnt,HOSTARCHVALUES_X86:()=>Lnt,HTTPFLAVORVALUES_HTTP_1_0:()=>ZXe,HTTPFLAVORVALUES_HTTP_1_1:()=>WXe,HTTPFLAVORVALUES_HTTP_2_0:()=>XXe,HTTPFLAVORVALUES_QUIC:()=>tet,HTTPFLAVORVALUES_SPDY:()=>eet,HTTP_REQUEST_METHOD_VALUE_CONNECT:()=>Zrt,HTTP_REQUEST_METHOD_VALUE_DELETE:()=>Wrt,HTTP_REQUEST_METHOD_VALUE_GET:()=>pYt,HTTP_REQUEST_METHOD_VALUE_HEAD:()=>Xrt,HTTP_REQUEST_METHOD_VALUE_OPTIONS:()=>eot,HTTP_REQUEST_METHOD_VALUE_OTHER:()=>Jrt,HTTP_REQUEST_METHOD_VALUE_PATCH:()=>tot,HTTP_REQUEST_METHOD_VALUE_POST:()=>not,HTTP_REQUEST_METHOD_VALUE_PUT:()=>fYt,HTTP_REQUEST_METHOD_VALUE_TRACE:()=>rot,HostArchValues:()=>Unt,HttpFlavorValues:()=>net,JVM_MEMORY_TYPE_VALUE_HEAP:()=>dot,JVM_MEMORY_TYPE_VALUE_NON_HEAP:()=>pot,JVM_THREAD_STATE_VALUE_BLOCKED:()=>Aot,JVM_THREAD_STATE_VALUE_NEW:()=>mYt,JVM_THREAD_STATE_VALUE_RUNNABLE:()=>got,JVM_THREAD_STATE_VALUE_TERMINATED:()=>hot,JVM_THREAD_STATE_VALUE_TIMED_WAITING:()=>_ot,JVM_THREAD_STATE_VALUE_WAITING:()=>Eot,MESSAGETYPEVALUES_RECEIVED:()=>Bet,MESSAGETYPEVALUES_SENT:()=>Det,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>ret,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>oet,MESSAGINGOPERATIONVALUES_PROCESS:()=>aet,MESSAGINGOPERATIONVALUES_RECEIVE:()=>set,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:()=>sit,METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:()=>ait,METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:()=>uit,METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:()=>dit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:()=>lit,METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:()=>cit,METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:()=>pit,METRIC_DB_CLIENT_OPERATION_DURATION:()=>fit,METRIC_DOTNET_ASSEMBLY_COUNT:()=>mit,METRIC_DOTNET_EXCEPTIONS:()=>Ait,METRIC_DOTNET_GC_COLLECTIONS:()=>git,METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:()=>hit,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:()=>_it,METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:()=>Eit,METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:()=>yit,METRIC_DOTNET_GC_PAUSE_TIME:()=>Sit,METRIC_DOTNET_JIT_COMPILATION_TIME:()=>Tit,METRIC_DOTNET_JIT_COMPILED_IL_SIZE:()=>Iit,METRIC_DOTNET_JIT_COMPILED_METHODS:()=>bit,METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:()=>Cit,METRIC_DOTNET_PROCESS_CPU_COUNT:()=>vit,METRIC_DOTNET_PROCESS_CPU_TIME:()=>Rit,METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:()=>xit,METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:()=>Dit,METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:()=>Bit,METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:()=>Nit,METRIC_DOTNET_TIMER_COUNT:()=>Oit,METRIC_HTTP_CLIENT_REQUEST_DURATION:()=>wit,METRIC_HTTP_SERVER_REQUEST_DURATION:()=>kit,METRIC_JVM_CLASS_COUNT:()=>Pit,METRIC_JVM_CLASS_LOADED:()=>Mit,METRIC_JVM_CLASS_UNLOADED:()=>Lit,METRIC_JVM_CPU_COUNT:()=>Uit,METRIC_JVM_CPU_RECENT_UTILIZATION:()=>Qit,METRIC_JVM_CPU_TIME:()=>Fit,METRIC_JVM_GC_DURATION:()=>Git,METRIC_JVM_MEMORY_COMMITTED:()=>zit,METRIC_JVM_MEMORY_LIMIT:()=>jit,METRIC_JVM_MEMORY_USED:()=>Hit,METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:()=>$it,METRIC_JVM_THREAD_COUNT:()=>qit,METRIC_KESTREL_ACTIVE_CONNECTIONS:()=>Vit,METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:()=>Yit,METRIC_KESTREL_CONNECTION_DURATION:()=>Kit,METRIC_KESTREL_QUEUED_CONNECTIONS:()=>Jit,METRIC_KESTREL_QUEUED_REQUESTS:()=>Zit,METRIC_KESTREL_REJECTED_CONNECTIONS:()=>Wit,METRIC_KESTREL_TLS_HANDSHAKE_DURATION:()=>Xit,METRIC_KESTREL_UPGRADED_CONNECTIONS:()=>est,METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:()=>tst,METRIC_SIGNALR_SERVER_CONNECTION_DURATION:()=>nst,MessageTypeValues:()=>Net,MessagingDestinationKindValues:()=>iet,MessagingOperationValues:()=>uet,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>OXe,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>PXe,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>BXe,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>zXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>wXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>kXe,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>FXe,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>DXe,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>HXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>MXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>UXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>jXe,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>LXe,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>QXe,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>qXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>GXe,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>KXe,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>VXe,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>YXe,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>$Xe,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>NXe,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>CXe,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>vXe,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>RXe,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>IXe,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>bXe,NETTRANSPORTVALUES_INPROC:()=>yXe,NETTRANSPORTVALUES_IP:()=>hXe,NETTRANSPORTVALUES_IP_TCP:()=>AXe,NETTRANSPORTVALUES_IP_UDP:()=>gXe,NETTRANSPORTVALUES_OTHER:()=>SXe,NETTRANSPORTVALUES_PIPE:()=>EXe,NETTRANSPORTVALUES_UNIX:()=>_Xe,NETWORK_TRANSPORT_VALUE_PIPE:()=>Iot,NETWORK_TRANSPORT_VALUE_QUIC:()=>bot,NETWORK_TRANSPORT_VALUE_TCP:()=>AYt,NETWORK_TRANSPORT_VALUE_UDP:()=>gYt,NETWORK_TRANSPORT_VALUE_UNIX:()=>Cot,NETWORK_TYPE_VALUE_IPV4:()=>Rot,NETWORK_TYPE_VALUE_IPV6:()=>xot,NetHostConnectionSubtypeValues:()=>JXe,NetHostConnectionTypeValues:()=>xXe,NetTransportValues:()=>TXe,OSTYPEVALUES_AIX:()=>Vnt,OSTYPEVALUES_DARWIN:()=>Gnt,OSTYPEVALUES_DRAGONFLYBSD:()=>$nt,OSTYPEVALUES_FREEBSD:()=>znt,OSTYPEVALUES_HPUX:()=>qnt,OSTYPEVALUES_LINUX:()=>Fnt,OSTYPEVALUES_NETBSD:()=>jnt,OSTYPEVALUES_OPENBSD:()=>Hnt,OSTYPEVALUES_SOLARIS:()=>Ynt,OSTYPEVALUES_WINDOWS:()=>Qnt,OSTYPEVALUES_Z_OS:()=>Knt,OTEL_STATUS_CODE_VALUE_ERROR:()=>Oot,OTEL_STATUS_CODE_VALUE_OK:()=>hYt,OsTypeValues:()=>Jnt,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>yet,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>get,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>det,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>vet,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>met,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>Eet,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>bet,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>fet,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>Aet,RPCGRPCSTATUSCODEVALUES_OK:()=>cet,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>Tet,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>het,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>_et,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>Ret,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>Cet,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>Iet,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>pet,RpcGrpcStatusCodeValues:()=>xet,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>iZe,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>hZe,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>nZe,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>WJe,SEMATTRS_AWS_DYNAMODB_COUNT:()=>AZe,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>lZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>uZe,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>_Ze,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>sZe,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>XJe,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>oZe,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>cZe,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>rZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>eZe,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>tZe,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>gZe,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>pZe,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>fZe,SEMATTRS_AWS_DYNAMODB_SELECT:()=>aZe,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>dZe,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>ZJe,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>mZe,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>jKe,SEMATTRS_CODE_FILEPATH:()=>GJe,SEMATTRS_CODE_FUNCTION:()=>QJe,SEMATTRS_CODE_LINENO:()=>zJe,SEMATTRS_CODE_NAMESPACE:()=>FJe,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>WKe,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>rJe,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>nJe,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>eJe,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>JKe,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>ZKe,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>tJe,SEMATTRS_DB_CASSANDRA_TABLE:()=>XKe,SEMATTRS_DB_CONNECTION_STRING:()=>HKe,SEMATTRS_DB_HBASE_NAMESPACE:()=>oJe,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>qKe,SEMATTRS_DB_MONGODB_COLLECTION:()=>sJe,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>KKe,SEMATTRS_DB_NAME:()=>VKe,SEMATTRS_DB_OPERATION:()=>YKe,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>iJe,SEMATTRS_DB_SQL_TABLE:()=>aJe,SEMATTRS_DB_STATEMENT:()=>O9,SEMATTRS_DB_SYSTEM:()=>N9,SEMATTRS_DB_USER:()=>$Ke,SEMATTRS_ENDUSER_ID:()=>kJe,SEMATTRS_ENDUSER_ROLE:()=>PJe,SEMATTRS_ENDUSER_SCOPE:()=>MJe,SEMATTRS_EXCEPTION_ESCAPED:()=>dJe,SEMATTRS_EXCEPTION_MESSAGE:()=>cJe,SEMATTRS_EXCEPTION_STACKTRACE:()=>lJe,SEMATTRS_EXCEPTION_TYPE:()=>uJe,SEMATTRS_FAAS_COLDSTART:()=>EJe,SEMATTRS_FAAS_CRON:()=>_Je,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>fJe,SEMATTRS_FAAS_DOCUMENT_NAME:()=>gJe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>mJe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>AJe,SEMATTRS_FAAS_EXECUTION:()=>pJe,SEMATTRS_FAAS_INVOKED_NAME:()=>yJe,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>SJe,SEMATTRS_FAAS_INVOKED_REGION:()=>TJe,SEMATTRS_FAAS_TIME:()=>hJe,SEMATTRS_FAAS_TRIGGER:()=>w9,SEMATTRS_HTTP_CLIENT_IP:()=>JJe,SEMATTRS_HTTP_FLAVOR:()=>$Je,SEMATTRS_HTTP_HOST:()=>jJe,SEMATTRS_HTTP_METHOD:()=>AB,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>VJe,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>YJe,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>U9,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>Q9,SEMATTRS_HTTP_ROUTE:()=>F9,SEMATTRS_HTTP_SCHEME:()=>HJe,SEMATTRS_HTTP_SERVER_NAME:()=>KJe,SEMATTRS_HTTP_STATUS_CODE:()=>ky,SEMATTRS_HTTP_TARGET:()=>L9,SEMATTRS_HTTP_URL:()=>rC,SEMATTRS_HTTP_USER_AGENT:()=>qJe,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>$Ze,SEMATTRS_MESSAGE_ID:()=>HZe,SEMATTRS_MESSAGE_TYPE:()=>jZe,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>qZe,SEMATTRS_MESSAGING_CONSUMER_ID:()=>BZe,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>vZe,SEMATTRS_MESSAGING_DESTINATION:()=>EZe,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>yZe,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>kZe,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>wZe,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>OZe,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>PZe,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>MZe,SEMATTRS_MESSAGING_MESSAGE_ID:()=>CZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>xZe,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>RZe,SEMATTRS_MESSAGING_OPERATION:()=>DZe,SEMATTRS_MESSAGING_PROTOCOL:()=>TZe,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>IZe,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>NZe,SEMATTRS_MESSAGING_SYSTEM:()=>G9,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>SZe,SEMATTRS_MESSAGING_URL:()=>bZe,SEMATTRS_NET_HOST_CARRIER_ICC:()=>OJe,SEMATTRS_NET_HOST_CARRIER_MCC:()=>BJe,SEMATTRS_NET_HOST_CARRIER_MNC:()=>NJe,SEMATTRS_NET_HOST_CARRIER_NAME:()=>DJe,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>xJe,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>RJe,SEMATTRS_NET_HOST_IP:()=>P9,SEMATTRS_NET_HOST_NAME:()=>vJe,SEMATTRS_NET_HOST_PORT:()=>M9,SEMATTRS_NET_PEER_IP:()=>k9,SEMATTRS_NET_PEER_NAME:()=>CJe,SEMATTRS_NET_PEER_PORT:()=>bJe,SEMATTRS_NET_TRANSPORT:()=>IJe,SEMATTRS_PEER_SERVICE:()=>wJe,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>j9,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>GZe,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>zZe,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>FZe,SEMATTRS_RPC_JSONRPC_VERSION:()=>QZe,SEMATTRS_RPC_METHOD:()=>UZe,SEMATTRS_RPC_SERVICE:()=>z9,SEMATTRS_RPC_SYSTEM:()=>LZe,SEMATTRS_THREAD_ID:()=>LJe,SEMATTRS_THREAD_NAME:()=>UJe,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>Uet,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>Let,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>Qet,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>Fet,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>Get,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>zet,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>jet,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>$et,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>Het,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>Vet,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>qet,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>wet,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>Pet,SEMRESATTRS_CLOUD_PLATFORM:()=>Met,SEMRESATTRS_CLOUD_PROVIDER:()=>Oet,SEMRESATTRS_CLOUD_REGION:()=>ket,SEMRESATTRS_CONTAINER_ID:()=>Ket,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>Zet,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>Wet,SEMRESATTRS_CONTAINER_NAME:()=>Yet,SEMRESATTRS_CONTAINER_RUNTIME:()=>Jet,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>Xet,SEMRESATTRS_DEVICE_ID:()=>ett,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>ttt,SEMRESATTRS_DEVICE_MODEL_NAME:()=>ntt,SEMRESATTRS_FAAS_ID:()=>ott,SEMRESATTRS_FAAS_INSTANCE:()=>stt,SEMRESATTRS_FAAS_MAX_MEMORY:()=>att,SEMRESATTRS_FAAS_NAME:()=>rtt,SEMRESATTRS_FAAS_VERSION:()=>itt,SEMRESATTRS_HOST_ARCH:()=>dtt,SEMRESATTRS_HOST_ID:()=>utt,SEMRESATTRS_HOST_IMAGE_ID:()=>ftt,SEMRESATTRS_HOST_IMAGE_NAME:()=>ptt,SEMRESATTRS_HOST_IMAGE_VERSION:()=>mtt,SEMRESATTRS_HOST_NAME:()=>ctt,SEMRESATTRS_HOST_TYPE:()=>ltt,SEMRESATTRS_K8S_CLUSTER_NAME:()=>Att,SEMRESATTRS_K8S_CONTAINER_NAME:()=>Stt,SEMRESATTRS_K8S_CRONJOB_NAME:()=>wtt,SEMRESATTRS_K8S_CRONJOB_UID:()=>Ott,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>Dtt,SEMRESATTRS_K8S_DAEMONSET_UID:()=>xtt,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>Ctt,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>btt,SEMRESATTRS_K8S_JOB_NAME:()=>Ntt,SEMRESATTRS_K8S_JOB_UID:()=>Btt,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>_tt,SEMRESATTRS_K8S_NODE_NAME:()=>gtt,SEMRESATTRS_K8S_NODE_UID:()=>htt,SEMRESATTRS_K8S_POD_NAME:()=>ytt,SEMRESATTRS_K8S_POD_UID:()=>Ett,SEMRESATTRS_K8S_REPLICASET_NAME:()=>Itt,SEMRESATTRS_K8S_REPLICASET_UID:()=>Ttt,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>Rtt,SEMRESATTRS_K8S_STATEFULSET_UID:()=>vtt,SEMRESATTRS_OS_DESCRIPTION:()=>Ptt,SEMRESATTRS_OS_NAME:()=>Mtt,SEMRESATTRS_OS_TYPE:()=>ktt,SEMRESATTRS_OS_VERSION:()=>Ltt,SEMRESATTRS_PROCESS_COMMAND:()=>Gtt,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>jtt,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>ztt,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>Qtt,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>Ftt,SEMRESATTRS_PROCESS_OWNER:()=>Htt,SEMRESATTRS_PROCESS_PID:()=>Utt,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>Vtt,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>$tt,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>qtt,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>Ktt,SEMRESATTRS_SERVICE_NAME:()=>Ytt,SEMRESATTRS_SERVICE_NAMESPACE:()=>H9,SEMRESATTRS_SERVICE_VERSION:()=>Jtt,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>ent,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>Wtt,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>Ztt,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>Xtt,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>rnt,SEMRESATTRS_WEBENGINE_NAME:()=>tnt,SEMRESATTRS_WEBENGINE_VERSION:()=>nnt,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:()=>Lot,SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:()=>Uot,SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:()=>Qot,SIGNALR_TRANSPORT_VALUE_LONG_POLLING:()=>Got,SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:()=>zot,SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:()=>jot,SemanticAttributes:()=>VZe,SemanticResourceAttributes:()=>ont,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>Znt,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>Wnt,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>Xnt,TELEMETRYSDKLANGUAGEVALUES_GO:()=>ert,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>trt,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>nrt,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>rrt,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>ort,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>irt,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>srt,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:()=>_Yt,TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:()=>$ot,TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:()=>qot,TELEMETRY_SDK_LANGUAGE_VALUE_GO:()=>EYt,TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:()=>Vot,TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:()=>Yot,TELEMETRY_SDK_LANGUAGE_VALUE_PHP:()=>yYt,TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:()=>Kot,TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:()=>Jot,TELEMETRY_SDK_LANGUAGE_VALUE_RUST:()=>Zot,TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:()=>Wot,TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:()=>Xot,TelemetrySdkLanguageValues:()=>art});var Zn=O(()=>{A();ahe();wEe();kEe();PEe();MEe()});var LEe=F(QM=>{"use strict";A();Object.defineProperty(QM,"__esModule",{value:!0});QM.ATTR_PROCESS_RUNTIME_NAME=void 0;QM.ATTR_PROCESS_RUNTIME_NAME="process.runtime.name"});var UEe=F(GM=>{"use strict";A();Object.defineProperty(GM,"__esModule",{value:!0});GM.SDK_INFO=void 0;var ost=gpe(),FM=(Zn(),Me(Fr)),ist=LEe();GM.SDK_INFO={[FM.ATTR_TELEMETRY_SDK_NAME]:"opentelemetry",[ist.ATTR_PROCESS_RUNTIME_NAME]:"node",[FM.ATTR_TELEMETRY_SDK_LANGUAGE]:FM.TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,[FM.ATTR_TELEMETRY_SDK_VERSION]:ost.VERSION}});var QEe=F(Wa=>{"use strict";A();Object.defineProperty(Wa,"__esModule",{value:!0});Wa.otperformance=Wa.SDK_INFO=Wa._globalThis=Wa.getStringListFromEnv=Wa.getNumberFromEnv=Wa.getBooleanFromEnv=Wa.getStringFromEnv=void 0;var zM=mpe();Object.defineProperty(Wa,"getStringFromEnv",{enumerable:!0,get:function(){return zM.getStringFromEnv}});Object.defineProperty(Wa,"getBooleanFromEnv",{enumerable:!0,get:function(){return zM.getBooleanFromEnv}});Object.defineProperty(Wa,"getNumberFromEnv",{enumerable:!0,get:function(){return zM.getNumberFromEnv}});Object.defineProperty(Wa,"getStringListFromEnv",{enumerable:!0,get:function(){return zM.getStringListFromEnv}});var sst=Ape();Object.defineProperty(Wa,"_globalThis",{enumerable:!0,get:function(){return sst._globalThis}});var ast=UEe();Object.defineProperty(Wa,"SDK_INFO",{enumerable:!0,get:function(){return ast.SDK_INFO}});Wa.otperformance=performance});var i5=F(Xa=>{"use strict";A();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.getStringListFromEnv=Xa.getNumberFromEnv=Xa.getStringFromEnv=Xa.getBooleanFromEnv=Xa.otperformance=Xa._globalThis=Xa.SDK_INFO=void 0;var Ly=QEe();Object.defineProperty(Xa,"SDK_INFO",{enumerable:!0,get:function(){return Ly.SDK_INFO}});Object.defineProperty(Xa,"_globalThis",{enumerable:!0,get:function(){return Ly._globalThis}});Object.defineProperty(Xa,"otperformance",{enumerable:!0,get:function(){return Ly.otperformance}});Object.defineProperty(Xa,"getBooleanFromEnv",{enumerable:!0,get:function(){return Ly.getBooleanFromEnv}});Object.defineProperty(Xa,"getStringFromEnv",{enumerable:!0,get:function(){return Ly.getStringFromEnv}});Object.defineProperty(Xa,"getNumberFromEnv",{enumerable:!0,get:function(){return Ly.getNumberFromEnv}});Object.defineProperty(Xa,"getStringListFromEnv",{enumerable:!0,get:function(){return Ly.getStringListFromEnv}})});var jEe=F(Gr=>{"use strict";A();Object.defineProperty(Gr,"__esModule",{value:!0});Gr.addHrTimes=Gr.isTimeInput=Gr.isTimeInputHrTime=Gr.hrTimeToSeconds=Gr.hrTimeToMilliseconds=Gr.hrTimeToMicroseconds=Gr.hrTimeToNanoseconds=Gr.hrTimeToTimeStamp=Gr.hrTimeDuration=Gr.timeInputToHrTime=Gr.hrTime=Gr.getTimeOrigin=Gr.millisToHrTime=void 0;var jM=i5(),FEe=9,ust=6,cst=Math.pow(10,ust),gB=Math.pow(10,FEe);function hB(e){let t=e/1e3,n=Math.trunc(t),r=Math.round(e%1e3*cst);return[n,r]}Gr.millisToHrTime=hB;function lst(){return jM.otperformance.timeOrigin}Gr.getTimeOrigin=lst;function GEe(e){let t=hB(jM.otperformance.timeOrigin),n=hB(typeof e=="number"?e:jM.otperformance.now());return zEe(t,n)}Gr.hrTime=GEe;function dst(e){if(s5(e))return e;if(typeof e=="number")return e<jM.otperformance.timeOrigin?GEe(e):hB(e);if(e instanceof Date)return hB(e.getTime());throw TypeError("Invalid input type")}Gr.timeInputToHrTime=dst;function pst(e,t){let n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=gB),[n,r]}Gr.hrTimeDuration=pst;function fst(e){let t=FEe,n=`${"0".repeat(t)}${e[1]}Z`,r=n.substring(n.length-t-1);return new Date(e[0]*1e3).toISOString().replace("000Z",r)}Gr.hrTimeToTimeStamp=fst;function mst(e){return e[0]*gB+e[1]}Gr.hrTimeToNanoseconds=mst;function Ast(e){return e[0]*1e6+e[1]/1e3}Gr.hrTimeToMicroseconds=Ast;function gst(e){return e[0]*1e3+e[1]/1e6}Gr.hrTimeToMilliseconds=gst;function hst(e){return e[0]+e[1]/gB}Gr.hrTimeToSeconds=hst;function s5(e){return Array.isArray(e)&&e.length===2&&typeof e[0]=="number"&&typeof e[1]=="number"}Gr.isTimeInputHrTime=s5;function _st(e){return s5(e)||typeof e=="number"||e instanceof Date}Gr.isTimeInput=_st;function zEe(e,t){let n=[e[0]+t[0],e[1]+t[1]];return n[1]>=gB&&(n[1]-=gB,n[0]+=1),n}Gr.addHrTimes=zEe});var HEe=F(HM=>{"use strict";A();Object.defineProperty(HM,"__esModule",{value:!0});HM.unrefTimer=void 0;function Est(e){typeof e!="number"&&e.unref()}HM.unrefTimer=Est});var $Ee=F(_B=>{"use strict";A();Object.defineProperty(_B,"__esModule",{value:!0});_B.ExportResultCode=void 0;var yst;(function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"})(yst=_B.ExportResultCode||(_B.ExportResultCode={}))});var VEe=F($M=>{"use strict";A();Object.defineProperty($M,"__esModule",{value:!0});$M.CompositePropagator=void 0;var qEe=(ze(),Me(We)),a5=class{_propagators;_fields;constructor(t={}){this._propagators=t.propagators??[];let n=new Set;for(let r of this._propagators){let o=typeof r.fields=="function"?r.fields():[];for(let i of o)n.add(i)}this._fields=Array.from(n)}inject(t,n,r){for(let o of this._propagators)try{o.inject(t,n,r)}catch(i){qEe.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${i.message}`)}}extract(t,n,r){return this._propagators.reduce((o,i)=>{try{return i.extract(o,n,r)}catch(s){qEe.diag.warn(`Failed to extract with ${i.constructor.name}. Err: ${s.message}`)}return o},t)}fields(){return this._fields.slice()}};$M.CompositePropagator=a5});var YEe=F(iC=>{"use strict";A();Object.defineProperty(iC,"__esModule",{value:!0});iC.validateValue=iC.validateKey=void 0;var u5="[_0-9a-z-*/]",Sst=`[a-z]${u5}{0,255}`,Tst=`[a-z0-9]${u5}{0,240}@[a-z]${u5}{0,13}`,Ist=new RegExp(`^(?:${Sst}|${Tst})$`),bst=/^[ -~]{0,255}[!-~]$/,Cst=/,|=/;function vst(e){return Ist.test(e)}iC.validateKey=vst;function Rst(e){return bst.test(e)&&!Cst.test(e)}iC.validateValue=Rst});var l5=F(VM=>{"use strict";A();Object.defineProperty(VM,"__esModule",{value:!0});VM.TraceState=void 0;var qM=YEe(),xst=32,KEe=512,JEe=",",ZEe="=",c5=class e{_length;_rawTraceState;_internalState;constructor(t){this._rawTraceState=typeof t=="string"?t:"",this._length=this._rawTraceState.length}set(t,n){if(!(0,qM.validateKey)(t)||!(0,qM.validateValue)(n))return this;let r=this._getState(),o=r.get(t),i=this._length;if(typeof o=="string"?i+=n.length-o.length:i+=t.length+n.length+(r.size>0?2:1),i>KEe)return this;let s=new Map(r);return s.delete(t),s.set(t,n),this._fromState(s,i)}unset(t){let n=this._getState(),r=n.get(t);if(typeof r!="string")return this;let o=this._length-(t.length+r.length+1);n.size>1&&(o=o-1);let i=new Map(n);return i.delete(t),this._fromState(i,o)}get(t){return this._getState().get(t)}serialize(){let t="",n=0;for(let r of this._getState())n>0&&(t=JEe+t),t=`${r[0]}${ZEe}${r[1]}`+t,n++;return t}_getState(){if(this._internalState)return this._internalState;let t=this._rawTraceState.split(JEe),n=new Map,r=0;for(let o of t){let i=o.trim(),s=i.indexOf(ZEe);if(s===-1)continue;let c=i.slice(0,s),l=i.slice(s+1);if(!(0,qM.validateKey)(c)||!(0,qM.validateValue)(l))continue;let f=r+i.length+(n.size>0?1:0);if(!(f>KEe)&&(n.set(c,l),r=f,n.size>=xst))break}return this._length=r,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(t,n){let r=Object.create(e.prototype);return r._internalState=t,r._length=n,r}};VM.TraceState=c5});var XEe=F(eu=>{"use strict";A();Object.defineProperty(eu,"__esModule",{value:!0});eu.W3CTraceContextPropagator=eu.parseTraceParent=eu.TRACE_STATE_HEADER=eu.TRACE_PARENT_HEADER=void 0;var YM=(ze(),Me(We)),Dst=fB(),Bst=l5();eu.TRACE_PARENT_HEADER="traceparent";eu.TRACE_STATE_HEADER="tracestate";var Nst="00",Ost="(?!ff)[\\da-f]{2}",wst="(?![0]{32})[\\da-f]{32}",kst="(?![0]{16})[\\da-f]{16}",Pst="[\\da-f]{2}",Mst=new RegExp(`^\\s?(${Ost})-(${wst})-(${kst})-(${Pst})(-.*)?\\s?$`);function WEe(e){let t=Mst.exec(e);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}eu.parseTraceParent=WEe;var d5=class{inject(t,n,r){let o=YM.trace.getSpanContext(t);if(!o||(0,Dst.isTracingSuppressed)(t)||!(0,YM.isSpanContextValid)(o))return;let i=`${Nst}-${o.traceId}-${o.spanId}-0${Number(o.traceFlags||YM.TraceFlags.NONE).toString(16)}`;r.set(n,eu.TRACE_PARENT_HEADER,i),o.traceState&&r.set(n,eu.TRACE_STATE_HEADER,o.traceState.serialize())}extract(t,n,r){let o=r.get(n,eu.TRACE_PARENT_HEADER);if(!o)return t;let i=Array.isArray(o)?o[0]:o;if(typeof i!="string")return t;let s=WEe(i);if(!s)return t;s.isRemote=!0;let c=r.get(n,eu.TRACE_STATE_HEADER);if(c){let l=Array.isArray(c)?c.join(","):c;s.traceState=new Bst.TraceState(typeof l=="string"?l:void 0)}return YM.trace.setSpanContext(t,s)}fields(){return[eu.TRACE_PARENT_HEADER,eu.TRACE_STATE_HEADER]}};eu.W3CTraceContextPropagator=d5});var e0e=F(tf=>{"use strict";A();Object.defineProperty(tf,"__esModule",{value:!0});tf.getRPCMetadata=tf.deleteRPCMetadata=tf.setRPCMetadata=tf.RPCType=void 0;var Lst=(ze(),Me(We)),p5=(0,Lst.createContextKey)("OpenTelemetry SDK Context Key RPC_METADATA"),Ust;(function(e){e.HTTP="http"})(Ust=tf.RPCType||(tf.RPCType={}));function Qst(e,t){return e.setValue(p5,t)}tf.setRPCMetadata=Qst;function Fst(e){return e.deleteValue(p5)}tf.deleteRPCMetadata=Fst;function Gst(e){return e.getValue(p5)}tf.getRPCMetadata=Gst});var i0e=F(KM=>{"use strict";A();Object.defineProperty(KM,"__esModule",{value:!0});KM.isPlainObject=void 0;var zst="[object Object]",jst="[object Null]",Hst="[object Undefined]",$st=Function.prototype,t0e=$st.toString,qst=t0e.call(Object),Vst=Object.getPrototypeOf,n0e=Object.prototype,r0e=n0e.hasOwnProperty,Uy=Symbol?Symbol.toStringTag:void 0,o0e=n0e.toString;function Yst(e){if(!Kst(e)||Jst(e)!==zst)return!1;let t=Vst(e);if(t===null)return!0;let n=r0e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&t0e.call(n)===qst}KM.isPlainObject=Yst;function Kst(e){return e!=null&&typeof e=="object"}function Jst(e){return e==null?e===void 0?Hst:jst:Uy&&Uy in Object(e)?Zst(e):Wst(e)}function Zst(e){let t=r0e.call(e,Uy),n=e[Uy],r=!1;try{e[Uy]=void 0,r=!0}catch{}let o=o0e.call(e);return r&&(t?e[Uy]=n:delete e[Uy]),o}function Wst(e){return o0e.call(e)}});var l0e=F(WM=>{"use strict";A();Object.defineProperty(WM,"__esModule",{value:!0});WM.merge=void 0;var s0e=i0e(),Xst=20;function eat(...e){let t=e.shift(),n=new WeakMap;for(;e.length>0;)t=u0e(t,e.shift(),0,n);return t}WM.merge=eat;function f5(e){return ZM(e)?e.slice():e}function u0e(e,t,n=0,r){let o;if(!(n>Xst)){if(n++,JM(e)||JM(t)||c0e(t))o=f5(t);else if(ZM(e)){if(o=e.slice(),ZM(t))for(let i=0,s=t.length;i<s;i++)o.push(f5(t[i]));else if(EB(t)){let i=Object.keys(t);for(let s=0,c=i.length;s<c;s++){let l=i[s];l==="__proto__"||l==="constructor"||l==="prototype"||(o[l]=f5(t[l]))}}}else if(EB(e))if(EB(t)){if(!tat(e,t))return t;o=Object.assign({},e);let i=Object.keys(t);for(let s=0,c=i.length;s<c;s++){let l=i[s];if(l==="__proto__"||l==="constructor"||l==="prototype")continue;let f=t[l];if(JM(f))typeof f>"u"?delete o[l]:o[l]=f;else{let h=o[l],y=f;if(a0e(e,l,r)||a0e(t,l,r))delete o[l];else{if(EB(h)&&EB(y)){let S=r.get(h)||[],b=r.get(y)||[];S.push({obj:e,key:l}),b.push({obj:t,key:l}),r.set(h,S),r.set(y,b)}o[l]=u0e(o[l],f,n,r)}}}}else o=t;return o}}function a0e(e,t,n){let r=n.get(e[t])||[];for(let o=0,i=r.length;o<i;o++){let s=r[o];if(s.key===t&&s.obj===e)return!0}return!1}function ZM(e){return Array.isArray(e)}function c0e(e){return typeof e=="function"}function EB(e){return!JM(e)&&!ZM(e)&&!c0e(e)&&typeof e=="object"}function JM(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e>"u"||e instanceof Date||e instanceof RegExp||e===null}function tat(e,t){return!(!(0,s0e.isPlainObject)(e)||!(0,s0e.isPlainObject)(t))}});var d0e=F(sC=>{"use strict";A();Object.defineProperty(sC,"__esModule",{value:!0});sC.callWithTimeout=sC.TimeoutError=void 0;var XM=class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}};sC.TimeoutError=XM;function nat(e,t){let n,r=new Promise(function(i,s){n=setTimeout(function(){s(new XM("Operation timed out."))},t)});return Promise.race([e,r]).then(o=>(clearTimeout(n),o),o=>{throw clearTimeout(n),o})}sC.callWithTimeout=nat});var f0e=F(aC=>{"use strict";A();Object.defineProperty(aC,"__esModule",{value:!0});aC.isUrlIgnored=aC.urlMatches=void 0;function p0e(e,t){return typeof t=="string"?e===t:!!e.match(t)}aC.urlMatches=p0e;function rat(e,t){if(!t)return!1;for(let n of t)if(p0e(e,n))return!0;return!1}aC.isUrlIgnored=rat});var m0e=F(eL=>{"use strict";A();Object.defineProperty(eL,"__esModule",{value:!0});eL.Deferred=void 0;var m5=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)}};eL.Deferred=m5});var A0e=F(tL=>{"use strict";A();Object.defineProperty(tL,"__esModule",{value:!0});tL.BindOnceFuture=void 0;var oat=m0e(),A5=class{_isCalled=!1;_deferred=new oat.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}};tL.BindOnceFuture=A5});var h0e=F(nL=>{"use strict";A();Object.defineProperty(nL,"__esModule",{value:!0});nL.diagLogLevelFromString=void 0;var mg=(ze(),Me(We)),g0e={ALL:mg.DiagLogLevel.ALL,VERBOSE:mg.DiagLogLevel.VERBOSE,DEBUG:mg.DiagLogLevel.DEBUG,INFO:mg.DiagLogLevel.INFO,WARN:mg.DiagLogLevel.WARN,ERROR:mg.DiagLogLevel.ERROR,NONE:mg.DiagLogLevel.NONE};function iat(e){if(e==null)return;let t=g0e[e.toUpperCase()];return t??(mg.diag.warn(`Unknown log level "${e}", expected one of ${Object.keys(g0e)}, using default`),mg.DiagLogLevel.INFO)}nL.diagLogLevelFromString=iat});var E0e=F(rL=>{"use strict";A();Object.defineProperty(rL,"__esModule",{value:!0});rL._export=void 0;var _0e=(ze(),Me(We)),sat=fB();function aat(e,t){return new Promise(n=>{_0e.context.with((0,sat.suppressTracing)(_0e.context.active()),()=>{e.export(t,n)})})}rL._export=aat});var br=F(Ne=>{"use strict";A();Object.defineProperty(Ne,"__esModule",{value:!0});Ne.diagLogLevelFromString=Ne.BindOnceFuture=Ne.urlMatches=Ne.isUrlIgnored=Ne.callWithTimeout=Ne.TimeoutError=Ne.merge=Ne.TraceState=Ne.unsuppressTracing=Ne.suppressTracing=Ne.isTracingSuppressed=Ne.setRPCMetadata=Ne.getRPCMetadata=Ne.deleteRPCMetadata=Ne.RPCType=Ne.parseTraceParent=Ne.W3CTraceContextPropagator=Ne.TRACE_STATE_HEADER=Ne.TRACE_PARENT_HEADER=Ne.CompositePropagator=Ne.otperformance=Ne.getStringListFromEnv=Ne.getNumberFromEnv=Ne.getBooleanFromEnv=Ne.getStringFromEnv=Ne._globalThis=Ne.SDK_INFO=Ne.parseKeyPairsIntoRecord=Ne.ExportResultCode=Ne.unrefTimer=Ne.timeInputToHrTime=Ne.millisToHrTime=Ne.isTimeInputHrTime=Ne.isTimeInput=Ne.hrTimeToTimeStamp=Ne.hrTimeToSeconds=Ne.hrTimeToNanoseconds=Ne.hrTimeToMilliseconds=Ne.hrTimeToMicroseconds=Ne.hrTimeDuration=Ne.hrTime=Ne.getTimeOrigin=Ne.addHrTimes=Ne.loggingErrorHandler=Ne.setGlobalErrorHandler=Ne.globalErrorHandler=Ne.sanitizeAttributes=Ne.isAttributeValue=Ne.AnchoredClock=Ne.W3CBaggagePropagator=void 0;Ne.internal=void 0;var uat=npe();Object.defineProperty(Ne,"W3CBaggagePropagator",{enumerable:!0,get:function(){return uat.W3CBaggagePropagator}});var cat=rpe();Object.defineProperty(Ne,"AnchoredClock",{enumerable:!0,get:function(){return cat.AnchoredClock}});var y0e=upe();Object.defineProperty(Ne,"isAttributeValue",{enumerable:!0,get:function(){return y0e.isAttributeValue}});Object.defineProperty(Ne,"sanitizeAttributes",{enumerable:!0,get:function(){return y0e.sanitizeAttributes}});var S0e=lpe();Object.defineProperty(Ne,"globalErrorHandler",{enumerable:!0,get:function(){return S0e.globalErrorHandler}});Object.defineProperty(Ne,"setGlobalErrorHandler",{enumerable:!0,get:function(){return S0e.setGlobalErrorHandler}});var lat=D9();Object.defineProperty(Ne,"loggingErrorHandler",{enumerable:!0,get:function(){return lat.loggingErrorHandler}});var Nl=jEe();Object.defineProperty(Ne,"addHrTimes",{enumerable:!0,get:function(){return Nl.addHrTimes}});Object.defineProperty(Ne,"getTimeOrigin",{enumerable:!0,get:function(){return Nl.getTimeOrigin}});Object.defineProperty(Ne,"hrTime",{enumerable:!0,get:function(){return Nl.hrTime}});Object.defineProperty(Ne,"hrTimeDuration",{enumerable:!0,get:function(){return Nl.hrTimeDuration}});Object.defineProperty(Ne,"hrTimeToMicroseconds",{enumerable:!0,get:function(){return Nl.hrTimeToMicroseconds}});Object.defineProperty(Ne,"hrTimeToMilliseconds",{enumerable:!0,get:function(){return Nl.hrTimeToMilliseconds}});Object.defineProperty(Ne,"hrTimeToNanoseconds",{enumerable:!0,get:function(){return Nl.hrTimeToNanoseconds}});Object.defineProperty(Ne,"hrTimeToSeconds",{enumerable:!0,get:function(){return Nl.hrTimeToSeconds}});Object.defineProperty(Ne,"hrTimeToTimeStamp",{enumerable:!0,get:function(){return Nl.hrTimeToTimeStamp}});Object.defineProperty(Ne,"isTimeInput",{enumerable:!0,get:function(){return Nl.isTimeInput}});Object.defineProperty(Ne,"isTimeInputHrTime",{enumerable:!0,get:function(){return Nl.isTimeInputHrTime}});Object.defineProperty(Ne,"millisToHrTime",{enumerable:!0,get:function(){return Nl.millisToHrTime}});Object.defineProperty(Ne,"timeInputToHrTime",{enumerable:!0,get:function(){return Nl.timeInputToHrTime}});var dat=HEe();Object.defineProperty(Ne,"unrefTimer",{enumerable:!0,get:function(){return dat.unrefTimer}});var pat=$Ee();Object.defineProperty(Ne,"ExportResultCode",{enumerable:!0,get:function(){return pat.ExportResultCode}});var fat=C9();Object.defineProperty(Ne,"parseKeyPairsIntoRecord",{enumerable:!0,get:function(){return fat.parseKeyPairsIntoRecord}});var Qy=i5();Object.defineProperty(Ne,"SDK_INFO",{enumerable:!0,get:function(){return Qy.SDK_INFO}});Object.defineProperty(Ne,"_globalThis",{enumerable:!0,get:function(){return Qy._globalThis}});Object.defineProperty(Ne,"getStringFromEnv",{enumerable:!0,get:function(){return Qy.getStringFromEnv}});Object.defineProperty(Ne,"getBooleanFromEnv",{enumerable:!0,get:function(){return Qy.getBooleanFromEnv}});Object.defineProperty(Ne,"getNumberFromEnv",{enumerable:!0,get:function(){return Qy.getNumberFromEnv}});Object.defineProperty(Ne,"getStringListFromEnv",{enumerable:!0,get:function(){return Qy.getStringListFromEnv}});Object.defineProperty(Ne,"otperformance",{enumerable:!0,get:function(){return Qy.otperformance}});var mat=VEe();Object.defineProperty(Ne,"CompositePropagator",{enumerable:!0,get:function(){return mat.CompositePropagator}});var oL=XEe();Object.defineProperty(Ne,"TRACE_PARENT_HEADER",{enumerable:!0,get:function(){return oL.TRACE_PARENT_HEADER}});Object.defineProperty(Ne,"TRACE_STATE_HEADER",{enumerable:!0,get:function(){return oL.TRACE_STATE_HEADER}});Object.defineProperty(Ne,"W3CTraceContextPropagator",{enumerable:!0,get:function(){return oL.W3CTraceContextPropagator}});Object.defineProperty(Ne,"parseTraceParent",{enumerable:!0,get:function(){return oL.parseTraceParent}});var iL=e0e();Object.defineProperty(Ne,"RPCType",{enumerable:!0,get:function(){return iL.RPCType}});Object.defineProperty(Ne,"deleteRPCMetadata",{enumerable:!0,get:function(){return iL.deleteRPCMetadata}});Object.defineProperty(Ne,"getRPCMetadata",{enumerable:!0,get:function(){return iL.getRPCMetadata}});Object.defineProperty(Ne,"setRPCMetadata",{enumerable:!0,get:function(){return iL.setRPCMetadata}});var g5=fB();Object.defineProperty(Ne,"isTracingSuppressed",{enumerable:!0,get:function(){return g5.isTracingSuppressed}});Object.defineProperty(Ne,"suppressTracing",{enumerable:!0,get:function(){return g5.suppressTracing}});Object.defineProperty(Ne,"unsuppressTracing",{enumerable:!0,get:function(){return g5.unsuppressTracing}});var Aat=l5();Object.defineProperty(Ne,"TraceState",{enumerable:!0,get:function(){return Aat.TraceState}});var gat=l0e();Object.defineProperty(Ne,"merge",{enumerable:!0,get:function(){return gat.merge}});var T0e=d0e();Object.defineProperty(Ne,"TimeoutError",{enumerable:!0,get:function(){return T0e.TimeoutError}});Object.defineProperty(Ne,"callWithTimeout",{enumerable:!0,get:function(){return T0e.callWithTimeout}});var I0e=f0e();Object.defineProperty(Ne,"isUrlIgnored",{enumerable:!0,get:function(){return I0e.isUrlIgnored}});Object.defineProperty(Ne,"urlMatches",{enumerable:!0,get:function(){return I0e.urlMatches}});var hat=A0e();Object.defineProperty(Ne,"BindOnceFuture",{enumerable:!0,get:function(){return hat.BindOnceFuture}});var _at=h0e();Object.defineProperty(Ne,"diagLogLevelFromString",{enumerable:!0,get:function(){return _at.diagLogLevelFromString}});var Eat=E0e();Ne.internal={_export:Eat._export}});var b0e=F(sL=>{"use strict";A();Object.defineProperty(sL,"__esModule",{value:!0});sL.VERSION=void 0;sL.VERSION="0.214.0"});var C0e=F(yB=>{"use strict";A();Object.defineProperty(yB,"__esModule",{value:!0});yB.SeverityNumber=void 0;var yat;(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"})(yat=yB.SeverityNumber||(yB.SeverityNumber={}))});var uL=F(uC=>{"use strict";A();Object.defineProperty(uC,"__esModule",{value:!0});uC.NOOP_LOGGER=uC.NoopLogger=void 0;var aL=class{emit(t){}};uC.NoopLogger=aL;uC.NOOP_LOGGER=new aL});var v0e=F(ym=>{"use strict";A();Object.defineProperty(ym,"__esModule",{value:!0});ym.API_BACKWARDS_COMPATIBILITY_VERSION=ym.makeGetter=ym._global=ym.GLOBAL_LOGS_API_KEY=void 0;ym.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");ym._global=globalThis;function Sat(e,t,n){return r=>r===e?t:n}ym.makeGetter=Sat;ym.API_BACKWARDS_COMPATIBILITY_VERSION=1});var h5=F(cC=>{"use strict";A();Object.defineProperty(cC,"__esModule",{value:!0});cC.NOOP_LOGGER_PROVIDER=cC.NoopLoggerProvider=void 0;var Tat=uL(),cL=class{getLogger(t,n,r){return new Tat.NoopLogger}};cC.NoopLoggerProvider=cL;cC.NOOP_LOGGER_PROVIDER=new cL});var R0e=F(lL=>{"use strict";A();Object.defineProperty(lL,"__esModule",{value:!0});lL.ProxyLogger=void 0;var Iat=uL(),_5=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):Iat.NOOP_LOGGER}};lL.ProxyLogger=_5});var x0e=F(dL=>{"use strict";A();Object.defineProperty(dL,"__esModule",{value:!0});dL.ProxyLoggerProvider=void 0;var bat=h5(),Cat=R0e(),E5=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new Cat.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:bat.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)}};dL.ProxyLoggerProvider=E5});var B0e=F(pL=>{"use strict";A();Object.defineProperty(pL,"__esModule",{value:!0});pL.LogsAPI=void 0;var Pd=v0e(),vat=h5(),D0e=x0e(),y5=class e{constructor(){this._proxyLoggerProvider=new D0e.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return Pd._global[Pd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(Pd._global[Pd.GLOBAL_LOGS_API_KEY]=(0,Pd.makeGetter)(Pd.API_BACKWARDS_COMPATIBILITY_VERSION,t,vat.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=Pd._global[Pd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(Pd._global,Pd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete Pd._global[Pd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new D0e.ProxyLoggerProvider}};pL.LogsAPI=y5});var S5=F(Sm=>{"use strict";A();Object.defineProperty(Sm,"__esModule",{value:!0});Sm.logs=Sm.NoopLogger=Sm.NOOP_LOGGER=Sm.SeverityNumber=void 0;var Rat=C0e();Object.defineProperty(Sm,"SeverityNumber",{enumerable:!0,get:function(){return Rat.SeverityNumber}});var N0e=uL();Object.defineProperty(Sm,"NOOP_LOGGER",{enumerable:!0,get:function(){return N0e.NOOP_LOGGER}});Object.defineProperty(Sm,"NoopLogger",{enumerable:!0,get:function(){return N0e.NoopLogger}});var xat=B0e();Sm.logs=xat.LogsAPI.getInstance()});var O0e=F(lC=>{"use strict";A();Object.defineProperty(lC,"__esModule",{value:!0});lC.disableInstrumentations=lC.enableInstrumentations=void 0;function Dat(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}lC.enableInstrumentations=Dat;function Bat(e){e.forEach(t=>t.disable())}lC.disableInstrumentations=Bat});var P0e=F(fL=>{"use strict";A();Object.defineProperty(fL,"__esModule",{value:!0});fL.registerInstrumentations=void 0;var w0e=(ze(),Me(We)),Nat=S5(),k0e=O0e();function Oat(e){let t=e.tracerProvider||w0e.trace.getTracerProvider(),n=e.meterProvider||w0e.metrics.getMeterProvider(),r=e.loggerProvider||Nat.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,k0e.enableInstrumentations)(o,t,n,r),()=>{(0,k0e.disableInstrumentations)(o)}}fL.registerInstrumentations=Oat});var H0e=F(mL=>{"use strict";A();Object.defineProperty(mL,"__esModule",{value:!0});mL.satisfies=void 0;var C5=(ze(),Me(We)),F0e=/^(?: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-]+)*))?$/,wat=/^(?<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-]+)*))?$/,kat={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function Pat(e,t,n){if(!Mat(e))return C5.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=Fat(e);if(!r)return!1;let o=[],i=G0e(r,t,o,n);return i&&!n?.includePrerelease?Uat(r,o):i}mL.satisfies=Pat;function Mat(e){return typeof e=="string"&&F0e.test(e)}function G0e(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(T5(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=aut(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!T5(e,i,n,r))return!1;return!0}return T5(e,t,n,r)}function T5(e,t,n,r){if(t=Qat(t,r),t.includes(" "))return G0e(e,t,n,r);{let o=Gat(t);return n.push(o),Lat(e,o)}}function Lat(e,t){if(t.invalid)return!1;if(!t.version||b5(t.version))return!0;let n=L0e(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=L0e(r,o)}return kat[t.op]?.includes(n)}function Uat(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function Qat(e,t){return e=e.trim(),e=iut(e,t),e=out(e),e=sut(e,t),e=e.trim(),e}function Mu(e){return!e||e.toLowerCase()==="x"||e==="*"}function Fat(e){let t=e.match(F0e);if(!t){C5.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function Gat(e){if(!e)return{};let t=e.match(wat);if(!t)return C5.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function b5(e){return e==="*"||e==="x"||e==="X"}function M0e(e){let t=parseInt(e,10);return isNaN(t)?e:t}function zat(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 jat(e,t){if(b5(e)||b5(t))return 0;let[n,r]=zat(M0e(e),M0e(t));return n>r?1:n<r?-1:0}function L0e(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=jat(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var z0e="[a-zA-Z0-9-]",j0e="0|[1-9]\\d*",Hat=`\\d*[a-zA-Z-]${z0e}*`,$at="((?:<|>)?=?)",U0e=`(?:${j0e}|${Hat})`,qat=`(?:-(${U0e}(?:\\.${U0e})*))`,Q0e=`${z0e}+`,Vat=`(?:\\+(${Q0e}(?:\\.${Q0e})*))`,I5=`${j0e}|x|X|\\*`,SB=`[v=\\s]*(${I5})(?:\\.(${I5})(?:\\.(${I5})(?:${qat})?${Vat}?)?)?`,Yat=`^${$at}\\s*${SB}$`,Kat=new RegExp(Yat),Jat=`^\\s*(${SB})\\s+-\\s+(${SB})\\s*$`,Zat=new RegExp(Jat),Wat="(?:~>?)",Xat=`^${Wat}${SB}$`,eut=new RegExp(Xat),tut="(?:\\^)",nut=`^${tut}${SB}$`,rut=new RegExp(nut);function out(e){let t=eut;return e.replace(t,(n,r,o,i,s)=>{let c;return Mu(r)?c="":Mu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Mu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?c=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function iut(e,t){let n=rut,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,c,l)=>{let f;return Mu(i)?f="":Mu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Mu(c)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${c}-${l} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${c}${r} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c} <${+i+1}.0.0-0`,f})}function sut(e,t){let n=Kat;return e.replace(n,(r,o,i,s,c,l)=>{let f=Mu(i),h=f||Mu(s),y=h||Mu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),c=0,o===">"?(o=">=",h?(i=+i+1,s=0,c=0):(s=+s+1,c=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function aut(e,t){let n=Zat;return e.replace(n,(r,o,i,s,c,l,f,h,y,S,b,v)=>(Mu(i)?o="":Mu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Mu(c)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Mu(y)?h="":Mu(S)?h=`<${+y+1}.0.0-0`:Mu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var v5=F(Ia=>{"use strict";A();Object.defineProperty(Ia,"__esModule",{value:!0});Ia.massUnwrap=Ia.unwrap=Ia.massWrap=Ia.wrap=void 0;var Lu=console.error.bind(console);function TB(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 uut=(e,t,n)=>{if(!e||!e[t]){Lu("no original function "+String(t)+" to wrap");return}if(!n){Lu("no wrapper function"),Lu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Lu("original object and wrapper must be functions");return}let o=n(r,t);return TB(o,"__original",r),TB(o,"__unwrap",()=>{e[t]===o&&TB(e,t,r)}),TB(o,"__wrapped",!0),TB(e,t,o),o};Ia.wrap=uut;var cut=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Ia.wrap)(r,o,n)})})};Ia.massWrap=cut;var lut=(e,t)=>{if(!e||!e[t]){Lu("no function to unwrap."),Lu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Lu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Ia.unwrap=lut;var dut=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Lu("must provide one or more modules to patch"),Lu(new Error().stack);return}if(!(t&&Array.isArray(t))){Lu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Ia.unwrap)(n,r)})})};Ia.massUnwrap=dut;function IB(e){e&&e.logger&&(typeof e.logger!="function"?Lu("new logger isn't a function, not replacing"):Lu=e.logger)}Ia.default=IB;IB.wrap=Ia.wrap;IB.massWrap=Ia.massWrap;IB.unwrap=Ia.unwrap;IB.massUnwrap=Ia.massUnwrap});var $0e=F(gL=>{"use strict";A();Object.defineProperty(gL,"__esModule",{value:!0});gL.InstrumentationAbstract=void 0;var R5=(ze(),Me(We)),put=S5(),AL=v5(),x5=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=R5.diag.createComponentLogger({namespace:t}),this._tracer=R5.trace.getTracer(t,n),this._meter=R5.metrics.getMeter(t,n),this._logger=put.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=AL.wrap;_unwrap=AL.unwrap;_massWrap=AL.massWrap;_massUnwrap=AL.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)}}};gL.InstrumentationAbstract=x5});var V0e=F((KKt,q0e)=>{A();var dC=1e3,pC=dC*60,fC=pC*60,Fy=fC*24,fut=Fy*7,mut=Fy*365.25;q0e.exports=function(e,t){t=t||{};var n=typeof e;if(n==="string"&&e.length>0)return Aut(e);if(n==="number"&&isFinite(e))return t.long?hut(e):gut(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Aut(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*mut;case"weeks":case"week":case"w":return n*fut;case"days":case"day":case"d":return n*Fy;case"hours":case"hour":case"hrs":case"hr":case"h":return n*fC;case"minutes":case"minute":case"mins":case"min":case"m":return n*pC;case"seconds":case"second":case"secs":case"sec":case"s":return n*dC;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function gut(e){var t=Math.abs(e);return t>=Fy?Math.round(e/Fy)+"d":t>=fC?Math.round(e/fC)+"h":t>=pC?Math.round(e/pC)+"m":t>=dC?Math.round(e/dC)+"s":e+"ms"}function hut(e){var t=Math.abs(e);return t>=Fy?hL(e,t,Fy,"day"):t>=fC?hL(e,t,fC,"hour"):t>=pC?hL(e,t,pC,"minute"):t>=dC?hL(e,t,dC,"second"):e+" ms"}function hL(e,t,n,r){var o=t>=n*1.5;return Math.round(e/n)+" "+r+(o?"s":"")}});var D5=F((ZKt,Y0e)=>{A();function _ut(e){n.debug=n,n.default=n,n.coerce=l,n.disable=s,n.enable=o,n.enabled=c,n.humanize=V0e(),n.destroy=f,Object.keys(e).forEach(h=>{n[h]=e[h]}),n.names=[],n.skips=[],n.formatters={};function t(h){let y=0;for(let S=0;S<h.length;S++)y=(y<<5)-y+h.charCodeAt(S),y|=0;return n.colors[Math.abs(y)%n.colors.length]}n.selectColor=t;function n(h){let y,S=null,b,v;function x(...D){if(!x.enabled)return;let k=x,Q=Number(new Date),z=Q-(y||Q);k.diff=z,k.prev=y,k.curr=Q,y=Q,D[0]=n.coerce(D[0]),typeof D[0]!="string"&&D.unshift("%O");let G=0;D[0]=D[0].replace(/%([a-zA-Z%])/g,(ie,ge)=>{if(ie==="%%")return"%";G++;let Ce=n.formatters[ge];if(typeof Ce=="function"){let ve=D[G];ie=Ce.call(k,ve),D.splice(G,1),G--}return ie}),n.formatArgs.call(k,D),(k.log||n.log).apply(k,D)}return x.namespace=h,x.useColors=n.useColors(),x.color=n.selectColor(h),x.extend=r,x.destroy=n.destroy,Object.defineProperty(x,"enabled",{enumerable:!0,configurable:!1,get:()=>S!==null?S:(b!==n.namespaces&&(b=n.namespaces,v=n.enabled(h)),v),set:D=>{S=D}}),typeof n.init=="function"&&n.init(x),x}function r(h,y){let S=n(this.namespace+(typeof y>"u"?":":y)+h);return S.log=this.log,S}function o(h){n.save(h),n.namespaces=h,n.names=[],n.skips=[];let y=(typeof h=="string"?h:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let S of y)S[0]==="-"?n.skips.push(S.slice(1)):n.names.push(S)}function i(h,y){let S=0,b=0,v=-1,x=0;for(;S<h.length;)if(b<y.length&&(y[b]===h[S]||y[b]==="*"))y[b]==="*"?(v=b,x=S,b++):(S++,b++);else if(v!==-1)b=v+1,x++,S=x;else return!1;for(;b<y.length&&y[b]==="*";)b++;return b===y.length}function s(){let h=[...n.names,...n.skips.map(y=>"-"+y)].join(",");return n.enable(""),h}function c(h){for(let y of n.skips)if(i(h,y))return!1;for(let y of n.names)if(i(h,y))return!0;return!1}function l(h){return h instanceof Error?h.stack||h.message:h}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return n.enable(n.load()),n}Y0e.exports=_ut});var K0e=F((Oc,_L)=>{A();Oc.formatArgs=yut;Oc.save=Sut;Oc.load=Tut;Oc.useColors=Eut;Oc.storage=Iut();Oc.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`."))}})();Oc.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 Eut(){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 yut(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+_L.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)}Oc.log=console.debug||console.log||(()=>{});function Sut(e){try{e?Oc.storage.setItem("debug",e):Oc.storage.removeItem("debug")}catch{}}function Tut(){let e;try{e=Oc.storage.getItem("debug")||Oc.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Iut(){try{return localStorage}catch{}}_L.exports=D5()(Oc);var{formatters:but}=_L.exports;but.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var Z0e=F((eJt,J0e)=>{"use strict";A();J0e.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 eye=F((nJt,X0e)=>{"use strict";A();var Cut=Fe("os"),W0e=Fe("tty"),Md=Z0e(),{env:Vs}=process,d_;Md("no-color")||Md("no-colors")||Md("color=false")||Md("color=never")?d_=0:(Md("color")||Md("colors")||Md("color=true")||Md("color=always"))&&(d_=1);"FORCE_COLOR"in Vs&&(Vs.FORCE_COLOR==="true"?d_=1:Vs.FORCE_COLOR==="false"?d_=0:d_=Vs.FORCE_COLOR.length===0?1:Math.min(parseInt(Vs.FORCE_COLOR,10),3));function B5(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function N5(e,t){if(d_===0)return 0;if(Md("color=16m")||Md("color=full")||Md("color=truecolor"))return 3;if(Md("color=256"))return 2;if(e&&!t&&d_===void 0)return 0;let n=d_||0;if(Vs.TERM==="dumb")return n;if(process.platform==="win32"){let r=Cut.release().split(".");return Number(r[0])>=10&&Number(r[2])>=10586?Number(r[2])>=14931?3:2:1}if("CI"in Vs)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(r=>r in Vs)||Vs.CI_NAME==="codeship"?1:n;if("TEAMCITY_VERSION"in Vs)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(Vs.TEAMCITY_VERSION)?1:0;if(Vs.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in Vs){let r=parseInt((Vs.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(Vs.TERM_PROGRAM){case"iTerm.app":return r>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(Vs.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(Vs.TERM)||"COLORTERM"in Vs?1:n}function vut(e){let t=N5(e,e&&e.isTTY);return B5(t)}X0e.exports={supportsColor:vut,stdout:B5(N5(!0,W0e.isatty(1))),stderr:B5(N5(!0,W0e.isatty(2)))}});var nye=F((Ys,yL)=>{A();var Rut=Fe("tty"),EL=Fe("util");Ys.init=kut;Ys.log=Nut;Ys.formatArgs=Dut;Ys.save=Out;Ys.load=wut;Ys.useColors=xut;Ys.destroy=EL.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ys.colors=[6,2,3,4,5,1];try{let e=eye();e&&(e.stderr||e).level>=2&&(Ys.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{}Ys.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 xut(){return"colors"in Ys.inspectOpts?!!Ys.inspectOpts.colors:Rut.isatty(process.stderr.fd)}function Dut(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+"+yL.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=But()+t+" "+e[0]}function But(){return Ys.inspectOpts.hideDate?"":new Date().toISOString()+" "}function Nut(...e){return process.stderr.write(EL.formatWithOptions(Ys.inspectOpts,...e)+`
6
6
  `)}function Out(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function wut(){return process.env.DEBUG}function kut(e){e.inspectOpts={};let t=Object.keys(Ys.inspectOpts);for(let n=0;n<t.length;n++)e.inspectOpts[t[n]]=Ys.inspectOpts[t[n]]}yL.exports=D5()(Ys);var{formatters:tye}=yL.exports;tye.o=function(e){return this.inspectOpts.colors=this.useColors,EL.inspect(e,this.inspectOpts).split(`
@@ -35,7 +35,7 @@ Url: ${BU(e)}`),!0}return!1}function Jdt(e,t){return t?.length?CU(e).some(n=>S_(
35
35
  `);for(let o of r){if(!o)continue;let i=o.indexOf(":");if(i===-1)continue;let s=o.substring(0,i).toLowerCase(),c=o.substring(i+1).trim(),l=n.get(s);l&&Array.isArray(l)?l.push(c):l?n.set(s,[l,c]):n.set(s,c)}}return n}onRequestCreated({request:t}){let n=this.getConfig(),r=n.enabled!==!1;if((0,QN.safeExecuteInTheMiddle)(()=>!r||t.method==="CONNECT"||n.ignoreRequestHook?.(t),ie=>ie&&this._diag.error("caught ignoreRequestHook error: ",ie),!0))return;let i=(0,EF.hrTime)(),s;try{s=new eEt.URL(t.path,t.origin)}catch(ie){this._diag.warn("could not determine url.full:",ie);return}let c=s.protocol.replace(":",""),l=this.getRequestMethod(t.method),f={[ts.ATTR_HTTP_REQUEST_METHOD]:l,[ts.ATTR_HTTP_REQUEST_METHOD_ORIGINAL]:t.method,[ts.ATTR_URL_FULL]:s.toString(),[ts.ATTR_URL_PATH]:s.pathname,[ts.ATTR_URL_QUERY]:s.search,[ts.ATTR_URL_SCHEME]:c},h={https:"443",http:"80"},y=s.hostname,S=s.port||h[c];f[ts.ATTR_SERVER_ADDRESS]=y,S&&!isNaN(Number(S))&&(f[ts.ATTR_SERVER_PORT]=Number(S));let v=this.parseRequestHeaders(t).get("user-agent");if(v){let ie=Array.isArray(v)?v[v.length-1]:v;f[ts.ATTR_USER_AGENT_ORIGINAL]=ie}let x=(0,QN.safeExecuteInTheMiddle)(()=>n.startSpanHook?.(t),ie=>ie&&this._diag.error("caught startSpanHook error: ",ie),!0);x&&Object.entries(x).forEach(([ie,ge])=>{f[ie]=ge});let D=Gl.context.active(),k=Gl.trace.getSpan(D),Q;n.requireParentforSpans&&(!k||!Gl.trace.isSpanContextValid(k.spanContext()))?Q=Gl.trace.wrapSpanContext(Gl.INVALID_SPAN_CONTEXT):Q=this.tracer.startSpan(l==="_OTHER"?"HTTP":l,{kind:Gl.SpanKind.CLIENT,attributes:f},D),(0,QN.safeExecuteInTheMiddle)(()=>n.requestHook?.(Q,t),ie=>ie&&this._diag.error("caught requestHook error: ",ie),!0);let z=Gl.trace.setSpan(Gl.context.active(),Q),G={};Gl.propagation.inject(z,G);let $=Object.entries(G);for(let ie=0;ie<$.length;ie++){let[ge,Ce]=$[ie];typeof t.addHeader=="function"?t.addHeader(ge,Ce):typeof t.headers=="string"?t.headers+=`${ge}: ${Ce}\r
36
36
  `:Array.isArray(t.headers)&&t.headers.push(ge,Ce)}this._recordFromReq.set(t,{span:Q,attributes:f,startTime:i})}onRequestHeaders({request:t,socket:n}){let r=this._recordFromReq.get(t);if(!r)return;let o=this.getConfig(),{span:i}=r,{remoteAddress:s,remotePort:c}=n,l={[ts.ATTR_NETWORK_PEER_ADDRESS]:s,[ts.ATTR_NETWORK_PEER_PORT]:c};if(o.headersToSpanAttributes?.requestHeaders){let f=new Set(o.headersToSpanAttributes.requestHeaders.map(y=>y.toLowerCase())),h=this.parseRequestHeaders(t);for(let[y,S]of h.entries())if(f.has(y)){let b=Array.isArray(S)?S:[S];l[`http.request.header.${y}`]=b}}i.setAttributes(l)}onResponseHeaders({request:t,response:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i}=r,s={[ts.ATTR_HTTP_RESPONSE_STATUS_CODE]:n.statusCode},c=this.getConfig();if((0,QN.safeExecuteInTheMiddle)(()=>c.responseHook?.(o,{request:t,response:n}),l=>l&&this._diag.error("caught responseHook error: ",l),!0),c.headersToSpanAttributes?.responseHeaders){let l=new Set;c.headersToSpanAttributes?.responseHeaders.forEach(f=>l.add(f.toLowerCase()));for(let f=0;f<n.headers.length;f=f+2){let h=n.headers[f].toString().toLowerCase(),y=n.headers[f+1];if(l.has(h)){let S=`http.response.header.${h}`;Object.hasOwn(s,S)?s[S].push(y.toString()):s[S]=[y.toString()]}}}o.setAttributes(s),o.setStatus({code:n.statusCode>=400?Gl.SpanStatusCode.ERROR:Gl.SpanStatusCode.UNSET}),r.attributes=Object.assign(i,s)}onDone({request:t}){let n=this._recordFromReq.get(t);if(!n)return;let{span:r,attributes:o,startTime:i}=n;r.end(),this._recordFromReq.delete(t),this.recordRequestDuration(o,i)}onError({request:t,error:n}){let r=this._recordFromReq.get(t);if(!r)return;let{span:o,attributes:i,startTime:s}=r;o.recordException(n),o.setStatus({code:Gl.SpanStatusCode.ERROR,message:n.message}),o.end(),this._recordFromReq.delete(t),i[ts.ATTR_ERROR_TYPE]=n.message,this.recordRequestDuration(i,s)}recordRequestDuration(t,n){let r={};[ts.ATTR_HTTP_RESPONSE_STATUS_CODE,ts.ATTR_HTTP_REQUEST_METHOD,ts.ATTR_SERVER_ADDRESS,ts.ATTR_SERVER_PORT,ts.ATTR_URL_SCHEME,ts.ATTR_ERROR_TYPE].forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,EF.hrTimeToMilliseconds)((0,EF.hrTimeDuration)(n,(0,EF.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"}};yF.UndiciInstrumentation=dK});var iDe=F(SF=>{"use strict";A();Object.defineProperty(SF,"__esModule",{value:!0});SF.UndiciInstrumentation=void 0;var tEt=oDe();Object.defineProperty(SF,"UndiciInstrumentation",{enumerable:!0,get:function(){return tEt.UndiciInstrumentation}})});function sDe(e,t="/"){let n=`${e}`;return n.endsWith("/")&&t.startsWith("/")?`${n}${t.slice(1)}`:!n.endsWith("/")&&!t.startsWith("/")?`${n}/${t}`:`${n}${t}`}function iEt(e,t={}){return typeof e.spans=="boolean"?e.spans:!t.skipOpenTelemetrySetup&&ki(t)}function sEt(e={}){return{requireParentforSpans:!1,ignoreRequestHook:n=>{let r=sDe(n.origin,n.path),o=e.ignoreOutgoingRequests;return!!(o&&r&&o(r))},startSpanHook:n=>{let r=sDe(n.origin,n.path);if(r.startsWith("data:")){let o=$C(r);return{[kt]:"auto.http.otel.node_fetch","http.url":o,[v_]:o,[Fd]:`${n.method||"GET"} ${o}`}}return{[kt]:"auto.http.otel.node_fetch"}},requestHook:e.requestHook,responseHook:e.responseHook,headersToSpanAttributes:e.headersToSpanAttributes}}var aDe,uDe,nEt,rEt,oEt,cDe,lDe=O(()=>{A();aDe=se(iDe(),1);dt();gr();uDe="NodeFetch",nEt=at(uDe,aDe.UndiciInstrumentation,e=>sEt(e)),rEt=at(`${uDe}.sentry`,cS,e=>e),oEt=((e={})=>({name:"NodeFetch",setupOnce(){iEt(e,gt()?.getOptions())&&nEt(e),rEt(e)}})),cDe=oEt});var TF=F(FN=>{"use strict";A();Object.defineProperty(FN,"__esModule",{value:!0});FN.ExpressLayerType=void 0;var aEt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(aEt=FN.ExpressLayerType||(FN.ExpressLayerType={}))});var IF=F(GN=>{"use strict";A();Object.defineProperty(GN,"__esModule",{value:!0});GN.AttributeNames=void 0;var uEt;(function(e){e.EXPRESS_TYPE="express.type",e.EXPRESS_NAME="express.name"})(uEt=GN.AttributeNames||(GN.AttributeNames={}))});var pK=F(Tv=>{"use strict";A();Object.defineProperty(Tv,"__esModule",{value:!0});Tv._LAYERS_STORE_PROPERTY=Tv.kLayerPatched=void 0;Tv.kLayerPatched=Symbol("express-layer-patched");Tv._LAYERS_STORE_PROPERTY="__ot_middlewares"});var fDe=F(ns=>{"use strict";A();Object.defineProperty(ns,"__esModule",{value:!0});ns.getActualMatchedRoute=ns.getConstructedRoute=ns.getLayerPath=ns.asErrorAndMessage=ns.isLayerIgnored=ns.getLayerMetadata=ns.getRouterPath=ns.storeLayerPath=void 0;var fK=TF(),Iv=IF(),AS=pK(),cEt=(e,t)=>(Array.isArray(e[AS._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,AS._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),t===void 0?{isLayerPathStored:!1}:(e[AS._LAYERS_STORE_PROPERTY].push(t),{isLayerPathStored:!0}));ns.storeLayerPath=cEt;var lEt=(e,t)=>{let n=t.handle?.stack?.[0];return n?.route?.path?`${e}${n.route.path}`:n?.handle?.stack?(0,ns.getRouterPath)(e,n):e};ns.getRouterPath=lEt;var dEt=(e,t,n)=>{if(t.name==="router"){let r=(0,ns.getRouterPath)("",t),o=r||n||e||"/";return{attributes:{[Iv.AttributeNames.EXPRESS_NAME]:o,[Iv.AttributeNames.EXPRESS_TYPE]:fK.ExpressLayerType.ROUTER},name:`router - ${o}`}}else return t.name==="bound dispatch"||t.name==="handle"?{attributes:{[Iv.AttributeNames.EXPRESS_NAME]:(e||n)??"request handler",[Iv.AttributeNames.EXPRESS_TYPE]:fK.ExpressLayerType.REQUEST_HANDLER},name:`request handler${t.path?` - ${e||n}`:""}`}:{attributes:{[Iv.AttributeNames.EXPRESS_NAME]:t.name,[Iv.AttributeNames.EXPRESS_TYPE]:fK.ExpressLayerType.MIDDLEWARE},name:`middleware - ${t.name}`}};ns.getLayerMetadata=dEt;var pEt=(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")},fEt=(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(pEt(e,r))return!0}catch{}return!1};ns.isLayerIgnored=fEt;var mEt=e=>e instanceof Error?[e,e.message]:[String(e),String(e)];ns.asErrorAndMessage=mEt;var AEt=e=>{let t=e[0];return Array.isArray(t)?t.map(n=>dDe(n)||"").join(","):dDe(t)};ns.getLayerPath=AEt;var dDe=e=>{if(typeof e=="string")return e;if(e instanceof RegExp||typeof e=="number")return e.toString()};function pDe(e){let n=(Array.isArray(e[AS._LAYERS_STORE_PROPERTY])?e[AS._LAYERS_STORE_PROPERTY]:[]).filter(r=>r!=="/"&&r!=="/*");return n.length===1&&n[0]==="*"?"*":n.join("").replace(/\/{2,}/g,"/")}ns.getConstructedRoute=pDe;function gEt(e){let t=Array.isArray(e[AS._LAYERS_STORE_PROPERTY])?e[AS._LAYERS_STORE_PROPERTY]:[];if(t.length===0)return;if(t.every(i=>i==="/"))return e.originalUrl==="/"?"/":void 0;let n=pDe(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)||hEt(r))?r:void 0}ns.getActualMatchedRoute=gEt;function hEt(e){return e.includes(":")||e.includes("*")}});var mDe=F(bv=>{"use strict";A();Object.defineProperty(bv,"__esModule",{value:!0});bv.PACKAGE_NAME=bv.PACKAGE_VERSION=void 0;bv.PACKAGE_VERSION="0.62.0";bv.PACKAGE_NAME="@opentelemetry/instrumentation-express"});var EDe=F(CF=>{"use strict";A();Object.defineProperty(CF,"__esModule",{value:!0});CF.ExpressInstrumentation=void 0;var ADe=br(),Qc=(ze(),Me(We)),gDe=TF(),hDe=IF(),Gm=fDe(),_De=mDe(),Cv=on(),_Et=(Zn(),Me(Fr)),bF=pK(),mK=class extends Cv.InstrumentationBase{constructor(t={}){super(_De.PACKAGE_NAME,_De.PACKAGE_VERSION,t)}init(){return[new Cv.InstrumentationNodeModuleDefinition("express",[">=4.0.0 <6"],t=>{let n=typeof t?.Router?.prototype?.route=="function",r=n?t.Router.prototype:t.Router;return(0,Cv.isWrapped)(r.route)&&this._unwrap(r,"route"),this._wrap(r,"route",this._getRoutePatch()),(0,Cv.isWrapped)(r.use)&&this._unwrap(r,"use"),this._wrap(r,"use",this._getRouterUsePatch()),(0,Cv.isWrapped)(t.application.use)&&this._unwrap(t.application,"use"),this._wrap(t.application,"use",this._getAppUsePatch(n)),t},t=>{if(t===void 0)return;let r=typeof t?.Router?.prototype?.route=="function"?t.Router.prototype:t.Router;this._unwrap(r,"route"),this._unwrap(r,"use"),this._unwrap(t.application,"use")})]}_getRoutePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Gm.getLayerPath)(o)),i}}}_getRouterUsePatch(){let t=this;return function(n){return function(...o){let i=n.apply(this,o),s=this.stack[this.stack.length-1];return t._applyPatch(s,(0,Gm.getLayerPath)(o)),i}}}_getAppUsePatch(t){let n=this;return function(r){return function(...i){let s=t?this.router:this._router,c=r.apply(this,i);if(s){let l=s.stack[s.stack.length-1];n._applyPatch(l,(0,Gm.getLayerPath)(i))}return c}}}_applyPatch(t,n){let r=this;t[bF.kLayerPatched]!==!0&&(t[bF.kLayerPatched]=!0,this._wrap(t,"handle",o=>{if(o.length===4)return o;let i=function(s,c){let{isLayerPathStored:l}=(0,Gm.storeLayerPath)(s,n),f=(0,Gm.getConstructedRoute)(s),h=(0,Gm.getActualMatchedRoute)(s),y={[_Et.ATTR_HTTP_ROUTE]:h},S=(0,Gm.getLayerMetadata)(f,t,n),b=S.attributes[hDe.AttributeNames.EXPRESS_TYPE],v=(0,ADe.getRPCMetadata)(Qc.context.active());if(v?.type===ADe.RPCType.HTTP&&(v.route=h),(0,Gm.isLayerIgnored)(S.name,b,r.getConfig()))return b===gDe.ExpressLayerType.MIDDLEWARE&&s[bF._LAYERS_STORE_PROPERTY].pop(),o.apply(this,arguments);if(Qc.trace.getSpan(Qc.context.active())===void 0)return o.apply(this,arguments);let x=r._getSpanName({request:s,layerType:b,route:f},S.name),D=r.tracer.startSpan(x,{attributes:Object.assign(y,S.attributes)}),k=Qc.context.active(),Q=Qc.trace.setSpan(k,D),{requestHook:z}=r.getConfig();z&&(0,Cv.safeExecuteInTheMiddle)(()=>z(D,{request:s,layerType:b,route:f}),Ce=>{Ce&&Qc.diag.error("express instrumentation: request hook failed",Ce)},!0);let G=!1;S.attributes[hDe.AttributeNames.EXPRESS_TYPE]===gDe.ExpressLayerType.ROUTER&&(D.end(),G=!0,Q=k);let $=()=>{G===!1&&(G=!0,D.end())},ie=Array.from(arguments),ge=ie.findIndex(Ce=>typeof Ce=="function");ge>=0&&(arguments[ge]=function(){let Ce=arguments[0],ve=![void 0,null,"route","router"].includes(Ce);if(!G&&ve){let[fn,De]=(0,Gm.asErrorAndMessage)(Ce);D.recordException(fn),D.setStatus({code:Qc.SpanStatusCode.ERROR,message:De})}G===!1&&(G=!0,s.res?.removeListener("finish",$),D.end()),!(s.route&&ve)&&l&&s[bF._LAYERS_STORE_PROPERTY].pop();let Xe=ie[ge],wt=Qc.context.active(),nt=Qc.trace.getSpan(k),Vt=nt?Qc.trace.setSpan(wt,nt):wt;return Qc.context.bind(Vt,Xe).apply(this,arguments)});try{return Qc.context.bind(Q,o).apply(this,arguments)}catch(Ce){let[ve,Xe]=(0,Gm.asErrorAndMessage)(Ce);throw D.recordException(ve),D.setStatus({code:Qc.SpanStatusCode.ERROR,message:Xe}),Ce}finally{G||c.once("finish",$)}};for(let s in o)Object.defineProperty(i,s,{get(){return o[s]},set(c){o[s]=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 Qc.diag.error("express instrumentation: error calling span name rewrite hook",o),n}}};CF.ExpressInstrumentation=mK});var yDe=F(Y_=>{"use strict";A();Object.defineProperty(Y_,"__esModule",{value:!0});Y_.AttributeNames=Y_.ExpressLayerType=Y_.ExpressInstrumentation=void 0;var EEt=EDe();Object.defineProperty(Y_,"ExpressInstrumentation",{enumerable:!0,get:function(){return EEt.ExpressInstrumentation}});var yEt=TF();Object.defineProperty(Y_,"ExpressLayerType",{enumerable:!0,get:function(){return yEt.ExpressLayerType}});var SEt=IF();Object.defineProperty(Y_,"AttributeNames",{enumerable:!0,get:function(){return SEt.AttributeNames}})});var bs,gS=O(()=>{A();bs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__});function TEt(e){zr(e,"auto.http.otel.express");let t=Ot(e).data,n=t["express.type"];n&&e.setAttribute(Xt,`${n}.express`);let r=t["express.name"];typeof r=="string"&&e.updateName(r)}function IEt(e,t){if(vn()===Qd())return bs&&J.warn("Isolation scope is still default isolation scope - skipping setting transactionName"),t;if(e.layerType==="request_handler"){let n=e.request,r=n.method?n.method.toUpperCase():"GET";vn().setTransactionName(`${r} ${e.route}`)}return t}var SDe,TDe,IDe,bEt,bDe,CDe=O(()=>{A();SDe=se(yDe(),1);dt();gr();gS();TDe="Express";IDe=at(TDe,()=>new SDe.ExpressInstrumentation({requestHook:e=>TEt(e),spanNameHook:(e,t)=>IEt(e,t)})),bEt=(()=>({name:TDe,setupOnce(){IDe()}})),bDe=bEt});var vDe=F(zN=>{"use strict";A();Object.defineProperty(zN,"__esModule",{value:!0});zN.SeverityNumber=void 0;var CEt;(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"})(CEt=zN.SeverityNumber||(zN.SeverityNumber={}))});var xF=F(vv=>{"use strict";A();Object.defineProperty(vv,"__esModule",{value:!0});vv.NOOP_LOGGER=vv.NoopLogger=void 0;var RF=class{emit(t){}};vv.NoopLogger=RF;vv.NOOP_LOGGER=new RF});var RDe=F(zm=>{"use strict";A();Object.defineProperty(zm,"__esModule",{value:!0});zm.API_BACKWARDS_COMPATIBILITY_VERSION=zm.makeGetter=zm._global=zm.GLOBAL_LOGS_API_KEY=void 0;zm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");zm._global=globalThis;function vEt(e,t,n){return r=>r===e?t:n}zm.makeGetter=vEt;zm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var AK=F(Rv=>{"use strict";A();Object.defineProperty(Rv,"__esModule",{value:!0});Rv.NOOP_LOGGER_PROVIDER=Rv.NoopLoggerProvider=void 0;var REt=xF(),DF=class{getLogger(t,n,r){return new REt.NoopLogger}};Rv.NoopLoggerProvider=DF;Rv.NOOP_LOGGER_PROVIDER=new DF});var xDe=F(BF=>{"use strict";A();Object.defineProperty(BF,"__esModule",{value:!0});BF.ProxyLogger=void 0;var xEt=xF(),gK=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):xEt.NOOP_LOGGER}};BF.ProxyLogger=gK});var DDe=F(NF=>{"use strict";A();Object.defineProperty(NF,"__esModule",{value:!0});NF.ProxyLoggerProvider=void 0;var DEt=AK(),BEt=xDe(),hK=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new BEt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:DEt.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)}};NF.ProxyLoggerProvider=hK});var NDe=F(OF=>{"use strict";A();Object.defineProperty(OF,"__esModule",{value:!0});OF.LogsAPI=void 0;var qd=RDe(),NEt=AK(),BDe=DDe(),_K=class e{constructor(){this._proxyLoggerProvider=new BDe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return qd._global[qd.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(qd._global[qd.GLOBAL_LOGS_API_KEY]=(0,qd.makeGetter)(qd.API_BACKWARDS_COMPATIBILITY_VERSION,t,NEt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=qd._global[qd.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(qd._global,qd.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete qd._global[qd.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new BDe.ProxyLoggerProvider}};OF.LogsAPI=_K});var EK=F(jm=>{"use strict";A();Object.defineProperty(jm,"__esModule",{value:!0});jm.logs=jm.NoopLogger=jm.NOOP_LOGGER=jm.SeverityNumber=void 0;var OEt=vDe();Object.defineProperty(jm,"SeverityNumber",{enumerable:!0,get:function(){return OEt.SeverityNumber}});var ODe=xF();Object.defineProperty(jm,"NOOP_LOGGER",{enumerable:!0,get:function(){return ODe.NOOP_LOGGER}});Object.defineProperty(jm,"NoopLogger",{enumerable:!0,get:function(){return ODe.NoopLogger}});var wEt=NDe();jm.logs=wEt.LogsAPI.getInstance()});var wDe=F(xv=>{"use strict";A();Object.defineProperty(xv,"__esModule",{value:!0});xv.disableInstrumentations=xv.enableInstrumentations=void 0;function kEt(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}xv.enableInstrumentations=kEt;function PEt(e){e.forEach(t=>t.disable())}xv.disableInstrumentations=PEt});var MDe=F(wF=>{"use strict";A();Object.defineProperty(wF,"__esModule",{value:!0});wF.registerInstrumentations=void 0;var kDe=(ze(),Me(We)),MEt=EK(),PDe=wDe();function LEt(e){let t=e.tracerProvider||kDe.trace.getTracerProvider(),n=e.meterProvider||kDe.metrics.getMeterProvider(),r=e.loggerProvider||MEt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,PDe.enableInstrumentations)(o,t,n,r),()=>{(0,PDe.disableInstrumentations)(o)}}wF.registerInstrumentations=LEt});var $De=F(kF=>{"use strict";A();Object.defineProperty(kF,"__esModule",{value:!0});kF.satisfies=void 0;var IK=(ze(),Me(We)),GDe=/^(?: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-]+)*))?$/,UEt=/^(?<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-]+)*))?$/,QEt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function FEt(e,t,n){if(!GEt(e))return IK.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=$Et(e);if(!r)return!1;let o=[],i=zDe(r,t,o,n);return i&&!n?.includePrerelease?jEt(r,o):i}kF.satisfies=FEt;function GEt(e){return typeof e=="string"&&GDe.test(e)}function zDe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(yK(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=p0t(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!yK(e,i,n,r))return!1;return!0}return yK(e,t,n,r)}function yK(e,t,n,r){if(t=HEt(t,r),t.includes(" "))return zDe(e,t,n,r);{let o=qEt(t);return n.push(o),zEt(e,o)}}function zEt(e,t){if(t.invalid)return!1;if(!t.version||TK(t.version))return!0;let n=UDe(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=UDe(r,o)}return QEt[t.op]?.includes(n)}function jEt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function HEt(e,t){return e=e.trim(),e=l0t(e,t),e=c0t(e),e=d0t(e,t),e=e.trim(),e}function Hu(e){return!e||e.toLowerCase()==="x"||e==="*"}function $Et(e){let t=e.match(GDe);if(!t){IK.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function qEt(e){if(!e)return{};let t=e.match(UEt);if(!t)return IK.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function TK(e){return e==="*"||e==="x"||e==="X"}function LDe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function VEt(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 YEt(e,t){if(TK(e)||TK(t))return 0;let[n,r]=VEt(LDe(e),LDe(t));return n>r?1:n<r?-1:0}function UDe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=YEt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var jDe="[a-zA-Z0-9-]",HDe="0|[1-9]\\d*",KEt=`\\d*[a-zA-Z-]${jDe}*`,JEt="((?:<|>)?=?)",QDe=`(?:${HDe}|${KEt})`,ZEt=`(?:-(${QDe}(?:\\.${QDe})*))`,FDe=`${jDe}+`,WEt=`(?:\\+(${FDe}(?:\\.${FDe})*))`,SK=`${HDe}|x|X|\\*`,jN=`[v=\\s]*(${SK})(?:\\.(${SK})(?:\\.(${SK})(?:${ZEt})?${WEt}?)?)?`,XEt=`^${JEt}\\s*${jN}$`,e0t=new RegExp(XEt),t0t=`^\\s*(${jN})\\s+-\\s+(${jN})\\s*$`,n0t=new RegExp(t0t),r0t="(?:~>?)",o0t=`^${r0t}${jN}$`,i0t=new RegExp(o0t),s0t="(?:\\^)",a0t=`^${s0t}${jN}$`,u0t=new RegExp(a0t);function c0t(e){let t=i0t;return e.replace(t,(n,r,o,i,s)=>{let c;return Hu(r)?c="":Hu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Hu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?c=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function l0t(e,t){let n=u0t,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,c,l)=>{let f;return Hu(i)?f="":Hu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Hu(c)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${c}-${l} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${c}${r} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c} <${+i+1}.0.0-0`,f})}function d0t(e,t){let n=e0t;return e.replace(n,(r,o,i,s,c,l)=>{let f=Hu(i),h=f||Hu(s),y=h||Hu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),c=0,o===">"?(o=">=",h?(i=+i+1,s=0,c=0):(s=+s+1,c=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function p0t(e,t){let n=n0t;return e.replace(n,(r,o,i,s,c,l,f,h,y,S,b,v)=>(Hu(i)?o="":Hu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Hu(c)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Hu(y)?h="":Hu(S)?h=`<${+y+1}.0.0-0`:Hu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var bK=F(Na=>{"use strict";A();Object.defineProperty(Na,"__esModule",{value:!0});Na.massUnwrap=Na.unwrap=Na.massWrap=Na.wrap=void 0;var $u=console.error.bind(console);function HN(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 f0t=(e,t,n)=>{if(!e||!e[t]){$u("no original function "+String(t)+" to wrap");return}if(!n){$u("no wrapper function"),$u(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){$u("original object and wrapper must be functions");return}let o=n(r,t);return HN(o,"__original",r),HN(o,"__unwrap",()=>{e[t]===o&&HN(e,t,r)}),HN(o,"__wrapped",!0),HN(e,t,o),o};Na.wrap=f0t;var m0t=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,Na.wrap)(r,o,n)})})};Na.massWrap=m0t;var A0t=(e,t)=>{if(!e||!e[t]){$u("no function to unwrap."),$u(new Error().stack);return}let n=e[t];if(!n.__unwrap)$u("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};Na.unwrap=A0t;var g0t=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{$u("must provide one or more modules to patch"),$u(new Error().stack);return}if(!(t&&Array.isArray(t))){$u("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,Na.unwrap)(n,r)})})};Na.massUnwrap=g0t;function $N(e){e&&e.logger&&(typeof e.logger!="function"?$u("new logger isn't a function, not replacing"):$u=e.logger)}Na.default=$N;$N.wrap=Na.wrap;$N.massWrap=Na.massWrap;$N.unwrap=Na.unwrap;$N.massUnwrap=Na.massUnwrap});var qDe=F(MF=>{"use strict";A();Object.defineProperty(MF,"__esModule",{value:!0});MF.InstrumentationAbstract=void 0;var CK=(ze(),Me(We)),h0t=EK(),PF=bK(),vK=class{_config={};_tracer;_meter;_logger;_diag;instrumentationName;instrumentationVersion;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=CK.diag.createComponentLogger({namespace:t}),this._tracer=CK.trace.getTracer(t,n),this._meter=CK.metrics.getMeter(t,n),this._logger=h0t.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=PF.wrap;_unwrap=PF.unwrap;_massWrap=PF.massWrap;_massUnwrap=PF.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)}}};MF.InstrumentationAbstract=vK});var VDe=F(K_=>{"use strict";A();Object.defineProperty(K_,"__esModule",{value:!0});K_.ModuleNameTrie=K_.ModuleNameSeparator=void 0;K_.ModuleNameSeparator="/";var LF=class{hooks=[];children=new Map},RK=class{_trie=new LF;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(K_.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new LF,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let c of t.split(K_.ModuleNameSeparator)){let l=o.children.get(c);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};K_.ModuleNameTrie=RK});var KDe=F(UF=>{"use strict";A();Object.defineProperty(UF,"__esModule",{value:!0});UF.RequireInTheMiddleSingleton=void 0;var _0t=Gy(),YDe=Fe("path"),xK=VDe(),E0t=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),DK=class e{_moduleNameTrie=new xK.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new _0t.Hook(null,{internals:!0},(t,n,r)=>{let o=y0t(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return E0t?new e:this._instance=this._instance??new e}};UF.RequireInTheMiddleSingleton=DK;function y0t(e){return YDe.sep!==xK.ModuleNameSeparator?e.split(YDe.sep).join(xK.ModuleNameSeparator):e}});var e1e=F(qN=>{A();var JDe=[],BK=new WeakMap,ZDe=new WeakMap,WDe=new Map,XDe=[],S0t={set(e,t,n){let r=BK.get(e),o=r&&r[t];return typeof o=="function"?o(n):!0},get(e,t){if(t===Symbol.toStringTag)return"Module";let n=ZDe.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=BK.get(e),o=r&&r[t];return typeof o=="function"?o(n.value):!0}};function T0t(e,t,n,r,o){WDe.set(e,o),BK.set(t,n),ZDe.set(t,r);let i=new Proxy(t,S0t);JDe.forEach(s=>s(e,i,o)),XDe.push([e,i,o])}qN.register=T0t;qN.importHooks=JDe;qN.specifiers=WDe;qN.toHook=XDe});var kK=F((p_n,Bv)=>{A();var t1e=Fe("path"),I0t=SL(),{fileURLToPath:b0t}=Fe("url"),{MessageChannel:C0t}=Fe("worker_threads"),{isBuiltin:NK}=Fe("module");NK||(NK=()=>!0);var{importHooks:OK,specifiers:v0t,toHook:R0t}=e1e();function n1e(e){OK.push(e),R0t.forEach(([t,n,r])=>e(t,n,r))}function r1e(e){let t=OK.indexOf(e);t>-1&&OK.splice(t,1)}function Dv(e,t,n,r){let o=e(t,n,r);o&&o!==t&&"default"in t&&(t.default=o)}var wK;function x0t(){let{port1:e,port2:t}=new C0t,n=0,r;wK=c=>{n++,e.postMessage(c)},e.on("message",()=>{n--,r&&n<=0&&r()}).unref();function o(){let c=setInterval(()=>{},1e3),l=new Promise(f=>{r=f}).then(()=>{clearInterval(c)});return n===0&&r(),l}let i=t;return{registerOptions:{data:{addHookMessagePort:i,include:[]},transferList:[i]},addHookMessagePort:i,waitForAllMessagesAcknowledged:o}}function VN(e,t,n){if(!(this instanceof VN))return new VN(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;wK&&Array.isArray(e)&&wK(e),this._iitmHook=(o,i,s)=>{let c=o,l=c.startsWith("node:"),f,h;if(l){let y=o.slice(5);NK(y)&&(o=y)}else if(c.startsWith("file://")){let y=Error.stackTraceLimit;Error.stackTraceLimit=0;try{f=b0t(o),o=f}catch{}if(Error.stackTraceLimit=y,f){let S=I0t(f);S&&(o=S.name,h=S.basedir)}}if(e)for(let y of e)if(f&&y===f)Dv(n,i,f,void 0);else if(y===o){if(!h)Dv(n,i,o,h);else if(h.endsWith(v0t.get(c)))Dv(n,i,o,h);else if(r){let S=o+t1e.sep+t1e.relative(h,f);Dv(n,i,S,h)}}else y===s&&Dv(n,i,s,h);else Dv(n,i,o,h)},n1e(this._iitmHook)}VN.prototype.unhook=function(){r1e(this._iitmHook)};Bv.exports=VN;Bv.exports.Hook=VN;Bv.exports.addHook=n1e;Bv.exports.removeHook=r1e;Bv.exports.createAddHookMessageChannel=x0t});var PK=F(J_=>{"use strict";A();Object.defineProperty(J_,"__esModule",{value:!0});J_.isWrapped=J_.safeExecuteInTheMiddleAsync=J_.safeExecuteInTheMiddle=void 0;function D0t(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}J_.safeExecuteInTheMiddle=D0t;async function B0t(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}}J_.safeExecuteInTheMiddleAsync=B0t;function N0t(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}J_.isWrapped=N0t});var s1e=F(QF=>{"use strict";A();Object.defineProperty(QF,"__esModule",{value:!0});QF.InstrumentationBase=void 0;var YN=Fe("path"),o1e=Fe("util"),O0t=$De(),MK=bK(),w0t=qDe(),k0t=KDe(),P0t=kK(),KN=(ze(),Me(We)),M0t=Gy(),L0t=Fe("fs"),U0t=PK(),LK=class extends w0t.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=k0t.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,U0t.isWrapped)(t[n])&&this._unwrap(t,n),o1e.types.isProxy(t)){let o=(0,MK.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,MK.wrap)(t,n,r)};_unwrap=(t,n)=>o1e.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,MK.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{KN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){KN.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{KN.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){KN.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,L0t.readFileSync)(YN.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{KN.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 i1e(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],c=YN.normalize(r);return s.filter(f=>f.name===c&&i1e(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,c,l)=>{if(!l&&YN.isAbsolute(c)){let f=YN.parse(c);c=f.name,l=f.dir}return this._onRequire(t,s,c,l)},r=(s,c,l)=>this._onRequire(t,s,c,l),o=YN.isAbsolute(t.name)?new M0t.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new P0t.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}};QF.InstrumentationBase=LK;function i1e(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,O0t.satisfies)(t,r,{includePrerelease:n}))}});var a1e=F(FF=>{"use strict";A();Object.defineProperty(FF,"__esModule",{value:!0});FF.normalize=void 0;var Q0t=Fe("path");Object.defineProperty(FF,"normalize",{enumerable:!0,get:function(){return Q0t.normalize}})});var u1e=F(Nv=>{"use strict";A();Object.defineProperty(Nv,"__esModule",{value:!0});Nv.normalize=Nv.InstrumentationBase=void 0;var F0t=s1e();Object.defineProperty(Nv,"InstrumentationBase",{enumerable:!0,get:function(){return F0t.InstrumentationBase}});var G0t=a1e();Object.defineProperty(Nv,"normalize",{enumerable:!0,get:function(){return G0t.normalize}})});var UK=F(Ov=>{"use strict";A();Object.defineProperty(Ov,"__esModule",{value:!0});Ov.normalize=Ov.InstrumentationBase=void 0;var c1e=u1e();Object.defineProperty(Ov,"InstrumentationBase",{enumerable:!0,get:function(){return c1e.InstrumentationBase}});Object.defineProperty(Ov,"normalize",{enumerable:!0,get:function(){return c1e.normalize}})});var l1e=F(GF=>{"use strict";A();Object.defineProperty(GF,"__esModule",{value:!0});GF.InstrumentationNodeModuleDefinition=void 0;var QK=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}};GF.InstrumentationNodeModuleDefinition=QK});var d1e=F(zF=>{"use strict";A();Object.defineProperty(zF,"__esModule",{value:!0});zF.InstrumentationNodeModuleFile=void 0;var z0t=UK(),FK=class{name;supportedVersions;patch;unpatch;constructor(t,n,r,o){this.name=(0,z0t.normalize)(t),this.supportedVersions=n,this.patch=r,this.unpatch=o}};zF.InstrumentationNodeModuleFile=FK});var p1e=F(hS=>{"use strict";A();Object.defineProperty(hS,"__esModule",{value:!0});hS.semconvStabilityFromStr=hS.SemconvStability=void 0;var jF;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(jF=hS.SemconvStability||(hS.SemconvStability={}));function j0t(e,t){let n=jF.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=jF.DUPLICATE;break}else o.toLowerCase()===e&&(n=jF.STABLE);return n}hS.semconvStabilityFromStr=j0t});var m1e=F(rs=>{"use strict";A();Object.defineProperty(rs,"__esModule",{value:!0});rs.semconvStabilityFromStr=rs.SemconvStability=rs.safeExecuteInTheMiddleAsync=rs.safeExecuteInTheMiddle=rs.isWrapped=rs.InstrumentationNodeModuleFile=rs.InstrumentationNodeModuleDefinition=rs.InstrumentationBase=rs.registerInstrumentations=void 0;var H0t=MDe();Object.defineProperty(rs,"registerInstrumentations",{enumerable:!0,get:function(){return H0t.registerInstrumentations}});var $0t=UK();Object.defineProperty(rs,"InstrumentationBase",{enumerable:!0,get:function(){return $0t.InstrumentationBase}});var q0t=l1e();Object.defineProperty(rs,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return q0t.InstrumentationNodeModuleDefinition}});var V0t=d1e();Object.defineProperty(rs,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return V0t.InstrumentationNodeModuleFile}});var GK=PK();Object.defineProperty(rs,"isWrapped",{enumerable:!0,get:function(){return GK.isWrapped}});Object.defineProperty(rs,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return GK.safeExecuteInTheMiddle}});Object.defineProperty(rs,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return GK.safeExecuteInTheMiddleAsync}});var f1e=p1e();Object.defineProperty(rs,"SemconvStability",{enumerable:!0,get:function(){return f1e.SemconvStability}});Object.defineProperty(rs,"semconvStabilityFromStr",{enumerable:!0,get:function(){return f1e.semconvStabilityFromStr}})});var A1e=F((w_n,Y0t)=>{Y0t.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 h1e=F(_S=>{"use strict";A();Object.defineProperty(_S,"__esModule",{value:!0});_S.range=_S.balanced=void 0;var K0t=(e,t,n)=>{let r=e instanceof RegExp?g1e(e,n):e,o=t instanceof RegExp?g1e(t,n):t,i=r!==null&&o!=null&&(0,_S.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)}};_S.balanced=K0t;var g1e=(e,t)=>{let n=t.match(e);return n?n[0]:null},J0t=(e,t,n)=>{let r,o,i,s,c,l=n.indexOf(e),f=n.indexOf(t,l+1),h=l;if(l>=0&&f>0){if(e===t)return[l,f];for(r=[],i=n.length;h>=0&&!c;){if(h===l)r.push(h),l=n.indexOf(e,h+1);else if(r.length===1){let y=r.pop();y!==void 0&&(c=[y,f])}else o=r.pop(),o!==void 0&&o<i&&(i=o,s=f),f=n.indexOf(t,h+1);h=l<f&&l>=0?l:f}r.length&&s!==void 0&&(c=[i,s])}return c};_S.range=J0t});var b1e=F(wv=>{"use strict";A();Object.defineProperty(wv,"__esModule",{value:!0});wv.EXPANSION_MAX=void 0;wv.expand=cyt;var _1e=h1e(),E1e="\0SLASH"+Math.random()+"\0",y1e="\0OPEN"+Math.random()+"\0",jK="\0CLOSE"+Math.random()+"\0",S1e="\0COMMA"+Math.random()+"\0",T1e="\0PERIOD"+Math.random()+"\0",Z0t=new RegExp(E1e,"g"),W0t=new RegExp(y1e,"g"),X0t=new RegExp(jK,"g"),eyt=new RegExp(S1e,"g"),tyt=new RegExp(T1e,"g"),nyt=/\\\\/g,ryt=/\\{/g,oyt=/\\}/g,iyt=/\\,/g,syt=/\\\./g;wv.EXPANSION_MAX=1e5;function zK(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function ayt(e){return e.replace(nyt,E1e).replace(ryt,y1e).replace(oyt,jK).replace(iyt,S1e).replace(syt,T1e)}function uyt(e){return e.replace(Z0t,"\\").replace(W0t,"{").replace(X0t,"}").replace(eyt,",").replace(tyt,".")}function I1e(e){if(!e)return[""];let t=[],n=(0,_1e.balanced)("{","}",e);if(!n)return e.split(",");let{pre:r,body:o,post:i}=n,s=r.split(",");s[s.length-1]+="{"+o+"}";let c=I1e(i);return i.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function cyt(e,t={}){if(!e)return[];let{max:n=wv.EXPANSION_MAX}=t;return e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),JN(ayt(e),n,!0).map(uyt)}function lyt(e){return"{"+e+"}"}function dyt(e){return/^-?0\d/.test(e)}function pyt(e,t){return e<=t}function fyt(e,t){return e>=t}function JN(e,t,n){let r=[],o=(0,_1e.balanced)("{","}",e);if(!o)return[e];let i=o.pre,s=o.post.length?JN(o.post,t,!1):[""];if(/\$$/.test(o.pre))for(let c=0;c<s.length&&c<t;c++){let l=i+"{"+o.body+"}"+s[c];r.push(l)}else{let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),f=c||l,h=o.body.indexOf(",")>=0;if(!f&&!h)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+jK+o.post,JN(e,t,!0)):[e];let y;if(f)y=o.body.split(/\.\./);else if(y=I1e(o.body),y.length===1&&y[0]!==void 0&&(y=JN(y[0],t,!1).map(lyt),y.length===1))return s.map(b=>o.pre+y[0]+b);let S;if(f&&y[0]!==void 0&&y[1]!==void 0){let b=zK(y[0]),v=zK(y[1]),x=Math.max(y[0].length,y[1].length),D=y.length===3&&y[2]!==void 0?Math.max(Math.abs(zK(y[2])),1):1,k=pyt;v<b&&(D*=-1,k=fyt);let z=y.some(dyt);S=[];for(let G=b;k(G,v)&&S.length<t;G+=D){let $;if(l)$=String.fromCharCode(G),$==="\\"&&($="");else if($=String(G),z){let ie=x-$.length;if(ie>0){let ge=new Array(ie+1).join("0");G<0?$="-"+ge+$.slice(1):$=ge+$}}S.push($)}}else{S=[];for(let b=0;b<y.length;b++)S.push.apply(S,JN(y[b],t,!1))}for(let b=0;b<S.length;b++)for(let v=0;v<s.length&&r.length<t;v++){let x=i+S[b]+s[v];(!n||f||x)&&r.push(x)}}return r}});var C1e=F(HF=>{"use strict";A();Object.defineProperty(HF,"__esModule",{value:!0});HF.assertValidPattern=void 0;var myt=1024*64,Ayt=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>myt)throw new TypeError("pattern is too long")};HF.assertValidPattern=Ayt});var R1e=F($F=>{"use strict";A();Object.defineProperty($F,"__esModule",{value:!0});$F.parseClass=void 0;var gyt={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},ZN=e=>e.replace(/[[\]\\-]/g,"\\$&"),hyt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),v1e=e=>e.join(""),_yt=(e,t)=>{let n=t;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");let r=[],o=[],i=n+1,s=!1,c=!1,l=!1,f=!1,h=n,y="";e:for(;i<e.length;){let x=e.charAt(i);if((x==="!"||x==="^")&&i===n+1){f=!0,i++;continue}if(x==="]"&&s&&!l){h=i+1;break}if(s=!0,x==="\\"&&!l){l=!0,i++;continue}if(x==="["&&!l){for(let[D,[k,Q,z]]of Object.entries(gyt))if(e.startsWith(D,i)){if(y)return["$.",!1,e.length-n,!0];i+=D.length,z?o.push(k):r.push(k),c=c||Q;continue e}}if(l=!1,y){x>y?r.push(ZN(y)+"-"+ZN(x)):x===y&&r.push(ZN(x)),y="",i++;continue}if(e.startsWith("-]",i+1)){r.push(ZN(x+"-")),i+=2;continue}if(e.startsWith("-",i+1)){y=x,i+=2;continue}r.push(ZN(x)),i++}if(h<i)return["",!1,0,!1];if(!r.length&&!o.length)return["$.",!1,e.length-n,!0];if(o.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!f){let x=r[0].length===2?r[0].slice(-1):r[0];return[hyt(x),!1,h-n,!1]}let S="["+(f?"^":"")+v1e(r)+"]",b="["+(f?"":"^")+v1e(o)+"]";return[r.length&&o.length?"("+S+"|"+b+")":r.length?S:b,c,h-n,!0]};$F.parseClass=_yt});var VF=F(qF=>{"use strict";A();Object.defineProperty(qF,"__esModule",{value:!0});qF.unescape=void 0;var Eyt=(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");qF.unescape=Eyt});var qK=F(ZF=>{"use strict";A();var Fc;Object.defineProperty(ZF,"__esModule",{value:!0});ZF.AST=void 0;var yyt=R1e(),YF=VF(),Syt=new Set(["!","?","+","*","@"]),HK=e=>Syt.has(e),x1e=e=>HK(e.type),Tyt=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),Iyt=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),byt=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),D1e=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),Cyt="(?!(?:^|/)\\.\\.?(?:$|/))",KF="(?!\\.)",vyt=new Set(["[","."]),Ryt=new Set(["..","."]),xyt=new Set("().*{}+?[]^$\\!"),Dyt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),$K="[^/]",B1e=$K+"*?",N1e=$K+"+?",Byt=0,JF=class{type;#n;#r;#o=!1;#e=[];#t;#a;#c;#u=!1;#i;#s;#l=!1;id=++Byt;get depth(){return(this.#t?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#n.id,parent:this.#t?.id,depth:this.depth,partsLength:this.#e.length,parts:this.#e}}constructor(t,n,r={}){this.type=t,t&&(this.#r=!0),this.#t=n,this.#n=this.#t?this.#t.#n:this,this.#i=this.#n===this?r:this.#n.#i,this.#c=this.#n===this?[]:this.#n.#c,t==="!"&&!this.#n.#u&&this.#c.push(this),this.#a=this.#t?this.#t.#e.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(let t of this.#e)if(typeof t!="string"&&(t.type||t.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#s!==void 0?this.#s:this.type?this.#s=this.type+"("+this.#e.map(t=>String(t)).join("|")+")":this.#s=this.#e.map(t=>String(t)).join("")}#h(){if(this!==this.#n)throw new Error("should only call on root");if(this.#u)return this;this.toString(),this.#u=!0;let t;for(;t=this.#c.pop();){if(t.type!=="!")continue;let n=t,r=n.#t;for(;r;){for(let o=n.#a+1;!r.type&&o<r.#e.length;o++)for(let i of t.#e){if(typeof i=="string")throw new Error("string part in extglob AST??");i.copyIn(r.#e[o])}n=r,r=n.#t}}return this}push(...t){for(let n of t)if(n!==""){if(typeof n!="string"&&!(n instanceof Fc&&n.#t===this))throw new Error("invalid part: "+n);this.#e.push(n)}}toJSON(){let t=this.type===null?this.#e.slice().map(n=>typeof n=="string"?n:n.toJSON()):[this.type,...this.#e.map(n=>n.toJSON())];return this.isStart()&&!this.type&&t.unshift([]),this.isEnd()&&(this===this.#n||this.#n.#u&&this.#t?.type==="!")&&t.push({}),t}isStart(){if(this.#n===this)return!0;if(!this.#t?.isStart())return!1;if(this.#a===0)return!0;let t=this.#t;for(let n=0;n<this.#a;n++){let r=t.#e[n];if(!(r instanceof Fc&&r.type==="!"))return!1}return!0}isEnd(){if(this.#n===this||this.#t?.type==="!")return!0;if(!this.#t?.isEnd())return!1;if(!this.type)return this.#t?.isEnd();let t=this.#t?this.#t.#e.length:0;return this.#a===t-1}copyIn(t){typeof t=="string"?this.push(t):this.push(t.clone(this))}clone(t){let n=new Fc(this.type,t);for(let r of this.#e)n.copyIn(r);return n}static#d(t,n,r,o,i){let s=o.maxExtglobRecursion??2,c=!1,l=!1,f=-1,h=!1;if(n.type===null){let x=r,D="";for(;x<t.length;){let k=t.charAt(x++);if(c||k==="\\"){c=!c,D+=k;continue}if(l){x===f+1?(k==="^"||k==="!")&&(h=!0):k==="]"&&!(x===f+2&&h)&&(l=!1),D+=k;continue}else if(k==="["){l=!0,f=x,h=!1,D+=k;continue}if(!o.noext&&HK(k)&&t.charAt(x)==="("&&i<=s){n.push(D),D="";let z=new Fc(k,n);x=Fc.#d(t,z,x,o,i+1),n.push(z);continue}D+=k}return n.push(D),x}let y=r+1,S=new Fc(null,n),b=[],v="";for(;y<t.length;){let x=t.charAt(y++);if(c||x==="\\"){c=!c,v+=x;continue}if(l){y===f+1?(x==="^"||x==="!")&&(h=!0):x==="]"&&!(y===f+2&&h)&&(l=!1),v+=x;continue}else if(x==="["){l=!0,f=y,h=!1,v+=x;continue}if(!o.noext&&HK(x)&&t.charAt(y)==="("&&(i<=s||n&&n.#p(x))){let k=n&&n.#p(x)?0:1;S.push(v),v="";let Q=new Fc(x,S);S.push(Q),y=Fc.#d(t,Q,y,o,i+k);continue}if(x==="|"){S.push(v),v="",b.push(S),S=new Fc(null,n);continue}if(x===")")return v===""&&n.#e.length===0&&(n.#l=!0),S.push(v),v="",n.push(...b,S),y;v+=x}return n.type=null,n.#r=void 0,n.#e=[t.substring(r-1)],y}#_(t){return this.#m(t,Iyt)}#m(t,n=Tyt){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=byt){return!!n.get(this.type)?.includes(t)}#E(t,n){let r=t.#e[0],o=new Fc(null,r,this.options);o.#e.push(""),r.push(o),this.#A(t,n)}#A(t,n){let r=t.#e[0];this.#e.splice(n,1,...r.#e);for(let o of r.#e)typeof o=="object"&&(o.#t=this);this.#s=void 0}#y(t){return!!D1e.get(this.type)?.has(t)}#S(t){if(!t||typeof t!="object"||t.type!==null||t.#e.length!==1||this.type===null||this.#e.length!==1)return!1;let n=t.#e[0];return!n||typeof n!="object"||n.type===null?!1:this.#y(n.type)}#T(t){let n=D1e.get(this.type),r=t.#e[0],o=n?.get(r.type);if(!o)return!1;this.#e=r.#e;for(let i of this.#e)typeof i=="object"&&(i.#t=this);this.type=o,this.#s=void 0,this.#l=!1}static fromGlob(t,n={}){let r=new Fc(null,void 0,n);return Fc.#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()),!x1e(this)){let l=this.isStart()&&this.isEnd()&&!this.#e.some(b=>typeof b!="string"),f=this.#e.map(b=>{let[v,x,D,k]=typeof b=="string"?Fc.#I(b,this.#r,l):b.toRegExpSource(t);return this.#r=this.#r||D,this.#o=this.#o||k,v}).join(""),h="";if(this.isStart()&&typeof this.#e[0]=="string"&&!(this.#e.length===1&&Ryt.has(this.#e[0]))){let v=vyt,x=n&&v.has(f.charAt(0))||f.startsWith("\\.")&&v.has(f.charAt(2))||f.startsWith("\\.\\.")&&v.has(f.charAt(4)),D=!n&&!t&&v.has(f.charAt(0));h=x?Cyt:D?KF:""}let y="";return this.isEnd()&&this.#n.#u&&this.#t?.type==="!"&&(y="(?:$|\\/)"),[h+f+y,(0,YF.unescape)(f),this.#r=!!this.#r,this.#o]}let r=this.type==="*"||this.type==="+",o=this.type==="!"?"(?:(?!(?:":"(?:",i=this.#g(n);if(this.isStart()&&this.isEnd()&&!i&&this.type!=="!"){let l=this.toString(),f=this;return f.#e=[l],f.type=null,f.#r=void 0,[l,(0,YF.unescape)(this.toString()),!1,!1]}let s=!r||t||n||!KF?"":this.#g(!0);s===i&&(s=""),s&&(i=`(?:${i})(?:${s})*?`);let c="";if(this.type==="!"&&this.#l)c=(this.isStart()&&!n?KF:"")+N1e;else{let l=this.type==="!"?"))"+(this.isStart()&&!n&&!t?KF:"")+B1e+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&s?")":this.type==="*"&&s?")?":`)${this.type}`;c=o+i+l}return[c,(0,YF.unescape)(i),this.#r=!!this.#r,this.#o]}#f(){if(x1e(this)){let t=0,n=!1;do{n=!0;for(let r=0;r<this.#e.length;r++){let o=this.#e[r];typeof o=="object"&&(o.#f(),this.#m(o)?(n=!1,this.#A(o,r)):this.#_(o)?(n=!1,this.#E(o,r)):this.#S(o)&&(n=!1,this.#T(o)))}}while(!n&&++t<10)}else for(let t of this.#e)typeof t=="object"&&t.#f();this.#s=void 0}#g(t){return this.#e.map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");let[r,o,i,s]=n.toRegExpSource(t);return this.#o=this.#o||s,r}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")}static#I(t,n,r=!1){let o=!1,i="",s=!1,c=!1;for(let l=0;l<t.length;l++){let f=t.charAt(l);if(o){o=!1,i+=(xyt.has(f)?"\\":"")+f;continue}if(f==="*"){if(c)continue;c=!0,i+=r&&/^[*]+$/.test(t)?N1e:B1e,n=!0;continue}else c=!1;if(f==="\\"){l===t.length-1?i+="\\\\":o=!0;continue}if(f==="["){let[h,y,S,b]=(0,yyt.parseClass)(t,l);if(S){i+=h,s=s||y,l+=S-1,n=n||b;continue}}if(f==="?"){i+=$K,n=!0;continue}i+=Dyt(f)}return[i,(0,YF.unescape)(t),!!n,s]}};ZF.AST=JF;Fc=JF});var VK=F(WF=>{"use strict";A();Object.defineProperty(WF,"__esModule",{value:!0});WF.escape=void 0;var Nyt=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,"[$&]"):e.replace(/[?*()[\]\\{}]/g,"\\$&"):t?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&");WF.escape=Nyt});var U1e=F(ft=>{"use strict";A();Object.defineProperty(ft,"__esModule",{value:!0});ft.unescape=ft.escape=ft.AST=ft.Minimatch=ft.match=ft.makeRe=ft.braceExpand=ft.defaults=ft.filter=ft.GLOBSTAR=ft.sep=ft.minimatch=void 0;var Oyt=b1e(),XF=C1e(),k1e=qK(),wyt=VK(),kyt=VF(),Pyt=(e,t,n={})=>((0,XF.assertValidPattern)(t),!n.nocomment&&t.charAt(0)==="#"?!1:new ES(t,n).match(e));ft.minimatch=Pyt;var Myt=/^\*+([^+@!?\*\[\(]*)$/,Lyt=e=>t=>!t.startsWith(".")&&t.endsWith(e),Uyt=e=>t=>t.endsWith(e),Qyt=e=>(e=e.toLowerCase(),t=>!t.startsWith(".")&&t.toLowerCase().endsWith(e)),Fyt=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),Gyt=/^\*+\.\*+$/,zyt=e=>!e.startsWith(".")&&e.includes("."),jyt=e=>e!=="."&&e!==".."&&e.includes("."),Hyt=/^\.\*+$/,$yt=e=>e!=="."&&e!==".."&&e.startsWith("."),qyt=/^\*+$/,Vyt=e=>e.length!==0&&!e.startsWith("."),Yyt=e=>e.length!==0&&e!=="."&&e!=="..",Kyt=/^\?+([^+@!?\*\[\(]*)?$/,Jyt=([e,t=""])=>{let n=P1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Zyt=([e,t=""])=>{let n=M1e([e]);return t?(t=t.toLowerCase(),r=>n(r)&&r.toLowerCase().endsWith(t)):n},Wyt=([e,t=""])=>{let n=M1e([e]);return t?r=>n(r)&&r.endsWith(t):n},Xyt=([e,t=""])=>{let n=P1e([e]);return t?r=>n(r)&&r.endsWith(t):n},P1e=([e])=>{let t=e.length;return n=>n.length===t&&!n.startsWith(".")},M1e=([e])=>{let t=e.length;return n=>n.length===t&&n!=="."&&n!==".."},L1e=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",O1e={win32:{sep:"\\"},posix:{sep:"/"}};ft.sep=L1e==="win32"?O1e.win32.sep:O1e.posix.sep;ft.minimatch.sep=ft.sep;ft.GLOBSTAR=Symbol("globstar **");ft.minimatch.GLOBSTAR=ft.GLOBSTAR;var eSt="[^/]",tSt=eSt+"*?",nSt="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",rSt="(?:(?!(?:\\/|^)\\.).)*?",oSt=(e,t={})=>n=>(0,ft.minimatch)(n,e,t);ft.filter=oSt;ft.minimatch.filter=ft.filter;var Vd=(e,t={})=>Object.assign({},e,t),iSt=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return ft.minimatch;let t=ft.minimatch;return Object.assign((r,o,i={})=>t(r,o,Vd(e,i)),{Minimatch:class extends t.Minimatch{constructor(o,i={}){super(o,Vd(e,i))}static defaults(o){return t.defaults(Vd(e,o)).Minimatch}},AST:class extends t.AST{constructor(o,i,s={}){super(o,i,Vd(e,s))}static fromGlob(o,i={}){return t.AST.fromGlob(o,Vd(e,i))}},unescape:(r,o={})=>t.unescape(r,Vd(e,o)),escape:(r,o={})=>t.escape(r,Vd(e,o)),filter:(r,o={})=>t.filter(r,Vd(e,o)),defaults:r=>t.defaults(Vd(e,r)),makeRe:(r,o={})=>t.makeRe(r,Vd(e,o)),braceExpand:(r,o={})=>t.braceExpand(r,Vd(e,o)),match:(r,o,i={})=>t.match(r,o,Vd(e,i)),sep:t.sep,GLOBSTAR:ft.GLOBSTAR})};ft.defaults=iSt;ft.minimatch.defaults=ft.defaults;var sSt=(e,t={})=>((0,XF.assertValidPattern)(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:(0,Oyt.expand)(e,{max:t.braceExpandMax}));ft.braceExpand=sSt;ft.minimatch.braceExpand=ft.braceExpand;var aSt=(e,t={})=>new ES(e,t).makeRe();ft.makeRe=aSt;ft.minimatch.makeRe=ft.makeRe;var uSt=(e,t,n={})=>{let r=new ES(t,n);return e=e.filter(o=>r.match(o)),r.options.nonull&&!e.length&&e.push(t),e};ft.match=uSt;ft.minimatch.match=ft.match;var w1e=/[?*]|[+@!]\(.*?\)|\[|\]/,cSt=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),ES=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(t,n={}){(0,XF.assertValidPattern)(t),n=n||{},this.options=n,this.maxGlobstarRecursion=n.maxGlobstarRecursion??200,this.pattern=t,this.platform=n.platform||L1e,this.isWindows=this.platform==="win32";let r="allowWindowsEscape";this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n[r]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let t of this.set)for(let n of t)if(typeof n!="string")return!0;return!1}debug(...t){}make(){let t=this.pattern,n=this.options;if(!n.nocomment&&t.charAt(0)==="#"){this.comment=!0;return}if(!t){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...i)=>console.error(...i)),this.debug(this.pattern,this.globSet);let r=this.globSet.map(i=>this.slashSplit(i));this.globParts=this.preprocess(r),this.debug(this.pattern,this.globParts);let o=this.globParts.map((i,s,c)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=i[0]===""&&i[1]===""&&(i[2]==="?"||!w1e.test(i[2]))&&!w1e.test(i[3]),f=/^[a-z]:/i.test(i[0]);if(l)return[...i.slice(0,4),...i.slice(4).map(h=>this.parse(h))];if(f)return[i[0],...i.slice(1).map(h=>this.parse(h))]}return i.map(l=>this.parse(l))});if(this.debug(this.pattern,o),this.set=o.filter(i=>i.indexOf(!1)===-1),this.isWindows)for(let i=0;i<this.set.length;i++){let s=this.set[i];s[0]===""&&s[1]===""&&this.globParts[i][2]==="?"&&typeof s[3]=="string"&&/^[a-z]:$/i.test(s[3])&&(s[2]="?")}this.debug(this.pattern,this.set)}preprocess(t){if(this.options.noglobstar)for(let r=0;r<t.length;r++)for(let o=0;o<t[r].length;o++)t[r][o]==="**"&&(t[r][o]="*");let{optimizationLevel:n=1}=this.options;return n>=2?(t=this.firstPhasePreProcess(t),t=this.secondPhasePreProcess(t)):n>=1?t=this.levelOneOptimize(t):t=this.adjascentGlobstarOptimize(t),t}adjascentGlobstarOptimize(t){return t.map(n=>{let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o!==r&&n.splice(r,o-r)}return n})}levelOneOptimize(t){return t.map(n=>(n=n.reduce((r,o)=>{let i=r[r.length-1];return o==="**"&&i==="**"?r:o===".."&&i&&i!==".."&&i!=="."&&i!=="**"?(r.pop(),r):(r.push(o),r)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(t){Array.isArray(t)||(t=this.slashSplit(t));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let o=1;o<t.length-1;o++){let i=t[o];o===1&&i===""&&t[0]===""||(i==="."||i==="")&&(n=!0,t.splice(o,1),o--)}t[0]==="."&&t.length===2&&(t[1]==="."||t[1]==="")&&(n=!0,t.pop())}let r=0;for(;(r=t.indexOf("..",r+1))!==-1;){let o=t[r-1];o&&o!=="."&&o!==".."&&o!=="**"&&(n=!0,t.splice(r-1,2),r-=2)}}while(n);return t.length===0?[""]:t}firstPhasePreProcess(t){let n=!1;do{n=!1;for(let r of t){let o=-1;for(;(o=r.indexOf("**",o+1))!==-1;){let s=o;for(;r[s+1]==="**";)s++;s>o&&r.splice(o+1,s-o);let c=r[o+1],l=r[o+2],f=r[o+3];if(c!==".."||!l||l==="."||l===".."||!f||f==="."||f==="..")continue;n=!0,r.splice(o,1);let h=r.slice(0);h[o]="**",t.push(h),o--}if(!this.preserveMultipleSlashes){for(let s=1;s<r.length-1;s++){let c=r[s];s===1&&c===""&&r[0]===""||(c==="."||c==="")&&(n=!0,r.splice(s,1),s--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let i=0;for(;(i=r.indexOf("..",i+1))!==-1;){let s=r[i-1];if(s&&s!=="."&&s!==".."&&s!=="**"){n=!0;let l=i===1&&r[i+1]==="**"?["."]:[];r.splice(i-1,2,...l),r.length===0&&r.push(""),i-=2}}}}while(n);return t}secondPhasePreProcess(t){for(let n=0;n<t.length-1;n++)for(let r=n+1;r<t.length;r++){let o=this.partsMatch(t[n],t[r],!this.preserveMultipleSlashes);if(o){t[n]=[],t[r]=o;break}}return t.filter(n=>n.length)}partsMatch(t,n,r=!1){let o=0,i=0,s=[],c="";for(;o<t.length&&i<n.length;)if(t[o]===n[i])s.push(c==="b"?n[i]:t[o]),o++,i++;else if(r&&t[o]==="**"&&n[i]===t[o+1])s.push(t[o]),o++;else if(r&&n[i]==="**"&&t[o]===n[i+1])s.push(n[i]),i++;else if(t[o]==="*"&&n[i]&&(this.options.dot||!n[i].startsWith("."))&&n[i]!=="**"){if(c==="b")return!1;c="a",s.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",s.push(n[i]),o++,i++}else return!1;return t.length===n.length&&s}parseNegate(){if(this.nonegate)return;let t=this.pattern,n=!1,r=0;for(let o=0;o<t.length&&t.charAt(o)==="!";o++)n=!n,r++;r&&(this.pattern=t.slice(r)),this.negate=n}matchOne(t,n,r=!1){let o=0,i=0;if(this.isWindows){let c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),l=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&/^[a-z]:$/i.test(t[3]),f=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),h=!f&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),y=l?3:c?0:void 0,S=h?3:f?0:void 0;if(typeof y=="number"&&typeof S=="number"){let[b,v]=[t[y],n[S]];b.toLowerCase()===v.toLowerCase()&&(n[S]=b,i=S,o=y)}}let{optimizationLevel:s=1}=this.options;return s>=2&&(t=this.levelTwoFileOptimize(t)),n.includes(ft.GLOBSTAR)?this.#n(t,n,r,o,i):this.#o(t,n,r,o,i)}#n(t,n,r,o,i){let s=n.indexOf(ft.GLOBSTAR,i),c=n.lastIndexOf(ft.GLOBSTAR),[l,f,h]=r?[n.slice(i,s),n.slice(s+1),[]]:[n.slice(i,s),n.slice(s+1,c),n.slice(c+1)];if(l.length){let Q=t.slice(o,o+l.length);if(!this.#o(Q,l,r,0,0))return!1;o+=l.length,i+=l.length}let y=0;if(h.length){if(h.length+o>t.length)return!1;let Q=t.length-h.length;if(this.#o(t,h,r,Q,0))y=h.length;else{if(t[t.length-1]!==""||o+h.length===t.length||(Q--,!this.#o(t,h,r,Q,0)))return!1;y=h.length+1}}if(!f.length){let Q=!!y;for(let z=o;z<t.length-y;z++){let G=String(t[z]);if(Q=!0,G==="."||G===".."||!this.options.dot&&G.startsWith("."))return!1}return r||Q}let S=[[[],0]],b=S[0],v=0,x=[0];for(let Q of f)Q===ft.GLOBSTAR?(x.push(v),b=[[],0],S.push(b)):(b[0].push(Q),v++);let D=S.length-1,k=t.length-y;for(let Q of S)Q[1]=k-(x[D--]+Q[0].length);return!!this.#r(t,S,o,0,r,0,!!y)}#r(t,n,r,o,i,s,c){let l=n[o];if(!l){for(let y=r;y<t.length;y++){c=!0;let S=t[y];if(S==="."||S===".."||!this.options.dot&&S.startsWith("."))return!1}return c}let[f,h]=l;for(;r<=h;){if(this.#o(t.slice(0,r+f.length),f,i,r,0)&&s<this.maxGlobstarRecursion){let b=this.#r(t,n,r+f.length,o+1,i,s+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 s,c,l,f;for(s=o,c=i,f=t.length,l=n.length;s<f&&c<l;s++,c++){this.debug("matchOne loop");let h=n[c],y=t[s];if(this.debug(n,h,y),h===!1||h===ft.GLOBSTAR)return!1;let S;if(typeof h=="string"?(S=y===h,this.debug("string match",h,y,S)):(S=h.test(y),this.debug("pattern match",h,y,S)),!S)return!1}if(s===f&&c===l)return!0;if(s===f)return r;if(c===l)return s===f-1&&t[s]==="";throw new Error("wtf?")}braceExpand(){return(0,ft.braceExpand)(this.pattern,this.options)}parse(t){(0,XF.assertValidPattern)(t);let n=this.options;if(t==="**")return ft.GLOBSTAR;if(t==="")return"";let r,o=null;(r=t.match(qyt))?o=n.dot?Yyt:Vyt:(r=t.match(Myt))?o=(n.nocase?n.dot?Fyt:Qyt:n.dot?Uyt:Lyt)(r[1]):(r=t.match(Kyt))?o=(n.nocase?n.dot?Zyt:Jyt:n.dot?Wyt:Xyt)(r):(r=t.match(Gyt))?o=n.dot?jyt:zyt:(r=t.match(Hyt))&&(o=$yt);let i=k1e.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?tSt:n.dot?nSt:rSt,o=new Set(n.nocase?["i"]:[]),i=t.map(l=>{let f=l.map(y=>{if(y instanceof RegExp)for(let S of y.flags.split(""))o.add(S);return typeof y=="string"?cSt(y):y===ft.GLOBSTAR?ft.GLOBSTAR:y._src});f.forEach((y,S)=>{let b=f[S+1],v=f[S-1];y!==ft.GLOBSTAR||v===ft.GLOBSTAR||(v===void 0?b!==void 0&&b!==ft.GLOBSTAR?f[S+1]="(?:\\/|"+r+"\\/)?"+b:f[S]=r:b===void 0?f[S-1]=v+"(?:\\/|\\/"+r+")?":b!==ft.GLOBSTAR&&(f[S-1]=v+"(?:\\/|\\/"+r+"\\/)"+b,f[S+1]=ft.GLOBSTAR))});let h=f.filter(y=>y!==ft.GLOBSTAR);if(this.partial&&h.length>=1){let y=[];for(let S=1;S<=h.length;S++)y.push(h.slice(0,S).join("/"));return"(?:"+y.join("|")+")"}return h.join("/")}).join("|"),[s,c]=t.length>1?["(?:",")"]:["",""];i="^"+s+i+c+"$",this.partial&&(i="^(?:\\/|"+s+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 s=o[o.length-1];if(!s)for(let c=o.length-2;!s&&c>=0;c--)s=o[c];for(let c=0;c<i.length;c++){let l=i[c],f=o;if(r.matchBase&&l.length===1&&(f=[s]),this.matchOne(f,l,n))return r.flipNegate?!0:!this.negate}return r.flipNegate?!1:this.negate}static defaults(t){return ft.minimatch.defaults(t).Minimatch}};ft.Minimatch=ES;var lSt=qK();Object.defineProperty(ft,"AST",{enumerable:!0,get:function(){return lSt.AST}});var dSt=VK();Object.defineProperty(ft,"escape",{enumerable:!0,get:function(){return dSt.escape}});var pSt=VF();Object.defineProperty(ft,"unescape",{enumerable:!0,get:function(){return pSt.unescape}});ft.minimatch.AST=k1e.AST;ft.minimatch.Minimatch=ES;ft.minimatch.escape=wyt.escape;ft.minimatch.unescape=kyt.unescape});var $1e=F((W_n,JK)=>{"use strict";A();var Q1e=Fe("node:diagnostics_channel"),{context:e4,trace:YK,SpanStatusCode:t4,propagation:KK,diag:fSt}=(ze(),Me(We)),{getRPCMetadata:mSt,RPCType:ASt}=br(),{ATTR_HTTP_ROUTE:n4,ATTR_HTTP_RESPONSE_STATUS_CODE:F1e,ATTR_HTTP_REQUEST_METHOD:gSt,ATTR_URL_PATH:hSt}=(Zn(),Me(Fr)),{InstrumentationBase:_St}=m1e(),{version:ESt,name:G1e}=A1e(),ySt=">=4.0.0 <6",z1e=["onRequest","preParsing","preValidation","preHandler","preSerialization","onSend","onResponse","onError"],To={HOOK_NAME:"hook.name",FASTIFY_TYPE:"fastify.type",HOOK_CALLBACK_NAME:"hook.callback.name",ROOT:"fastify.root"},Z_={ROUTE:"route-hook",INSTANCE:"hook",HANDLER:"request-handler"},kg="anonymous",W_=Symbol("fastify otel instance"),X_=Symbol("fastify otel request spans"),WN=Symbol("fastify otel request context"),j1e=Symbol("fastify otel addhook original"),H1e=Symbol("fastify otel setnotfound original"),XN=Symbol("fastify otel ignore path"),eO=Symbol("fastify otel record exceptions"),r4=class extends _St{logger=null;_requestHook=null;_lifecycleHook=null;constructor(t){if(super(G1e,ESt,t),this.logger=fSt.createComponentLogger({namespace:G1e}),this[XN]=null,this[eO]=!0,t?.recordExceptions!=null){if(typeof t.recordExceptions!="boolean")throw new TypeError("recordExceptions must be a boolean");this[eO]=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[XN]=o=>typeof n=="function"?n(o):(r==null&&(r=U1e().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)},Q1e.subscribe("fastify.initialization",this._handleInitialization)),super.enable()}disable(){return this._handleInitialization&&(Q1e.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:ySt,name:"@fastify/otel"},n;function n(r,o,i){r.decorate(W_,t),r.decorate(j1e,r.addHook),r.decorate(H1e,r.setNotFoundHandler),r.decorateRequest("opentelemetry",function(){let b=this[WN],v=this[X_];return{enabled:this.routeOptions.config?.otel!==!1,span:v,tracer:t.tracer,context:b,inject:(x,D)=>KK.inject(b,x,D),extract:(x,D)=>KK.extract(b,x,D)}}),r.decorateRequest(X_,null),r.decorateRequest(WN,null),r.addHook("onRoute",function(b){if(t[XN]?.(b)===!0){t.logger.debug(`Ignoring route instrumentation ${b.method} ${b.url} because it matches the ignore path`);return}if(b.config?.otel===!1){t.logger.debug(`Ignoring route instrumentation ${b.method} ${b.url} because it is disabled`);return}for(let v of z1e)if(b[v]!=null){let x=b[v];if(typeof x=="function")b[v]=y(x,v,{[To.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[To.FASTIFY_TYPE]:Z_.ROUTE,[n4]:b.url,[To.HOOK_CALLBACK_NAME]:x.name?.length>0?x.name:kg});else if(Array.isArray(x)){let D=[];for(let k of x)D.push(y(k,v,{[To.HOOK_NAME]:`${this.pluginName} - route -> ${v}`,[To.FASTIFY_TYPE]:Z_.ROUTE,[n4]:b.url,[To.HOOK_CALLBACK_NAME]:k.name?.length>0?k.name:kg}));b[v]=D}}b.onSend!=null?b.onSend=Array.isArray(b.onSend)?[...b.onSend,s]:[b.onSend,s]:b.onSend=s,b.onError!=null?b.onError=Array.isArray(b.onError)?[...b.onError,c]:[b.onError,c]:b.onError=c,b.handler=y(b.handler,"handler",{[To.HOOK_NAME]:`${this.pluginName} - route-handler`,[To.FASTIFY_TYPE]:Z_.HANDLER,[n4]:b.url,[To.HOOK_CALLBACK_NAME]:b.handler.name.length>0?b.handler.name:kg})}),r.addHook("onRequest",function(b,v,x){if(this[W_].isEnabled()===!1||b.routeOptions.config?.otel===!1)return x();if(this[W_][XN]?.({url:b.url,method:b.method})===!0)return this[W_].logger.debug(`Ignoring request ${b.method} ${b.url} because it matches the ignore path`),x();let D=e4.active();YK.getSpan(D)==null&&(D=KK.extract(D,b.headers));let k=mSt(D);b.routeOptions.url!=null&&k?.type===ASt.HTTP&&(k.route=b.routeOptions.url);let Q={[To.ROOT]:"@fastify/otel",[gSt]:b.method,[hSt]:b.url};b.routeOptions.url!=null&&(Q[n4]=b.routeOptions.url);let z=this[W_].tracer.startSpan("request",{attributes:Q},D);try{this[W_]._requestHook?.(z,b)}catch(G){this[W_].logger.error({err:G},"requestHook threw")}b[WN]=YK.setSpan(D,z),b[X_]=z,e4.with(b[WN],()=>{x()})}),r.addHook("onResponse",function(b,v,x){let D=b[X_];D!=null&&(D.setAttributes({[F1e]:v.statusCode}),D.end()),b[X_]=null,x()}),r.addHook=l,r.setNotFoundHandler=f,i();function s(S,b,v,x){let D=S[X_];D!=null&&(b.statusCode>=500&&D.setStatus({code:t4.ERROR}),D.setAttributes({[F1e]:b.statusCode}),D.end()),S[X_]=null,x(null,v)}function c(S,b,v,x){let D=S[X_];D!=null&&(D.setStatus({code:t4.ERROR,message:v.message}),t[eO]!==!1&&D.recordException(v)),x()}function l(S,b){let v=this[j1e];return z1e.includes(S)?v.call(this,S,y(b,S,{[To.HOOK_NAME]:`${this.pluginName} - ${S}`,[To.FASTIFY_TYPE]:Z_.INSTANCE,[To.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:kg})):v.call(this,S,b)}function f(S,b){let v=this[H1e];typeof S=="function"?(b=y(S,"notFoundHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[To.FASTIFY_TYPE]:Z_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.name?.length>0?S.name:kg}),v.call(this,b)):(S.preValidation!=null&&(S.preValidation=y(S.preValidation,"notFoundHandler - preValidation",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler - preValidation`,[To.FASTIFY_TYPE]:Z_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.preValidation.name?.length>0?S.preValidation.name:kg})),S.preHandler!=null&&(S.preHandler=y(S.preHandler,"notFoundHandler - preHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler - preHandler`,[To.FASTIFY_TYPE]:Z_.INSTANCE,[To.HOOK_CALLBACK_NAME]:S.preHandler.name?.length>0?S.preHandler.name:kg})),b=y(b,"notFoundHandler",{[To.HOOK_NAME]:`${this.pluginName} - not-found-handler`,[To.FASTIFY_TYPE]:Z_.INSTANCE,[To.HOOK_CALLBACK_NAME]:b.name?.length>0?b.name:kg}),v.call(this,S,b))}function h(S){for(let b of S)if(b?.routeOptions&&b.url&&b.method)return b;return null}function y(S,b,v={}){return function(...D){let k=this[W_],Q=h(D);if(Q===null)return k.logger.debug(`Ignoring route instrumentation because ${b} was called without a Fastify request argument`),S.call(this,...D);if(k.isEnabled()===!1||Q.routeOptions.config?.otel===!1)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it is disabled`),S.call(this,...D);if(k[XN]?.({url:Q.url,method:Q.method})===!0)return k.logger.debug(`Ignoring route instrumentation ${Q.routeOptions.method} ${Q.routeOptions.url} because it matches the ignore path`),S.call(this,...D);let z=Q[WN]??e4.active(),G=S.name?.length>0?S.name:this.pluginName??kg,$=k.tracer.startSpan(`${b} - ${G}`,{attributes:v},z);if(k._lifecycleHook!=null)try{k._lifecycleHook($,{hookName:b,request:Q,handler:G})}catch(ie){k.logger.error({err:ie},"Execution of lifecycleHook failed")}return e4.with(YK.setSpan(z,$),function(){try{let ie=S.call(this,...D);return typeof ie?.then=="function"?ie.then(ge=>($.end(),ge),ge=>($.setStatus({code:t4.ERROR,message:ge.message}),k[eO]!==!1&&$.recordException(ge),$.end(),Promise.reject(ge))):($.end(),ie)}catch(ie){throw $.setStatus({code:t4.ERROR,message:ie.message}),k[eO]!==!1&&$.recordException(ie),$.end(),ie}},this)}}}}};JK.exports=r4;JK.exports.FastifyOtelInstrumentation=r4});var Pg,tO,nO,q1e=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})(Pg||(Pg={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request_handler";e.REQUEST_HANDLER=n})(tO||(tO={}));(function(e){let t="middleware";e.MIDDLEWARE=t;let n="request handler";e.REQUEST_HANDLER=n})(nO||(nO={}))});var rO,V1e=O(()=>{A();rO=Symbol("opentelemetry.instrumentation.fastify.request_active_span")});function ZK(e,t,n,r={}){let o=t.startSpan(n,{attributes:r}),i=e[rO]||[];return i.push(o),Object.defineProperty(e,rO,{enumerable:!1,configurable:!0,value:i}),o}function o4(e,t){let n=e[rO]||[];n.length&&(n.forEach(r=>{t&&(r.setStatus({code:di.ERROR,message:t.message}),r.recordException(t)),r.end()}),delete e[rO])}function K1e(e,t,n){let r,o;try{o=e(),Y1e(o)&&o.then(i=>t(void 0,i),i=>t(i))}catch(i){r=i}finally{if(!Y1e(o)&&(t(r,o),r))throw r;return o}}function Y1e(e){return typeof e=="object"&&e&&typeof Object.getOwnPropertyDescriptor(e,"then")?.value=="function"||!1}var J1e=O(()=>{A();ze();V1e()});function bSt(){let e=gt();e&&e.on("spanStart",t=>{W1e(t)})}function W1e(e){let t=Ot(e).data,n=t["fastify.type"];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${n}.fastify`});let r=t["fastify.name"]||t["plugin.name"]||t["hook.name"];if(typeof r=="string"){let o=r.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(o)}}var s4,yS,SSt,TSt,Z1e,ISt,i4,X1e=O(()=>{A();ze();s4=se(br(),1),yS=se(on(),1);Zn();dt();q1e();J1e();SSt="0.1.0",TSt="@sentry/instrumentation-fastify-v3",Z1e="anonymous",ISt=new Set(["onTimeout","onRequest","preParsing","preValidation","preSerialization","preHandler","onSend","onResponse","onError"]),i4=class extends yS.InstrumentationBase{constructor(t={}){super(TSt,SSt,t)}init(){return[new yS.InstrumentationNodeModuleDefinition("fastify",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_hookOnRequest(){let t=this;return function(r,o,i){if(!t.isEnabled())return i();t._wrap(o,"send",t._patchSend());let s=r,c=(0,s4.getRPCMetadata)(Ke.active()),l=s.routeOptions?s.routeOptions.url:r.routerPath;l&&c?.type===s4.RPCType.HTTP&&(c.route=l);let f=r.method||"GET";vn().setTransactionName(`${f} ${l}`),i()}}_wrapHandler(t,n,r,o){let i=this;return this._diag.debug("Patching fastify route.handler function"),function(...s){if(!i.isEnabled())return r.apply(this,s);let c=r.name||t||Z1e,l=`${nO.MIDDLEWARE} - ${c}`,f=s[1],h=ZK(f,i.tracer,l,{[Pg.FASTIFY_TYPE]:tO.MIDDLEWARE,[Pg.PLUGIN_NAME]:t,[Pg.HOOK_NAME]:n}),y=o&&s[s.length-1];return y&&(s[s.length-1]=function(...S){o4(f),y.apply(this,S)}),Ke.with($t.setSpan(Ke.active(),h),()=>K1e(()=>r.apply(this,s),S=>{S instanceof Error&&(h.setStatus({code:di.ERROR,message:S.message}),h.recordException(S)),o||o4(f)}))}}_wrapAddHook(){let t=this;return this._diag.debug("Patching fastify server.addHook function"),function(n){return function(...o){let i=o[0],s=o[1],c=this.pluginName;if(!ISt.has(i))return n.apply(this,o);let l=typeof o[o.length-1]=="function"&&s.constructor.name!=="AsyncFunction";return n.apply(this,[i,t._wrapHandler(c,i,s,l)])}}}_patchConstructor(t){let n=this;function r(...o){let i=t.fastify.apply(this,o);return i.addHook("onRequest",n._hookOnRequest()),i.addHook("preHandler",n._hookPreHandler()),bSt(),n._wrap(i,"addHook",n._wrapAddHook()),i}return t.errorCodes!==void 0&&(r.errorCodes=t.errorCodes),r.fastify=r,r.default=r,r}_patchSend(){let t=this;return this._diag.debug("Patching fastify reply.send function"),function(r){return function(...i){let s=i[0];return t.isEnabled()?(0,yS.safeExecuteInTheMiddle)(()=>r.apply(this,i),c=>{!c&&s instanceof Error&&(c=s),o4(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 s=r,c=s.routeOptions?.handler||s.context?.handler,l=c?.name.startsWith("bound ")?c.name.substring(6):c?.name,f=`${nO.REQUEST_HANDLER} - ${l||this.pluginName||Z1e}`,h={[Pg.PLUGIN_NAME]:this.pluginName,[Pg.FASTIFY_TYPE]:tO.REQUEST_HANDLER,[F9]:s.routeOptions?s.routeOptions.url:r.routerPath};l&&(h[Pg.FASTIFY_NAME]=l);let y=ZK(o,t.tracer,f,h);W1e(y);let{requestHook:S}=t.getConfig();return S&&(0,yS.safeExecuteInTheMiddle)(()=>S(y,{request:r}),b=>{b&&t._diag.error("request hook failed",b)},!0),Ke.with($t.setSpan(Ke.active(),y),()=>{i()})}}}});import*as WK from"node:diagnostics_channel";function CSt(){let e=gt();if(e)return e.getIntegrationByName(a4)}function eBe(e,t,n,r){let o=CSt()?.getShouldHandleError()||iBe;if(r==="diagnostics-channel"&&(this.diagnosticsChannelExists=!0),this.diagnosticsChannelExists&&r==="onError-hook"){bs&&J.warn("Fastify error handler was already registered via diagnostics channel.","You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.");return}o(e,t,n)&&nn(e,{mechanism:{handled:!1,type:"auto.function.fastify"}})}function iBe(e,t,n){let r=n.statusCode;return r>=500||r<=299}function sBe(e){let t=Ot(e),n=t.description,r=t.data,o=r["fastify.type"],i=o==="hook",s=o===n?.startsWith("handler -"),c=n==="request"||o==="request-handler";if(r[Xt]||!s&&!c&&!i)return;let l=i?"hook":s?"middleware":c?"request_handler":"<unknown>";e.setAttributes({[kt]:"auto.http.otel.fastify",[Xt]:`${l}.fastify`});let f=r["fastify.name"]||r["plugin.name"]||r["hook.name"];if(typeof f=="string"){let h=f.replace(/^fastify -> /,"").replace(/^@fastify\/otel -> /,"");e.updateName(h)}}function RSt(){let e=gt();e&&e.on("spanStart",t=>{sBe(t)})}function xSt(e){e.addHook("onRequest",async(t,n)=>{if(t.opentelemetry){let{span:i}=t.opentelemetry();i&&sBe(i)}let r=t.routeOptions?.url,o=t.method||"GET";vn().setTransactionName(`${o} ${r}`)})}var tBe,a4,nBe,rBe,vSt,oBe,aBe=O(()=>{A();tBe=se($1e(),1);dt();gr();gS();X1e();a4="Fastify",nBe=at(`${a4}.v3`,()=>new i4);rBe=at(`${a4}.v5`,()=>{let e=new tBe.FastifyOtelInstrumentation,t=e.plugin();return WK.subscribe("fastify.initialization",n=>{let r=n.fastify;r?.register(t).after(o=>{o?bs&&J.error("Failed to setup Fastify instrumentation",o):(RSt(),r&&xSt(r))})}),WK.subscribe("tracing:fastify.request.handler:error",n=>{let{error:r,request:o,reply:i}=n;eBe.call(eBe,r,o,i,"diagnostics-channel")}),e}),vSt=(({shouldHandleError:e})=>{let t;return{name:a4,setupOnce(){t=e||iBe,nBe(),rBe()},getShouldHandleError(){return t},setShouldHandleError(n){t=n}}}),oBe=(e={})=>vSt(e)});var XK=F(mf=>{"use strict";A();Object.defineProperty(mf,"__esModule",{value:!0});mf.SpanNames=mf.TokenKind=mf.AllowedOperationTypes=void 0;var DSt;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(DSt=mf.AllowedOperationTypes||(mf.AllowedOperationTypes={}));var BSt;(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"})(BSt=mf.TokenKind||(mf.TokenKind={}));var NSt;(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"})(NSt=mf.SpanNames||(mf.SpanNames={}))});var eJ=F(oO=>{"use strict";A();Object.defineProperty(oO,"__esModule",{value:!0});oO.AttributeNames=void 0;var OSt;(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"})(OSt=oO.AttributeNames||(oO.AttributeNames={}))});var u4=F(kv=>{"use strict";A();Object.defineProperty(kv,"__esModule",{value:!0});kv.OTEL_GRAPHQL_DATA_SYMBOL=kv.OTEL_PATCHED_SYMBOL=void 0;kv.OTEL_PATCHED_SYMBOL=Symbol.for("opentelemetry.patched");kv.OTEL_GRAPHQL_DATA_SYMBOL=Symbol.for("opentelemetry.graphql_data")});var uBe=F(c4=>{"use strict";A();Object.defineProperty(c4,"__esModule",{value:!0});c4.OPERATION_NOT_SUPPORTED=void 0;var REn=u4();c4.OPERATION_NOT_SUPPORTED="Operation$operationName$not supported"});var TBe=F(Cs=>{"use strict";A();Object.defineProperty(Cs,"__esModule",{value:!0});Cs.wrapFieldResolver=Cs.wrapFields=Cs.getSourceFromLocation=Cs.getOperation=Cs.endSpan=Cs.addSpanSource=Cs.addInputVariableAttributes=Cs.isPromise=void 0;var Pv=(ze(),Me(We)),eE=XK(),SS=eJ(),Mg=u4(),cBe=Object.values(eE.AllowedOperationTypes),wSt=e=>typeof e?.then=="function";Cs.isPromise=wSt;var kSt=e=>typeof e=="object"&&e!==null;function tJ(e,t,n){Array.isArray(n)?n.forEach((r,o)=>{tJ(e,`${t}.${o}`,r)}):n instanceof Object?Object.entries(n).forEach(([r,o])=>{tJ(e,`${t}.${r}`,o)}):e.setAttribute(`${SS.AttributeNames.VARIABLES}${String(t)}`,n)}function PSt(e,t){Object.entries(t).forEach(([n,r])=>{tJ(e,n,r)})}Cs.addInputVariableAttributes=PSt;function fBe(e,t,n,r,o){let i=_Be(t,n,r,o);e.setAttribute(SS.AttributeNames.SOURCE,i)}Cs.addSpanSource=fBe;function MSt(e,t,n,r,o){let i=mBe(n,o);if(i)return{field:i,spanAdded:!1};let c=t().flatResolveSpans?gBe(n):ABe(n,o);return i={span:LSt(e,t,n,r,o,c)},FSt(n,o,i),{field:i,spanAdded:!0}}function LSt(e,t,n,r,o,i){let s={[SS.AttributeNames.FIELD_NAME]:r.fieldName,[SS.AttributeNames.FIELD_PATH]:o.join("."),[SS.AttributeNames.FIELD_TYPE]:r.returnType.toString(),[SS.AttributeNames.PARENT_NAME]:r.parentType.name},c=e.startSpan(`${eE.SpanNames.RESOLVE} ${s[SS.AttributeNames.FIELD_PATH]}`,{attributes:s},i?Pv.trace.setSpan(Pv.context.active(),i):void 0),l=n[Mg.OTEL_GRAPHQL_DATA_SYMBOL].source,f=r.fieldNodes.find(h=>h.kind==="Field");return f&&fBe(c,l.loc,t().allowValues,f.loc?.start,f.loc?.end),c}function USt(e,t){t&&e.recordException(t),e.end()}Cs.endSpan=USt;function QSt(e,t){if(!(!e||!Array.isArray(e.definitions)))return t?e.definitions.filter(n=>cBe.indexOf(n?.operation)!==-1).find(n=>t===n?.name?.value):e.definitions.find(n=>cBe.indexOf(n?.operation)!==-1)}Cs.getOperation=QSt;function FSt(e,t,n){return e[Mg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]=n}function mBe(e,t){return e[Mg.OTEL_GRAPHQL_DATA_SYMBOL].fields[t.join(".")]}function ABe(e,t){for(let n=t.length-1;n>0;n--){let r=mBe(e,t.slice(0,n));if(r)return r.span}return gBe(e)}function gBe(e){return e[Mg.OTEL_GRAPHQL_DATA_SYMBOL].span}function GSt(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 zSt(e){return hBe(`
37
37
  `,e)}function lBe(e){return hBe(" ",e)}function hBe(e,t){let n="";for(let r=0;r<t;r++)n+=e;return n}var jSt=[eE.TokenKind.FLOAT,eE.TokenKind.STRING,eE.TokenKind.INT,eE.TokenKind.BLOCK_STRING];function _Be(e,t=!1,n,r){let o="";if(e?.startToken){let i=typeof n=="number"?n:e.start,s=typeof r=="number"?r:e.end,c=e.startToken.next,l=1;for(;c;){if(c.start<i){c=c.next,l=c?.line;continue}if(c.end>s){c=c.next,l=c?.line;continue}let f=c.value||c.kind,h="";!t&&jSt.indexOf(c.kind)>=0&&(f="*"),c.kind===eE.TokenKind.STRING&&(f=`"${f}"`),c.kind===eE.TokenKind.EOF&&(f=""),c.line>l?(o+=zSt(c.line-l),l=c.line,h=lBe(c.column-1)):c.line===c.prev?.line&&(h=lBe(c.start-(c.prev?.end||0))),o+=h+f,c&&(c=c.next)}}return o}Cs.getSourceFromLocation=_Be;function EBe(e,t,n){if(!e||e[Mg.OTEL_PATCHED_SYMBOL])return;let r=e.getFields();e[Mg.OTEL_PATCHED_SYMBOL]=!0,Object.keys(r).forEach(o=>{let i=r[o];if(i&&(i.resolve&&(i.resolve=SBe(t,n,i.resolve)),i.type)){let s=yBe(i.type);for(let c of s)EBe(c,t,n)}})}Cs.wrapFields=EBe;function yBe(e){return"ofType"in e?yBe(e.ofType):HSt(e)?e.getTypes():$St(e)?[e]:[]}function HSt(e){return"getTypes"in e&&typeof e.getTypes=="function"}function $St(e){return"getFields"in e&&typeof e.getFields=="function"}var dBe=(e,t,n)=>{n&&(e.recordException(t),e.setStatus({code:Pv.SpanStatusCode.ERROR,message:t.message}),e.end())},pBe=(e,t)=>{t&&e.end()};function SBe(e,t,n,r=!1){if(o[Mg.OTEL_PATCHED_SYMBOL]||typeof n!="function")return n;function o(i,s,c,l){if(!n)return;let f=t();if(f.ignoreTrivialResolveSpans&&r&&(kSt(i)||typeof i=="function")&&typeof i[l.fieldName]!="function")return n.call(this,i,s,c,l);if(!c[Mg.OTEL_GRAPHQL_DATA_SYMBOL])return n.call(this,i,s,c,l);let h=GSt(f.mergeItems,l&&l.path),y=h.filter(v=>typeof v=="string").length,S,b=!1;if(f.depth>=0&&f.depth<y)S=ABe(c,h);else{let{field:v,spanAdded:x}=MSt(e,t,c,l,h);S=v.span,b=x}return Pv.context.with(Pv.trace.setSpan(Pv.context.active(),S),()=>{try{let v=n.call(this,i,s,c,l);return(0,Cs.isPromise)(v)?v.then(x=>(pBe(S,b),x),x=>{throw dBe(S,x,b),x}):(pBe(S,b),v)}catch(v){throw dBe(S,v,b),v}})}return o[Mg.OTEL_PATCHED_SYMBOL]=!0,o}Cs.wrapFieldResolver=SBe});var IBe=F(Mv=>{"use strict";A();Object.defineProperty(Mv,"__esModule",{value:!0});Mv.PACKAGE_NAME=Mv.PACKAGE_VERSION=void 0;Mv.PACKAGE_VERSION="0.62.0";Mv.PACKAGE_NAME="@opentelemetry/instrumentation-graphql"});var vBe=F(p4=>{"use strict";A();Object.defineProperty(p4,"__esModule",{value:!0});p4.GraphQLInstrumentation=void 0;var Lg=(ze(),Me(We)),Yd=on(),iO=XK(),l4=eJ(),nJ=u4(),qSt=uBe(),iu=TBe(),bBe=IBe(),CBe={mergeItems:!1,depth:-1,allowValues:!1,ignoreResolveSpans:!1},d4=[">=14.0.0 <17"],rJ=class extends Yd.InstrumentationBase{constructor(t={}){super(bBe.PACKAGE_NAME,bBe.PACKAGE_VERSION,{...CBe,...t})}setConfig(t={}){super.setConfig({...CBe,...t})}init(){let t=new Yd.InstrumentationNodeModuleDefinition("graphql",d4);return t.files.push(this._addPatchingExecute()),t.files.push(this._addPatchingParser()),t.files.push(this._addPatchingValidate()),t}_addPatchingExecute(){return new Yd.InstrumentationNodeModuleFile("graphql/execution/execute.js",d4,t=>((0,Yd.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 Yd.InstrumentationNodeModuleFile("graphql/language/parser.js",d4,t=>((0,Yd.isWrapped)(t.parse)&&this._unwrap(t,"parse"),this._wrap(t,"parse",this._patchParse()),t),t=>{t&&this._unwrap(t,"parse")})}_addPatchingValidate(){return new Yd.InstrumentationNodeModuleFile("graphql/validation/validate.js",d4,t=>((0,Yd.isWrapped)(t.validate)&&this._unwrap(t,"validate"),this._wrap(t,"validate",this._patchValidate()),t),t=>{t&&this._unwrap(t,"validate")})}_patchExecute(t){let n=this;return function(o){return function(){let s;if(arguments.length>=2){let f=arguments;s=n._wrapExecuteArgs(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],t)}else{let f=arguments[0];s=n._wrapExecuteArgs(f.schema,f.document,f.rootValue,f.contextValue,f.variableValues,f.operationName,f.fieldResolver,f.typeResolver,t)}let c=(0,iu.getOperation)(s.document,s.operationName),l=n._createExecuteSpan(c,s);return s.contextValue[nJ.OTEL_GRAPHQL_DATA_SYMBOL]={source:s.document?s.document||s.document[nJ.OTEL_GRAPHQL_DATA_SYMBOL]:void 0,span:l,fields:{}},Lg.context.with(Lg.trace.setSpan(Lg.context.active(),l),()=>(0,Yd.safeExecuteInTheMiddle)(()=>o.apply(this,[s]),(f,h)=>{n._handleExecutionResult(l,f,h)}))}}}_handleExecutionResult(t,n,r){let o=this.getConfig();if(r===void 0||n){(0,iu.endSpan)(t,n);return}if((0,iu.isPromise)(r))r.then(i=>{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,i)},i=>{(0,iu.endSpan)(t,i)});else{if(typeof o.responseHook!="function"){(0,iu.endSpan)(t);return}this._executeResponseHook(t,r)}}_executeResponseHook(t,n){let{responseHook:r}=this.getConfig();r&&(0,Yd.safeExecuteInTheMiddle)(()=>{r(t,n)},o=>{o&&this._diag.error("Error running response hook",o),(0,iu.endSpan)(t,void 0)},!0)}_patchParse(){let t=this;return function(r){return function(i,s){return t._parse(this,r,i,s)}}}_patchValidate(){let t=this;return function(r){return function(i,s,c,l,f){return t._validate(this,r,i,s,c,f,l)}}}_parse(t,n,r,o){let i=this.getConfig(),s=this.tracer.startSpan(iO.SpanNames.PARSE);return Lg.context.with(Lg.trace.setSpan(Lg.context.active(),s),()=>(0,Yd.safeExecuteInTheMiddle)(()=>n.call(t,r,o),(c,l)=>{l&&((0,iu.getOperation)(l)?l.loc&&(0,iu.addSpanSource)(s,l.loc,i.allowValues):s.updateName(iO.SpanNames.SCHEMA_PARSE)),(0,iu.endSpan)(s,c)}))}_validate(t,n,r,o,i,s,c){let l=this.tracer.startSpan(iO.SpanNames.VALIDATE,{});return Lg.context.with(Lg.trace.setSpan(Lg.context.active(),l),()=>(0,Yd.safeExecuteInTheMiddle)(()=>n.call(t,r,o,i,c,s),(f,h)=>{o.loc||l.updateName(iO.SpanNames.SCHEMA_VALIDATE),h&&h.length&&l.recordException({name:l4.AttributeNames.ERROR_VALIDATION_NAME,message:JSON.stringify(h)}),(0,iu.endSpan)(l,f)}))}_createExecuteSpan(t,n){let r=this.getConfig(),o=this.tracer.startSpan(iO.SpanNames.EXECUTE,{});if(t){let{operation:i,name:s}=t;o.setAttribute(l4.AttributeNames.OPERATION_TYPE,i);let c=s?.value;c?(o.setAttribute(l4.AttributeNames.OPERATION_NAME,c),o.updateName(`${i} ${c}`)):o.updateName(i)}else{let i=" ";n.operationName&&(i=` "${n.operationName}" `),i=qSt.OPERATION_NOT_SUPPORTED.replace("$operationName$",i),o.setAttribute(l4.AttributeNames.OPERATION_NAME,i)}return n.document?.loc&&(0,iu.addSpanSource)(o,n.document.loc,r.allowValues),n.variableValues&&r.allowValues&&(0,iu.addInputVariableAttributes)(o,n.variableValues),o}_wrapExecuteArgs(t,n,r,o,i,s,c,l,f){if(o||(o={}),o[nJ.OTEL_GRAPHQL_DATA_SYMBOL]||this.getConfig().ignoreResolveSpans)return{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:c,typeResolver:l};let h=c==null,y=c??f;return c=(0,iu.wrapFieldResolver)(this.tracer,()=>this.getConfig(),y,h),t&&((0,iu.wrapFields)(t.getQueryType(),this.tracer,()=>this.getConfig()),(0,iu.wrapFields)(t.getMutationType(),this.tracer,()=>this.getConfig())),{schema:t,document:n,rootValue:r,contextValue:o,variableValues:i,operationName:s,fieldResolver:c,typeResolver:l}}};p4.GraphQLInstrumentation=rJ});var RBe=F(f4=>{"use strict";A();Object.defineProperty(f4,"__esModule",{value:!0});f4.GraphQLInstrumentation=void 0;var VSt=vBe();Object.defineProperty(f4,"GraphQLInstrumentation",{enumerable:!0,get:function(){return VSt.GraphQLInstrumentation}})});function OBe(e){return{ignoreResolveSpans:!0,ignoreTrivialResolveSpans:!0,useOperationNameForRootSpan:!0,...e}}function KSt(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 xBe,DBe,BBe,YSt,NBe,wBe=O(()=>{A();ze();xBe=se(RBe(),1);dt();gr();yv();DBe="Graphql",BBe=at(DBe,xBe.GraphQLInstrumentation,e=>{let t=OBe(e);return{...t,responseHook(n,r){zr(n,"auto.graphql.otel.graphql"),r.errors?.length&&!Ot(n).status&&n.setStatus({code:di.ERROR});let i=Ot(n).data,s=i["graphql.operation.type"],c=i["graphql.operation.name"];if(t.useOperationNameForRootSpan&&s){let l=pi(n),h=Ot(l).data[_v]||[],y=c?`${s} ${c}`:`${s}`;Array.isArray(h)?(h.push(y),l.setAttribute(_v,h)):typeof h=="string"?l.setAttribute(_v,[h,y]):l.setAttribute(_v,y),Ot(l).data["original-description"]||l.setAttribute("original-description",Ot(l).description),l.updateName(`${Ot(l).data["original-description"]} (${KSt(h)})`)}}}}),YSt=((e={})=>({name:DBe,setupOnce(){BBe(OBe(e))}})),NBe=YSt});var kBe=F(m4=>{"use strict";A();Object.defineProperty(m4,"__esModule",{value:!0});m4.EVENT_LISTENERS_SET=void 0;m4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.kafkajs.eventListenersSet")});var PBe=F(A4=>{"use strict";A();Object.defineProperty(A4,"__esModule",{value:!0});A4.bufferTextMapGetter=void 0;A4.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 MBe=F(rr=>{"use strict";A();Object.defineProperty(rr,"__esModule",{value:!0});rr.METRIC_MESSAGING_PROCESS_DURATION=rr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES=rr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION=rr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES=rr.MESSAGING_SYSTEM_VALUE_KAFKA=rr.MESSAGING_OPERATION_TYPE_VALUE_SEND=rr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE=rr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS=rr.ATTR_MESSAGING_SYSTEM=rr.ATTR_MESSAGING_OPERATION_TYPE=rr.ATTR_MESSAGING_OPERATION_NAME=rr.ATTR_MESSAGING_KAFKA_OFFSET=rr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE=rr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY=rr.ATTR_MESSAGING_DESTINATION_PARTITION_ID=rr.ATTR_MESSAGING_DESTINATION_NAME=rr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT=void 0;rr.ATTR_MESSAGING_BATCH_MESSAGE_COUNT="messaging.batch.message_count";rr.ATTR_MESSAGING_DESTINATION_NAME="messaging.destination.name";rr.ATTR_MESSAGING_DESTINATION_PARTITION_ID="messaging.destination.partition.id";rr.ATTR_MESSAGING_KAFKA_MESSAGE_KEY="messaging.kafka.message.key";rr.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE="messaging.kafka.message.tombstone";rr.ATTR_MESSAGING_KAFKA_OFFSET="messaging.kafka.offset";rr.ATTR_MESSAGING_OPERATION_NAME="messaging.operation.name";rr.ATTR_MESSAGING_OPERATION_TYPE="messaging.operation.type";rr.ATTR_MESSAGING_SYSTEM="messaging.system";rr.MESSAGING_OPERATION_TYPE_VALUE_PROCESS="process";rr.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE="receive";rr.MESSAGING_OPERATION_TYPE_VALUE_SEND="send";rr.MESSAGING_SYSTEM_VALUE_KAFKA="kafka";rr.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES="messaging.client.consumed.messages";rr.METRIC_MESSAGING_CLIENT_OPERATION_DURATION="messaging.client.operation.duration";rr.METRIC_MESSAGING_CLIENT_SENT_MESSAGES="messaging.client.sent.messages";rr.METRIC_MESSAGING_PROCESS_DURATION="messaging.process.duration"});var LBe=F(Lv=>{"use strict";A();Object.defineProperty(Lv,"__esModule",{value:!0});Lv.PACKAGE_NAME=Lv.PACKAGE_VERSION=void 0;Lv.PACKAGE_VERSION="0.23.0";Lv.PACKAGE_NAME="@opentelemetry/instrumentation-kafkajs"});var jBe=F(h4=>{"use strict";A();Object.defineProperty(h4,"__esModule",{value:!0});h4.KafkaJsInstrumentation=void 0;var jr=(ze(),Me(We)),Kd=on(),Uv=(Zn(),Me(Fr)),UBe=kBe(),QBe=PBe(),mt=MBe(),FBe=LBe();function g4(e,t,n){return r=>{e.add(t,{...n,...r?{[Uv.ATTR_ERROR_TYPE]:r}:{}})}}function GBe(e,t,n){return r=>{e.record((Date.now()-t)/1e3,{...n,...r?{[Uv.ATTR_ERROR_TYPE]:r}:{}})}}var zBe=[.005,.01,.025,.05,.075,.1,.25,.5,.75,1,2.5,5,7.5,10],oJ=class extends Kd.InstrumentationBase{constructor(t={}){super(FBe.PACKAGE_NAME,FBe.PACKAGE_VERSION,t)}_updateMetricInstruments(){this._clientDuration=this.meter.createHistogram(mt.METRIC_MESSAGING_CLIENT_OPERATION_DURATION,{advice:{explicitBucketBoundaries:zBe}}),this._sentMessages=this.meter.createCounter(mt.METRIC_MESSAGING_CLIENT_SENT_MESSAGES),this._consumedMessages=this.meter.createCounter(mt.METRIC_MESSAGING_CLIENT_CONSUMED_MESSAGES),this._processDuration=this.meter.createHistogram(mt.METRIC_MESSAGING_PROCESS_DURATION,{advice:{explicitBucketBoundaries:zBe}})}init(){let t=r=>{(0,Kd.isWrapped)(r?.Kafka?.prototype.producer)&&this._unwrap(r.Kafka.prototype,"producer"),(0,Kd.isWrapped)(r?.Kafka?.prototype.consumer)&&this._unwrap(r.Kafka.prototype,"consumer")};return new Kd.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,Kd.isWrapped)(i.run)&&t._unwrap(i,"run"),t._wrap(i,"run",t._getConsumerRunPatch()),t._setKafkaEventListeners(i),i}}_setKafkaEventListeners(t){t[UBe.EVENT_LISTENERS_SET]||(t.events?.REQUEST&&t.on(t.events.REQUEST,this._recordClientDurationMetric.bind(this)),t[UBe.EVENT_LISTENERS_SET]=!0)}_recordClientDurationMetric(t){let[n,r]=t.payload.broker.split(":");this._clientDuration.record(t.payload.duration/1e3,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:`${t.payload.apiName}`,[Uv.ATTR_SERVER_ADDRESS]:n,[Uv.ATTR_SERVER_PORT]:Number.parseInt(r,10)})}_getProducerPatch(){let t=this;return n=>function(...o){let i=n.apply(this,o);return(0,Kd.isWrapped)(i.sendBatch)&&t._unwrap(i,"sendBatch"),t._wrap(i,"sendBatch",t._getSendBatchPatch()),(0,Kd.isWrapped)(i.send)&&t._unwrap(i,"send"),t._wrap(i,"send",t._getSendPatch()),(0,Kd.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,Kd.isWrapped)(i.eachMessage)&&t._unwrap(i,"eachMessage"),t._wrap(i,"eachMessage",t._getConsumerEachMessagePatch())),i?.eachBatch&&((0,Kd.isWrapped)(i.eachBatch)&&t._unwrap(i,"eachBatch"),t._wrap(i,"eachBatch",t._getConsumerEachBatchPatch())),n.call(this,i)}}_getConsumerEachMessagePatch(){let t=this;return n=>function(...o){let i=o[0],s=jr.propagation.extract(jr.ROOT_CONTEXT,i.message.headers,QBe.bufferTextMapGetter),c=t._startConsumerSpan({topic:i.topic,message:i.message,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,ctx:s,attributes:{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}}),l=[GBe(t._processDuration,Date.now(),{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)}),g4(t._consumedMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.partition)})],f=jr.context.with(jr.trace.setSpan(s,c),()=>n.apply(this,o));return t._endSpansOnPromise([c],l,f)}}_getConsumerEachBatchPatch(){return t=>{let n=this;return function(...o){let i=o[0],s=n._startConsumerSpan({topic:i.batch.topic,message:void 0,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE,ctx:jr.ROOT_CONTEXT,attributes:{[mt.ATTR_MESSAGING_BATCH_MESSAGE_COUNT]:i.batch.messages.length,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}});return jr.context.with(jr.trace.setSpan(jr.context.active(),s),()=>{let c=Date.now(),l=[],f=[g4(n._consumedMessages,i.batch.messages.length,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)})];i.batch.messages.forEach(y=>{let S=jr.propagation.extract(jr.ROOT_CONTEXT,y.headers,QBe.bufferTextMapGetter),b=jr.trace.getSpan(S)?.spanContext(),v;b&&(v={context:b}),l.push(n._startConsumerSpan({topic:i.batch.topic,message:y,operationType:mt.MESSAGING_OPERATION_TYPE_VALUE_PROCESS,link:v,attributes:{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}})),f.push(GBe(n._processDuration,c,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"process",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.batch.topic,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(i.batch.partition)}))});let h=t.apply(this,o);return l.unshift(s),n._endSpansOnPromise(l,f,h)})}}}_getProducerTransactionPatch(){let t=this;return n=>function(...o){let i=t.tracer.startSpan("transaction"),s=n.apply(this,o);return s.then(c=>{let l=c.send;c.send=function(...b){return jr.context.with(jr.trace.setSpan(jr.context.active(),i),()=>t._getSendPatch()(l).apply(this,b).catch(x=>{throw i.setStatus({code:jr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let f=c.sendBatch;c.sendBatch=function(...b){return jr.context.with(jr.trace.setSpan(jr.context.active(),i),()=>t._getSendBatchPatch()(f).apply(this,b).catch(x=>{throw i.setStatus({code:jr.SpanStatusCode.ERROR,message:x?.message}),i.recordException(x),x}))};let h=c.commit;c.commit=function(...b){let v=h.apply(this,b).then(()=>{i.setStatus({code:jr.SpanStatusCode.OK})});return t._endSpansOnPromise([i],[],v)};let y=c.abort;c.abort=function(...b){let v=y.apply(this,b);return t._endSpansOnPromise([i],[],v)}}).catch(c=>{i.setStatus({code:jr.SpanStatusCode.ERROR,message:c?.message}),i.recordException(c),i.end()}),s}}_getSendBatchPatch(){let t=this;return n=>function(...o){let s=o[0].topicMessages||[],c=[],l=[];s.forEach(h=>{h.messages.forEach(y=>{c.push(t._startProducerSpan(h.topic,y)),l.push(g4(t._sentMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_DESTINATION_NAME]:h.topic,...y.partition!==void 0?{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(y.partition)}:{}}))})});let f=n.apply(this,o);return t._endSpansOnPromise(c,l,f)}}_getSendPatch(){let t=this;return n=>function(...o){let i=o[0],s=i.messages.map(f=>t._startProducerSpan(i.topic,f)),c=i.messages.map(f=>g4(t._sentMessages,1,{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_DESTINATION_NAME]:i.topic,...f.partition!==void 0?{[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:String(f.partition)}:{}})),l=n.apply(this,o);return t._endSpansOnPromise(s,c,l)}}_endSpansOnPromise(t,n,r){return Promise.resolve(r).then(o=>(n.forEach(i=>i()),o)).catch(o=>{let i,s=Uv.ERROR_TYPE_VALUE_OTHER;throw typeof o=="string"||o===void 0?i=o:typeof o=="object"&&Object.prototype.hasOwnProperty.call(o,"message")&&(i=o.message,s=o.constructor.name),n.forEach(c=>c(s)),t.forEach(c=>{c.setAttribute(Uv.ATTR_ERROR_TYPE,s),c.setStatus({code:jr.SpanStatusCode.ERROR,message:i})}),o}).finally(()=>{t.forEach(o=>o.end())})}_startConsumerSpan({topic:t,message:n,operationType:r,ctx:o,link:i,attributes:s}){let c=r===mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?"poll":r,l=this.tracer.startSpan(`${c} ${t}`,{kind:r===mt.MESSAGING_OPERATION_TYPE_VALUE_RECEIVE?jr.SpanKind.CLIENT:jr.SpanKind.CONSUMER,attributes:{...s,[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_DESTINATION_NAME]:t,[mt.ATTR_MESSAGING_OPERATION_TYPE]:r,[mt.ATTR_MESSAGING_OPERATION_NAME]:c,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n?.key?String(n.key):void 0,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n?.key&&n.value===null?!0:void 0,[mt.ATTR_MESSAGING_KAFKA_OFFSET]:n?.offset},links:i?[i]:[]},o),{consumerHook:f}=this.getConfig();return f&&n&&(0,Kd.safeExecuteInTheMiddle)(()=>f(l,{topic:t,message:n}),h=>{h&&this._diag.error("consumerHook error",h)},!0),l}_startProducerSpan(t,n){let r=this.tracer.startSpan(`send ${t}`,{kind:jr.SpanKind.PRODUCER,attributes:{[mt.ATTR_MESSAGING_SYSTEM]:mt.MESSAGING_SYSTEM_VALUE_KAFKA,[mt.ATTR_MESSAGING_DESTINATION_NAME]:t,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_KEY]:n.key?String(n.key):void 0,[mt.ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE]:n.key&&n.value===null?!0:void 0,[mt.ATTR_MESSAGING_DESTINATION_PARTITION_ID]:n.partition!==void 0?String(n.partition):void 0,[mt.ATTR_MESSAGING_OPERATION_NAME]:"send",[mt.ATTR_MESSAGING_OPERATION_TYPE]:mt.MESSAGING_OPERATION_TYPE_VALUE_SEND}});n.headers=n.headers??{},jr.propagation.inject(jr.trace.setSpan(jr.context.active(),r),n.headers);let{producerHook:o}=this.getConfig();return o&&(0,Kd.safeExecuteInTheMiddle)(()=>o(r,{topic:t,message:n}),i=>{i&&this._diag.error("producerHook error",i)},!0),r}};h4.KafkaJsInstrumentation=oJ});var HBe=F(_4=>{"use strict";A();Object.defineProperty(_4,"__esModule",{value:!0});_4.KafkaJsInstrumentation=void 0;var JSt=jBe();Object.defineProperty(_4,"KafkaJsInstrumentation",{enumerable:!0,get:function(){return JSt.KafkaJsInstrumentation}})});var $Be,qBe,VBe,ZSt,YBe,KBe=O(()=>{A();$Be=se(HBe(),1);gr();qBe="Kafka",VBe=at(qBe,()=>new $Be.KafkaJsInstrumentation({consumerHook(e){zr(e,"auto.kafkajs.otel.consumer")},producerHook(e){zr(e,"auto.kafkajs.otel.producer")}})),ZSt=(()=>({name:qBe,setupOnce(){VBe()}})),YBe=ZSt});var JBe=F(Qv=>{"use strict";A();Object.defineProperty(Qv,"__esModule",{value:!0});Qv.PACKAGE_NAME=Qv.PACKAGE_VERSION=void 0;Qv.PACKAGE_VERSION="0.58.0";Qv.PACKAGE_NAME="@opentelemetry/instrumentation-lru-memoizer"});var eNe=F(E4=>{"use strict";A();Object.defineProperty(E4,"__esModule",{value:!0});E4.LruMemoizerInstrumentation=void 0;var ZBe=(ze(),Me(We)),WBe=on(),XBe=JBe(),iJ=class extends WBe.InstrumentationBase{constructor(t={}){super(XBe.PACKAGE_NAME,XBe.PACKAGE_VERSION,t)}init(){return[new WBe.InstrumentationNodeModuleDefinition("lru-memoizer",[">=1.3 <4"],t=>{let n=function(){let r=t.apply(this,arguments);return function(){let o=[...arguments],i=o.pop(),s=typeof i=="function"?ZBe.context.bind(ZBe.context.active(),i):i;return o.push(s),r.apply(this,o)}};return n.sync=t.sync,n},void 0)]}};E4.LruMemoizerInstrumentation=iJ});var tNe=F(y4=>{"use strict";A();Object.defineProperty(y4,"__esModule",{value:!0});y4.LruMemoizerInstrumentation=void 0;var WSt=eNe();Object.defineProperty(y4,"LruMemoizerInstrumentation",{enumerable:!0,get:function(){return WSt.LruMemoizerInstrumentation}})});var nNe,rNe,oNe,XSt,iNe,sNe=O(()=>{A();nNe=se(tNe(),1);gr();rNe="LruMemoizer",oNe=at(rNe,()=>new nNe.LruMemoizerInstrumentation),XSt=(()=>({name:rNe,setupOnce(){oNe()}})),iNe=XSt});var aNe=F(wo=>{"use strict";A();Object.defineProperty(wo,"__esModule",{value:!0});wo.METRIC_DB_CLIENT_CONNECTIONS_USAGE=wo.DB_SYSTEM_VALUE_MONGODB=wo.DB_SYSTEM_NAME_VALUE_MONGODB=wo.ATTR_NET_PEER_PORT=wo.ATTR_NET_PEER_NAME=wo.ATTR_DB_SYSTEM=wo.ATTR_DB_STATEMENT=wo.ATTR_DB_OPERATION=wo.ATTR_DB_NAME=wo.ATTR_DB_MONGODB_COLLECTION=wo.ATTR_DB_CONNECTION_STRING=void 0;wo.ATTR_DB_CONNECTION_STRING="db.connection_string";wo.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";wo.ATTR_DB_NAME="db.name";wo.ATTR_DB_OPERATION="db.operation";wo.ATTR_DB_STATEMENT="db.statement";wo.ATTR_DB_SYSTEM="db.system";wo.ATTR_NET_PEER_NAME="net.peer.name";wo.ATTR_NET_PEER_PORT="net.peer.port";wo.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb";wo.DB_SYSTEM_VALUE_MONGODB="mongodb";wo.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var uNe=F(sO=>{"use strict";A();Object.defineProperty(sO,"__esModule",{value:!0});sO.MongodbCommandType=void 0;var eTt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.AGGREGATE="aggregate",e.UNKNOWN="unknown"})(eTt=sO.MongodbCommandType||(sO.MongodbCommandType={}))});var cNe=F(Fv=>{"use strict";A();Object.defineProperty(Fv,"__esModule",{value:!0});Fv.PACKAGE_NAME=Fv.PACKAGE_VERSION=void 0;Fv.PACKAGE_VERSION="0.67.0";Fv.PACKAGE_NAME="@opentelemetry/instrumentation-mongodb"});var pNe=F(S4=>{"use strict";A();Object.defineProperty(S4,"__esModule",{value:!0});S4.MongoDBInstrumentation=void 0;var Zo=(ze(),Me(We)),or=on(),Ug=(Zn(),Me(Fr)),zl=aNe(),TS=uNe(),lNe=cNe(),dNe={requireParentSpan:!0},sJ=class e extends or.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(lNe.PACKAGE_NAME,lNe.PACKAGE_VERSION,{...dNe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,or.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,or.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...dNe,...t})}_updateMetricInstruments(){this._connectionsUsage=this.meter.createUpDownCounter(zl.METRIC_DB_CLIENT_CONNECTIONS_USAGE,{description:"The number of connections that are currently in state described by the state attribute.",unit:"{connection}"})}_connCountAdd(t,n,r){this._connectionsUsage?.add(t,{"pool.name":n,state:r})}init(){let{v3PatchConnection:t,v3UnpatchConnection:n}=this._getV3ConnectionPatches(),{v4PatchConnect:r,v4UnpatchConnect:o}=this._getV4ConnectPatches(),{v4PatchConnectionCallback:i,v4PatchConnectionPromise:s,v4UnpatchConnection:c}=this._getV4ConnectionPatches(),{v4PatchConnectionPool:l,v4UnpatchConnectionPool:f}=this._getV4ConnectionPoolPatches(),{v4PatchSessions:h,v4UnpatchSessions:y}=this._getV4SessionsPatches();return[new or.InstrumentationNodeModuleDefinition("mongodb",[">=3.3.0 <4"],void 0,void 0,[new or.InstrumentationNodeModuleFile("mongodb/lib/core/wireprotocol/index.js",[">=3.3.0 <4"],t,n)]),new or.InstrumentationNodeModuleDefinition("mongodb",[">=4.0.0 <8"],void 0,void 0,[new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=4.0.0 <6.4"],i,c),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection.js",[">=6.4.0 <8"],s,c),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connection_pool.js",[">=4.0.0 <6.4"],l,f),new or.InstrumentationNodeModuleFile("mongodb/lib/cmap/connect.js",[">=4.0.0 <8"],r,o),new or.InstrumentationNodeModuleFile("mongodb/lib/sessions.js",[">=4.0.0 <8"],h,y)])]}_getV3ConnectionPatches(){return{v3PatchConnection:t=>((0,or.isWrapped)(t.insert)&&this._unwrap(t,"insert"),this._wrap(t,"insert",this._getV3PatchOperation("insert")),(0,or.isWrapped)(t.remove)&&this._unwrap(t,"remove"),this._wrap(t,"remove",this._getV3PatchOperation("remove")),(0,or.isWrapped)(t.update)&&this._unwrap(t,"update"),this._wrap(t,"update",this._getV3PatchOperation("update")),(0,or.isWrapped)(t.command)&&this._unwrap(t,"command"),this._wrap(t,"command",this._getV3PatchCommand()),(0,or.isWrapped)(t.query)&&this._unwrap(t,"query"),this._wrap(t,"query",this._getV3PatchFind()),(0,or.isWrapped)(t.getMore)&&this._unwrap(t,"getMore"),this._wrap(t,"getMore",this._getV3PatchCursor()),t),v3UnpatchConnection:t=>{t!==void 0&&(this._unwrap(t,"insert"),this._unwrap(t,"remove"),this._unwrap(t,"update"),this._unwrap(t,"command"),this._unwrap(t,"query"),this._unwrap(t,"getMore"))}}}_getV4SessionsPatches(){return{v4PatchSessions:t=>((0,or.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),this._wrap(t.ServerSessionPool.prototype,"acquire",this._getV4AcquireCommand()),(0,or.isWrapped)(t.release)&&this._unwrap(t,"release"),this._wrap(t.ServerSessionPool.prototype,"release",this._getV4ReleaseCommand()),t),v4UnpatchSessions:t=>{t!==void 0&&((0,or.isWrapped)(t.acquire)&&this._unwrap(t,"acquire"),(0,or.isWrapped)(t.release)&&this._unwrap(t,"release"))}}}_getV4AcquireCommand(){let t=this;return n=>function(){let o=this.sessions.length,i=n.call(this),s=this.sessions.length;return o===s?t._connCountAdd(1,t._poolName,"used"):o-1===s&&(t._connCountAdd(-1,t._poolName,"idle"),t._connCountAdd(1,t._poolName,"used")),i}}_getV4ReleaseCommand(){let t=this;return n=>function(o){let i=n.call(this,o);return t._connCountAdd(-1,t._poolName,"used"),t._connCountAdd(1,t._poolName,"idle"),i}}_getV4ConnectionPoolPatches(){return{v4PatchConnectionPool:t=>{let n=t.ConnectionPool.prototype;return(0,or.isWrapped)(n.checkOut)&&this._unwrap(n,"checkOut"),this._wrap(n,"checkOut",this._getV4ConnectionPoolCheckOut()),t},v4UnpatchConnectionPool:t=>{t!==void 0&&this._unwrap(t.ConnectionPool.prototype,"checkOut")}}}_getV4ConnectPatches(){return{v4PatchConnect:t=>((0,or.isWrapped)(t.connect)&&this._unwrap(t,"connect"),this._wrap(t,"connect",this._getV4ConnectCommand()),t),v4UnpatchConnect:t=>{t!==void 0&&this._unwrap(t,"connect")}}}_getV4ConnectionPoolCheckOut(){return t=>function(r){let o=Zo.context.bind(Zo.context.active(),r);return t.call(this,o)}}_getV4ConnectCommand(){let t=this;return n=>function(o,i){if(n.length===1){let c=n.call(this,o);return c&&typeof c.then=="function"&&c.then(()=>t.setPoolName(o),()=>{}),c}let s=function(c,l){if(c||!l){i(c,l);return}t.setPoolName(o),i(c,l)};return n.call(this,o,s)}}_getV4ConnectionPatches(){return{v4PatchConnectionCallback:t=>((0,or.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandCallback()),t),v4PatchConnectionPromise:t=>((0,or.isWrapped)(t.Connection.prototype.command)&&this._unwrap(t.Connection.prototype,"command"),this._wrap(t.Connection.prototype,"command",this._getV4PatchCommandPromise()),t),v4UnpatchConnection:t=>{t!==void 0&&this._unwrap(t.Connection.prototype,"command")}}}_getV3PatchOperation(t){let n=this;return r=>function(i,s,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=n._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function"||typeof c!="object")return typeof l=="function"?r.call(this,i,s,c,l):r.call(this,i,s,c,l,f);let b=n._getV3SpanAttributes(s,i,c[0],t),v=n._spanNameFromAttrs(b),x=n.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=n._patchEnd(x,S);return typeof l=="function"?r.call(this,i,s,c,D):r.call(this,i,s,c,l,D)}}_getV3PatchCommand(){let t=this;return n=>function(o,i,s,c,l){let f=Zo.trace.getSpan(Zo.context.active()),h=t._checkSkipInstrumentation(f),y=typeof c=="function"?c:l;if(h||typeof y!="function"||typeof s!="object")return typeof c=="function"?n.call(this,o,i,s,c):n.call(this,o,i,s,c,l);let S=e._getCommandType(s),b=S===TS.MongodbCommandType.UNKNOWN?void 0:S,v=t._getV3SpanAttributes(i,o,s,b),x=t._spanNameFromAttrs(v),D=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v}),k=t._patchEnd(D,y);return typeof c=="function"?n.call(this,o,i,s,k):n.call(this,o,i,s,c,k)}}_getV4PatchCommandCallback(){let t=this;return n=>function(o,i,s,c){let l=Zo.trace.getSpan(Zo.context.active()),f=t._checkSkipInstrumentation(l),h=c,y=Object.keys(i)[0];if(typeof i!="object"||i.ismaster||i.hello)return n.call(this,o,i,s,c);let S;if(!f){let v=t._getV4SpanAttributes(this,o,i,y),x=t._spanNameFromAttrs(v);S=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v})}let b=t._patchEnd(S,h,this.id,y);return n.call(this,o,i,s,b)}}_getV4PatchCommandPromise(){let t=this;return n=>function(...o){let[i,s]=o,c=Zo.trace.getSpan(Zo.context.active()),l=t._checkSkipInstrumentation(c),f=Object.keys(s)[0],h=()=>{};if(typeof s!="object"||s.ismaster||s.hello)return n.apply(this,o);let y;if(!l){let v=t._getV4SpanAttributes(this,i,s,f),x=t._spanNameFromAttrs(v);y=t.tracer.startSpan(x,{kind:Zo.SpanKind.CLIENT,attributes:v})}let S=t._patchEnd(y,h,this.id,f),b=n.apply(this,o);return b.then(v=>S(null,v),v=>S(v)),b}}_getV3PatchFind(){let t=this;return n=>function(o,i,s,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function"||typeof s!="object")return typeof l=="function"?n.call(this,o,i,s,c,l):n.call(this,o,i,s,c,l,f);let b=t._getV3SpanAttributes(i,o,s,"find"),v=t._spanNameFromAttrs(b),x=t.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=t._patchEnd(x,S);return typeof l=="function"?n.call(this,o,i,s,c,D):n.call(this,o,i,s,c,l,D)}}_getV3PatchCursor(){let t=this;return n=>function(o,i,s,c,l,f){let h=Zo.trace.getSpan(Zo.context.active()),y=t._checkSkipInstrumentation(h),S=typeof l=="function"?l:f;if(y||typeof S!="function")return typeof l=="function"?n.call(this,o,i,s,c,l):n.call(this,o,i,s,c,l,f);let b=t._getV3SpanAttributes(i,o,s.cmd,"getMore"),v=t._spanNameFromAttrs(b),x=t.tracer.startSpan(v,{kind:Zo.SpanKind.CLIENT,attributes:b}),D=t._patchEnd(x,S);return typeof l=="function"?n.call(this,o,i,s,c,D):n.call(this,o,i,s,c,l,D)}}static _getCommandType(t){return t.createIndexes!==void 0?TS.MongodbCommandType.CREATE_INDEXES:t.findandmodify!==void 0?TS.MongodbCommandType.FIND_AND_MODIFY:t.ismaster!==void 0?TS.MongodbCommandType.IS_MASTER:t.count!==void 0?TS.MongodbCommandType.COUNT:t.aggregate!==void 0?TS.MongodbCommandType.AGGREGATE:TS.MongodbCommandType.UNKNOWN}_getV4SpanAttributes(t,n,r,o){let i,s;if(t){let l=typeof t.address=="string"?t.address.split(":"):"";l.length===2&&(i=l[0],s=l[1])}let 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,s,c,o)}_getV3SpanAttributes(t,n,r,o){let i,s;if(n&&n.s&&(i=n.s.options?.host??n.s.host,s=(n.s.options?.port??n.s.port)?.toString(),i==null||s==null)){let h=n.description?.address;if(h){let y=h.split(":");i=y[0],s=y[1]}}let[c,l]=t.toString().split("."),f=r?.query??r?.q??r;return this._getSpanAttributes(c,l,i,s,f,o)}_getSpanAttributes(t,n,r,o,i,s){let c={};if(this._dbSemconvStability&or.SemconvStability.OLD&&(c[zl.ATTR_DB_SYSTEM]=zl.DB_SYSTEM_VALUE_MONGODB,c[zl.ATTR_DB_NAME]=t,c[zl.ATTR_DB_MONGODB_COLLECTION]=n,c[zl.ATTR_DB_OPERATION]=s,c[zl.ATTR_DB_CONNECTION_STRING]=`mongodb://${r}:${o}/${t}`),this._dbSemconvStability&or.SemconvStability.STABLE&&(c[Ug.ATTR_DB_SYSTEM_NAME]=zl.DB_SYSTEM_NAME_VALUE_MONGODB,c[Ug.ATTR_DB_NAMESPACE]=t,c[Ug.ATTR_DB_OPERATION_NAME]=s,c[Ug.ATTR_DB_COLLECTION_NAME]=n),r&&o){this._netSemconvStability&or.SemconvStability.OLD&&(c[zl.ATTR_NET_PEER_NAME]=r),this._netSemconvStability&or.SemconvStability.STABLE&&(c[Ug.ATTR_SERVER_ADDRESS]=r);let l=parseInt(o,10);isNaN(l)||(this._netSemconvStability&or.SemconvStability.OLD&&(c[zl.ATTR_NET_PEER_PORT]=l),this._netSemconvStability&or.SemconvStability.STABLE&&(c[Ug.ATTR_SERVER_PORT]=l))}if(i){let{dbStatementSerializer:l}=this.getConfig(),f=typeof l=="function"?l:this._defaultDbStatementSerializer.bind(this);(0,or.safeExecuteInTheMiddle)(()=>{let h=f(i);this._dbSemconvStability&or.SemconvStability.OLD&&(c[zl.ATTR_DB_STATEMENT]=h),this._dbSemconvStability&or.SemconvStability.STABLE&&(c[Ug.ATTR_DB_QUERY_TEXT]=h)},h=>{h&&this._diag.error("Error running dbStatementSerializer hook",h)},!0)}return c}_spanNameFromAttrs(t){let n;return this._dbSemconvStability&or.SemconvStability.STABLE?n=[t[Ug.ATTR_DB_OPERATION_NAME],t[Ug.ATTR_DB_COLLECTION_NAME]].filter(r=>r).join(" ")||zl.DB_SYSTEM_NAME_VALUE_MONGODB:n=`mongodb.${t[zl.ATTR_DB_OPERATION]||"command"}`,n}_getDefaultDbStatementReplacer(){let t=new WeakSet;return(n,r)=>typeof r!="object"||!r?"?":t.has(r)?"[Circular]":(t.add(r),r)}_defaultDbStatementSerializer(t){let{enhancedDatabaseReporting:n}=this.getConfig();return n?JSON.stringify(t):JSON.stringify(t,this._getDefaultDbStatementReplacer())}_handleExecutionResult(t,n){let{responseHook:r}=this.getConfig();typeof r=="function"&&(0,or.safeExecuteInTheMiddle)(()=>{r(t,{data:n})},o=>{o&&this._diag.error("Error running response hook",o)},!0)}_patchEnd(t,n,r,o){let i=Zo.context.active(),s=this,c=!1;return function(...f){if(!c){c=!0;let h=f[0];if(t){if(h instanceof Error)t.setStatus({code:Zo.SpanStatusCode.ERROR,message:h.message});else{let y=f[1];s._handleExecutionResult(t,y)}t.end()}o==="endSessions"&&s._connCountAdd(-1,s._poolName,"idle")}return Zo.context.with(i,()=>n.apply(this,f))}}setPoolName(t){let n=t.hostAddress?.host,r=t.hostAddress?.port,o=t.dbName,i=`mongodb://${n}:${r}/${o}`;this._poolName=i}_checkSkipInstrumentation(t){return this.getConfig().requireParentSpan===!0&&t===void 0}};S4.MongoDBInstrumentation=sJ});var fNe=F(aO=>{"use strict";A();Object.defineProperty(aO,"__esModule",{value:!0});aO.MongodbCommandType=void 0;var tTt;(function(e){e.CREATE_INDEXES="createIndexes",e.FIND_AND_MODIFY="findAndModify",e.IS_MASTER="isMaster",e.COUNT="count",e.UNKNOWN="unknown"})(tTt=aO.MongodbCommandType||(aO.MongodbCommandType={}))});var mNe=F(Gv=>{"use strict";A();Object.defineProperty(Gv,"__esModule",{value:!0});Gv.MongodbCommandType=Gv.MongoDBInstrumentation=void 0;var nTt=pNe();Object.defineProperty(Gv,"MongoDBInstrumentation",{enumerable:!0,get:function(){return nTt.MongoDBInstrumentation}});var rTt=fNe();Object.defineProperty(Gv,"MongodbCommandType",{enumerable:!0,get:function(){return rTt.MongodbCommandType}})});function oTt(e){let t=aJ(e);return JSON.stringify(t)}function aJ(e){if(Array.isArray(e))return e.map(t=>aJ(t));if(iTt(e)){let t={};return Object.entries(e).map(([n,r])=>[n,aJ(r)]).reduce((n,r)=>(aTt(r)&&(n[r[0]]=r[1]),n),t)}return"?"}function iTt(e){return typeof e=="object"&&e!==null&&!sTt(e)}function sTt(e){let t=!1;return typeof Buffer<"u"&&(t=Buffer.isBuffer(e)),t}function aTt(e){return Array.isArray(e)}var ANe,gNe,hNe,uTt,_Ne,ENe=O(()=>{A();ANe=se(mNe(),1);gr();gNe="Mongo",hNe=at(gNe,()=>new ANe.MongoDBInstrumentation({dbStatementSerializer:oTt,responseHook(e){zr(e,"auto.db.otel.mongo")}}));uTt=(()=>({name:gNe,setupOnce(){hNe()}})),_Ne=uTt});var uJ=F(os=>{"use strict";A();Object.defineProperty(os,"__esModule",{value:!0});os.DB_SYSTEM_NAME_VALUE_MONGODB=os.ATTR_NET_PEER_PORT=os.ATTR_NET_PEER_NAME=os.ATTR_DB_USER=os.ATTR_DB_SYSTEM=os.ATTR_DB_STATEMENT=os.ATTR_DB_OPERATION=os.ATTR_DB_NAME=os.ATTR_DB_MONGODB_COLLECTION=void 0;os.ATTR_DB_MONGODB_COLLECTION="db.mongodb.collection";os.ATTR_DB_NAME="db.name";os.ATTR_DB_OPERATION="db.operation";os.ATTR_DB_STATEMENT="db.statement";os.ATTR_DB_SYSTEM="db.system";os.ATTR_DB_USER="db.user";os.ATTR_NET_PEER_NAME="net.peer.name";os.ATTR_NET_PEER_PORT="net.peer.port";os.DB_SYSTEM_NAME_VALUE_MONGODB="mongodb"});var TNe=F(tE=>{"use strict";A();Object.defineProperty(tE,"__esModule",{value:!0});tE.handleCallbackResponse=tE.handlePromiseResponse=tE.getAttributesFromCollection=void 0;var yNe=(ze(),Me(We)),cO=on(),uO=uJ(),T4=(Zn(),Me(Fr));function cTt(e,t,n){let r={};return t&cO.SemconvStability.OLD&&(r[uO.ATTR_DB_MONGODB_COLLECTION]=e.name,r[uO.ATTR_DB_NAME]=e.conn.name,r[uO.ATTR_DB_USER]=e.conn.user),t&cO.SemconvStability.STABLE&&(r[T4.ATTR_DB_COLLECTION_NAME]=e.name,r[T4.ATTR_DB_NAMESPACE]=e.conn.name),n&cO.SemconvStability.OLD&&(r[uO.ATTR_NET_PEER_NAME]=e.conn.host,r[uO.ATTR_NET_PEER_PORT]=e.conn.port),n&cO.SemconvStability.STABLE&&(r[T4.ATTR_SERVER_ADDRESS]=e.conn.host,r[T4.ATTR_SERVER_PORT]=e.conn.port),r}tE.getAttributesFromCollection=cTt;function SNe(e,t={}){e.recordException(t),e.setStatus({code:yNe.SpanStatusCode.ERROR,message:`${t.message} ${t.code?`
38
- Mongoose Error Code: ${t.code}`:""}`})}function cJ(e,t,n,r=void 0){n&&(0,cO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&yNe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function lTt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(cJ(t,o,n,r),o)).catch(o=>{throw SNe(t,o),o}).finally(()=>t.end()):(cJ(t,e,n,r),t.end(),e)}tE.handlePromiseResponse=lTt;function dTt(e,t,n,r,o,i,s=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(l,f)=>(l?SNe(r,l):cJ(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}tE.handleCallbackResponse=dTt});var INe=F(zv=>{"use strict";A();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.60.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var xNe=F(Gc=>{"use strict";A();Object.defineProperty(Gc,"__esModule",{value:!0});Gc.MongooseInstrumentation=Gc._ALREADY_INSTRUMENTED=Gc._STORED_PARENT_SPAN=void 0;var vs=(ze(),Me(We)),pTt=br(),lJ=TNe(),Oa=on(),bNe=INe(),nE=uJ(),IS=(Zn(),Me(Fr)),I4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],fTt=["remove","count","findOneAndRemove",...I4],mTt=["count","findOneAndRemove",...I4],ATt=[...I4];function CNe(e){return e?e.startsWith("6.")||e.startsWith("5.")?fTt:e.startsWith("7.")?mTt:ATt:I4}function vNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function RNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Gc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Gc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var dJ=class extends Oa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(bNe.PACKAGE_NAME,bNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Oa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Oa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Oa.InstrumentationNodeModuleDefinition("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,vNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),RNe(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)),CNe(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=CNe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,vNe(n)&&this._unwrap(r.Model.prototype,"remove"),RNe(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&&vs.trace.getSpan(vs.context.active())===void 0)return r.apply(this,arguments);let s=this[Gc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Oa.SemconvStability.OLD&&(c[nE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Oa.SemconvStability.STABLE&&(c[IS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Gc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return r.apply(this,arguments);let s=this[Gc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Oa.SemconvStability.OLD&&(c[nE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Oa.SemconvStability.STABLE&&(c[IS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,c){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Oa.SemconvStability.OLD&&(f[nE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(f[IS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(c=s,s=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,c,l){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,y=c;typeof s=="function"?(f=s,h=void 0,y=void 0):typeof c=="function"&&(f=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let D=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Oa.SemconvStability.OLD&&(S[nE.ATTR_DB_STATEMENT]=D),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(S[IS.ATTR_DB_QUERY_TEXT]=D)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),x=r._handleResponse(v,o,this,arguments,f,n);return x&&typeof x=="object"&&(x[Gc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(s,c,l){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(l=c,c=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}c!==void 0&&(f.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,f);r._dbSemconvStability&Oa.SemconvStability.OLD&&(h[nE.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(h[IS.ATTR_DB_QUERY_TEXT]=b)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=vs.trace.getSpan(vs.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Gc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Gc._STORED_PARENT_SPAN]=vs.trace.getSpan(vs.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,lJ.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Oa.SemconvStability.OLD&&(s[nE.ATTR_DB_OPERATION]=r,s[nE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Oa.SemconvStability.STABLE&&(s[IS.ATTR_DB_OPERATION_NAME]=r,s[IS.ATTR_DB_SYSTEM_NAME]=nE.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Oa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:vs.SpanKind.CLIENT,attributes:s},i?vs.trace.setSpan(vs.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,lJ.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,s));{let l=c._callOriginalFunction(()=>n.apply(r,o));return(0,lJ.handlePromiseResponse)(l,t,c.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?vs.context.with((0,pTt.suppressTracing)(vs.context.active()),t):t()}};Gc.MongooseInstrumentation=dJ});var DNe=F(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.MongooseInstrumentation=void 0;var gTt=xNe();Object.defineProperty(b4,"MongooseInstrumentation",{enumerable:!0,get:function(){return gTt.MongooseInstrumentation}})});var BNe,NNe,ONe,hTt,wNe,kNe=O(()=>{A();BNe=se(DNe(),1);gr();NNe="Mongoose",ONe=at(NNe,()=>new BNe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),hTt=(()=>({name:NNe,setupOnce(){ONe()}})),wNe=hTt});var PNe=F(is=>{"use strict";A();Object.defineProperty(is,"__esModule",{value:!0});is.METRIC_DB_CLIENT_CONNECTIONS_USAGE=is.DB_SYSTEM_VALUE_MYSQL=is.ATTR_NET_PEER_PORT=is.ATTR_NET_PEER_NAME=is.ATTR_DB_USER=is.ATTR_DB_SYSTEM=is.ATTR_DB_STATEMENT=is.ATTR_DB_NAME=is.ATTR_DB_CONNECTION_STRING=void 0;is.ATTR_DB_CONNECTION_STRING="db.connection_string";is.ATTR_DB_NAME="db.name";is.ATTR_DB_STATEMENT="db.statement";is.ATTR_DB_SYSTEM="db.system";is.ATTR_DB_USER="db.user";is.ATTR_NET_PEER_NAME="net.peer.name";is.ATTR_NET_PEER_PORT="net.peer.port";is.DB_SYSTEM_VALUE_MYSQL="mysql";is.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var MNe=F(lO=>{"use strict";A();Object.defineProperty(lO,"__esModule",{value:!0});lO.AttributeNames=void 0;var _Tt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(_Tt=lO.AttributeNames||(lO.AttributeNames={}))});var LNe=F(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.getPoolNameOld=su.arrayStringifyHelper=su.getSpanName=su.getDbValues=su.getDbQueryText=su.getJDBCString=su.getConfig=void 0;function ETt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}su.getConfig=ETt;function yTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}su.getJDBCString=yTt;function STt(e){return typeof e=="string"?e:e.sql}su.getDbQueryText=STt;function TTt(e,t){return pJ(typeof e=="string"?t:t||e.values)}su.getDbValues=TTt;function ITt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}su.getSpanName=ITt;function pJ(e){return e?`[${e.toString()}]`:""}su.arrayStringifyHelper=pJ;function bTt(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()}su.getPoolNameOld=bTt});var UNe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var FNe=F(C4=>{"use strict";A();Object.defineProperty(C4,"__esModule",{value:!0});C4.MySQLInstrumentation=void 0;var zc=(ze(),Me(We)),Jd=on(),Hv=(Zn(),Me(Fr)),Qg=PNe(),CTt=MNe(),bS=LNe(),QNe=UNe(),fJ=class extends Jd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(QNe.PACKAGE_NAME,QNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Jd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Jd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Qg.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 Jd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Jd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Jd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Jd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,c=t._freeConnections.length,l=s-c,f=(0,bS.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-c,f,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=c[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof c=="function"){let l=r._getConnectionCallbackPatchFn(c);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=zc.context.active();return function(o,i){i&&((0,Jd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&zc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:l,port:f,database:h,user:y}=(0,bS.getConfig)(t.config),S=parseInt(f,10),b=(0,bS.getDbQueryText)(o);r._dbSemconvStability&Jd.SemconvStability.OLD&&(c[Qg.ATTR_DB_SYSTEM]=Qg.DB_SYSTEM_VALUE_MYSQL,c[Qg.ATTR_DB_CONNECTION_STRING]=(0,bS.getJDBCString)(l,f,h),c[Qg.ATTR_DB_NAME]=h,c[Qg.ATTR_DB_USER]=y,c[Qg.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Jd.SemconvStability.STABLE&&(c[Hv.ATTR_DB_SYSTEM_NAME]=Hv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Hv.ATTR_DB_NAMESPACE]=h,c[Hv.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&Jd.SemconvStability.OLD&&(c[Qg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(c[Qg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Jd.SemconvStability.STABLE&&(c[Hv.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(c[Hv.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,bS.getSpanName)(o),{kind:zc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(CTt.AttributeNames.MYSQL_VALUES,(0,bS.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),D=zc.context.active();if(x===-1){let k=zc.context.with(zc.trace.setSpan(zc.context.active(),v),()=>n.apply(t,arguments));return zc.context.bind(D,k),k.on("error",Q=>v.setStatus({code:zc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,D)),zc.context.with(zc.trace.setSpan(zc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:zc.SpanStatusCode.ERROR,message:o.message}),t.end(),zc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,bS.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")})}};C4.MySQLInstrumentation=fJ});var GNe=F(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.MySQLInstrumentation=void 0;var vTt=FNe();Object.defineProperty(v4,"MySQLInstrumentation",{enumerable:!0,get:function(){return vTt.MySQLInstrumentation}})});var zNe,jNe,HNe,RTt,$Ne,qNe=O(()=>{A();zNe=se(GNe(),1);gr();jNe="Mysql",HNe=at(jNe,()=>new zNe.MySQLInstrumentation({})),RTt=(()=>({name:jNe,setupOnce(){HNe()}})),$Ne=RTt});var mJ=F(na=>{"use strict";A();Object.defineProperty(na,"__esModule",{value:!0});na.DB_SYSTEM_VALUE_MYSQL=na.ATTR_NET_PEER_PORT=na.ATTR_NET_PEER_NAME=na.ATTR_DB_USER=na.ATTR_DB_SYSTEM=na.ATTR_DB_STATEMENT=na.ATTR_DB_NAME=na.ATTR_DB_CONNECTION_STRING=void 0;na.ATTR_DB_CONNECTION_STRING="db.connection_string";na.ATTR_DB_NAME="db.name";na.ATTR_DB_STATEMENT="db.statement";na.ATTR_DB_SYSTEM="db.system";na.ATTR_DB_USER="db.user";na.ATTR_NET_PEER_NAME="net.peer.name";na.ATTR_NET_PEER_PORT="net.peer.port";na.DB_SYSTEM_VALUE_MYSQL="mysql"});var gJ=F(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.addSqlCommenterComment=void 0;var AJ=(ze(),Me(We)),xTt=br();function DTt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function BTt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function NTt(e,t){if(typeof t!="string"||t.length===0||DTt(t))return t;let n=new xTt.W3CTraceContextPropagator,r={};n.inject(AJ.trace.setSpan(AJ.ROOT_CONTEXT,e),r,AJ.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let c=BTt(r[s]);return`${s}='${c}'`}).join(",");return`${t} /*${i}*/`}R4.addSqlCommenterComment=NTt});var VNe=F(Zd=>{"use strict";A();Object.defineProperty(Zd,"__esModule",{value:!0});Zd.getConnectionPrototypeToInstrument=Zd.once=Zd.getSpanName=Zd.getQueryText=Zd.getConnectionAttributes=void 0;var dO=mJ(),x4=on(),hJ=(Zn(),Me(Fr));function OTt(e,t,n){let{host:r,port:o,database:i,user:s}=wTt(e),c={};t&x4.SemconvStability.OLD&&(c[dO.ATTR_DB_CONNECTION_STRING]=kTt(r,o,i),c[dO.ATTR_DB_NAME]=i,c[dO.ATTR_DB_USER]=s),t&x4.SemconvStability.STABLE&&(c[hJ.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&x4.SemconvStability.OLD&&(c[dO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(c[dO.ATTR_NET_PEER_PORT]=l)),n&x4.SemconvStability.STABLE&&(c[hJ.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(c[hJ.ATTR_SERVER_PORT]=l)),c}Zd.getConnectionAttributes=OTt;function wTt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function kTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function PTt(e,t,n,r=!1,o=MTt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,LTt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Zd.getQueryText=PTt;function MTt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function LTt(e){return"values"in e}function UTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Zd.getSpanName=UTt;var QTt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Zd.once=QTt;function FTt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Zd.getConnectionPrototypeToInstrument=FTt});var YNe=F($v=>{"use strict";A();Object.defineProperty($v,"__esModule",{value:!0});$v.PACKAGE_NAME=$v.PACKAGE_VERSION=void 0;$v.PACKAGE_VERSION="0.60.0";$v.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var WNe=F(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.MySQL2Instrumentation=void 0;var KNe=(ze(),Me(We)),Af=on(),_J=mJ(),JNe=gJ(),qv=VNe(),ZNe=YNe(),EJ=(Zn(),Me(Fr)),yJ=[">=1.4.2 <4"],SJ=class extends Af.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ZNe.PACKAGE_NAME,ZNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Af.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Af.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,Af.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Af.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 Af.InstrumentationNodeModuleDefinition("mysql2",yJ,i=>(n(i),i),()=>{},[new Af.InstrumentationNodeModuleFile("mysql2/promise.js",yJ,i=>(n(i),i),()=>{}),new Af.InstrumentationNodeModuleFile("mysql2/lib/connection.js",yJ,i=>{let s=(0,qv.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,qv.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,c){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:f,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,qv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,qv.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Af.SemconvStability.OLD&&(S[_J.ATTR_DB_SYSTEM]=_J.DB_SYSTEM_VALUE_MYSQL,S[_J.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&Af.SemconvStability.STABLE&&(S[EJ.ATTR_DB_SYSTEM_NAME]=EJ.DB_SYSTEM_NAME_VALUE_MYSQL,S[EJ.ATTR_DB_QUERY_TEXT]=b);let v=o.tracer.startSpan((0,qv.getSpanName)(i),{kind:KNe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,JNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,JNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,qv.once)((D,k)=>{D?v.setStatus({code:KNe.SpanStatusCode.ERROR,message:D.message}):typeof y=="function"&&(0,Af.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let D=r.apply(this,arguments);return D.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),D}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};D4.MySQL2Instrumentation=SJ});var XNe=F(B4=>{"use strict";A();Object.defineProperty(B4,"__esModule",{value:!0});B4.MySQL2Instrumentation=void 0;var GTt=WNe();Object.defineProperty(B4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return GTt.MySQL2Instrumentation}})});var eOe,tOe,nOe,zTt,rOe,oOe=O(()=>{A();eOe=se(XNe(),1);gr();tOe="Mysql2",nOe=at(tOe,()=>new eOe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),zTt=(()=>({name:tOe,setupOnce(){nOe()}})),rOe=zTt});var iOe=F(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var sOe=F(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.endSpan=void 0;var jTt=(ze(),Me(We)),HTt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:jTt.SpanStatusCode.ERROR,message:t.message})),e.end()};N4.endSpan=HTt});var w4=F(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.defaultDbStatementSerializer=void 0;var $Tt=[{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}],qTt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=$Tt.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};O4.defaultDbStatementSerializer=qTt});var aOe=F(Vv=>{"use strict";A();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.62.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var dOe=F(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.IORedisInstrumentation=void 0;var rE=(ze(),Me(We)),jc=on(),oE=(Zn(),Me(Fr)),Hc=iOe(),uOe=on(),pO=sOe(),VTt=w4(),cOe=aOe(),lOe={requireParentSpan:!0},TJ=class extends jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(cOe.PACKAGE_NAME,cOe.PACKAGE_VERSION,{...lOe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...lOe,...t})}init(){return[new jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,jc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),s=i.dbStatementSerializer||VTt.defaultDbStatementSerializer,c=rE.trace.getSpan(rE.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&jc.SemconvStability.OLD&&(l[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,l[Hc.ATTR_DB_STATEMENT]=y,l[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&jc.SemconvStability.STABLE&&(l[oE.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,l[oE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&jc.SemconvStability.OLD&&(l[Hc.ATTR_NET_PEER_NAME]=f,l[Hc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&jc.SemconvStability.STABLE&&(l[oE.ATTR_SERVER_ADDRESS]=f,l[oE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:rE.SpanKind.CLIENT,attributes:l}),{requestHook:b}=i;b&&(0,uOe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&rE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,uOe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,k),Q=>{Q&&rE.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,pO.endSpan)(S,null),x(k)};let D=o.reject;return o.reject=function(k){(0,pO.endSpan)(S,k),D(k)},v}catch(v){throw(0,pO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=rE.trace.getSpan(rE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,o[Hc.ATTR_DB_STATEMENT]="connect",o[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&jc.SemconvStability.STABLE&&(o[oE.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,o[oE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_NET_PEER_NAME]=i,o[Hc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&jc.SemconvStability.STABLE&&(o[oE.ATTR_SERVER_ADDRESS]=i,o[oE.ATTR_SERVER_PORT]=s);let c=n.tracer.startSpan("connect",{kind:rE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,pO.endSpan)(c,null),l}catch(l){throw(0,pO.endSpan)(c,l),l}}}};k4.IORedisInstrumentation=TJ});var pOe=F(P4=>{"use strict";A();Object.defineProperty(P4,"__esModule",{value:!0});P4.IORedisInstrumentation=void 0;var YTt=dOe();Object.defineProperty(P4,"IORedisInstrumentation",{enumerable:!0,get:function(){return YTt.IORedisInstrumentation}})});var M4=F(Yv=>{"use strict";A();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var fOe=F(iE=>{"use strict";A();Object.defineProperty(iE,"__esModule",{value:!0});iE.getTracedCreateStreamTrace=iE.getTracedCreateClient=iE.endSpan=void 0;var fO=(ze(),Me(We)),KTt=(e,t)=>{t&&e.setStatus({code:fO.SpanStatusCode.ERROR,message:t.message}),e.end()};iE.endSpan=KTt;var JTt=e=>function(){let n=e.apply(this,arguments);return fO.context.bind(fO.context.active(),n)};iE.getTracedCreateClient=JTt;var ZTt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){fO.context.bind(fO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};iE.getTracedCreateStreamTrace=ZTt});var L4=F(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var AOe=F(Q4=>{"use strict";A();Object.defineProperty(Q4,"__esModule",{value:!0});Q4.RedisInstrumentationV2_V3=void 0;var jl=on(),U4=fOe(),mOe=M4(),mO=(ze(),Me(We)),AO=(Zn(),Me(Fr)),CS=L4(),WTt=w4(),IJ=class e extends jl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(mOe.PACKAGE_NAME,mOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,jl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,jl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new jl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,jl.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,jl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,jl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),c=mO.trace.getSpan(mO.context.active())===void 0;if(s.requireParentSpan===!0&&c)return r.apply(this,arguments);let l=s?.dbStatementSerializer||WTt.defaultDbStatementSerializer,f={};t._semconvStability&jl.SemconvStability.OLD&&Object.assign(f,{[CS.ATTR_DB_SYSTEM]:CS.DB_SYSTEM_VALUE_REDIS,[CS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&jl.SemconvStability.STABLE&&Object.assign(f,{[AO.ATTR_DB_SYSTEM_NAME]:CS.DB_SYSTEM_NAME_VALUE_REDIS,[AO.ATTR_DB_OPERATION_NAME]:i.command,[AO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:mO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let S={};t._semconvStability&jl.SemconvStability.OLD&&Object.assign(S,{[CS.ATTR_NET_PEER_NAME]:this.connection_options.host,[CS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&jl.SemconvStability.STABLE&&Object.assign(S,{[AO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[AO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&jl.SemconvStability.OLD&&h.setAttribute(CS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=mO.context.active();arguments[0].callback=function(v,x){if(s?.responseHook){let D=s.responseHook;(0,jl.safeExecuteInTheMiddle)(()=>{D(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,U4.endSpan)(h,v),mO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,U4.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,U4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,U4.getTracedCreateStreamTrace)(n)}}};Q4.RedisInstrumentationV2_V3=IJ});var hOe=F(F4=>{"use strict";A();Object.defineProperty(F4,"__esModule",{value:!0});F4.getClientAttributes=void 0;var bJ=(Zn(),Me(Fr)),Kv=L4(),gOe=on();function XTt(e,t,n){let r={};return n&gOe.SemconvStability.OLD&&Object.assign(r,{[Kv.ATTR_DB_SYSTEM]:Kv.DB_SYSTEM_VALUE_REDIS,[Kv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Kv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Kv.ATTR_DB_CONNECTION_STRING]:eIt(e,t?.url)}),n&gOe.SemconvStability.STABLE&&Object.assign(r,{[bJ.ATTR_DB_SYSTEM_NAME]:Kv.DB_SYSTEM_NAME_VALUE_REDIS,[bJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[bJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}F4.getClientAttributes=XTt;function eIt(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 SOe=F(G4=>{"use strict";A();Object.defineProperty(G4,"__esModule",{value:!0});G4.RedisInstrumentationV4_V5=void 0;var Wd=(ze(),Me(We)),Io=on(),_Oe=hOe(),tIt=w4(),EOe=M4(),CJ=(Zn(),Me(Fr)),nIt=L4(),gO=Symbol("opentelemetry.instrumentation.redis.open_spans"),yOe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),vJ=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(EOe.PACKAGE_NAME,EOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(c)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=s.executor;return s.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(c=>{let l=this[gO];return n._endSpansWithRedisReplies(l,c,t),c}).catch(c=>{let l=this[gO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=c.constructor.name==="MultiErrorReply"?c.replies:new Array(l.length).fill(c);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[yOe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,s=(0,_Oe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Wd.SpanKind.CLIENT,attributes:s});return Wd.context.with(Wd.trace.setSpan(Wd.context.active(),c),()=>r.apply(this)).then(f=>(c.end(),f)).catch(f=>(c.recordException(f),c.setStatus({code:Wd.SpanStatusCode.ERROR,message:f.message}),c.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(Wd.trace.getSpan(Wd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[yOe],c=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||tIt.defaultDbStatementSerializer,h=(0,_Oe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[CJ.ATTR_DB_OPERATION_NAME]=c);try{let b=f(c,l);b!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[nIt.ATTR_DB_STATEMENT]=b),this._semconvStability&Io.SemconvStability.STABLE&&(h[CJ.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:Wd.SpanKind.CLIENT,attributes:h}),S=Wd.context.with(Wd.trace.setSpan(Wd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,l,b,void 0)},b=>{this._endSpanWithResponse(y,c,l,null,b)});else{let b=S;b[gO]=b[gO]||[],b[gO].push({span:y,commandName:c,commandArgs:l})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),s=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:l,commandArgs:f}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(CJ.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[c],f,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Wd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};G4.RedisInstrumentationV4_V5=vJ});var bOe=F(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.RedisInstrumentation=void 0;var rIt=on(),TOe=M4(),oIt=AOe(),iIt=SOe(),IOe={requireParentSpan:!1},RJ=class extends rIt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...IOe,...t};super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new oIt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new iIt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...IOe,...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())}};z4.RedisInstrumentation=RJ});var COe=F(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.RedisInstrumentation=void 0;var sIt=bOe();Object.defineProperty(j4,"RedisInstrumentation",{enumerable:!0,get:function(){return sIt.RedisInstrumentation}})});function hO(e,t){return e.includes(t.toLowerCase())}function DJ(e){return hO(xJ,e)?"cache.get":hO(uIt,e)?"cache.put":void 0}function cIt(e,t){return t.some(n=>e.startsWith(n))}function ROe(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)?vOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return hO(aIt,e)&&r!=null?n(r):vOe(t.map(o=>n(o)))}catch{return}}function xOe(e,t,n){if(!DJ(e))return!1;for(let r of t)if(cIt(r,n))return!0;return!1}function DOe(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 vOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var aIt,xJ,uIt,BOe=O(()=>{A();aIt=["get","set","setex"],xJ=["get","mget"],uIt=["set","setex"]});var NOe,OOe,H4,_O,wOe,lIt,dIt,kOe,pIt,POe,MOe=O(()=>{A();NOe=se(pOe(),1),OOe=se(COe(),1);dt();gr();BOe();H4="Redis",_O={},wOe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=ROe(t,n),i=DJ(t);if(!o||!i||!_O.cachePrefixes||!xOe(t,o,_O.cachePrefixes))return;let s=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":c});let l=DOe(r);l&&e.setAttribute(wq,l),hO(xJ,t)&&l!==void 0&&e.setAttribute(Nq,l>0),e.setAttributes({[Xt]:i,[Oq]:o});let f=o.join(", ");e.updateName(_O.maxCacheKeyLength?y_(f,_O.maxCacheKeyLength):f)},lIt=at(`${H4}.IORedis`,()=>new NOe.IORedisInstrumentation({responseHook:wOe})),dIt=at(`${H4}.Redis`,()=>new OOe.RedisInstrumentation({responseHook:wOe})),kOe=Object.assign(()=>{lIt(),dIt()},{id:H4}),pIt=((e={})=>({name:H4,setupOnce(){_O=e,kOe()}})),POe=pIt});var LOe=F($4=>{"use strict";A();Object.defineProperty($4,"__esModule",{value:!0});$4.EVENT_LISTENERS_SET=void 0;$4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var BJ=F(EO=>{"use strict";A();Object.defineProperty(EO,"__esModule",{value:!0});EO.AttributeNames=void 0;var fIt;(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"})(fIt=EO.AttributeNames||(EO.AttributeNames={}))});var NJ=F(Br=>{"use strict";A();Object.defineProperty(Br,"__esModule",{value:!0});Br.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Br.METRIC_DB_CLIENT_CONNECTION_COUNT=Br.DB_SYSTEM_VALUE_POSTGRESQL=Br.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Br.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Br.ATTR_NET_PEER_PORT=Br.ATTR_NET_PEER_NAME=Br.ATTR_DB_USER=Br.ATTR_DB_SYSTEM=Br.ATTR_DB_STATEMENT=Br.ATTR_DB_NAME=Br.ATTR_DB_CONNECTION_STRING=Br.ATTR_DB_CLIENT_CONNECTION_STATE=Br.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Br.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Br.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Br.ATTR_DB_CONNECTION_STRING="db.connection_string";Br.ATTR_DB_NAME="db.name";Br.ATTR_DB_STATEMENT="db.statement";Br.ATTR_DB_SYSTEM="db.system";Br.ATTR_DB_USER="db.user";Br.ATTR_NET_PEER_NAME="net.peer.name";Br.ATTR_NET_PEER_PORT="net.peer.port";Br.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Br.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Br.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Br.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Br.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var OJ=F(yO=>{"use strict";A();Object.defineProperty(yO,"__esModule",{value:!0});yO.SpanNames=void 0;var mIt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(mIt=yO.SpanNames||(yO.SpanNames={}))});var HOe=F(ir=>{"use strict";A();Object.defineProperty(ir,"__esModule",{value:!0});ir.sanitizedErrorMessage=ir.isObjectWithTextString=ir.getErrorMessage=ir.patchClientConnectCallback=ir.patchCallbackPGPool=ir.updateCounter=ir.getPoolName=ir.patchCallback=ir.handleExecutionResult=ir.handleConfigQuery=ir.shouldSkipInstrumentation=ir.getSemanticAttributesFromPoolConnection=ir.getSemanticAttributesFromConnection=ir.getConnectionString=ir.parseAndMaskConnectionString=ir.parseNormalizedOperationName=ir.getQuerySpanName=void 0;var sE=(ze(),Me(We)),q4=BJ(),Xd=(Zn(),Me(Fr)),Ai=NJ(),vS=on(),UOe=OJ();function QOe(e,t){if(!t)return UOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:FOe(t.text);return`${UOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ir.getQuerySpanName=QOe;function FOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}ir.parseNormalizedOperationName=FOe;function GOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ir.parseAndMaskConnectionString=GOe;function wJ(e){if("connectionString"in e&&e.connectionString)return GOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ir.getConnectionString=wJ;function V4(e){if(Number.isInteger(e))return e}function zOe(e,t){let n={};return t&vS.SemconvStability.OLD&&(n={...n,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:e.database,[Ai.ATTR_DB_CONNECTION_STRING]:wJ(e),[Ai.ATTR_DB_USER]:e.user,[Ai.ATTR_NET_PEER_NAME]:e.host,[Ai.ATTR_NET_PEER_PORT]:V4(e.port)}),t&vS.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]:V4(e.port)}),n}ir.getSemanticAttributesFromConnection=zOe;function AIt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[q4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[q4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&vS.SemconvStability.OLD&&(r={...r,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ai.ATTR_DB_CONNECTION_STRING]:wJ(e),[Ai.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ai.ATTR_NET_PEER_PORT]:Number(n?.port)||V4(e.port),[Ai.ATTR_DB_USER]:n?.username??e.user}),t&vS.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)||V4(e.port)}),r}ir.getSemanticAttributesFromPoolConnection=AIt;function gIt(e){return e.requireParentSpan===!0&&sE.trace.getSpan(sE.context.active())===void 0}ir.shouldSkipInstrumentation=gIt;function hIt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=QOe(i,r),c=e.startSpan(s,{kind:sE.SpanKind.CLIENT,attributes:zOe(o,n)});if(!r)return c;if(r.text&&(n&vS.SemconvStability.OLD&&c.setAttribute(Ai.ATTR_DB_STATEMENT,r.text),n&vS.SemconvStability.STABLE&&c.setAttribute(Xd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());c.setAttribute(q4.AttributeNames.PG_VALUES,l)}catch(l){sE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&c.setAttribute(q4.AttributeNames.PG_PLAN,r.name),c}ir.handleConfigQuery=hIt;function jOe(e,t,n){typeof e.responseHook=="function"&&(0,vS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&sE.diag.error("Error running response hook",r)},!0)}ir.handleExecutionResult=jOe;function _It(e,t,n,r,o){return function(s,c){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[Xd.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(Y4(s)),t.setStatus({code:sE.SpanStatusCode.ERROR,message:s.message})):jOe(e,t,c),o(),t.end(),n.call(this,s,c)}}ir.patchCallback=_It;function EIt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}ir.getPoolName=EIt;function yIt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,c=t.idleCount,l=i-c;return n.add(l-o.used,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:c,pending:s}}ir.updateCounter=yIt;function SIt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(Y4(r)),e.setStatus({code:sE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ir.patchCallbackPGPool=SIt;function TIt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(Y4(r)),e.setStatus({code:sE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ir.patchClientConnectCallback=TIt;function IIt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ir.getErrorMessage=IIt;function bIt(e){return typeof e=="object"&&typeof e?.text=="string"}ir.isObjectWithTextString=bIt;function Y4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ir.sanitizedErrorMessage=Y4});var $Oe=F(Jv=>{"use strict";A();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.PACKAGE_NAME=Jv.PACKAGE_VERSION=void 0;Jv.PACKAGE_VERSION="0.66.0";Jv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var ZOe=F(J4=>{"use strict";A();Object.defineProperty(J4,"__esModule",{value:!0});J4.PgInstrumentation=void 0;var qu=on(),Hr=(ze(),Me(We)),qOe=LOe(),Wo=HOe(),VOe=gJ(),YOe=$Oe(),KOe=OJ(),K4=br(),gf=(Zn(),Me(Fr)),SO=NJ();function Zv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var kJ=class extends qu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(YOe.PACKAGE_NAME,YOe.PACKAGE_VERSION,t),this._semconvStability=(0,qu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(gf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Hr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(SO.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(SO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new qu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new qu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new qu.InstrumentationNodeModuleDefinition("pg",t,c=>{let l=Zv(c);return this._patchPgClient(l.Client),c},c=>{let l=Zv(c);return this._unpatchPgClient(l.Client),c},[o,r]),s=new qu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let l=Zv(c);return(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},c=>{let l=Zv(c);(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=Zv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=Zv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(KOe.SpanNames.CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchClientConnectCallback(s,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),s),()=>n.call(this,o));return JOe(s,c)}}recordOperationDuration(t,n){let r={},o=[gf.ATTR_DB_NAMESPACE,gf.ATTR_ERROR_TYPE,gf.ATTR_SERVER_PORT,gf.ATTR_SERVER_ADDRESS,gf.ATTR_DB_OPERATION_NAME];this._semconvStability&qu.SemconvStability.OLD&&o.push(SO.ATTR_DB_SYSTEM),this._semconvStability&qu.SemconvStability.STABLE&&o.push(gf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,K4.hrTimeToMilliseconds)((0,K4.hrTimeDuration)(n,(0,K4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Wo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,K4.hrTime)(),s=o[0],c=typeof s=="string",l=Wo.isObjectWithTextString(s),f=c?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[SO.ATTR_DB_SYSTEM]:SO.DB_SYSTEM_VALUE_POSTGRESQL,[gf.ATTR_DB_NAMESPACE]:this.database,[gf.ATTR_SERVER_PORT]:this.connectionParameters.port,[gf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[gf.ATTR_DB_OPERATION_NAME]=Wo.parseNormalizedOperationName(f?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Wo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,f);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,VOe.addSqlCommenterComment)(b,s):l&&!("name"in s)&&(o[0]={...s,text:(0,VOe.addSqlCommenterComment)(b,s.text)})),o.length>0){let D=Hr.trace.getSpan(Hr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Wo.patchCallback(S,b,o[o.length-1],h,y),D&&(o[o.length-1]=Hr.context.bind(Hr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let k=Wo.patchCallback(t.getConfig(),b,f.callback,h,y);D&&(k=Hr.context.bind(Hr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=S;typeof v=="function"&&f&&(0,qu.safeExecuteInTheMiddle)(()=>{let{database:D,host:k,port:Q,user:z}=this.connectionParameters;v(b,{connection:{database:D,host:k,port:Q,user:z},query:{text:f.text,values:f.values,name:f.name}})},D=>{D&&t._diag.error("Error running query hook",D)},!0);let x;try{x=n.apply(this,o)}catch(D){throw D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(D)}),b.end(),D}return x instanceof Promise?x.then(D=>new Promise(k=>{Wo.handleExecutionResult(t.getConfig(),b,D),y(),b.end(),k(D)})).catch(D=>new Promise((k,Q)=>{D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:D.message}),y(),b.end(),Q(D)})):x})}_setPoolConnectEventListeners(t){if(t[qOe.EVENT_LISTENERS_SET])return;let n=Wo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[qOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(KOe.SpanNames.POOL_CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchCallbackPGPool(s,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),s),()=>n.call(this,o));return JOe(s,c)}}};J4.PgInstrumentation=kJ;function JOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Hr.context.bind(Hr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Wo.sanitizedErrorMessage(r)),e.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var WOe=F(Wv=>{"use strict";A();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.AttributeNames=Wv.PgInstrumentation=void 0;var CIt=ZOe();Object.defineProperty(Wv,"PgInstrumentation",{enumerable:!0,get:function(){return CIt.PgInstrumentation}});var vIt=BJ();Object.defineProperty(Wv,"AttributeNames",{enumerable:!0,get:function(){return vIt.AttributeNames}})});var XOe,ewe,twe,RIt,nwe,rwe=O(()=>{A();XOe=se(WOe(),1);gr();ewe="Postgres",twe=at(ewe,XOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),RIt=(e=>({name:ewe,setupOnce(){twe(e)}})),nwe=RIt});var aE,MJ,owe,xIt,DIt,iwe,PJ,BIt,swe,awe=O(()=>{A();ze();aE=se(on(),1);Zn();dt();gr();gS();MJ="PostgresJs",owe=[">=3.0.0 <4"],xIt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,DIt=Symbol.for("sentry.query.from.instrumented.sql"),iwe=at(MJ,e=>new PJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),PJ=class extends aE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new aE.InstrumentationNodeModuleDefinition("postgres",owe,n=>{try{return this._patchPostgres(n)}catch(r){return bs&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new aE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,owe,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 bs&&J.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let c=Reflect.construct(r,s);if(!c||typeof c!="function")return bs&&J.warn("postgres() did not return a valid instance"),c;let l=o.getConfig();return PV(c,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(i,s,c)}return n?i:(gN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return $t.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(oC,r);return}let o=n?.match(xIt);o?.[1]&&t.setAttribute(oC,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[DIt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return Ws({name:s||"postgresjs.query",op:"db"},c=>{zr(c,"auto.db.postgresjs"),c.setAttributes({[Py]:"postgres",[V9]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,aE.safeExecuteInTheMiddle)(()=>f(c,s,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),bs&&J.error(`Error in requestHook for ${MJ} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,v)=>{try{n._setOperationName(c,s,v?.[0]?.command),c.end()}catch(x){bs&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(S,b,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(Y9,v?.[0]?.code||"unknown"),c.setAttribute(K9,v?.[0]?.name||"unknown"),n._setOperationName(c,s),c.end()}catch(x){bs&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(S,b,v)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},BIt=(e=>({name:MJ,setupOnce(){iwe(e)}})),swe=BIt});var uwe=F(TO=>{"use strict";A();Object.defineProperty(TO,"__esModule",{value:!0});TO.SeverityNumber=void 0;var NIt;(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"})(NIt=TO.SeverityNumber||(TO.SeverityNumber={}))});var W4=F(Xv=>{"use strict";A();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.NOOP_LOGGER=Xv.NoopLogger=void 0;var Z4=class{emit(t){}};Xv.NoopLogger=Z4;Xv.NOOP_LOGGER=new Z4});var e3=F(eR=>{"use strict";A();Object.defineProperty(eR,"__esModule",{value:!0});eR.NOOP_LOGGER_PROVIDER=eR.NoopLoggerProvider=void 0;var OIt=W4(),X4=class{getLogger(t,n,r){return new OIt.NoopLogger}};eR.NoopLoggerProvider=X4;eR.NOOP_LOGGER_PROVIDER=new X4});var UJ=F(t3=>{"use strict";A();Object.defineProperty(t3,"__esModule",{value:!0});t3.ProxyLogger=void 0;var wIt=W4(),LJ=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):wIt.NOOP_LOGGER}};t3.ProxyLogger=LJ});var FJ=F(n3=>{"use strict";A();Object.defineProperty(n3,"__esModule",{value:!0});n3.ProxyLoggerProvider=void 0;var kIt=e3(),PIt=UJ(),QJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new PIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:kIt.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)}};n3.ProxyLoggerProvider=QJ});var cwe=F(r3=>{"use strict";A();Object.defineProperty(r3,"__esModule",{value:!0});r3._globalThis=void 0;r3._globalThis=typeof globalThis=="object"?globalThis:global});var lwe=F(o3=>{"use strict";A();Object.defineProperty(o3,"__esModule",{value:!0});o3._globalThis=void 0;var MIt=cwe();Object.defineProperty(o3,"_globalThis",{enumerable:!0,get:function(){return MIt._globalThis}})});var dwe=F(i3=>{"use strict";A();Object.defineProperty(i3,"__esModule",{value:!0});i3._globalThis=void 0;var LIt=lwe();Object.defineProperty(i3,"_globalThis",{enumerable:!0,get:function(){return LIt._globalThis}})});var pwe=F(Hm=>{"use strict";A();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.API_BACKWARDS_COMPATIBILITY_VERSION=Hm.makeGetter=Hm._global=Hm.GLOBAL_LOGS_API_KEY=void 0;var UIt=dwe();Hm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Hm._global=UIt._globalThis;function QIt(e,t,n){return r=>r===e?t:n}Hm.makeGetter=QIt;Hm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var mwe=F(s3=>{"use strict";A();Object.defineProperty(s3,"__esModule",{value:!0});s3.LogsAPI=void 0;var ep=pwe(),FIt=e3(),fwe=FJ(),GJ=class e{constructor(){this._proxyLoggerProvider=new fwe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return ep._global[ep.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(ep._global[ep.GLOBAL_LOGS_API_KEY]=(0,ep.makeGetter)(ep.API_BACKWARDS_COMPATIBILITY_VERSION,t,FIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=ep._global[ep.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(ep._global,ep.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete ep._global[ep.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new fwe.ProxyLoggerProvider}};s3.LogsAPI=GJ});var zJ=F(ra=>{"use strict";A();Object.defineProperty(ra,"__esModule",{value:!0});ra.logs=ra.ProxyLoggerProvider=ra.ProxyLogger=ra.NoopLoggerProvider=ra.NOOP_LOGGER_PROVIDER=ra.NoopLogger=ra.NOOP_LOGGER=ra.SeverityNumber=void 0;var GIt=uwe();Object.defineProperty(ra,"SeverityNumber",{enumerable:!0,get:function(){return GIt.SeverityNumber}});var Awe=W4();Object.defineProperty(ra,"NOOP_LOGGER",{enumerable:!0,get:function(){return Awe.NOOP_LOGGER}});Object.defineProperty(ra,"NoopLogger",{enumerable:!0,get:function(){return Awe.NoopLogger}});var gwe=e3();Object.defineProperty(ra,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return gwe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ra,"NoopLoggerProvider",{enumerable:!0,get:function(){return gwe.NoopLoggerProvider}});var zIt=UJ();Object.defineProperty(ra,"ProxyLogger",{enumerable:!0,get:function(){return zIt.ProxyLogger}});var jIt=FJ();Object.defineProperty(ra,"ProxyLoggerProvider",{enumerable:!0,get:function(){return jIt.ProxyLoggerProvider}});var HIt=mwe();ra.logs=HIt.LogsAPI.getInstance()});var hwe=F(tR=>{"use strict";A();Object.defineProperty(tR,"__esModule",{value:!0});tR.disableInstrumentations=tR.enableInstrumentations=void 0;function $It(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}tR.enableInstrumentations=$It;function qIt(e){e.forEach(t=>t.disable())}tR.disableInstrumentations=qIt});var ywe=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3.registerInstrumentations=void 0;var _we=(ze(),Me(We)),VIt=zJ(),Ewe=hwe();function YIt(e){let t=e.tracerProvider||_we.trace.getTracerProvider(),n=e.meterProvider||_we.metrics.getMeterProvider(),r=e.loggerProvider||VIt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Ewe.enableInstrumentations)(o,t,n,r),()=>{(0,Ewe.disableInstrumentations)(o)}}a3.registerInstrumentations=YIt});var Dwe=F(u3=>{"use strict";A();Object.defineProperty(u3,"__esModule",{value:!0});u3.satisfies=void 0;var qJ=(ze(),Me(We)),Cwe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,KIt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,JIt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function ZIt(e,t,n){if(!WIt(e))return qJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=nbt(e);if(!r)return!1;let o=[],i=vwe(r,t,o,n);return i&&!n?.includePrerelease?ebt(r,o):i}u3.satisfies=ZIt;function WIt(e){return typeof e=="string"&&Cwe.test(e)}function vwe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(jJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Ibt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!jJ(e,i,n,r))return!1;return!0}return jJ(e,t,n,r)}function jJ(e,t,n,r){if(t=tbt(t,r),t.includes(" "))return vwe(e,t,n,r);{let o=rbt(t);return n.push(o),XIt(e,o)}}function XIt(e,t){if(t.invalid)return!1;if(!t.version||$J(t.version))return!0;let n=Twe(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=Twe(r,o)}return JIt[t.op]?.includes(n)}function ebt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function tbt(e,t){return e=e.trim(),e=Sbt(e,t),e=ybt(e),e=Tbt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function nbt(e){let t=e.match(Cwe);if(!t){qJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function rbt(e){if(!e)return{};let t=e.match(KIt);if(!t)return qJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function $J(e){return e==="*"||e==="x"||e==="X"}function Swe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function obt(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 ibt(e,t){if($J(e)||$J(t))return 0;let[n,r]=obt(Swe(e),Swe(t));return n>r?1:n<r?-1:0}function Twe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=ibt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Rwe="[a-zA-Z0-9-]",xwe="0|[1-9]\\d*",sbt=`\\d*[a-zA-Z-]${Rwe}*`,abt="((?:<|>)?=?)",Iwe=`(?:${xwe}|${sbt})`,ubt=`(?:-(${Iwe}(?:\\.${Iwe})*))`,bwe=`${Rwe}+`,cbt=`(?:\\+(${bwe}(?:\\.${bwe})*))`,HJ=`${xwe}|x|X|\\*`,IO=`[v=\\s]*(${HJ})(?:\\.(${HJ})(?:\\.(${HJ})(?:${ubt})?${cbt}?)?)?`,lbt=`^${abt}\\s*${IO}$`,dbt=new RegExp(lbt),pbt=`^\\s*(${IO})\\s+-\\s+(${IO})\\s*$`,fbt=new RegExp(pbt),mbt="(?:~>?)",Abt=`^${mbt}${IO}$`,gbt=new RegExp(Abt),hbt="(?:\\^)",_bt=`^${hbt}${IO}$`,Ebt=new RegExp(_bt);function ybt(e){let t=gbt;return e.replace(t,(n,r,o,i,s)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?c=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Sbt(e,t){let n=Ebt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,c,l)=>{let f;return Vu(i)?f="":Vu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(c)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${c}-${l} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${c}${r} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c} <${+i+1}.0.0-0`,f})}function Tbt(e,t){let n=dbt;return e.replace(n,(r,o,i,s,c,l)=>{let f=Vu(i),h=f||Vu(s),y=h||Vu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),c=0,o===">"?(o=">=",h?(i=+i+1,s=0,c=0):(s=+s+1,c=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Ibt(e,t){let n=fbt;return e.replace(n,(r,o,i,s,c,l,f,h,y,S,b,v)=>(Vu(i)?o="":Vu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(y)?h="":Vu(S)?h=`<${+y+1}.0.0-0`:Vu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var VJ=F(wa=>{"use strict";A();Object.defineProperty(wa,"__esModule",{value:!0});wa.massUnwrap=wa.unwrap=wa.massWrap=wa.wrap=void 0;var Yu=console.error.bind(console);function bO(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 bbt=(e,t,n)=>{if(!e||!e[t]){Yu("no original function "+String(t)+" to wrap");return}if(!n){Yu("no wrapper function"),Yu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Yu("original object and wrapper must be functions");return}let o=n(r,t);return bO(o,"__original",r),bO(o,"__unwrap",()=>{e[t]===o&&bO(e,t,r)}),bO(o,"__wrapped",!0),bO(e,t,o),o};wa.wrap=bbt;var Cbt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,wa.wrap)(r,o,n)})})};wa.massWrap=Cbt;var vbt=(e,t)=>{if(!e||!e[t]){Yu("no function to unwrap."),Yu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Yu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};wa.unwrap=vbt;var Rbt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,wa.unwrap)(n,r)})})};wa.massUnwrap=Rbt;function CO(e){e&&e.logger&&(typeof e.logger!="function"?Yu("new logger isn't a function, not replacing"):Yu=e.logger)}wa.default=CO;CO.wrap=wa.wrap;CO.massWrap=wa.massWrap;CO.unwrap=wa.unwrap;CO.massUnwrap=wa.massUnwrap});var Bwe=F(l3=>{"use strict";A();Object.defineProperty(l3,"__esModule",{value:!0});l3.InstrumentationAbstract=void 0;var YJ=(ze(),Me(We)),xbt=zJ(),c3=VJ(),KJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=YJ.diag.createComponentLogger({namespace:t}),this._tracer=YJ.trace.getTracer(t,n),this._meter=YJ.metrics.getMeter(t,n),this._logger=xbt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=c3.wrap;_unwrap=c3.unwrap;_massWrap=c3.massWrap;_massUnwrap=c3.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)}}};l3.InstrumentationAbstract=KJ});var Nwe=F(uE=>{"use strict";A();Object.defineProperty(uE,"__esModule",{value:!0});uE.ModuleNameTrie=uE.ModuleNameSeparator=void 0;uE.ModuleNameSeparator="/";var d3=class{hooks=[];children=new Map},JJ=class{_trie=new d3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(uE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new d3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let c of t.split(uE.ModuleNameSeparator)){let l=o.children.get(c);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};uE.ModuleNameTrie=JJ});var wwe=F(p3=>{"use strict";A();Object.defineProperty(p3,"__esModule",{value:!0});p3.RequireInTheMiddleSingleton=void 0;var Dbt=Gy(),Owe=Fe("path"),ZJ=Nwe(),Bbt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),WJ=class e{_moduleNameTrie=new ZJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Dbt.Hook(null,{internals:!0},(t,n,r)=>{let o=Nbt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return Bbt?new e:this._instance=this._instance??new e}};p3.RequireInTheMiddleSingleton=WJ;function Nbt(e){return Owe.sep!==ZJ.ModuleNameSeparator?e.split(Owe.sep).join(ZJ.ModuleNameSeparator):e}});var XJ=F(cE=>{"use strict";A();Object.defineProperty(cE,"__esModule",{value:!0});cE.isWrapped=cE.safeExecuteInTheMiddleAsync=cE.safeExecuteInTheMiddle=void 0;function Obt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}cE.safeExecuteInTheMiddle=Obt;async function wbt(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}}cE.safeExecuteInTheMiddleAsync=wbt;function kbt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}cE.isWrapped=kbt});var Mwe=F(f3=>{"use strict";A();Object.defineProperty(f3,"__esModule",{value:!0});f3.InstrumentationBase=void 0;var vO=Fe("path"),kwe=Fe("util"),Pbt=Dwe(),eZ=VJ(),Mbt=Bwe(),Lbt=wwe(),Ubt=kK(),RO=(ze(),Me(We)),Qbt=Gy(),Fbt=Fe("fs"),Gbt=XJ(),tZ=class extends Mbt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Lbt.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,Gbt.isWrapped)(t[n])&&this._unwrap(t,n),kwe.types.isProxy(t)){let o=(0,eZ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,eZ.wrap)(t,n,r)};_unwrap=(t,n)=>kwe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,eZ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,Fbt.readFileSync)(vO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{RO.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 Pwe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],c=vO.normalize(r);return s.filter(f=>f.name===c).filter(f=>Pwe(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,c,l)=>{if(!l&&vO.isAbsolute(c)){let f=vO.parse(c);c=f.name,l=f.dir}return this._onRequire(t,s,c,l)},r=(s,c,l)=>this._onRequire(t,s,c,l),o=vO.isAbsolute(t.name)?new Qbt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Ubt.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}};f3.InstrumentationBase=tZ;function Pwe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Pbt.satisfies)(t,r,{includePrerelease:n}))}});var Lwe=F(m3=>{"use strict";A();Object.defineProperty(m3,"__esModule",{value:!0});m3.normalize=void 0;var zbt=Fe("path");Object.defineProperty(m3,"normalize",{enumerable:!0,get:function(){return zbt.normalize}})});var Uwe=F(nR=>{"use strict";A();Object.defineProperty(nR,"__esModule",{value:!0});nR.normalize=nR.InstrumentationBase=void 0;var jbt=Mwe();Object.defineProperty(nR,"InstrumentationBase",{enumerable:!0,get:function(){return jbt.InstrumentationBase}});var Hbt=Lwe();Object.defineProperty(nR,"normalize",{enumerable:!0,get:function(){return Hbt.normalize}})});var nZ=F(rR=>{"use strict";A();Object.defineProperty(rR,"__esModule",{value:!0});rR.normalize=rR.InstrumentationBase=void 0;var Qwe=Uwe();Object.defineProperty(rR,"InstrumentationBase",{enumerable:!0,get:function(){return Qwe.InstrumentationBase}});Object.defineProperty(rR,"normalize",{enumerable:!0,get:function(){return Qwe.normalize}})});var Fwe=F(A3=>{"use strict";A();Object.defineProperty(A3,"__esModule",{value:!0});A3.InstrumentationNodeModuleDefinition=void 0;var rZ=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||[]}};A3.InstrumentationNodeModuleDefinition=rZ});var Gwe=F(g3=>{"use strict";A();Object.defineProperty(g3,"__esModule",{value:!0});g3.InstrumentationNodeModuleFile=void 0;var $bt=nZ(),oZ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,$bt.normalize)(t)}};g3.InstrumentationNodeModuleFile=oZ});var zwe=F(RS=>{"use strict";A();Object.defineProperty(RS,"__esModule",{value:!0});RS.semconvStabilityFromStr=RS.SemconvStability=void 0;var h3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(h3=RS.SemconvStability||(RS.SemconvStability={}));function qbt(e,t){let n=h3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=h3.DUPLICATE;break}else o.toLowerCase()===e&&(n=h3.STABLE);return n}RS.semconvStabilityFromStr=qbt});var Hwe=F(ss=>{"use strict";A();Object.defineProperty(ss,"__esModule",{value:!0});ss.semconvStabilityFromStr=ss.SemconvStability=ss.safeExecuteInTheMiddleAsync=ss.safeExecuteInTheMiddle=ss.isWrapped=ss.InstrumentationNodeModuleFile=ss.InstrumentationNodeModuleDefinition=ss.InstrumentationBase=ss.registerInstrumentations=void 0;var Vbt=ywe();Object.defineProperty(ss,"registerInstrumentations",{enumerable:!0,get:function(){return Vbt.registerInstrumentations}});var Ybt=nZ();Object.defineProperty(ss,"InstrumentationBase",{enumerable:!0,get:function(){return Ybt.InstrumentationBase}});var Kbt=Fwe();Object.defineProperty(ss,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Kbt.InstrumentationNodeModuleDefinition}});var Jbt=Gwe();Object.defineProperty(ss,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Jbt.InstrumentationNodeModuleFile}});var iZ=XJ();Object.defineProperty(ss,"isWrapped",{enumerable:!0,get:function(){return iZ.isWrapped}});Object.defineProperty(ss,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return iZ.safeExecuteInTheMiddle}});Object.defineProperty(ss,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return iZ.safeExecuteInTheMiddleAsync}});var jwe=zwe();Object.defineProperty(ss,"SemconvStability",{enumerable:!0,get:function(){return jwe.SemconvStability}});Object.defineProperty(ss,"semconvStabilityFromStr",{enumerable:!0,get:function(){return jwe.semconvStabilityFromStr}})});function Xbt(){let e=oR[aZ];return e?.helper?e.helper:oR[sZ]?.helper}function eCt(e){let t={helper:e};oR[aZ]=t,oR[sZ]=t}function tCt(){delete oR[aZ],delete oR[sZ]}function oCt(e){return e==="client"?co.CLIENT:co.INTERNAL}function Vwe(e,t,n,r,o){if(Ywe(t.name,o))return;let i={attributes:t.attributes,kind:oCt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let f=r.get(l);return f?{context:{spanId:f,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let c=n.filter(l=>l.parentId===t.id);for(let l of c)Vwe(e,l,n,r,o);s.end(t.endTime)})}function $we(e,t){return sCt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function sCt(e){return e!=null&&typeof e.then=="function"}function Ywe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var _3,Zbt,Wbt,sZ,aZ,oR,nCt,rCt,iCt,Kwe,qwe,aCt,uCt,Jwe,Zwe=O(()=>{A();ze();_3=se(Hwe(),1);ze();Zbt={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"}},Wbt=Zbt.version.split(".")[0],sZ="PRISMA_INSTRUMENTATION",aZ=`V${Wbt}_PRISMA_INSTRUMENTATION`,oR=globalThis;nCt=process.env.PRISMA_SHOW_ALL_TRACES==="true",rCt="00-10-10-00";iCt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=$t.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:rCt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Vwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!nCt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Ywe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return $we(i,t(i,r))}return n.startActiveSpan(o,e,i=>$we(i,t(i,r)))}};Kwe={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},qwe=Kwe.version,aCt=Kwe.name,uCt="@prisma/client",Jwe=class extends _3.InstrumentationBase{tracerProvider;constructor(e={}){super(aCt,qwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new _3.InstrumentationNodeModuleDefinition(uCt,[qwe])]}enable(){let e=this._config;eCt(new iCt({tracerProvider:this.tracerProvider??$t.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){tCt()}isEnabled(){return Xbt()!==void 0}}});function cCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function Xwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function lCt(e){return e==="client"?co.CLIENT:co.INTERNAL}var Wwe,uZ,dCt,eke,tke=O(()=>{A();ze();Zwe();dt();gr();Wwe="Prisma";uZ=class extends Jwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=Xwe();cCt(t)&&(t.createEngineSpan=n=>{let r=$t.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ko(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let s=lCt(i.kind),c=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ja.SAMPLED}})),y=$t.setSpanContext(Ke.active(),{traceId:f,spanId:c,traceFlags:Ja.SAMPLED});Ke.with(y,()=>{let S={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};dCt=at(Wwe,e=>new uZ(e)),eke=e=>({name:Wwe,setupOnce(){dCt(e)},setup(t){Xwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var nke=F(iR=>{"use strict";A();Object.defineProperty(iR,"__esModule",{value:!0});iR.PACKAGE_NAME=iR.PACKAGE_VERSION=void 0;iR.PACKAGE_VERSION="0.60.0";iR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var cZ=F($m=>{"use strict";A();Object.defineProperty($m,"__esModule",{value:!0});$m.HapiLifecycleMethodNames=$m.HapiLayerType=$m.handlerPatched=$m.HapiComponentName=void 0;$m.HapiComponentName="@hapi/hapi";$m.handlerPatched=Symbol("hapi-handler-patched");$m.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};$m.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var rke=F(E3=>{"use strict";A();Object.defineProperty(E3,"__esModule",{value:!0});E3.ATTR_HTTP_METHOD=void 0;E3.ATTR_HTTP_METHOD="http.method"});var lZ=F(xO=>{"use strict";A();Object.defineProperty(xO,"__esModule",{value:!0});xO.AttributeNames=void 0;var pCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(pCt=xO.AttributeNames||(xO.AttributeNames={}))});var ske=F(as=>{"use strict";A();Object.defineProperty(as,"__esModule",{value:!0});as.getPluginFromInput=as.getExtMetadata=as.getRouteMetadata=as.isPatchableExtMethod=as.isDirectExtInput=as.isLifecycleExtEventObj=as.isLifecycleExtType=as.getPluginName=void 0;var oke=(Zn(),Me(Fr)),fCt=rke(),DO=cZ(),lE=lZ(),ike=on();function mCt(e){return e.name?e.name:e.pkg.name}as.getPluginName=mCt;var ACt=e=>typeof e=="string"&&DO.HapiLifecycleMethodNames.has(e);as.isLifecycleExtType=ACt;var gCt=e=>{let t=e?.type;return t!==void 0&&(0,as.isLifecycleExtType)(t)};as.isLifecycleExtEventObj=gCt;var hCt=e=>Array.isArray(e)&&e.length<=3&&(0,as.isLifecycleExtType)(e[0])&&typeof e[1]=="function";as.isDirectExtInput=hCt;var _Ct=e=>!Array.isArray(e);as.isPatchableExtMethod=_Ct;var ECt=(e,t,n)=>{let r={[oke.ATTR_HTTP_ROUTE]:e.path};t&ike.SemconvStability.OLD&&(r[fCt.ATTR_HTTP_METHOD]=e.method),t&ike.SemconvStability.STABLE&&(r[oke.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[lE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.PLUGIN,r[lE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[lE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};as.getRouteMetadata=ECt;var yCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[lE.AttributeNames.EXT_TYPE]:e,[lE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT,[lE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[lE.AttributeNames.EXT_TYPE]:e,[lE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT},name:r}};as.getExtMetadata=yCt;var SCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;as.getPluginFromInput=SCt});var cke=F(y3=>{"use strict";A();Object.defineProperty(y3,"__esModule",{value:!0});y3.HapiInstrumentation=void 0;var Hl=(ze(),Me(We)),ake=br(),BO=on(),uke=nke(),NO=cZ(),Fg=ske(),dZ=class extends BO.InstrumentationBase{_semconvStability;constructor(t={}){super(uke.PACKAGE_NAME,uke.PACKAGE_VERSION,t),this._semconvStability=(0,BO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new BO.InstrumentationNodeModuleDefinition(NO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,BO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,BO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(s,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let c=(0,Fg.getPluginFromInput)(s);n._wrapRegisterHandler(c)}else{let s=(0,Fg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let c=0;c<s.length;c++){let l=s[c];if((0,Fg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[c]=f}}return t.apply(this,i)}else if((0,Fg.isDirectExtInput)(i)){let s=i,c=s[1],l=r._wrapExtMethods(c,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Fg.isLifecycleExtEventObj)(i[0])){let s=i[0],c=r._wrapExtMethods(s.method,s.type,n);return s.method=c,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Fg.getPluginName)(t),o=t.register,i=this,s=function(c,l){return i._wrap(c,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(c,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,c,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Fg.isPatchableExtMethod)(t))return t[NO.handlerPatched]===!0?t:(t[NO.handlerPatched]=!0,async function(...s){if(Hl.trace.getSpan(Hl.context.active())===void 0)return await t.apply(this,s);let c=(0,Fg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Hl.context.with(Hl.trace.setSpan(Hl.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:Hl.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[NO.handlerPatched]===!0)return t;t[NO.handlerPatched]=!0;let o=i=>async function(...s){if(Hl.trace.getSpan(Hl.context.active())===void 0)return await i.call(this,...s);let c=(0,ake.getRPCMetadata)(Hl.context.active());c?.type===ake.RPCType.HTTP&&(c.route=t.path);let l=(0,Fg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Hl.context.with(Hl.trace.setSpan(Hl.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:Hl.SpanStatusCode.ERROR,message:h.message}),h}finally{f.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let c=i(s);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}};y3.HapiInstrumentation=dZ});var lke=F(sR=>{"use strict";A();Object.defineProperty(sR,"__esModule",{value:!0});sR.AttributeNames=sR.HapiInstrumentation=void 0;var TCt=cke();Object.defineProperty(sR,"HapiInstrumentation",{enumerable:!0,get:function(){return TCt.HapiInstrumentation}});var ICt=lZ();Object.defineProperty(sR,"AttributeNames",{enumerable:!0,get:function(){return ICt.AttributeNames}})});var dke,pke,fke,bCt,mke,Ake=O(()=>{A();dke=se(lke(),1);gr();pke="Hapi",fke=at(pke,()=>new dke.HapiInstrumentation),bCt=(()=>({name:pke,setupOnce(){fke()}})),mke=bCt});var dE,OO,pZ=O(()=>{A();dE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},OO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var T3,CCt,vCt,S3,gke=O(()=>{A();ze();T3=se(on(),1);dt();pZ();CCt="@sentry/instrumentation-hono",vCt="0.0.1",S3=class extends T3.InstrumentationBase{constructor(t={}){super(CCt,vCt,t)}init(){return[new T3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(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(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(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,s=n.tracer.startSpan(i);return Ke.with($t.setSpan(Ke.active(),s),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ba(c))return c.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[dE.HONO_TYPE]:f,[dE.HONO_NAME]:f===OO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(c);return s.setAttributes({[dE.HONO_TYPE]:l,[dE.HONO_NAME]:l===OO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),c}},()=>s.end(),c=>{n._handleError(s,c),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return ba(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?OO.MIDDLEWARE:OO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:di.ERROR,message:n.message}),t.recordException(n))}}});function RCt(e){let t=Ot(e).data,n=t[dE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[dE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),vn()===Qd()){bs&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[fg],i=t[My];typeof o=="string"&&typeof i=="string"&&vn().setTransactionName(`${i} ${o}`)}var hke,_ke,xCt,Eke,yke=O(()=>{A();Zn();dt();gr();gS();pZ();gke();hke="Hono";_ke=at(hke,()=>new S3({responseHook:e=>{RCt(e)}})),xCt=(()=>({name:hke,setupOnce(){_ke()}})),Eke=xCt});var I3=F(wO=>{"use strict";A();Object.defineProperty(wO,"__esModule",{value:!0});wO.KoaLayerType=void 0;var DCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(DCt=wO.KoaLayerType||(wO.KoaLayerType={}))});var Ske=F(aR=>{"use strict";A();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.62.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var fZ=F(kO=>{"use strict";A();Object.defineProperty(kO,"__esModule",{value:!0});kO.AttributeNames=void 0;var BCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(BCt=kO.AttributeNames||(kO.AttributeNames={}))});var Ike=F(uR=>{"use strict";A();Object.defineProperty(uR,"__esModule",{value:!0});uR.isLayerIgnored=uR.getMiddlewareMetadata=void 0;var Tke=I3(),b3=fZ(),NCt=(Zn(),Me(Fr)),OCt=(e,t,n,r)=>n?{attributes:{[b3.AttributeNames.KOA_NAME]:r?.toString(),[b3.AttributeNames.KOA_TYPE]:Tke.KoaLayerType.ROUTER,[NCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[b3.AttributeNames.KOA_NAME]:t.name??"middleware",[b3.AttributeNames.KOA_TYPE]:Tke.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};uR.getMiddlewareMetadata=OCt;var wCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));uR.isLayerIgnored=wCt});var bke=F(C3=>{"use strict";A();Object.defineProperty(C3,"__esModule",{value:!0});C3.kLayerPatched=void 0;C3.kLayerPatched=Symbol("koa-layer-patched")});var Bke=F(v3=>{"use strict";A();Object.defineProperty(v3,"__esModule",{value:!0});v3.KoaInstrumentation=void 0;var qm=(ze(),Me(We)),PO=on(),Cke=I3(),vke=Ske(),Rke=Ike(),xke=br(),Dke=bke(),mZ=class extends PO.InstrumentationBase{constructor(t={}){super(vke.PACKAGE_NAME,vke.PACKAGE_VERSION,t)}init(){return new PO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,PO.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,PO.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){qm.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let c=0;c<s.length;c++){let l=s[c];s[c]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?Cke.KoaLayerType.ROUTER:Cke.KoaLayerType.MIDDLEWARE;return t[Dke.kLayerPatched]===!0||(0,Rke.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(qm.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Dke.kLayerPatched]=!0,qm.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(qm.trace.getSpan(qm.context.active())===void 0)return t(i,s);let l=(0,Rke.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,xke.getRPCMetadata)(qm.context.active());h?.type===xke.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,PO.safeExecuteInTheMiddle)(()=>y(f,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&qm.diag.error("koa instrumentation: request hook failed",b)},!0);let S=qm.trace.setSpan(qm.context.active(),f);return qm.context.with(S,async()=>{try{return await t(i,s)}catch(b){throw f.recordException(b),b}finally{f.end()}})})}};v3.KoaInstrumentation=mZ});var Nke=F(pE=>{"use strict";A();Object.defineProperty(pE,"__esModule",{value:!0});pE.KoaLayerType=pE.AttributeNames=pE.KoaInstrumentation=void 0;var kCt=Bke();Object.defineProperty(pE,"KoaInstrumentation",{enumerable:!0,get:function(){return kCt.KoaInstrumentation}});var PCt=fZ();Object.defineProperty(pE,"AttributeNames",{enumerable:!0,get:function(){return PCt.AttributeNames}});var MCt=I3();Object.defineProperty(pE,"KoaLayerType",{enumerable:!0,get:function(){return MCt.KoaLayerType}})});var Oke,wke,kke,LCt,Pke,Mke=O(()=>{A();Oke=se(Nke(),1);Zn();dt();gr();gS();wke="Koa",kke=at(wke,Oke.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),vn()===Qd()){bs&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[fg],c=n.context?.request?.method?.toUpperCase()||"GET";s&&vn().setTransactionName(`${c} ${s}`)}})),LCt=((e={})=>({name:wke,setupOnce(){kke(e)}})),Pke=LCt});var AZ=F(hf=>{"use strict";A();Object.defineProperty(hf,"__esModule",{value:!0});hf.ConnectNames=hf.ConnectTypes=hf.AttributeNames=void 0;var UCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(UCt=hf.AttributeNames||(hf.AttributeNames={}));var QCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(QCt=hf.ConnectTypes||(hf.ConnectTypes={}));var FCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(FCt=hf.ConnectNames||(hf.ConnectNames={}))});var Lke=F(cR=>{"use strict";A();Object.defineProperty(cR,"__esModule",{value:!0});cR.PACKAGE_NAME=cR.PACKAGE_VERSION=void 0;cR.PACKAGE_VERSION="0.57.0";cR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Uke=F(R3=>{"use strict";A();Object.defineProperty(R3,"__esModule",{value:!0});R3._LAYERS_STORE_PROPERTY=void 0;R3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var Qke=F(mE=>{"use strict";A();Object.defineProperty(mE,"__esModule",{value:!0});mE.generateRoute=mE.replaceCurrentStackRoute=mE.addNewStackLayer=void 0;var GCt=(ze(),Me(We)),fE=Uke(),zCt=e=>{Array.isArray(e[fE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,fE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[fE._LAYERS_STORE_PROPERTY].push("/");let t=e[fE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[fE._LAYERS_STORE_PROPERTY].length?e[fE._LAYERS_STORE_PROPERTY].pop():GCt.diag.warn("Connect: Trying to pop the stack multiple time")}};mE.addNewStackLayer=zCt;var jCt=(e,t)=>{t&&e[fE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};mE.replaceCurrentStackRoute=jCt;var HCt=e=>e[fE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);mE.generateRoute=HCt});var zke=F(AE=>{"use strict";A();Object.defineProperty(AE,"__esModule",{value:!0});AE.ConnectInstrumentation=AE.ANONYMOUS_NAME=void 0;var $Ct=(ze(),Me(We)),Fke=br(),lR=AZ(),Gke=Lke(),x3=on(),qCt=(Zn(),Me(Fr)),gZ=Qke();AE.ANONYMOUS_NAME="anonymous";var hZ=class extends x3.InstrumentationBase{constructor(t={}){super(Gke.PACKAGE_NAME,Gke.PACKAGE_VERSION,t)}init(){return[new x3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,x3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,x3.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=lR.ConnectTypes.REQUEST_HANDLER,i=lR.ConnectNames.REQUEST_HANDLER,o=t):(r=lR.ConnectTypes.MIDDLEWARE,i=lR.ConnectNames.MIDDLEWARE,o=n.name||AE.ANONYMOUS_NAME);let s=`${i} - ${o}`,c={attributes:{[qCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[lR.AttributeNames.CONNECT_TYPE]:r,[lR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,c,l]=o?[1,2,3]:[0,1,2],f=arguments[s],h=arguments[c],y=arguments[l];(0,gZ.replaceCurrentStackRoute)(f,t);let S=(0,Fke.getRPCMetadata)($Ct.context.active());t&&S?.type===Fke.RPCType.HTTP&&(S.route=(0,gZ.generateRoute)(f));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||AE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",b);let x=!1;function D(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",D)}return h.addListener("close",D),arguments[l]=r._patchNext(y,D),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],c=(0,gZ.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};AE.ConnectInstrumentation=hZ});var Hke=F(tp=>{"use strict";A();Object.defineProperty(tp,"__esModule",{value:!0});tp.ConnectTypes=tp.ConnectNames=tp.AttributeNames=tp.ANONYMOUS_NAME=tp.ConnectInstrumentation=void 0;var jke=zke();Object.defineProperty(tp,"ConnectInstrumentation",{enumerable:!0,get:function(){return jke.ConnectInstrumentation}});Object.defineProperty(tp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return jke.ANONYMOUS_NAME}});var _Z=AZ();Object.defineProperty(tp,"AttributeNames",{enumerable:!0,get:function(){return _Z.AttributeNames}});Object.defineProperty(tp,"ConnectNames",{enumerable:!0,get:function(){return _Z.ConnectNames}});Object.defineProperty(tp,"ConnectTypes",{enumerable:!0,get:function(){return _Z.ConnectTypes}})});var $ke,qke,Vke,VCt,Yke,Kke=O(()=>{A();$ke=se(Hke(),1);gr();qke="Connect",Vke=at(qke,()=>new $ke.ConnectInstrumentation),VCt=(()=>({name:qke,setupOnce(){Vke()}})),Yke=VCt});var Jke=F(oa=>{"use strict";A();Object.defineProperty(oa,"__esModule",{value:!0});oa.DB_SYSTEM_VALUE_MSSQL=oa.ATTR_NET_PEER_PORT=oa.ATTR_NET_PEER_NAME=oa.ATTR_DB_USER=oa.ATTR_DB_SYSTEM=oa.ATTR_DB_STATEMENT=oa.ATTR_DB_SQL_TABLE=oa.ATTR_DB_NAME=void 0;oa.ATTR_DB_NAME="db.name";oa.ATTR_DB_SQL_TABLE="db.sql.table";oa.ATTR_DB_STATEMENT="db.statement";oa.ATTR_DB_SYSTEM="db.system";oa.ATTR_DB_USER="db.user";oa.ATTR_NET_PEER_NAME="net.peer.name";oa.ATTR_NET_PEER_PORT="net.peer.port";oa.DB_SYSTEM_VALUE_MSSQL="mssql"});var Zke=F(dR=>{"use strict";A();Object.defineProperty(dR,"__esModule",{value:!0});dR.once=dR.getSpanName=void 0;function YCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}dR.getSpanName=YCt;var KCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};dR.once=KCt});var Wke=F(pR=>{"use strict";A();Object.defineProperty(pR,"__esModule",{value:!0});pR.PACKAGE_NAME=pR.PACKAGE_VERSION=void 0;pR.PACKAGE_VERSION="0.33.0";pR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var rPe=F(hE=>{"use strict";A();Object.defineProperty(hE,"__esModule",{value:!0});hE.TediousInstrumentation=hE.INJECTED_CTX=void 0;var fR=(ze(),Me(We)),JCt=Fe("events"),Vm=on(),xS=(Zn(),Me(Fr)),gE=Jke(),Xke=Zke(),ePe=Wke(),nPe=Symbol("opentelemetry.instrumentation-tedious.current-database");hE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var tPe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function D3(e){Object.defineProperty(this,nPe,{value:e,writable:!0})}var EZ=class e extends Vm.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ePe.PACKAGE_NAME,ePe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Vm.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Vm.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Vm.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of tPe)(0,Vm.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,Vm.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 tPe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return D3.call(this,this.config?.options?.database),this.removeListener("databaseChange",D3),this.on("databaseChange",D3),this.once("end",()=>{this.removeListener("databaseChange",D3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||fR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,hE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[hE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof JCt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,l=0,f=()=>l++,h=()=>c++,y=this[nPe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),b={};o._dbSemconvStability&Vm.SemconvStability.OLD&&(b[gE.ATTR_DB_SYSTEM]=gE.DB_SYSTEM_VALUE_MSSQL,b[gE.ATTR_DB_NAME]=y,b[gE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[gE.ATTR_DB_STATEMENT]=S,b[gE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&Vm.SemconvStability.STABLE&&(b[xS.ATTR_DB_NAMESPACE]=y,b[xS.ATTR_DB_SYSTEM_NAME]=xS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[xS.ATTR_DB_QUERY_TEXT]=S,b[xS.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&Vm.SemconvStability.OLD&&(b[gE.ATTR_NET_PEER_NAME]=this.config?.server,b[gE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&Vm.SemconvStability.STABLE&&(b[xS.ATTR_SERVER_ADDRESS]=this.config?.server,b[xS.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,Xke.getSpanName)(t,y,S,s.table),{kind:fR.SpanKind.CLIENT,attributes:b}),x=(0,Xke.once)(G=>{s.removeListener("done",f),s.removeListener("doneInProc",f),s.removeListener("doneProc",h),s.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:fR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",f),s.on("doneInProc",f),s.on("doneProc",h),s.once("error",x),this.on("end",x),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let D=()=>fR.context.with(fR.trace.setSpan(fR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return D();let z=o._buildTraceparent(v);o._injectContextInfo(this,n,z).finally(D)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};hE.TediousInstrumentation=EZ});var oPe=F(B3=>{"use strict";A();Object.defineProperty(B3,"__esModule",{value:!0});B3.TediousInstrumentation=void 0;var ZCt=rPe();Object.defineProperty(B3,"TediousInstrumentation",{enumerable:!0,get:function(){return ZCt.TediousInstrumentation}})});var iPe,WCt,sPe,aPe,XCt,uPe,cPe=O(()=>{A();iPe=se(oPe(),1);dt();gr();WCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),sPe="Tedious",aPe=at(sPe,()=>new iPe.TediousInstrumentation({})),XCt=(()=>{let e;return{name:sPe,setupOnce(){let t=aPe();e=_N(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";WCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}}),uPe=XCt});var lPe=F(mR=>{"use strict";A();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.57.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var pPe=F(N3=>{"use strict";A();Object.defineProperty(N3,"__esModule",{value:!0});N3.GenericPoolInstrumentation=void 0;var AR=(ze(),Me(We)),DS=on(),dPe=lPe(),yZ="generic-pool",SZ=class extends DS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(dPe.PACKAGE_NAME,dPe.PACKAGE_VERSION,t)}init(){return[new DS.InstrumentationNodeModuleDefinition(yZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,DS.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 DS.InstrumentationNodeModuleDefinition(yZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,DS.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 DS.InstrumentationNodeModuleDefinition(yZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,DS.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=AR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return AR.context.with(AR.trace.setSpan(i,s),()=>t.call(this,...o).then(c=>(s.end(),c),c=>{throw s.recordException(c),s.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 s=AR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},s);return AR.context.with(AR.trace.setSpan(s,c),()=>{t.call(this,(l,f)=>{if(c.end(),o)return o(l,f)},i)})}}};N3.GenericPoolInstrumentation=SZ});var fPe=F(O3=>{"use strict";A();Object.defineProperty(O3,"__esModule",{value:!0});O3.GenericPoolInstrumentation=void 0;var evt=pPe();Object.defineProperty(O3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return evt.GenericPoolInstrumentation}})});var mPe,APe,gPe,tvt,hPe,_Pe=O(()=>{A();mPe=se(fPe(),1);dt();gr();APe="GenericPool",gPe=at(APe,()=>new mPe.GenericPoolInstrumentation({})),tvt=(()=>{let e;return{name:APe,setupOnce(){let t=gPe();e=_N(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}}),hPe=tvt});var TZ=F(Ym=>{"use strict";A();Object.defineProperty(Ym,"__esModule",{value:!0});Ym.ATTR_NET_PEER_PORT=Ym.ATTR_NET_PEER_NAME=Ym.ATTR_MESSAGING_SYSTEM=Ym.ATTR_MESSAGING_OPERATION=void 0;Ym.ATTR_MESSAGING_OPERATION="messaging.operation";Ym.ATTR_MESSAGING_SYSTEM="messaging.system";Ym.ATTR_NET_PEER_NAME="net.peer.name";Ym.ATTR_NET_PEER_PORT="net.peer.port"});var IZ=F(gi=>{"use strict";A();Object.defineProperty(gi,"__esModule",{value:!0});gi.ATTR_MESSAGING_CONVERSATION_ID=gi.OLD_ATTR_MESSAGING_MESSAGE_ID=gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=gi.ATTR_MESSAGING_URL=gi.ATTR_MESSAGING_PROTOCOL_VERSION=gi.ATTR_MESSAGING_PROTOCOL=gi.MESSAGING_OPERATION_VALUE_PROCESS=gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=gi.ATTR_MESSAGING_DESTINATION_KIND=gi.ATTR_MESSAGING_DESTINATION=void 0;gi.ATTR_MESSAGING_DESTINATION="messaging.destination";gi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";gi.MESSAGING_OPERATION_VALUE_PROCESS="process";gi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";gi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";gi.ATTR_MESSAGING_URL="messaging.url";gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";gi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";gi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var bZ=F(BS=>{"use strict";A();Object.defineProperty(BS,"__esModule",{value:!0});BS.DEFAULT_CONFIG=BS.EndOperation=void 0;var nvt;(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"})(nvt=BS.EndOperation||(BS.EndOperation={}));BS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var TPe=F(hi=>{"use strict";A();Object.defineProperty(hi,"__esModule",{value:!0});hi.isConfirmChannelTracing=hi.unmarkConfirmChannelTracing=hi.markConfirmChannelTracing=hi.getConnectionAttributesFromUrl=hi.getConnectionAttributesFromServer=hi.normalizeExchange=hi.CONNECTION_ATTRIBUTES=hi.CHANNEL_CONSUME_TIMEOUT_TIMER=hi.CHANNEL_SPANS_NOT_ENDED=hi.MESSAGE_STORED_SPAN=void 0;var CZ=(ze(),Me(We)),_E=on(),w3=(Zn(),Me(Fr)),MO=TZ(),k3=IZ();hi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");hi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");hi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");hi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var vZ=(0,CZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),rvt=e=>e!==""?e:"<default>";hi.normalizeExchange=rvt;var ovt=e=>e.replace(/:[^:@/]*@/,":***@"),EPe=(e,t)=>e||(t==="AMQP"?5672:5671),yPe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},SPe=e=>e||"localhost",Km=(e,t,n,r)=>n?{[t]:n}:(CZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),ivt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[MO.ATTR_MESSAGING_SYSTEM]:t}:{}};hi.getConnectionAttributesFromServer=ivt;var svt=(e,t)=>{let n={[k3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=yPe(r?.protocol);Object.assign(n,{...Km(e,k3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=SPe(r?.hostname);t&_E.SemconvStability.OLD&&Object.assign(n,{...Km(e,MO.ATTR_NET_PEER_NAME,i,"hostname")}),t&_E.SemconvStability.STABLE&&Object.assign(n,{...Km(e,w3.ATTR_SERVER_ADDRESS,i,"hostname")});let s=EPe(r.port,o);t&_E.SemconvStability.OLD&&Object.assign(n,Km(e,MO.ATTR_NET_PEER_PORT,s,"port")),t&_E.SemconvStability.STABLE&&Object.assign(n,Km(e,w3.ATTR_SERVER_PORT,s,"port"))}else{let r=ovt(e);n[k3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=yPe(o.protocol);Object.assign(n,{...Km(r,k3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=SPe(o.hostname);t&_E.SemconvStability.OLD&&Object.assign(n,{...Km(r,MO.ATTR_NET_PEER_NAME,s,"hostname")}),t&_E.SemconvStability.STABLE&&Object.assign(n,{...Km(r,w3.ATTR_SERVER_ADDRESS,s,"hostname")});let c=EPe(o.port?parseInt(o.port):void 0,i);t&_E.SemconvStability.OLD&&Object.assign(n,Km(r,MO.ATTR_NET_PEER_PORT,c,"port")),t&_E.SemconvStability.STABLE&&Object.assign(n,Km(r,w3.ATTR_SERVER_PORT,c,"port"))}catch(o){CZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};hi.getConnectionAttributesFromUrl=svt;var avt=e=>e.setValue(vZ,!0);hi.markConfirmChannelTracing=avt;var uvt=e=>e.deleteValue(vZ);hi.unmarkConfirmChannelTracing=uvt;var cvt=e=>e.getValue(vZ)===!0;hi.isConfirmChannelTracing=cvt});var IPe=F(gR=>{"use strict";A();Object.defineProperty(gR,"__esModule",{value:!0});gR.PACKAGE_NAME=gR.PACKAGE_VERSION=void 0;gR.PACKAGE_VERSION="0.61.0";gR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var CPe=F(L3=>{"use strict";A();Object.defineProperty(L3,"__esModule",{value:!0});L3.AmqplibInstrumentation=void 0;var Xo=(ze(),Me(We)),P3=br(),vr=on(),lvt=TZ(),$l=IZ(),Ku=bZ(),_i=TPe(),bPe=IPe(),M3=[">=0.5.5 <1"],RZ=class extends vr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(bPe.PACKAGE_NAME,bPe.PACKAGE_VERSION,{...Ku.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ku.DEFAULT_CONFIG,...t})}init(){let t=new vr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",M3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new vr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",M3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new vr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",M3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new vr.InstrumentationNodeModuleDefinition("amqplib",M3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,vr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,vr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,vr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ku.EndOperation.Ack)),(0,vr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ku.EndOperation.Nack)),(0,vr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ku.EndOperation.Reject)),(0,vr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ku.EndOperation.AckAll)),(0,vr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ku.EndOperation.NackAll)),(0,vr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,vr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,vr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,vr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,vr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,vr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,vr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,vr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,vr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(c,l){if(c==null){let f=(0,_i.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,_i.getConnectionAttributesFromServer)(l);l[_i.CONNECTION_ATTRIBUTES]={...f,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelClosed,void 0);let i=this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,c,l){let f=this,h=n===Ku.EndOperation.Reject?c:l,y=f[_i.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==Ku.EndOperation.Reject&&c){for(let b=0;b<=S;b++)o.endConsumerSpan(y[b].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,c){let l=this;if(!Object.prototype.hasOwnProperty.call(l,_i.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[_i.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=Xo.propagation.extract(Xo.ROOT_CONTEXT,y),b=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=S?Xo.trace.getSpan(S)?.spanContext():void 0;S=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Xo.SpanKind.CONSUMER,attributes:{...l?.connection?.[_i.CONNECTION_ATTRIBUTES],[$l.ATTR_MESSAGING_DESTINATION]:b,[$l.ATTR_MESSAGING_DESTINATION_KIND]:$l.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[$l.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[lvt.ATTR_MESSAGING_OPERATION]:$l.MESSAGING_OPERATION_VALUE_PROCESS,[$l.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[$l.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:D}=r.getConfig();D&&(0,vr.safeExecuteInTheMiddle)(()=>D(x,{moduleVersion:t,msg:h}),Q=>{Q&&Xo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(l[_i.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,P3.hrTime)()}),h[_i.MESSAGE_STORED_SPAN]=x);let k=S||Xo.ROOT_CONTEXT;Xo.context.with(Xo.trace.setSpan(k,x),()=>{s.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Ku.EndOperation.AutoAck),x.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,c,l,f){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:b}=r.getConfig();b&&(0,vr.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:S,isConfirmChannel:!0}),k=>{k&&Xo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{f?.call(this,k,Q)}finally{let{publishConfirmHook:z}=r.getConfig();z&&(0,vr.safeExecuteInTheMiddle)(()=>z(y,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:l,isConfirmChannel:!0,confirmError:k}),G=>{G&&Xo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&y.setStatus({code:Xo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},x=(0,_i.markConfirmChannelTracing)(Xo.context.active()),D=[...arguments];return D[3]=S,D[4]=Xo.context.bind((0,_i.unmarkConfirmChannelTracing)(Xo.trace.setSpan(x,y)),v),Xo.context.with(x,n.bind(this,...D))}}getPublishPatch(t,n){let r=this;return function(i,s,c,l){if((0,_i.isConfirmChannelTracing)(Xo.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,f,l),{publishHook:S}=r.getConfig();S&&(0,vr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:y,isConfirmChannel:!1}),x=>{x&&Xo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let b=[...arguments];b[3]=y;let v=n.apply(this,b);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,_i.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${s}`,{kind:Xo.SpanKind.PRODUCER,attributes:{...o.connection[_i.CONNECTION_ATTRIBUTES],[$l.ATTR_MESSAGING_DESTINATION]:n,[$l.ATTR_MESSAGING_DESTINATION_KIND]:$l.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[$l.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[$l.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[$l.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},Xo.propagation.inject(Xo.trace.setSpan(Xo.context.active(),c),l.headers),{span:c,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[_i.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Xo.SpanStatusCode.ERROR,message:r!==Ku.EndOperation.ChannelClosed&&r!==Ku.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[_i.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[_i.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[_i.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,vr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&Xo.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,P3.hrTime)(),r=t[_i.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],c=(0,P3.hrTimeDuration)(s.timeOfConsume,n);if((0,P3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(s.msg,null,Ku.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};L3.AmqplibInstrumentation=RZ});var RPe=F(EE=>{"use strict";A();Object.defineProperty(EE,"__esModule",{value:!0});EE.EndOperation=EE.DEFAULT_CONFIG=EE.AmqplibInstrumentation=void 0;var dvt=CPe();Object.defineProperty(EE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return dvt.AmqplibInstrumentation}});var vPe=bZ();Object.defineProperty(EE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return vPe.DEFAULT_CONFIG}});Object.defineProperty(EE,"EndOperation",{enumerable:!0,get:function(){return vPe.EndOperation}})});var xPe,DPe,pvt,BPe,fvt,NPe,OPe=O(()=>{A();xPe=se(RPe(),1);gr();DPe="Amqplib",pvt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},BPe=at(DPe,()=>new xPe.AmqplibInstrumentation(pvt)),fvt=(()=>({name:DPe,setupOnce(){BPe()}})),NPe=fvt});var LO,xZ=O(()=>{A();LO="VercelAI"});function Avt(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 gvt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(hvt(t.content),_vt(t.content))}function hvt(e){for(let t of e){if(!Avt(t))continue;let n=o7(t.toolCallId);n?wl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):wl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function _vt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&i7(t.toolCallId)}function Evt(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 Q3,mvt,wPe,U3,kPe=O(()=>{A();Q3=se(on(),1);dt();xZ();mvt=[">=3.0.0 <7"],wPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];U3=class e extends Q3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new Q3.InstrumentationNodeModuleDefinition("ai",mvt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let c=s[0].experimental_telemetry||{},l=c.isEnabled,f=gt(),h=f?.getIntegrationByName(LO),y=h?.options,S=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:v}=Evt(y,c,l,S);return s[0].experimental_telemetry={...c,isEnabled:l!==void 0?l:!0,recordInputs:b,recordOutputs:v},df(()=>Reflect.apply(o,i,s),x=>{x&&typeof x=="object"&&Xi(x,"_sentry_active_span",Pc())},()=>{},x=>{gvt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of wPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=wPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function yvt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var PPe,Svt,MPe,LPe=O(()=>{A();dt();gr();xZ();kPe();PPe=at(LO,()=>new U3({}));Svt=((e={})=>{let t;return{name:LO,options:e,setupOnce(){t=PPe()},afterAllSetup(n){e.force??yvt(n)?HU(n):t?.callWhenPatched(()=>HU(n))}}}),MPe=Svt});var G3,Tvt,F3,UPe=O(()=>{A();G3=se(on(),1);dt();Tvt=[">=4.0.0 <7"],F3=class extends G3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new G3.InstrumentationNodeModuleDefinition("openai",Tvt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...s){if(Xy(j_))return Reflect.construct(r,s);let c=Reflect.construct(r,s);return VU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(i,s,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 QPe,Ivt,FPe,GPe=O(()=>{A();dt();gr();UPe();QPe=at(j_,e=>new F3(e)),Ivt=((e={})=>({name:j_,setupOnce(){QPe(e)}})),FPe=Ivt});var j3,bvt,z3,zPe=O(()=>{A();j3=se(on(),1);dt();bvt=[">=0.19.2 <1.0.0"],z3=class extends j3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new j3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",bvt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(Xy(H_))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return YU(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var jPe,Cvt,HPe,$Pe=O(()=>{A();dt();gr();zPe();jPe=at(H_,e=>new z3(e)),Cvt=((e={})=>({name:H_,options:e,setupOnce(){jPe(e)}})),HPe=Cvt});var hR,qPe,H3,VPe=O(()=>{A();hR=se(on(),1);dt();qPe=[">=0.10.0 <2"],H3=class extends hR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new hR.InstrumentationNodeModuleDefinition("@google/genai",qPe,n=>this._patch(n),n=>n,[new hR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",qPe,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(Xy($_))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return KU(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return gN(t,"GoogleGenAI",o),t}}});var YPe,vvt,KPe,JPe=O(()=>{A();dt();gr();VPe();YPe=at($_,e=>new H3(e)),vvt=((e={})=>({name:$_,setupOnce(){YPe(e)}})),KPe=vvt});function Rvt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function xvt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let l=c.callbacks,f=Rvt(l,t);return c.callbacks=f,Reflect.apply(r,o,i)}})}var yE,$3,q3,ZPe=O(()=>{A();yE=se(on(),1);dt();$3=[">=0.1.0 <2.0.0"];q3=class extends yE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new yE.InstrumentationNodeModuleDefinition(r,$3,this._patch.bind(this),o=>o,[new yE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,$3,this._patch.bind(this),o=>o)]));return t.push(new yE.InstrumentationNodeModuleDefinition("langchain",$3,this._patch.bind(this),r=>r,[new yE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",$3,this._patch.bind(this),r=>r)])),t}_patch(t){SV([j_,H_,$_]);let n=XU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let l of c){let f=s[l];typeof f=="function"&&(s[l]=xvt(f,n))}}}});var WPe,Dvt,XPe,e2e=O(()=>{A();dt();gr();ZPe();WPe=at(JU,e=>new q3(e)),Dvt=((e={})=>({name:JU,setupOnce(){WPe(e)}})),XPe=Dvt});var _R,t2e,V3,n2e=O(()=>{A();_R=se(on(),1);dt();t2e=[">=0.0.0 <2.0.0"],V3=class extends _R.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new _R.InstrumentationNodeModuleDefinition("@langchain/langgraph",t2e,this._patch.bind(this),n=>n,[new _R.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",t2e,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&tQ(t.StateGraph.prototype,this.getConfig()),t}}});var r2e,Bvt,o2e,i2e=O(()=>{A();dt();gr();n2e();r2e=at(eQ,e=>new V3(e)),Bvt=((e={})=>({name:eQ,setupOnce(){r2e(e)}})),o2e=Bvt});import*as a2e from"node:net";function u2e(e,t,n,r,o){let s=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(s=h=>{(0,Gg.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&Bl.error(y?.message)},!0)});let l=new Gg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>s2e(h,n,r,e,s)),f=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of f)l.files.push(new Gg.InstrumentationNodeModuleFile(h,t,y=>s2e(y,n,r,e,s),y=>c2e(y,r)));return l}function s2e(e,t,n,r,o){return c2e(e,n),t(e,"addDoc",Nvt(r,o)),t(e,"getDocs",wvt(r,o)),t(e,"setDoc",kvt(r,o)),t(e,"deleteDoc",Ovt(r,o)),e}function c2e(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Gg.isWrapped)(e[n])&&t(e,n);return e}function Nvt(e,t){return function(r){return function(o,i){let s=K3(e,"addDoc",o);return t(s),Y3(s,()=>r(o,i))}}}function Ovt(e,t){return function(r){return function(o){let i=K3(e,"deleteDoc",o.parent||o);return t(i),Y3(i,()=>r(o))}}}function wvt(e,t){return function(r){return function(o){let i=K3(e,"getDocs",o);return t(i),Y3(i,()=>r(o))}}}function kvt(e,t){return function(r){return function(o,i,s){let c=K3(e,"setDoc",o.parent||o);return t(c),Y3(c,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function Y3(e,t){return Ke.with($t.setSpan(Ke.active(),e),()=>(0,Gg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function K3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:co.CLIENT});return Mvt(r,n),r.setAttribute(oC,t),r}function Pvt(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(a2e.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 Mvt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[$9]:t.path,[q9]:n.name,[Py]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:l}=Pvt(i);c&&(s[e5]=c),l&&(s[t5]=l),e.setAttributes(s)}var Gg,l2e=O(()=>{A();ze();Gg=se(on(),1);Zn()});function d2e(e,t,n,r,o){let i=()=>{},s=()=>{},c=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(S,b)=>{(0,zg.safeExecuteInTheMiddle)(()=>f(S,b),v=>{v&&Bl.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,zg.safeExecuteInTheMiddle)(()=>l(S),b=>{b&&Bl.error(b?.message)},!0)});let h=new zg.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 zg.InstrumentationNodeModuleFile(S,t,v=>Lvt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:c},b),v=>p2e(v,r)))}),h}function Ju(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:co.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Ke.with($t.setSpan(Ke.active(),y),async()=>{let b,v;try{v=await s.apply(this,f)}catch(x){b=x}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return v})};return c?o.call(this,c,l):o.call(this,l)}}}function Lvt(e,t,n,r,o,i){switch(p2e(e,n),i){case"function":t(e,"onRequest",Ju(r,o,"http.request")),t(e,"onCall",Ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ju(r,o,"storage.object.metadataUpdated"));break}return e}function p2e(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,zg.isWrapped)(e[r])&&t(e,r);return e}var zg,f2e=O(()=>{A();ze();zg=se(on(),1)});var A2e,m2e,Uvt,Qvt,J3,g2e=O(()=>{A();A2e=se(on(),1);dt();l2e();f2e();m2e={},Uvt=[">=3.0.0 <5"],Qvt=[">=6.0.0 <7"],J3=class extends A2e.InstrumentationBase{constructor(t=m2e){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...m2e,...t})}init(){let t=[];return t.push(u2e(this.tracer,Uvt,this._wrap,this._unwrap,this.getConfig())),t.push(d2e(this.tracer,Qvt,this._wrap,this._unwrap,this.getConfig())),t}}});var h2e,Fvt,_2e,Gvt,E2e,y2e=O(()=>{A();dt();gr();g2e();h2e="Firebase",Fvt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await zC(2e3))}}},_2e=at(h2e,()=>new J3(Fvt)),Gvt=(()=>({name:h2e,setupOnce(){_2e()}})),E2e=Gvt});function S2e(){return[bDe(),oBe(),NBe(),Eke(),_Ne(),wNe(),$Ne(),rOe(),POe(),nwe(),eke(),mke(),Pke(),Yke(),uPe(),hPe(),YBe(),NPe(),iNe(),XPe(),o2e(),MPe(),FPe(),HPe(),KPe(),swe(),E2e()]}var T2e=O(()=>{A();OPe();$Pe();Kke();CDe();aBe();y2e();_Pe();JPe();wBe();Ake();yke();KBe();Mke();e2e();i2e();sNe();ENe();kNe();qNe();oOe();GPe();rwe();awe();tke();MOe();cPe();LPe()});function b2e(e,t={}){e.getOptions().debug&&MY();let[n,r]=zvt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function zvt(e,t={}){let n=new I2e.BasicTracerProvider({sampler:new aF(e),resource:(0,Z3.defaultResource)().merge((0,Z3.resourceFromAttributes)({[n5]:"node",[H9]:"sentry",[r5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new sF({timeout:jvt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});$t.setGlobalTracerProvider(n),ef.setGlobalPropagator(new iF);let r=new cF;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function jvt(e){if(e!=null){if(e>DZ)return bs&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${DZ}`),DZ;if(e<=0||Number.isNaN(e)){bs&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var Z3,I2e,DZ,C2e=O(()=>{A();ze();Z3=se(K7(),1),I2e=se(SY(),1);Zn();dt();gr();yv();gS();DZ=1e6});function v2e(){return gF().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(eDe(),cDe())}function R2e(e){return[...v2e(),...ki(e)?S2e():[]]}function BZ(e={}){return Hvt(e,R2e)}function Hvt(e={},t){eS(e,"node");let n=uK({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(b2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),hF()),n}var x2e=O(()=>{A();dt();gr();tDe();lDe();T2e();C2e()});var ER=O(()=>{A();x2e();dt();gr()});function Zr(){return $vt}function cu(){return D2e}function B2e(){return qvt}var $vt,D2e,qvt,$c=O(()=>{"use strict";A();$vt="prod",D2e="0.1.156",qvt=`@tanagram/lore/${D2e}`});function Zvt(e=""){if(!Kvt.test(e))return e!==e.toLowerCase()}function N2e(e,t){let n=t??Jvt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let c of e){let l=n.includes(c);if(l===!0){r.push(o),o="",i=void 0;continue}let f=Zvt(c);if(s===!1){if(i===!1&&f===!0){r.push(o),o=c,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=f;continue}}o+=c,i=f,s=l}return r.push(o),r}function Wvt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Xvt(e){return e?e[0].toLowerCase()+e.slice(1):""}function eRt(e,t){return e?(Array.isArray(e)?e:N2e(e)).map(n=>Wvt(t?.normalize?n.toLowerCase():n)).join(""):""}function QO(e,t){return Xvt(eRt(e||"",t))}function W3(e,t){return e?(Array.isArray(e)?e:N2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function O2e(e){return W3(e||"","_")}var Kvt,Jvt,w2e=O(()=>{A();Kvt=/\d/,Jvt=["-","_","/","."]});import{parseArgs as tRt}from"node:util";function n6(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function NZ(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
38
+ Mongoose Error Code: ${t.code}`:""}`})}function cJ(e,t,n,r=void 0){n&&(0,cO.safeExecuteInTheMiddle)(()=>n(e,{moduleVersion:r,response:t}),o=>{o&&yNe.diag.error("mongoose instrumentation: responseHook error",o)},!0)}function lTt(e,t,n,r=void 0){return e instanceof Promise?e.then(o=>(cJ(t,o,n,r),o)).catch(o=>{throw SNe(t,o),o}).finally(()=>t.end()):(cJ(t,e,n,r),t.end(),e)}tE.handlePromiseResponse=lTt;function dTt(e,t,n,r,o,i,s=void 0){let c=0;return o.length===2?c=1:o.length===3&&(c=2),o[c]=(l,f)=>(l?SNe(r,l):cJ(r,f,i,s),r.end(),e(l,f)),t.apply(n,o)}tE.handleCallbackResponse=dTt});var INe=F(zv=>{"use strict";A();Object.defineProperty(zv,"__esModule",{value:!0});zv.PACKAGE_NAME=zv.PACKAGE_VERSION=void 0;zv.PACKAGE_VERSION="0.60.0";zv.PACKAGE_NAME="@opentelemetry/instrumentation-mongoose"});var xNe=F(Gc=>{"use strict";A();Object.defineProperty(Gc,"__esModule",{value:!0});Gc.MongooseInstrumentation=Gc._ALREADY_INSTRUMENTED=Gc._STORED_PARENT_SPAN=void 0;var vs=(ze(),Me(We)),pTt=br(),lJ=TNe(),Oa=on(),bNe=INe(),nE=uJ(),IS=(Zn(),Me(Fr)),I4=["deleteOne","deleteMany","find","findOne","estimatedDocumentCount","countDocuments","distinct","where","$where","findOneAndUpdate","findOneAndDelete","findOneAndReplace"],fTt=["remove","count","findOneAndRemove",...I4],mTt=["count","findOneAndRemove",...I4],ATt=[...I4];function CNe(e){return e?e.startsWith("6.")||e.startsWith("5.")?fTt:e.startsWith("7.")?mTt:ATt:I4}function vNe(e){return e&&(e.startsWith("5.")||e.startsWith("6."))||!1}function RNe(e){return!e||!e.startsWith("8.")?!1:parseInt(e.split(".")[1],10)>=21}Gc._STORED_PARENT_SPAN=Symbol("stored-parent-span");Gc._ALREADY_INSTRUMENTED=Symbol("already-instrumented");var dJ=class extends Oa.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(bNe.PACKAGE_NAME,bNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Oa.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Oa.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new Oa.InstrumentationNodeModuleDefinition("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,vNe(n)&&this._wrap(r.Model.prototype,"remove",this.patchOnModelMethods("remove",n)),RNe(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)),CNe(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=CNe(n);this._unwrap(r.Model.prototype,"save"),r.Model.prototype.$save=r.Model.prototype.save,vNe(n)&&this._unwrap(r.Model.prototype,"remove"),RNe(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&&vs.trace.getSpan(vs.context.active())===void 0)return r.apply(this,arguments);let s=this[Gc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l("aggregate",{options:this.options,aggregatePipeline:this._pipeline});n._dbSemconvStability&Oa.SemconvStability.OLD&&(c[nE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Oa.SemconvStability.STABLE&&(c[IS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this._model.collection,this._model?.modelName,"aggregate",c,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchQueryExec(t){let n=this;return r=>function(i){if(this[Gc._ALREADY_INSTRUMENTED])return r.apply(this,arguments);if(n.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return r.apply(this,arguments);let s=this[Gc._STORED_PARENT_SPAN],c={},{dbStatementSerializer:l}=n.getConfig();if(l){let h=l(this.op,{condition:this.getFilter?.()??this._conditions,updates:this._update,options:this.getOptions?.()??this.options,fields:this._fields});n._dbSemconvStability&Oa.SemconvStability.OLD&&(c[nE.ATTR_DB_STATEMENT]=h),n._dbSemconvStability&Oa.SemconvStability.STABLE&&(c[IS.ATTR_DB_QUERY_TEXT]=h)}let f=n._startSpan(this.mongooseCollection,this.model.modelName,this.op,c,s);return n._handleResponse(f,r,this,arguments,i,t)}}patchOnModelMethods(t,n){let r=this;return o=>function(s,c){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);let l={document:this};s&&!(s instanceof Function)&&(l.options=s);let f={},{dbStatementSerializer:h}=r.getConfig();if(h){let S=h(t,l);r._dbSemconvStability&Oa.SemconvStability.OLD&&(f[nE.ATTR_DB_STATEMENT]=S),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(f[IS.ATTR_DB_QUERY_TEXT]=S)}let y=r._startSpan(this.constructor.collection,this.constructor.modelName,t,f);return s instanceof Function&&(c=s,s=void 0),r._handleResponse(y,o,this,arguments,c,n)}}_patchDocumentUpdateMethods(t,n){let r=this;return o=>function(s,c,l){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);let f=l,h=s,y=c;typeof s=="function"?(f=s,h=void 0,y=void 0):typeof c=="function"&&(f=c,y=void 0);let S={},b=r.getConfig().dbStatementSerializer;if(b){let D=b(t,{condition:{_id:this._id},updates:h,options:y});r._dbSemconvStability&Oa.SemconvStability.OLD&&(S[nE.ATTR_DB_STATEMENT]=D),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(S[IS.ATTR_DB_QUERY_TEXT]=D)}let v=r._startSpan(this.constructor.collection,this.constructor.modelName,t,S),x=r._handleResponse(v,o,this,arguments,f,n);return x&&typeof x=="object"&&(x[Gc._ALREADY_INSTRUMENTED]=!0),x}}patchModelStatic(t,n){let r=this;return o=>function(s,c,l){if(r.getConfig().requireParentSpan&&vs.trace.getSpan(vs.context.active())===void 0)return o.apply(this,arguments);typeof c=="function"&&(l=c,c=void 0);let f={};switch(t){case"insertMany":f.documents=s;break;case"bulkWrite":f.operations=s;break;default:f.document=s;break}c!==void 0&&(f.options=c);let h={},{dbStatementSerializer:y}=r.getConfig();if(y){let b=y(t,f);r._dbSemconvStability&Oa.SemconvStability.OLD&&(h[nE.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Oa.SemconvStability.STABLE&&(h[IS.ATTR_DB_QUERY_TEXT]=b)}let S=r._startSpan(this.collection,this.modelName,t,h);return r._handleResponse(S,o,this,arguments,l,n)}}patchModelAggregate(){let t=this;return n=>function(){let o=vs.trace.getSpan(vs.context.active()),i=t._callOriginalFunction(()=>n.apply(this,arguments));return i&&(i[Gc._STORED_PARENT_SPAN]=o),i}}patchAndCaptureSpanContext(t){let n=this;return r=>function(){return this[Gc._STORED_PARENT_SPAN]=vs.trace.getSpan(vs.context.active()),n._callOriginalFunction(()=>r.apply(this,arguments))}}_startSpan(t,n,r,o,i){let s={...o,...(0,lJ.getAttributesFromCollection)(t,this._dbSemconvStability,this._netSemconvStability)};this._dbSemconvStability&Oa.SemconvStability.OLD&&(s[nE.ATTR_DB_OPERATION]=r,s[nE.ATTR_DB_SYSTEM]="mongoose"),this._dbSemconvStability&Oa.SemconvStability.STABLE&&(s[IS.ATTR_DB_OPERATION_NAME]=r,s[IS.ATTR_DB_SYSTEM_NAME]=nE.DB_SYSTEM_NAME_VALUE_MONGODB);let c=this._dbSemconvStability&Oa.SemconvStability.STABLE?`${r} ${t.name}`:`mongoose.${n}.${r}`;return this.tracer.startSpan(c,{kind:vs.SpanKind.CLIENT,attributes:s},i?vs.trace.setSpan(vs.context.active(),i):void 0)}_handleResponse(t,n,r,o,i,s=void 0){let c=this;if(i instanceof Function)return c._callOriginalFunction(()=>(0,lJ.handleCallbackResponse)(i,n,r,t,o,c.getConfig().responseHook,s));{let l=c._callOriginalFunction(()=>n.apply(r,o));return(0,lJ.handlePromiseResponse)(l,t,c.getConfig().responseHook,s)}}_callOriginalFunction(t){return this.getConfig().suppressInternalInstrumentation?vs.context.with((0,pTt.suppressTracing)(vs.context.active()),t):t()}};Gc.MongooseInstrumentation=dJ});var DNe=F(b4=>{"use strict";A();Object.defineProperty(b4,"__esModule",{value:!0});b4.MongooseInstrumentation=void 0;var gTt=xNe();Object.defineProperty(b4,"MongooseInstrumentation",{enumerable:!0,get:function(){return gTt.MongooseInstrumentation}})});var BNe,NNe,ONe,hTt,wNe,kNe=O(()=>{A();BNe=se(DNe(),1);gr();NNe="Mongoose",ONe=at(NNe,()=>new BNe.MongooseInstrumentation({responseHook(e){zr(e,"auto.db.otel.mongoose")}})),hTt=(()=>({name:NNe,setupOnce(){ONe()}})),wNe=hTt});var PNe=F(is=>{"use strict";A();Object.defineProperty(is,"__esModule",{value:!0});is.METRIC_DB_CLIENT_CONNECTIONS_USAGE=is.DB_SYSTEM_VALUE_MYSQL=is.ATTR_NET_PEER_PORT=is.ATTR_NET_PEER_NAME=is.ATTR_DB_USER=is.ATTR_DB_SYSTEM=is.ATTR_DB_STATEMENT=is.ATTR_DB_NAME=is.ATTR_DB_CONNECTION_STRING=void 0;is.ATTR_DB_CONNECTION_STRING="db.connection_string";is.ATTR_DB_NAME="db.name";is.ATTR_DB_STATEMENT="db.statement";is.ATTR_DB_SYSTEM="db.system";is.ATTR_DB_USER="db.user";is.ATTR_NET_PEER_NAME="net.peer.name";is.ATTR_NET_PEER_PORT="net.peer.port";is.DB_SYSTEM_VALUE_MYSQL="mysql";is.METRIC_DB_CLIENT_CONNECTIONS_USAGE="db.client.connections.usage"});var MNe=F(lO=>{"use strict";A();Object.defineProperty(lO,"__esModule",{value:!0});lO.AttributeNames=void 0;var _Tt;(function(e){e.MYSQL_VALUES="db.mysql.values"})(_Tt=lO.AttributeNames||(lO.AttributeNames={}))});var LNe=F(su=>{"use strict";A();Object.defineProperty(su,"__esModule",{value:!0});su.getPoolNameOld=su.arrayStringifyHelper=su.getSpanName=su.getDbValues=su.getDbQueryText=su.getJDBCString=su.getConfig=void 0;function ETt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}su.getConfig=ETt;function yTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}su.getJDBCString=yTt;function STt(e){return typeof e=="string"?e:e.sql}su.getDbQueryText=STt;function TTt(e,t){return pJ(typeof e=="string"?t:t||e.values)}su.getDbValues=TTt;function ITt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}su.getSpanName=ITt;function pJ(e){return e?`[${e.toString()}]`:""}su.arrayStringifyHelper=pJ;function bTt(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()}su.getPoolNameOld=bTt});var UNe=F(jv=>{"use strict";A();Object.defineProperty(jv,"__esModule",{value:!0});jv.PACKAGE_NAME=jv.PACKAGE_VERSION=void 0;jv.PACKAGE_VERSION="0.60.0";jv.PACKAGE_NAME="@opentelemetry/instrumentation-mysql"});var FNe=F(C4=>{"use strict";A();Object.defineProperty(C4,"__esModule",{value:!0});C4.MySQLInstrumentation=void 0;var zc=(ze(),Me(We)),Jd=on(),Hv=(Zn(),Me(Fr)),Qg=PNe(),CTt=MNe(),bS=LNe(),QNe=UNe(),fJ=class extends Jd.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(QNe.PACKAGE_NAME,QNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Jd.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Jd.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._connectionsUsageOld=this.meter.createUpDownCounter(Qg.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 Jd.InstrumentationNodeModuleDefinition("mysql",[">=2.0.0 <3"],t=>((0,Jd.isWrapped)(t.createConnection)&&this._unwrap(t,"createConnection"),this._wrap(t,"createConnection",this._patchCreateConnection()),(0,Jd.isWrapped)(t.createPool)&&this._unwrap(t,"createPool"),this._wrap(t,"createPool",this._patchCreatePool()),(0,Jd.isWrapped)(t.createPoolCluster)&&this._unwrap(t,"createPoolCluster"),this._wrap(t,"createPoolCluster",this._patchCreatePoolCluster()),t),t=>{t!==void 0&&(this._unwrap(t,"createConnection"),this._unwrap(t,"createPool"),this._unwrap(t,"createPoolCluster"))})]}_patchCreateConnection(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),i}}}_patchCreatePool(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"query",n._patchQuery(i)),n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"end",n._patchPoolEnd(i)),n._setPoolCallbacks(i,""),i}}}_patchPoolEnd(t){return n=>{let r=this;return function(i){let s=t._allConnections.length,c=t._freeConnections.length,l=s-c,f=(0,bS.getPoolNameOld)(t);r._connCountAdd(-l,f,"used"),r._connCountAdd(-c,f,"idle"),n.apply(t,arguments)}}}_patchCreatePoolCluster(){return t=>{let n=this;return function(o){let i=t(...arguments);return n._wrap(i,"getConnection",n._patchGetConnection(i)),n._wrap(i,"add",n._patchAdd(i)),i}}}_patchAdd(t){return n=>{let r=this;return function(i,s){if(!r._enabled)return r._unwrap(t,"add"),n.apply(t,arguments);n.apply(t,arguments);let c=t._nodes;if(c){let l=typeof i=="object"?"CLUSTER::"+t._lastId:String(i),f=c[l].pool;r._setPoolCallbacks(f,i)}}}}_patchGetConnection(t){return n=>{let r=this;return function(i,s,c){if(!r._enabled)return r._unwrap(t,"getConnection"),n.apply(t,arguments);if(arguments.length===1&&typeof i=="function"){let l=r._getConnectionCallbackPatchFn(i);return n.call(t,l)}if(arguments.length===2&&typeof s=="function"){let l=r._getConnectionCallbackPatchFn(s);return n.call(t,i,l)}if(arguments.length===3&&typeof c=="function"){let l=r._getConnectionCallbackPatchFn(c);return n.call(t,i,s,l)}return n.apply(t,arguments)}}}_getConnectionCallbackPatchFn(t){let n=this,r=zc.context.active();return function(o,i){i&&((0,Jd.isWrapped)(i.query)||n._wrap(i,"query",n._patchQuery(i))),typeof t=="function"&&zc.context.with(r,t,this,o,i)}}_patchQuery(t){return n=>{let r=this;return function(o,i,s){if(!r._enabled)return r._unwrap(t,"query"),n.apply(t,arguments);let c={},{host:l,port:f,database:h,user:y}=(0,bS.getConfig)(t.config),S=parseInt(f,10),b=(0,bS.getDbQueryText)(o);r._dbSemconvStability&Jd.SemconvStability.OLD&&(c[Qg.ATTR_DB_SYSTEM]=Qg.DB_SYSTEM_VALUE_MYSQL,c[Qg.ATTR_DB_CONNECTION_STRING]=(0,bS.getJDBCString)(l,f,h),c[Qg.ATTR_DB_NAME]=h,c[Qg.ATTR_DB_USER]=y,c[Qg.ATTR_DB_STATEMENT]=b),r._dbSemconvStability&Jd.SemconvStability.STABLE&&(c[Hv.ATTR_DB_SYSTEM_NAME]=Hv.DB_SYSTEM_NAME_VALUE_MYSQL,c[Hv.ATTR_DB_NAMESPACE]=h,c[Hv.ATTR_DB_QUERY_TEXT]=b),r._netSemconvStability&Jd.SemconvStability.OLD&&(c[Qg.ATTR_NET_PEER_NAME]=l,isNaN(S)||(c[Qg.ATTR_NET_PEER_PORT]=S)),r._netSemconvStability&Jd.SemconvStability.STABLE&&(c[Hv.ATTR_SERVER_ADDRESS]=l,isNaN(S)||(c[Hv.ATTR_SERVER_PORT]=S));let v=r.tracer.startSpan((0,bS.getSpanName)(o),{kind:zc.SpanKind.CLIENT,attributes:c});if(r.getConfig().enhancedDatabaseReporting){let k;Array.isArray(i)?k=i:arguments[2]&&(k=[i]),v.setAttribute(CTt.AttributeNames.MYSQL_VALUES,(0,bS.getDbValues)(o,k))}let x=Array.from(arguments).findIndex(k=>typeof k=="function"),D=zc.context.active();if(x===-1){let k=zc.context.with(zc.trace.setSpan(zc.context.active(),v),()=>n.apply(t,arguments));return zc.context.bind(D,k),k.on("error",Q=>v.setStatus({code:zc.SpanStatusCode.ERROR,message:Q.message})).on("end",()=>{v.end()})}else return r._wrap(arguments,x,r._patchCallbackQuery(v,D)),zc.context.with(zc.trace.setSpan(zc.context.active(),v),()=>n.apply(t,arguments))}}}_patchCallbackQuery(t,n){return r=>function(o,i,s){return o&&t.setStatus({code:zc.SpanStatusCode.ERROR,message:o.message}),t.end(),zc.context.with(n,()=>r(...arguments))}}_setPoolCallbacks(t,n){let r=n||(0,bS.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")})}};C4.MySQLInstrumentation=fJ});var GNe=F(v4=>{"use strict";A();Object.defineProperty(v4,"__esModule",{value:!0});v4.MySQLInstrumentation=void 0;var vTt=FNe();Object.defineProperty(v4,"MySQLInstrumentation",{enumerable:!0,get:function(){return vTt.MySQLInstrumentation}})});var zNe,jNe,HNe,RTt,$Ne,qNe=O(()=>{A();zNe=se(GNe(),1);gr();jNe="Mysql",HNe=at(jNe,()=>new zNe.MySQLInstrumentation({})),RTt=(()=>({name:jNe,setupOnce(){HNe()}})),$Ne=RTt});var mJ=F(na=>{"use strict";A();Object.defineProperty(na,"__esModule",{value:!0});na.DB_SYSTEM_VALUE_MYSQL=na.ATTR_NET_PEER_PORT=na.ATTR_NET_PEER_NAME=na.ATTR_DB_USER=na.ATTR_DB_SYSTEM=na.ATTR_DB_STATEMENT=na.ATTR_DB_NAME=na.ATTR_DB_CONNECTION_STRING=void 0;na.ATTR_DB_CONNECTION_STRING="db.connection_string";na.ATTR_DB_NAME="db.name";na.ATTR_DB_STATEMENT="db.statement";na.ATTR_DB_SYSTEM="db.system";na.ATTR_DB_USER="db.user";na.ATTR_NET_PEER_NAME="net.peer.name";na.ATTR_NET_PEER_PORT="net.peer.port";na.DB_SYSTEM_VALUE_MYSQL="mysql"});var gJ=F(R4=>{"use strict";A();Object.defineProperty(R4,"__esModule",{value:!0});R4.addSqlCommenterComment=void 0;var AJ=(ze(),Me(We)),xTt=br();function DTt(e){let t=e.indexOf("--");if(t>=0)return!0;if(e.indexOf("/*")<0)return!1;let r=e.indexOf("*/");return t<r}function BTt(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function NTt(e,t){if(typeof t!="string"||t.length===0||DTt(t))return t;let n=new xTt.W3CTraceContextPropagator,r={};n.inject(AJ.trace.setSpan(AJ.ROOT_CONTEXT,e),r,AJ.defaultTextMapSetter);let o=Object.keys(r).sort();if(o.length===0)return t;let i=o.map(s=>{let c=BTt(r[s]);return`${s}='${c}'`}).join(",");return`${t} /*${i}*/`}R4.addSqlCommenterComment=NTt});var VNe=F(Zd=>{"use strict";A();Object.defineProperty(Zd,"__esModule",{value:!0});Zd.getConnectionPrototypeToInstrument=Zd.once=Zd.getSpanName=Zd.getQueryText=Zd.getConnectionAttributes=void 0;var dO=mJ(),x4=on(),hJ=(Zn(),Me(Fr));function OTt(e,t,n){let{host:r,port:o,database:i,user:s}=wTt(e),c={};t&x4.SemconvStability.OLD&&(c[dO.ATTR_DB_CONNECTION_STRING]=kTt(r,o,i),c[dO.ATTR_DB_NAME]=i,c[dO.ATTR_DB_USER]=s),t&x4.SemconvStability.STABLE&&(c[hJ.ATTR_DB_NAMESPACE]=i);let l=parseInt(o,10);return n&x4.SemconvStability.OLD&&(c[dO.ATTR_NET_PEER_NAME]=r,isNaN(l)||(c[dO.ATTR_NET_PEER_PORT]=l)),n&x4.SemconvStability.STABLE&&(c[hJ.ATTR_SERVER_ADDRESS]=r,isNaN(l)||(c[hJ.ATTR_SERVER_PORT]=l)),c}Zd.getConnectionAttributes=OTt;function wTt(e){let{host:t,port:n,database:r,user:o}=e&&e.connectionConfig||e||{};return{host:t,port:n,database:r,user:o}}function kTt(e,t,n){let r=`jdbc:mysql://${e||"localhost"}`;return typeof t=="number"&&(r+=`:${t}`),typeof n=="string"&&(r+=`/${n}`),r}function PTt(e,t,n,r=!1,o=MTt){let[i,s]=typeof e=="string"?[e,n]:[e.sql,LTt(e)?n||e.values:n];try{return r?o(i):t&&s?t(i,s):i}catch{return"Could not determine the query due to an error in masking or formatting"}}Zd.getQueryText=PTt;function MTt(e){return e.replace(/\b\d+\b/g,"?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,"?")}function LTt(e){return"values"in e}function UTt(e){let t=typeof e=="object"?e.sql:e,n=t?.indexOf(" ");return typeof n=="number"&&n!==-1?t?.substring(0,n):t}Zd.getSpanName=UTt;var QTt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};Zd.once=QTt;function FTt(e){let t=e.prototype,n=Object.getPrototypeOf(t);return typeof n?.query=="function"&&typeof n?.execute=="function"?n:t}Zd.getConnectionPrototypeToInstrument=FTt});var YNe=F($v=>{"use strict";A();Object.defineProperty($v,"__esModule",{value:!0});$v.PACKAGE_NAME=$v.PACKAGE_VERSION=void 0;$v.PACKAGE_VERSION="0.60.0";$v.PACKAGE_NAME="@opentelemetry/instrumentation-mysql2"});var WNe=F(D4=>{"use strict";A();Object.defineProperty(D4,"__esModule",{value:!0});D4.MySQL2Instrumentation=void 0;var KNe=(ze(),Me(We)),Af=on(),_J=mJ(),JNe=gJ(),qv=VNe(),ZNe=YNe(),EJ=(Zn(),Me(Fr)),yJ=[">=1.4.2 <4"],SJ=class extends Af.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ZNe.PACKAGE_NAME,ZNe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Af.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Af.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,Af.isWrapped)(i.query)&&this._unwrap(i,"query"),this._wrap(i,"query",this._patchQuery(t,!1)),(0,Af.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 Af.InstrumentationNodeModuleDefinition("mysql2",yJ,i=>(n(i),i),()=>{},[new Af.InstrumentationNodeModuleFile("mysql2/promise.js",yJ,i=>(n(i),i),()=>{}),new Af.InstrumentationNodeModuleFile("mysql2/lib/connection.js",yJ,i=>{let s=(0,qv.getConnectionPrototypeToInstrument)(i);return r(s),i},i=>{if(i===void 0)return;let s=(0,qv.getConnectionPrototypeToInstrument)(i);o(s)})])]}_patchQuery(t,n){return r=>{let o=this;return function(i,s,c){let l;Array.isArray(s)?l=s:arguments[2]&&(l=[s]);let{maskStatement:f,maskStatementHook:h,responseHook:y}=o.getConfig(),S=(0,qv.getConnectionAttributes)(this.config,o._dbSemconvStability,o._netSemconvStability),b=(0,qv.getQueryText)(i,t,l,f,h);o._dbSemconvStability&Af.SemconvStability.OLD&&(S[_J.ATTR_DB_SYSTEM]=_J.DB_SYSTEM_VALUE_MYSQL,S[_J.ATTR_DB_STATEMENT]=b),o._dbSemconvStability&Af.SemconvStability.STABLE&&(S[EJ.ATTR_DB_SYSTEM_NAME]=EJ.DB_SYSTEM_NAME_VALUE_MYSQL,S[EJ.ATTR_DB_QUERY_TEXT]=b);let v=o.tracer.startSpan((0,qv.getSpanName)(i),{kind:KNe.SpanKind.CLIENT,attributes:S});!n&&o.getConfig().addSqlCommenterCommentToQueries&&(arguments[0]=i=typeof i=="string"?(0,JNe.addSqlCommenterComment)(v,i):Object.assign(i,{sql:(0,JNe.addSqlCommenterComment)(v,i.sql)}));let x=(0,qv.once)((D,k)=>{D?v.setStatus({code:KNe.SpanStatusCode.ERROR,message:D.message}):typeof y=="function"&&(0,Af.safeExecuteInTheMiddle)(()=>{y(v,{queryResults:k})},Q=>{Q&&o._diag.warn("Failed executing responseHook",Q)},!0),v.end()});if(arguments.length===1){typeof i.onResult=="function"&&o._wrap(i,"onResult",o._patchCallbackQuery(x));let D=r.apply(this,arguments);return D.once("error",k=>{x(k)}).once("result",k=>{x(void 0,k)}),D}return typeof arguments[1]=="function"?o._wrap(arguments,1,o._patchCallbackQuery(x)):typeof arguments[2]=="function"&&o._wrap(arguments,2,o._patchCallbackQuery(x)),r.apply(this,arguments)}}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r,o),n(...arguments)}}};D4.MySQL2Instrumentation=SJ});var XNe=F(B4=>{"use strict";A();Object.defineProperty(B4,"__esModule",{value:!0});B4.MySQL2Instrumentation=void 0;var GTt=WNe();Object.defineProperty(B4,"MySQL2Instrumentation",{enumerable:!0,get:function(){return GTt.MySQL2Instrumentation}})});var eOe,tOe,nOe,zTt,rOe,oOe=O(()=>{A();eOe=se(XNe(),1);gr();tOe="Mysql2",nOe=at(tOe,()=>new eOe.MySQL2Instrumentation({responseHook(e){zr(e,"auto.db.otel.mysql2")}})),zTt=(()=>({name:tOe,setupOnce(){nOe()}})),rOe=zTt});var iOe=F(au=>{"use strict";A();Object.defineProperty(au,"__esModule",{value:!0});au.DB_SYSTEM_VALUE_REDIS=au.DB_SYSTEM_NAME_VALUE_REDIS=au.ATTR_NET_PEER_PORT=au.ATTR_NET_PEER_NAME=au.ATTR_DB_SYSTEM=au.ATTR_DB_STATEMENT=au.ATTR_DB_CONNECTION_STRING=void 0;au.ATTR_DB_CONNECTION_STRING="db.connection_string";au.ATTR_DB_STATEMENT="db.statement";au.ATTR_DB_SYSTEM="db.system";au.ATTR_NET_PEER_NAME="net.peer.name";au.ATTR_NET_PEER_PORT="net.peer.port";au.DB_SYSTEM_NAME_VALUE_REDIS="redis";au.DB_SYSTEM_VALUE_REDIS="redis"});var sOe=F(N4=>{"use strict";A();Object.defineProperty(N4,"__esModule",{value:!0});N4.endSpan=void 0;var jTt=(ze(),Me(We)),HTt=(e,t)=>{t&&(e.recordException(t),e.setStatus({code:jTt.SpanStatusCode.ERROR,message:t.message})),e.end()};N4.endSpan=HTt});var w4=F(O4=>{"use strict";A();Object.defineProperty(O4,"__esModule",{value:!0});O4.defaultDbStatementSerializer=void 0;var $Tt=[{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}],qTt=(e,t)=>{if(Array.isArray(t)&&t.length){let n=$Tt.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};O4.defaultDbStatementSerializer=qTt});var aOe=F(Vv=>{"use strict";A();Object.defineProperty(Vv,"__esModule",{value:!0});Vv.PACKAGE_NAME=Vv.PACKAGE_VERSION=void 0;Vv.PACKAGE_VERSION="0.62.0";Vv.PACKAGE_NAME="@opentelemetry/instrumentation-ioredis"});var dOe=F(k4=>{"use strict";A();Object.defineProperty(k4,"__esModule",{value:!0});k4.IORedisInstrumentation=void 0;var rE=(ze(),Me(We)),jc=on(),oE=(Zn(),Me(Fr)),Hc=iOe(),uOe=on(),pO=sOe(),VTt=w4(),cOe=aOe(),lOe={requireParentSpan:!0},TJ=class extends jc.InstrumentationBase{_netSemconvStability;_dbSemconvStability;constructor(t={}){super(cOe.PACKAGE_NAME,cOe.PACKAGE_VERSION,{...lOe,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,jc.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,jc.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...lOe,...t})}init(){return[new jc.InstrumentationNodeModuleDefinition("ioredis",[">=2.0.0 <6"],(t,n)=>{let r=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,jc.isWrapped)(r.prototype.sendCommand)&&this._unwrap(r.prototype,"sendCommand"),this._wrap(r.prototype,"sendCommand",this._patchSendCommand(n)),(0,jc.isWrapped)(r.prototype.connect)&&this._unwrap(r.prototype,"connect"),this._wrap(r.prototype,"connect",this._patchConnection()),t},t=>{if(t===void 0)return;let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._unwrap(n.prototype,"sendCommand"),this._unwrap(n.prototype,"connect")})]}_patchSendCommand(t){return n=>this._traceSendCommand(n,t)}_patchConnection(){return t=>this._traceConnection(t)}_traceSendCommand(t,n){let r=this;return function(o){if(arguments.length<1||typeof o!="object")return t.apply(this,arguments);let i=r.getConfig(),s=i.dbStatementSerializer||VTt.defaultDbStatementSerializer,c=rE.trace.getSpan(rE.context.active())===void 0;if(i.requireParentSpan===!0&&c)return t.apply(this,arguments);let l={},{host:f,port:h}=this.options,y=s(o.name,o.args);r._dbSemconvStability&jc.SemconvStability.OLD&&(l[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,l[Hc.ATTR_DB_STATEMENT]=y,l[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${f}:${h}`),r._dbSemconvStability&jc.SemconvStability.STABLE&&(l[oE.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,l[oE.ATTR_DB_QUERY_TEXT]=y),r._netSemconvStability&jc.SemconvStability.OLD&&(l[Hc.ATTR_NET_PEER_NAME]=f,l[Hc.ATTR_NET_PEER_PORT]=h),r._netSemconvStability&jc.SemconvStability.STABLE&&(l[oE.ATTR_SERVER_ADDRESS]=f,l[oE.ATTR_SERVER_PORT]=h);let S=r.tracer.startSpan(o.name,{kind:rE.SpanKind.CLIENT,attributes:l}),{requestHook:b}=i;b&&(0,uOe.safeExecuteInTheMiddle)(()=>b(S,{moduleVersion:n,cmdName:o.name,cmdArgs:o.args}),v=>{v&&rE.diag.error("ioredis instrumentation: request hook failed",v)},!0);try{let v=t.apply(this,arguments),x=o.resolve;o.resolve=function(k){(0,uOe.safeExecuteInTheMiddle)(()=>i.responseHook?.(S,o.name,o.args,k),Q=>{Q&&rE.diag.error("ioredis instrumentation: response hook failed",Q)},!0),(0,pO.endSpan)(S,null),x(k)};let D=o.reject;return o.reject=function(k){(0,pO.endSpan)(S,k),D(k)},v}catch(v){throw(0,pO.endSpan)(S,v),v}}}_traceConnection(t){let n=this;return function(){let r=rE.trace.getSpan(rE.context.active())===void 0;if(n.getConfig().requireParentSpan===!0&&r)return t.apply(this,arguments);let o={},{host:i,port:s}=this.options;n._dbSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_DB_SYSTEM]=Hc.DB_SYSTEM_VALUE_REDIS,o[Hc.ATTR_DB_STATEMENT]="connect",o[Hc.ATTR_DB_CONNECTION_STRING]=`redis://${i}:${s}`),n._dbSemconvStability&jc.SemconvStability.STABLE&&(o[oE.ATTR_DB_SYSTEM_NAME]=Hc.DB_SYSTEM_NAME_VALUE_REDIS,o[oE.ATTR_DB_QUERY_TEXT]="connect"),n._netSemconvStability&jc.SemconvStability.OLD&&(o[Hc.ATTR_NET_PEER_NAME]=i,o[Hc.ATTR_NET_PEER_PORT]=s),n._netSemconvStability&jc.SemconvStability.STABLE&&(o[oE.ATTR_SERVER_ADDRESS]=i,o[oE.ATTR_SERVER_PORT]=s);let c=n.tracer.startSpan("connect",{kind:rE.SpanKind.CLIENT,attributes:o});try{let l=t.apply(this,arguments);return(0,pO.endSpan)(c,null),l}catch(l){throw(0,pO.endSpan)(c,l),l}}}};k4.IORedisInstrumentation=TJ});var pOe=F(P4=>{"use strict";A();Object.defineProperty(P4,"__esModule",{value:!0});P4.IORedisInstrumentation=void 0;var YTt=dOe();Object.defineProperty(P4,"IORedisInstrumentation",{enumerable:!0,get:function(){return YTt.IORedisInstrumentation}})});var M4=F(Yv=>{"use strict";A();Object.defineProperty(Yv,"__esModule",{value:!0});Yv.PACKAGE_NAME=Yv.PACKAGE_VERSION=void 0;Yv.PACKAGE_VERSION="0.62.0";Yv.PACKAGE_NAME="@opentelemetry/instrumentation-redis"});var fOe=F(iE=>{"use strict";A();Object.defineProperty(iE,"__esModule",{value:!0});iE.getTracedCreateStreamTrace=iE.getTracedCreateClient=iE.endSpan=void 0;var fO=(ze(),Me(We)),KTt=(e,t)=>{t&&e.setStatus({code:fO.SpanStatusCode.ERROR,message:t.message}),e.end()};iE.endSpan=KTt;var JTt=e=>function(){let n=e.apply(this,arguments);return fO.context.bind(fO.context.active(),n)};iE.getTracedCreateClient=JTt;var ZTt=e=>function(){return Object.prototype.hasOwnProperty.call(this,"stream")||Object.defineProperty(this,"stream",{get(){return this._patched_redis_stream},set(n){fO.context.bind(fO.context.active(),n),this._patched_redis_stream=n}}),e.apply(this,arguments)};iE.getTracedCreateStreamTrace=ZTt});var L4=F(uu=>{"use strict";A();Object.defineProperty(uu,"__esModule",{value:!0});uu.DB_SYSTEM_VALUE_REDIS=uu.DB_SYSTEM_NAME_VALUE_REDIS=uu.ATTR_NET_PEER_PORT=uu.ATTR_NET_PEER_NAME=uu.ATTR_DB_SYSTEM=uu.ATTR_DB_STATEMENT=uu.ATTR_DB_CONNECTION_STRING=void 0;uu.ATTR_DB_CONNECTION_STRING="db.connection_string";uu.ATTR_DB_STATEMENT="db.statement";uu.ATTR_DB_SYSTEM="db.system";uu.ATTR_NET_PEER_NAME="net.peer.name";uu.ATTR_NET_PEER_PORT="net.peer.port";uu.DB_SYSTEM_NAME_VALUE_REDIS="redis";uu.DB_SYSTEM_VALUE_REDIS="redis"});var AOe=F(Q4=>{"use strict";A();Object.defineProperty(Q4,"__esModule",{value:!0});Q4.RedisInstrumentationV2_V3=void 0;var jl=on(),U4=fOe(),mOe=M4(),mO=(ze(),Me(We)),AO=(Zn(),Me(Fr)),CS=L4(),WTt=w4(),IJ=class e extends jl.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(mOe.PACKAGE_NAME,mOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,jl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,jl.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new jl.InstrumentationNodeModuleDefinition("redis",[">=2.6.0 <4"],t=>((0,jl.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,jl.isWrapped)(t.RedisClient.prototype.create_stream)&&this._unwrap(t.RedisClient.prototype,"create_stream"),this._wrap(t.RedisClient.prototype,"create_stream",this._getPatchCreateStream()),(0,jl.isWrapped)(t.createClient)&&this._unwrap(t,"createClient"),this._wrap(t,"createClient",this._getPatchCreateClient()),t),t=>{t!==void 0&&(this._unwrap(t.RedisClient.prototype,"internal_send_command"),this._unwrap(t.RedisClient.prototype,"create_stream"),this._unwrap(t,"createClient"))})]}_getPatchInternalSendCommand(){let t=this;return function(r){return function(i){if(arguments.length!==1||typeof i!="object")return r.apply(this,arguments);let s=t.getConfig(),c=mO.trace.getSpan(mO.context.active())===void 0;if(s.requireParentSpan===!0&&c)return r.apply(this,arguments);let l=s?.dbStatementSerializer||WTt.defaultDbStatementSerializer,f={};t._semconvStability&jl.SemconvStability.OLD&&Object.assign(f,{[CS.ATTR_DB_SYSTEM]:CS.DB_SYSTEM_VALUE_REDIS,[CS.ATTR_DB_STATEMENT]:l(i.command,i.args)}),t._semconvStability&jl.SemconvStability.STABLE&&Object.assign(f,{[AO.ATTR_DB_SYSTEM_NAME]:CS.DB_SYSTEM_NAME_VALUE_REDIS,[AO.ATTR_DB_OPERATION_NAME]:i.command,[AO.ATTR_DB_QUERY_TEXT]:l(i.command,i.args)});let h=t.tracer.startSpan(`${e.COMPONENT}-${i.command}`,{kind:mO.SpanKind.CLIENT,attributes:f});if(this.connection_options){let S={};t._semconvStability&jl.SemconvStability.OLD&&Object.assign(S,{[CS.ATTR_NET_PEER_NAME]:this.connection_options.host,[CS.ATTR_NET_PEER_PORT]:this.connection_options.port}),t._semconvStability&jl.SemconvStability.STABLE&&Object.assign(S,{[AO.ATTR_SERVER_ADDRESS]:this.connection_options.host,[AO.ATTR_SERVER_PORT]:this.connection_options.port}),h.setAttributes(S)}this.address&&t._semconvStability&jl.SemconvStability.OLD&&h.setAttribute(CS.ATTR_DB_CONNECTION_STRING,`redis://${this.address}`);let y=arguments[0].callback;if(y){let S=mO.context.active();arguments[0].callback=function(v,x){if(s?.responseHook){let D=s.responseHook;(0,jl.safeExecuteInTheMiddle)(()=>{D(h,i.command,i.args,x)},k=>{k&&t._diag.error("Error executing responseHook",k)},!0)}return(0,U4.endSpan)(h,v),mO.context.with(S,y,this,...arguments)}}try{return r.apply(this,arguments)}catch(S){throw(0,U4.endSpan)(h,S),S}}}}_getPatchCreateClient(){return function(n){return(0,U4.getTracedCreateClient)(n)}}_getPatchCreateStream(){return function(n){return(0,U4.getTracedCreateStreamTrace)(n)}}};Q4.RedisInstrumentationV2_V3=IJ});var hOe=F(F4=>{"use strict";A();Object.defineProperty(F4,"__esModule",{value:!0});F4.getClientAttributes=void 0;var bJ=(Zn(),Me(Fr)),Kv=L4(),gOe=on();function XTt(e,t,n){let r={};return n&gOe.SemconvStability.OLD&&Object.assign(r,{[Kv.ATTR_DB_SYSTEM]:Kv.DB_SYSTEM_VALUE_REDIS,[Kv.ATTR_NET_PEER_NAME]:t?.socket?.host,[Kv.ATTR_NET_PEER_PORT]:t?.socket?.port,[Kv.ATTR_DB_CONNECTION_STRING]:eIt(e,t?.url)}),n&gOe.SemconvStability.STABLE&&Object.assign(r,{[bJ.ATTR_DB_SYSTEM_NAME]:Kv.DB_SYSTEM_NAME_VALUE_REDIS,[bJ.ATTR_SERVER_ADDRESS]:t?.socket?.host,[bJ.ATTR_SERVER_PORT]:t?.socket?.port}),r}F4.getClientAttributes=XTt;function eIt(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 SOe=F(G4=>{"use strict";A();Object.defineProperty(G4,"__esModule",{value:!0});G4.RedisInstrumentationV4_V5=void 0;var Wd=(ze(),Me(We)),Io=on(),_Oe=hOe(),tIt=w4(),EOe=M4(),CJ=(Zn(),Me(Fr)),nIt=L4(),gO=Symbol("opentelemetry.instrumentation.redis.open_spans"),yOe=Symbol("opentelemetry.instrumentation.redis.multi_command_options"),vJ=class e extends Io.InstrumentationBase{static COMPONENT="redis";_semconvStability;constructor(t={}){super(EOe.PACKAGE_NAME,EOe.PACKAGE_VERSION,t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig(t),this._semconvStability=t.semconvStability?t.semconvStability:(0,Io.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[this._getInstrumentationNodeModuleDefinition("@redis/client"),this._getInstrumentationNodeModuleDefinition("@node-redis/client")]}_getInstrumentationNodeModuleDefinition(t){let n=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/commander.js`,["^1.0.0"],(i,s)=>{let c=i.transformCommandArguments;if(!c)return this._diag.error("internal instrumentation error, missing transformCommandArguments function"),i;let l=s?.startsWith("1.0.")?"extendWithCommands":"attachCommands";return(0,Io.isWrapped)(i?.[l])&&this._unwrap(i,l),this._wrap(i,l,this._getPatchExtendWithCommands(c)),i},i=>{(0,Io.isWrapped)(i?.extendWithCommands)&&this._unwrap(i,"extendWithCommands"),(0,Io.isWrapped)(i?.attachCommands)&&this._unwrap(i,"attachCommands")}),r=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/multi-command.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),this._wrap(s,"exec",this._getPatchMultiCommandsExec(!1)),(0,Io.isWrapped)(s?.execAsPipeline)&&this._unwrap(s,"execAsPipeline"),this._wrap(s,"execAsPipeline",this._getPatchMultiCommandsExec(!0)),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand"),this._wrap(s,"addCommand",this._getPatchMultiCommandsAddCommand()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.exec)&&this._unwrap(s,"exec"),(0,Io.isWrapped)(s?.addCommand)&&this._unwrap(s,"addCommand")}),o=new Io.InstrumentationNodeModuleFile(`${t}/dist/lib/client/index.js`,["^1.0.0","^5.0.0"],i=>{let s=i?.default?.prototype;return s?.multi&&((0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),this._wrap(s,"multi",this._getPatchRedisClientMulti())),s?.MULTI&&((0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),this._wrap(s,"MULTI",this._getPatchRedisClientMulti())),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand"),this._wrap(s,"sendCommand",this._getPatchRedisClientSendCommand()),this._wrap(s,"connect",this._getPatchedClientConnect()),i},i=>{let s=i?.default?.prototype;(0,Io.isWrapped)(s?.multi)&&this._unwrap(s,"multi"),(0,Io.isWrapped)(s?.MULTI)&&this._unwrap(s,"MULTI"),(0,Io.isWrapped)(s?.sendCommand)&&this._unwrap(s,"sendCommand")});return new Io.InstrumentationNodeModuleDefinition(t,["^1.0.0","^5.0.0"],i=>i,()=>{},[n,r,o])}_getPatchExtendWithCommands(t){let n=this;return function(o){return function(s){if(s?.BaseClass?.name!=="RedisClient")return o.apply(this,arguments);let c=s.executor;return s.executor=function(l,f){let h=t(l,f).args;return n._traceClientCommand(c,this,arguments,h)},o.apply(this,arguments)}}}_getPatchMultiCommandsExec(t){let n=this;return function(o){return function(){let s=o.apply(this,arguments);return typeof s?.then!="function"?(n._diag.error("non-promise result when patching exec/execAsPipeline"),s):s.then(c=>{let l=this[gO];return n._endSpansWithRedisReplies(l,c,t),c}).catch(c=>{let l=this[gO];if(!l)n._diag.error("cannot find open spans to end for multi/pipeline");else{let f=c.constructor.name==="MultiErrorReply"?c.replies:new Array(l.length).fill(c);n._endSpansWithRedisReplies(l,f,t)}return Promise.reject(c)})}}}_getPatchMultiCommandsAddCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchRedisClientMulti(){return function(n){return function(){let o=n.apply(this,arguments);return o[yOe]=this.options,o}}}_getPatchRedisClientSendCommand(){let t=this;return function(r){return function(i){return t._traceClientCommand(r,this,arguments,i)}}}_getPatchedClientConnect(){let t=this;return function(r){return function(){let i=this.options,s=(0,_Oe.getClientAttributes)(t._diag,i,t._semconvStability),c=t.tracer.startSpan(`${e.COMPONENT}-connect`,{kind:Wd.SpanKind.CLIENT,attributes:s});return Wd.context.with(Wd.trace.setSpan(Wd.context.active(),c),()=>r.apply(this)).then(f=>(c.end(),f)).catch(f=>(c.recordException(f),c.setStatus({code:Wd.SpanStatusCode.ERROR,message:f.message}),c.end(),Promise.reject(f)))}}}_traceClientCommand(t,n,r,o){if(Wd.trace.getSpan(Wd.context.active())===void 0&&this.getConfig().requireParentSpan)return t.apply(n,r);let s=n.options||n[yOe],c=o[0],l=o.slice(1),f=this.getConfig().dbStatementSerializer||tIt.defaultDbStatementSerializer,h=(0,_Oe.getClientAttributes)(this._diag,s,this._semconvStability);this._semconvStability&Io.SemconvStability.STABLE&&(h[CJ.ATTR_DB_OPERATION_NAME]=c);try{let b=f(c,l);b!=null&&(this._semconvStability&Io.SemconvStability.OLD&&(h[nIt.ATTR_DB_STATEMENT]=b),this._semconvStability&Io.SemconvStability.STABLE&&(h[CJ.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:Wd.SpanKind.CLIENT,attributes:h}),S=Wd.context.with(Wd.trace.setSpan(Wd.context.active(),y),()=>t.apply(n,r));if(typeof S?.then=="function")S.then(b=>{this._endSpanWithResponse(y,c,l,b,void 0)},b=>{this._endSpanWithResponse(y,c,l,null,b)});else{let b=S;b[gO]=b[gO]||[],b[gO].push({span:y,commandName:c,commandArgs:l})}return S}_endSpansWithRedisReplies(t,n,r=!1){if(!t)return this._diag.error("cannot find open spans to end for redis multi/pipeline");if(n.length!==t.length)return this._diag.error("number of multi command spans does not match response from redis");let o=t.map(c=>c.commandName),s=o.every(c=>c===o[0])?(r?"PIPELINE ":"MULTI ")+o[0]:r?"PIPELINE":"MULTI";for(let c=0;c<t.length;c++){let{span:l,commandArgs:f}=t[c],h=n[c],[y,S]=h instanceof Error?[null,h]:[h,void 0];this._semconvStability&Io.SemconvStability.STABLE&&l.setAttribute(CJ.ATTR_DB_OPERATION_NAME,s),this._endSpanWithResponse(l,o[c],f,y,S)}}_endSpanWithResponse(t,n,r,o,i){let{responseHook:s}=this.getConfig();if(!i&&s)try{s(t,n,r,o)}catch(c){this._diag.error("responseHook throw an exception",c)}i&&(t.recordException(i),t.setStatus({code:Wd.SpanStatusCode.ERROR,message:i?.message})),t.end()}};G4.RedisInstrumentationV4_V5=vJ});var bOe=F(z4=>{"use strict";A();Object.defineProperty(z4,"__esModule",{value:!0});z4.RedisInstrumentation=void 0;var rIt=on(),TOe=M4(),oIt=AOe(),iIt=SOe(),IOe={requireParentSpan:!1},RJ=class extends rIt.InstrumentationBase{instrumentationV2_V3;instrumentationV4_V5;initialized=!1;constructor(t={}){let n={...IOe,...t};super(TOe.PACKAGE_NAME,TOe.PACKAGE_VERSION,n),this.instrumentationV2_V3=new oIt.RedisInstrumentationV2_V3(this.getConfig()),this.instrumentationV4_V5=new iIt.RedisInstrumentationV4_V5(this.getConfig()),this.initialized=!0}setConfig(t={}){let n={...IOe,...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())}};z4.RedisInstrumentation=RJ});var COe=F(j4=>{"use strict";A();Object.defineProperty(j4,"__esModule",{value:!0});j4.RedisInstrumentation=void 0;var sIt=bOe();Object.defineProperty(j4,"RedisInstrumentation",{enumerable:!0,get:function(){return sIt.RedisInstrumentation}})});function hO(e,t){return e.includes(t.toLowerCase())}function DJ(e){return hO(xJ,e)?"cache.get":hO(uIt,e)?"cache.put":void 0}function cIt(e,t){return t.some(n=>e.startsWith(n))}function ROe(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)?vOe(o.map(i=>n(i))):["<unknown>"],r=t[0];return hO(aIt,e)&&r!=null?n(r):vOe(t.map(o=>n(o)))}catch{return}}function xOe(e,t,n){if(!DJ(e))return!1;for(let r of t)if(cIt(r,n))return!0;return!1}function DOe(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 vOe(e){let t=[],n=r=>{r.forEach(o=>{Array.isArray(o)?n(o):t.push(o)})};return n(e),t}var aIt,xJ,uIt,BOe=O(()=>{A();aIt=["get","set","setex"],xJ=["get","mget"],uIt=["set","setex"]});var NOe,OOe,H4,_O,wOe,lIt,dIt,kOe,pIt,POe,MOe=O(()=>{A();NOe=se(pOe(),1),OOe=se(COe(),1);dt();gr();BOe();H4="Redis",_O={},wOe=(e,t,n,r)=>{e.setAttribute(kt,"auto.db.otel.redis");let o=ROe(t,n),i=DJ(t);if(!o||!i||!_O.cachePrefixes||!xOe(t,o,_O.cachePrefixes))return;let s=Ot(e).data["net.peer.name"],c=Ot(e).data["net.peer.port"];c&&s&&e.setAttributes({"network.peer.address":s,"network.peer.port":c});let l=DOe(r);l&&e.setAttribute(wq,l),hO(xJ,t)&&l!==void 0&&e.setAttribute(Nq,l>0),e.setAttributes({[Xt]:i,[Oq]:o});let f=o.join(", ");e.updateName(_O.maxCacheKeyLength?y_(f,_O.maxCacheKeyLength):f)},lIt=at(`${H4}.IORedis`,()=>new NOe.IORedisInstrumentation({responseHook:wOe})),dIt=at(`${H4}.Redis`,()=>new OOe.RedisInstrumentation({responseHook:wOe})),kOe=Object.assign(()=>{lIt(),dIt()},{id:H4}),pIt=((e={})=>({name:H4,setupOnce(){_O=e,kOe()}})),POe=pIt});var LOe=F($4=>{"use strict";A();Object.defineProperty($4,"__esModule",{value:!0});$4.EVENT_LISTENERS_SET=void 0;$4.EVENT_LISTENERS_SET=Symbol("opentelemetry.instrumentation.pg.eventListenersSet")});var BJ=F(EO=>{"use strict";A();Object.defineProperty(EO,"__esModule",{value:!0});EO.AttributeNames=void 0;var fIt;(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"})(fIt=EO.AttributeNames||(EO.AttributeNames={}))});var NJ=F(Br=>{"use strict";A();Object.defineProperty(Br,"__esModule",{value:!0});Br.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS=Br.METRIC_DB_CLIENT_CONNECTION_COUNT=Br.DB_SYSTEM_VALUE_POSTGRESQL=Br.DB_CLIENT_CONNECTION_STATE_VALUE_USED=Br.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE=Br.ATTR_NET_PEER_PORT=Br.ATTR_NET_PEER_NAME=Br.ATTR_DB_USER=Br.ATTR_DB_SYSTEM=Br.ATTR_DB_STATEMENT=Br.ATTR_DB_NAME=Br.ATTR_DB_CONNECTION_STRING=Br.ATTR_DB_CLIENT_CONNECTION_STATE=Br.ATTR_DB_CLIENT_CONNECTION_POOL_NAME=void 0;Br.ATTR_DB_CLIENT_CONNECTION_POOL_NAME="db.client.connection.pool.name";Br.ATTR_DB_CLIENT_CONNECTION_STATE="db.client.connection.state";Br.ATTR_DB_CONNECTION_STRING="db.connection_string";Br.ATTR_DB_NAME="db.name";Br.ATTR_DB_STATEMENT="db.statement";Br.ATTR_DB_SYSTEM="db.system";Br.ATTR_DB_USER="db.user";Br.ATTR_NET_PEER_NAME="net.peer.name";Br.ATTR_NET_PEER_PORT="net.peer.port";Br.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE="idle";Br.DB_CLIENT_CONNECTION_STATE_VALUE_USED="used";Br.DB_SYSTEM_VALUE_POSTGRESQL="postgresql";Br.METRIC_DB_CLIENT_CONNECTION_COUNT="db.client.connection.count";Br.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS="db.client.connection.pending_requests"});var OJ=F(yO=>{"use strict";A();Object.defineProperty(yO,"__esModule",{value:!0});yO.SpanNames=void 0;var mIt;(function(e){e.QUERY_PREFIX="pg.query",e.CONNECT="pg.connect",e.POOL_CONNECT="pg-pool.connect"})(mIt=yO.SpanNames||(yO.SpanNames={}))});var HOe=F(ir=>{"use strict";A();Object.defineProperty(ir,"__esModule",{value:!0});ir.sanitizedErrorMessage=ir.isObjectWithTextString=ir.getErrorMessage=ir.patchClientConnectCallback=ir.patchCallbackPGPool=ir.updateCounter=ir.getPoolName=ir.patchCallback=ir.handleExecutionResult=ir.handleConfigQuery=ir.shouldSkipInstrumentation=ir.getSemanticAttributesFromPoolConnection=ir.getSemanticAttributesFromConnection=ir.getConnectionString=ir.parseAndMaskConnectionString=ir.parseNormalizedOperationName=ir.getQuerySpanName=void 0;var sE=(ze(),Me(We)),q4=BJ(),Xd=(Zn(),Me(Fr)),Ai=NJ(),vS=on(),UOe=OJ();function QOe(e,t){if(!t)return UOe.SpanNames.QUERY_PREFIX;let n=typeof t.name=="string"&&t.name?t.name:FOe(t.text);return`${UOe.SpanNames.QUERY_PREFIX}:${n}${e?` ${e}`:""}`}ir.getQuerySpanName=QOe;function FOe(e){let t=e.trim(),n=t.indexOf(" "),r=n===-1?t:t.slice(0,n);return r=r.toUpperCase(),r.endsWith(";")?r.slice(0,-1):r}ir.parseNormalizedOperationName=FOe;function GOe(e){try{let t=new URL(e);return t.username="",t.password="",t.toString()}catch{return"postgresql://localhost:5432/"}}ir.parseAndMaskConnectionString=GOe;function wJ(e){if("connectionString"in e&&e.connectionString)return GOe(e.connectionString);let t=e.host||"localhost",n=e.port||5432,r=e.database||"";return`postgresql://${t}:${n}/${r}`}ir.getConnectionString=wJ;function V4(e){if(Number.isInteger(e))return e}function zOe(e,t){let n={};return t&vS.SemconvStability.OLD&&(n={...n,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:e.database,[Ai.ATTR_DB_CONNECTION_STRING]:wJ(e),[Ai.ATTR_DB_USER]:e.user,[Ai.ATTR_NET_PEER_NAME]:e.host,[Ai.ATTR_NET_PEER_PORT]:V4(e.port)}),t&vS.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]:V4(e.port)}),n}ir.getSemanticAttributesFromConnection=zOe;function AIt(e,t){let n;try{n=e.connectionString?new URL(e.connectionString):void 0}catch{n=void 0}let r={[q4.AttributeNames.IDLE_TIMEOUT_MILLIS]:e.idleTimeoutMillis,[q4.AttributeNames.MAX_CLIENT]:e.maxClient};return t&vS.SemconvStability.OLD&&(r={...r,[Ai.ATTR_DB_SYSTEM]:Ai.DB_SYSTEM_VALUE_POSTGRESQL,[Ai.ATTR_DB_NAME]:n?.pathname.slice(1)??e.database,[Ai.ATTR_DB_CONNECTION_STRING]:wJ(e),[Ai.ATTR_NET_PEER_NAME]:n?.hostname??e.host,[Ai.ATTR_NET_PEER_PORT]:Number(n?.port)||V4(e.port),[Ai.ATTR_DB_USER]:n?.username??e.user}),t&vS.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)||V4(e.port)}),r}ir.getSemanticAttributesFromPoolConnection=AIt;function gIt(e){return e.requireParentSpan===!0&&sE.trace.getSpan(sE.context.active())===void 0}ir.shouldSkipInstrumentation=gIt;function hIt(e,t,n,r){let{connectionParameters:o}=this,i=o.database,s=QOe(i,r),c=e.startSpan(s,{kind:sE.SpanKind.CLIENT,attributes:zOe(o,n)});if(!r)return c;if(r.text&&(n&vS.SemconvStability.OLD&&c.setAttribute(Ai.ATTR_DB_STATEMENT,r.text),n&vS.SemconvStability.STABLE&&c.setAttribute(Xd.ATTR_DB_QUERY_TEXT,r.text)),t.enhancedDatabaseReporting&&Array.isArray(r.values))try{let l=r.values.map(f=>f==null?"null":f instanceof Buffer?f.toString():typeof f=="object"?typeof f.toPostgres=="function"?f.toPostgres():JSON.stringify(f):f.toString());c.setAttribute(q4.AttributeNames.PG_VALUES,l)}catch(l){sE.diag.error("failed to stringify ",r.values,l)}return typeof r.name=="string"&&c.setAttribute(q4.AttributeNames.PG_PLAN,r.name),c}ir.handleConfigQuery=hIt;function jOe(e,t,n){typeof e.responseHook=="function"&&(0,vS.safeExecuteInTheMiddle)(()=>{e.responseHook(t,{data:n})},r=>{r&&sE.diag.error("Error running response hook",r)},!0)}ir.handleExecutionResult=jOe;function _It(e,t,n,r,o){return function(s,c){s?(Object.prototype.hasOwnProperty.call(s,"code")&&(r[Xd.ATTR_ERROR_TYPE]=s.code),s instanceof Error&&t.recordException(Y4(s)),t.setStatus({code:sE.SpanStatusCode.ERROR,message:s.message})):jOe(e,t,c),o(),t.end(),n.call(this,s,c)}}ir.patchCallback=_It;function EIt(e){let t="";return t+=(e?.host?`${e.host}`:"unknown_host")+":",t+=(e?.port?`${e.port}`:"unknown_port")+"/",t+=e?.database?`${e.database}`:"unknown_database",t.trim()}ir.getPoolName=EIt;function yIt(e,t,n,r,o){let i=t.totalCount,s=t.waitingCount,c=t.idleCount,l=i-c;return n.add(l-o.used,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_USED,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),n.add(c-o.idle,{[Ai.ATTR_DB_CLIENT_CONNECTION_STATE]:Ai.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE,[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),r.add(s-o.pending,{[Ai.ATTR_DB_CLIENT_CONNECTION_POOL_NAME]:e}),{used:l,idle:c,pending:s}}ir.updateCounter=yIt;function SIt(e,t){return function(r,o,i){r&&(r instanceof Error&&e.recordException(Y4(r)),e.setStatus({code:sE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.call(this,r,o,i)}}ir.patchCallbackPGPool=SIt;function TIt(e,t){return function(r){r&&(r instanceof Error&&e.recordException(Y4(r)),e.setStatus({code:sE.SpanStatusCode.ERROR,message:r.message})),e.end(),t.apply(this,arguments)}}ir.patchClientConnectCallback=TIt;function IIt(e){return typeof e=="object"&&e!==null&&"message"in e?String(e.message):void 0}ir.getErrorMessage=IIt;function bIt(e){return typeof e=="object"&&typeof e?.text=="string"}ir.isObjectWithTextString=bIt;function Y4(e){let t=e?.name??"PostgreSQLError",n=e?.code??"UNKNOWN";return`PostgreSQL error of type '${t}' occurred (code: ${n})`}ir.sanitizedErrorMessage=Y4});var $Oe=F(Jv=>{"use strict";A();Object.defineProperty(Jv,"__esModule",{value:!0});Jv.PACKAGE_NAME=Jv.PACKAGE_VERSION=void 0;Jv.PACKAGE_VERSION="0.66.0";Jv.PACKAGE_NAME="@opentelemetry/instrumentation-pg"});var ZOe=F(J4=>{"use strict";A();Object.defineProperty(J4,"__esModule",{value:!0});J4.PgInstrumentation=void 0;var qu=on(),Hr=(ze(),Me(We)),qOe=LOe(),Wo=HOe(),VOe=gJ(),YOe=$Oe(),KOe=OJ(),K4=br(),gf=(Zn(),Me(Fr)),SO=NJ();function Zv(e){return e[Symbol.toStringTag]==="Module"?e.default:e}var kJ=class extends qu.InstrumentationBase{_connectionsCounter={used:0,idle:0,pending:0};_semconvStability;constructor(t={}){super(YOe.PACKAGE_NAME,YOe.PACKAGE_VERSION,t),this._semconvStability=(0,qu.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}_updateMetricInstruments(){this._operationDuration=this.meter.createHistogram(gf.METRIC_DB_CLIENT_OPERATION_DURATION,{description:"Duration of database client operations.",unit:"s",valueType:Hr.ValueType.DOUBLE,advice:{explicitBucketBoundaries:[.001,.005,.01,.05,.1,.5,1,5,10]}}),this._connectionsCounter={idle:0,pending:0,used:0},this._connectionsCount=this.meter.createUpDownCounter(SO.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(SO.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS,{description:"The number of current pending requests for an open connection.",unit:"{connection}"})}init(){let t=[">=8.0.3 <9"],n=[">=2.0.0 <4"],r=new qu.InstrumentationNodeModuleFile("pg/lib/native/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),o=new qu.InstrumentationNodeModuleFile("pg/lib/client.js",t,this._patchPgClient.bind(this),this._unpatchPgClient.bind(this)),i=new qu.InstrumentationNodeModuleDefinition("pg",t,c=>{let l=Zv(c);return this._patchPgClient(l.Client),c},c=>{let l=Zv(c);return this._unpatchPgClient(l.Client),c},[o,r]),s=new qu.InstrumentationNodeModuleDefinition("pg-pool",n,c=>{let l=Zv(c);return(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect"),this._wrap(l.prototype,"connect",this._getPoolConnectPatch()),l},c=>{let l=Zv(c);(0,qu.isWrapped)(l.prototype.connect)&&this._unwrap(l.prototype,"connect")});return[i,s]}_patchPgClient(t){if(!t)return;let n=Zv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),this._wrap(n.prototype,"query",this._getClientQueryPatch()),this._wrap(n.prototype,"connect",this._getClientConnectPatch()),t}_unpatchPgClient(t){let n=Zv(t);return(0,qu.isWrapped)(n.prototype.query)&&this._unwrap(n.prototype,"query"),(0,qu.isWrapped)(n.prototype.connect)&&this._unwrap(n.prototype,"connect"),t}_getClientConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i)||i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(KOe.SpanNames.CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromConnection(this,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchClientConnectCallback(s,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),s),()=>n.call(this,o));return JOe(s,c)}}recordOperationDuration(t,n){let r={},o=[gf.ATTR_DB_NAMESPACE,gf.ATTR_ERROR_TYPE,gf.ATTR_SERVER_PORT,gf.ATTR_SERVER_ADDRESS,gf.ATTR_DB_OPERATION_NAME];this._semconvStability&qu.SemconvStability.OLD&&o.push(SO.ATTR_DB_SYSTEM),this._semconvStability&qu.SemconvStability.STABLE&&o.push(gf.ATTR_DB_SYSTEM_NAME),o.forEach(s=>{s in t&&(r[s]=t[s])});let i=(0,K4.hrTimeToMilliseconds)((0,K4.hrTimeDuration)(n,(0,K4.hrTime)()))/1e3;this._operationDuration.record(i,r)}_getClientQueryPatch(){let t=this;return n=>(this._diag.debug("Patching pg.Client.prototype.query"),function(...o){if(Wo.shouldSkipInstrumentation(t.getConfig()))return n.apply(this,o);let i=(0,K4.hrTime)(),s=o[0],c=typeof s=="string",l=Wo.isObjectWithTextString(s),f=c?{text:s,values:Array.isArray(o[1])?o[1]:void 0}:l?{...s,name:s.name,text:s.text,values:s.values??(Array.isArray(o[1])?o[1]:void 0)}:void 0,h={[SO.ATTR_DB_SYSTEM]:SO.DB_SYSTEM_VALUE_POSTGRESQL,[gf.ATTR_DB_NAMESPACE]:this.database,[gf.ATTR_SERVER_PORT]:this.connectionParameters.port,[gf.ATTR_SERVER_ADDRESS]:this.connectionParameters.host};f?.text&&(h[gf.ATTR_DB_OPERATION_NAME]=Wo.parseNormalizedOperationName(f?.text));let y=()=>{t.recordOperationDuration(h,i)},S=t.getConfig(),b=Wo.handleConfigQuery.call(this,t.tracer,S,t._semconvStability,f);if(S.addSqlCommenterCommentToQueries&&(c?o[0]=(0,VOe.addSqlCommenterComment)(b,s):l&&!("name"in s)&&(o[0]={...s,text:(0,VOe.addSqlCommenterComment)(b,s.text)})),o.length>0){let D=Hr.trace.getSpan(Hr.context.active());if(typeof o[o.length-1]=="function")o[o.length-1]=Wo.patchCallback(S,b,o[o.length-1],h,y),D&&(o[o.length-1]=Hr.context.bind(Hr.context.active(),o[o.length-1]));else if(typeof f?.callback=="function"){let k=Wo.patchCallback(t.getConfig(),b,f.callback,h,y);D&&(k=Hr.context.bind(Hr.context.active(),k)),o[0].callback=k}}let{requestHook:v}=S;typeof v=="function"&&f&&(0,qu.safeExecuteInTheMiddle)(()=>{let{database:D,host:k,port:Q,user:z}=this.connectionParameters;v(b,{connection:{database:D,host:k,port:Q,user:z},query:{text:f.text,values:f.values,name:f.name}})},D=>{D&&t._diag.error("Error running query hook",D)},!0);let x;try{x=n.apply(this,o)}catch(D){throw D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(D)}),b.end(),D}return x instanceof Promise?x.then(D=>new Promise(k=>{Wo.handleExecutionResult(t.getConfig(),b,D),y(),b.end(),k(D)})).catch(D=>new Promise((k,Q)=>{D instanceof Error&&b.recordException(Wo.sanitizedErrorMessage(D)),b.setStatus({code:Hr.SpanStatusCode.ERROR,message:D.message}),y(),b.end(),Q(D)})):x})}_setPoolConnectEventListeners(t){if(t[qOe.EVENT_LISTENERS_SET])return;let n=Wo.getPoolName(t.options);t.on("connect",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("acquire",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("remove",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t.on("release",()=>{this._connectionsCounter=Wo.updateCounter(n,t,this._connectionsCount,this._connectionPendingRequests,this._connectionsCounter)}),t[qOe.EVENT_LISTENERS_SET]=!0}_getPoolConnectPatch(){let t=this;return n=>function(o){let i=t.getConfig();if(Wo.shouldSkipInstrumentation(i))return n.call(this,o);if(t._setPoolConnectEventListeners(this),i.ignoreConnectSpans)return n.call(this,o);let s=t.tracer.startSpan(KOe.SpanNames.POOL_CONNECT,{kind:Hr.SpanKind.CLIENT,attributes:Wo.getSemanticAttributesFromPoolConnection(this.options,t._semconvStability)});if(o){let l=Hr.trace.getSpan(Hr.context.active());o=Wo.patchCallbackPGPool(s,o),l&&(o=Hr.context.bind(Hr.context.active(),o))}let c=Hr.context.with(Hr.trace.setSpan(Hr.context.active(),s),()=>n.call(this,o));return JOe(s,c)}}};J4.PgInstrumentation=kJ;function JOe(e,t){if(!(t instanceof Promise))return t;let n=t;return Hr.context.bind(Hr.context.active(),n.then(r=>(e.end(),r)).catch(r=>(r instanceof Error&&e.recordException(Wo.sanitizedErrorMessage(r)),e.setStatus({code:Hr.SpanStatusCode.ERROR,message:Wo.getErrorMessage(r)}),e.end(),Promise.reject(r))))}});var WOe=F(Wv=>{"use strict";A();Object.defineProperty(Wv,"__esModule",{value:!0});Wv.AttributeNames=Wv.PgInstrumentation=void 0;var CIt=ZOe();Object.defineProperty(Wv,"PgInstrumentation",{enumerable:!0,get:function(){return CIt.PgInstrumentation}});var vIt=BJ();Object.defineProperty(Wv,"AttributeNames",{enumerable:!0,get:function(){return vIt.AttributeNames}})});var XOe,ewe,twe,RIt,nwe,rwe=O(()=>{A();XOe=se(WOe(),1);gr();ewe="Postgres",twe=at(ewe,XOe.PgInstrumentation,e=>({requireParentSpan:!0,requestHook(t){zr(t,"auto.db.otel.postgres")},ignoreConnectSpans:e?.ignoreConnectSpans??!1})),RIt=(e=>({name:ewe,setupOnce(){twe(e)}})),nwe=RIt});var aE,MJ,owe,xIt,DIt,iwe,PJ,BIt,swe,awe=O(()=>{A();ze();aE=se(on(),1);Zn();dt();gr();gS();MJ="PostgresJs",owe=[">=3.0.0 <4"],xIt=/^(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|ALTER)/i,DIt=Symbol.for("sentry.query.from.instrumented.sql"),iwe=at(MJ,e=>new PJ({requireParentSpan:e?.requireParentSpan??!0,requestHook:e?.requestHook})),PJ=class extends aE.InstrumentationBase{constructor(t){super("sentry-postgres-js",Wn,t)}init(){let t=new aE.InstrumentationNodeModuleDefinition("postgres",owe,n=>{try{return this._patchPostgres(n)}catch(r){return bs&&J.error("Failed to patch postgres module:",r),n}},n=>n);return["src","cf/src","cjs/src"].forEach(n=>{t.files.push(new aE.InstrumentationNodeModuleFile(`postgres/${n}/query.js`,owe,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 bs&&J.warn("postgres module does not export a function. Skipping instrumentation."),t;let o=this,i=function(...s){let c=Reflect.construct(r,s);if(!c||typeof c!="function")return bs&&J.warn("postgres() did not return a valid instance"),c;let l=o.getConfig();return PV(c,{requireParentSpan:l.requireParentSpan,requestHook:l.requestHook})};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(i,s,c)}return n?i:(gN(t,"default",i),t)}_shouldCreateSpans(){let t=this.getConfig();return $t.getSpan(Ke.active())!==void 0||!t.requireParentSpan}_setOperationName(t,n,r){if(r){t.setAttribute(oC,r);return}let o=n?.match(xIt);o?.[1]&&t.setAttribute(oC,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[DIt])return r.apply(this,o);if(!n._shouldCreateSpans())return r.apply(this,o);let i=n._reconstructQuery(this.strings),s=n._sanitizeSqlQuery(i);return Ws({name:s||"postgresjs.query",op:"db"},c=>{zr(c,"auto.db.postgresjs"),c.setAttributes({[Py]:"postgres",[V9]:s});let l=n.getConfig(),{requestHook:f}=l;f&&(0,aE.safeExecuteInTheMiddle)(()=>f(c,s,void 0),S=>{S&&(c.setAttribute("sentry.hook.error","requestHook failed"),bs&&J.error(`Error in requestHook for ${MJ} integration:`,S))},!0);let h=this.resolve;this.resolve=new Proxy(h,{apply:(S,b,v)=>{try{n._setOperationName(c,s,v?.[0]?.command),c.end()}catch(x){bs&&J.error("Error ending span in resolve callback:",x)}return Reflect.apply(S,b,v)}});let y=this.reject;this.reject=new Proxy(y,{apply:(S,b,v)=>{try{c.setStatus({code:2,message:v?.[0]?.message||"unknown_error"}),c.setAttribute(Y9,v?.[0]?.code||"unknown"),c.setAttribute(K9,v?.[0]?.name||"unknown"),n._setOperationName(c,s),c.end()}catch(x){bs&&J.error("Error ending span in reject callback:",x)}return Reflect.apply(S,b,v)}});try{return r.apply(this,o)}catch(S){throw c.setStatus({code:2,message:S instanceof Error?S.message:"unknown_error"}),c.end(),S}})},t.Query.prototype.handle.__sentry_original__=r,t}_unpatchQueryPrototype(t){return t.Query.prototype.handle.__sentry_original__&&(t.Query.prototype.handle=t.Query.prototype.handle.__sentry_original__),t}},BIt=(e=>({name:MJ,setupOnce(){iwe(e)}})),swe=BIt});var uwe=F(TO=>{"use strict";A();Object.defineProperty(TO,"__esModule",{value:!0});TO.SeverityNumber=void 0;var NIt;(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"})(NIt=TO.SeverityNumber||(TO.SeverityNumber={}))});var W4=F(Xv=>{"use strict";A();Object.defineProperty(Xv,"__esModule",{value:!0});Xv.NOOP_LOGGER=Xv.NoopLogger=void 0;var Z4=class{emit(t){}};Xv.NoopLogger=Z4;Xv.NOOP_LOGGER=new Z4});var e3=F(eR=>{"use strict";A();Object.defineProperty(eR,"__esModule",{value:!0});eR.NOOP_LOGGER_PROVIDER=eR.NoopLoggerProvider=void 0;var OIt=W4(),X4=class{getLogger(t,n,r){return new OIt.NoopLogger}};eR.NoopLoggerProvider=X4;eR.NOOP_LOGGER_PROVIDER=new X4});var UJ=F(t3=>{"use strict";A();Object.defineProperty(t3,"__esModule",{value:!0});t3.ProxyLogger=void 0;var wIt=W4(),LJ=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):wIt.NOOP_LOGGER}};t3.ProxyLogger=LJ});var FJ=F(n3=>{"use strict";A();Object.defineProperty(n3,"__esModule",{value:!0});n3.ProxyLoggerProvider=void 0;var kIt=e3(),PIt=UJ(),QJ=class{getLogger(t,n,r){var o;return(o=this._getDelegateLogger(t,n,r))!==null&&o!==void 0?o:new PIt.ProxyLogger(this,t,n,r)}_getDelegate(){var t;return(t=this._delegate)!==null&&t!==void 0?t:kIt.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)}};n3.ProxyLoggerProvider=QJ});var cwe=F(r3=>{"use strict";A();Object.defineProperty(r3,"__esModule",{value:!0});r3._globalThis=void 0;r3._globalThis=typeof globalThis=="object"?globalThis:global});var lwe=F(o3=>{"use strict";A();Object.defineProperty(o3,"__esModule",{value:!0});o3._globalThis=void 0;var MIt=cwe();Object.defineProperty(o3,"_globalThis",{enumerable:!0,get:function(){return MIt._globalThis}})});var dwe=F(i3=>{"use strict";A();Object.defineProperty(i3,"__esModule",{value:!0});i3._globalThis=void 0;var LIt=lwe();Object.defineProperty(i3,"_globalThis",{enumerable:!0,get:function(){return LIt._globalThis}})});var pwe=F(Hm=>{"use strict";A();Object.defineProperty(Hm,"__esModule",{value:!0});Hm.API_BACKWARDS_COMPATIBILITY_VERSION=Hm.makeGetter=Hm._global=Hm.GLOBAL_LOGS_API_KEY=void 0;var UIt=dwe();Hm.GLOBAL_LOGS_API_KEY=Symbol.for("io.opentelemetry.js.api.logs");Hm._global=UIt._globalThis;function QIt(e,t,n){return r=>r===e?t:n}Hm.makeGetter=QIt;Hm.API_BACKWARDS_COMPATIBILITY_VERSION=1});var mwe=F(s3=>{"use strict";A();Object.defineProperty(s3,"__esModule",{value:!0});s3.LogsAPI=void 0;var ep=pwe(),FIt=e3(),fwe=FJ(),GJ=class e{constructor(){this._proxyLoggerProvider=new fwe.ProxyLoggerProvider}static getInstance(){return this._instance||(this._instance=new e),this._instance}setGlobalLoggerProvider(t){return ep._global[ep.GLOBAL_LOGS_API_KEY]?this.getLoggerProvider():(ep._global[ep.GLOBAL_LOGS_API_KEY]=(0,ep.makeGetter)(ep.API_BACKWARDS_COMPATIBILITY_VERSION,t,FIt.NOOP_LOGGER_PROVIDER),this._proxyLoggerProvider._setDelegate(t),t)}getLoggerProvider(){var t,n;return(n=(t=ep._global[ep.GLOBAL_LOGS_API_KEY])===null||t===void 0?void 0:t.call(ep._global,ep.API_BACKWARDS_COMPATIBILITY_VERSION))!==null&&n!==void 0?n:this._proxyLoggerProvider}getLogger(t,n,r){return this.getLoggerProvider().getLogger(t,n,r)}disable(){delete ep._global[ep.GLOBAL_LOGS_API_KEY],this._proxyLoggerProvider=new fwe.ProxyLoggerProvider}};s3.LogsAPI=GJ});var zJ=F(ra=>{"use strict";A();Object.defineProperty(ra,"__esModule",{value:!0});ra.logs=ra.ProxyLoggerProvider=ra.ProxyLogger=ra.NoopLoggerProvider=ra.NOOP_LOGGER_PROVIDER=ra.NoopLogger=ra.NOOP_LOGGER=ra.SeverityNumber=void 0;var GIt=uwe();Object.defineProperty(ra,"SeverityNumber",{enumerable:!0,get:function(){return GIt.SeverityNumber}});var Awe=W4();Object.defineProperty(ra,"NOOP_LOGGER",{enumerable:!0,get:function(){return Awe.NOOP_LOGGER}});Object.defineProperty(ra,"NoopLogger",{enumerable:!0,get:function(){return Awe.NoopLogger}});var gwe=e3();Object.defineProperty(ra,"NOOP_LOGGER_PROVIDER",{enumerable:!0,get:function(){return gwe.NOOP_LOGGER_PROVIDER}});Object.defineProperty(ra,"NoopLoggerProvider",{enumerable:!0,get:function(){return gwe.NoopLoggerProvider}});var zIt=UJ();Object.defineProperty(ra,"ProxyLogger",{enumerable:!0,get:function(){return zIt.ProxyLogger}});var jIt=FJ();Object.defineProperty(ra,"ProxyLoggerProvider",{enumerable:!0,get:function(){return jIt.ProxyLoggerProvider}});var HIt=mwe();ra.logs=HIt.LogsAPI.getInstance()});var hwe=F(tR=>{"use strict";A();Object.defineProperty(tR,"__esModule",{value:!0});tR.disableInstrumentations=tR.enableInstrumentations=void 0;function $It(e,t,n,r){for(let o=0,i=e.length;o<i;o++){let s=e[o];t&&s.setTracerProvider(t),n&&s.setMeterProvider(n),r&&s.setLoggerProvider&&s.setLoggerProvider(r),s.getConfig().enabled||s.enable()}}tR.enableInstrumentations=$It;function qIt(e){e.forEach(t=>t.disable())}tR.disableInstrumentations=qIt});var ywe=F(a3=>{"use strict";A();Object.defineProperty(a3,"__esModule",{value:!0});a3.registerInstrumentations=void 0;var _we=(ze(),Me(We)),VIt=zJ(),Ewe=hwe();function YIt(e){let t=e.tracerProvider||_we.trace.getTracerProvider(),n=e.meterProvider||_we.metrics.getMeterProvider(),r=e.loggerProvider||VIt.logs.getLoggerProvider(),o=e.instrumentations?.flat()??[];return(0,Ewe.enableInstrumentations)(o,t,n,r),()=>{(0,Ewe.disableInstrumentations)(o)}}a3.registerInstrumentations=YIt});var Dwe=F(u3=>{"use strict";A();Object.defineProperty(u3,"__esModule",{value:!0});u3.satisfies=void 0;var qJ=(ze(),Me(We)),Cwe=/^(?:v)?(?<version>(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*))(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,KIt=/^(?<op><|>|=|==|<=|>=|~|\^|~>)?\s*(?:v)?(?<version>(?<major>x|X|\*|0|[1-9]\d*)(?:\.(?<minor>x|X|\*|0|[1-9]\d*))?(?:\.(?<patch>x|X|\*|0|[1-9]\d*))?)(?:-(?<prerelease>(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?<build>[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/,JIt={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]};function ZIt(e,t,n){if(!WIt(e))return qJ.diag.error(`Invalid version: ${e}`),!1;if(!t)return!0;t=t.replace(/([<>=~^]+)\s+/g,"$1");let r=nbt(e);if(!r)return!1;let o=[],i=vwe(r,t,o,n);return i&&!n?.includePrerelease?ebt(r,o):i}u3.satisfies=ZIt;function WIt(e){return typeof e=="string"&&Cwe.test(e)}function vwe(e,t,n,r){if(t.includes("||")){let o=t.trim().split("||");for(let i of o)if(jJ(e,i,n,r))return!0;return!1}else if(t.includes(" - "))t=Ibt(t,r);else if(t.includes(" ")){let o=t.trim().replace(/\s{2,}/g," ").split(" ");for(let i of o)if(!jJ(e,i,n,r))return!1;return!0}return jJ(e,t,n,r)}function jJ(e,t,n,r){if(t=tbt(t,r),t.includes(" "))return vwe(e,t,n,r);{let o=rbt(t);return n.push(o),XIt(e,o)}}function XIt(e,t){if(t.invalid)return!1;if(!t.version||$J(t.version))return!0;let n=Twe(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=Twe(r,o)}return JIt[t.op]?.includes(n)}function ebt(e,t){return e.prerelease?t.some(n=>n.prerelease&&n.version===e.version):!0}function tbt(e,t){return e=e.trim(),e=Sbt(e,t),e=ybt(e),e=Tbt(e,t),e=e.trim(),e}function Vu(e){return!e||e.toLowerCase()==="x"||e==="*"}function nbt(e){let t=e.match(Cwe);if(!t){qJ.diag.error(`Invalid version: ${e}`);return}let n=t.groups.version,r=t.groups.prerelease,o=t.groups.build,i=n.split("."),s=r?.split(".");return{op:void 0,version:n,versionSegments:i,versionSegmentCount:i.length,prerelease:r,prereleaseSegments:s,prereleaseSegmentCount:s?s.length:0,build:o}}function rbt(e){if(!e)return{};let t=e.match(KIt);if(!t)return qJ.diag.error(`Invalid range: ${e}`),{invalid:!0};let n=t.groups.op,r=t.groups.version,o=t.groups.prerelease,i=t.groups.build,s=r.split("."),c=o?.split(".");return n==="=="&&(n="="),{op:n||"=",version:r,versionSegments:s,versionSegmentCount:s.length,prerelease:o,prereleaseSegments:c,prereleaseSegmentCount:c?c.length:0,build:i}}function $J(e){return e==="*"||e==="x"||e==="X"}function Swe(e){let t=parseInt(e,10);return isNaN(t)?e:t}function obt(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 ibt(e,t){if($J(e)||$J(t))return 0;let[n,r]=obt(Swe(e),Swe(t));return n>r?1:n<r?-1:0}function Twe(e,t){for(let n=0;n<Math.max(e.length,t.length);n++){let r=ibt(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0}var Rwe="[a-zA-Z0-9-]",xwe="0|[1-9]\\d*",sbt=`\\d*[a-zA-Z-]${Rwe}*`,abt="((?:<|>)?=?)",Iwe=`(?:${xwe}|${sbt})`,ubt=`(?:-(${Iwe}(?:\\.${Iwe})*))`,bwe=`${Rwe}+`,cbt=`(?:\\+(${bwe}(?:\\.${bwe})*))`,HJ=`${xwe}|x|X|\\*`,IO=`[v=\\s]*(${HJ})(?:\\.(${HJ})(?:\\.(${HJ})(?:${ubt})?${cbt}?)?)?`,lbt=`^${abt}\\s*${IO}$`,dbt=new RegExp(lbt),pbt=`^\\s*(${IO})\\s+-\\s+(${IO})\\s*$`,fbt=new RegExp(pbt),mbt="(?:~>?)",Abt=`^${mbt}${IO}$`,gbt=new RegExp(Abt),hbt="(?:\\^)",_bt=`^${hbt}${IO}$`,Ebt=new RegExp(_bt);function ybt(e){let t=gbt;return e.replace(t,(n,r,o,i,s)=>{let c;return Vu(r)?c="":Vu(o)?c=`>=${r}.0.0 <${+r+1}.0.0-0`:Vu(i)?c=`>=${r}.${o}.0 <${r}.${+o+1}.0-0`:s?c=`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:c=`>=${r}.${o}.${i} <${r}.${+o+1}.0-0`,c})}function Sbt(e,t){let n=Ebt,r=t?.includePrerelease?"-0":"";return e.replace(n,(o,i,s,c,l)=>{let f;return Vu(i)?f="":Vu(s)?f=`>=${i}.0.0${r} <${+i+1}.0.0-0`:Vu(c)?i==="0"?f=`>=${i}.${s}.0${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.0${r} <${+i+1}.0.0-0`:l?i==="0"?s==="0"?f=`>=${i}.${s}.${c}-${l} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}-${l} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c}-${l} <${+i+1}.0.0-0`:i==="0"?s==="0"?f=`>=${i}.${s}.${c}${r} <${i}.${s}.${+c+1}-0`:f=`>=${i}.${s}.${c}${r} <${i}.${+s+1}.0-0`:f=`>=${i}.${s}.${c} <${+i+1}.0.0-0`,f})}function Tbt(e,t){let n=dbt;return e.replace(n,(r,o,i,s,c,l)=>{let f=Vu(i),h=f||Vu(s),y=h||Vu(c),S=y;return o==="="&&S&&(o=""),l=t?.includePrerelease?"-0":"",f?o===">"||o==="<"?r="<0.0.0-0":r="*":o&&S?(h&&(s=0),c=0,o===">"?(o=">=",h?(i=+i+1,s=0,c=0):(s=+s+1,c=0)):o==="<="&&(o="<",h?i=+i+1:s=+s+1),o==="<"&&(l="-0"),r=`${o+i}.${s}.${c}${l}`):h?r=`>=${i}.0.0${l} <${+i+1}.0.0-0`:y&&(r=`>=${i}.${s}.0${l} <${i}.${+s+1}.0-0`),r})}function Ibt(e,t){let n=fbt;return e.replace(n,(r,o,i,s,c,l,f,h,y,S,b,v)=>(Vu(i)?o="":Vu(s)?o=`>=${i}.0.0${t?.includePrerelease?"-0":""}`:Vu(c)?o=`>=${i}.${s}.0${t?.includePrerelease?"-0":""}`:l?o=`>=${o}`:o=`>=${o}${t?.includePrerelease?"-0":""}`,Vu(y)?h="":Vu(S)?h=`<${+y+1}.0.0-0`:Vu(b)?h=`<${y}.${+S+1}.0-0`:v?h=`<=${y}.${S}.${b}-${v}`:t?.includePrerelease?h=`<${y}.${S}.${+b+1}-0`:h=`<=${h}`,`${o} ${h}`.trim()))}});var VJ=F(wa=>{"use strict";A();Object.defineProperty(wa,"__esModule",{value:!0});wa.massUnwrap=wa.unwrap=wa.massWrap=wa.wrap=void 0;var Yu=console.error.bind(console);function bO(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 bbt=(e,t,n)=>{if(!e||!e[t]){Yu("no original function "+String(t)+" to wrap");return}if(!n){Yu("no wrapper function"),Yu(new Error().stack);return}let r=e[t];if(typeof r!="function"||typeof n!="function"){Yu("original object and wrapper must be functions");return}let o=n(r,t);return bO(o,"__original",r),bO(o,"__unwrap",()=>{e[t]===o&&bO(e,t,r)}),bO(o,"__wrapped",!0),bO(e,t,o),o};wa.wrap=bbt;var Cbt=(e,t,n)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to wrap on modules");return}e.forEach(r=>{t.forEach(o=>{(0,wa.wrap)(r,o,n)})})};wa.massWrap=Cbt;var vbt=(e,t)=>{if(!e||!e[t]){Yu("no function to unwrap."),Yu(new Error().stack);return}let n=e[t];if(!n.__unwrap)Yu("no original to unwrap to -- has "+String(t)+" already been unwrapped?");else{n.__unwrap();return}};wa.unwrap=vbt;var Rbt=(e,t)=>{if(e)Array.isArray(e)||(e=[e]);else{Yu("must provide one or more modules to patch"),Yu(new Error().stack);return}if(!(t&&Array.isArray(t))){Yu("must provide one or more functions to unwrap on modules");return}e.forEach(n=>{t.forEach(r=>{(0,wa.unwrap)(n,r)})})};wa.massUnwrap=Rbt;function CO(e){e&&e.logger&&(typeof e.logger!="function"?Yu("new logger isn't a function, not replacing"):Yu=e.logger)}wa.default=CO;CO.wrap=wa.wrap;CO.massWrap=wa.massWrap;CO.unwrap=wa.unwrap;CO.massUnwrap=wa.massUnwrap});var Bwe=F(l3=>{"use strict";A();Object.defineProperty(l3,"__esModule",{value:!0});l3.InstrumentationAbstract=void 0;var YJ=(ze(),Me(We)),xbt=zJ(),c3=VJ(),KJ=class{instrumentationName;instrumentationVersion;_config={};_tracer;_meter;_logger;_diag;constructor(t,n,r){this.instrumentationName=t,this.instrumentationVersion=n,this.setConfig(r),this._diag=YJ.diag.createComponentLogger({namespace:t}),this._tracer=YJ.trace.getTracer(t,n),this._meter=YJ.metrics.getMeter(t,n),this._logger=xbt.logs.getLogger(t,n),this._updateMetricInstruments()}_wrap=c3.wrap;_unwrap=c3.unwrap;_massWrap=c3.massWrap;_massUnwrap=c3.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)}}};l3.InstrumentationAbstract=KJ});var Nwe=F(uE=>{"use strict";A();Object.defineProperty(uE,"__esModule",{value:!0});uE.ModuleNameTrie=uE.ModuleNameSeparator=void 0;uE.ModuleNameSeparator="/";var d3=class{hooks=[];children=new Map},JJ=class{_trie=new d3;_counter=0;insert(t){let n=this._trie;for(let r of t.moduleName.split(uE.ModuleNameSeparator)){let o=n.children.get(r);o||(o=new d3,n.children.set(r,o)),n=o}n.hooks.push({hook:t,insertedId:this._counter++})}search(t,{maintainInsertionOrder:n,fullOnly:r}={}){let o=this._trie,i=[],s=!0;for(let c of t.split(uE.ModuleNameSeparator)){let l=o.children.get(c);if(!l){s=!1;break}r||i.push(...l.hooks),o=l}return r&&s&&i.push(...o.hooks),i.length===0?[]:i.length===1?[i[0].hook]:(n&&i.sort((c,l)=>c.insertedId-l.insertedId),i.map(({hook:c})=>c))}};uE.ModuleNameTrie=JJ});var wwe=F(p3=>{"use strict";A();Object.defineProperty(p3,"__esModule",{value:!0});p3.RequireInTheMiddleSingleton=void 0;var Dbt=Gy(),Owe=Fe("path"),ZJ=Nwe(),Bbt=["afterEach","after","beforeEach","before","describe","it"].every(e=>typeof global[e]=="function"),WJ=class e{_moduleNameTrie=new ZJ.ModuleNameTrie;static _instance;constructor(){this._initialize()}_initialize(){new Dbt.Hook(null,{internals:!0},(t,n,r)=>{let o=Nbt(n),i=this._moduleNameTrie.search(o,{maintainInsertionOrder:!0,fullOnly:r===void 0});for(let{onRequire:s}of i)t=s(t,n,r);return t})}register(t,n){let r={moduleName:t,onRequire:n};return this._moduleNameTrie.insert(r),r}static getInstance(){return Bbt?new e:this._instance=this._instance??new e}};p3.RequireInTheMiddleSingleton=WJ;function Nbt(e){return Owe.sep!==ZJ.ModuleNameSeparator?e.split(Owe.sep).join(ZJ.ModuleNameSeparator):e}});var XJ=F(cE=>{"use strict";A();Object.defineProperty(cE,"__esModule",{value:!0});cE.isWrapped=cE.safeExecuteInTheMiddleAsync=cE.safeExecuteInTheMiddle=void 0;function Obt(e,t,n){let r,o;try{o=e()}catch(i){r=i}finally{if(t(r,o),r&&!n)throw r;return o}}cE.safeExecuteInTheMiddle=Obt;async function wbt(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}}cE.safeExecuteInTheMiddleAsync=wbt;function kbt(e){return typeof e=="function"&&typeof e.__original=="function"&&typeof e.__unwrap=="function"&&e.__wrapped===!0}cE.isWrapped=kbt});var Mwe=F(f3=>{"use strict";A();Object.defineProperty(f3,"__esModule",{value:!0});f3.InstrumentationBase=void 0;var vO=Fe("path"),kwe=Fe("util"),Pbt=Dwe(),eZ=VJ(),Mbt=Bwe(),Lbt=wwe(),Ubt=kK(),RO=(ze(),Me(We)),Qbt=Gy(),Fbt=Fe("fs"),Gbt=XJ(),tZ=class extends Mbt.InstrumentationAbstract{_modules;_hooks=[];_requireInTheMiddleSingleton=Lbt.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,Gbt.isWrapped)(t[n])&&this._unwrap(t,n),kwe.types.isProxy(t)){let o=(0,eZ.wrap)(Object.assign({},t),n,r);return Object.defineProperty(t,n,{value:o}),o}else return(0,eZ.wrap)(t,n,r)};_unwrap=(t,n)=>kwe.types.isProxy(t)?Object.defineProperty(t,n,{value:t[n]}):(0,eZ.unwrap)(t,n);_massWrap=(t,n,r)=>{if(t)Array.isArray(t)||(t=[t]);else{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.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{RO.diag.error("must provide one or more modules to patch");return}if(!(n&&Array.isArray(n))){RO.diag.error("must provide one or more functions to wrap on modules");return}t.forEach(r=>{n.forEach(o=>{this._unwrap(r,o)})})};_warnOnPreloadedModules(){this._modules.forEach(t=>{let{name:n}=t;try{let r=Fe.resolve(n);Fe.cache[r]&&this._diag.warn(`Module ${n} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${n}`)}catch{}})}_extractPackageVersion(t){try{let n=(0,Fbt.readFileSync)(vO.join(t,"package.json"),{encoding:"utf8"}),r=JSON.parse(n).version;return typeof r=="string"?r:void 0}catch{RO.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 Pwe(t.supportedVersions,i,t.includePrerelease)&&typeof t.patch=="function"&&(t.moduleExports=n,this._enabled)?(this._diag.debug("Applying instrumentation patch for module on require hook",{module:t.name,version:t.moduleVersion,baseDir:o}),t.patch(n,t.moduleVersion)):n;let s=t.files??[],c=vO.normalize(r);return s.filter(f=>f.name===c).filter(f=>Pwe(f.supportedVersions,i,t.includePrerelease)).reduce((f,h)=>(h.moduleExports=f,this._enabled?(this._diag.debug("Applying instrumentation patch for nodejs module file on require hook",{module:t.name,version:t.moduleVersion,fileName:h.name,baseDir:o}),h.patch(f,t.moduleVersion)):f),n)}enable(){if(!this._enabled){if(this._enabled=!0,this._hooks.length>0){for(let t of this._modules){typeof t.patch=="function"&&t.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module on instrumentation enabled",{module:t.name,version:t.moduleVersion}),t.patch(t.moduleExports,t.moduleVersion));for(let n of t.files)n.moduleExports&&(this._diag.debug("Applying instrumentation patch for nodejs module file on instrumentation enabled",{module:t.name,version:t.moduleVersion,fileName:n.name}),n.patch(n.moduleExports,t.moduleVersion))}return}this._warnOnPreloadedModules();for(let t of this._modules){let n=(s,c,l)=>{if(!l&&vO.isAbsolute(c)){let f=vO.parse(c);c=f.name,l=f.dir}return this._onRequire(t,s,c,l)},r=(s,c,l)=>this._onRequire(t,s,c,l),o=vO.isAbsolute(t.name)?new Qbt.Hook([t.name],{internals:!0},r):this._requireInTheMiddleSingleton.register(t.name,r);this._hooks.push(o);let i=new Ubt.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}};f3.InstrumentationBase=tZ;function Pwe(e,t,n){return typeof t>"u"?e.includes("*"):e.some(r=>(0,Pbt.satisfies)(t,r,{includePrerelease:n}))}});var Lwe=F(m3=>{"use strict";A();Object.defineProperty(m3,"__esModule",{value:!0});m3.normalize=void 0;var zbt=Fe("path");Object.defineProperty(m3,"normalize",{enumerable:!0,get:function(){return zbt.normalize}})});var Uwe=F(nR=>{"use strict";A();Object.defineProperty(nR,"__esModule",{value:!0});nR.normalize=nR.InstrumentationBase=void 0;var jbt=Mwe();Object.defineProperty(nR,"InstrumentationBase",{enumerable:!0,get:function(){return jbt.InstrumentationBase}});var Hbt=Lwe();Object.defineProperty(nR,"normalize",{enumerable:!0,get:function(){return Hbt.normalize}})});var nZ=F(rR=>{"use strict";A();Object.defineProperty(rR,"__esModule",{value:!0});rR.normalize=rR.InstrumentationBase=void 0;var Qwe=Uwe();Object.defineProperty(rR,"InstrumentationBase",{enumerable:!0,get:function(){return Qwe.InstrumentationBase}});Object.defineProperty(rR,"normalize",{enumerable:!0,get:function(){return Qwe.normalize}})});var Fwe=F(A3=>{"use strict";A();Object.defineProperty(A3,"__esModule",{value:!0});A3.InstrumentationNodeModuleDefinition=void 0;var rZ=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||[]}};A3.InstrumentationNodeModuleDefinition=rZ});var Gwe=F(g3=>{"use strict";A();Object.defineProperty(g3,"__esModule",{value:!0});g3.InstrumentationNodeModuleFile=void 0;var $bt=nZ(),oZ=class{supportedVersions;patch;unpatch;name;constructor(t,n,r,o){this.supportedVersions=n,this.patch=r,this.unpatch=o,this.name=(0,$bt.normalize)(t)}};g3.InstrumentationNodeModuleFile=oZ});var zwe=F(RS=>{"use strict";A();Object.defineProperty(RS,"__esModule",{value:!0});RS.semconvStabilityFromStr=RS.SemconvStability=void 0;var h3;(function(e){e[e.STABLE=1]="STABLE",e[e.OLD=2]="OLD",e[e.DUPLICATE=3]="DUPLICATE"})(h3=RS.SemconvStability||(RS.SemconvStability={}));function qbt(e,t){let n=h3.OLD,r=t?.split(",").map(o=>o.trim()).filter(o=>o!=="");for(let o of r??[])if(o.toLowerCase()===e+"/dup"){n=h3.DUPLICATE;break}else o.toLowerCase()===e&&(n=h3.STABLE);return n}RS.semconvStabilityFromStr=qbt});var Hwe=F(ss=>{"use strict";A();Object.defineProperty(ss,"__esModule",{value:!0});ss.semconvStabilityFromStr=ss.SemconvStability=ss.safeExecuteInTheMiddleAsync=ss.safeExecuteInTheMiddle=ss.isWrapped=ss.InstrumentationNodeModuleFile=ss.InstrumentationNodeModuleDefinition=ss.InstrumentationBase=ss.registerInstrumentations=void 0;var Vbt=ywe();Object.defineProperty(ss,"registerInstrumentations",{enumerable:!0,get:function(){return Vbt.registerInstrumentations}});var Ybt=nZ();Object.defineProperty(ss,"InstrumentationBase",{enumerable:!0,get:function(){return Ybt.InstrumentationBase}});var Kbt=Fwe();Object.defineProperty(ss,"InstrumentationNodeModuleDefinition",{enumerable:!0,get:function(){return Kbt.InstrumentationNodeModuleDefinition}});var Jbt=Gwe();Object.defineProperty(ss,"InstrumentationNodeModuleFile",{enumerable:!0,get:function(){return Jbt.InstrumentationNodeModuleFile}});var iZ=XJ();Object.defineProperty(ss,"isWrapped",{enumerable:!0,get:function(){return iZ.isWrapped}});Object.defineProperty(ss,"safeExecuteInTheMiddle",{enumerable:!0,get:function(){return iZ.safeExecuteInTheMiddle}});Object.defineProperty(ss,"safeExecuteInTheMiddleAsync",{enumerable:!0,get:function(){return iZ.safeExecuteInTheMiddleAsync}});var jwe=zwe();Object.defineProperty(ss,"SemconvStability",{enumerable:!0,get:function(){return jwe.SemconvStability}});Object.defineProperty(ss,"semconvStabilityFromStr",{enumerable:!0,get:function(){return jwe.semconvStabilityFromStr}})});function Xbt(){let e=oR[aZ];return e?.helper?e.helper:oR[sZ]?.helper}function eCt(e){let t={helper:e};oR[aZ]=t,oR[sZ]=t}function tCt(){delete oR[aZ],delete oR[sZ]}function oCt(e){return e==="client"?co.CLIENT:co.INTERNAL}function Vwe(e,t,n,r,o){if(Ywe(t.name,o))return;let i={attributes:t.attributes,kind:oCt(t.kind),startTime:t.startTime};e.startActiveSpan(t.name,i,s=>{r.set(t.id,s.spanContext().spanId),t.links&&s.addLinks(t.links.flatMap(l=>{let f=r.get(l);return f?{context:{spanId:f,traceId:s.spanContext().traceId,traceFlags:s.spanContext().traceFlags}}:[]}));let c=n.filter(l=>l.parentId===t.id);for(let l of c)Vwe(e,l,n,r,o);s.end(t.endTime)})}function $we(e,t){return sCt(t)?t.then(n=>(e.end(),n),n=>{throw e.end(),n}):(e.end(),t)}function sCt(e){return e!=null&&typeof e.then=="function"}function Ywe(e,t){return t.some(n=>typeof n=="string"?n===e:n.test(e))}var _3,Zbt,Wbt,sZ,aZ,oR,nCt,rCt,iCt,Kwe,qwe,aCt,uCt,Jwe,Zwe=O(()=>{A();ze();_3=se(Hwe(),1);ze();Zbt={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"}},Wbt=Zbt.version.split(".")[0],sZ="PRISMA_INSTRUMENTATION",aZ=`V${Wbt}_PRISMA_INSTRUMENTATION`,oR=globalThis;nCt=process.env.PRISMA_SHOW_ALL_TRACES==="true",rCt="00-10-10-00";iCt=class{tracerProvider;ignoreSpanTypes;constructor({tracerProvider:e,ignoreSpanTypes:t}){this.tracerProvider=e,this.ignoreSpanTypes=t}isEnabled(){return!0}getTraceParent(e){let t=$t.getSpanContext(e??Ke.active());return t?`00-${t.traceId}-${t.spanId}-0${t.traceFlags}`:rCt}dispatchEngineSpans(e){let t=this.tracerProvider.getTracer("prisma"),n=new Map,r=e.filter(o=>o.parentId===null);for(let o of r)Vwe(t,o,e,n,this.ignoreSpanTypes)}getActiveContext(){return Ke.active()}runInChildSpan(e,t){if(typeof e=="string"&&(e={name:e}),e.internal&&!nCt)return t();let n=this.tracerProvider.getTracer("prisma"),r=e.context??this.getActiveContext(),o=`prisma:client:${e.name}`;if(Ywe(o,this.ignoreSpanTypes))return t();if(e.active===!1){let i=n.startSpan(o,e,r);return $we(i,t(i,r))}return n.startActiveSpan(o,e,i=>$we(i,t(i,r)))}};Kwe={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},qwe=Kwe.version,aCt=Kwe.name,uCt="@prisma/client",Jwe=class extends _3.InstrumentationBase{tracerProvider;constructor(e={}){super(aCt,qwe,e)}setTracerProvider(e){this.tracerProvider=e}init(){return[new _3.InstrumentationNodeModuleDefinition(uCt,[qwe])]}enable(){let e=this._config;eCt(new iCt({tracerProvider:this.tracerProvider??$t.getTracerProvider(),ignoreSpanTypes:e.ignoreSpanTypes??[]}))}disable(){tCt()}isEnabled(){return Xbt()!==void 0}}});function cCt(e){return!!e&&typeof e=="object"&&"dispatchEngineSpans"in e}function Xwe(){let e=globalThis.PRISMA_INSTRUMENTATION;return e&&typeof e=="object"&&"helper"in e?e.helper:void 0}function lCt(e){return e==="client"?co.CLIENT:co.INTERNAL}var Wwe,uZ,dCt,eke,tke=O(()=>{A();ze();Zwe();dt();gr();Wwe="Prisma";uZ=class extends Jwe{constructor(t){super(t?.instrumentationConfig)}enable(){super.enable();let t=Xwe();cCt(t)&&(t.createEngineSpan=n=>{let r=$t.getTracer("prismaV5Compatibility"),o=r._idGenerator;if(!o){Ko(()=>{console.warn("[Sentry] Could not find _idGenerator on tracer, skipping Prisma v5 compatibility - some Prisma spans may be missing!")});return}try{n.spans.forEach(i=>{let s=lCt(i.kind),c=i.parent_span_id,l=i.span_id,f=i.trace_id,h=i.links?.map(S=>({context:{traceId:S.trace_id,spanId:S.span_id,traceFlags:Ja.SAMPLED}})),y=$t.setSpanContext(Ke.active(),{traceId:f,spanId:c,traceFlags:Ja.SAMPLED});Ke.with(y,()=>{let S={generateTraceId:()=>f,generateSpanId:()=>l};r._idGenerator=S,r.startSpan(i.name,{kind:s,links:h,startTime:i.start_time,attributes:i.attributes}).end(i.end_time),r._idGenerator=o})})}finally{r._idGenerator=o}})}};dCt=at(Wwe,e=>new uZ(e)),eke=e=>({name:Wwe,setupOnce(){dCt(e)},setup(t){Xwe()&&t.on("spanStart",n=>{let r=Ot(n);r.description?.startsWith("prisma:")&&n.setAttribute(kt,"auto.db.otel.prisma"),r.description==="prisma:engine:db_query"&&r.data["db.query.text"]&&n.updateName(r.data["db.query.text"]),r.description==="prisma:engine:db_query"&&!r.data["db.system"]&&n.setAttribute("db.system","prisma")})}})});var nke=F(iR=>{"use strict";A();Object.defineProperty(iR,"__esModule",{value:!0});iR.PACKAGE_NAME=iR.PACKAGE_VERSION=void 0;iR.PACKAGE_VERSION="0.60.0";iR.PACKAGE_NAME="@opentelemetry/instrumentation-hapi"});var cZ=F($m=>{"use strict";A();Object.defineProperty($m,"__esModule",{value:!0});$m.HapiLifecycleMethodNames=$m.HapiLayerType=$m.handlerPatched=$m.HapiComponentName=void 0;$m.HapiComponentName="@hapi/hapi";$m.handlerPatched=Symbol("hapi-handler-patched");$m.HapiLayerType={ROUTER:"router",PLUGIN:"plugin",EXT:"server.ext"};$m.HapiLifecycleMethodNames=new Set(["onPreAuth","onCredentials","onPostAuth","onPreHandler","onPostHandler","onPreResponse","onRequest"])});var rke=F(E3=>{"use strict";A();Object.defineProperty(E3,"__esModule",{value:!0});E3.ATTR_HTTP_METHOD=void 0;E3.ATTR_HTTP_METHOD="http.method"});var lZ=F(xO=>{"use strict";A();Object.defineProperty(xO,"__esModule",{value:!0});xO.AttributeNames=void 0;var pCt;(function(e){e.HAPI_TYPE="hapi.type",e.PLUGIN_NAME="hapi.plugin.name",e.EXT_TYPE="server.ext.type"})(pCt=xO.AttributeNames||(xO.AttributeNames={}))});var ske=F(as=>{"use strict";A();Object.defineProperty(as,"__esModule",{value:!0});as.getPluginFromInput=as.getExtMetadata=as.getRouteMetadata=as.isPatchableExtMethod=as.isDirectExtInput=as.isLifecycleExtEventObj=as.isLifecycleExtType=as.getPluginName=void 0;var oke=(Zn(),Me(Fr)),fCt=rke(),DO=cZ(),lE=lZ(),ike=on();function mCt(e){return e.name?e.name:e.pkg.name}as.getPluginName=mCt;var ACt=e=>typeof e=="string"&&DO.HapiLifecycleMethodNames.has(e);as.isLifecycleExtType=ACt;var gCt=e=>{let t=e?.type;return t!==void 0&&(0,as.isLifecycleExtType)(t)};as.isLifecycleExtEventObj=gCt;var hCt=e=>Array.isArray(e)&&e.length<=3&&(0,as.isLifecycleExtType)(e[0])&&typeof e[1]=="function";as.isDirectExtInput=hCt;var _Ct=e=>!Array.isArray(e);as.isPatchableExtMethod=_Ct;var ECt=(e,t,n)=>{let r={[oke.ATTR_HTTP_ROUTE]:e.path};t&ike.SemconvStability.OLD&&(r[fCt.ATTR_HTTP_METHOD]=e.method),t&ike.SemconvStability.STABLE&&(r[oke.ATTR_HTTP_REQUEST_METHOD]=e.method);let o;return n?(r[lE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.PLUGIN,r[lE.AttributeNames.PLUGIN_NAME]=n,o=`${n}: route - ${e.path}`):(r[lE.AttributeNames.HAPI_TYPE]=DO.HapiLayerType.ROUTER,o=`route - ${e.path}`),{attributes:r,name:o}};as.getRouteMetadata=ECt;var yCt=(e,t,n)=>{let r=`ext - ${e}`;return n&&n!=="method"&&(r=`ext - ${e} - ${n}`),t?{attributes:{[lE.AttributeNames.EXT_TYPE]:e,[lE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT,[lE.AttributeNames.PLUGIN_NAME]:t},name:`${t}: ${r}`}:{attributes:{[lE.AttributeNames.EXT_TYPE]:e,[lE.AttributeNames.HAPI_TYPE]:DO.HapiLayerType.EXT},name:r}};as.getExtMetadata=yCt;var SCt=e=>"plugin"in e?"plugin"in e.plugin?e.plugin.plugin:e.plugin:e;as.getPluginFromInput=SCt});var cke=F(y3=>{"use strict";A();Object.defineProperty(y3,"__esModule",{value:!0});y3.HapiInstrumentation=void 0;var Hl=(ze(),Me(We)),ake=br(),BO=on(),uke=nke(),NO=cZ(),Fg=ske(),dZ=class extends BO.InstrumentationBase{_semconvStability;constructor(t={}){super(uke.PACKAGE_NAME,uke.PACKAGE_VERSION,t),this._semconvStability=(0,BO.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return new BO.InstrumentationNodeModuleDefinition(NO.HapiComponentName,[">=17.0.0 <22"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return(0,BO.isWrapped)(n.server)||this._wrap(n,"server",this._getServerPatch.bind(this)),(0,BO.isWrapped)(n.Server)||this._wrap(n,"Server",this._getServerPatch.bind(this)),n},t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;this._massUnwrap([n],["server","Server"])})}_getServerPatch(t){let n=this,r=this;return function(i){let s=t.apply(this,[i]);return r._wrap(s,"route",c=>n._getServerRoutePatch.bind(n)(c)),r._wrap(s,"ext",c=>n._getServerExtPatch.bind(n)(c)),r._wrap(s,"register",n._getServerRegisterPatch.bind(n)),s}}_getServerRegisterPatch(t){let n=this;return function(o,i){if(Array.isArray(o))for(let s of o){let c=(0,Fg.getPluginFromInput)(s);n._wrapRegisterHandler(c)}else{let s=(0,Fg.getPluginFromInput)(o);n._wrapRegisterHandler(s)}return t.apply(this,[o,i])}}_getServerExtPatch(t,n){let r=this;return function(...i){if(Array.isArray(i[0])){let s=i[0];for(let c=0;c<s.length;c++){let l=s[c];if((0,Fg.isLifecycleExtType)(l.type)){let f=l,h=r._wrapExtMethods(f.method,l.type,n);f.method=h,s[c]=f}}return t.apply(this,i)}else if((0,Fg.isDirectExtInput)(i)){let s=i,c=s[1],l=r._wrapExtMethods(c,s[0],n);return t.apply(this,[s[0],l,s[2]])}else if((0,Fg.isLifecycleExtEventObj)(i[0])){let s=i[0],c=r._wrapExtMethods(s.method,s.type,n);return s.method=c,t.call(this,s)}return t.apply(this,i)}}_getServerRoutePatch(t,n){let r=this;return function(o){if(Array.isArray(o))for(let i=0;i<o.length;i++){let s=r._wrapRouteHandler.call(r,o[i],n);o[i]=s}else o=r._wrapRouteHandler.call(r,o,n);return t.apply(this,[o])}}_wrapRegisterHandler(t){let n=this,r=(0,Fg.getPluginName)(t),o=t.register,i=this,s=function(c,l){return i._wrap(c,"route",f=>n._getServerRoutePatch.bind(n)(f,r)),i._wrap(c,"ext",f=>n._getServerExtPatch.bind(n)(f,r)),o.call(this,c,l)};t.register=s}_wrapExtMethods(t,n,r){let o=this;if(t instanceof Array){for(let i=0;i<t.length;i++)t[i]=o._wrapExtMethods(t[i],n);return t}else if((0,Fg.isPatchableExtMethod)(t))return t[NO.handlerPatched]===!0?t:(t[NO.handlerPatched]=!0,async function(...s){if(Hl.trace.getSpan(Hl.context.active())===void 0)return await t.apply(this,s);let c=(0,Fg.getExtMetadata)(n,r,t.name),l=o.tracer.startSpan(c.name,{attributes:c.attributes});try{return await Hl.context.with(Hl.trace.setSpan(Hl.context.active(),l),t,void 0,...s)}catch(f){throw l.recordException(f),l.setStatus({code:Hl.SpanStatusCode.ERROR,message:f.message}),f}finally{l.end()}});return t}_wrapRouteHandler(t,n){let r=this;if(t[NO.handlerPatched]===!0)return t;t[NO.handlerPatched]=!0;let o=i=>async function(...s){if(Hl.trace.getSpan(Hl.context.active())===void 0)return await i.call(this,...s);let c=(0,ake.getRPCMetadata)(Hl.context.active());c?.type===ake.RPCType.HTTP&&(c.route=t.path);let l=(0,Fg.getRouteMetadata)(t,r._semconvStability,n),f=r.tracer.startSpan(l.name,{attributes:l.attributes});try{return await Hl.context.with(Hl.trace.setSpan(Hl.context.active(),f),()=>i.call(this,...s))}catch(h){throw f.recordException(h),f.setStatus({code:Hl.SpanStatusCode.ERROR,message:h.message}),h}finally{f.end()}};if(typeof t.handler=="function")t.handler=o(t.handler);else if(typeof t.options=="function"){let i=t.options;t.options=function(s){let c=i(s);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}};y3.HapiInstrumentation=dZ});var lke=F(sR=>{"use strict";A();Object.defineProperty(sR,"__esModule",{value:!0});sR.AttributeNames=sR.HapiInstrumentation=void 0;var TCt=cke();Object.defineProperty(sR,"HapiInstrumentation",{enumerable:!0,get:function(){return TCt.HapiInstrumentation}});var ICt=lZ();Object.defineProperty(sR,"AttributeNames",{enumerable:!0,get:function(){return ICt.AttributeNames}})});var dke,pke,fke,bCt,mke,Ake=O(()=>{A();dke=se(lke(),1);gr();pke="Hapi",fke=at(pke,()=>new dke.HapiInstrumentation),bCt=(()=>({name:pke,setupOnce(){fke()}})),mke=bCt});var dE,OO,pZ=O(()=>{A();dE={HONO_TYPE:"hono.type",HONO_NAME:"hono.name"},OO={MIDDLEWARE:"middleware",REQUEST_HANDLER:"request_handler"}});var T3,CCt,vCt,S3,gke=O(()=>{A();ze();T3=se(on(),1);dt();pZ();CCt="@sentry/instrumentation-hono",vCt="0.0.1",S3=class extends T3.InstrumentationBase{constructor(t={}){super(CCt,vCt,t)}init(){return[new T3.InstrumentationNodeModuleDefinition("hono",[">=4.0.0 <5"],t=>this._patch(t))]}_patch(t){let n=this;class r extends t.Hono{constructor(...i){super(...i),n._wrap(this,"get",n._patchHandler()),n._wrap(this,"post",n._patchHandler()),n._wrap(this,"put",n._patchHandler()),n._wrap(this,"delete",n._patchHandler()),n._wrap(this,"options",n._patchHandler()),n._wrap(this,"patch",n._patchHandler()),n._wrap(this,"all",n._patchHandler()),n._wrap(this,"on",n._patchOnHandler()),n._wrap(this,"use",n._patchMiddlewareHandler())}}try{t.Hono=r}catch{return{...t,Hono:r}}return t}_patchHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(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(s=>t._wrapHandler(s))])}}}_patchMiddlewareHandler(){let t=this;return function(n){return function(...o){if(typeof o[0]=="string"){let i=o[0];if(o.length===1)return n.apply(this,[i]);let s=o.slice(1);return n.apply(this,[i,...s.map(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,s=n.tracer.startSpan(i);return Ke.with($t.setSpan(Ke.active(),s),()=>n._safeExecute(()=>{let c=t.apply(this,[r,o]);if(ba(c))return c.then(l=>{let f=n._determineHandlerType(l);return s.setAttributes({[dE.HONO_TYPE]:f,[dE.HONO_NAME]:f===OO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),l});{let l=n._determineHandlerType(c);return s.setAttributes({[dE.HONO_TYPE]:l,[dE.HONO_NAME]:l===OO.REQUEST_HANDLER?i:t.name||"anonymous"}),n.getConfig().responseHook?.(s),c}},()=>s.end(),c=>{n._handleError(s,c),s.end()}))}}_safeExecute(t,n,r){try{let o=t();return ba(o)?o.then(()=>n(),i=>r(i)):n(),o}catch(o){throw r(o),o}}_determineHandlerType(t){return t===void 0?OO.MIDDLEWARE:OO.REQUEST_HANDLER}_handleError(t,n){n instanceof Error&&(t.setStatus({code:di.ERROR,message:n.message}),t.recordException(n))}}});function RCt(e){let t=Ot(e).data,n=t[dE.HONO_TYPE];if(t[Xt]||!n)return;e.setAttributes({[kt]:"auto.http.otel.hono",[Xt]:`${n}.hono`});let r=t[dE.HONO_NAME];if(typeof r=="string"&&e.updateName(r),vn()===Qd()){bs&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let o=t[fg],i=t[My];typeof o=="string"&&typeof i=="string"&&vn().setTransactionName(`${i} ${o}`)}var hke,_ke,xCt,Eke,yke=O(()=>{A();Zn();dt();gr();gS();pZ();gke();hke="Hono";_ke=at(hke,()=>new S3({responseHook:e=>{RCt(e)}})),xCt=(()=>({name:hke,setupOnce(){_ke()}})),Eke=xCt});var I3=F(wO=>{"use strict";A();Object.defineProperty(wO,"__esModule",{value:!0});wO.KoaLayerType=void 0;var DCt;(function(e){e.ROUTER="router",e.MIDDLEWARE="middleware"})(DCt=wO.KoaLayerType||(wO.KoaLayerType={}))});var Ske=F(aR=>{"use strict";A();Object.defineProperty(aR,"__esModule",{value:!0});aR.PACKAGE_NAME=aR.PACKAGE_VERSION=void 0;aR.PACKAGE_VERSION="0.62.0";aR.PACKAGE_NAME="@opentelemetry/instrumentation-koa"});var fZ=F(kO=>{"use strict";A();Object.defineProperty(kO,"__esModule",{value:!0});kO.AttributeNames=void 0;var BCt;(function(e){e.KOA_TYPE="koa.type",e.KOA_NAME="koa.name"})(BCt=kO.AttributeNames||(kO.AttributeNames={}))});var Ike=F(uR=>{"use strict";A();Object.defineProperty(uR,"__esModule",{value:!0});uR.isLayerIgnored=uR.getMiddlewareMetadata=void 0;var Tke=I3(),b3=fZ(),NCt=(Zn(),Me(Fr)),OCt=(e,t,n,r)=>n?{attributes:{[b3.AttributeNames.KOA_NAME]:r?.toString(),[b3.AttributeNames.KOA_TYPE]:Tke.KoaLayerType.ROUTER,[NCt.ATTR_HTTP_ROUTE]:r?.toString()},name:e._matchedRouteName||`router - ${r}`}:{attributes:{[b3.AttributeNames.KOA_NAME]:t.name??"middleware",[b3.AttributeNames.KOA_TYPE]:Tke.KoaLayerType.MIDDLEWARE},name:`middleware - ${t.name}`};uR.getMiddlewareMetadata=OCt;var wCt=(e,t)=>!!(Array.isArray(t?.ignoreLayersType)&&t?.ignoreLayersType?.includes(e));uR.isLayerIgnored=wCt});var bke=F(C3=>{"use strict";A();Object.defineProperty(C3,"__esModule",{value:!0});C3.kLayerPatched=void 0;C3.kLayerPatched=Symbol("koa-layer-patched")});var Bke=F(v3=>{"use strict";A();Object.defineProperty(v3,"__esModule",{value:!0});v3.KoaInstrumentation=void 0;var qm=(ze(),Me(We)),PO=on(),Cke=I3(),vke=Ske(),Rke=Ike(),xke=br(),Dke=bke(),mZ=class extends PO.InstrumentationBase{constructor(t={}){super(vke.PACKAGE_NAME,vke.PACKAGE_VERSION,t)}init(){return new PO.InstrumentationNodeModuleDefinition("koa",[">=2.0.0 <4"],t=>{let n=t[Symbol.toStringTag]==="Module"?t.default:t;return n==null?n:((0,PO.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,PO.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){qm.diag.debug("Patching @koa/router dispatch");let r=t.router?.stack??[];for(let o of r){let i=o.path,s=o.stack;for(let c=0;c<s.length;c++){let l=s[c];s[c]=this._patchLayer(l,!0,i)}}return t}_patchLayer(t,n,r){let o=n?Cke.KoaLayerType.ROUTER:Cke.KoaLayerType.MIDDLEWARE;return t[Dke.kLayerPatched]===!0||(0,Rke.isLayerIgnored)(o,this.getConfig())?t:t.constructor.name==="GeneratorFunction"||t.constructor.name==="AsyncGeneratorFunction"?(qm.diag.debug("ignoring generator-based Koa middleware layer"),t):(t[Dke.kLayerPatched]=!0,qm.diag.debug("patching Koa middleware layer"),async(i,s)=>{if(qm.trace.getSpan(qm.context.active())===void 0)return t(i,s);let l=(0,Rke.getMiddlewareMetadata)(i,t,n,r),f=this.tracer.startSpan(l.name,{attributes:l.attributes}),h=(0,xke.getRPCMetadata)(qm.context.active());h?.type===xke.RPCType.HTTP&&i._matchedRoute&&(h.route=i._matchedRoute.toString());let{requestHook:y}=this.getConfig();y&&(0,PO.safeExecuteInTheMiddle)(()=>y(f,{context:i,middlewareLayer:t,layerType:o}),b=>{b&&qm.diag.error("koa instrumentation: request hook failed",b)},!0);let S=qm.trace.setSpan(qm.context.active(),f);return qm.context.with(S,async()=>{try{return await t(i,s)}catch(b){throw f.recordException(b),b}finally{f.end()}})})}};v3.KoaInstrumentation=mZ});var Nke=F(pE=>{"use strict";A();Object.defineProperty(pE,"__esModule",{value:!0});pE.KoaLayerType=pE.AttributeNames=pE.KoaInstrumentation=void 0;var kCt=Bke();Object.defineProperty(pE,"KoaInstrumentation",{enumerable:!0,get:function(){return kCt.KoaInstrumentation}});var PCt=fZ();Object.defineProperty(pE,"AttributeNames",{enumerable:!0,get:function(){return PCt.AttributeNames}});var MCt=I3();Object.defineProperty(pE,"KoaLayerType",{enumerable:!0,get:function(){return MCt.KoaLayerType}})});var Oke,wke,kke,LCt,Pke,Mke=O(()=>{A();Oke=se(Nke(),1);Zn();dt();gr();gS();wke="Koa",kke=at(wke,Oke.KoaInstrumentation,(e={})=>({ignoreLayersType:e.ignoreLayersType,requestHook(t,n){zr(t,"auto.http.otel.koa");let r=Ot(t).data,o=r["koa.type"];o&&t.setAttribute(Xt,`${o}.koa`);let i=r["koa.name"];if(typeof i=="string"&&t.updateName(i||"< unknown >"),vn()===Qd()){bs&&J.warn("Isolation scope is default isolation scope - skipping setting transactionName");return}let s=r[fg],c=n.context?.request?.method?.toUpperCase()||"GET";s&&vn().setTransactionName(`${c} ${s}`)}})),LCt=((e={})=>({name:wke,setupOnce(){kke(e)}})),Pke=LCt});var AZ=F(hf=>{"use strict";A();Object.defineProperty(hf,"__esModule",{value:!0});hf.ConnectNames=hf.ConnectTypes=hf.AttributeNames=void 0;var UCt;(function(e){e.CONNECT_TYPE="connect.type",e.CONNECT_NAME="connect.name"})(UCt=hf.AttributeNames||(hf.AttributeNames={}));var QCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request_handler"})(QCt=hf.ConnectTypes||(hf.ConnectTypes={}));var FCt;(function(e){e.MIDDLEWARE="middleware",e.REQUEST_HANDLER="request handler"})(FCt=hf.ConnectNames||(hf.ConnectNames={}))});var Lke=F(cR=>{"use strict";A();Object.defineProperty(cR,"__esModule",{value:!0});cR.PACKAGE_NAME=cR.PACKAGE_VERSION=void 0;cR.PACKAGE_VERSION="0.57.0";cR.PACKAGE_NAME="@opentelemetry/instrumentation-connect"});var Uke=F(R3=>{"use strict";A();Object.defineProperty(R3,"__esModule",{value:!0});R3._LAYERS_STORE_PROPERTY=void 0;R3._LAYERS_STORE_PROPERTY=Symbol("opentelemetry.instrumentation-connect.request-route-stack")});var Qke=F(mE=>{"use strict";A();Object.defineProperty(mE,"__esModule",{value:!0});mE.generateRoute=mE.replaceCurrentStackRoute=mE.addNewStackLayer=void 0;var GCt=(ze(),Me(We)),fE=Uke(),zCt=e=>{Array.isArray(e[fE._LAYERS_STORE_PROPERTY])===!1&&Object.defineProperty(e,fE._LAYERS_STORE_PROPERTY,{enumerable:!1,value:[]}),e[fE._LAYERS_STORE_PROPERTY].push("/");let t=e[fE._LAYERS_STORE_PROPERTY].length;return()=>{t===e[fE._LAYERS_STORE_PROPERTY].length?e[fE._LAYERS_STORE_PROPERTY].pop():GCt.diag.warn("Connect: Trying to pop the stack multiple time")}};mE.addNewStackLayer=zCt;var jCt=(e,t)=>{t&&e[fE._LAYERS_STORE_PROPERTY].splice(-1,1,t)};mE.replaceCurrentStackRoute=jCt;var HCt=e=>e[fE._LAYERS_STORE_PROPERTY].reduce((t,n)=>t.replace(/\/+$/,"")+n);mE.generateRoute=HCt});var zke=F(AE=>{"use strict";A();Object.defineProperty(AE,"__esModule",{value:!0});AE.ConnectInstrumentation=AE.ANONYMOUS_NAME=void 0;var $Ct=(ze(),Me(We)),Fke=br(),lR=AZ(),Gke=Lke(),x3=on(),qCt=(Zn(),Me(Fr)),gZ=Qke();AE.ANONYMOUS_NAME="anonymous";var hZ=class extends x3.InstrumentationBase{constructor(t={}){super(Gke.PACKAGE_NAME,Gke.PACKAGE_VERSION,t)}init(){return[new x3.InstrumentationNodeModuleDefinition("connect",[">=3.0.0 <4"],t=>this._patchConstructor(t))]}_patchApp(t){(0,x3.isWrapped)(t.use)||this._wrap(t,"use",this._patchUse.bind(this)),(0,x3.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=lR.ConnectTypes.REQUEST_HANDLER,i=lR.ConnectNames.REQUEST_HANDLER,o=t):(r=lR.ConnectTypes.MIDDLEWARE,i=lR.ConnectNames.MIDDLEWARE,o=n.name||AE.ANONYMOUS_NAME);let s=`${i} - ${o}`,c={attributes:{[qCt.ATTR_HTTP_ROUTE]:t.length>0?t:"/",[lR.AttributeNames.CONNECT_TYPE]:r,[lR.AttributeNames.CONNECT_NAME]:o}};return this.tracer.startSpan(s,c)}_patchMiddleware(t,n){let r=this,o=n.length===4;function i(){if(!r.isEnabled())return n.apply(this,arguments);let[s,c,l]=o?[1,2,3]:[0,1,2],f=arguments[s],h=arguments[c],y=arguments[l];(0,gZ.replaceCurrentStackRoute)(f,t);let S=(0,Fke.getRPCMetadata)($Ct.context.active());t&&S?.type===Fke.RPCType.HTTP&&(S.route=(0,gZ.generateRoute)(f));let b="";t?b=`request handler - ${t}`:b=`middleware - ${n.name||AE.ANONYMOUS_NAME}`;let v=r._startSpan(t,n);r._diag.debug("start span",b);let x=!1;function D(){x?r._diag.debug(`span ${v.name} - already finished`):(x=!0,r._diag.debug(`finishing span ${v.name}`),v.end()),h.removeListener("close",D)}return h.addListener("close",D),arguments[l]=r._patchNext(y,D),n.apply(this,arguments)}return Object.defineProperty(i,"length",{value:n.length,writable:!1,configurable:!0}),i}_patchUse(t){let n=this;return function(...r){let o=r[r.length-1],i=r[r.length-2]||"";return r[r.length-1]=n._patchMiddleware(i,o),t.apply(this,r)}}_patchHandle(t){let n=this;return function(){let[r,o]=[0,2],i=arguments[r],s=arguments[o],c=(0,gZ.addNewStackLayer)(i);return typeof s=="function"&&(arguments[o]=n._patchOut(s,c)),t.apply(this,arguments)}}_patchOut(t,n){return function(...o){return n(),Reflect.apply(t,this,o)}}};AE.ConnectInstrumentation=hZ});var Hke=F(tp=>{"use strict";A();Object.defineProperty(tp,"__esModule",{value:!0});tp.ConnectTypes=tp.ConnectNames=tp.AttributeNames=tp.ANONYMOUS_NAME=tp.ConnectInstrumentation=void 0;var jke=zke();Object.defineProperty(tp,"ConnectInstrumentation",{enumerable:!0,get:function(){return jke.ConnectInstrumentation}});Object.defineProperty(tp,"ANONYMOUS_NAME",{enumerable:!0,get:function(){return jke.ANONYMOUS_NAME}});var _Z=AZ();Object.defineProperty(tp,"AttributeNames",{enumerable:!0,get:function(){return _Z.AttributeNames}});Object.defineProperty(tp,"ConnectNames",{enumerable:!0,get:function(){return _Z.ConnectNames}});Object.defineProperty(tp,"ConnectTypes",{enumerable:!0,get:function(){return _Z.ConnectTypes}})});var $ke,qke,Vke,VCt,Yke,Kke=O(()=>{A();$ke=se(Hke(),1);gr();qke="Connect",Vke=at(qke,()=>new $ke.ConnectInstrumentation),VCt=(()=>({name:qke,setupOnce(){Vke()}})),Yke=VCt});var Jke=F(oa=>{"use strict";A();Object.defineProperty(oa,"__esModule",{value:!0});oa.DB_SYSTEM_VALUE_MSSQL=oa.ATTR_NET_PEER_PORT=oa.ATTR_NET_PEER_NAME=oa.ATTR_DB_USER=oa.ATTR_DB_SYSTEM=oa.ATTR_DB_STATEMENT=oa.ATTR_DB_SQL_TABLE=oa.ATTR_DB_NAME=void 0;oa.ATTR_DB_NAME="db.name";oa.ATTR_DB_SQL_TABLE="db.sql.table";oa.ATTR_DB_STATEMENT="db.statement";oa.ATTR_DB_SYSTEM="db.system";oa.ATTR_DB_USER="db.user";oa.ATTR_NET_PEER_NAME="net.peer.name";oa.ATTR_NET_PEER_PORT="net.peer.port";oa.DB_SYSTEM_VALUE_MSSQL="mssql"});var Zke=F(dR=>{"use strict";A();Object.defineProperty(dR,"__esModule",{value:!0});dR.once=dR.getSpanName=void 0;function YCt(e,t,n,r){return e==="execBulkLoad"&&r&&t?`${e} ${r} ${t}`:e==="callProcedure"?t?`${e} ${n} ${t}`:`${e} ${n}`:t?`${e} ${t}`:`${e}`}dR.getSpanName=YCt;var KCt=e=>{let t=!1;return(...n)=>{if(!t)return t=!0,e(...n)}};dR.once=KCt});var Wke=F(pR=>{"use strict";A();Object.defineProperty(pR,"__esModule",{value:!0});pR.PACKAGE_NAME=pR.PACKAGE_VERSION=void 0;pR.PACKAGE_VERSION="0.33.0";pR.PACKAGE_NAME="@opentelemetry/instrumentation-tedious"});var rPe=F(hE=>{"use strict";A();Object.defineProperty(hE,"__esModule",{value:!0});hE.TediousInstrumentation=hE.INJECTED_CTX=void 0;var fR=(ze(),Me(We)),JCt=Fe("events"),Vm=on(),xS=(Zn(),Me(Fr)),gE=Jke(),Xke=Zke(),ePe=Wke(),nPe=Symbol("opentelemetry.instrumentation-tedious.current-database");hE.INJECTED_CTX=Symbol("opentelemetry.instrumentation-tedious.context-info-injected");var tPe=["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"];function D3(e){Object.defineProperty(this,nPe,{value:e,writable:!0})}var EZ=class e extends Vm.InstrumentationBase{static COMPONENT="tedious";_netSemconvStability;_dbSemconvStability;constructor(t={}){super(ePe.PACKAGE_NAME,ePe.PACKAGE_VERSION,t),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,Vm.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN),this._dbSemconvStability=(0,Vm.semconvStabilityFromStr)("database",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}init(){return[new Vm.InstrumentationNodeModuleDefinition(e.COMPONENT,[">=1.11.0 <20"],t=>{let n=t.Connection.prototype;for(let r of tPe)(0,Vm.isWrapped)(n[r])&&this._unwrap(n,r),this._wrap(n,r,this._patchQuery(r,t));return(0,Vm.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 tPe)this._unwrap(n,r);this._unwrap(n,"connect")})]}_patchConnect(t){return function(){return D3.call(this,this.config?.options?.database),this.removeListener("databaseChange",D3),this.on("databaseChange",D3),this.once("end",()=>{this.removeListener("databaseChange",D3)}),t.apply(this,arguments)}}_buildTraceparent(t){let n=t.spanContext();return`00-${n.traceId}-${n.spanId}-0${Number(n.traceFlags||fR.TraceFlags.NONE).toString(16)}`}_injectContextInfo(t,n,r){return new Promise(o=>{try{let i="set context_info @opentelemetry_traceparent",s=new n.Request(i,l=>{o()});Object.defineProperty(s,hE.INJECTED_CTX,{value:!0});let c=Buffer.from(r,"utf8");s.addParameter("opentelemetry_traceparent",n.TYPES.VarBinary,c,{length:c.length}),t.execSql(s)}catch{o()}})}_shouldInjectFor(t){return t==="execSql"||t==="execSqlBatch"||t==="callProcedure"||t==="execute"}_patchQuery(t,n){return r=>{let o=this;function i(s){if(s?.[hE.INJECTED_CTX])return r.apply(this,arguments);if(!(s instanceof JCt.EventEmitter))return o._diag.warn(`Unexpected invocation of patched ${t} method. Span not recorded`),r.apply(this,arguments);let c=0,l=0,f=()=>l++,h=()=>c++,y=this[nPe],S=(G=>G.sqlTextOrProcedure==="sp_prepare"&&G.parametersByName?.stmt?.value?G.parametersByName.stmt.value:G.sqlTextOrProcedure)(s),b={};o._dbSemconvStability&Vm.SemconvStability.OLD&&(b[gE.ATTR_DB_SYSTEM]=gE.DB_SYSTEM_VALUE_MSSQL,b[gE.ATTR_DB_NAME]=y,b[gE.ATTR_DB_USER]=this.config?.userName??this.config?.authentication?.options?.userName,b[gE.ATTR_DB_STATEMENT]=S,b[gE.ATTR_DB_SQL_TABLE]=s.table),o._dbSemconvStability&Vm.SemconvStability.STABLE&&(b[xS.ATTR_DB_NAMESPACE]=y,b[xS.ATTR_DB_SYSTEM_NAME]=xS.DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER,b[xS.ATTR_DB_QUERY_TEXT]=S,b[xS.ATTR_DB_COLLECTION_NAME]=s.table),o._netSemconvStability&Vm.SemconvStability.OLD&&(b[gE.ATTR_NET_PEER_NAME]=this.config?.server,b[gE.ATTR_NET_PEER_PORT]=this.config?.options?.port),o._netSemconvStability&Vm.SemconvStability.STABLE&&(b[xS.ATTR_SERVER_ADDRESS]=this.config?.server,b[xS.ATTR_SERVER_PORT]=this.config?.options?.port);let v=o.tracer.startSpan((0,Xke.getSpanName)(t,y,S,s.table),{kind:fR.SpanKind.CLIENT,attributes:b}),x=(0,Xke.once)(G=>{s.removeListener("done",f),s.removeListener("doneInProc",f),s.removeListener("doneProc",h),s.removeListener("error",x),this.removeListener("end",x),v.setAttribute("tedious.procedure_count",c),v.setAttribute("tedious.statement_count",l),G&&v.setStatus({code:fR.SpanStatusCode.ERROR,message:G.message}),v.end()});s.on("done",f),s.on("doneInProc",f),s.on("doneProc",h),s.once("error",x),this.on("end",x),typeof s.callback=="function"?o._wrap(s,"callback",o._patchCallbackQuery(x)):o._diag.error("Expected request.callback to be a function");let D=()=>fR.context.with(fR.trace.setSpan(fR.context.active(),v),r,this,...arguments);if(!(o.getConfig().enableTraceContextPropagation&&o._shouldInjectFor(t)))return D();let z=o._buildTraceparent(v);o._injectContextInfo(this,n,z).finally(D)}return Object.defineProperty(i,"length",{value:r.length,writable:!1}),i}}_patchCallbackQuery(t){return n=>function(r,o,i){return t(r),n.apply(this,arguments)}}};hE.TediousInstrumentation=EZ});var oPe=F(B3=>{"use strict";A();Object.defineProperty(B3,"__esModule",{value:!0});B3.TediousInstrumentation=void 0;var ZCt=rPe();Object.defineProperty(B3,"TediousInstrumentation",{enumerable:!0,get:function(){return ZCt.TediousInstrumentation}})});var iPe,WCt,sPe,aPe,XCt,uPe,cPe=O(()=>{A();iPe=se(oPe(),1);dt();gr();WCt=new Set(["callProcedure","execSql","execSqlBatch","execBulkLoad","prepare","execute"]),sPe="Tedious",aPe=at(sPe,()=>new iPe.TediousInstrumentation({})),XCt=(()=>{let e;return{name:sPe,setupOnce(){let t=aPe();e=_N(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let{description:r,data:o}=Ot(n);if(!r||o["db.system"]!=="mssql")return;let i=r.split(" ")[0]||"";WCt.has(i)&&n.setAttribute(kt,"auto.db.otel.tedious")}))}}}),uPe=XCt});var lPe=F(mR=>{"use strict";A();Object.defineProperty(mR,"__esModule",{value:!0});mR.PACKAGE_NAME=mR.PACKAGE_VERSION=void 0;mR.PACKAGE_VERSION="0.57.0";mR.PACKAGE_NAME="@opentelemetry/instrumentation-generic-pool"});var pPe=F(N3=>{"use strict";A();Object.defineProperty(N3,"__esModule",{value:!0});N3.GenericPoolInstrumentation=void 0;var AR=(ze(),Me(We)),DS=on(),dPe=lPe(),yZ="generic-pool",SZ=class extends DS.InstrumentationBase{_isDisabled=!1;constructor(t={}){super(dPe.PACKAGE_NAME,dPe.PACKAGE_VERSION,t)}init(){return[new DS.InstrumentationNodeModuleDefinition(yZ,[">=3.0.0 <4"],t=>{let n=t.Pool;return(0,DS.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 DS.InstrumentationNodeModuleDefinition(yZ,[">=2.4.0 <3"],t=>{let n=t.Pool;return(0,DS.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 DS.InstrumentationNodeModuleDefinition(yZ,[">=2.0.0 <2.4"],t=>(this._isDisabled=!1,(0,DS.isWrapped)(t.Pool)&&this._unwrap(t,"Pool"),this._wrap(t,"Pool",this._poolWrapper.bind(this)),t),t=>(this._isDisabled=!0,t))]}_acquirePatcher(t){let n=this;return function(...o){let i=AR.context.active(),s=n.tracer.startSpan("generic-pool.acquire",{},i);return AR.context.with(AR.trace.setSpan(i,s),()=>t.call(this,...o).then(c=>(s.end(),c),c=>{throw s.recordException(c),s.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 s=AR.context.active(),c=n.tracer.startSpan("generic-pool.acquire",{},s);return AR.context.with(AR.trace.setSpan(s,c),()=>{t.call(this,(l,f)=>{if(c.end(),o)return o(l,f)},i)})}}};N3.GenericPoolInstrumentation=SZ});var fPe=F(O3=>{"use strict";A();Object.defineProperty(O3,"__esModule",{value:!0});O3.GenericPoolInstrumentation=void 0;var evt=pPe();Object.defineProperty(O3,"GenericPoolInstrumentation",{enumerable:!0,get:function(){return evt.GenericPoolInstrumentation}})});var mPe,APe,gPe,tvt,hPe,_Pe=O(()=>{A();mPe=se(fPe(),1);dt();gr();APe="GenericPool",gPe=at(APe,()=>new mPe.GenericPoolInstrumentation({})),tvt=(()=>{let e;return{name:APe,setupOnce(){let t=gPe();e=_N(t)},setup(t){e?.(()=>t.on("spanStart",n=>{let o=Ot(n).description;(o==="generic-pool.aquire"||o==="generic-pool.acquire")&&n.setAttribute(kt,"auto.db.otel.generic_pool")}))}}}),hPe=tvt});var TZ=F(Ym=>{"use strict";A();Object.defineProperty(Ym,"__esModule",{value:!0});Ym.ATTR_NET_PEER_PORT=Ym.ATTR_NET_PEER_NAME=Ym.ATTR_MESSAGING_SYSTEM=Ym.ATTR_MESSAGING_OPERATION=void 0;Ym.ATTR_MESSAGING_OPERATION="messaging.operation";Ym.ATTR_MESSAGING_SYSTEM="messaging.system";Ym.ATTR_NET_PEER_NAME="net.peer.name";Ym.ATTR_NET_PEER_PORT="net.peer.port"});var IZ=F(gi=>{"use strict";A();Object.defineProperty(gi,"__esModule",{value:!0});gi.ATTR_MESSAGING_CONVERSATION_ID=gi.OLD_ATTR_MESSAGING_MESSAGE_ID=gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC=gi.ATTR_MESSAGING_URL=gi.ATTR_MESSAGING_PROTOCOL_VERSION=gi.ATTR_MESSAGING_PROTOCOL=gi.MESSAGING_OPERATION_VALUE_PROCESS=gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY=gi.ATTR_MESSAGING_DESTINATION_KIND=gi.ATTR_MESSAGING_DESTINATION=void 0;gi.ATTR_MESSAGING_DESTINATION="messaging.destination";gi.ATTR_MESSAGING_DESTINATION_KIND="messaging.destination_kind";gi.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY="messaging.rabbitmq.routing_key";gi.MESSAGING_OPERATION_VALUE_PROCESS="process";gi.ATTR_MESSAGING_PROTOCOL="messaging.protocol";gi.ATTR_MESSAGING_PROTOCOL_VERSION="messaging.protocol_version";gi.ATTR_MESSAGING_URL="messaging.url";gi.MESSAGING_DESTINATION_KIND_VALUE_TOPIC="topic";gi.OLD_ATTR_MESSAGING_MESSAGE_ID="messaging.message_id";gi.ATTR_MESSAGING_CONVERSATION_ID="messaging.conversation_id"});var bZ=F(BS=>{"use strict";A();Object.defineProperty(BS,"__esModule",{value:!0});BS.DEFAULT_CONFIG=BS.EndOperation=void 0;var nvt;(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"})(nvt=BS.EndOperation||(BS.EndOperation={}));BS.DEFAULT_CONFIG={consumeTimeoutMs:1e3*60,useLinksForConsume:!1}});var TPe=F(hi=>{"use strict";A();Object.defineProperty(hi,"__esModule",{value:!0});hi.isConfirmChannelTracing=hi.unmarkConfirmChannelTracing=hi.markConfirmChannelTracing=hi.getConnectionAttributesFromUrl=hi.getConnectionAttributesFromServer=hi.normalizeExchange=hi.CONNECTION_ATTRIBUTES=hi.CHANNEL_CONSUME_TIMEOUT_TIMER=hi.CHANNEL_SPANS_NOT_ENDED=hi.MESSAGE_STORED_SPAN=void 0;var CZ=(ze(),Me(We)),_E=on(),w3=(Zn(),Me(Fr)),MO=TZ(),k3=IZ();hi.MESSAGE_STORED_SPAN=Symbol("opentelemetry.amqplib.message.stored-span");hi.CHANNEL_SPANS_NOT_ENDED=Symbol("opentelemetry.amqplib.channel.spans-not-ended");hi.CHANNEL_CONSUME_TIMEOUT_TIMER=Symbol("opentelemetry.amqplib.channel.consumer-timeout-timer");hi.CONNECTION_ATTRIBUTES=Symbol("opentelemetry.amqplib.connection.attributes");var vZ=(0,CZ.createContextKey)("opentelemetry.amqplib.channel.is-confirm-channel"),rvt=e=>e!==""?e:"<default>";hi.normalizeExchange=rvt;var ovt=e=>e.replace(/:[^:@/]*@/,":***@"),EPe=(e,t)=>e||(t==="AMQP"?5672:5671),yPe=e=>{let t=e||"amqp";return(t.endsWith(":")?t.substring(0,t.length-1):t).toUpperCase()},SPe=e=>e||"localhost",Km=(e,t,n,r)=>n?{[t]:n}:(CZ.diag.error(`amqplib instrumentation: could not extract connection attribute ${r} from user supplied url`,{url:e}),{}),ivt=e=>{let t=e.serverProperties.product?.toLowerCase?.();return t?{[MO.ATTR_MESSAGING_SYSTEM]:t}:{}};hi.getConnectionAttributesFromServer=ivt;var svt=(e,t)=>{let n={[k3.ATTR_MESSAGING_PROTOCOL_VERSION]:"0.9.1"};if(e=e||"amqp://localhost",typeof e=="object"){let r=e,o=yPe(r?.protocol);Object.assign(n,{...Km(e,k3.ATTR_MESSAGING_PROTOCOL,o,"protocol")});let i=SPe(r?.hostname);t&_E.SemconvStability.OLD&&Object.assign(n,{...Km(e,MO.ATTR_NET_PEER_NAME,i,"hostname")}),t&_E.SemconvStability.STABLE&&Object.assign(n,{...Km(e,w3.ATTR_SERVER_ADDRESS,i,"hostname")});let s=EPe(r.port,o);t&_E.SemconvStability.OLD&&Object.assign(n,Km(e,MO.ATTR_NET_PEER_PORT,s,"port")),t&_E.SemconvStability.STABLE&&Object.assign(n,Km(e,w3.ATTR_SERVER_PORT,s,"port"))}else{let r=ovt(e);n[k3.ATTR_MESSAGING_URL]=r;try{let o=new URL(r),i=yPe(o.protocol);Object.assign(n,{...Km(r,k3.ATTR_MESSAGING_PROTOCOL,i,"protocol")});let s=SPe(o.hostname);t&_E.SemconvStability.OLD&&Object.assign(n,{...Km(r,MO.ATTR_NET_PEER_NAME,s,"hostname")}),t&_E.SemconvStability.STABLE&&Object.assign(n,{...Km(r,w3.ATTR_SERVER_ADDRESS,s,"hostname")});let c=EPe(o.port?parseInt(o.port):void 0,i);t&_E.SemconvStability.OLD&&Object.assign(n,Km(r,MO.ATTR_NET_PEER_PORT,c,"port")),t&_E.SemconvStability.STABLE&&Object.assign(n,Km(r,w3.ATTR_SERVER_PORT,c,"port"))}catch(o){CZ.diag.error("amqplib instrumentation: error while extracting connection details from connection url",{censoredUrl:r,err:o})}}return n};hi.getConnectionAttributesFromUrl=svt;var avt=e=>e.setValue(vZ,!0);hi.markConfirmChannelTracing=avt;var uvt=e=>e.deleteValue(vZ);hi.unmarkConfirmChannelTracing=uvt;var cvt=e=>e.getValue(vZ)===!0;hi.isConfirmChannelTracing=cvt});var IPe=F(gR=>{"use strict";A();Object.defineProperty(gR,"__esModule",{value:!0});gR.PACKAGE_NAME=gR.PACKAGE_VERSION=void 0;gR.PACKAGE_VERSION="0.61.0";gR.PACKAGE_NAME="@opentelemetry/instrumentation-amqplib"});var CPe=F(L3=>{"use strict";A();Object.defineProperty(L3,"__esModule",{value:!0});L3.AmqplibInstrumentation=void 0;var Xo=(ze(),Me(We)),P3=br(),vr=on(),lvt=TZ(),$l=IZ(),Ku=bZ(),_i=TPe(),bPe=IPe(),M3=[">=0.5.5 <1"],RZ=class extends vr.InstrumentationBase{_netSemconvStability;constructor(t={}){super(bPe.PACKAGE_NAME,bPe.PACKAGE_VERSION,{...Ku.DEFAULT_CONFIG,...t}),this._setSemconvStabilityFromEnv()}_setSemconvStabilityFromEnv(){this._netSemconvStability=(0,vr.semconvStabilityFromStr)("http",process.env.OTEL_SEMCONV_STABILITY_OPT_IN)}setConfig(t={}){super.setConfig({...Ku.DEFAULT_CONFIG,...t})}init(){let t=new vr.InstrumentationNodeModuleFile("amqplib/lib/channel_model.js",M3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),n=new vr.InstrumentationNodeModuleFile("amqplib/lib/callback_model.js",M3,this.patchChannelModel.bind(this),this.unpatchChannelModel.bind(this)),r=new vr.InstrumentationNodeModuleFile("amqplib/lib/connect.js",M3,this.patchConnect.bind(this),this.unpatchConnect.bind(this));return new vr.InstrumentationNodeModuleDefinition("amqplib",M3,void 0,void 0,[t,r,n])}patchConnect(t){return t=this.unpatchConnect(t),(0,vr.isWrapped)(t.connect)||this._wrap(t,"connect",this.getConnectPatch.bind(this)),t}unpatchConnect(t){return(0,vr.isWrapped)(t.connect)&&this._unwrap(t,"connect"),t}patchChannelModel(t,n){return(0,vr.isWrapped)(t.Channel.prototype.publish)||this._wrap(t.Channel.prototype,"publish",this.getPublishPatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.consume)||this._wrap(t.Channel.prototype,"consume",this.getConsumePatch.bind(this,n)),(0,vr.isWrapped)(t.Channel.prototype.ack)||this._wrap(t.Channel.prototype,"ack",this.getAckPatch.bind(this,!1,Ku.EndOperation.Ack)),(0,vr.isWrapped)(t.Channel.prototype.nack)||this._wrap(t.Channel.prototype,"nack",this.getAckPatch.bind(this,!0,Ku.EndOperation.Nack)),(0,vr.isWrapped)(t.Channel.prototype.reject)||this._wrap(t.Channel.prototype,"reject",this.getAckPatch.bind(this,!0,Ku.EndOperation.Reject)),(0,vr.isWrapped)(t.Channel.prototype.ackAll)||this._wrap(t.Channel.prototype,"ackAll",this.getAckAllPatch.bind(this,!1,Ku.EndOperation.AckAll)),(0,vr.isWrapped)(t.Channel.prototype.nackAll)||this._wrap(t.Channel.prototype,"nackAll",this.getAckAllPatch.bind(this,!0,Ku.EndOperation.NackAll)),(0,vr.isWrapped)(t.Channel.prototype.emit)||this._wrap(t.Channel.prototype,"emit",this.getChannelEmitPatch.bind(this)),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)||this._wrap(t.ConfirmChannel.prototype,"publish",this.getConfirmedPublishPatch.bind(this,n)),t}unpatchChannelModel(t){return(0,vr.isWrapped)(t.Channel.prototype.publish)&&this._unwrap(t.Channel.prototype,"publish"),(0,vr.isWrapped)(t.Channel.prototype.consume)&&this._unwrap(t.Channel.prototype,"consume"),(0,vr.isWrapped)(t.Channel.prototype.ack)&&this._unwrap(t.Channel.prototype,"ack"),(0,vr.isWrapped)(t.Channel.prototype.nack)&&this._unwrap(t.Channel.prototype,"nack"),(0,vr.isWrapped)(t.Channel.prototype.reject)&&this._unwrap(t.Channel.prototype,"reject"),(0,vr.isWrapped)(t.Channel.prototype.ackAll)&&this._unwrap(t.Channel.prototype,"ackAll"),(0,vr.isWrapped)(t.Channel.prototype.nackAll)&&this._unwrap(t.Channel.prototype,"nackAll"),(0,vr.isWrapped)(t.Channel.prototype.emit)&&this._unwrap(t.Channel.prototype,"emit"),(0,vr.isWrapped)(t.ConfirmChannel.prototype.publish)&&this._unwrap(t.ConfirmChannel.prototype,"publish"),t}getConnectPatch(t){let n=this;return function(o,i,s){return t.call(this,o,i,function(c,l){if(c==null){let f=(0,_i.getConnectionAttributesFromUrl)(o,n._netSemconvStability),h=(0,_i.getConnectionAttributesFromServer)(l);l[_i.CONNECTION_ATTRIBUTES]={...f,...h}}s.apply(this,arguments)})}}getChannelEmitPatch(t){let n=this;return function(o){if(o==="close"){n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelClosed,void 0);let i=this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER];i&&clearInterval(i),this[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=void 0}else o==="error"&&n.endAllSpansOnChannel(this,!0,Ku.EndOperation.ChannelError,void 0);return t.apply(this,arguments)}}getAckAllPatch(t,n,r){let o=this;return function(s){return o.endAllSpansOnChannel(this,t,n,s),r.apply(this,arguments)}}getAckPatch(t,n,r){let o=this;return function(s,c,l){let f=this,h=n===Ku.EndOperation.Reject?c:l,y=f[_i.CHANNEL_SPANS_NOT_ENDED]??[],S=y.findIndex(b=>b.msg===s);if(S<0)o.endConsumerSpan(s,t,n,h);else if(n!==Ku.EndOperation.Reject&&c){for(let b=0;b<=S;b++)o.endConsumerSpan(y[b].msg,t,n,h);y.splice(0,S+1)}else o.endConsumerSpan(s,t,n,h),y.splice(S,1);return r.apply(this,arguments)}}getConsumePatch(t,n){let r=this;return function(i,s,c){let l=this;if(!Object.prototype.hasOwnProperty.call(l,_i.CHANNEL_SPANS_NOT_ENDED)){let{consumeTimeoutMs:h}=r.getConfig();if(h){let y=setInterval(()=>{r.checkConsumeTimeoutOnChannel(l)},h);y.unref(),l[_i.CHANNEL_CONSUME_TIMEOUT_TIMER]=y}l[_i.CHANNEL_SPANS_NOT_ENDED]=[]}let f=function(h){if(!h)return s.call(this,h);let y=h.properties.headers??{},S=Xo.propagation.extract(Xo.ROOT_CONTEXT,y),b=h.fields?.exchange,v;if(r._config.useLinksForConsume){let Q=S?Xo.trace.getSpan(S)?.spanContext():void 0;S=void 0,Q&&(v=[{context:Q}])}let x=r.tracer.startSpan(`${i} process`,{kind:Xo.SpanKind.CONSUMER,attributes:{...l?.connection?.[_i.CONNECTION_ATTRIBUTES],[$l.ATTR_MESSAGING_DESTINATION]:b,[$l.ATTR_MESSAGING_DESTINATION_KIND]:$l.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[$l.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:h.fields?.routingKey,[lvt.ATTR_MESSAGING_OPERATION]:$l.MESSAGING_OPERATION_VALUE_PROCESS,[$l.OLD_ATTR_MESSAGING_MESSAGE_ID]:h?.properties.messageId,[$l.ATTR_MESSAGING_CONVERSATION_ID]:h?.properties.correlationId},links:v},S),{consumeHook:D}=r.getConfig();D&&(0,vr.safeExecuteInTheMiddle)(()=>D(x,{moduleVersion:t,msg:h}),Q=>{Q&&Xo.diag.error("amqplib instrumentation: consumerHook error",Q)},!0),c?.noAck||(l[_i.CHANNEL_SPANS_NOT_ENDED].push({msg:h,timeOfConsume:(0,P3.hrTime)()}),h[_i.MESSAGE_STORED_SPAN]=x);let k=S||Xo.ROOT_CONTEXT;Xo.context.with(Xo.trace.setSpan(k,x),()=>{s.call(this,h)}),c?.noAck&&(r.callConsumeEndHook(x,h,!1,Ku.EndOperation.AutoAck),x.end())};return arguments[1]=f,n.apply(this,arguments)}}getConfirmedPublishPatch(t,n){let r=this;return function(i,s,c,l,f){let h=this,{span:y,modifiedOptions:S}=r.createPublishSpan(r,i,s,h,l),{publishHook:b}=r.getConfig();b&&(0,vr.safeExecuteInTheMiddle)(()=>b(y,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:S,isConfirmChannel:!0}),k=>{k&&Xo.diag.error("amqplib instrumentation: publishHook error",k)},!0);let v=function(k,Q){try{f?.call(this,k,Q)}finally{let{publishConfirmHook:z}=r.getConfig();z&&(0,vr.safeExecuteInTheMiddle)(()=>z(y,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:l,isConfirmChannel:!0,confirmError:k}),G=>{G&&Xo.diag.error("amqplib instrumentation: publishConfirmHook error",G)},!0),k&&y.setStatus({code:Xo.SpanStatusCode.ERROR,message:"message confirmation has been nack'ed"}),y.end()}},x=(0,_i.markConfirmChannelTracing)(Xo.context.active()),D=[...arguments];return D[3]=S,D[4]=Xo.context.bind((0,_i.unmarkConfirmChannelTracing)(Xo.trace.setSpan(x,y)),v),Xo.context.with(x,n.bind(this,...D))}}getPublishPatch(t,n){let r=this;return function(i,s,c,l){if((0,_i.isConfirmChannelTracing)(Xo.context.active()))return n.apply(this,arguments);{let f=this,{span:h,modifiedOptions:y}=r.createPublishSpan(r,i,s,f,l),{publishHook:S}=r.getConfig();S&&(0,vr.safeExecuteInTheMiddle)(()=>S(h,{moduleVersion:t,exchange:i,routingKey:s,content:c,options:y,isConfirmChannel:!1}),x=>{x&&Xo.diag.error("amqplib instrumentation: publishHook error",x)},!0);let b=[...arguments];b[3]=y;let v=n.apply(this,b);return h.end(),v}}}createPublishSpan(t,n,r,o,i){let s=(0,_i.normalizeExchange)(n),c=t.tracer.startSpan(`publish ${s}`,{kind:Xo.SpanKind.PRODUCER,attributes:{...o.connection[_i.CONNECTION_ATTRIBUTES],[$l.ATTR_MESSAGING_DESTINATION]:n,[$l.ATTR_MESSAGING_DESTINATION_KIND]:$l.MESSAGING_DESTINATION_KIND_VALUE_TOPIC,[$l.ATTR_MESSAGING_RABBITMQ_ROUTING_KEY]:r,[$l.OLD_ATTR_MESSAGING_MESSAGE_ID]:i?.messageId,[$l.ATTR_MESSAGING_CONVERSATION_ID]:i?.correlationId}}),l=i??{};return l.headers=l.headers??{},Xo.propagation.inject(Xo.trace.setSpan(Xo.context.active(),c),l.headers),{span:c,modifiedOptions:l}}endConsumerSpan(t,n,r,o){let i=t[_i.MESSAGE_STORED_SPAN];i&&(n!==!1&&i.setStatus({code:Xo.SpanStatusCode.ERROR,message:r!==Ku.EndOperation.ChannelClosed&&r!==Ku.EndOperation.ChannelError?`${r} called on message${o===!0?" with requeue":o===!1?" without requeue":""}`:r}),this.callConsumeEndHook(i,t,n,r),i.end(),t[_i.MESSAGE_STORED_SPAN]=void 0)}endAllSpansOnChannel(t,n,r,o){(t[_i.CHANNEL_SPANS_NOT_ENDED]??[]).forEach(s=>{this.endConsumerSpan(s.msg,n,r,o)}),t[_i.CHANNEL_SPANS_NOT_ENDED]=[]}callConsumeEndHook(t,n,r,o){let{consumeEndHook:i}=this.getConfig();i&&(0,vr.safeExecuteInTheMiddle)(()=>i(t,{msg:n,rejected:r,endOperation:o}),s=>{s&&Xo.diag.error("amqplib instrumentation: consumerEndHook error",s)},!0)}checkConsumeTimeoutOnChannel(t){let n=(0,P3.hrTime)(),r=t[_i.CHANNEL_SPANS_NOT_ENDED]??[],o,{consumeTimeoutMs:i}=this.getConfig();for(o=0;o<r.length;o++){let s=r[o],c=(0,P3.hrTimeDuration)(s.timeOfConsume,n);if((0,P3.hrTimeToMilliseconds)(c)<i)break;this.endConsumerSpan(s.msg,null,Ku.EndOperation.InstrumentationTimeout,!0)}r.splice(0,o)}};L3.AmqplibInstrumentation=RZ});var RPe=F(EE=>{"use strict";A();Object.defineProperty(EE,"__esModule",{value:!0});EE.EndOperation=EE.DEFAULT_CONFIG=EE.AmqplibInstrumentation=void 0;var dvt=CPe();Object.defineProperty(EE,"AmqplibInstrumentation",{enumerable:!0,get:function(){return dvt.AmqplibInstrumentation}});var vPe=bZ();Object.defineProperty(EE,"DEFAULT_CONFIG",{enumerable:!0,get:function(){return vPe.DEFAULT_CONFIG}});Object.defineProperty(EE,"EndOperation",{enumerable:!0,get:function(){return vPe.EndOperation}})});var xPe,DPe,pvt,BPe,fvt,NPe,OPe=O(()=>{A();xPe=se(RPe(),1);gr();DPe="Amqplib",pvt={consumeEndHook:e=>{zr(e,"auto.amqplib.otel.consumer")},publishHook:e=>{zr(e,"auto.amqplib.otel.publisher")}},BPe=at(DPe,()=>new xPe.AmqplibInstrumentation(pvt)),fvt=(()=>({name:DPe,setupOnce(){BPe()}})),NPe=fvt});var LO,xZ=O(()=>{A();LO="VercelAI"});function Avt(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 gvt(e){if(typeof e!="object"||e===null||!("content"in e))return;let t=e;Array.isArray(t.content)&&(hvt(t.content),_vt(t.content))}function hvt(e){for(let t of e){if(!Avt(t))continue;let n=o7(t.toolCallId);n?wl(r=>{r.setContext("trace",{trace_id:n.traceId,span_id:n.spanId}),r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})}):wl(r=>{r.setTag("vercel.ai.tool.name",t.toolName),r.setTag("vercel.ai.tool.callId",t.toolCallId),r.setLevel("error"),nn(t.error,{mechanism:{type:"auto.vercelai.otel",handled:!1}})})}}function _vt(e){for(let t of e)typeof t=="object"&&t!==null&&"toolCallId"in t&&typeof t.toolCallId=="string"&&i7(t.toolCallId)}function Evt(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 Q3,mvt,wPe,U3,kPe=O(()=>{A();Q3=se(on(),1);dt();xZ();mvt=[">=3.0.0 <7"],wPe=["generateText","streamText","generateObject","streamObject","embed","embedMany","rerank"];U3=class e extends Q3.InstrumentationBase{__init(){this._isPatched=!1}__init2(){this._callbacks=[]}constructor(t={}){super("@sentry/instrumentation-vercel-ai",Wn,t),e.prototype.__init.call(this),e.prototype.__init2.call(this)}init(){return new Q3.InstrumentationNodeModuleDefinition("ai",mvt,this._patch.bind(this))}callWhenPatched(t){this._isPatched?t():this._callbacks.push(t)}_patch(t){this._isPatched=!0,this._callbacks.forEach(r=>r()),this._callbacks=[];let n=r=>new Proxy(r,{apply:(o,i,s)=>{let c=s[0].experimental_telemetry||{},l=c.isEnabled,f=gt(),h=f?.getIntegrationByName(LO),y=h?.options,S=h?!!f?.getOptions().sendDefaultPii:!1,{recordInputs:b,recordOutputs:v}=Evt(y,c,l,S);return s[0].experimental_telemetry={...c,isEnabled:l!==void 0?l:!0,recordInputs:b,recordOutputs:v},df(()=>Reflect.apply(o,i,s),x=>{x&&typeof x=="object"&&Xi(x,"_sentry_active_span",Pc())},()=>{},x=>{gvt(x)})}});if(Object.prototype.toString.call(t)==="[object Module]"){for(let r of wPe)t[r]!=null&&(t[r]=n(t[r]));return t}else{let r=wPe.reduce((o,i)=>(t[i]!=null&&(o[i]=n(t[i])),o),{});return{...t,...r}}}}});function yvt(e){return!!e.getIntegrationByName("Modules")?.getModules?.()?.ai}var PPe,Svt,MPe,LPe=O(()=>{A();dt();gr();xZ();kPe();PPe=at(LO,()=>new U3({}));Svt=((e={})=>{let t;return{name:LO,options:e,setupOnce(){t=PPe()},afterAllSetup(n){e.force??yvt(n)?HU(n):t?.callWhenPatched(()=>HU(n))}}}),MPe=Svt});var G3,Tvt,F3,UPe=O(()=>{A();G3=se(on(),1);dt();Tvt=[">=4.0.0 <7"],F3=class extends G3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-openai",Wn,t)}init(){return new G3.InstrumentationNodeModuleDefinition("openai",Tvt,this._patch.bind(this))}_patch(t){let n=t;return n=this._patchClient(n,"OpenAI"),n=this._patchClient(n,"AzureOpenAI"),n}_patchClient(t,n){let r=t[n];if(!r)return t;let o=this.getConfig(),i=function(...s){if(Xy(j_))return Reflect.construct(r,s);let c=Reflect.construct(r,s);return VU(c,o)};Object.setPrototypeOf(i,r),Object.setPrototypeOf(i.prototype,r.prototype);for(let s of Object.getOwnPropertyNames(r))if(!["length","name","prototype"].includes(s)){let c=Object.getOwnPropertyDescriptor(r,s);c&&Object.defineProperty(i,s,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 QPe,Ivt,FPe,GPe=O(()=>{A();dt();gr();UPe();QPe=at(j_,e=>new F3(e)),Ivt=((e={})=>({name:j_,setupOnce(){QPe(e)}})),FPe=Ivt});var j3,bvt,z3,zPe=O(()=>{A();j3=se(on(),1);dt();bvt=[">=0.19.2 <1.0.0"],z3=class extends j3.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-anthropic-ai",Wn,t)}init(){return new j3.InstrumentationNodeModuleDefinition("@anthropic-ai/sdk",bvt,this._patch.bind(this))}_patch(t){let n=t.Anthropic,r=this.getConfig(),o=function(...i){if(Xy(H_))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return YU(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}try{t.Anthropic=o}catch{Object.defineProperty(t,"Anthropic",{value:o,writable:!0,configurable:!0,enumerable:!0})}if(t.default===n)try{t.default=o}catch{Object.defineProperty(t,"default",{value:o,writable:!0,configurable:!0,enumerable:!0})}return t}}});var jPe,Cvt,HPe,$Pe=O(()=>{A();dt();gr();zPe();jPe=at(H_,e=>new z3(e)),Cvt=((e={})=>({name:H_,options:e,setupOnce(){jPe(e)}})),HPe=Cvt});var hR,qPe,H3,VPe=O(()=>{A();hR=se(on(),1);dt();qPe=[">=0.10.0 <2"],H3=class extends hR.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-google-genai",Wn,t)}init(){return new hR.InstrumentationNodeModuleDefinition("@google/genai",qPe,n=>this._patch(n),n=>n,[new hR.InstrumentationNodeModuleFile("@google/genai/dist/node/index.cjs",qPe,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(Xy($_))return Reflect.construct(n,i);let s=Reflect.construct(n,i);return KU(s,r)};Object.setPrototypeOf(o,n),Object.setPrototypeOf(o.prototype,n.prototype);for(let i of Object.getOwnPropertyNames(n))if(!["length","name","prototype"].includes(i)){let s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(o,i,s)}return gN(t,"GoogleGenAI",o),t}}});var YPe,vvt,KPe,JPe=O(()=>{A();dt();gr();VPe();YPe=at($_,e=>new H3(e)),vvt=((e={})=>({name:$_,setupOnce(){YPe(e)}})),KPe=vvt});function Rvt(e,t){return e?Array.isArray(e)?e.includes(t)?e:[...e,t]:typeof e=="object"?[e,t]:e:[t]}function xvt(e,t,n){return new Proxy(e,{apply(r,o,i){let c=i[1];(!c||typeof c!="object"||Array.isArray(c))&&(c={},i[1]=c);let l=c.callbacks,f=Rvt(l,t);return c.callbacks=f,Reflect.apply(r,o,i)}})}var yE,$3,q3,ZPe=O(()=>{A();yE=se(on(),1);dt();$3=[">=0.1.0 <2.0.0"];q3=class extends yE.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langchain",Wn,t)}init(){let t=[],n=["@langchain/anthropic","@langchain/openai","@langchain/google-genai","@langchain/mistralai","@langchain/google-vertexai","@langchain/groq"];for(let r of n)t.push(new yE.InstrumentationNodeModuleDefinition(r,$3,this._patch.bind(this),o=>o,[new yE.InstrumentationNodeModuleFile(`${r}/dist/index.cjs`,$3,this._patch.bind(this),o=>o)]));return t.push(new yE.InstrumentationNodeModuleDefinition("langchain",$3,this._patch.bind(this),r=>r,[new yE.InstrumentationNodeModuleFile("langchain/dist/chat_models/universal.cjs",$3,this._patch.bind(this),r=>r)])),t}_patch(t){SV([j_,H_,$_]);let n=XU(this.getConfig());return this._patchRunnableMethods(t,n),t}_patchRunnableMethods(t,n){let r=["ChatAnthropic","ChatOpenAI","ChatGoogleGenerativeAI","ChatMistralAI","ChatVertexAI","ChatGroq","ConfigurableModel"],o=t.universal_exports??t,i=Object.values(o).find(l=>typeof l=="function"&&r.includes(l.name));if(!i)return;let s=i.prototype;if(s.__sentry_patched__)return;s.__sentry_patched__=!0;let c=["invoke","stream","batch"];for(let l of c){let f=s[l];typeof f=="function"&&(s[l]=xvt(f,n))}}}});var WPe,Dvt,XPe,e2e=O(()=>{A();dt();gr();ZPe();WPe=at(JU,e=>new q3(e)),Dvt=((e={})=>({name:JU,setupOnce(){WPe(e)}})),XPe=Dvt});var _R,t2e,V3,n2e=O(()=>{A();_R=se(on(),1);dt();t2e=[">=0.0.0 <2.0.0"],V3=class extends _R.InstrumentationBase{constructor(t={}){super("@sentry/instrumentation-langgraph",Wn,t)}init(){return new _R.InstrumentationNodeModuleDefinition("@langchain/langgraph",t2e,this._patch.bind(this),n=>n,[new _R.InstrumentationNodeModuleFile("@langchain/langgraph/dist/index.cjs",t2e,this._patch.bind(this),n=>n)])}_patch(t){return t.StateGraph&&typeof t.StateGraph=="function"&&tQ(t.StateGraph.prototype,this.getConfig()),t}}});var r2e,Bvt,o2e,i2e=O(()=>{A();dt();gr();n2e();r2e=at(eQ,e=>new V3(e)),Bvt=((e={})=>({name:eQ,setupOnce(){r2e(e)}})),o2e=Bvt});import*as a2e from"node:net";function u2e(e,t,n,r,o){let s=()=>{},c=o.firestoreSpanCreationHook;typeof c=="function"&&(s=h=>{(0,Gg.safeExecuteInTheMiddle)(()=>c(h),y=>{y&&Bl.error(y?.message)},!0)});let l=new Gg.InstrumentationNodeModuleDefinition("@firebase/firestore",t,h=>s2e(h,n,r,e,s)),f=["@firebase/firestore/dist/lite/index.node.cjs.js","@firebase/firestore/dist/lite/index.node.mjs.js","@firebase/firestore/dist/lite/index.rn.esm2017.js","@firebase/firestore/dist/lite/index.cjs.js"];for(let h of f)l.files.push(new Gg.InstrumentationNodeModuleFile(h,t,y=>s2e(y,n,r,e,s),y=>c2e(y,r)));return l}function s2e(e,t,n,r,o){return c2e(e,n),t(e,"addDoc",Nvt(r,o)),t(e,"getDocs",wvt(r,o)),t(e,"setDoc",kvt(r,o)),t(e,"deleteDoc",Ovt(r,o)),e}function c2e(e,t){for(let n of["addDoc","getDocs","setDoc","deleteDoc"])(0,Gg.isWrapped)(e[n])&&t(e,n);return e}function Nvt(e,t){return function(r){return function(o,i){let s=K3(e,"addDoc",o);return t(s),Y3(s,()=>r(o,i))}}}function Ovt(e,t){return function(r){return function(o){let i=K3(e,"deleteDoc",o.parent||o);return t(i),Y3(i,()=>r(o))}}}function wvt(e,t){return function(r){return function(o){let i=K3(e,"getDocs",o);return t(i),Y3(i,()=>r(o))}}}function kvt(e,t){return function(r){return function(o,i,s){let c=K3(e,"setDoc",o.parent||o);return t(c),Y3(c,()=>typeof s<"u"?r(o,i,s):r(o,i))}}}function Y3(e,t){return Ke.with($t.setSpan(Ke.active(),e),()=>(0,Gg.safeExecuteInTheMiddle)(()=>t(),n=>{n&&e.recordException(n),e.end()},!0))}function K3(e,t,n){let r=e.startSpan(`${t} ${n.path}`,{kind:co.CLIENT});return Mvt(r,n),r.setAttribute(oC,t),r}function Pvt(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(a2e.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 Mvt(e,t){let n=t.firestore.app,r=n.options,i=(t.firestore.toJSON()||{}).settings||{},s={[$9]:t.path,[q9]:n.name,[Py]:"firebase.firestore","firebase.firestore.type":t.type,"firebase.firestore.options.projectId":r.projectId,"firebase.firestore.options.appId":r.appId,"firebase.firestore.options.messagingSenderId":r.messagingSenderId,"firebase.firestore.options.storageBucket":r.storageBucket},{address:c,port:l}=Pvt(i);c&&(s[e5]=c),l&&(s[t5]=l),e.setAttributes(s)}var Gg,l2e=O(()=>{A();ze();Gg=se(on(),1);Zn()});function d2e(e,t,n,r,o){let i=()=>{},s=()=>{},c=o.functions?.errorHook,l=o.functions?.requestHook,f=o.functions?.responseHook;typeof f=="function"&&(s=(S,b)=>{(0,zg.safeExecuteInTheMiddle)(()=>f(S,b),v=>{v&&Bl.error(v?.message)},!0)}),typeof l=="function"&&(i=S=>{(0,zg.safeExecuteInTheMiddle)(()=>l(S),b=>{b&&Bl.error(b?.message)},!0)});let h=new zg.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 zg.InstrumentationNodeModuleFile(S,t,v=>Lvt(v,n,r,e,{requestHook:i,responseHook:s,errorHook:c},b),v=>p2e(v,r)))}),h}function Ju(e,t,n){return function(o){return function(...i){let s=typeof i[0]=="function"?i[0]:i[1],c=typeof i[0]=="function"?void 0:i[0];if(!s)return o.call(this,...i);let l=async function(...f){let h=process.env.FUNCTION_TARGET||process.env.K_SERVICE||"unknown",y=e.startSpan(`firebase.function.${n}`,{kind:co.SERVER}),S={"faas.name":h,"faas.trigger":n,"faas.provider":"firebase"};return process.env.GCLOUD_PROJECT&&(S["cloud.project_id"]=process.env.GCLOUD_PROJECT),process.env.EVENTARC_CLOUD_EVENT_SOURCE&&(S["cloud.event_source"]=process.env.EVENTARC_CLOUD_EVENT_SOURCE),y.setAttributes(S),t?.requestHook?.(y),Ke.with($t.setSpan(Ke.active(),y),async()=>{let b,v;try{v=await s.apply(this,f)}catch(x){b=x}if(t?.responseHook?.(y,b),b&&y.recordException(b),y.end(),b)throw await t?.errorHook?.(y,b),b;return v})};return c?o.call(this,c,l):o.call(this,l)}}}function Lvt(e,t,n,r,o,i){switch(p2e(e,n),i){case"function":t(e,"onRequest",Ju(r,o,"http.request")),t(e,"onCall",Ju(r,o,"http.call"));break;case"firestore":t(e,"onDocumentCreated",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdated",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeleted",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWritten",Ju(r,o,"firestore.document.written")),t(e,"onDocumentCreatedWithAuthContext",Ju(r,o,"firestore.document.created")),t(e,"onDocumentUpdatedWithAuthContext",Ju(r,o,"firestore.document.updated")),t(e,"onDocumentDeletedWithAuthContext",Ju(r,o,"firestore.document.deleted")),t(e,"onDocumentWrittenWithAuthContext",Ju(r,o,"firestore.document.written"));break;case"scheduler":t(e,"onSchedule",Ju(r,o,"scheduler.scheduled"));break;case"storage":t(e,"onObjectFinalized",Ju(r,o,"storage.object.finalized")),t(e,"onObjectArchived",Ju(r,o,"storage.object.archived")),t(e,"onObjectDeleted",Ju(r,o,"storage.object.deleted")),t(e,"onObjectMetadataUpdated",Ju(r,o,"storage.object.metadataUpdated"));break}return e}function p2e(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,zg.isWrapped)(e[r])&&t(e,r);return e}var zg,f2e=O(()=>{A();ze();zg=se(on(),1)});var A2e,m2e,Uvt,Qvt,J3,g2e=O(()=>{A();A2e=se(on(),1);dt();l2e();f2e();m2e={},Uvt=[">=3.0.0 <5"],Qvt=[">=6.0.0 <7"],J3=class extends A2e.InstrumentationBase{constructor(t=m2e){super("@sentry/instrumentation-firebase",Wn,t)}setConfig(t={}){super.setConfig({...m2e,...t})}init(){let t=[];return t.push(u2e(this.tracer,Uvt,this._wrap,this._unwrap,this.getConfig())),t.push(d2e(this.tracer,Qvt,this._wrap,this._unwrap,this.getConfig())),t}}});var h2e,Fvt,_2e,Gvt,E2e,y2e=O(()=>{A();dt();gr();g2e();h2e="Firebase",Fvt={firestoreSpanCreationHook:e=>{zr(e,"auto.firebase.otel.firestore"),e.setAttribute(Xt,"db.query")},functions:{requestHook:e=>{zr(e,"auto.firebase.otel.functions"),e.setAttribute(Xt,"http.request")},errorHook:async(e,t)=>{t&&(nn(t,{mechanism:{type:"auto.firebase.otel.functions",handled:!1}}),await zC(2e3))}}},_2e=at(h2e,()=>new J3(Fvt)),Gvt=(()=>({name:h2e,setupOnce(){_2e()}})),E2e=Gvt});function S2e(){return[bDe(),oBe(),NBe(),Eke(),_Ne(),wNe(),$Ne(),rOe(),POe(),nwe(),eke(),mke(),Pke(),Yke(),uPe(),hPe(),YBe(),NPe(),iNe(),XPe(),o2e(),MPe(),FPe(),HPe(),KPe(),swe(),E2e()]}var T2e=O(()=>{A();OPe();$Pe();Kke();CDe();aBe();y2e();_Pe();JPe();wBe();Ake();yke();KBe();Mke();e2e();i2e();sNe();ENe();kNe();qNe();oOe();GPe();rwe();awe();tke();MOe();cPe();LPe()});function b2e(e,t={}){e.getOptions().debug&&MY();let[n,r]=zvt(e,t);e.traceProvider=n,e.asyncLocalStorageLookup=r}function zvt(e,t={}){let n=new I2e.BasicTracerProvider({sampler:new aF(e),resource:(0,Z3.defaultResource)().merge((0,Z3.resourceFromAttributes)({[n5]:"node",[H9]:"sentry",[r5]:Wn})),forceFlushTimeoutMillis:500,spanProcessors:[new sF({timeout:jvt(e.getOptions().maxSpanWaitDuration)}),...t.spanProcessors||[]]});$t.setGlobalTracerProvider(n),ef.setGlobalPropagator(new iF);let r=new cF;return Ke.setGlobalContextManager(r),[n,r.getAsyncLocalStorageLookup()]}function jvt(e){if(e!=null){if(e>DZ)return bs&&J.warn(`\`maxSpanWaitDuration\` is too high, using the maximum value of ${DZ}`),DZ;if(e<=0||Number.isNaN(e)){bs&&J.warn("`maxSpanWaitDuration` must be a positive number, using default value instead.");return}return e}}var Z3,I2e,DZ,C2e=O(()=>{A();ze();Z3=se(K7(),1),I2e=se(SY(),1);Zn();dt();gr();yv();gS();DZ=1e6});function v2e(){return gF().filter(t=>t.name!=="Http"&&t.name!=="NodeFetch").concat(eDe(),cDe())}function R2e(e){return[...v2e(),...ki(e)?S2e():[]]}function BZ(e={}){return Hvt(e,R2e)}function Hvt(e={},t){eS(e,"node");let n=uK({...e,defaultIntegrations:e.defaultIntegrations??t(e)});return n&&!e.skipOpenTelemetrySetup&&(b2e(n,{spanProcessors:e.openTelemetrySpanProcessors}),hF()),n}var x2e=O(()=>{A();dt();gr();tDe();lDe();T2e();C2e()});var ER=O(()=>{A();x2e();dt();gr()});function Zr(){return $vt}function cu(){return D2e}function B2e(){return qvt}var $vt,D2e,qvt,$c=O(()=>{"use strict";A();$vt="prod",D2e="0.1.157",qvt=`@tanagram/lore/${D2e}`});function Zvt(e=""){if(!Kvt.test(e))return e!==e.toLowerCase()}function N2e(e,t){let n=t??Jvt,r=[];if(!e||typeof e!="string")return r;let o="",i,s;for(let c of e){let l=n.includes(c);if(l===!0){r.push(o),o="",i=void 0;continue}let f=Zvt(c);if(s===!1){if(i===!1&&f===!0){r.push(o),o=c,i=f;continue}if(i===!0&&f===!1&&o.length>1){let h=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=h+c,i=f;continue}}o+=c,i=f,s=l}return r.push(o),r}function Wvt(e){return e?e[0].toUpperCase()+e.slice(1):""}function Xvt(e){return e?e[0].toLowerCase()+e.slice(1):""}function eRt(e,t){return e?(Array.isArray(e)?e:N2e(e)).map(n=>Wvt(t?.normalize?n.toLowerCase():n)).join(""):""}function QO(e,t){return Xvt(eRt(e||"",t))}function W3(e,t){return e?(Array.isArray(e)?e:N2e(e)).map(n=>n.toLowerCase()).join(t??"-"):""}function O2e(e){return W3(e||"","_")}var Kvt,Jvt,w2e=O(()=>{A();Kvt=/\d/,Jvt=["-","_","/","."]});import{parseArgs as tRt}from"node:util";function n6(e){return Array.isArray(e)?e:e===void 0?[]:[e]}function NZ(e,t=""){let n=[];for(let r of e)for(let[o,i]of r.entries())n[o]=Math.max(n[o]||0,i.length);return e.map(r=>r.map((o,i)=>t+o[i===0?"padStart":"padEnd"](n[i])).join(" ")).join(`
39
39
  `)}function ql(e){return typeof e=="function"?e():e}function nRt(e=[],t={}){let n=new Set(t.boolean||[]),r=new Set(t.string||[]),o=t.alias||{},i=t.default||{},s=new Map,c=new Map;for(let[D,k]of Object.entries(o)){let Q=k;for(let z of Q)s.set(D,z),c.has(z)||c.set(z,[]),c.get(z).push(D),s.set(z,D),c.has(D)||c.set(D,[]),c.get(D).push(z)}let l={};function f(D){if(n.has(D))return"boolean";let k=c.get(D)||[];for(let Q of k)if(n.has(Q))return"boolean";return"string"}function h(D){if(r.has(D))return!0;let k=c.get(D)||[];for(let Q of k)if(r.has(Q))return!0;return!1}let y=new Set([...n,...r,...Object.keys(o),...Object.values(o).flat(),...Object.keys(i)]);for(let D of y)l[D]||(l[D]={type:f(D),default:i[D]});for(let[D,k]of s.entries())D.length===1&&l[k]&&!l[k].short&&(l[k].short=D);let S=[],b={};for(let D=0;D<e.length;D++){let k=e[D];if(k==="--"){S.push(...e.slice(D));break}if(k.startsWith("--no-")){let Q=k.slice(5);b[Q]=!0;continue}S.push(k)}let v;try{v=tRt({args:S,options:Object.keys(l).length>0?l:void 0,allowPositionals:!0,strict:!1})}catch{v={values:{},positionals:S}}let x={_:[]};x._=v.positionals;for(let[D,k]of Object.entries(v.values)){let Q=k;f(D)==="boolean"&&typeof k=="string"?Q=k!=="false":h(D)&&typeof k=="boolean"&&(Q=""),x[D]=Q}for(let[D]of Object.entries(b)){x[D]=!1;let k=s.get(D);k&&(x[k]=!1);let Q=c.get(D);if(Q)for(let z of Q)x[z]=!1}for(let[D,k]of s.entries())x[D]!==void 0&&x[k]===void 0&&(x[k]=x[D]),x[k]!==void 0&&x[D]===void 0&&(x[D]=x[k]),x[D]!==x[k]&&i[k]===x[k]&&(x[k]=x[D]);return x}function oRt(e,t){let n={boolean:[],string:[],alias:{},default:{}},r=M2e(t);for(let c of r){if(c.type==="positional")continue;c.type==="string"||c.type==="enum"?n.string.push(c.name):c.type==="boolean"&&n.boolean.push(c.name),c.default!==void 0&&(n.default[c.name]=c.default),c.alias&&(n.alias[c.name]=c.alias);let l=QO(c.name),f=W3(c.name);if(l!==c.name||f!==c.name){let h=n6(n.alias[c.name]||[]);l!==c.name&&!h.includes(l)&&h.push(l),f!==c.name&&!h.includes(f)&&h.push(f),h.length>0&&(n.alias[c.name]=h)}}let o=nRt(e,n),[...i]=o._,s=new Proxy(o,{get(c,l){return c[l]??c[QO(l)]??c[W3(l)]}});for(let[,c]of r.entries())if(c.type==="positional"){let l=i.shift();if(l!==void 0)s[c.name]=l;else{if(c.default===void 0&&c.required!==!1)throw new NS(`Missing required positional argument: ${c.name.toUpperCase()}`,"EARG");s[c.name]=c.default}}else if(c.type==="enum"){let l=s[c.name],f=c.options||[];if(l!==void 0&&f.length>0&&!f.includes(l))throw new NS(`Invalid value for argument: ${_f(`--${c.name}`)} (${_f(l)}). Expected one of: ${f.map(h=>_f(h)).join(", ")}.`,"EARG")}else if(c.required&&s[c.name]===void 0)throw new NS(`Missing required argument: --${c.name}`,"EARG");return s}function M2e(e){let t=[];for(let[n,r]of Object.entries(e||{}))t.push({...r,name:n,alias:n6(r.alias)});return t}async function iRt(e){return Promise.all(e.map(t=>ql(t)))}async function OS(e,t){let n=await ql(e.args||{}),r=oRt(t.rawArgs,n),o={rawArgs:t.rawArgs,args:r,data:t.data,cmd:e},i=await iRt(e.plugins??[]),s,c;try{for(let h of i)await h.setup?.(o);typeof e.setup=="function"&&await e.setup(o);let f=await ql(e.subCommands);if(f&&Object.keys(f).length>0){let h=sRt(t.rawArgs,n),y=t.rawArgs[h];if(y){let S=await k2e(f,y);if(!S)throw new NS(`Unknown command ${_f(y)}`,"E_UNKNOWN_COMMAND");await OS(S,{rawArgs:t.rawArgs.slice(h+1)})}else{let S=await ql(e.default);if(S){if(e.run)throw new NS("Cannot specify both 'run' and 'default' on the same command.","E_DEFAULT_CONFLICT");let b=await k2e(f,S);if(!b)throw new NS(`Default sub command ${_f(S)} not found in subCommands.`,"E_UNKNOWN_COMMAND");await OS(b,{rawArgs:t.rawArgs})}else if(!e.run)throw new NS("No command specified.","E_NO_COMMAND")}}typeof e.run=="function"&&(s=await e.run(o))}catch(f){c=f}let l=[];if(typeof e.cleanup=="function")try{await e.cleanup(o)}catch(f){l.push(f)}for(let f of[...i].reverse())try{await f.cleanup?.(o)}catch(h){l.push(h)}if(c)throw c;if(l.length===1)throw l[0];if(l.length>1)throw new Error("Multiple cleanup errors",{cause:l});return{result:s}}async function k2e(e,t){if(t in e)return ql(e[t]);for(let n of Object.values(e)){let r=await ql(n),o=await ql(r?.meta);if(o?.alias&&n6(o.alias).includes(t))return r}}function sRt(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r==="--")return-1;if(r.startsWith("-")){!r.includes("=")&&aRt(r,t)&&n++;continue}return n}return-1}function aRt(e,t){let n=e.replace(/^-{1,2}/,""),r=QO(n);for(let[o,i]of Object.entries(t))if(!(i.type!=="string"&&i.type!=="enum")&&(r===QO(o)||(Array.isArray(i.alias)?i.alias:i.alias?[i.alias]:[]).includes(n)))return!0;return!1}async function wZ(e,t){let n=await ql(e.meta||{}),r=M2e(await ql(e.args||{})),o=await ql(t?.meta||{}),i=`${o.name?`${o.name} `:""}`+(n.name||process.argv[1]),s=[],c=[],l=[],f=[];for(let b of r)if(b.type==="positional"){let v=b.name.toUpperCase(),x=b.required!==!1&&b.default===void 0;c.push([_f(v+OZ(b)),P2e(b,x)]),f.push(x?`<${v}>`:`[${v}]`)}else{let v=b.required===!0&&b.default===void 0,x=[...(b.alias||[]).map(D=>`-${D}`),`--${b.name}`].join(", ")+OZ(b);if(s.push([_f(x),P2e(b,v)]),b.type==="boolean"&&(b.default===!0||b.negativeDescription)&&!uRt.test(b.name)){let D=[...(b.alias||[]).map(k=>`--no-${k}`),`--no-${b.name}`].join(", ");s.push([_f(D),[b.negativeDescription,v?t6("(Required)"):""].filter(Boolean).join(" ")])}v&&f.push(`--${b.name}`+OZ(b))}if(e.subCommands){let b=[],v=await ql(e.subCommands);for(let[x,D]of Object.entries(v)){let k=await ql((await ql(D))?.meta);if(k?.hidden)continue;let Q=n6(k?.alias),z=[x,...Q].join(", ");l.push([_f(z),k?.description||""]),b.push(x,...Q)}f.push(b.join("|"))}let h=[],y=n.version||o.version;h.push(t6(`${n.description} (${i+(y?` v${y}`:"")})`),"");let S=s.length>0||c.length>0;return h.push(`${e6(X3("USAGE"))} ${_f(`${i}${S?" [OPTIONS]":""} ${f.join(" ")}`)}`,""),c.length>0&&(h.push(e6(X3("ARGUMENTS")),""),h.push(NZ(c," ")),h.push("")),s.length>0&&(h.push(e6(X3("OPTIONS")),""),h.push(NZ(s," ")),h.push("")),l.length>0&&(h.push(e6(X3("COMMANDS")),""),h.push(NZ(l," ")),h.push("",`Use ${_f(`${i} <command> --help`)} for more information about a command.`)),h.filter(b=>typeof b=="string").join(`
40
40
  `)}function OZ(e){let t=e.valueHint?`=<${e.valueHint}>`:"",n=t||`=<${O2e(e.name)}>`;return!e.type||e.type==="positional"||e.type==="boolean"?t:e.type==="enum"&&e.options?.length?`=<${e.options.join("|")}>`:n}function P2e(e,t){let n=t?t6("(Required)"):"",r=e.default===void 0?"":t6(`(Default: ${e.default})`);return[e.description,n,r].filter(Boolean).join(" ")}var NS,rRt,r6,X3,_f,t6,e6,uRt,kZ=O(()=>{A();w2e();NS=class extends Error{code;constructor(e,t){super(e),this.name="CLIError",this.code=t}};rRt=(()=>{let e=globalThis.process?.env??{};return e.NO_COLOR==="1"||e.TERM==="dumb"||e.TEST||e.CI})(),r6=(e,t=39)=>n=>rRt?n:`\x1B[${e}m${n}\x1B[${t}m`,X3=r6(1,22),_f=r6(36),t6=r6(90),e6=r6(4,24);uRt=/^no[-A-Z]/});function lRt(e){F2e=e}function i6(){return F2e}function ut(e,t){let n=s6({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,i6(),FO].filter(r=>!!r)});e.common.issues.push(n)}function Rn(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:o}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(s,c)=>s.code!=="invalid_type"?{message:c.defaultError}:typeof c.data>"u"?{message:r??c.defaultError}:{message:n??c.defaultError},description:o}}function SRt(e,t){return!!((t==="v4"||!t)&&_Rt.test(e)||(t==="v6"||!t)&&ERt.test(e))}function TRt(e,t){let n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,o=n>r?n:r,i=parseInt(e.toFixed(o).replace(".","")),s=parseInt(t.toFixed(o).replace(".",""));return i%s/Math.pow(10,o)}function yR(e){if(e instanceof pu){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=Ef.create(yR(r))}return new pu({...e._def,shape:()=>t})}else return e instanceof Hg?new Hg({...e._def,type:yR(e.element)}):e instanceof Ef?Ef.create(yR(e.unwrap())):e instanceof $g?$g.create(yR(e.unwrap())):e instanceof Jm?Jm.create(e.items.map(t=>yR(t))):e}function FZ(e,t){let n=SE(e),r=SE(t);if(e===t)return{valid:!0,data:e};if(n===st.object&&r===st.object){let o=yr.objectKeys(t),i=yr.objectKeys(e).filter(c=>o.indexOf(c)!==-1),s={...e,...t};for(let c of i){let l=FZ(e[c],t[c]);if(!l.valid)return{valid:!1};s[c]=l.data}return{valid:!0,data:s}}else if(n===st.array&&r===st.array){if(e.length!==t.length)return{valid:!1};let o=[];for(let i=0;i<e.length;i++){let s=e[i],c=t[i],l=FZ(s,c);if(!l.valid)return{valid:!1};o.push(l.data)}return{valid:!0,data:o}}else return n===st.date&&r===st.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}function z2e(e,t){return new jS({values:e,typeName:Kt.ZodEnum,...Rn(t)})}var yr,LZ,st,SE,qe,cRt,qc,FO,F2e,s6,dRt,du,_n,G2e,Zu,UZ,QZ,GO,a6,Lt,rp,L2e,xn,pRt,fRt,mRt,ARt,gRt,hRt,_Rt,ERt,yRt,TE,wS,kS,PS,MS,SR,LS,US,IE,jg,yf,TR,Hg,pu,QS,o6,u6,FS,Jm,c6,IR,bR,l6,GS,zS,jS,HS,bE,Vl,Ef,$g,$S,CR,vR,IRt,d6,zO,RR,j2e,bRt,Kt,CRt,H2e,$2e,vRt,RRt,q2e,xRt,DRt,BRt,NRt,ORt,wRt,kRt,PRt,MRt,LRt,URt,QRt,FRt,GRt,zRt,jRt,HRt,$Rt,qRt,VRt,YRt,KRt,JRt,ZRt,U2e,WRt,XRt,ext,txt,nxt,rxt,oxt,ixt,sxt,lu,axt,PZ,uxt,np,GZ,DRn,BRn,NRn,V2e,cxt,lxt,dxt,pxt,Y2e,K2e,J2e,MZ,ia,fxt,mxt,Axt,gxt,zZ,jZ,HZ,hxt,Q2e,_xt,Ext,yxt,Sxt,$Z,Sf=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 s of o)i[s]=s;return i},e.getValidEnumValues=o=>{let i=e.objectKeys(o).filter(c=>typeof o[o[c]]!="number"),s={};for(let c of i)s[c]=o[c];return e.objectValues(s)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{let i=[];for(let s in o)Object.prototype.hasOwnProperty.call(o,s)&&i.push(s);return i},e.find=(o,i)=>{for(let s of o)if(i(s))return s},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function r(o,i=" | "){return o.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(yr||(yr={}));(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(LZ||(LZ={}));st=yr.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),SE=e=>{switch(typeof e){case"undefined":return st.undefined;case"string":return st.string;case"number":return isNaN(e)?st.nan:st.number;case"boolean":return st.boolean;case"function":return st.function;case"bigint":return st.bigint;case"symbol":return st.symbol;case"object":return Array.isArray(e)?st.array:e===null?st.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?st.promise:typeof Map<"u"&&e instanceof Map?st.map:typeof Set<"u"&&e instanceof Set?st.set:typeof Date<"u"&&e instanceof Date?st.date:st.object;default:return st.unknown}},qe=yr.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),cRt=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),qc=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};let n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){let n=t||function(i){return i.message},r={_errors:[]},o=i=>{for(let s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(o);else if(s.code==="invalid_return_type")o(s.returnTypeError);else if(s.code==="invalid_arguments")o(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let c=r,l=0;for(;l<s.path.length;){let f=s.path[l];l===s.path.length-1?(c[f]=c[f]||{_errors:[]},c[f]._errors.push(n(s))):c[f]=c[f]||{_errors:[]},c=c[f],l++}}};return o(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,yr.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){let n={},r=[];for(let o of this.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};qc.create=e=>new qc(e);FO=(e,t)=>{let n;switch(e.code){case qe.invalid_type:e.received===st.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case qe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,yr.jsonStringifyReplacer)}`;break;case qe.unrecognized_keys:n=`Unrecognized key(s) in object: ${yr.joinValues(e.keys,", ")}`;break;case qe.invalid_union:n="Invalid input";break;case qe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${yr.joinValues(e.options)}`;break;case qe.invalid_enum_value:n=`Invalid enum value. Expected ${yr.joinValues(e.options)}, received '${e.received}'`;break;case qe.invalid_arguments:n="Invalid function arguments";break;case qe.invalid_return_type:n="Invalid function return type";break;case qe.invalid_date:n="Invalid date";break;case qe.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:yr.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case qe.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case qe.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case qe.custom:n="Invalid input";break;case qe.invalid_intersection_types:n="Intersection results could not be merged";break;case qe.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case qe.not_finite:n="Number must be finite";break;default:n=t.defaultError,yr.assertNever(e)}return{message:n}},F2e=FO;s6=e=>{let{data:t,path:n,errorMaps:r,issueData:o}=e,i=[...n,...o.path||[]],s={...o,path:i},c="",l=r.filter(f=>!!f).slice().reverse();for(let f of l)c=f(s,{data:t,defaultError:c}).message;return{...o,path:i,message:o.message||c}},dRt=[];du=class e{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){let r=[];for(let o of n){if(o.status==="aborted")return _n;o.status==="dirty"&&t.dirty(),r.push(o.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){let r=[];for(let o of n)r.push({key:await o.key,value:await o.value});return e.mergeObjectSync(t,r)}static mergeObjectSync(t,n){let r={};for(let o of n){let{key:i,value:s}=o;if(i.status==="aborted"||s.status==="aborted")return _n;i.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||o.alwaysSet)&&(r[i.value]=s.value)}return{status:t.value,value:r}}},_n=Object.freeze({status:"aborted"}),G2e=e=>({status:"dirty",value:e}),Zu=e=>({status:"valid",value:e}),UZ=e=>e.status==="aborted",QZ=e=>e.status==="dirty",GO=e=>e.status==="valid",a6=e=>typeof Promise<"u"&&e instanceof Promise;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Lt||(Lt={}));rp=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}},L2e=(e,t)=>{if(GO(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 qc(e.common.issues);return this._error=n,this._error}}};xn=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return SE(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:SE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new du,ctx:{common:t.parent.common,data:t.data,parsedType:SE(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){let n=this._parse(t);if(a6(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:SE(t)},i=this._parseSync({data:t,path:o.path,parent:o});return L2e(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:SE(t)},o=this._parse({data:t,path:r.path,parent:r}),i=await(a6(o)?o:Promise.resolve(o));return L2e(r,i)}refine(t,n){let r=o=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(o):n;return this._refinement((o,i)=>{let s=t(o),c=()=>i.addIssue({code:qe.custom,...r(o)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(c(),!1)):s?!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 Vl({schema:this,typeName:Kt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Ef.create(this,this._def)}nullable(){return $g.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Hg.create(this,this._def)}promise(){return bE.create(this,this._def)}or(t){return QS.create([this,t],this._def)}and(t){return FS.create(this,t,this._def)}transform(t){return new Vl({...Rn(this._def),schema:this,typeName:Kt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){let n=typeof t=="function"?t:()=>t;return new $S({...Rn(this._def),innerType:this,defaultValue:n,typeName:Kt.ZodDefault})}brand(){return new d6({typeName:Kt.ZodBranded,type:this,...Rn(this._def)})}catch(t){let n=typeof t=="function"?t:()=>t;return new CR({...Rn(this._def),innerType:this,catchValue:n,typeName:Kt.ZodCatch})}describe(t){let n=this.constructor;return new n({...this._def,description:t})}pipe(t){return zO.create(this,t)}readonly(){return RR.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},pRt=/^c[^\s-]{8,}$/i,fRt=/^[a-z][a-z0-9]*$/,mRt=/[0-9A-HJKMNP-TV-Z]{26}/,ARt=/^[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,gRt=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hRt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u"),_Rt=/^(((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}))$/,ERt=/^(([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})))$/,yRt=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$");TE=class e extends xn{constructor(){super(...arguments),this._regex=(t,n,r)=>this.refinement(o=>t.test(o),{validation:n,code:qe.invalid_string,...Lt.errToObj(r)}),this.nonempty=t=>this.min(1,Lt.errToObj(t)),this.trim=()=>new e({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new e({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==st.string){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:st.string,received:i.parsedType}),_n}let r=new du,o;for(let i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){let s=t.data.length>i.value,c=t.data.length<i.value;(s||c)&&(o=this._getOrReturnCtx(t,o),s?ut(o,{code:qe.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ut(o,{code:qe.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")gRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"email",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")hRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"emoji",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ARt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"uuid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")pRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")fRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"cuid2",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")mRt.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ulid",code:qe.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),ut(o,{validation:"url",code:qe.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"regex",code:qe.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?yRt(i).test(t.data)||(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="ip"?SRt(t.data,i.version)||(o=this._getOrReturnCtx(t,o),ut(o,{validation:"ip",code:qe.invalid_string,message:i.message}),r.dirty()):yr.assertNever(i);return{status:r.value,value:t.data}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Lt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Lt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Lt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Lt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Lt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Lt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Lt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Lt.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,...Lt.errToObj(t?.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Lt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Lt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Lt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Lt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Lt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Lt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Lt.errToObj(n)})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};TE.create=e=>{var t;return new TE({checks:[],typeName:Kt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};wS=class e extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==st.number){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:st.number,received:i.parsedType}),_n}let r,o=new du;for(let i of this._def.checks)i.kind==="int"?yr.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?TRt(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_finite,message:i.message}),o.dirty()):yr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Lt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Lt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Lt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Lt.toString(t)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&yr.isInteger(t.value))}get isFinite(){let t=null,n=null;for(let r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};wS.create=e=>new wS({checks:[],typeName:Kt.ZodNumber,coerce:e?.coerce||!1,...Rn(e)});kS=class e extends xn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==st.bigint){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:st.bigint,received:i.parsedType}),_n}let r,o=new du;for(let i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),ut(r,{code:qe.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):yr.assertNever(i);return{status:o.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Lt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Lt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Lt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Lt.toString(n))}setLimit(t,n,r,o){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Lt.toString(o)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Lt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Lt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Lt.toString(n)})}get minValue(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};kS.create=e=>{var t;return new kS({checks:[],typeName:Kt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};PS=class extends xn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==st.boolean){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.boolean,received:r.parsedType}),_n}return Zu(t.data)}};PS.create=e=>new PS({typeName:Kt.ZodBoolean,coerce:e?.coerce||!1,...Rn(e)});MS=class e extends xn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==st.date){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_type,expected:st.date,received:i.parsedType}),_n}if(isNaN(t.data.getTime())){let i=this._getOrReturnCtx(t);return ut(i,{code:qe.invalid_date}),_n}let r=new du,o;for(let i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),ut(o,{code:qe.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):yr.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Lt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Lt.toString(n)})}get minDate(){let t=null;for(let n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(let n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};MS.create=e=>new MS({checks:[],coerce:e?.coerce||!1,typeName:Kt.ZodDate,...Rn(e)});SR=class extends xn{_parse(t){if(this._getType(t)!==st.symbol){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.symbol,received:r.parsedType}),_n}return Zu(t.data)}};SR.create=e=>new SR({typeName:Kt.ZodSymbol,...Rn(e)});LS=class extends xn{_parse(t){if(this._getType(t)!==st.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.undefined,received:r.parsedType}),_n}return Zu(t.data)}};LS.create=e=>new LS({typeName:Kt.ZodUndefined,...Rn(e)});US=class extends xn{_parse(t){if(this._getType(t)!==st.null){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.null,received:r.parsedType}),_n}return Zu(t.data)}};US.create=e=>new US({typeName:Kt.ZodNull,...Rn(e)});IE=class extends xn{constructor(){super(...arguments),this._any=!0}_parse(t){return Zu(t.data)}};IE.create=e=>new IE({typeName:Kt.ZodAny,...Rn(e)});jg=class extends xn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Zu(t.data)}};jg.create=e=>new jg({typeName:Kt.ZodUnknown,...Rn(e)});yf=class extends xn{_parse(t){let n=this._getOrReturnCtx(t);return ut(n,{code:qe.invalid_type,expected:st.never,received:n.parsedType}),_n}};yf.create=e=>new yf({typeName:Kt.ZodNever,...Rn(e)});TR=class extends xn{_parse(t){if(this._getType(t)!==st.undefined){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.void,received:r.parsedType}),_n}return Zu(t.data)}};TR.create=e=>new TR({typeName:Kt.ZodVoid,...Rn(e)});Hg=class e extends xn{_parse(t){let{ctx:n,status:r}=this._processInputParams(t),o=this._def;if(n.parsedType!==st.array)return ut(n,{code:qe.invalid_type,expected:st.array,received:n.parsedType}),_n;if(o.exactLength!==null){let s=n.data.length>o.exactLength.value,c=n.data.length<o.exactLength.value;(s||c)&&(ut(n,{code:s?qe.too_big:qe.too_small,minimum:c?o.exactLength.value:void 0,maximum:s?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&n.data.length<o.minLength.value&&(ut(n,{code:qe.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&n.data.length>o.maxLength.value&&(ut(n,{code:qe.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,c)=>o.type._parseAsync(new rp(n,s,n.path,c)))).then(s=>du.mergeArray(r,s));let i=[...n.data].map((s,c)=>o.type._parseSync(new rp(n,s,n.path,c)));return du.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Lt.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Lt.toString(n)}})}nonempty(t){return this.min(1,t)}};Hg.create=(e,t)=>new Hg({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Kt.ZodArray,...Rn(t)});pu=class e extends xn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let t=this._def.shape(),n=yr.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==st.object){let f=this._getOrReturnCtx(t);return ut(f,{code:qe.invalid_type,expected:st.object,received:f.parsedType}),_n}let{status:r,ctx:o}=this._processInputParams(t),{shape:i,keys:s}=this._getCached(),c=[];if(!(this._def.catchall instanceof yf&&this._def.unknownKeys==="strip"))for(let f in o.data)s.includes(f)||c.push(f);let l=[];for(let f of s){let h=i[f],y=o.data[f];l.push({key:{status:"valid",value:f},value:h._parse(new rp(o,y,o.path,f)),alwaysSet:f in o.data})}if(this._def.catchall instanceof yf){let f=this._def.unknownKeys;if(f==="passthrough")for(let h of c)l.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(f==="strict")c.length>0&&(ut(o,{code:qe.unrecognized_keys,keys:c}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let f=this._def.catchall;for(let h of c){let y=o.data[h];l.push({key:{status:"valid",value:h},value:f._parse(new rp(o,y,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{let f=[];for(let h of l){let y=await h.key;f.push({key:y,value:await h.value,alwaysSet:h.alwaysSet})}return f}).then(f=>du.mergeObjectSync(r,f)):du.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Lt.errToObj,new e({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var o,i,s,c;let l=(s=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(c=Lt.errToObj(t).message)!==null&&c!==void 0?c:l}:{message:l}}}:{}})}strip(){return new e({...this._def,unknownKeys:"strip"})}passthrough(){return new e({...this._def,unknownKeys:"passthrough"})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Kt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};return yr.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}omit(t){let n={};return yr.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new e({...this._def,shape:()=>n})}deepPartial(){return yR(this)}partial(t){let n={};return yr.objectKeys(this.shape).forEach(r=>{let o=this.shape[r];t&&!t[r]?n[r]=o:n[r]=o.optional()}),new e({...this._def,shape:()=>n})}required(t){let n={};return yr.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ef;)i=i._def.innerType;n[r]=i}}),new e({...this._def,shape:()=>n})}keyof(){return z2e(yr.objectKeys(this.shape))}};pu.create=(e,t)=>new pu({shape:()=>e,unknownKeys:"strip",catchall:yf.create(),typeName:Kt.ZodObject,...Rn(t)});pu.strictCreate=(e,t)=>new pu({shape:()=>e,unknownKeys:"strict",catchall:yf.create(),typeName:Kt.ZodObject,...Rn(t)});pu.lazycreate=(e,t)=>new pu({shape:e,unknownKeys:"strip",catchall:yf.create(),typeName:Kt.ZodObject,...Rn(t)});QS=class extends xn{_parse(t){let{ctx:n}=this._processInputParams(t),r=this._def.options;function o(i){for(let c of i)if(c.result.status==="valid")return c.result;for(let c of i)if(c.result.status==="dirty")return n.common.issues.push(...c.ctx.common.issues),c.result;let s=i.map(c=>new qc(c.ctx.common.issues));return ut(n,{code:qe.invalid_union,unionErrors:s}),_n}if(n.common.async)return Promise.all(r.map(async i=>{let s={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(o);{let i,s=[];for(let l of r){let f={...n,common:{...n.common,issues:[]},parent:null},h=l._parseSync({data:n.data,path:n.path,parent:f});if(h.status==="valid")return h;h.status==="dirty"&&!i&&(i={result:h,ctx:f}),f.common.issues.length&&s.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;let c=s.map(l=>new qc(l));return ut(n,{code:qe.invalid_union,unionErrors:c}),_n}}get options(){return this._def.options}};QS.create=(e,t)=>new QS({options:e,typeName:Kt.ZodUnion,...Rn(t)});o6=e=>e instanceof GS?o6(e.schema):e instanceof Vl?o6(e.innerType()):e instanceof zS?[e.value]:e instanceof jS?e.options:e instanceof HS?Object.keys(e.enum):e instanceof $S?o6(e._def.innerType):e instanceof LS?[void 0]:e instanceof US?[null]:null,u6=class e extends xn{_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==st.object)return ut(n,{code:qe.invalid_type,expected:st.object,received:n.parsedType}),_n;let r=this.discriminator,o=n.data[r],i=this.optionsMap.get(o);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(ut(n,{code:qe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),_n)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let o=new Map;for(let i of n){let s=o6(i.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let c of s){if(o.has(c))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(c)}`);o.set(c,i)}}return new e({typeName:Kt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:o,...Rn(r)})}};FS=class extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=(i,s)=>{if(UZ(i)||UZ(s))return _n;let c=FZ(i.value,s.value);return c.valid?((QZ(i)||QZ(s))&&n.dirty(),{status:n.value,value:c.data}):(ut(r,{code:qe.invalid_intersection_types}),_n)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,s])=>o(i,s)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};FS.create=(e,t,n)=>new FS({left:e,right:t,typeName:Kt.ZodIntersection,...Rn(n)});Jm=class e extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==st.array)return ut(r,{code:qe.invalid_type,expected:st.array,received:r.parsedType}),_n;if(r.data.length<this._def.items.length)return ut(r,{code:qe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),_n;!this._def.rest&&r.data.length>this._def.items.length&&(ut(r,{code:qe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());let i=[...r.data].map((s,c)=>{let l=this._def.items[c]||this._def.rest;return l?l._parse(new rp(r,s,r.path,c)):null}).filter(s=>!!s);return r.common.async?Promise.all(i).then(s=>du.mergeArray(n,s)):du.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Jm.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jm({items:e,typeName:Kt.ZodTuple,rest:null,...Rn(t)})};c6=class e extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==st.object)return ut(r,{code:qe.invalid_type,expected:st.object,received:r.parsedType}),_n;let o=[],i=this._def.keyType,s=this._def.valueType;for(let c in r.data)o.push({key:i._parse(new rp(r,c,r.path,c)),value:s._parse(new rp(r,r.data[c],r.path,c))});return r.common.async?du.mergeObjectAsync(n,o):du.mergeObjectSync(n,o)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof xn?new e({keyType:t,valueType:n,typeName:Kt.ZodRecord,...Rn(r)}):new e({keyType:TE.create(),valueType:t,typeName:Kt.ZodRecord,...Rn(n)})}},IR=class extends xn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==st.map)return ut(r,{code:qe.invalid_type,expected:st.map,received:r.parsedType}),_n;let o=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([c,l],f)=>({key:o._parse(new rp(r,c,r.path,[f,"key"])),value:i._parse(new rp(r,l,r.path,[f,"value"]))}));if(r.common.async){let c=new Map;return Promise.resolve().then(async()=>{for(let l of s){let f=await l.key,h=await l.value;if(f.status==="aborted"||h.status==="aborted")return _n;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(f.value,h.value)}return{status:n.value,value:c}})}else{let c=new Map;for(let l of s){let f=l.key,h=l.value;if(f.status==="aborted"||h.status==="aborted")return _n;(f.status==="dirty"||h.status==="dirty")&&n.dirty(),c.set(f.value,h.value)}return{status:n.value,value:c}}}};IR.create=(e,t,n)=>new IR({valueType:t,keyType:e,typeName:Kt.ZodMap,...Rn(n)});bR=class e extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==st.set)return ut(r,{code:qe.invalid_type,expected:st.set,received:r.parsedType}),_n;let o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ut(r,{code:qe.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),n.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ut(r,{code:qe.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),n.dirty());let i=this._def.valueType;function s(l){let f=new Set;for(let h of l){if(h.status==="aborted")return _n;h.status==="dirty"&&n.dirty(),f.add(h.value)}return{status:n.value,value:f}}let c=[...r.data.values()].map((l,f)=>i._parse(new rp(r,l,r.path,f)));return r.common.async?Promise.all(c).then(l=>s(l)):s(c)}min(t,n){return new e({...this._def,minSize:{value:t,message:Lt.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Lt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};bR.create=(e,t)=>new bR({valueType:e,minSize:null,maxSize:null,typeName:Kt.ZodSet,...Rn(t)});l6=class e extends xn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==st.function)return ut(n,{code:qe.invalid_type,expected:st.function,received:n.parsedType}),_n;function r(c,l){return s6({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,i6(),FO].filter(f=>!!f),issueData:{code:qe.invalid_arguments,argumentsError:l}})}function o(c,l){return s6({data:c,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,i6(),FO].filter(f=>!!f),issueData:{code:qe.invalid_return_type,returnTypeError:l}})}let i={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof bE){let c=this;return Zu(async function(...l){let f=new qc([]),h=await c._def.args.parseAsync(l,i).catch(b=>{throw f.addIssue(r(l,b)),f}),y=await Reflect.apply(s,this,h);return await c._def.returns._def.type.parseAsync(y,i).catch(b=>{throw f.addIssue(o(y,b)),f})})}else{let c=this;return Zu(function(...l){let f=c._def.args.safeParse(l,i);if(!f.success)throw new qc([r(l,f.error)]);let h=Reflect.apply(s,this,f.data),y=c._def.returns.safeParse(h,i);if(!y.success)throw new qc([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:Jm.create(t).rest(jg.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||Jm.create([]).rest(jg.create()),returns:n||jg.create(),typeName:Kt.ZodFunction,...Rn(r)})}},GS=class extends xn{get schema(){return this._def.getter()}_parse(t){let{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};GS.create=(e,t)=>new GS({getter:e,typeName:Kt.ZodLazy,...Rn(t)});zS=class extends xn{_parse(t){if(t.data!==this._def.value){let n=this._getOrReturnCtx(t);return ut(n,{received:n.data,code:qe.invalid_literal,expected:this._def.value}),_n}return{status:"valid",value:t.data}}get value(){return this._def.value}};zS.create=(e,t)=>new zS({value:e,typeName:Kt.ZodLiteral,...Rn(t)});jS=class e extends xn{_parse(t){if(typeof t.data!="string"){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{expected:yr.joinValues(r),received:n.parsedType,code:qe.invalid_type}),_n}if(this._def.values.indexOf(t.data)===-1){let n=this._getOrReturnCtx(t),r=this._def.values;return ut(n,{received:n.data,code:qe.invalid_enum_value,options:r}),_n}return Zu(t.data)}get options(){return this._def.values}get enum(){let t={};for(let n of this._def.values)t[n]=n;return t}get Values(){let t={};for(let n of this._def.values)t[n]=n;return t}get Enum(){let t={};for(let n of this._def.values)t[n]=n;return t}extract(t){return e.create(t)}exclude(t){return e.create(this.options.filter(n=>!t.includes(n)))}};jS.create=z2e;HS=class extends xn{_parse(t){let n=yr.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==st.string&&r.parsedType!==st.number){let o=yr.objectValues(n);return ut(r,{expected:yr.joinValues(o),received:r.parsedType,code:qe.invalid_type}),_n}if(n.indexOf(t.data)===-1){let o=yr.objectValues(n);return ut(r,{received:r.data,code:qe.invalid_enum_value,options:o}),_n}return Zu(t.data)}get enum(){return this._def.values}};HS.create=(e,t)=>new HS({values:e,typeName:Kt.ZodNativeEnum,...Rn(t)});bE=class extends xn{unwrap(){return this._def.type}_parse(t){let{ctx:n}=this._processInputParams(t);if(n.parsedType!==st.promise&&n.common.async===!1)return ut(n,{code:qe.invalid_type,expected:st.promise,received:n.parsedType}),_n;let r=n.parsedType===st.promise?n.data:Promise.resolve(n.data);return Zu(r.then(o=>this._def.type.parseAsync(o,{path:n.path,errorMap:n.common.contextualErrorMap})))}};bE.create=(e,t)=>new bE({type:e,typeName:Kt.ZodPromise,...Rn(t)});Vl=class extends xn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Kt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){let{status:n,ctx:r}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:s=>{ut(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){let s=o.transform(r.data,i);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(s).then(c=>this._def.schema._parseAsync({data:c,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}if(o.type==="refinement"){let s=c=>{let l=o.refinement(c,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return c};if(r.common.async===!1){let c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?_n:(c.status==="dirty"&&n.dirty(),s(c.value),{status:n.value,value:c.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>c.status==="aborted"?_n:(c.status==="dirty"&&n.dirty(),s(c.value).then(()=>({status:n.value,value:c.value}))))}if(o.type==="transform")if(r.common.async===!1){let s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!GO(s))return s;let c=o.transform(s.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(s=>GO(s)?Promise.resolve(o.transform(s.value,i)).then(c=>({status:n.value,value:c})):s);yr.assertNever(o)}};Vl.create=(e,t,n)=>new Vl({schema:e,typeName:Kt.ZodEffects,effect:t,...Rn(n)});Vl.createWithPreprocess=(e,t,n)=>new Vl({schema:t,effect:{type:"preprocess",transform:e},typeName:Kt.ZodEffects,...Rn(n)});Ef=class extends xn{_parse(t){return this._getType(t)===st.undefined?Zu(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Ef.create=(e,t)=>new Ef({innerType:e,typeName:Kt.ZodOptional,...Rn(t)});$g=class extends xn{_parse(t){return this._getType(t)===st.null?Zu(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};$g.create=(e,t)=>new $g({innerType:e,typeName:Kt.ZodNullable,...Rn(t)});$S=class extends xn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return n.parsedType===st.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};$S.create=(e,t)=>new $S({innerType:e,typeName:Kt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Rn(t)});CR=class extends xn{_parse(t){let{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return a6(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qc(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new qc(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};CR.create=(e,t)=>new CR({innerType:e,typeName:Kt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Rn(t)});vR=class extends xn{_parse(t){if(this._getType(t)!==st.nan){let r=this._getOrReturnCtx(t);return ut(r,{code:qe.invalid_type,expected:st.nan,received:r.parsedType}),_n}return{status:"valid",value:t.data}}};vR.create=e=>new vR({typeName:Kt.ZodNaN,...Rn(e)});IRt=Symbol("zod_brand"),d6=class extends xn{_parse(t){let{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},zO=class e extends xn{_parse(t){let{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{let i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?_n:i.status==="dirty"?(n.dirty(),G2e(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{let o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?_n:o.status==="dirty"?(n.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(t,n){return new e({in:t,out:n,typeName:Kt.ZodPipeline})}},RR=class extends xn{_parse(t){let n=this._def.innerType._parse(t);return GO(n)&&(n.value=Object.freeze(n.value)),n}};RR.create=(e,t)=>new RR({innerType:e,typeName:Kt.ZodReadonly,...Rn(t)});j2e=(e,t={},n)=>e?IE.create().superRefine((r,o)=>{var i,s;if(!e(r)){let c=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(i=c.fatal)!==null&&i!==void 0?i:n)!==null&&s!==void 0?s:!0,f=typeof c=="string"?{message:c}:c;o.addIssue({code:"custom",...f,fatal:l})}}):IE.create(),bRt={object:pu.lazycreate};(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Kt||(Kt={}));CRt=(e,t={message:`Input not instance of ${e.name}`})=>j2e(n=>n instanceof e,t),H2e=TE.create,$2e=wS.create,vRt=vR.create,RRt=kS.create,q2e=PS.create,xRt=MS.create,DRt=SR.create,BRt=LS.create,NRt=US.create,ORt=IE.create,wRt=jg.create,kRt=yf.create,PRt=TR.create,MRt=Hg.create,LRt=pu.create,URt=pu.strictCreate,QRt=QS.create,FRt=u6.create,GRt=FS.create,zRt=Jm.create,jRt=c6.create,HRt=IR.create,$Rt=bR.create,qRt=l6.create,VRt=GS.create,YRt=zS.create,KRt=jS.create,JRt=HS.create,ZRt=bE.create,U2e=Vl.create,WRt=Ef.create,XRt=$g.create,ext=Vl.createWithPreprocess,txt=zO.create,nxt=()=>H2e().optional(),rxt=()=>$2e().optional(),oxt=()=>q2e().optional(),ixt={string:(e=>TE.create({...e,coerce:!0})),number:(e=>wS.create({...e,coerce:!0})),boolean:(e=>PS.create({...e,coerce:!0})),bigint:(e=>kS.create({...e,coerce:!0})),date:(e=>MS.create({...e,coerce:!0}))},sxt=_n,lu=Object.freeze({__proto__:null,defaultErrorMap:FO,setErrorMap:lRt,getErrorMap:i6,makeIssue:s6,EMPTY_PATH:dRt,addIssueToContext:ut,ParseStatus:du,INVALID:_n,DIRTY:G2e,OK:Zu,isAborted:UZ,isDirty:QZ,isValid:GO,isAsync:a6,get util(){return yr},get objectUtil(){return LZ},ZodParsedType:st,getParsedType:SE,ZodType:xn,ZodString:TE,ZodNumber:wS,ZodBigInt:kS,ZodBoolean:PS,ZodDate:MS,ZodSymbol:SR,ZodUndefined:LS,ZodNull:US,ZodAny:IE,ZodUnknown:jg,ZodNever:yf,ZodVoid:TR,ZodArray:Hg,ZodObject:pu,ZodUnion:QS,ZodDiscriminatedUnion:u6,ZodIntersection:FS,ZodTuple:Jm,ZodRecord:c6,ZodMap:IR,ZodSet:bR,ZodFunction:l6,ZodLazy:GS,ZodLiteral:zS,ZodEnum:jS,ZodNativeEnum:HS,ZodPromise:bE,ZodEffects:Vl,ZodTransformer:Vl,ZodOptional:Ef,ZodNullable:$g,ZodDefault:$S,ZodCatch:CR,ZodNaN:vR,BRAND:IRt,ZodBranded:d6,ZodPipeline:zO,ZodReadonly:RR,custom:j2e,Schema:xn,ZodSchema:xn,late:bRt,get ZodFirstPartyTypeKind(){return Kt},coerce:ixt,any:ORt,array:MRt,bigint:RRt,boolean:q2e,date:xRt,discriminatedUnion:FRt,effect:U2e,enum:KRt,function:qRt,instanceof:CRt,intersection:GRt,lazy:VRt,literal:YRt,map:HRt,nan:vRt,nativeEnum:JRt,never:kRt,null:NRt,nullable:XRt,number:$2e,object:LRt,oboolean:oxt,onumber:rxt,optional:WRt,ostring:nxt,pipeline:txt,preprocess:ext,promise:ZRt,record:jRt,set:$Rt,strictObject:URt,string:H2e,symbol:DRt,transformer:U2e,tuple:zRt,undefined:BRt,union:QRt,unknown:wRt,void:PRt,NEVER:sxt,ZodIssueCode:qe,quotelessJson:cRt,ZodError:qc}),axt=e=>typeof e?.safeParse=="function",PZ=e=>typeof e?.passthrough=="function",uxt=(e,t)=>PZ(e)?PZ(t)?e.merge(t):e:PZ(t)?t:Object.assign({},e,t),np=lu.object({name:lu.literal("ZodError"),issues:lu.array(lu.object({path:lu.array(lu.union([lu.string(),lu.number()])),message:lu.string().optional(),code:lu.nativeEnum(lu.ZodIssueCode)}).catchall(lu.any()))}),GZ=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}},DRn=lu.object({message:lu.literal("Request validation failed"),pathParameterErrors:np.nullable(),headerErrors:np.nullable(),queryParameterErrors:np.nullable(),bodyErrors:np.nullable()}),BRn=lu.object({pathParameterErrors:np.nullable(),headerErrors:np.nullable(),queryParameterErrors:np.nullable(),bodyErrors:np.nullable()}),NRn=lu.object({paramsResult:np.nullable(),headersResult:np.nullable(),queryResult:np.nullable(),bodyResult:np.nullable()}),V2e="zod-ts-rest-polyfill",cxt=e=>{if(!e)return!1;let t=e?.["~standard"];return t?t.version===1&&typeof t.validate=="function":!1},lxt=e=>cxt(e)?e:axt(e)?(Object.assign(e,{"~standard":{vendor:V2e,version:1,validate:r=>{let o=e.safeParse(r);return o.success?{value:o.data}:{issues:o.error.issues}}}}),e):null,dxt=(e,t)=>e?t?e instanceof pu&&t instanceof pu?uxt(e,t):{...e,...t}:e:t,pxt=(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===V2e?{error:new qc(r.issues)}:{error:new GZ(r.issues)}:n&&typeof e=="object"&&r.value?{value:{...e,...r.value}}:{value:r.value}},Y2e=Symbol("ContractNoBody"),K2e=e=>"method"in e&&"path"in e,J2e=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>{var o,i,s;return K2e(r)?[n,{...r,path:t?.pathPrefix?t.pathPrefix+r.path:r.path,headers:dxt(t?.baseHeaders,r.headers),strictStatusCodes:(o=r.strictStatusCodes)!==null&&o!==void 0?o:t?.strictStatusCodes,validateResponseOnClient:(i=r.validateResponseOnClient)!==null&&i!==void 0?i:t?.validateResponseOnClient,responses:{...t?.commonResponses,...r.responses},metadata:t?.metadata?{...t?.metadata,...(s=r.metadata)!==null&&s!==void 0?s:{}}:r.metadata}]:[n,J2e(r,t)]})),MZ=Symbol("ContractPlainType"),ia=()=>({router:(e,t)=>J2e(e,t),query:e=>e,mutation:e=>e,responses:e=>e,response:()=>MZ,body:()=>MZ,type:()=>MZ,otherResponse:({contentType:e,body:t})=>({contentType:e,body:t}),noBody:()=>Y2e}),fxt=({path:e,params:t})=>{let n=t;return e.replace(/\/?:([^/?]+)\??/g,(r,o)=>n[o]?`${r.startsWith("/")?"/":""}${n[o]}`:"")},mxt=(e,t=!1)=>{let n=t?Axt(e):gxt(e);return n?.length>0?"?"+n:""},Axt=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("&"):"",gxt=e=>e?Object.keys(e).flatMap(t=>zZ(t,e[t])).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(n)}`).join("&"):"",zZ=(e,t)=>Array.isArray(t)?t.flatMap((n,r)=>zZ(`${e}[${r}]`,n)):t instanceof Date?[[`${e}`,t.toISOString()]]:t===null?[[`${e}`,""]]:t===void 0?[]:typeof t=="object"?Object.keys(t).flatMap(n=>zZ(`${e}[${n}]`,t[n])):[[`${e}`,`${t}`]],jZ=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}},HZ=async({route:e,path:t,method:n,headers:r,body:o,validateResponse:i,fetchOptions:s})=>{let c=await fetch(t,{...s,method:n,headers:r,body:o}),l=c.headers.get("content-type");if(l?.includes("application/")&&l?.includes("json")){let f=e.responses[c.status],h={status:c.status,body:f===Y2e?void 0:await c.json(),headers:c.headers},y=lxt(f);if(y&&(i??e.validateResponseOnClient)){let S=pxt(h.body,y);if(S.error)throw S.error;return{...h,body:S.value}}return h}return l?.includes("text/")?{status:c.status,body:await c.text(),headers:c.headers}:{status:c.status,body:await c.blob(),headers:c.headers}},hxt=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},Q2e=e=>Object.fromEntries(Object.entries(e).map(([t,n])=>[t.toLowerCase(),n])),_xt=e=>{let{path:t,clientArgs:n,route:r,body:o,query:i,extraInputArgs:s,headers:c,fetchOptions:l}=e,f=n.api||HZ,h=n.baseHeaders&&Object.fromEntries(Object.entries(n.baseHeaders).map(([b,v])=>typeof v=="function"?[b,v(e)]:[b,v])),y={...h&&Q2e(h),...Q2e(c)};Object.keys(y).forEach(b=>{y[b]===void 0&&delete y[b]});let S={route:r,path:t,method:r.method,headers:y,body:void 0,rawBody:o,rawQuery:i,contentType:void 0,validateResponse:n.validateResponse,fetchOptions:{...n.credentials&&{credentials:n.credentials},...l},...l?.signal&&{signal:l.signal},...l?.cache&&{cache:l.cache},...l&&"next"in l&&!!l?.next&&{next:l.next}};return r.method!=="GET"&&("contentType"in r&&r.contentType==="multipart/form-data"?S={...S,contentType:"multipart/form-data",body:o instanceof FormData?o:hxt(o)}:"contentType"in r&&r.contentType==="application/x-www-form-urlencoded"?S={...S,contentType:"application/x-www-form-urlencoded",headers:{"content-type":"application/x-www-form-urlencoded",...S.headers},body:typeof o=="string"?o:new URLSearchParams(o)}:o!=null&&(S={...S,contentType:"application/json",headers:{"content-type":"application/json",...S.headers},body:JSON.stringify(o)})),f({...S,...s})},Ext=(e,t,n)=>{let{query:r,params:o,body:i,headers:s,extraHeaders:c,overrideClientOptions:l,fetchOptions:f,cache:h,next:y,...S}=n||{},b={...t,...l},v=typeof o=="object"?Object.fromEntries(Object.entries(o).map(([D,k])=>[D,String(k)])):{};return{path:yxt(r,b.baseUrl,v,e,!!b.jsonQuery),clientArgs:b,route:e,body:i,query:r,extraInputArgs:S,fetchOptions:{...h&&{cache:h},...y&&{next:y},...f},headers:{...c,...s}}},yxt=(e,t,n,r,o)=>{let i=fxt({path:r.path,params:n}),s=mxt(e,o);return t.endsWith("/")&&i.startsWith("/")?`${t}${i.substring(1)}${s}`:`${t}${i}${s}`},Sxt=(e,t)=>{let n=Object.keys(e.responses);return async r=>{let o=Ext(e,t,r),i=await _xt(o);if(!t.throwOnUnknownStatus||n.includes(i.status.toString()))return i;throw new jZ(i,n)}},$Z=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,r])=>K2e(r)?[n,Sxt(r,t)]:[n,$Z(r,t)]))});function re(e,t,n){function r(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:s,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,l);let f=s.prototype,h=Object.keys(f);for(let y=0;y<h.length;y++){let S=h[y];S in c||(c[S]=f[S].bind(c))}}let o=n?.Parent??Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function s(c){var l;let f=n?.Parent?new i:this;r(f,c),(l=f._zod).deferred??(l.deferred=[]);for(let h of f._zod.deferred)h();return f}return Object.defineProperty(s,"init",{value:r}),Object.defineProperty(s,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}function Ei(e){return e&&Object.assign(qS,e),qS}var Z2e,qZ,VZ,Tf,CE,qS,VS=O(()=>{A();qZ=Object.freeze({status:"aborted"});VZ=Symbol("zod_brand"),Tf=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},CE=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Z2e=globalThis).__zod_globalConfig??(Z2e.__zod_globalConfig={});qS=globalThis.__zod_globalConfig});var Le={};$s(Le,{BIGINT_FORMAT_RANGES:()=>rW,Class:()=>KZ,NUMBER_FORMAT_RANGES:()=>nW,aborted:()=>DE,allowsEval:()=>WZ,assert:()=>vxt,assertEqual:()=>Txt,assertIs:()=>bxt,assertNever:()=>Cxt,assertNotEqual:()=>Ixt,assignProp:()=>RE,base64ToUint8Array:()=>X2e,base64urlToUint8Array:()=>jxt,cached:()=>DR,captureStackTrace:()=>f6,cleanEnum:()=>zxt,cleanRegex:()=>$O,clone:()=>Wu,cloneDef:()=>xxt,createTransparentProxy:()=>kxt,defineLazy:()=>zn,esc:()=>p6,escapeRegex:()=>op,explicitlyAborted:()=>oW,extend:()=>Lxt,finalizeIssue:()=>Xu,floatSafeRemainder:()=>JZ,getElementAtPath:()=>Dxt,getEnumValues:()=>HO,getLengthableOrigin:()=>YO,getParsedType:()=>wxt,getSizableOrigin:()=>VO,hexToUint8Array:()=>$xt,isObject:()=>YS,isPlainObject:()=>xE,issue:()=>BR,joinValues:()=>ce,jsonStringifyReplacer:()=>xR,merge:()=>Qxt,mergeDefs:()=>qg,normalizeParams:()=>He,nullish:()=>vE,numKeys:()=>Oxt,objectClone:()=>Rxt,omit:()=>Mxt,optionalKeys:()=>tW,parsedType:()=>ke,partial:()=>Fxt,pick:()=>Pxt,prefixIssues:()=>Vc,primitiveTypes:()=>eW,promiseAllObject:()=>Bxt,propertyKeyTypes:()=>qO,randomString:()=>Nxt,required:()=>Gxt,safeExtend:()=>Uxt,shallowClone:()=>XZ,slugify:()=>ZZ,stringifyPrimitive:()=>we,uint8ArrayToBase64:()=>eMe,uint8ArrayToBase64url:()=>Hxt,uint8ArrayToHex:()=>qxt,unwrapMessage:()=>jO});function Txt(e){return e}function Ixt(e){return e}function bxt(e){}function Cxt(e){throw new Error("Unexpected value in exhaustive check")}function vxt(e){}function HO(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function ce(e,t="|"){return e.map(n=>we(n)).join(t)}function xR(e,t){return typeof t=="bigint"?t.toString():t}function DR(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function vE(e){return e==null}function $O(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function JZ(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 zn(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==W2e)return r===void 0&&(r=W2e,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Rxt(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function RE(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function qg(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function xxt(e){return qg(e._zod.def)}function Dxt(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function Bxt(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 Nxt(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function p6(e){return JSON.stringify(e)}function ZZ(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function YS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xE(e){if(YS(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(YS(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function XZ(e){return xE(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Oxt(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}function op(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Wu(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function He(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function kxt(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 we(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function tW(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}function Pxt(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=qg(e._zod.def,{get shape(){let s={};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(s[c]=n.shape[c])}return RE(this,"shape",s),s},checks:[]});return Wu(e,i)}function Mxt(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=qg(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete s[c]}return RE(this,"shape",s),s},checks:[]});return Wu(e,i)}function Lxt(e,t){if(!xE(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let o=qg(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return RE(this,"shape",i),i}});return Wu(e,o)}function Uxt(e,t){if(!xE(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=qg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return RE(this,"shape",r),r}});return Wu(e,n)}function Qxt(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=qg(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return RE(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Wu(e,n)}function Fxt(e,t,n){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=qg(t._zod.def,{get shape(){let c=t._zod.def.shape,l={...c};if(n)for(let f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(l[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(let f in c)l[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return RE(this,"shape",l),l},checks:[]});return Wu(t,s)}function Gxt(e,t,n){let r=qg(t._zod.def,{get shape(){let o=t._zod.def.shape,i={...o};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:o[s]}))}else for(let s in o)i[s]=new e({type:"nonoptional",innerType:o[s]});return RE(this,"shape",i),i}});return Wu(t,r)}function DE(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 oW(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 Vc(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function jO(e){return typeof e=="string"?e:e?.message}function Xu(e,t,n){let r=e.message?e.message:jO(e.inst?._zod.def?.error?.(e))??jO(t?.error?.(e))??jO(n.customError?.(e))??jO(n.localeError?.(e))??"Invalid input",{inst:o,continue:i,input:s,...c}=e;return c.path??(c.path=[]),c.message=r,t?.reportInput&&(c.input=s),c}function VO(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function YO(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ke(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function BR(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function zxt(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function X2e(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 eMe(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function jxt(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return X2e(t+n)}function Hxt(e){return eMe(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $xt(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 qxt(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var W2e,f6,WZ,wxt,qO,eW,nW,rW,KZ,Et=O(()=>{A();VS();W2e=Symbol("evaluating");f6="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};WZ=DR(()=>{if(qS.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});wxt=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},qO=new Set(["string","number","symbol"]),eW=new Set(["string","number","bigint","boolean","symbol","undefined"]);nW={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]},rW={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};KZ=class{constructor(...t){}}});function JO(e,t=n=>n.message){let n={},r=[];for(let o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ZO(e,t=n=>n.message){let n={_errors:[]},r=(o,i=[])=>{for(let s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>r({issues:c},[...i,...s.path]));else if(s.code==="invalid_key")r({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")r({issues:s.issues},[...i,...s.path]);else{let c=[...i,...s.path];if(c.length===0)n._errors.push(t(s));else{let l=n,f=0;for(;f<c.length;){let h=c[f];f===c.length-1?(l[h]=l[h]||{_errors:[]},l[h]._errors.push(t(s))):l[h]=l[h]||{_errors:[]},l=l[h],f++}}}};return r(e),n}function iW(e,t=n=>n.message){let n={errors:[]},r=(o,i=[])=>{var s,c;for(let l of o.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(f=>r({issues:f},[...i,...l.path]));else if(l.code==="invalid_key")r({issues:l.issues},[...i,...l.path]);else if(l.code==="invalid_element")r({issues:l.issues},[...i,...l.path]);else{let f=[...i,...l.path];if(f.length===0){n.errors.push(t(l));continue}let h=n,y=0;for(;y<f.length;){let S=f[y],b=y===f.length-1;typeof S=="string"?(h.properties??(h.properties={}),(s=h.properties)[S]??(s[S]={errors:[]}),h=h.properties[S]):(h.items??(h.items=[]),(c=h.items)[S]??(c[S]={errors:[]}),h=h.items[S]),b&&h.errors.push(t(l)),y++}}};return r(e),n}function nMe(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 sW(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 ${nMe(r.path)}`);return t.join(`
41
41
  `)}var tMe,KO,Yc,aW=O(()=>{A();VS();Et();tMe=(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,xR,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},KO=re("$ZodError",tMe),Yc=re("$ZodError",tMe,{Parent:Error})});var NR,m6,OR,A6,wR,uW,kR,cW,g6,Yxt,h6,Kxt,_6,Jxt,E6,Zxt,y6,Wxt,S6,Xxt,T6,eDt,I6,tDt,lW=O(()=>{A();VS();aW();Et();NR=e=>(t,n,r,o)=>{let i=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Tf;if(s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>Xu(l,i,Ei())));throw f6(c,o?.callee),c}return s.value},m6=NR(Yc),OR=e=>async(t,n,r,o)=>{let i=r?{...r,async:!0}:{async:!0},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>Xu(l,i,Ei())));throw f6(c,o?.callee),c}return s.value},A6=OR(Yc),wR=e=>(t,n,r)=>{let o=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Tf;return i.issues.length?{success:!1,error:new(e??KO)(i.issues.map(s=>Xu(s,o,Ei())))}:{success:!0,data:i.value}},uW=wR(Yc),kR=e=>async(t,n,r)=>{let o=r?{...r,async:!0}:{async:!0},i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(s=>Xu(s,o,Ei())))}:{success:!0,data:i.value}},cW=kR(Yc),g6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return NR(e)(t,n,o)},Yxt=g6(Yc),h6=e=>(t,n,r)=>NR(e)(t,n,r),Kxt=h6(Yc),_6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return OR(e)(t,n,o)},Jxt=_6(Yc),E6=e=>async(t,n,r)=>OR(e)(t,n,r),Zxt=E6(Yc),y6=e=>(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return wR(e)(t,n,o)},Wxt=y6(Yc),S6=e=>(t,n,r)=>wR(e)(t,n,r),Xxt=S6(Yc),T6=e=>async(t,n,r)=>{let o=r?{...r,direction:"backward"}:{direction:"backward"};return kR(e)(t,n,o)},eDt=T6(Yc),I6=e=>async(t,n,r)=>kR(e)(t,n,r),tDt=I6(Yc)});var Yl={};$s(Yl,{base64:()=>vW,base64url:()=>b6,bigint:()=>wW,boolean:()=>PW,browserEmail:()=>cDt,cidrv4:()=>bW,cidrv6:()=>CW,cuid:()=>dW,cuid2:()=>pW,date:()=>DW,datetime:()=>NW,domain:()=>pDt,duration:()=>hW,e164:()=>xW,email:()=>EW,emoji:()=>yW,extendedDuration:()=>nDt,guid:()=>_W,hex:()=>fDt,hostname:()=>dDt,html5Email:()=>sDt,httpProtocol:()=>RW,idnEmail:()=>uDt,integer:()=>kW,ipv4:()=>SW,ipv6:()=>TW,ksuid:()=>AW,lowercase:()=>UW,mac:()=>IW,md5_base64:()=>ADt,md5_base64url:()=>gDt,md5_hex:()=>mDt,nanoid:()=>gW,null:()=>MW,number:()=>C6,rfc5322Email:()=>aDt,sha1_base64:()=>_Dt,sha1_base64url:()=>EDt,sha1_hex:()=>hDt,sha256_base64:()=>SDt,sha256_base64url:()=>TDt,sha256_hex:()=>yDt,sha384_base64:()=>bDt,sha384_base64url:()=>CDt,sha384_hex:()=>IDt,sha512_base64:()=>RDt,sha512_base64url:()=>xDt,sha512_hex:()=>vDt,string:()=>OW,time:()=>BW,ulid:()=>fW,undefined:()=>LW,unicodeEmail:()=>rMe,uppercase:()=>QW,uuid:()=>KS,uuid4:()=>rDt,uuid6:()=>oDt,uuid7:()=>iDt,xid:()=>mW});function yW(){return new RegExp(lDt,"u")}function iMe(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 BW(e){return new RegExp(`^${iMe(e)}$`)}function NW(e){let t=iMe({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${oMe}T(?:${r})$`)}function WO(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function XO(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var dW,pW,fW,mW,AW,gW,hW,nDt,_W,KS,rDt,oDt,iDt,EW,sDt,aDt,rMe,uDt,cDt,lDt,SW,TW,IW,bW,CW,vW,b6,dDt,pDt,RW,xW,oMe,DW,OW,wW,kW,C6,PW,MW,LW,UW,QW,fDt,mDt,ADt,gDt,hDt,_Dt,EDt,yDt,SDt,TDt,IDt,bDt,CDt,vDt,RDt,xDt,v6=O(()=>{A();Et();dW=/^[cC][0-9a-z]{6,}$/,pW=/^[0-9a-z]+$/,fW=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mW=/^[0-9a-vA-V]{20}$/,AW=/^[A-Za-z0-9]{27}$/,gW=/^[a-zA-Z0-9_-]{21}$/,hW=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,nDt=/^[-+]?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)?)??$/,_W=/^([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})$/,KS=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)$/,rDt=KS(4),oDt=KS(6),iDt=KS(7),EW=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,sDt=/^[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])?)*$/,aDt=/^(([^<>()\[\]\\.,;:\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,}))$/,rMe=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,uDt=rMe,cDt=/^[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])?)*$/,lDt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";SW=/^(?:(?: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])$/,TW=/^(([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}|:))$/,IW=e=>{let t=op(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},bW=/^((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])$/,CW=/^(([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])$/,vW=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,b6=/^[A-Za-z0-9_-]*$/,dDt=/^(?=.{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])?)*\.?$/,pDt=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,RW=/^https?$/,xW=/^\+[1-9]\d{6,14}$/,oMe="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",DW=new RegExp(`^${oMe}$`);OW=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},wW=/^-?\d+n?$/,kW=/^-?\d+$/,C6=/^-?\d+(?:\.\d+)?$/,PW=/^(?:true|false)$/i,MW=/^null$/i,LW=/^undefined$/i,UW=/^[^A-Z]*$/,QW=/^[^a-z]*$/,fDt=/^[0-9a-fA-F]*$/;mDt=/^[0-9a-fA-F]{32}$/,ADt=WO(22,"=="),gDt=XO(22),hDt=/^[0-9a-fA-F]{40}$/,_Dt=WO(27,"="),EDt=XO(27),yDt=/^[0-9a-fA-F]{64}$/,SDt=WO(43,"="),TDt=XO(43),IDt=/^[0-9a-fA-F]{96}$/,bDt=WO(64,""),CDt=XO(64),vDt=/^[0-9a-fA-F]{128}$/,RDt=WO(86,"=="),xDt=XO(86)});function sMe(e,t,n){e.issues.length&&t.issues.push(...Vc(n,e.issues))}var Wr,aMe,R6,x6,FW,GW,zW,jW,HW,$W,qW,VW,YW,PR,KW,JW,ZW,WW,XW,eX,tX,nX,rX,D6=O(()=>{A();VS();v6();Et();Wr=re("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aMe={number:"number",bigint:"bigint",object:"date"},R6=re("$ZodCheckLessThan",(e,t)=>{Wr.init(e,t);let n=aMe[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})}}),x6=re("$ZodCheckGreaterThan",(e,t)=>{Wr.init(e,t);let n=aMe[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})}}),FW=re("$ZodCheckMultipleOf",(e,t)=>{Wr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):JZ(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})}}),GW=re("$ZodCheckNumberFormat",(e,t)=>{Wr.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[o,i]=nW[t.format];e._zod.onattach.push(s=>{let c=s._zod.bag;c.format=t.format,c.minimum=o,c.maximum=i,n&&(c.pattern=kW)}),e._zod.check=s=>{let c=s.value;if(n){if(!Number.isInteger(c)){s.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?s.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}):s.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&&s.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>i&&s.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),zW=re("$ZodCheckBigIntFormat",(e,t)=>{Wr.init(e,t);let[n,r]=rW[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})}}),jW=re("$ZodCheckMaxSize",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(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:VO(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),HW=re("$ZodCheckMinSize",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(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:VO(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),$W=re("$ZodCheckSizeEquals",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=r=>{let o=r.value,i=o.size;if(i===t.size)return;let s=i>t.size;r.issues.push({origin:VO(o),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),qW=re("$ZodCheckMaxLength",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let o=r.value;if(o.length<=t.maximum)return;let s=YO(o);r.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),VW=re("$ZodCheckMinLength",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let o=r.value;if(o.length>=t.minimum)return;let s=YO(o);r.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),YW=re("$ZodCheckLengthEquals",(e,t)=>{var n;Wr.init(e,t),(n=e._zod.def).when??(n.when=r=>{let o=r.value;return!vE(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{let o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{let o=r.value,i=o.length;if(i===t.length)return;let s=YO(o),c=i>t.length;r.issues.push({origin:s,...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})}}),PR=re("$ZodCheckStringFormat",(e,t)=>{var n,r;Wr.init(e,t),e._zod.onattach.push(o=>{let i=o._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),KW=re("$ZodCheckRegex",(e,t)=>{PR.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})}}),JW=re("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=UW),PR.init(e,t)}),ZW=re("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=QW),PR.init(e,t)}),WW=re("$ZodCheckIncludes",(e,t)=>{Wr.init(e,t);let n=op(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})}}),XW=re("$ZodCheckStartsWith",(e,t)=>{Wr.init(e,t);let n=new RegExp(`^${op(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})}}),eX=re("$ZodCheckEndsWith",(e,t)=>{Wr.init(e,t);let n=new RegExp(`.*${op(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})}});tX=re("$ZodCheckProperty",(e,t)=>{Wr.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(o=>sMe(o,n,t.property));sMe(r,n,t.property)}}),nX=re("$ZodCheckMimeType",(e,t)=>{Wr.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),rX=re("$ZodCheckOverwrite",(e,t)=>{Wr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}})});var ew,oX=O(()=>{A();ew=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(`
@@ -101,7 +101,7 @@ Mongoose Error Code: ${t.code}`:""}`})}function cJ(e,t,n,r=void 0){n&&(0,cO.safe
101
101
 
102
102
  `)}b.write("payload.value = newResult;"),b.write("return payload;");let Q=b.compile();return(z,G)=>Q(S,z,G)},i,s=YS,c=!qS.jitless,f=c&&WZ.value,h=t.catchall,y;e._zod.parse=(S,b)=>{y??(y=r.value);let v=S.value;return s(v)?c&&f&&b?.async===!1&&b.jitless!==!0?(i||(i=o(t.shape)),S=i(S,b),h?vMe([],v,S,b,y,e):S):n(S,b):(S.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),S)}});nw=re("$ZodUnion",(e,t)=>{sn.init(e,t),zn(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),zn(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),zn(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),zn(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(o=>o._zod.pattern);return new RegExp(`^(${r.map(o=>$O(o.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let c of t.options){let l=c._zod.run({value:r.value,issues:[]},o);if(l instanceof Promise)s.push(l),i=!0;else{if(l.issues.length===0)return l;s.push(l)}}return i?Promise.all(s).then(c=>lMe(c,r,e,o)):lMe(s,r,e,o)}});qX=re("$ZodXor",(e,t)=>{nw.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,o)=>{if(n)return n(r,o);let i=!1,s=[];for(let c of t.options){let l=c._zod.run({value:r.value,issues:[]},o);l instanceof Promise?(s.push(l),i=!0):s.push(l)}return i?Promise.all(s).then(c=>dMe(c,r,e,o)):dMe(s,r,e,o)}}),VX=re("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,nw.init(e,t);let n=e._zod.parse;zn(e._zod,"propValues",()=>{let o={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[c,l]of Object.entries(s)){o[c]||(o[c]=new Set);for(let f of l)o[c].add(f)}}return o});let r=DR(()=>{let o=t.options,i=new Map;for(let s of o){let c=s._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let l of c){if(i.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);i.set(l,s)}}return i});e._zod.parse=(o,i)=>{let s=o.value;if(!YS(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let c=r.value.get(s?.[t.discriminator]);return c?c._zod.run(o,i):t.unionFallback||i.direction==="backward"?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:s,path:[t.discriminator],inst:e}),o)}}),YX=re("$ZodIntersection",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value,i=t.left._zod.run({value:o,issues:[]},r),s=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([l,f])=>pMe(n,l,f)):pMe(n,i,s)}});M6=re("$ZodTuple",(e,t)=>{sn.init(e,t);let n=t.items;e._zod.parse=(r,o)=>{let i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let s=[],c=fMe(n,"optin"),l=fMe(n,"optout");if(!t.rest){if(i.length<c)return r.issues.push({code:"too_small",minimum:c,inclusive:!0,input:i,inst:e,origin:"array"}),r;i.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:i,inst:e,origin:"array"})}let f=new Array(n.length);for(let h=0;h<n.length;h++){let y=n[h]._zod.run({value:i[h],issues:[]},o);y instanceof Promise?s.push(y.then(S=>{f[h]=S})):f[h]=y}if(t.rest){let h=n.length-1,y=i.slice(n.length);for(let S of y){h++;let b=t.rest._zod.run({value:S,issues:[]},o);b instanceof Promise?s.push(b.then(v=>mMe(v,r,h))):mMe(b,r,h)}}return s.length?Promise.all(s).then(()=>AMe(f,r,n,i,l)):AMe(f,r,n,i,l)}});KX=re("$ZodRecord",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!xE(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let c=new Set;for(let f of s)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){c.add(typeof f=="number"?f.toString():f);let h=t.keyType._zod.run({value:f,issues:[]},r);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(h.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:h.issues.map(b=>Xu(b,r,Ei())),input:f,path:[f],inst:e});continue}let y=h.value,S=t.valueType._zod.run({value:o[f],issues:[]},r);S instanceof Promise?i.push(S.then(b=>{b.issues.length&&n.issues.push(...Vc(f,b.issues)),n.value[y]=b.value})):(S.issues.length&&n.issues.push(...Vc(f,S.issues)),n.value[y]=S.value)}let l;for(let f in o)c.has(f)||(l=l??[],l.push(f));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{n.value={};for(let c of Reflect.ownKeys(o)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,c))continue;let l=t.keyType._zod.run({value:c,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&C6.test(c)&&l.issues.length){let y=t.keyType._zod.run({value:Number(c),issues:[]},r);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");y.issues.length===0&&(l=y)}if(l.issues.length){t.mode==="loose"?n.value[c]=o[c]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(y=>Xu(y,r,Ei())),input:c,path:[c],inst:e});continue}let h=t.valueType._zod.run({value:o[c],issues:[]},r);h instanceof Promise?i.push(h.then(y=>{y.issues.length&&n.issues.push(...Vc(c,y.issues)),n.value[l.value]=y.value})):(h.issues.length&&n.issues.push(...Vc(c,h.issues)),n.value[l.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),JX=re("$ZodMap",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),n;let i=[];n.value=new Map;for(let[s,c]of o){let l=t.keyType._zod.run({value:s,issues:[]},r),f=t.valueType._zod.run({value:c,issues:[]},r);l instanceof Promise||f instanceof Promise?i.push(Promise.all([l,f]).then(([h,y])=>{gMe(h,y,n,s,o,e,r)})):gMe(l,f,n,s,o,e,r)}return i.length?Promise.all(i).then(()=>n):n}});ZX=re("$ZodSet",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;if(!(o instanceof Set))return n.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of o){let c=t.valueType._zod.run({value:s,issues:[]},r);c instanceof Promise?i.push(c.then(l=>hMe(l,n))):hMe(c,n)}return i.length?Promise.all(i).then(()=>n):n}});WX=re("$ZodEnum",(e,t)=>{sn.init(e,t);let n=HO(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>qO.has(typeof o)).map(o=>typeof o=="string"?op(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{let s=o.value;return r.has(s)||o.issues.push({code:"invalid_value",values:n,input:s,inst:e}),o}}),XX=re("$ZodLiteral",(e,t)=>{if(sn.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?op(r):r?op(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{let i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),eee=re("$ZodFile",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{let o=n.value;return o instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:o,inst:e}),n}}),tee=re("$ZodTransform",(e,t)=>{sn.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new CE(e.constructor.name);let o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(n.value=s,n.fallback=!0,n));if(o instanceof Promise)throw new Tf;return n.value=o,n.fallback=!0,n}});L6=re("$ZodOptional",(e,t)=>{sn.init(e,t),e._zod.optin="optional",e._zod.optout="optional",zn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),zn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${$O(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let o=n.value,i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>_Me(s,o)):_Me(i,o)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),nee=re("$ZodExactOptional",(e,t)=>{L6.init(e,t),zn(e._zod,"values",()=>t.innerType._zod.values),zn(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),ree=re("$ZodNullable",(e,t)=>{sn.init(e,t),zn(e._zod,"optin",()=>t.innerType._zod.optin),zn(e._zod,"optout",()=>t.innerType._zod.optout),zn(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${$O(n.source)}|null)$`):void 0}),zn(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),oee=re("$ZodDefault",(e,t)=>{sn.init(e,t),e._zod.optin="optional",zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>EMe(i,t)):EMe(o,t)}});iee=re("$ZodPrefault",(e,t)=>{sn.init(e,t),e._zod.optin="optional",zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),see=re("$ZodNonOptional",(e,t)=>{sn.init(e,t),zn(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>yMe(i,e)):yMe(o,e)}});aee=re("$ZodSuccess",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new CE("ZodSuccess");let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.issues.length===0,n)):(n.value=o.issues.length===0,n)}}),uee=re("$ZodCatch",(e,t)=>{sn.init(e,t),e._zod.optin="optional",zn(e._zod,"optout",()=>t.innerType._zod.optout),zn(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>Xu(s,r,Ei()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(i=>Xu(i,r,Ei()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),cee=re("$ZodNaN",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),U6=re("$ZodPipe",(e,t)=>{sn.init(e,t),zn(e._zod,"values",()=>t.in._zod.values),zn(e._zod,"optin",()=>t.in._zod.optin),zn(e._zod,"optout",()=>t.out._zod.optout),zn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>B6(s,t.in,r)):B6(i,t.in,r)}let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>B6(i,t.out,r)):B6(o,t.out,r)}});rw=re("$ZodCodec",(e,t)=>{sn.init(e,t),zn(e._zod,"values",()=>t.in._zod.values),zn(e._zod,"optin",()=>t.in._zod.optin),zn(e._zod,"optout",()=>t.out._zod.optout),zn(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let i=t.in._zod.run(n,r);return i instanceof Promise?i.then(s=>N6(s,t,r)):N6(i,t,r)}else{let i=t.out._zod.run(n,r);return i instanceof Promise?i.then(s=>N6(s,t,r)):N6(i,t,r)}}});lee=re("$ZodPreprocess",(e,t)=>{U6.init(e,t)}),dee=re("$ZodReadonly",(e,t)=>{sn.init(e,t),zn(e._zod,"propValues",()=>t.innerType._zod.propValues),zn(e._zod,"values",()=>t.innerType._zod.values),zn(e._zod,"optin",()=>t.innerType?._zod?.optin),zn(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(SMe):SMe(o)}});pee=re("$ZodTemplateLiteral",(e,t)=>{sn.init(e,t);let n=[];for(let r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let o=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!o)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let i=o.startsWith("^")?1:0,s=o.endsWith("$")?o.length-1:o.length;n.push(o.slice(i,s))}else if(r===null||eW.has(typeof r))n.push(op(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,o)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),fee=re("$ZodFunction",(e,t)=>(sn.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){let o=e._def.input?m6(e._def.input,r):r,i=Reflect.apply(n,this,o);return e._def.output?m6(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let o=e._def.input?await A6(e._def.input,r):r,i=await Reflect.apply(n,this,o);return e._def.output?await A6(e._def.output,i):i}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new M6({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),mee=re("$ZodPromise",(e,t)=>{sn.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(o=>t.innerType._zod.run({value:o,issues:[]},r))}),Aee=re("$ZodLazy",(e,t)=>{sn.init(e,t),zn(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),zn(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),zn(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),zn(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),zn(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),gee=re("$ZodCustom",(e,t)=>{Wr.init(e,t),sn.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{let r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>TMe(i,n,r,e));TMe(o,n,r,e)}})});function xMe(){return{localeError:BDt()}}var BDt,DMe=O(()=>{A();Et();BDt=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${o.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return o.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${we(o.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${o.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${o.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${o.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??o.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${o.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${o.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${o.keys.length>1?"\u0629":""}: ${ce(o.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${o.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}}});function BMe(){return{localeError:NDt()}}var NDt,NMe=O(()=>{A();Et();NDt=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${o.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${c}`}case"invalid_value":return o.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${we(o.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${o.origin??"d\u0259y\u0259r"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??o.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${o.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${o.keys.length>1?"lar":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${o.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}}});function OMe(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function wMe(){return{localeError:ODt()}}var ODt,kMe=O(()=>{A();Et();ODt=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${o.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${we(o.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=OMe(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.maximum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=OMe(c,s.unit.one,s.unit.few,s.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${o.minimum.toString()} ${l}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${o.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${o.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${o.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}}});function PMe(){return{localeError:wDt()}}var wDt,MMe=O(()=>{A();Et();wDt=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${we(o.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${o.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${o.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u043E\u0432\u0435":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}}});function LMe(){return{localeError:kDt()}}var kDt,UMe=O(()=>{A();Et();kDt=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${o.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${c}`}case"invalid_value":return o.values.length===1?`Valor inv\xE0lid: s'esperava ${we(o.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${ce(o.values," o ")}`;case"too_big":{let i=o.inclusive?"com a m\xE0xim":"menys de",s=t(o.origin);return s?`Massa gran: s'esperava que ${o.origin??"el valor"} contingu\xE9s ${i} ${o.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${o.origin??"el valor"} fos ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(o.origin);return s?`Massa petit: s'esperava que ${o.origin} contingu\xE9s ${i} ${o.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${o.origin} fos ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${o.divisor}`;case"unrecognized_keys":return`Clau${o.keys.length>1?"s":""} no reconeguda${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${o.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${o.origin}`;default:return"Entrada inv\xE0lida"}}}});function QMe(){return{localeError:PDt()}}var PDt,FMe=O(()=>{A();Et();PDt=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(o){return e[o]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${o.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${c}`}case"invalid_value":return o.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${we(o.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED m\xEDt ${i}${o.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${o.origin??"hodnota"} mus\xED b\xFDt ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??o.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${o.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${ce(o.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${o.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${o.origin}`;default:return"Neplatn\xFD vstup"}}}});function GMe(){return{localeError:MDt()}}var MDt,zMe=O(()=>{A();Et();MDt=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldigt input: forventede instanceof ${o.expected}, fik ${c}`:`Ugyldigt input: forventede ${i}, fik ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig v\xE6rdi: forventede ${we(o.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=r[o.origin]??o.origin;return s?`For stor: forventede ${c??"value"} ${s.verb} ${i} ${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=r[o.origin]??o.origin;return s?`For lille: forventede ${c} ${s.verb} ${i} ${o.minimum.toString()} ${s.unit}`:`For lille: forventede ${c} havde ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${o.origin}`;default:return"Ugyldigt input"}}}});function jMe(){return{localeError:LDt()}}var LDt,HMe=O(()=>{A();Et();LDt=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(o){return e[o]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${o.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${c}`}case"invalid_value":return o.values.length===1?`Ung\xFCltige Eingabe: erwartet ${we(o.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${o.origin??"Wert"} ${i}${o.maximum.toString()} ist`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${o.origin} ${i}${o.minimum.toString()} ist`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${o.divisor} sein`;case"unrecognized_keys":return`${o.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${o.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${o.origin}`;default:return"Ung\xFCltige Eingabe"}}}});function $Me(){return{localeError:UDt()}}var UDt,qMe=O(()=>{A();Et();UDt=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(o){return e[o]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return typeof o.expected=="string"&&/^[A-Z]/.test(o.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${o.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return o.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${we(o.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${o.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??o.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${o.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${o.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${o.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${o.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${o.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}}});function Q6(){return{localeError:QDt()}}var QDt,_ee=O(()=>{A();Et();QDt=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return`Invalid input: expected ${i}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${we(o.values[0])}`:`Invalid option: expected one of ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${i}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${i}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}}});function VMe(){return{localeError:FDt()}}var FDt,YMe=O(()=>{A();Et();FDt=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(o){return e[o]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${o.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${c}`}case"invalid_value":return o.values.length===1?`Nevalida enigo: atendi\u011Dis ${we(o.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${o.origin??"valoro"} havu ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Tro malgranda: atendi\u011Dis ke ${o.origin} havu ${i}${o.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${o.origin} estu ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??o.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${o.divisor}`;case"unrecognized_keys":return`Nekonata${o.keys.length>1?"j":""} \u015Dlosilo${o.keys.length>1?"j":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${o.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${o.origin}`;default:return"Nevalida enigo"}}}});function KMe(){return{localeError:GDt()}}var GDt,JMe=O(()=>{A();Et();GDt=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(o){return e[o]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${o.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${c}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: se esperaba ${we(o.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=r[o.origin]??o.origin;return s?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=r[o.origin]??o.origin;return s?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${i}${o.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??o.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[o.origin]??o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[o.origin]??o.origin}`;default:return"Entrada inv\xE1lida"}}}});function ZMe(){return{localeError:zDt()}}var zDt,WMe=O(()=>{A();Et();zDt=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${o.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return o.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${we(o.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${ce(o.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${o.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??o.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${o.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${o.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${ce(o.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${o.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${o.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}}});function XMe(){return{localeError:jDt()}}var jDt,eLe=O(()=>{A();Et();jDt=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(o){return e[o]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Virheellinen tyyppi: odotettiin instanceof ${o.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${c}`}case"invalid_value":return o.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${we(o.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${o.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${o.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??o.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${o.divisor} monikerta`;case"unrecognized_keys":return`${o.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${ce(o.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}}});function tLe(){return{localeError:HDt()}}var HDt,nLe=O(()=>{A();Et();HDt=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : instanceof ${o.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${c} re\xE7u`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : ${we(o.values[0])} attendu`:`Option invalide : une valeur parmi ${ce(o.values,"|")} attendue`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Trop grand : ${r[o.origin]??"valeur"} doit ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r[o.origin]??"valeur"} doit \xEAtre ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Trop petit : ${r[o.origin]??"valeur"} doit ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : ${r[o.origin]??"valeur"} doit \xEAtre ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${ce(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function rLe(){return{localeError:$Dt()}}var $Dt,oLe=O(()=>{A();Et();$Dt=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(o){return e[o]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Entr\xE9e invalide : attendu instanceof ${o.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${c}`}case"invalid_value":return o.values.length===1?`Entr\xE9e invalide : attendu ${we(o.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u2264":"<",s=t(o.origin);return s?`Trop grand : attendu que ${o.origin??"la valeur"} ait ${i}${o.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${o.origin??"la valeur"} soit ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u2265":">",s=t(o.origin);return s?`Trop petit : attendu que ${o.origin} ait ${i}${o.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${o.origin} soit ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??o.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${o.divisor}`;case"unrecognized_keys":return`Cl\xE9${o.keys.length>1?"s":""} non reconnue${o.keys.length>1?"s":""} : ${ce(o.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${o.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${o.origin}`;default:return"Entr\xE9e invalide"}}}});function iLe(){return{localeError:qDt()}}var qDt,sLe=O(()=>{A();Et();qDt=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=f=>f?e[f]:void 0,r=f=>{let h=n(f);return h?h.label:f??e.unknown.label},o=f=>`\u05D4${r(f)}`,i=f=>(n(f)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=f=>f?t[f]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},l={nan:"NaN"};return f=>{switch(f.code){case"invalid_type":{let h=f.expected,y=l[h??""]??r(h),S=ke(f.input),b=l[S]??e[S]?.label??S;return/^[A-Z]/.test(f.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${f.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${y}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`}case"invalid_value":{if(f.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${we(f.values[0])}`;let h=f.values.map(b=>we(b));if(f.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h[0]} \u05D0\u05D5 ${h[1]}`;let y=h[h.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${h.slice(0,-1).join(", ")} \u05D0\u05D5 ${y}`}case"too_big":{let h=s(f.origin),y=o(f.origin??"value");if(f.origin==="string")return`${h?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.maximum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(f.origin==="number"){let v=f.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${f.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(f.origin==="array"||f.origin==="set"){let v=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",x=f.inclusive?`${f.maximum} ${h?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${f.maximum} ${h?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${y} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`.trim()}let S=f.inclusive?"<=":"<",b=i(f.origin??"value");return h?.unit?`${h.longLabel} \u05DE\u05D3\u05D9: ${y} ${b} ${S}${f.maximum.toString()} ${h.unit}`:`${h?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${y} ${b} ${S}${f.maximum.toString()}`}case"too_small":{let h=s(f.origin),y=o(f.origin??"value");if(f.origin==="string")return`${h?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${f.minimum.toString()} ${h?.unit??""} ${f.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(f.origin==="number"){let v=f.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${f.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${f.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(f.origin==="array"||f.origin==="set"){let v=f.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(f.minimum===1&&f.inclusive){let D=(f.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let x=f.inclusive?`${f.minimum} ${h?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${f.minimum} ${h?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${y} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${x}`.trim()}let S=f.inclusive?">=":">",b=i(f.origin??"value");return h?.unit?`${h.shortLabel} \u05DE\u05D3\u05D9: ${y} ${b} ${S}${f.minimum.toString()} ${h.unit}`:`${h?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${y} ${b} ${S}${f.minimum.toString()}`}case"invalid_format":{let h=f;if(h.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${h.prefix}"`;if(h.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${h.suffix}"`;if(h.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${h.includes}"`;if(h.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${h.pattern}`;let y=c[h.format],S=y?.label??h.format,v=(y?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${S} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${f.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${f.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${f.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${ce(f.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${o(f.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}}});function aLe(){return{localeError:VDt()}}var VDt,uLe=O(()=>{A();Et();VDt=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(o){return e[o]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},r={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${o.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${c}`}case"invalid_value":return o.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${we(o.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=r[o.origin]??o.origin;return s?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${i}${o.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=r[o.origin]??o.origin;return s?`Premalo: o\u010Dekivano da ${c} ima ${i}${o.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??o.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${o.divisor}`;case"unrecognized_keys":return`Neprepoznat${o.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${r[o.origin]??o.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${r[o.origin]??o.origin}`;default:return"Neispravan unos"}}}});function cLe(){return{localeError:YDt()}}var YDt,lLe=O(()=>{A();Et();YDt=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(o){return e[o]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${o.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return o.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${we(o.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xFAl nagy: ${o.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${o.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${o.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} m\xE9rete t\xFAl kicsi ${i}${o.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${o.origin} t\xFAl kicsi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??o.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${o.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${o.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${o.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}}});function dLe(e,t,n){return Math.abs(e)===1?t:n}function MR(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}function pLe(){return{localeError:KDt()}}var KDt,fLe=O(()=>{A();Et();KDt=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(o){return e[o]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${o.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return o.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${we(o.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=dLe(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${MR(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.maximum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${MR(o.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=dLe(c,s.unit.one,s.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${MR(o.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${o.minimum.toString()} ${l}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${MR(o.origin)} \u056C\u056B\u0576\u056B ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??o.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${o.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${o.keys.length>1?"\u0576\u0565\u0580":""}. ${ce(o.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${MR(o.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${MR(o.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}}});function mLe(){return{localeError:JDt()}}var JDt,ALe=O(()=>{A();Et();JDt=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak valid: diharapkan instanceof ${o.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak valid: diharapkan ${we(o.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: diharapkan ${o.origin??"value"} memiliki ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${o.origin??"value"} menjadi ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: diharapkan ${o.origin} memiliki ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${o.origin} menjadi ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??o.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${o.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${o.origin}`;default:return"Input tidak valid"}}}});function gLe(){return{localeError:ZDt()}}var ZDt,hLe=O(()=>{A();Et();ZDt=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(o){return e[o]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${o.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return o.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${we(o.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} hafi ${i}${o.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin??"gildi"} s\xE9 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} hafi ${i}${o.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${o.origin} s\xE9 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??o.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${o.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${o.keys.length>1?"ir lyklar":"ur lykill"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${o.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${o.origin}`;default:return"Rangt gildi"}}}});function _Le(){return{localeError:WDt()}}var WDt,ELe=O(()=>{A();Et();WDt=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(o){return e[o]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input non valido: atteso instanceof ${o.expected}, ricevuto ${c}`:`Input non valido: atteso ${i}, ricevuto ${c}`}case"invalid_value":return o.values.length===1?`Input non valido: atteso ${we(o.values[0])}`:`Opzione non valida: atteso uno tra ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Troppo grande: ${o.origin??"valore"} deve avere ${i}${o.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${o.origin??"valore"} deve essere ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Troppo piccolo: ${o.origin} deve avere ${i}${o.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${o.origin} deve essere ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??o.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${o.divisor}`;case"unrecognized_keys":return`Chiav${o.keys.length>1?"i":"e"} non riconosciut${o.keys.length>1?"e":"a"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${o.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${o.origin}`;default:return"Input non valido"}}}});function yLe(){return{localeError:XDt()}}var XDt,SLe=O(()=>{A();Et();XDt=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(o){return e[o]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${o.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return o.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${we(o.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${ce(o.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let i=o.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(o.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${o.origin??"\u5024"}\u306F${o.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let i=o.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(o.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${o.origin}\u306F${o.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${o.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${o.keys.length>1?"\u7FA4":""}: ${ce(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${o.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}}});function TLe(){return{localeError:e1t()}}var e1t,ILe=O(()=>{A();Et();e1t=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(o){return e[o]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${o.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return o.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${we(o.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${ce(o.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${o.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${o.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${o.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${o.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}}});function F6(){return{localeError:t1t()}}var t1t,Eee=O(()=>{A();Et();t1t=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(o){return e[o]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${o.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return o.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${we(o.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o.origin} ${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${o.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${ce(o.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${o.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}}});function bLe(){return F6()}var CLe=O(()=>{A();Eee()});function vLe(){return{localeError:n1t()}}var n1t,RLe=O(()=>{A();Et();n1t=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(o){return e[o]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${o.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return o.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${we(o.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${ce(o.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let i=o.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(o.origin),l=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()}${l} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${o.maximum.toString()} ${i}${s}`}case"too_small":{let i=o.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=t(o.origin),l=c?.unit??"\uC694\uC18C";return c?`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()}${l} ${i}${s}`:`${o.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${o.minimum.toString()} ${i}${s}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??o.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${o.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${ce(o.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${o.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${o.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}}});function xLe(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}function DLe(){return{localeError:r1t()}}var ow,r1t,BLe=O(()=>{A();Et();ow=e=>e.charAt(0).toUpperCase()+e.slice(1);r1t=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(o,i,s,c){let l=e[o]??null;return l===null?l:{unit:l.unit[i],verb:l.verb[c][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${o.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${i}`}case"invalid_value":return o.values.length===1?`Privalo b\u016Bti ${we(o.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${ce(o.values,"|")} pasirinkim\u0173`;case"too_big":{let i=r[o.origin]??o.origin,s=t(o.origin,xLe(Number(o.maximum)),o.inclusive??!1,"smaller");if(s?.verb)return`${ow(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.maximum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${ow(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.maximum.toString()} ${s?.unit}`}case"too_small":{let i=r[o.origin]??o.origin,s=t(o.origin,xLe(Number(o.minimum)),o.inclusive??!1,"bigger");if(s?.verb)return`${ow(i??o.origin??"reik\u0161m\u0117")} ${s.verb} ${o.minimum.toString()} ${s.unit??"element\u0173"}`;let c=o.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${ow(i??o.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${o.minimum.toString()} ${s?.unit}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??o.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${o.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${o.keys.length>1?"i":"as"} rakt${o.keys.length>1?"ai":"as"}: ${ce(o.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let i=r[o.origin]??o.origin;return`${ow(i??o.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}}});function NLe(){return{localeError:o1t()}}var o1t,OLe=O(()=>{A();Et();o1t=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(o){return e[o]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${o.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${we(o.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${o.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${o.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${o.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}}});function wLe(){return{localeError:i1t()}}var i1t,kLe=O(()=>{A();Et();i1t=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(o){return e[o]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Input tidak sah: dijangka instanceof ${o.expected}, diterima ${c}`:`Input tidak sah: dijangka ${i}, diterima ${c}`}case"invalid_value":return o.values.length===1?`Input tidak sah: dijangka ${we(o.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Terlalu besar: dijangka ${o.origin??"nilai"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${o.origin??"nilai"} adalah ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Terlalu kecil: dijangka ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${o.origin} adalah ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??o.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${o.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${ce(o.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${o.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${o.origin}`;default:return"Input tidak sah"}}}});function PLe(){return{localeError:s1t()}}var s1t,MLe=O(()=>{A();Et();s1t=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(o){return e[o]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ongeldige invoer: verwacht instanceof ${o.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${i}, ontving ${c}`}case"invalid_value":return o.values.length===1?`Ongeldige invoer: verwacht ${we(o.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin),c=o.origin==="date"?"laat":o.origin==="string"?"lang":"groot";return s?`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin??"waarde"} ${i}${o.maximum.toString()} is`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin),c=o.origin==="date"?"vroeg":o.origin==="string"?"kort":"klein";return s?`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${c}: verwacht dat ${o.origin} ${i}${o.minimum.toString()} is`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??o.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${o.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${o.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${o.origin}`;default:return"Ongeldige invoer"}}}});function LLe(){return{localeError:a1t()}}var a1t,ULe=O(()=>{A();Et();a1t=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(o){return e[o]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ugyldig input: forventet instanceof ${o.expected}, fikk ${c}`:`Ugyldig input: forventet ${i}, fikk ${c}`}case"invalid_value":return o.values.length===1?`Ugyldig verdi: forventet ${we(o.values[0])}`:`Ugyldig valg: forventet en av ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${o.origin??"value"} til \xE5 ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${o.origin} til \xE5 ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??o.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${o.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${o.origin}`;default:return"Ugyldig input"}}}});function QLe(){return{localeError:u1t()}}var u1t,FLe=O(()=>{A();Et();u1t=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(o){return e[o]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`F\xE2sit giren: umulan instanceof ${o.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${c}`}case"invalid_value":return o.values.length===1?`F\xE2sit giren: umulan ${we(o.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${o.origin??"value"}, ${i}${o.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${o.origin}, ${i}${o.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let i=o;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??o.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${o.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${o.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}}});function GLe(){return{localeError:c1t()}}var c1t,zLe=O(()=>{A();Et();c1t=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(o){return e[o]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${o.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return o.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${we(o.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${ce(o.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${o.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${o.maximum.toString()} \u0648\u064A`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${o.origin} \u0628\u0627\u06CC\u062F ${i}${o.minimum.toString()} \u0648\u064A`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??o.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${o.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${o.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${o.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${o.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}}});function jLe(){return{localeError:l1t()}}var l1t,HLe=O(()=>{A();Et();l1t=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(o){return e[o]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${o.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${c}`}case"invalid_value":return o.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${we(o.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${o.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${o.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??o.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${o.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${o.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${o.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}}});function $Le(){return{localeError:d1t()}}var d1t,qLe=O(()=>{A();Et();d1t=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(o){return e[o]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Tipo inv\xE1lido: esperado instanceof ${o.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${c}`}case"invalid_value":return o.values.length===1?`Entrada inv\xE1lida: esperado ${we(o.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Muito grande: esperado que ${o.origin??"valor"} tivesse ${i}${o.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${o.origin??"valor"} fosse ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Muito pequeno: esperado que ${o.origin} tivesse ${i}${o.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${o.origin} fosse ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??o.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${o.divisor}`;case"unrecognized_keys":return`Chave${o.keys.length>1?"s":""} desconhecida${o.keys.length>1?"s":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${o.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${o.origin}`;default:return"Campo inv\xE1lido"}}}});function VLe(){return{localeError:p1t()}}var p1t,YLe=O(()=>{A();Et();p1t=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(o){return e[o]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},r={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${c}`}case"invalid_value":return o.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${we(o.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${o.origin??"valoarea"} s\u0103 fie ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Prea mic: a\u0219teptat ca ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${o.origin} s\u0103 fie ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??o.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${o.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${ce(o.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${o.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${o.origin}`;default:return"Intrare invalid\u0103"}}}});function KLe(e,t,n,r){let o=Math.abs(e),i=o%10,s=o%100;return s>=11&&s<=19?r:i===1?t:i>=2&&i<=4?n:r}function JLe(){return{localeError:f1t()}}var f1t,ZLe=O(()=>{A();Et();f1t=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${o.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${we(o.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);if(s){let c=Number(o.maximum),l=KLe(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.maximum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);if(s){let c=Number(o.minimum),l=KLe(c,s.unit.one,s.unit.few,s.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${o.minimum.toString()} ${l}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${o.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${o.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0438":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${o.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}}});function WLe(){return{localeError:m1t()}}var m1t,XLe=O(()=>{A();Et();m1t=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(o){return e[o]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${o.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${c}`}case"invalid_value":return o.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${we(o.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} imelo ${i}${o.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${o.origin??"vrednost"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${o.origin} imelo ${i}${o.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??o.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${o.divisor}`;case"unrecognized_keys":return`Neprepoznan${o.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${o.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${o.origin}`;default:return"Neveljaven vnos"}}}});function eUe(){return{localeError:A1t()}}var A1t,tUe=O(()=>{A();Et();A1t=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(o){return e[o]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${o.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${c}`}case"invalid_value":return o.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${we(o.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${o.origin??"v\xE4rdet"} att ha ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${o.origin??"v\xE4rdet"} att ha ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??o.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${ce(o.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${o.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${o.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}}});function nUe(){return{localeError:g1t()}}var g1t,rUe=O(()=>{A();Et();g1t=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(o){return e[o]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${o.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return o.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${we(o.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${ce(o.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${o.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o.origin} ${i}${o.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${o.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${o.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${o.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}}});function oUe(){return{localeError:h1t()}}var h1t,iUe=O(()=>{A();Et();h1t=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(o){return e[o]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${o.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return o.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${we(o.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(o.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${o.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??o.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${o.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${ce(o.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${o.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}}});function sUe(){return{localeError:_1t()}}var _1t,aUe=O(()=>{A();Et();_1t=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(o){return e[o]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${o.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${c}`}case"invalid_value":return o.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${we(o.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${o.origin??"de\u011Fer"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??o.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${o.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${o.keys.length>1?"lar":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${o.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}}});function G6(){return{localeError:E1t()}}var E1t,yee=O(()=>{A();Et();E1t=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(o){return e[o]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${o.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return o.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${we(o.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${o.origin} \u0431\u0443\u0434\u0435 ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${o.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${o.keys.length>1?"\u0456":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${o.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${o.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}}});function uUe(){return G6()}var cUe=O(()=>{A();yee()});function lUe(){return{localeError:y1t()}}var y1t,dUe=O(()=>{A();Et();y1t=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(o){return e[o]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${o.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return o.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${we(o.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${ce(o.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${o.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${o.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${o.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u06D2 ${i}${o.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${o.origin} \u06A9\u0627 ${i}${o.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${o.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${o.keys.length>1?"\u0632":""}: ${ce(o.keys,"\u060C ")}`;case"invalid_key":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${o.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}}});function pUe(){return{localeError:S1t()}}var S1t,fUe=O(()=>{A();Et();S1t=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(o){return e[o]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${o.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${c}`}case"invalid_value":return o.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${we(o.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${o.origin??"qiymat"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??o.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${o.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${o.keys.length>1?"lar":""}: ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${o.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}}});function mUe(){return{localeError:T1t()}}var T1t,AUe=O(()=>{A();Et();T1t=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(o){return e[o]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${o.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return o.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${we(o.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${o.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${o.origin??"gi\xE1 tr\u1ECB"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${s.verb} ${i}${o.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??o.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${o.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${ce(o.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${o.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}}});function gUe(){return{localeError:I1t()}}var I1t,hUe=O(()=>{A();Et();I1t=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(o){return e[o]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${o.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return o.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${we(o.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${o.origin??"\u503C"} ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${o.origin} ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??o.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${o.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${ce(o.keys,", ")}`;case"invalid_key":return`${o.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${o.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}}});function _Ue(){return{localeError:b1t()}}var b1t,EUe=O(()=>{A();Et();b1t=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(o){return e[o]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${o.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return o.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${we(o.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${o.origin??"\u503C"} \u61C9\u70BA ${i}${o.maximum.toString()}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${o.origin} \u61C9\u70BA ${i}${o.minimum.toString()}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??o.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${o.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${o.keys.length>1?"\u5011":""}\uFF1A${ce(o.keys,"\u3001")}`;case"invalid_key":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${o.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}}});function yUe(){return{localeError:C1t()}}var C1t,SUe=O(()=>{A();Et();C1t=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(o){return e[o]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return o=>{switch(o.code){case"invalid_type":{let i=r[o.expected]??o.expected,s=ke(o.input),c=r[s]??s;return/^[A-Z]/.test(o.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${o.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return o.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${we(o.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${ce(o.values,"|")}`;case"too_big":{let i=o.inclusive?"<=":"<",s=t(o.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin??"iye"} ${s.verb} ${i}${o.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.maximum}`}case"too_small":{let i=o.inclusive?">=":">",s=t(o.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${o.origin} ${s.verb} ${i}${o.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${o.minimum}`}case"invalid_format":{let i=o;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??o.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${o.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${ce(o.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${o.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}}});var iw={};$s(iw,{ar:()=>xMe,az:()=>BMe,be:()=>wMe,bg:()=>PMe,ca:()=>LMe,cs:()=>QMe,da:()=>GMe,de:()=>jMe,el:()=>$Me,en:()=>Q6,eo:()=>VMe,es:()=>KMe,fa:()=>ZMe,fi:()=>XMe,fr:()=>tLe,frCA:()=>rLe,he:()=>iLe,hr:()=>aLe,hu:()=>cLe,hy:()=>pLe,id:()=>mLe,is:()=>gLe,it:()=>_Le,ja:()=>yLe,ka:()=>TLe,kh:()=>bLe,km:()=>F6,ko:()=>vLe,lt:()=>DLe,mk:()=>NLe,ms:()=>wLe,nl:()=>PLe,no:()=>LLe,ota:()=>QLe,pl:()=>jLe,ps:()=>GLe,pt:()=>$Le,ro:()=>VLe,ru:()=>JLe,sl:()=>WLe,sv:()=>eUe,ta:()=>nUe,th:()=>oUe,tr:()=>sUe,ua:()=>uUe,uk:()=>G6,ur:()=>lUe,uz:()=>pUe,vi:()=>mUe,yo:()=>yUe,zhCN:()=>gUe,zhTW:()=>_Ue});var See=O(()=>{A();DMe();NMe();kMe();MMe();UMe();FMe();zMe();HMe();qMe();_ee();YMe();JMe();WMe();eLe();nLe();oLe();sLe();uLe();lLe();fLe();ALe();hLe();ELe();SLe();ILe();CLe();Eee();RLe();BLe();OLe();kLe();MLe();ULe();FLe();zLe();HLe();qLe();YLe();ZLe();XLe();tUe();rUe();iUe();aUe();cUe();yee();dUe();fUe();AUe();hUe();EUe();SUe()});function j6(){return new z6}var TUe,Tee,Iee,z6,ka,sw=O(()=>{A();Tee=Symbol("ZodOutput"),Iee=Symbol("ZodInput"),z6=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let o={...r,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};(TUe=globalThis).__zod_globalRegistry??(TUe.__zod_globalRegistry=j6());ka=globalThis.__zod_globalRegistry});function bee(e,t){return new e({type:"string",...He(t)})}function Cee(e,t){return new e({type:"string",coerce:!0,...He(t)})}function H6(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...He(t)})}function aw(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...He(t)})}function $6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...He(t)})}function q6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...He(t)})}function V6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...He(t)})}function Y6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...He(t)})}function uw(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...He(t)})}function K6(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...He(t)})}function J6(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...He(t)})}function Z6(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...He(t)})}function W6(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...He(t)})}function X6(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...He(t)})}function eG(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...He(t)})}function tG(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...He(t)})}function nG(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...He(t)})}function rG(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...He(t)})}function vee(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...He(t)})}function oG(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...He(t)})}function iG(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...He(t)})}function sG(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...He(t)})}function aG(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...He(t)})}function uG(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...He(t)})}function cG(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...He(t)})}function xee(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...He(t)})}function Dee(e,t){return new e({type:"string",format:"date",check:"string_format",...He(t)})}function Bee(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...He(t)})}function Nee(e,t){return new e({type:"string",format:"duration",check:"string_format",...He(t)})}function Oee(e,t){return new e({type:"number",checks:[],...He(t)})}function wee(e,t){return new e({type:"number",coerce:!0,checks:[],...He(t)})}function kee(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...He(t)})}function Pee(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...He(t)})}function Mee(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...He(t)})}function Lee(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...He(t)})}function Uee(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...He(t)})}function Qee(e,t){return new e({type:"boolean",...He(t)})}function Fee(e,t){return new e({type:"boolean",coerce:!0,...He(t)})}function Gee(e,t){return new e({type:"bigint",...He(t)})}function zee(e,t){return new e({type:"bigint",coerce:!0,...He(t)})}function jee(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...He(t)})}function Hee(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...He(t)})}function $ee(e,t){return new e({type:"symbol",...He(t)})}function qee(e,t){return new e({type:"undefined",...He(t)})}function Vee(e,t){return new e({type:"null",...He(t)})}function Yee(e){return new e({type:"any"})}function Kee(e){return new e({type:"unknown"})}function Jee(e,t){return new e({type:"never",...He(t)})}function Zee(e,t){return new e({type:"void",...He(t)})}function Wee(e,t){return new e({type:"date",...He(t)})}function Xee(e,t){return new e({type:"date",coerce:!0,...He(t)})}function ete(e,t){return new e({type:"nan",...He(t)})}function Zm(e,t){return new R6({check:"less_than",...He(t),value:e,inclusive:!1})}function Kl(e,t){return new R6({check:"less_than",...He(t),value:e,inclusive:!0})}function Wm(e,t){return new x6({check:"greater_than",...He(t),value:e,inclusive:!1})}function ec(e,t){return new x6({check:"greater_than",...He(t),value:e,inclusive:!0})}function lG(e){return Wm(0,e)}function dG(e){return Zm(0,e)}function pG(e){return Kl(0,e)}function fG(e){return ec(0,e)}function BE(e,t){return new FW({check:"multiple_of",...He(t),value:e})}function NE(e,t){return new jW({check:"max_size",...He(t),maximum:e})}function Xm(e,t){return new HW({check:"min_size",...He(t),minimum:e})}function ZS(e,t){return new $W({check:"size_equals",...He(t),size:e})}function WS(e,t){return new qW({check:"max_length",...He(t),maximum:e})}function Vg(e,t){return new VW({check:"min_length",...He(t),minimum:e})}function XS(e,t){return new YW({check:"length_equals",...He(t),length:e})}function LR(e,t){return new KW({check:"string_format",format:"regex",...He(t),pattern:e})}function UR(e){return new JW({check:"string_format",format:"lowercase",...He(e)})}function QR(e){return new ZW({check:"string_format",format:"uppercase",...He(e)})}function FR(e,t){return new WW({check:"string_format",format:"includes",...He(t),includes:e})}function GR(e,t){return new XW({check:"string_format",format:"starts_with",...He(t),prefix:e})}function zR(e,t){return new eX({check:"string_format",format:"ends_with",...He(t),suffix:e})}function mG(e,t,n){return new tX({check:"property",property:e,schema:t,...He(n)})}function jR(e,t){return new nX({check:"mime_type",mime:e,...He(t)})}function If(e){return new rX({check:"overwrite",tx:e})}function HR(e){return If(t=>t.normalize(e))}function $R(){return If(e=>e.trim())}function qR(){return If(e=>e.toLowerCase())}function VR(){return If(e=>e.toUpperCase())}function YR(){return If(e=>ZZ(e))}function tte(e,t,n){return new e({type:"array",element:t,...He(n)})}function R1t(e,t,n){return new e({type:"union",options:t,...He(n)})}function x1t(e,t,n){return new e({type:"union",options:t,inclusive:!1,...He(n)})}function D1t(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...He(r)})}function B1t(e,t,n){return new e({type:"intersection",left:t,right:n})}function N1t(e,t,n,r){let o=n instanceof sn,i=o?r:n,s=o?n:null;return new e({type:"tuple",items:t,rest:s,...He(i)})}function O1t(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...He(r)})}function w1t(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...He(r)})}function k1t(e,t,n){return new e({type:"set",valueType:t,...He(n)})}function P1t(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(o=>[o,o])):t;return new e({type:"enum",entries:r,...He(n)})}function M1t(e,t,n){return new e({type:"enum",entries:t,...He(n)})}function L1t(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...He(n)})}function nte(e,t){return new e({type:"file",...He(t)})}function U1t(e,t){return new e({type:"transform",transform:t})}function Q1t(e,t){return new e({type:"optional",innerType:t})}function F1t(e,t){return new e({type:"nullable",innerType:t})}function G1t(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():XZ(n)}})}function z1t(e,t,n){return new e({type:"nonoptional",innerType:t,...He(n)})}function j1t(e,t){return new e({type:"success",innerType:t})}function H1t(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function $1t(e,t,n){return new e({type:"pipe",in:t,out:n})}function q1t(e,t){return new e({type:"readonly",innerType:t})}function V1t(e,t,n){return new e({type:"template_literal",parts:t,...He(n)})}function Y1t(e,t){return new e({type:"lazy",getter:t})}function K1t(e,t){return new e({type:"promise",innerType:t})}function rte(e,t,n){let r=He(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function ote(e,t,n){return new e({type:"custom",check:"custom",fn:t,...He(n)})}function ite(e,t){let n=IUe(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(BR(o,r.value,n._zod.def));else{let i=o;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=r.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),r.issues.push(BR(i))}},e(r.value,r)),t);return n}function IUe(e,t){let n=new Wr({check:"custom",...He(t)});return n._zod.check=e,n}function ste(e){let t=new Wr({check:"describe"});return t._zod.onattach=[n=>{let r=ka.get(n)??{};ka.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function ate(e){let t=new Wr({check:"meta"});return t._zod.onattach=[n=>{let r=ka.get(n)??{};ka.add(n,{...r,...e})}],t._zod.check=()=>{},t}function ute(e,t){let n=He(t),r=n.truthy??["true","1","yes","on","y","enabled"],o=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(b=>typeof b=="string"?b.toLowerCase():b),o=o.map(b=>typeof b=="string"?b.toLowerCase():b));let i=new Set(r),s=new Set(o),c=e.Codec??rw,l=e.Boolean??tw,f=e.String??JS,h=new f({type:"string",error:n.error}),y=new l({type:"boolean",error:n.error}),S=new c({type:"pipe",in:h,out:y,transform:((b,v)=>{let x=b;return n.case!=="sensitive"&&(x=x.toLowerCase()),i.has(x)?!0:s.has(x)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:v.value,inst:S,continue:!1}),{})}),reverseTransform:((b,v)=>b===!0?r[0]||"true":o[0]||"false"),error:n.error});return S}function KR(e,t,n,r={}){let o=He(r),i={...He(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:c=>n.test(c),...o};return n instanceof RegExp&&(i.pattern=n),new e(i)}var Ree,bUe=O(()=>{A();D6();sw();hee();Et();Ree={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}});function OE(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??ka,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Nr(e,t,n={path:[],schemaPath:[]}){var r;let o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let c=e._zod.toJSONSchema?.();if(c)s.schema=c;else{let h={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,h);else{let S=s.schema,b=t.processors[o.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);b(e,t,S,h)}let y=e._zod.parent;y&&(s.ref||(s.ref=y),Nr(y,t,h),t.seen.get(y).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(s.schema,l),t.io==="input"&&tc(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function wE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let s of e.seen.entries()){let c=e.metadataRegistry.get(s[0])?.id;if(c){let l=r.get(c);if(l&&l!==s[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(c,s[0])}}let o=s=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let y=e.external.registry.get(s[0])?.id,S=e.external.uri??(v=>v);if(y)return{ref:S(y)};let b=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=b,{defId:b,ref:`${S("__shared")}#/${c}/${b}`}}if(s[1]===n)return{ref:"#"};let f=`#/${c}/`,h=s[1].schema.id??`__schema${e.counter++}`;return{defId:h,ref:f+h}},i=s=>{if(s[1].schema.$ref)return;let c=s[1],{ref:l,defId:f}=o(s);c.def={...c.schema},f&&(c.defId=f);let h=c.schema;for(let y in h)delete h[y];h.$ref=l};if(e.cycles==="throw")for(let s of e.seen.entries()){let c=s[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
103
103
 
104
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function kE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=c=>{let l=e.seen.get(c);if(l.ref===null)return;let f=l.def??l.schema,h={...f},y=l.ref;if(l.ref=null,y){r(y);let b=e.seen.get(y),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),c._zod.parent===y)for(let D in f)D==="$ref"||D==="allOf"||D in h||delete f[D];if(v.$ref&&b.def)for(let D in f)D==="$ref"||D==="allOf"||D in b.def&&JSON.stringify(f[D])===JSON.stringify(b.def[D])&&delete f[D]}let S=c._zod.parent;if(S&&S!==y){r(S);let b=e.seen.get(S);if(b?.schema.$ref&&(f.$ref=b.schema.$ref,b.def))for(let v in f)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(f[v])===JSON.stringify(b.def[v])&&delete f[v]}e.override({zodSchema:c,jsonSchema:f,path:l.path??[]})};for(let c of[...e.seen.entries()].reverse())r(c[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Object.assign(o,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let l=c[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:JR(t,"input",e.processors),output:JR(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function tc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return tc(r.element,n);if(r.type==="set")return tc(r.valueType,n);if(r.type==="lazy")return tc(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return tc(r.innerType,n);if(r.type==="intersection")return tc(r.left,n)||tc(r.right,n);if(r.type==="record"||r.type==="map")return tc(r.keyType,n)||tc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:tc(r.in,n)||tc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(tc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(tc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(tc(o,n))return!0;return!!(r.rest&&tc(r.rest,n))}return!1}var cte,JR,cw=O(()=>{A();sw();cte=(e,t={})=>n=>{let r=OE({...n,processors:t});return Nr(e,r),wE(r,e),kE(r,e)},JR=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=OE({...o??{},target:i,io:t,processors:n});return Nr(e,s),wE(s,e),kE(s,e)}});function _G(e,t){if("_idmap"in e){let r=e,o=OE({...t,processors:AG}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Nr(h,o)}let s={},c={registry:r,uri:t?.uri,defs:i};o.external=c;for(let l of r._idmap.entries()){let[f,h]=l;wE(o,h),s[f]=kE(o,h)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=OE({...t,processors:AG});return Nr(e,n),wE(n,e),kE(n,e)}var J1t,lte,dte,pte,fte,mte,Ate,gte,hte,_te,Ete,yte,Ste,Tte,Ite,bte,Cte,vte,Rte,xte,Dte,Bte,Nte,Ote,wte,kte,gG,Pte,Mte,Lte,Ute,Qte,Fte,Gte,zte,jte,Hte,$te,hG,qte,AG,lw=O(()=>{A();cw();Et();J1t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lte=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:c,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=J1t[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),l&&l.size>0){let h=[...l];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},dte=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:c,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";let y=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),S=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),b=t.target==="draft-04"||t.target==="openapi-3.0";y?b?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),S?b?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},pte=(e,t,n,r)=>{n.type="boolean"},fte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},mte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ate=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},hte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},_te=(e,t,n,r)=>{n.not={}},Ete=(e,t,n,r)=>{},yte=(e,t,n,r)=>{},Ste=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Tte=(e,t,n,r)=>{let o=e._zod.def,i=HO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Ite=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},bte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Cte=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},vte=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),l?l.length===1?(i.contentMediaType=l[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=l.map(f=>({contentMediaType:f}))):Object.assign(o,i)},Rte=(e,t,n,r)=>{n.type="boolean"},xte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Dte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Bte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Nte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Ote=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},wte=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=Nr(i.element,t,{...r,path:[...r.path,"items"]})},kte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let f in s)o.properties[f]=Nr(s[f],t,{...r,path:[...r.path,"properties",f]});let c=new Set(Object.keys(s)),l=new Set([...c].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));l.size>0&&(o.required=Array.from(l)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Nr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},gG=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,l)=>Nr(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},Pte=(e,t,n,r)=>{let o=e._zod.def,i=Nr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Nr(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,l=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];n.allOf=l},Mte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((S,b)=>Nr(S,t,{...r,path:[...r.path,s,b]})),f=i.rest?Nr(i.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=l,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:l},f&&o.items.anyOf.push(f),o.minItems=l.length,f||(o.maxItems=l.length)):(o.items=l,f&&(o.additionalItems=f));let{minimum:h,maximum:y}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof y=="number"&&(o.maxItems=y)},Lte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let h=Nr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let y of l)o.patternProperties[y.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Nr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Nr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(y=>typeof y=="string"||typeof y=="number");h.length>0&&(o.required=h)}},Ute=(e,t,n,r)=>{let o=e._zod.def,i=Nr(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Qte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Fte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Gte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},zte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},jte=(e,t,n,r)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;Nr(s,t,r);let c=t.seen.get(e);c.ref=s},Hte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},$te=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hG=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},qte=(e,t,n,r)=>{let o=e._zod.innerType;Nr(o,t,r);let i=t.seen.get(e);i.ref=o},AG={string:lte,number:dte,boolean:pte,bigint:fte,symbol:mte,null:Ate,undefined:gte,void:hte,never:_te,any:Ete,unknown:yte,date:Ste,enum:Tte,literal:Ite,nan:bte,template_literal:Cte,file:vte,success:Rte,custom:xte,function:Dte,transform:Bte,map:Nte,set:Ote,array:wte,object:kte,union:gG,intersection:Pte,tuple:Mte,record:Lte,nullable:Ute,nonoptional:Qte,default:Fte,prefault:Gte,catch:zte,pipe:jte,readonly:Hte,promise:$te,optional:hG,lazy:qte}});var EG,CUe=O(()=>{A();lw();cw();EG=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=OE({processors:AG,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Nr(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),wE(this.ctx,t);let r=kE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var vUe={};var RUe=O(()=>{A()});var Yg={};$s(Yg,{$ZodAny:()=>QX,$ZodArray:()=>HX,$ZodAsyncError:()=>Tf,$ZodBase64:()=>DX,$ZodBase64URL:()=>BX,$ZodBigInt:()=>P6,$ZodBigIntFormat:()=>PX,$ZodBoolean:()=>tw,$ZodCIDRv4:()=>vX,$ZodCIDRv6:()=>RX,$ZodCUID:()=>mX,$ZodCUID2:()=>AX,$ZodCatch:()=>uee,$ZodCheck:()=>Wr,$ZodCheckBigIntFormat:()=>zW,$ZodCheckEndsWith:()=>eX,$ZodCheckGreaterThan:()=>x6,$ZodCheckIncludes:()=>WW,$ZodCheckLengthEquals:()=>YW,$ZodCheckLessThan:()=>R6,$ZodCheckLowerCase:()=>JW,$ZodCheckMaxLength:()=>qW,$ZodCheckMaxSize:()=>jW,$ZodCheckMimeType:()=>nX,$ZodCheckMinLength:()=>VW,$ZodCheckMinSize:()=>HW,$ZodCheckMultipleOf:()=>FW,$ZodCheckNumberFormat:()=>GW,$ZodCheckOverwrite:()=>rX,$ZodCheckProperty:()=>tX,$ZodCheckRegex:()=>KW,$ZodCheckSizeEquals:()=>$W,$ZodCheckStartsWith:()=>XW,$ZodCheckStringFormat:()=>PR,$ZodCheckUpperCase:()=>ZW,$ZodCodec:()=>rw,$ZodCustom:()=>gee,$ZodCustomStringFormat:()=>wX,$ZodDate:()=>jX,$ZodDefault:()=>oee,$ZodDiscriminatedUnion:()=>VX,$ZodE164:()=>NX,$ZodEmail:()=>lX,$ZodEmoji:()=>pX,$ZodEncodeError:()=>CE,$ZodEnum:()=>WX,$ZodError:()=>KO,$ZodExactOptional:()=>nee,$ZodFile:()=>eee,$ZodFunction:()=>fee,$ZodGUID:()=>uX,$ZodIPv4:()=>IX,$ZodIPv6:()=>bX,$ZodISODate:()=>yX,$ZodISODateTime:()=>EX,$ZodISODuration:()=>TX,$ZodISOTime:()=>SX,$ZodIntersection:()=>YX,$ZodJWT:()=>OX,$ZodKSUID:()=>_X,$ZodLazy:()=>Aee,$ZodLiteral:()=>XX,$ZodMAC:()=>CX,$ZodMap:()=>JX,$ZodNaN:()=>cee,$ZodNanoID:()=>fX,$ZodNever:()=>GX,$ZodNonOptional:()=>see,$ZodNull:()=>UX,$ZodNullable:()=>ree,$ZodNumber:()=>k6,$ZodNumberFormat:()=>kX,$ZodObject:()=>RMe,$ZodObjectJIT:()=>$X,$ZodOptional:()=>L6,$ZodPipe:()=>U6,$ZodPrefault:()=>iee,$ZodPreprocess:()=>lee,$ZodPromise:()=>mee,$ZodReadonly:()=>dee,$ZodRealError:()=>Yc,$ZodRecord:()=>KX,$ZodRegistry:()=>z6,$ZodSet:()=>ZX,$ZodString:()=>JS,$ZodStringFormat:()=>$r,$ZodSuccess:()=>aee,$ZodSymbol:()=>MX,$ZodTemplateLiteral:()=>pee,$ZodTransform:()=>tee,$ZodTuple:()=>M6,$ZodType:()=>sn,$ZodULID:()=>gX,$ZodURL:()=>dX,$ZodUUID:()=>cX,$ZodUndefined:()=>LX,$ZodUnion:()=>nw,$ZodUnknown:()=>FX,$ZodVoid:()=>zX,$ZodXID:()=>hX,$ZodXor:()=>qX,$brand:()=>VZ,$constructor:()=>re,$input:()=>Iee,$output:()=>Tee,Doc:()=>ew,JSONSchema:()=>vUe,JSONSchemaGenerator:()=>EG,NEVER:()=>qZ,TimePrecision:()=>Ree,_any:()=>Yee,_array:()=>tte,_base64:()=>sG,_base64url:()=>aG,_bigint:()=>Gee,_boolean:()=>Qee,_catch:()=>H1t,_check:()=>IUe,_cidrv4:()=>oG,_cidrv6:()=>iG,_coercedBigint:()=>zee,_coercedBoolean:()=>Fee,_coercedDate:()=>Xee,_coercedNumber:()=>wee,_coercedString:()=>Cee,_cuid:()=>Z6,_cuid2:()=>W6,_custom:()=>rte,_date:()=>Wee,_decode:()=>h6,_decodeAsync:()=>E6,_default:()=>G1t,_discriminatedUnion:()=>D1t,_e164:()=>uG,_email:()=>H6,_emoji:()=>K6,_encode:()=>g6,_encodeAsync:()=>_6,_endsWith:()=>zR,_enum:()=>P1t,_file:()=>nte,_float32:()=>Pee,_float64:()=>Mee,_gt:()=>Wm,_gte:()=>ec,_guid:()=>aw,_includes:()=>FR,_int:()=>kee,_int32:()=>Lee,_int64:()=>jee,_intersection:()=>B1t,_ipv4:()=>nG,_ipv6:()=>rG,_isoDate:()=>Dee,_isoDateTime:()=>xee,_isoDuration:()=>Nee,_isoTime:()=>Bee,_jwt:()=>cG,_ksuid:()=>tG,_lazy:()=>Y1t,_length:()=>XS,_literal:()=>L1t,_lowercase:()=>UR,_lt:()=>Zm,_lte:()=>Kl,_mac:()=>vee,_map:()=>w1t,_max:()=>Kl,_maxLength:()=>WS,_maxSize:()=>NE,_mime:()=>jR,_min:()=>ec,_minLength:()=>Vg,_minSize:()=>Xm,_multipleOf:()=>BE,_nan:()=>ete,_nanoid:()=>J6,_nativeEnum:()=>M1t,_negative:()=>dG,_never:()=>Jee,_nonnegative:()=>fG,_nonoptional:()=>z1t,_nonpositive:()=>pG,_normalize:()=>HR,_null:()=>Vee,_nullable:()=>F1t,_number:()=>Oee,_optional:()=>Q1t,_overwrite:()=>If,_parse:()=>NR,_parseAsync:()=>OR,_pipe:()=>$1t,_positive:()=>lG,_promise:()=>K1t,_property:()=>mG,_readonly:()=>q1t,_record:()=>O1t,_refine:()=>ote,_regex:()=>LR,_safeDecode:()=>S6,_safeDecodeAsync:()=>I6,_safeEncode:()=>y6,_safeEncodeAsync:()=>T6,_safeParse:()=>wR,_safeParseAsync:()=>kR,_set:()=>k1t,_size:()=>ZS,_slugify:()=>YR,_startsWith:()=>GR,_string:()=>bee,_stringFormat:()=>KR,_stringbool:()=>ute,_success:()=>j1t,_superRefine:()=>ite,_symbol:()=>$ee,_templateLiteral:()=>V1t,_toLowerCase:()=>qR,_toUpperCase:()=>VR,_transform:()=>U1t,_trim:()=>$R,_tuple:()=>N1t,_uint32:()=>Uee,_uint64:()=>Hee,_ulid:()=>X6,_undefined:()=>qee,_union:()=>R1t,_unknown:()=>Kee,_uppercase:()=>QR,_url:()=>uw,_uuid:()=>$6,_uuidv4:()=>q6,_uuidv6:()=>V6,_uuidv7:()=>Y6,_void:()=>Zee,_xid:()=>eG,_xor:()=>x1t,clone:()=>Wu,config:()=>Ei,createStandardJSONSchemaMethod:()=>JR,createToJSONSchemaMethod:()=>cte,decode:()=>Kxt,decodeAsync:()=>Zxt,describe:()=>ste,encode:()=>Yxt,encodeAsync:()=>Jxt,extractDefs:()=>wE,finalize:()=>kE,flattenError:()=>JO,formatError:()=>ZO,globalConfig:()=>qS,globalRegistry:()=>ka,initializeContext:()=>OE,isValidBase64:()=>xX,isValidBase64URL:()=>IMe,isValidJWT:()=>bMe,locales:()=>iw,meta:()=>ate,parse:()=>m6,parseAsync:()=>A6,prettifyError:()=>sW,process:()=>Nr,regexes:()=>Yl,registry:()=>j6,safeDecode:()=>Xxt,safeDecodeAsync:()=>tDt,safeEncode:()=>Wxt,safeEncodeAsync:()=>eDt,safeParse:()=>uW,safeParseAsync:()=>cW,toDotPath:()=>nMe,toJSONSchema:()=>_G,treeifyError:()=>iW,util:()=>Le,version:()=>iX});var Jl=O(()=>{A();VS();lW();aW();hee();D6();sX();Et();v6();See();sw();oX();bUe();cw();lw();CUe();RUe()});var yG={};$s(yG,{endsWith:()=>zR,gt:()=>Wm,gte:()=>ec,includes:()=>FR,length:()=>XS,lowercase:()=>UR,lt:()=>Zm,lte:()=>Kl,maxLength:()=>WS,maxSize:()=>NE,mime:()=>jR,minLength:()=>Vg,minSize:()=>Xm,multipleOf:()=>BE,negative:()=>dG,nonnegative:()=>fG,nonpositive:()=>pG,normalize:()=>HR,overwrite:()=>If,positive:()=>lG,property:()=>mG,regex:()=>LR,size:()=>ZS,slugify:()=>YR,startsWith:()=>GR,toLowerCase:()=>qR,toUpperCase:()=>VR,trim:()=>$R,uppercase:()=>QR});var SG=O(()=>{A();Jl()});var ZR={};$s(ZR,{ZodISODate:()=>IG,ZodISODateTime:()=>TG,ZodISODuration:()=>CG,ZodISOTime:()=>bG,date:()=>Yte,datetime:()=>Vte,duration:()=>Jte,time:()=>Kte});function Vte(e){return xee(TG,e)}function Yte(e){return Dee(IG,e)}function Kte(e){return Bee(bG,e)}function Jte(e){return Nee(CG,e)}var TG,IG,bG,CG,dw=O(()=>{A();Jl();fw();TG=re("ZodISODateTime",(e,t)=>{EX.init(e,t),qr.init(e,t)});IG=re("ZodISODate",(e,t)=>{yX.init(e,t),qr.init(e,t)});bG=re("ZodISOTime",(e,t)=>{SX.init(e,t),qr.init(e,t)});CG=re("ZodISODuration",(e,t)=>{TX.init(e,t),qr.init(e,t)})});var xUe,W1t,Kc,Zte=O(()=>{A();Jl();Jl();Et();xUe=(e,t)=>{KO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZO(e,n)},flatten:{value:n=>JO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xR,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xR,2)}},isEmpty:{get(){return e.issues.length===0}}})},W1t=re("ZodError",xUe),Kc=re("ZodError",xUe,{Parent:Error})});var Wte,Xte,ene,tne,nne,rne,one,ine,sne,ane,une,cne,lne=O(()=>{A();Jl();Zte();Wte=NR(Kc),Xte=OR(Kc),ene=wR(Kc),tne=kR(Kc),nne=g6(Kc),rne=h6(Kc),one=_6(Kc),ine=E6(Kc),sne=y6(Kc),ane=S6(Kc),une=T6(Kc),cne=I6(Kc)});var pw={};$s(pw,{ZodAny:()=>_ne,ZodArray:()=>Tne,ZodBase64:()=>GG,ZodBase64URL:()=>zG,ZodBigInt:()=>ox,ZodBigIntFormat:()=>$G,ZodBoolean:()=>rx,ZodCIDRv4:()=>QG,ZodCIDRv6:()=>FG,ZodCUID:()=>OG,ZodCUID2:()=>wG,ZodCatch:()=>Hne,ZodCodec:()=>Cw,ZodCustom:()=>vw,ZodCustomStringFormat:()=>tx,ZodDate:()=>yw,ZodDefault:()=>Une,ZodDiscriminatedUnion:()=>bne,ZodE164:()=>jG,ZodEmail:()=>DG,ZodEmoji:()=>BG,ZodEnum:()=>XR,ZodExactOptional:()=>Pne,ZodFile:()=>wne,ZodFunction:()=>ere,ZodGUID:()=>Aw,ZodIPv4:()=>LG,ZodIPv6:()=>UG,ZodIntersection:()=>Cne,ZodJWT:()=>HG,ZodKSUID:()=>MG,ZodLazy:()=>Zne,ZodLiteral:()=>One,ZodMAC:()=>dne,ZodMap:()=>Bne,ZodNaN:()=>qne,ZodNanoID:()=>NG,ZodNever:()=>yne,ZodNonOptional:()=>ZG,ZodNull:()=>gne,ZodNullable:()=>Lne,ZodNumber:()=>nx,ZodNumberFormat:()=>tT,ZodObject:()=>Tw,ZodOptional:()=>JG,ZodPipe:()=>bw,ZodPrefault:()=>Fne,ZodPreprocess:()=>Vne,ZodPromise:()=>Xne,ZodReadonly:()=>Yne,ZodRecord:()=>WR,ZodSet:()=>Nne,ZodString:()=>ex,ZodStringFormat:()=>qr,ZodSuccess:()=>jne,ZodSymbol:()=>mne,ZodTemplateLiteral:()=>Jne,ZodTransform:()=>kne,ZodTuple:()=>Rne,ZodType:()=>Dn,ZodULID:()=>kG,ZodURL:()=>Ew,ZodUUID:()=>eA,ZodUndefined:()=>Ane,ZodUnion:()=>Iw,ZodUnknown:()=>Ene,ZodVoid:()=>Sne,ZodXID:()=>PG,ZodXor:()=>Ine,_ZodString:()=>xG,_default:()=>Qne,_function:()=>MQe,any:()=>fQe,array:()=>Sw,base64:()=>JUe,base64url:()=>ZUe,bigint:()=>uQe,boolean:()=>fne,catch:()=>$ne,check:()=>LQe,cidrv4:()=>YUe,cidrv6:()=>KUe,codec:()=>OQe,cuid:()=>FUe,cuid2:()=>GUe,custom:()=>UQe,date:()=>AQe,describe:()=>QQe,discriminatedUnion:()=>SQe,e164:()=>WUe,email:()=>BUe,emoji:()=>UUe,enum:()=>YG,exactOptional:()=>Mne,file:()=>xQe,float32:()=>oQe,float64:()=>iQe,function:()=>MQe,guid:()=>NUe,hash:()=>rQe,hex:()=>nQe,hostname:()=>tQe,httpUrl:()=>LUe,instanceof:()=>GQe,int:()=>vG,int32:()=>sQe,int64:()=>cQe,intersection:()=>vne,invertCodec:()=>wQe,ipv4:()=>$Ue,ipv6:()=>VUe,json:()=>jQe,jwt:()=>XUe,keyof:()=>gQe,ksuid:()=>HUe,lazy:()=>Wne,literal:()=>RQe,looseObject:()=>EQe,looseRecord:()=>IQe,mac:()=>qUe,map:()=>bQe,meta:()=>FQe,nan:()=>NQe,nanoid:()=>QUe,nativeEnum:()=>vQe,never:()=>qG,nonoptional:()=>zne,null:()=>hne,nullable:()=>hw,nullish:()=>DQe,number:()=>pne,object:()=>hQe,optional:()=>gw,partialRecord:()=>TQe,pipe:()=>RG,prefault:()=>Gne,preprocess:()=>HQe,promise:()=>PQe,readonly:()=>Kne,record:()=>Dne,refine:()=>tre,set:()=>CQe,strictObject:()=>_Qe,string:()=>mw,stringFormat:()=>eQe,stringbool:()=>zQe,success:()=>BQe,superRefine:()=>nre,symbol:()=>dQe,templateLiteral:()=>kQe,transform:()=>KG,tuple:()=>xne,uint32:()=>aQe,uint64:()=>lQe,ulid:()=>zUe,undefined:()=>pQe,union:()=>VG,unknown:()=>eT,url:()=>MUe,uuid:()=>OUe,uuidv4:()=>wUe,uuidv6:()=>kUe,uuidv7:()=>PUe,void:()=>mQe,xid:()=>jUe,xor:()=>yQe});function _w(e,t,n){let r=Object.getPrototypeOf(e),o=DUe.get(r);if(o||(o=new Set,DUe.set(r,o)),!o.has(t)){o.add(t);for(let i in n){let s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}function mw(e){return bee(ex,e)}function BUe(e){return H6(DG,e)}function NUe(e){return aw(Aw,e)}function OUe(e){return $6(eA,e)}function wUe(e){return q6(eA,e)}function kUe(e){return V6(eA,e)}function PUe(e){return Y6(eA,e)}function MUe(e){return uw(Ew,e)}function LUe(e){return uw(Ew,{protocol:Yl.httpProtocol,hostname:Yl.domain,...Le.normalizeParams(e)})}function UUe(e){return K6(BG,e)}function QUe(e){return J6(NG,e)}function FUe(e){return Z6(OG,e)}function GUe(e){return W6(wG,e)}function zUe(e){return X6(kG,e)}function jUe(e){return eG(PG,e)}function HUe(e){return tG(MG,e)}function $Ue(e){return nG(LG,e)}function qUe(e){return vee(dne,e)}function VUe(e){return rG(UG,e)}function YUe(e){return oG(QG,e)}function KUe(e){return iG(FG,e)}function JUe(e){return sG(GG,e)}function ZUe(e){return aG(zG,e)}function WUe(e){return uG(jG,e)}function XUe(e){return cG(HG,e)}function eQe(e,t,n={}){return KR(tx,e,t,n)}function tQe(e){return KR(tx,"hostname",Yl.hostname,e)}function nQe(e){return KR(tx,"hex",Yl.hex,e)}function rQe(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=Yl[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return KR(tx,r,o,t)}function pne(e){return Oee(nx,e)}function vG(e){return kee(tT,e)}function oQe(e){return Pee(tT,e)}function iQe(e){return Mee(tT,e)}function sQe(e){return Lee(tT,e)}function aQe(e){return Uee(tT,e)}function fne(e){return Qee(rx,e)}function uQe(e){return Gee(ox,e)}function cQe(e){return jee($G,e)}function lQe(e){return Hee($G,e)}function dQe(e){return $ee(mne,e)}function pQe(e){return qee(Ane,e)}function hne(e){return Vee(gne,e)}function fQe(){return Yee(_ne)}function eT(){return Kee(Ene)}function qG(e){return Jee(yne,e)}function mQe(e){return Zee(Sne,e)}function AQe(e){return Wee(yw,e)}function Sw(e,t){return tte(Tne,e,t)}function gQe(e){let t=e._zod.def.shape;return YG(Object.keys(t))}function hQe(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new Tw(n)}function _Qe(e,t){return new Tw({type:"object",shape:e,catchall:qG(),...Le.normalizeParams(t)})}function EQe(e,t){return new Tw({type:"object",shape:e,catchall:eT(),...Le.normalizeParams(t)})}function VG(e,t){return new Iw({type:"union",options:e,...Le.normalizeParams(t)})}function yQe(e,t){return new Ine({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function SQe(e,t,n){return new bne({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function vne(e,t){return new Cne({type:"intersection",left:e,right:t})}function xne(e,t,n){let r=t instanceof sn,o=r?n:t,i=r?t:null;return new Rne({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function Dne(e,t,n){return!t||!t._zod?new WR({type:"record",keyType:mw(),valueType:e,...Le.normalizeParams(t)}):new WR({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function TQe(e,t,n){let r=Wu(e);return r._zod.values=void 0,new WR({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function IQe(e,t,n){return new WR({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function bQe(e,t,n){return new Bne({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function CQe(e,t){return new Nne({type:"set",valueType:e,...Le.normalizeParams(t)})}function YG(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new XR({type:"enum",entries:n,...Le.normalizeParams(t)})}function vQe(e,t){return new XR({type:"enum",entries:e,...Le.normalizeParams(t)})}function RQe(e,t){return new One({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function xQe(e){return nte(wne,e)}function KG(e){return new kne({type:"transform",transform:e})}function gw(e){return new JG({type:"optional",innerType:e})}function Mne(e){return new Pne({type:"optional",innerType:e})}function hw(e){return new Lne({type:"nullable",innerType:e})}function DQe(e){return gw(hw(e))}function Qne(e,t){return new Une({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function Gne(e,t){return new Fne({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function zne(e,t){return new ZG({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function BQe(e){return new jne({type:"success",innerType:e})}function $ne(e,t){return new Hne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function NQe(e){return ete(qne,e)}function RG(e,t){return new bw({type:"pipe",in:e,out:t})}function OQe(e,t,n){return new Cw({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function wQe(e){let t=e._zod.def;return new Cw({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Kne(e){return new Yne({type:"readonly",innerType:e})}function kQe(e,t){return new Jne({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function Wne(e){return new Zne({type:"lazy",getter:e})}function PQe(e){return new Xne({type:"promise",innerType:e})}function MQe(e){return new ere({type:"function",input:Array.isArray(e?.input)?xne(e?.input):e?.input??Sw(eT()),output:e?.output??eT()})}function LQe(e){let t=new Wr({check:"custom"});return t._zod.check=e,t}function UQe(e,t){return rte(vw,e??(()=>!0),t)}function tre(e,t={}){return ote(vw,e,t)}function nre(e,t){return ite(e,t)}function GQe(e,t={}){let n=new vw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function jQe(e){let t=Wne(()=>VG([mw(e),pne(),fne(),hne(),Sw(t),Dne(mw(),t)]));return t}function HQe(e,t){return new Vne({type:"pipe",in:KG(e),out:t})}var DUe,Dn,xG,ex,qr,DG,Aw,eA,Ew,BG,NG,OG,wG,kG,PG,MG,LG,dne,UG,QG,FG,GG,zG,jG,HG,tx,nx,tT,rx,ox,$G,mne,Ane,gne,_ne,Ene,yne,Sne,yw,Tne,Tw,Iw,Ine,bne,Cne,Rne,WR,Bne,Nne,XR,One,wne,kne,JG,Pne,Lne,Une,Fne,ZG,jne,Hne,qne,bw,Cw,Vne,Yne,Jne,Zne,Xne,ere,vw,QQe,FQe,zQe,fw=O(()=>{A();Jl();Jl();lw();cw();SG();dw();lne();DUe=new WeakMap;Dn=re("ZodType",(e,t)=>(sn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:JR(e,"input"),output:JR(e,"output")}}),e.toJSONSchema=cte(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Wte(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ene(e,n,r),e.parseAsync=async(n,r)=>Xte(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>tne(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>nne(e,n,r),e.decode=(n,r)=>rne(e,n,r),e.encodeAsync=async(n,r)=>one(e,n,r),e.decodeAsync=async(n,r)=>ine(e,n,r),e.safeEncode=(n,r)=>sne(e,n,r),e.safeDecode=(n,r)=>ane(e,n,r),e.safeEncodeAsync=async(n,r)=>une(e,n,r),e.safeDecodeAsync=async(n,r)=>cne(e,n,r),_w(e,"ZodType",{check(...n){let r=this.def;return this.clone(Le.mergeDefs(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Wu(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(tre(n,r))},superRefine(n,r){return this.check(nre(n,r))},overwrite(n){return this.check(If(n))},optional(){return gw(this)},exactOptional(){return Mne(this)},nullable(){return hw(this)},nullish(){return gw(hw(this))},nonoptional(n){return zne(this,n)},array(){return Sw(this)},or(n){return VG([this,n])},and(n){return vne(this,n)},transform(n){return RG(this,KG(n))},default(n){return Qne(this,n)},prefault(n){return Gne(this,n)},catch(n){return $ne(this,n)},pipe(n){return RG(this,n)},readonly(){return Kne(this)},describe(n){let r=this.clone();return ka.add(r,{description:n}),r},meta(...n){if(n.length===0)return ka.get(this);let r=this.clone();return ka.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return ka.get(e)?.description},configurable:!0}),e)),xG=re("_ZodString",(e,t)=>{JS.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>lte(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_w(e,"_ZodString",{regex(...r){return this.check(LR(...r))},includes(...r){return this.check(FR(...r))},startsWith(...r){return this.check(GR(...r))},endsWith(...r){return this.check(zR(...r))},min(...r){return this.check(Vg(...r))},max(...r){return this.check(WS(...r))},length(...r){return this.check(XS(...r))},nonempty(...r){return this.check(Vg(1,...r))},lowercase(r){return this.check(UR(r))},uppercase(r){return this.check(QR(r))},trim(){return this.check($R())},normalize(...r){return this.check(HR(...r))},toLowerCase(){return this.check(qR())},toUpperCase(){return this.check(VR())},slugify(){return this.check(YR())}})}),ex=re("ZodString",(e,t)=>{JS.init(e,t),xG.init(e,t),e.email=n=>e.check(H6(DG,n)),e.url=n=>e.check(uw(Ew,n)),e.jwt=n=>e.check(cG(HG,n)),e.emoji=n=>e.check(K6(BG,n)),e.guid=n=>e.check(aw(Aw,n)),e.uuid=n=>e.check($6(eA,n)),e.uuidv4=n=>e.check(q6(eA,n)),e.uuidv6=n=>e.check(V6(eA,n)),e.uuidv7=n=>e.check(Y6(eA,n)),e.nanoid=n=>e.check(J6(NG,n)),e.guid=n=>e.check(aw(Aw,n)),e.cuid=n=>e.check(Z6(OG,n)),e.cuid2=n=>e.check(W6(wG,n)),e.ulid=n=>e.check(X6(kG,n)),e.base64=n=>e.check(sG(GG,n)),e.base64url=n=>e.check(aG(zG,n)),e.xid=n=>e.check(eG(PG,n)),e.ksuid=n=>e.check(tG(MG,n)),e.ipv4=n=>e.check(nG(LG,n)),e.ipv6=n=>e.check(rG(UG,n)),e.cidrv4=n=>e.check(oG(QG,n)),e.cidrv6=n=>e.check(iG(FG,n)),e.e164=n=>e.check(uG(jG,n)),e.datetime=n=>e.check(Vte(n)),e.date=n=>e.check(Yte(n)),e.time=n=>e.check(Kte(n)),e.duration=n=>e.check(Jte(n))});qr=re("ZodStringFormat",(e,t)=>{$r.init(e,t),xG.init(e,t)}),DG=re("ZodEmail",(e,t)=>{lX.init(e,t),qr.init(e,t)});Aw=re("ZodGUID",(e,t)=>{uX.init(e,t),qr.init(e,t)});eA=re("ZodUUID",(e,t)=>{cX.init(e,t),qr.init(e,t)});Ew=re("ZodURL",(e,t)=>{dX.init(e,t),qr.init(e,t)});BG=re("ZodEmoji",(e,t)=>{pX.init(e,t),qr.init(e,t)});NG=re("ZodNanoID",(e,t)=>{fX.init(e,t),qr.init(e,t)});OG=re("ZodCUID",(e,t)=>{mX.init(e,t),qr.init(e,t)});wG=re("ZodCUID2",(e,t)=>{AX.init(e,t),qr.init(e,t)});kG=re("ZodULID",(e,t)=>{gX.init(e,t),qr.init(e,t)});PG=re("ZodXID",(e,t)=>{hX.init(e,t),qr.init(e,t)});MG=re("ZodKSUID",(e,t)=>{_X.init(e,t),qr.init(e,t)});LG=re("ZodIPv4",(e,t)=>{IX.init(e,t),qr.init(e,t)});dne=re("ZodMAC",(e,t)=>{CX.init(e,t),qr.init(e,t)});UG=re("ZodIPv6",(e,t)=>{bX.init(e,t),qr.init(e,t)});QG=re("ZodCIDRv4",(e,t)=>{vX.init(e,t),qr.init(e,t)});FG=re("ZodCIDRv6",(e,t)=>{RX.init(e,t),qr.init(e,t)});GG=re("ZodBase64",(e,t)=>{DX.init(e,t),qr.init(e,t)});zG=re("ZodBase64URL",(e,t)=>{BX.init(e,t),qr.init(e,t)});jG=re("ZodE164",(e,t)=>{NX.init(e,t),qr.init(e,t)});HG=re("ZodJWT",(e,t)=>{OX.init(e,t),qr.init(e,t)});tx=re("ZodCustomStringFormat",(e,t)=>{wX.init(e,t),qr.init(e,t)});nx=re("ZodNumber",(e,t)=>{k6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>dte(e,r,o,i),_w(e,"ZodNumber",{gt(r,o){return this.check(Wm(r,o))},gte(r,o){return this.check(ec(r,o))},min(r,o){return this.check(ec(r,o))},lt(r,o){return this.check(Zm(r,o))},lte(r,o){return this.check(Kl(r,o))},max(r,o){return this.check(Kl(r,o))},int(r){return this.check(vG(r))},safe(r){return this.check(vG(r))},positive(r){return this.check(Wm(0,r))},nonnegative(r){return this.check(ec(0,r))},negative(r){return this.check(Zm(0,r))},nonpositive(r){return this.check(Kl(0,r))},multipleOf(r,o){return this.check(BE(r,o))},step(r,o){return this.check(BE(r,o))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});tT=re("ZodNumberFormat",(e,t)=>{kX.init(e,t),nx.init(e,t)});rx=re("ZodBoolean",(e,t)=>{tw.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pte(e,n,r,o)});ox=re("ZodBigInt",(e,t)=>{P6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>fte(e,r,o,i),e.gte=(r,o)=>e.check(ec(r,o)),e.min=(r,o)=>e.check(ec(r,o)),e.gt=(r,o)=>e.check(Wm(r,o)),e.gte=(r,o)=>e.check(ec(r,o)),e.min=(r,o)=>e.check(ec(r,o)),e.lt=(r,o)=>e.check(Zm(r,o)),e.lte=(r,o)=>e.check(Kl(r,o)),e.max=(r,o)=>e.check(Kl(r,o)),e.positive=r=>e.check(Wm(BigInt(0),r)),e.negative=r=>e.check(Zm(BigInt(0),r)),e.nonpositive=r=>e.check(Kl(BigInt(0),r)),e.nonnegative=r=>e.check(ec(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(BE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});$G=re("ZodBigIntFormat",(e,t)=>{PX.init(e,t),ox.init(e,t)});mne=re("ZodSymbol",(e,t)=>{MX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mte(e,n,r,o)});Ane=re("ZodUndefined",(e,t)=>{LX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gte(e,n,r,o)});gne=re("ZodNull",(e,t)=>{UX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ate(e,n,r,o)});_ne=re("ZodAny",(e,t)=>{QX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ete(e,n,r,o)});Ene=re("ZodUnknown",(e,t)=>{FX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yte(e,n,r,o)});yne=re("ZodNever",(e,t)=>{GX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_te(e,n,r,o)});Sne=re("ZodVoid",(e,t)=>{zX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hte(e,n,r,o)});yw=re("ZodDate",(e,t)=>{jX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ste(e,r,o,i),e.min=(r,o)=>e.check(ec(r,o)),e.max=(r,o)=>e.check(Kl(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Tne=re("ZodArray",(e,t)=>{HX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wte(e,n,r,o),e.element=t.element,_w(e,"ZodArray",{min(n,r){return this.check(Vg(n,r))},nonempty(n){return this.check(Vg(1,n))},max(n,r){return this.check(WS(n,r))},length(n,r){return this.check(XS(n,r))},unwrap(){return this.element}})});Tw=re("ZodObject",(e,t)=>{$X.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kte(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),_w(e,"ZodObject",{keyof(){return YG(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:eT()})},loose(){return this.clone({...this._zod.def,catchall:eT()})},strict(){return this.clone({...this._zod.def,catchall:qG()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Le.extend(this,n)},safeExtend(n){return Le.safeExtend(this,n)},merge(n){return Le.merge(this,n)},pick(n){return Le.pick(this,n)},omit(n){return Le.omit(this,n)},partial(...n){return Le.partial(JG,this,n[0])},required(...n){return Le.required(ZG,this,n[0])}})});Iw=re("ZodUnion",(e,t)=>{nw.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gG(e,n,r,o),e.options=t.options});Ine=re("ZodXor",(e,t)=>{Iw.init(e,t),qX.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gG(e,n,r,o),e.options=t.options});bne=re("ZodDiscriminatedUnion",(e,t)=>{Iw.init(e,t),VX.init(e,t)});Cne=re("ZodIntersection",(e,t)=>{YX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pte(e,n,r,o)});Rne=re("ZodTuple",(e,t)=>{M6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mte(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});WR=re("ZodRecord",(e,t)=>{KX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lte(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});Bne=re("ZodMap",(e,t)=>{JX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nte(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Xm(...n)),e.nonempty=n=>e.check(Xm(1,n)),e.max=(...n)=>e.check(NE(...n)),e.size=(...n)=>e.check(ZS(...n))});Nne=re("ZodSet",(e,t)=>{ZX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ote(e,n,r,o),e.min=(...n)=>e.check(Xm(...n)),e.nonempty=n=>e.check(Xm(1,n)),e.max=(...n)=>e.check(NE(...n)),e.size=(...n)=>e.check(ZS(...n))});XR=re("ZodEnum",(e,t)=>{WX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Tte(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new XR({...t,checks:[],...Le.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new XR({...t,checks:[],...Le.normalizeParams(o),entries:i})}});One=re("ZodLiteral",(e,t)=>{XX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ite(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});wne=re("ZodFile",(e,t)=>{eee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vte(e,n,r,o),e.min=(n,r)=>e.check(Xm(n,r)),e.max=(n,r)=>e.check(NE(n,r)),e.mime=(n,r)=>e.check(jR(Array.isArray(n)?n:[n],r))});kne=re("ZodTransform",(e,t)=>{tee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bte(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new CE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Le.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Le.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});JG=re("ZodOptional",(e,t)=>{L6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hG(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Pne=re("ZodExactOptional",(e,t)=>{nee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hG(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Lne=re("ZodNullable",(e,t)=>{ree.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ute(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Une=re("ZodDefault",(e,t)=>{oee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Fne=re("ZodPrefault",(e,t)=>{iee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ZG=re("ZodNonOptional",(e,t)=>{see.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});jne=re("ZodSuccess",(e,t)=>{aee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Hne=re("ZodCatch",(e,t)=>{uee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});qne=re("ZodNaN",(e,t)=>{cee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bte(e,n,r,o)});bw=re("ZodPipe",(e,t)=>{U6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jte(e,n,r,o),e.in=t.in,e.out=t.out});Cw=re("ZodCodec",(e,t)=>{bw.init(e,t),rw.init(e,t)});Vne=re("ZodPreprocess",(e,t)=>{bw.init(e,t),lee.init(e,t)}),Yne=re("ZodReadonly",(e,t)=>{dee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Jne=re("ZodTemplateLiteral",(e,t)=>{pee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cte(e,n,r,o)});Zne=re("ZodLazy",(e,t)=>{Aee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qte(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});Xne=re("ZodPromise",(e,t)=>{mee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$te(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ere=re("ZodFunction",(e,t)=>{fee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Dte(e,n,r,o)});vw=re("ZodCustom",(e,t)=>{gee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xte(e,n,r,o)});QQe=ste,FQe=ate;zQe=(...e)=>ute({Codec:Cw,Boolean:rx,String:ex},...e)});function tBt(e){Ei({customError:e})}function nBt(){return Ei().customError}var eBt,rre,$Qe=O(()=>{A();Jl();eBt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};rre||(rre={})});function oBt(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function iBt(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function qQe(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Je.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Je.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=iBt(o,t),s=fu(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Je.null();if(o.length===0)return Je.never();if(o.length===1)return Je.literal(o[0]);if(o.every(s=>typeof s=="string"))return Je.enum(o);let i=o.map(s=>Je.literal(s));return i.length<2?i[0]:Je.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Je.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return qQe(s,t)});return o.length===0?Je.never():o.length===1?o[0]:Je.union(o)}if(!n)return Je.any();let r;switch(n){case"string":{let o=Je.string();if(e.format){let i=e.format;i==="email"?o=o.check(Je.email()):i==="uri"||i==="uri-reference"?o=o.check(Je.url()):i==="uuid"||i==="guid"?o=o.check(Je.uuid()):i==="date-time"?o=o.check(Je.iso.datetime()):i==="date"?o=o.check(Je.iso.date()):i==="time"?o=o.check(Je.iso.time()):i==="duration"?o=o.check(Je.iso.duration()):i==="ipv4"?o=o.check(Je.ipv4()):i==="ipv6"?o=o.check(Je.ipv6()):i==="mac"?o=o.check(Je.mac()):i==="cidr"?o=o.check(Je.cidrv4()):i==="cidr-v6"?o=o.check(Je.cidrv6()):i==="base64"?o=o.check(Je.base64()):i==="base64url"?o=o.check(Je.base64url()):i==="e164"?o=o.check(Je.e164()):i==="jwt"?o=o.check(Je.jwt()):i==="emoji"?o=o.check(Je.emoji()):i==="nanoid"?o=o.check(Je.nanoid()):i==="cuid"?o=o.check(Je.cuid()):i==="cuid2"?o=o.check(Je.cuid2()):i==="ulid"?o=o.check(Je.ulid()):i==="xid"?o=o.check(Je.xid()):i==="ksuid"&&(o=o.check(Je.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Je.number().int():Je.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Je.boolean();break}case"null":{r=Je.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=fu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=fu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?fu(e.additionalProperties,t):Je.any();if(Object.keys(o).length===0){r=Je.record(l,f);break}let h=Je.object(o).passthrough(),y=Je.looseRecord(l,f);r=Je.intersection(h,y);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let S of f){let b=fu(l[S],t),v=Je.string().regex(new RegExp(S));h.push(Je.looseRecord(v,b))}let y=[];if(Object.keys(o).length>0&&y.push(Je.object(o).passthrough()),y.push(...h),y.length===0)r=Je.object({}).passthrough();else if(y.length===1)r=y[0];else{let S=Je.intersection(y[0],y[1]);for(let b=2;b<y.length;b++)S=Je.intersection(S,y[b]);r=S}break}let c=Je.object(o);e.additionalProperties===!1?r=c.strict():typeof e.additionalProperties=="object"?r=c.catchall(fu(e.additionalProperties,t)):r=c.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>fu(l,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?fu(i,t):void 0;c?r=Je.tuple(s).rest(c):r=Je.tuple(s),typeof e.minItems=="number"&&(r=r.check(Je.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Je.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>fu(l,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?fu(e.additionalItems,t):void 0;c?r=Je.tuple(s).rest(c):r=Je.tuple(s),typeof e.minItems=="number"&&(r=r.check(Je.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Je.maxLength(e.maxItems)))}else if(i!==void 0){let s=fu(i,t),c=Je.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),r=c}else r=Je.array(Je.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function fu(e,t){if(typeof e=="boolean")return e?Je.any():Je.never();let n=qQe(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(f=>fu(f,t)),l=Je.union(c);n=r?Je.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(f=>fu(f,t)),l=Je.xor(c);n=r?Je.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Je.any();else{let c=r?n:fu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)c=Je.intersection(c,fu(e.allOf[f],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Je.nullable(n)),e.readOnly===!0&&(n=Je.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(o[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(o[c]=e[c]);for(let c of Object.keys(e))rBt.has(c)||(o[c]=e[c]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function VQe(e,t){if(typeof e=="boolean")return e?Je.any():Je.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=oBt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??ka};return fu(n,i)}var Je,rBt,YQe=O(()=>{A();sw();SG();dw();fw();Je={...pw,...yG,iso:ZR},rBt=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var ore={};$s(ore,{bigint:()=>cBt,boolean:()=>uBt,date:()=>lBt,number:()=>aBt,string:()=>sBt});function sBt(e){return Cee(ex,e)}function aBt(e){return wee(nx,e)}function uBt(e){return Fee(rx,e)}function cBt(e){return zee(ox,e)}function lBt(e){return Xee(yw,e)}var KQe=O(()=>{A();Jl();fw()});var m={};$s(m,{$brand:()=>VZ,$input:()=>Iee,$output:()=>Tee,NEVER:()=>qZ,TimePrecision:()=>Ree,ZodAny:()=>_ne,ZodArray:()=>Tne,ZodBase64:()=>GG,ZodBase64URL:()=>zG,ZodBigInt:()=>ox,ZodBigIntFormat:()=>$G,ZodBoolean:()=>rx,ZodCIDRv4:()=>QG,ZodCIDRv6:()=>FG,ZodCUID:()=>OG,ZodCUID2:()=>wG,ZodCatch:()=>Hne,ZodCodec:()=>Cw,ZodCustom:()=>vw,ZodCustomStringFormat:()=>tx,ZodDate:()=>yw,ZodDefault:()=>Une,ZodDiscriminatedUnion:()=>bne,ZodE164:()=>jG,ZodEmail:()=>DG,ZodEmoji:()=>BG,ZodEnum:()=>XR,ZodError:()=>W1t,ZodExactOptional:()=>Pne,ZodFile:()=>wne,ZodFirstPartyTypeKind:()=>rre,ZodFunction:()=>ere,ZodGUID:()=>Aw,ZodIPv4:()=>LG,ZodIPv6:()=>UG,ZodISODate:()=>IG,ZodISODateTime:()=>TG,ZodISODuration:()=>CG,ZodISOTime:()=>bG,ZodIntersection:()=>Cne,ZodIssueCode:()=>eBt,ZodJWT:()=>HG,ZodKSUID:()=>MG,ZodLazy:()=>Zne,ZodLiteral:()=>One,ZodMAC:()=>dne,ZodMap:()=>Bne,ZodNaN:()=>qne,ZodNanoID:()=>NG,ZodNever:()=>yne,ZodNonOptional:()=>ZG,ZodNull:()=>gne,ZodNullable:()=>Lne,ZodNumber:()=>nx,ZodNumberFormat:()=>tT,ZodObject:()=>Tw,ZodOptional:()=>JG,ZodPipe:()=>bw,ZodPrefault:()=>Fne,ZodPreprocess:()=>Vne,ZodPromise:()=>Xne,ZodReadonly:()=>Yne,ZodRealError:()=>Kc,ZodRecord:()=>WR,ZodSet:()=>Nne,ZodString:()=>ex,ZodStringFormat:()=>qr,ZodSuccess:()=>jne,ZodSymbol:()=>mne,ZodTemplateLiteral:()=>Jne,ZodTransform:()=>kne,ZodTuple:()=>Rne,ZodType:()=>Dn,ZodULID:()=>kG,ZodURL:()=>Ew,ZodUUID:()=>eA,ZodUndefined:()=>Ane,ZodUnion:()=>Iw,ZodUnknown:()=>Ene,ZodVoid:()=>Sne,ZodXID:()=>PG,ZodXor:()=>Ine,_ZodString:()=>xG,_default:()=>Qne,_function:()=>MQe,any:()=>fQe,array:()=>Sw,base64:()=>JUe,base64url:()=>ZUe,bigint:()=>uQe,boolean:()=>fne,catch:()=>$ne,check:()=>LQe,cidrv4:()=>YUe,cidrv6:()=>KUe,clone:()=>Wu,codec:()=>OQe,coerce:()=>ore,config:()=>Ei,core:()=>Yg,cuid:()=>FUe,cuid2:()=>GUe,custom:()=>UQe,date:()=>AQe,decode:()=>rne,decodeAsync:()=>ine,describe:()=>QQe,discriminatedUnion:()=>SQe,e164:()=>WUe,email:()=>BUe,emoji:()=>UUe,encode:()=>nne,encodeAsync:()=>one,endsWith:()=>zR,enum:()=>YG,exactOptional:()=>Mne,file:()=>xQe,flattenError:()=>JO,float32:()=>oQe,float64:()=>iQe,formatError:()=>ZO,fromJSONSchema:()=>VQe,function:()=>MQe,getErrorMap:()=>nBt,globalRegistry:()=>ka,gt:()=>Wm,gte:()=>ec,guid:()=>NUe,hash:()=>rQe,hex:()=>nQe,hostname:()=>tQe,httpUrl:()=>LUe,includes:()=>FR,instanceof:()=>GQe,int:()=>vG,int32:()=>sQe,int64:()=>cQe,intersection:()=>vne,invertCodec:()=>wQe,ipv4:()=>$Ue,ipv6:()=>VUe,iso:()=>ZR,json:()=>jQe,jwt:()=>XUe,keyof:()=>gQe,ksuid:()=>HUe,lazy:()=>Wne,length:()=>XS,literal:()=>RQe,locales:()=>iw,looseObject:()=>EQe,looseRecord:()=>IQe,lowercase:()=>UR,lt:()=>Zm,lte:()=>Kl,mac:()=>qUe,map:()=>bQe,maxLength:()=>WS,maxSize:()=>NE,meta:()=>FQe,mime:()=>jR,minLength:()=>Vg,minSize:()=>Xm,multipleOf:()=>BE,nan:()=>NQe,nanoid:()=>QUe,nativeEnum:()=>vQe,negative:()=>dG,never:()=>qG,nonnegative:()=>fG,nonoptional:()=>zne,nonpositive:()=>pG,normalize:()=>HR,null:()=>hne,nullable:()=>hw,nullish:()=>DQe,number:()=>pne,object:()=>hQe,optional:()=>gw,overwrite:()=>If,parse:()=>Wte,parseAsync:()=>Xte,partialRecord:()=>TQe,pipe:()=>RG,positive:()=>lG,prefault:()=>Gne,preprocess:()=>HQe,prettifyError:()=>sW,promise:()=>PQe,property:()=>mG,readonly:()=>Kne,record:()=>Dne,refine:()=>tre,regex:()=>LR,regexes:()=>Yl,registry:()=>j6,safeDecode:()=>ane,safeDecodeAsync:()=>cne,safeEncode:()=>sne,safeEncodeAsync:()=>une,safeParse:()=>ene,safeParseAsync:()=>tne,set:()=>CQe,setErrorMap:()=>tBt,size:()=>ZS,slugify:()=>YR,startsWith:()=>GR,strictObject:()=>_Qe,string:()=>mw,stringFormat:()=>eQe,stringbool:()=>zQe,success:()=>BQe,superRefine:()=>nre,symbol:()=>dQe,templateLiteral:()=>kQe,toJSONSchema:()=>_G,toLowerCase:()=>qR,toUpperCase:()=>VR,transform:()=>KG,treeifyError:()=>iW,trim:()=>$R,tuple:()=>xne,uint32:()=>aQe,uint64:()=>lQe,ulid:()=>zUe,undefined:()=>pQe,union:()=>VG,unknown:()=>eT,uppercase:()=>QR,url:()=>MUe,util:()=>Le,uuid:()=>OUe,uuidv4:()=>wUe,uuidv6:()=>kUe,uuidv7:()=>PUe,void:()=>mQe,xid:()=>jUe,xor:()=>yQe});var ire=O(()=>{A();Jl();fw();SG();Zte();lne();$Qe();Jl();_ee();Jl();lw();YQe();See();dw();dw();KQe();Ei(Q6())});var mu=O(()=>{A();ire();ire()});var sre,JQe,dBt,ZQe,eNn,are=O(()=>{"use strict";A();sre=["free","creator","team"],JQe=typeof process<"u"&&process.env?.NODE_ENV!=="production",dBt={stripe:{plans:[{tier:"free",subjectType:"user",name:"Free",description:"Share any thread from Claude Code, Codex, or Cowork. Share with friends or keep private. Share skills with your team instantly.",price:0,priceId:null,features:[{name:"Share threads from Claude Code, Codex, and Cowork"},{name:"Share with friends or keep private"},{name:"Skills tab \u2014 tool usage across every thread"},{name:"Share skills with your team instantly"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:3}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot. Permanent share links that never expire.",price:29,isFeatured:!0,priceId:JQe?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"},{name:"Shared threads live forever"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:null}},{tier:"team",subjectType:"organization",name:"Team",description:"GitHub for Prompts. Org-wide thread sharing plus the review surface.",price:19,minSeats:2,priceId:JQe?"price_1TP9MpKwvRM43sh6TBIFxVCd":"price_1TPA3CKwvRM43sh6k0bgPTsQ",features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0,sharedThreadTtlDays:null}}]}},ZQe=dBt.stripe.plans,eNn=Object.freeze(Object.fromEntries(ZQe.map(e=>[e.tier,e])))});var WQe=O(()=>{"use strict";A();are();are()});var pBt,Au,ure,nT,WG,fBt,XG,XQe,eFe,cre,mBt,ABt,gBt,hBt,_Bt,EBt,yBt,tFe,ez=O(()=>{"use strict";A();Sf();mu();pBt=ia(),Au=m.object({message:m.string()}),ure=m.record(m.string(),m.unknown()),nT=m.string().regex(/^doc_[0-9A-Za-z]{22}$/),WG=m.string().regex(/^proj_[0-9A-Za-z]{22}$/),fBt=["active","archived"],XG=m.enum(fBt),XQe=m.object({id:m.string().min(1),display_name:m.string().min(1)}),eFe=m.object({id:WG,name:m.string().min(1)}),cre=m.object({id:nT,title:m.string().min(1),status:XG,author:XQe,project:eFe.nullable(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),mBt=m.object({type:m.literal("list"),list_type:m.literal("doc"),objects:m.array(cre)}),ABt=m.object({project_id:WG.optional(),status:XG.optional()}),gBt=m.object({title:m.string().trim().min(1).max(300).optional(),prosemirror_json:ure.optional(),project_id:WG.nullable().optional()}),hBt=m.object({id:nT,created_at:m.string().datetime()}),_Bt=m.object({title:m.string().trim().min(1).max(300).optional(),prosemirror_json:ure.optional(),project_id:WG.nullable().optional(),status:XG.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),EBt=m.object({id:nT,updated_at:m.string().datetime()}),yBt=m.object({id:nT,title:m.string().min(1),prosemirror_json:ure,status:XG,author:XQe,project:eFe.nullable(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),tFe=pBt.router({listDocs:{method:"GET",path:"/docs",headers:m.object({authorization:m.string().min(1).optional()}),query:ABt,responses:{200:mBt,401:Au,403:Au},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:m.object({authorization:m.string().min(1).optional()}),body:gBt,responses:{201:hBt,401:Au,403:Au,404:Au,422:Au},summary:"Create a doc. If project_id is provided, the doc is scoped to that project; otherwise it lives at the workspace level."},getDoc:{method:"GET",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:yBt,401:Au,403:Au,404:Au},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),body:_Bt,responses:{200:EBt,401:Au,403:Au,404:Au,422:Au},summary:"Update a doc. If prosemirror_json changes, the server re-syncs lore.mention_references from mention nodes."},deleteDoc:{method:"DELETE",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:Au,403:Au,404:Au},summary:"Hard-delete a doc and any mention references it owns"}})});var SBt,Li,lre,tA,TBt,tz,dre,nFe,IBt,bBt,CBt,vBt,RBt,xBt,DBt,BBt,NBt,OBt,wBt,kBt,rFe,pre=O(()=>{"use strict";A();Sf();mu();ez();SBt=ia(),Li=m.object({message:m.string()}),lre=m.record(m.string(),m.unknown()),tA=m.string().regex(/^proj_[0-9A-Za-z]{22}$/),TBt=["active","archived"],tz=m.enum(TBt),dre=m.object({id:m.string().min(1),display_name:m.string().min(1)}),nFe=m.object({thread_id:m.string().min(1),title:m.string().min(1),added_at:m.string().datetime(),added_by:dre}),IBt=m.object({id:tA,name:m.string().min(1),status:tz,author:dre,thread_count:m.number().int().nonnegative(),doc_count:m.number().int().nonnegative(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),bBt=m.object({type:m.literal("list"),list_type:m.literal("project"),objects:m.array(IBt)}),CBt=m.object({status:tz.optional()}),vBt=m.object({name:m.string().trim().min(1).max(200),prosemirror_json:lre.optional()}),RBt=m.object({id:tA,created_at:m.string().datetime()}),xBt=m.object({name:m.string().trim().min(1).max(200).optional(),prosemirror_json:lre.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),DBt=m.object({id:tA,updated_at:m.string().datetime()}),BBt=m.object({archived:m.boolean()}),NBt=m.object({id:tA,status:tz,archived_at:m.string().datetime().nullable()}),OBt=m.object({id:tA,name:m.string().min(1),prosemirror_json:lre,status:tz,author:dre,created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable(),threads:m.array(nFe),docs:m.array(cre)}),wBt=m.object({thread_id:m.string().min(1).max(64)}),kBt=nFe,rFe=SBt.router({listProjects:{method:"GET",path:"/projects",headers:m.object({authorization:m.string().min(1).optional()}),query:CBt,responses:{200:bBt,401:Li},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:m.object({authorization:m.string().min(1).optional()}),body:vBt,responses:{201:RBt,401:Li,422:Li},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:OBt,401:Li,403:Li,404:Li},summary:"Get a project with its attached threads and child docs. The project description is the canonical mention source for project-scoped @-mentions."},updateProject:{method:"PATCH",path:"/projects/:projectId",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:xBt,responses:{200:DBt,401:Li,403:Li,404:Li,422:Li},summary:"Update a project\u2019s name or rich-text body. Body changes re-sync mention_references for source_kind=project."},archiveProject:{method:"POST",path:"/projects/:projectId/archive",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:BBt,responses:{200:NBt,401:Li,403:Li,404:Li},summary:"Archive (soft-delete) or unarchive a project"},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:wBt,responses:{201:kBt,401:Li,403:Li,404:Li,409:Li,422:Li},summary:"Pin an existing visible thread to this project. Idempotent \u2014 re-adding returns the existing membership."},removeProjectThread:{method:"DELETE",path:"/projects/:projectId/threads/:threadId",pathParams:m.object({projectId:tA,threadId:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:Li,403:Li,404:Li},summary:"Remove a thread membership from a project"}})});var PBt,jn,Jc,iFe,MBt,nz,rz,LBt,UBt,QBt,oFe,FBt,GBt,sFe,zBt,jBt,HBt,$Bt,qBt,VBt,YBt,KBt,JBt,ZBt,WBt,XBt,eNt,tNt,nNt,rNt,oNt,iNt,sNt,aNt,aFe,fre=O(()=>{"use strict";A();Sf();mu();PBt=ia(),jn=m.object({message:m.string()}),Jc=m.string().regex(/^reg_[0-9A-Za-z]{22}$/),iFe=m.string().min(1).max(64),MBt=["active","quiet","dormant","archived"],nz=m.enum(MBt),rz=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable().optional()}),LBt=m.object({id:m.string().min(1),display_name:m.string().min(1),thread_count:m.number().int().positive()}),UBt=["asked","requested","decided","corrected","shared","requirement"],QBt=m.enum(UBt),oFe=m.object({id:m.string().min(1),kind:QBt,summary:m.string(),thread_id:m.string().min(1),thread_title:m.string(),created_at:m.string().datetime()}),FBt=m.object({decided_14d:m.number().int().nonnegative(),asked_14d:m.number().int().nonnegative()}),GBt=m.object({id:Jc,name:m.string().min(1),overlap_score:m.number().min(0).max(1)}),sFe=m.object({thread_id:m.string().min(1),title:m.string().min(1),is_primary:m.boolean(),added_at:m.string().datetime(),added_by:rz}),zBt=m.object({id:Jc,name:m.string().min(1),blurb:m.string().nullable(),status:nz,thread_count:m.number().int().nonnegative(),contributor_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative(),contributors_preview:m.array(rz).max(3),top_filepath:m.string().nullable(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),jBt=m.object({type:m.literal("list"),list_type:m.literal("region"),objects:m.array(zBt)}),HBt=m.object({status:nz.optional()}),$Bt=m.object({name:m.string().trim().min(1).max(200),blurb:m.string().trim().max(2e3).optional()}),qBt=m.object({id:Jc,created_at:m.string().datetime()}),VBt=m.object({name:m.string().trim().min(1).max(200).optional(),blurb:m.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),YBt=m.object({id:Jc,updated_at:m.string().datetime()}),KBt=m.object({archived:m.boolean()}),JBt=m.object({id:Jc,status:nz,archived_at:m.string().datetime().nullable()}),ZBt=m.object({id:Jc,name:m.string().min(1),blurb:m.string().nullable(),status:nz,created_by:rz,thread_count:m.number().int().nonnegative(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable(),synthesized_status:m.string().nullable(),synthesized_status_at:m.string().datetime().nullable(),threads:m.array(sFe),contributors:m.array(LBt),decisions:m.object({decided:m.array(oFe),open:m.array(oFe)}),velocity:FBt,cited_by_active_regions:m.array(GBt)}),WBt=m.object({id:Jc,synthesized_status:m.string(),synthesized_status_at:m.string().datetime()}),XBt=m.object({regions_created:m.number().int().nonnegative(),llm_dispatched:m.boolean()}),eNt=m.object({promoted_to_active:m.number().int().nonnegative(),demoted_to_quiet:m.number().int().nonnegative(),demoted_to_dormant:m.number().int().nonnegative()}),tNt=m.object({thread_id:m.string().min(1),region_id:Jc,region_name:m.string().min(1),score:m.number().min(0).max(1),signal:m.enum(["file","embedding","combined"])}),nNt=m.object({thread_ids:m.array(m.string().min(1)).min(1).max(50)}),rNt=m.object({type:m.literal("list"),list_type:m.literal("region_suggestion"),objects:m.array(tNt)}),oNt=m.object({thread_id:m.string().min(1),title:m.string(),created_at:m.string().datetime(),author:rz,user_message_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative()}),iNt=m.object({type:m.literal("list"),list_type:m.literal("unfiled_thread"),objects:m.array(oNt)}),sNt=m.object({thread_id:iFe}),aNt=sFe,aFe=PBt.router({listRegions:{method:"GET",path:"/regions",headers:m.object({authorization:m.string().min(1).optional()}),query:HBt,responses:{200:jBt,401:jn,403:jn},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:m.object({authorization:m.string().min(1).optional()}),body:$Bt,responses:{201:qBt,401:jn,403:jn,409:jn,422:jn},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:ZBt,401:jn,403:jn,404:jn},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:VBt,responses:{200:YBt,401:jn,403:jn,404:jn,409:jn,422:jn},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:KBt,responses:{200:JBt,401:jn,403:jn,404:jn},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:sNt,responses:{201:aNt,401:jn,403:jn,404:jn,409:jn,422:jn},summary:"Attach an existing visible thread to this region. Primary if the thread has no other primary, otherwise secondary (up to 2). Idempotent."},suggestRegionsForThreads:{method:"POST",path:"/regions/suggest-for-threads",headers:m.object({authorization:m.string().min(1).optional()}),body:nNt,responses:{200:rNt,401:jn,403:jn,422:jn},summary:'Batch lookup: for each thread id, return the highest-scoring active region in the viewer\u2019s workspace (or omit when no region clears the threshold). Used by the per-thread inline "Add to <region>" suggestion chip.'},listUnfiledThreads:{method:"GET",path:"/regions/unfiled",headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({days:m.coerce.number().int().positive().max(180).optional()}),responses:{200:iNt,401:jn,403:jn},summary:"List threads in the authenticated user\u2019s scope that are not yet attached to any region (default last 30 days)."},transitionRegionLifecycle:{method:"POST",path:"/regions/lifecycle/transition",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:eNt,401:jn,403:jn},summary:"Sweep regions and demote/promote between active/quiet/dormant based on last_active_at. Idempotent \u2014 safe to run on a cron or on-demand."},refreshRegions:{method:"POST",path:"/regions/refresh",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:XBt,401:jn,403:jn},summary:"Run the clustering pipeline against unfiled threads and create regions from the resulting clusters. Deterministic pass is synchronous; LLM pass is dispatched as an async Inngest event and lands more regions ~30s later."},synthesizeRegion:{method:"POST",path:"/regions/:regionId/synthesize",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:WBt,401:jn,403:jn,404:jn,409:jn,503:jn},summary:"Generate (or refresh) the region\u2019s synthesized status using recent decisions and threads. Persists to regions.synthesized_status."},removeRegionThread:{method:"DELETE",path:"/regions/:regionId/threads/:threadId",pathParams:m.object({regionId:Jc,threadId:iFe}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:jn,403:jn,404:jn},summary:"Remove a thread membership from a region"}})});var uNt,bf,DNn,BNn,cNt,NNn,lNt,ix,oz=O(()=>{"use strict";A();mu();uNt=["person","foot_gun"],bf=m.enum(uNt),DNn=m.enum(["authored","commented","edited","mentioned"]),BNn=m.enum(["observed_in","reaffirmed_in"]),cNt=["primary"],NNn=m.enum(cNt),lNt=["supports","supersedes"],ix=m.enum(lNt)});var dNt,mre=O(()=>{"use strict";A();mu();dNt=m.object({user_id:m.string().nullable()})});var pNt,Are=O(()=>{"use strict";A();mu();pNt=m.object({typical_phrasings:m.array(m.string()).default([])})});var gre=O(()=>{"use strict";A();oz();mre();Are();oz();mre();Are()});var fNt,Ui,Zl,mNt,cFe,lFe,ANt,uFe,rT,gNt,hNt,_Nt,ENt,yNt,dFe,hre=O(()=>{"use strict";A();Sf();mu();gre();fNt=ia(),Ui=m.object({message:m.string()}),Zl=m.string().regex(/^ent_[0-9A-Za-z]{22}$/),mNt=["active","archived"],cFe=m.enum(mNt),lFe=m.object({id:Zl,kind:bf,slug:m.string(),name:m.string(),blurb:m.string().nullable(),status:cFe,lifecycle:m.string().nullable(),human_edited_at:m.string().datetime().nullable(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime()}),ANt=m.object({thread_id:m.string(),thread_title:m.string(),role:m.string(),score:m.number().nullable(),added_at:m.string().datetime(),added_by:m.object({id:m.string(),display_name:m.string()})}),uFe=m.object({entity_id:Zl,name:m.string(),slug:m.string(),kind:bf,edge_kind:ix}),rT=lFe.extend({payload:m.record(m.string(),m.unknown()),attachments:m.array(ANt),edges:m.object({outgoing:m.array(uFe),incoming:m.array(uFe)})}),gNt=m.object({type:m.literal("list"),list_type:m.literal("entities"),has_more:m.boolean(),objects:m.array(lFe)}),hNt=m.object({kind:bf.optional().describe("Filter to a single entity kind"),status:cFe.optional().describe("Filter by entity status"),after:Zl.optional().describe("Cursor: return entities after this id"),before:Zl.optional().describe("Cursor: return entities before this id")}),_Nt=m.object({name:m.string().min(1).optional().describe("New display name for the entity"),blurb:m.string().nullable().optional().describe("New blurb; null clears it"),payload:m.record(m.string(),m.unknown()).optional().describe("Replacement payload for the entity")}),ENt=m.object({thread_id:m.string().min(1).describe("Id of the thread to attach"),role:m.string().min(1).describe("Role of the thread relative to the entity"),score:m.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),yNt=m.object({to_id:Zl.describe("Id of the target entity for the edge"),kind:ix.describe("Kind of edge to create")}),dFe=fNt.router({listEntities:{method:"GET",path:"/entities",headers:m.object({authorization:m.string().min(1).optional()}),query:hNt,responses:{200:gNt,401:Ui},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:m.object({entityId:Zl.describe("Id of the entity to fetch")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:rT,401:Ui,404:Ui},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:m.object({entityId:Zl.describe("Id of the entity to update")}),headers:m.object({authorization:m.string().min(1).optional()}),body:_Nt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:m.object({entityId:Zl.describe("Id of the entity to archive")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:m.object({entityId:Zl.describe("Id of the entity to attach a thread to")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ENt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:m.object({entityId:Zl.describe("Id of the entity to detach a thread from"),threadId:m.string().min(1).describe("Id of the thread to detach")}),headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({role:m.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:m.object({entityId:Zl.describe("Id of the source entity for the edge")}),headers:m.object({authorization:m.string().min(1).optional()}),body:yNt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:m.object({entityId:Zl.describe("Id of the source entity for the edge"),toId:Zl.describe("Id of the target entity for the edge"),kind:ix.describe("Kind of edge to remove")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Remove an edge from this entity to another entity"}})});var SNt,iz,TNt,sz,INt,bNt,CNt,vNt,RNt,xNt,DNt,BNt,pFe,_re=O(()=>{"use strict";A();Sf();mu();SNt=ia(),iz=m.object({message:m.string()}),TNt=["thread","plan","doc","user"],sz=m.enum(TNt),INt=["doc","project"],bNt=m.enum(INt),CNt=m.object({kind:sz,id:m.string().min(1),title:m.string().min(1),href:m.string().min(1)}),vNt=m.object({type:m.literal("list"),list_type:m.literal("mention"),objects:m.array(CNt)}),RNt=m.object({q:m.string().trim().min(1).max(50),kinds:m.string().optional().transform(e=>{if(!e)return;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}).pipe(m.array(sz).optional())}),xNt=m.object({source_kind:bNt,source_id:m.string().min(1),source_title:m.string().min(1),source_href:m.string().min(1),target_kind:sz,target_id:m.string().min(1),created_at:m.string().datetime()}),DNt=m.object({type:m.literal("list"),list_type:m.literal("backlink"),objects:m.array(xNt)}),BNt=m.object({target_kind:sz,target_id:m.string().min(1).max(64)}),pFe=SNt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:m.object({authorization:m.string().min(1).optional()}),query:RNt,responses:{200:vNt,401:iz,422:iz},summary:"Search threads, plans, files, and users by title/name for @-mention typeahead. Org-scoped, max 10 results across all kinds."},listBacklinks:{method:"GET",path:"/mentions/backlinks",headers:m.object({authorization:m.string().min(1).optional()}),query:BNt,responses:{200:DNt,401:iz,403:iz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var NNt,ONt,sa,fFe,wNt,kNt,PNt,MNt,mFe,LNt,UNt,AFe,Ere=O(()=>{"use strict";A();Sf();mu();NNt=ia(),ONt=m.object({type:m.literal("list"),list_type:m.literal("thread"),has_more:m.boolean(),objects:m.array(m.unknown())}),sa=m.object({message:m.string()}),fFe=m.object({thread_id:m.string().min(1),is_favorited:m.boolean(),favorited_at:m.string().datetime().nullable()}),wNt=m.object({before:m.string().min(1).max(64).optional()}),kNt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),PNt=m.object({block_id:m.string().min(1),thread_id:m.string().min(1),thread_title:m.string(),thread_visibility:m.enum(["private","workspace","public"]),author:kNt,preview:m.string(),prompted_at:m.string().datetime().nullable(),favorited_at:m.string().datetime()}),MNt=m.object({type:m.literal("list"),list_type:m.literal("favorite_prompt"),has_more:m.boolean(),objects:m.array(PNt)}),mFe=m.object({block_id:m.string().min(1),thread_id:m.string().min(1).nullable(),is_favorited:m.boolean(),favorited_at:m.string().datetime().nullable()}),LNt=m.object({before:m.string().min(1).max(64).optional()}),UNt=m.object({block_ids:m.array(m.string().min(1))}),AFe=NNt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:fFe,401:sa,403:sa,404:sa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:fFe,401:sa,403:sa,404:sa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:wNt,responses:{200:ONt,401:sa,403:sa},summary:"List threads the authenticated user has favorited, newest favorited first. Visibility filtering still applies \u2014 a thread the viewer can no longer see (e.g. visibility downgraded) is omitted from the list."},addPromptFavorite:{method:"POST",path:"/thread-blocks/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:mFe,401:sa,403:sa,404:sa,409:sa},summary:'Bookmark a single user prompt (a thread_blocks row with type="user") for the authenticated user. Idempotent.'},removePromptFavorite:{method:"DELETE",path:"/thread-blocks/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:mFe,401:sa,404:sa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:m.object({authorization:m.string().min(1).optional()}),query:LNt,responses:{200:MNt,401:sa},summary:"List the user's favorited prompts, newest first. Prompts whose parent thread the viewer can no longer see (visibility downgraded) are filtered out at read time."},listFavoritedBlockIdsInThread:{method:"GET",path:"/threads/:id/favorited-blocks",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:UNt,401:sa,403:sa,404:sa},summary:"Returns the set of thread_block ids the authenticated viewer has favorited within a single thread, used to bootstrap per-prompt star state on the SessionView."}})});var QNt,gFe,FNt,GNt,zNt,jNt,HNt,hFe,yre=O(()=>{"use strict";A();Sf();mu();QNt=ia(),gFe=m.object({message:m.string()}),FNt=m.object({id:m.string().min(1),title:m.string(),href:m.string().min(1),author_display_name:m.string().nullable(),author_handle:m.string().nullable()}),GNt=m.object({name:m.string().min(1),usage_count:m.number().int().nonnegative(),href:m.string().min(1)}),zNt=m.object({id:m.string().min(1),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable(),href:m.string().min(1)}),jNt=m.object({type:m.literal("global_search"),threads:m.array(FNt),skills:m.array(GNt),people:m.array(zNt)}),HNt=m.object({q:m.string().trim().min(1).max(80)}),hFe=QNt.router({globalSearch:{method:"GET",path:"/search",headers:m.object({authorization:m.string().min(1).optional()}),query:HNt,responses:{200:jNt,401:gFe,422:gFe},summary:"Global navbar search. Threads and people are searched globally (subject to thread visibility); skills are scoped to the viewer workspace. Max 5 results per kind."}})});var $Nt,oT,qNt,VNt,YNt,KNt,_Fe,Sre=O(()=>{"use strict";A();Sf();mu();$Nt=ia(),oT=m.object({message:m.string()}),qNt=m.object({id:m.string().min(1),name:m.string().min(1),is_private:m.boolean()}),VNt=m.object({channels:m.array(qNt)}),YNt=m.object({channel_name:m.string().min(1),thread_id:m.string().min(1)}),KNt=m.object({ok:m.literal(!0),channel:m.string(),ts:m.string()}),_Fe=$Nt.router({listSlackChannels:{method:"GET",path:"/slack/channels",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:VNt,401:oT,404:oT,502:oT},summary:"List Slack channels visible to the bot for the caller's organization."},postToSlack:{method:"POST",path:"/slack/post",headers:m.object({authorization:m.string().min(1).optional()}),body:YNt,responses:{200:KNt,400:oT,401:oT,404:oT,502:oT},summary:"Post a Lore thread link to a Slack channel. The unfurl handler renders the preview."}})});var _On,EOn,yOn,ei,JNt,ZNt,WNt,XNt,Tre,SOn,EFe=O(()=>{"use strict";A();mu();oz();az();_On=m.enum(["thread","org","user","public"]),EOn=m.discriminatedUnion("kind",[m.object({kind:m.literal("thread"),id:m.string().min(1)}),m.object({kind:m.literal("org"),id:m.string().min(1)}),m.object({kind:m.literal("user"),id:m.string().min(1)}),m.object({kind:m.literal("public"),id:m.string().min(1)})]),yOn=m.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","user.followed","user.joined","user.presence","entity.created","entity.updated","entity.archived","entity.thread_attached","entity.thread_detached","entity.linked","entity.superseded","skill.published","skill.version.accepted","skill.version.proposed","skill.version.rejected","skill.installation.deleted"]),ei=m.object({id:m.string().min(1),subjects:m.array(m.string().min(1)).min(1),actor_user_id:m.string().min(1).nullable(),created_at:m.string().datetime()}),JNt=m.object({thread_id:m.string().min(1),title:m.string(),author_id:m.string().min(1),created_at:m.string().datetime()}),ZNt=m.enum(["user","assistant","tool","progress","system"]),WNt=m.enum(["claude_global","agents_global","claude_project","agents_project"]),XNt=m.enum(["private","workspace"]),Tre=m.object({skill_id:m.string().min(1),name:m.string().min(1),root_kind:WNt,version:m.number().int().positive(),content_hash:m.string().startsWith("md5:")}),SOn=m.discriminatedUnion("type",[ei.extend({type:m.literal("thread.created"),payload:JNt}),ei.extend({type:m.literal("thread.completed"),payload:m.object({thread_id:m.string().min(1),completed_at:m.string().datetime()})}),ei.extend({type:m.literal("thread.block.appended"),payload:m.object({thread_id:m.string().min(1),block_id:m.string().min(1),block_type:ZNt,excerpt:m.string().nullable()})}),ei.extend({type:m.literal("thread.comment.created"),payload:m.object({comment:m.lazy(()=>nA)})}),ei.extend({type:m.literal("thread.comment.updated"),payload:m.object({comment:m.lazy(()=>nA)})}),ei.extend({type:m.literal("thread.comment.deleted"),payload:m.object({thread_id:m.string().min(1),comment_id:m.string().min(1)})}),ei.extend({type:m.literal("thread.vote.cast"),payload:m.object({thread_id:m.string().min(1),vote_count:m.number().int().nonnegative()})}),ei.extend({type:m.literal("thread.vote.cleared"),payload:m.object({thread_id:m.string().min(1),vote_count:m.number().int().nonnegative()})}),ei.extend({type:m.literal("user.followed"),payload:m.object({followee_id:m.string().min(1),followee_handle:m.string().nullable(),followee_display_name:m.string().nullable()})}),ei.extend({type:m.literal("user.joined"),payload:m.object({organization_id:m.string().min(1).nullable(),organization_name:m.string().nullable()})}),ei.extend({type:m.literal("user.presence"),payload:m.object({status:m.literal("online")})}),ei.extend({type:m.literal("entity.created"),payload:m.object({entity_id:m.string().min(1),kind:bf,slug:m.string().min(1),name:m.string().min(1)})}),ei.extend({type:m.literal("entity.updated"),payload:m.object({entity_id:m.string().min(1),kind:bf,changed_fields:m.array(m.string()).min(1),actor:m.enum(["agent","human"])})}),ei.extend({type:m.literal("entity.archived"),payload:m.object({entity_id:m.string().min(1),kind:bf})}),ei.extend({type:m.literal("entity.thread_attached"),payload:m.object({entity_id:m.string().min(1),kind:bf,thread_id:m.string().min(1),role:m.string().min(1),score:m.number().nullable()})}),ei.extend({type:m.literal("entity.thread_detached"),payload:m.object({entity_id:m.string().min(1),kind:bf,thread_id:m.string().min(1),role:m.string().min(1)})}),ei.extend({type:m.literal("entity.linked"),payload:m.object({from_id:m.string().min(1),to_id:m.string().min(1),edge_kind:ix})}),ei.extend({type:m.literal("entity.superseded"),payload:m.object({superseding_id:m.string().min(1),supersedes_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.published"),payload:Tre.extend({visibility:XNt})}),ei.extend({type:m.literal("skill.version.accepted"),payload:Tre}),ei.extend({type:m.literal("skill.version.proposed"),payload:Tre.extend({owner_user_id:m.string().min(1),proposer_user_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.version.rejected"),payload:m.object({skill_id:m.string().min(1),version:m.number().int().positive(),reviewer_user_id:m.string().min(1),proposer_user_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.installation.deleted"),payload:m.object({skill_id:m.string().min(1),installation_id:m.string().min(1),user_id:m.string().min(1)})})])});var eOt,tOt,POn,nOt,rOt,MOn,H,oOt,NFe,OFe,wFe,iOt,sOt,aOt,yFe,uOt,cOt,kFe,lOt,dOt,pOt,fOt,mOt,AOt,gOt,hOt,PFe,_Ot,EOt,yOt,SOt,MFe,pz,TOt,IOt,bOt,COt,vOt,ROt,xOt,DOt,BOt,NOt,OOt,wOt,kOt,POt,MOt,LOt,Cre,LFe,UOt,QOt,FOt,GOt,UFe,zOt,jOt,HOt,$Ot,qOt,VOt,Cf,YOt,KOt,JOt,ZOt,WOt,Dw,iT,vre,LOn,uz,XOt,ewt,fz,twt,QFe,FFe,nwt,Rw,Rre,SFe,rwt,GFe,TFe,owt,iwt,nA,swt,awt,uwt,cwt,lwt,dwt,UOn,pwt,fwt,mwt,zFe,xre,jFe,Awt,gwt,hwt,_wt,Ewt,ywt,HFe,Swt,Twt,Iwt,bwt,Cwt,vwt,Ire,Rwt,xwt,Dwt,xw,Bwt,Nwt,Owt,wwt,kwt,Pwt,Mwt,Lwt,Uwt,Qwt,Fwt,Gwt,zwt,jwt,IFe,Hwt,$wt,qwt,Vwt,Ywt,Kwt,Jwt,Zwt,Wwt,Xwt,ekt,lz,tkt,nkt,rkt,okt,ikt,bFe,skt,akt,CFe,ukt,vFe,ckt,lkt,dkt,pkt,fkt,mkt,Akt,gkt,hkt,_kt,$Fe,Ekt,ykt,Skt,Tkt,Ikt,qFe,bkt,Ckt,vkt,Rkt,xkt,Dkt,RFe,Bkt,Nkt,Okt,wkt,cz,kkt,Pkt,Mkt,Lkt,Ukt,Qkt,Fkt,Gkt,zkt,jkt,Hkt,$kt,qkt,sx,VFe,bre,Vkt,Ykt,Kkt,Jkt,Zkt,xFe,dz,Wkt,Xkt,ePt,tPt,nPt,rPt,oPt,iPt,sPt,PE,DFe,aPt,uPt,cPt,lPt,dPt,pPt,fPt,mPt,APt,gPt,hPt,_Pt,EPt,yPt,SPt,TPt,IPt,bPt,CPt,vPt,BFe,RPt,YFe,xPt,DPt,BPt,NPt,OPt,mz,az=O(()=>{"use strict";A();Sf();mu();WQe();pre();fre();hre();ez();_re();Ere();yre();Sre();EFe();gre();pre();fre();hre();ez();_re();Ere();yre();Sre();eOt=ia(),tOt=["gmail.com","googlemail.com","hotmail.com","outlook.com","live.com","msn.com","yahoo.com","ymail.com","rocketmail.com","icloud.com","me.com","mac.com","aol.com","proton.me","protonmail.com","pm.me","tutanota.com","tuta.io","fastmail.com","hey.com","mail.com","gmx.com","gmx.net","zoho.com","zohomail.com","hushmail.com","lycos.com","inbox.com","yandex.com","yandex.ru","mail.ru","inbox.ru","bk.ru","list.ru","rambler.ru","qq.com","163.com","126.com","yeah.net","sina.com","naver.com","daum.net","hanmail.net","kakao.com","rediffmail.com","comcast.net","verizon.net","att.net","sbcglobal.net","bellsouth.net","earthlink.net","charter.net","cox.net","roadrunner.com","spectrum.net","btinternet.com","virginmedia.com","sky.com","orange.fr","wanadoo.fr","free.fr","laposte.net","web.de","t-online.de","gmx.de","libero.it","virgilio.it","alice.it","seznam.cz","centrum.cz","wp.pl","interia.pl","o2.pl","onet.pl"],POn=new Set(tOt),nOt=m.object({id:m.string().uuid(),role:m.enum(["user","assistant"]),content:m.string().min(1),timestamp:m.string().datetime()}),rOt=m.object({id:m.string().uuid(),title:m.string().min(1),author:m.string().min(1),authorAvatar:m.string().min(1).max(4),model:m.string().min(1),turnCount:m.number().int().nonnegative(),createdAt:m.string().datetime(),preview:m.string()}),MOn=rOt.extend({messages:m.array(nOt)}),H=m.object({message:m.string()}),oOt=/^[a-zA-Z0-9_-]{2,32}$/,NFe=m.string().regex(oOt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),OFe=m.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),wFe=m.object({id:m.string(),first_name:m.string().min(1),last_name:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),bio:m.string().max(280).nullable(),avatar_url:m.string().nullable(),banner_url:m.string().nullable(),share_new_threads_to_workspace:m.boolean(),experimental_features_enabled:m.boolean(),onboarded_at:m.string().nullable(),attribution_source:OFe.nullable(),attribution_source_detail:m.string().nullable()}),iOt=m.object({email:m.string().nullable(),name:m.string().nullable(),handle:m.string().nullable(),created_at:m.string(),onboarded_at:m.string().nullable(),is_admin:m.boolean(),referred_by_user_id:m.string().nullable(),plan_tier:m.enum(["free","creator","team"]),organization_id:m.string().nullable(),signup_source:m.enum(["referral","organic"]),first_upload_at:m.string().nullable(),first_share_at:m.string().nullable(),first_cli_auth_at:m.string().nullable(),first_plugin_activated_at:m.string().nullable(),first_plugin_agent:m.string().nullable()}),sOt=m.object({group_key:m.string().min(1),properties:m.object({name:m.string(),plan_tier:m.enum(["free","creator","team"]),seat_count:m.number().int().nonnegative(),created_at:m.string(),email_domains:m.array(m.string()),default_thread_visibility:m.string(),member_count:m.number().int().nonnegative().nullable()})}),aOt=m.object({authProviderUserId:m.string().min(1).optional(),organizationId:m.string().min(1).optional(),org_name:m.string().min(1).optional(),organizations:m.array(m.object({id:m.string().min(1),name:m.string().min(1)})),emailAddress:m.string().email(),name:m.string().nullable(),user:wFe,is_admin:m.boolean(),is_new_signup:m.boolean(),posthog:m.object({user_properties:iOt,organization:sOt.nullable()})}),yFe=m.object({workos_client_id:m.string().min(1),workos_api_origin:m.string().url()}),uOt=m.object({share_new_threads_to_workspace:m.boolean().optional(),experimental_features_enabled:m.boolean().optional(),onboarded_at:m.union([m.literal("now"),m.null()]).optional(),attribution_source:OFe.nullable().optional(),attribution_source_detail:m.string().max(280).nullable().optional(),display_name:m.string().min(1).max(120).optional(),handle:NFe.optional(),bio:m.string().max(280).nullable().optional(),avatar_storage_url:m.string().min(1).nullable().optional(),banner_storage_url:m.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),cOt=m.object({id:m.string(),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable(),visible_thread_count:m.number().int().nonnegative(),last_active_at:m.string().datetime().nullable(),product_last_seen_at:m.string().datetime().nullable()}),kFe=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),bio:m.string().max(280).nullable(),avatar_url:m.string().nullable(),banner_url:m.string().nullable(),organization_name:m.string().min(1).nullable(),created_at:m.string().min(1),visible_thread_count:m.number().int().nonnegative(),follower_count:m.number().int().nonnegative(),following_count:m.number().int().nonnegative(),published_project_count:m.number().int().nonnegative(),is_following:m.boolean(),is_self:m.boolean()}),lOt=m.object({type:m.literal("list"),list_type:m.literal("organization_member"),objects:m.array(cOt)}),dOt=m.object({email_address:m.string().email()}),pOt=m.object({email_address:m.string().email(),invitation_id:m.string().min(1)}),fOt=m.object({organization_id:m.string().min(1),organization_name:m.string().min(1),domain:m.string().min(1),created:m.boolean()}),mOt=m.object({location:m.string().trim().min(1),contact:m.string().trim().email()}),AOt=m.enum(["target_profile","demo","substrate_waitlist"]),gOt=m.object({type:AOt,email:m.string().trim().email(),name:m.string().trim().optional()}),hOt=m.object({location:m.string().min(1),contact:m.string().email(),created_at:m.string().datetime()}),PFe=m.enum(["general","bug","feature_request","question"]),_Ot=m.object({type:PFe,message:m.string().trim().min(1).max(5e3)}),EOt=m.object({id:m.string().min(1),type:PFe,message:m.string().min(1),created_at:m.string().datetime()}),yOt=m.object({path_glob:m.string().min(1),name:m.string().min(1),description:m.string().min(1)}),SOt=m.object({repo_origin_path:m.string().min(1),building_blocks:m.array(yOt)}),MFe=m.string().regex(/^th_[0-9A-Za-z]{22}$/),pz=m.string().regex(/^tb_[0-9A-Za-z]{22}$/),TOt=m.object({id:MFe,author:m.object({id:m.string().min(1),display_name:m.string().min(1)}),title:m.string().min(1),excerpt:m.string(),created_at:m.string().datetime(),repo_origin_path:m.string().min(1),latest_revision_id:pz,revision_count:m.number().int().positive()}),IOt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),bOt=m.object({id:m.string().min(1),author_id:m.string().min(1).nullable(),author:IOt.nullable(),created_at:m.string().datetime(),deleted_at:m.string().datetime().nullable(),content:m.string().min(1)}),COt=m.object({id:m.string().min(1),thread_block_id:m.string().min(1),created_at:m.string().datetime(),resolved_at:m.string().datetime().nullable(),comments:m.array(bOt)}),vOt=m.object({thread_block_id:pz,from_position:m.number().int().positive(),to_position:m.number().int().positive(),selected_text:m.string().min(1),content:m.string().trim().min(1)}),ROt=m.object({id:m.string().min(1)}),xOt=m.object({content:m.string().trim().min(1)}),DOt=m.object({id:m.string().min(1)}),BOt=m.object({content:m.string().trim().min(1)}),NOt=m.object({id:m.string().min(1)}),OOt=m.object({content:m.string().trim().min(1)}),wOt=m.object({id:m.string().min(1)}),kOt=m.object({resolved:m.boolean()}),POt=m.object({id:m.string().min(1),resolved_at:m.string().datetime().nullable()}),MOt=m.object({resolved:m.boolean()}),LOt=m.object({id:m.string().min(1),resolved_at:m.string().datetime().nullable()}),Cre=m.record(m.string(),m.unknown()),LFe=m.object({id:pz,body:m.string().nullable(),created_at:m.string().datetime(),prosemirror_json:Cre.nullable(),comment_threads:m.array(COt)}),UOt=LFe.extend({body:m.string(),prosemirror_json:Cre}),QOt=m.object({id:MFe,created_at:m.string().datetime(),repo_origin_path:m.string().min(1),author:m.object({id:m.string().min(1),display_name:m.string().min(1)}),latest_revision_id:pz,revision_count:m.number().int().positive(),revisions:m.array(LFe)}),FOt=m.object({type:m.literal("list"),list_type:m.literal("plan"),has_more:m.boolean(),objects:m.array(TOt)}),GOt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),author_id:m.string().min(1).optional(),repo_origin_path:m.string().min(1).optional()}),UFe=m.object({id:m.string().min(1),organization_id:m.string().min(1).nullable(),created_at:m.string().min(1),repo_origin_path:m.string().min(1),path_glob:m.string().min(1),name:m.string().min(1),description:m.string().min(1)}),zOt=m.array(UFe),jOt=m.object({type:m.literal("list"),list_type:m.literal("building_block"),has_more:m.boolean(),objects:m.array(UFe)}),HOt=m.object({repo_origin_path:m.string().min(1),before:m.string().min(1).optional(),after:m.string().min(1).optional()}),$Ot=m.enum(["thread","building_block"]),qOt=m.object({repo_origin_path:m.string().min(1),sources:m.array($Ot).nonempty()}),VOt=m.object({type:m.literal("list"),list_type:m.literal("repository"),has_more:m.boolean(),objects:m.array(qOt)}),Cf=m.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),YOt=m.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),KOt=m.object({uploads:m.array(m.string()),outputs:m.array(m.string())}),JOt=m.object({connected:m.boolean(),last_upload_at:m.string().nullable(),harnesses:m.array(Cf)}),ZOt=["transcript","plan"],WOt=m.enum(ZOt),Dw=m.enum(["private","workspace"]),iT=m.enum(["claude_global","agents_global","claude_project","agents_project"]),vre=m.enum(["accepted","proposed","rejected","superseded"]),LOn=m.enum(["capture","capture_update","owner_update","subscriber_update"]),uz=m.object({md5:m.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:m.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:m.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:m.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:iT.describe("Local root kind where this skill file came from"),base_version:m.number().int().positive().describe("Installed base version for local edits").optional()}),XOt=m.discriminatedUnion("sync_action",[uz.extend({sync_action:m.literal("capture").describe("Capture a local skill without an existing server skill ID"),skill_id:m.never().optional()}),uz.extend({sync_action:m.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:m.string().min(1).describe("Existing skill ID for owner updates")}),uz.extend({sync_action:m.literal("capture_update").describe("Update an existing private captured skill"),skill_id:m.string().min(1).describe("Existing skill ID for private capture updates")}),uz.extend({sync_action:m.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:m.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),ewt=m.object({md5:m.string().min(1),harness:YOt,filename:m.string().min(1).optional(),repo_origin_path:m.string().min(1).optional(),harness_internal_id:m.string().min(1).optional(),file_type:WOt.optional(),artifact_metadata:KOt.optional()}).refine(e=>(e.filename?.trim().length??0)>0||(e.harness_internal_id?.trim().length??0)>0,{path:["harness_internal_id"],message:"filename or harness_internal_id is required"}),fz=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable()}),twt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),QFe=m.object({id:m.string().min(1),author_id:m.string().min(1).nullable(),author:twt.nullable(),created_at:m.string().datetime(),deleted_at:m.string().datetime().nullable(),content:m.string().min(1)}),FFe=m.object({id:m.string().min(1),thread_block_id:m.string().min(1),created_at:m.string().datetime(),resolved_at:m.string().datetime().nullable()}),nwt=FFe.extend({comments:m.array(QFe)}),Rw=m.object({id:m.string().min(1),type:m.string().min(1),index_in_thread:m.number().int().nonnegative(),isCritiqued:m.boolean(),comment_threads:m.array(nwt).optional()}).passthrough(),Rre=m.object({type:m.literal("list"),list_type:m.literal("thread_block"),has_more:m.boolean(),objects:m.array(Rw)}),SFe=Rw.extend({type:m.literal("plan"),prosemirror_json:Cre,thread_file_id:m.string().min(1)}),rwt=m.union([m.literal(-1),m.literal(1)]),GFe=m.union([m.literal(-1),m.literal(0),m.literal(1)]),TFe=m.object({score:m.number().int(),up_count:m.number().int().nonnegative(),down_count:m.number().int().nonnegative(),viewer_vote:GFe}),owt=m.object({value:rwt}),iwt=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable()}),nA=m.object({id:m.string().min(1),thread_id:m.string().min(1),author_id:m.string().min(1).nullable(),author:iwt.nullable(),parent_comment_id:m.string().min(1).nullable(),content:m.string(),created_at:m.string().datetime(),updated_at:m.string().datetime(),deleted_at:m.string().datetime().nullable()}),swt=m.object({type:m.literal("list"),list_type:m.literal("thread_comment"),objects:m.array(nA)}),awt=m.object({content:m.string().trim().min(1).max(4e3),parent_comment_id:m.string().min(1).optional()}),uwt=nA,cwt=m.object({content:m.string().trim().min(1).max(4e3)}),lwt=nA,dwt=nA,UOn=m.discriminatedUnion("kind",[m.object({kind:m.literal("created"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA}),m.object({kind:m.literal("updated"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA}),m.object({kind:m.literal("deleted"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA})]),pwt=m.enum(["pending","generating","ready","failed"]),fwt=m.enum(["pending","generating","ready","failed"]),mwt=m.enum(["pending","placeholder","ai","user","command"]),zFe=m.enum(["pending","generating","ready","failed"]),xre=m.enum(["pending","generating","ready","failed","disabled"]),jFe=m.enum(["pending","generating","ready","failed"]),Awt=m.object({title:m.string().min(1),body:m.string().min(1),files:m.array(m.string()).optional()}),gwt=m.object({status:xre,url:m.string().nullable(),url_expires_at:m.string().nullable(),generated_at:m.string().nullable(),model:m.string().nullable()}),hwt=m.object({status:jFe,steps:m.array(Awt),generated_at:m.string().nullable()}),_wt=m.object({cover:gwt,how_to:hwt}),Ewt=m.object({id:m.string().min(1),title:m.string().min(1),author:m.object({id:m.string().min(1),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable()}),cover:m.object({url:m.string(),url_expires_at:m.string()}),started_at:m.string(),cover_generated_at:m.string()}),ywt=m.object({type:m.literal("list"),list_type:m.literal("card_feed_item"),has_more:m.boolean(),objects:m.array(Ewt)}),HFe=m.enum(["asked","requested","decided","corrected","shared","requirement"]),Swt=m.object({id:m.string().min(1),kind:HFe,summary:m.string().min(1),block_id:m.string().min(1)}),Twt=m.object({type:m.literal("list"),list_type:m.literal("thread_decision"),status:zFe,generated_at:m.string().nullable(),objects:m.array(Swt)}),Iwt=m.object({forker_intent:m.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),bwt=m.object({source_thread_id:m.string().min(1),forker_intent:m.string(),source_distilled:m.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),Cwt=m.object({question:m.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),vwt=m.object({id:m.string().min(1),kind:HFe,summary:m.string().min(1),block_id:m.string().min(1)}),Ire=m.object({thread_id:m.string().min(1),title:m.string().min(1),summary:m.string().nullable(),started_at:m.string().datetime(),score:m.number(),matched_by:m.enum(["summary","decision"]),decisions:m.array(vwt)}),Rwt=m.object({id:m.string().min(1),kind:m.enum(["agent","tool","retrieval","answer","sources"]),title:m.string().min(1),status:m.enum(["completed"]),summary:m.string().min(1),duration_ms:m.number().nonnegative().optional(),metadata:m.object({retrieved_decisions:m.number().int().nonnegative().optional(),returned_sources:m.number().int().nonnegative().optional(),cited_sources:m.number().int().nonnegative().optional(),matched_sources:m.array(Ire).optional(),searched_query:m.string().min(1).optional(),since:m.string().min(1).optional(),until:m.string().min(1).optional(),thread_id:m.string().min(1).optional(),thread_ids:m.array(m.string().min(1)).optional(),question:m.string().min(1).optional()}).optional()}),xwt=m.object({steps:m.array(Rwt)}),Dwt=m.object({answer:m.string(),sources:m.array(Ire),matched_sources:m.array(Ire).describe("Threads matched by the vector decision search before citation filtering"),searched_query:m.string().describe("String embedded for the vector decision search"),trace:xwt.optional()}),xw=m.object({id:m.string().min(1),thread_file_id:m.string().min(1),organization_id:m.string().min(1).nullable(),deleted_at:m.string().datetime().nullable(),author:fz,repo:m.string().min(1),title:m.string().min(1),started_at:m.string().min(1),blocks:Rre,user_message_count:m.number().int().nonnegative(),files_touched:m.array(m.string()),skills_invoked:m.array(m.string()),slash_commands_invoked:m.array(m.string()),harness:Cf,transcript_parsing_state:m.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:m.enum(["private","workspace","public"]),has_plan:m.boolean().optional(),summary:m.string().nullable(),summary_status:pwt,summary_generated_at:m.string().nullable(),title_status:fwt,title_generated_at:m.string().nullable(),title_source:mwt,decisions_status:zFe,decisions_generated_at:m.string().nullable(),score:m.number().int(),up_count:m.number().int().nonnegative(),down_count:m.number().int().nonnegative(),viewer_vote:GFe,comment_count:m.number().int().nonnegative(),is_favorited:m.boolean(),card:_wt}),Bwt=m.object({storage_url:m.string().min(1)}),Nwt=m.object({storage_url:m.string().min(1)}),Owt=m.object({storage_url:m.string(),harness:Cf,thread:xw.nullable()}),wwt=m.object({status:m.literal("complete"),thread_files:m.array(Owt),skill_files:m.array(m.object({storage_url:m.string(),skill:m.object({id:m.string(),name:m.string(),version:m.number().int().positive(),latest_version:m.number().int().positive(),visibility:Dw,root_kind:iT,version_status:vre.optional(),content_hash:m.string()}).nullable()})).optional()}),kwt=m.object({id:m.string(),presigned_url:m.string().nullable(),presigned_url_expires_at:m.string().nullable(),storage_url:m.string(),harness:Cf,expected_md5:m.string(),error:m.string().nullable(),thread:xw.nullable()}),Pwt=m.object({id:m.string(),presigned_url:m.string().nullable(),presigned_url_expires_at:m.string().nullable(),storage_url:m.string(),expected_md5:m.string(),name:m.string(),error:m.string().nullable()}),Mwt=m.object({id:m.string(),substrate:m.enum(["s3","filesystem"]),status:m.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:m.array(kwt),skill_files:m.array(Pwt).optional()}),Lwt=m.object({query:m.string().min(1).describe("Natural-language description of the block or block range to highlight")}),Uwt=m.object({thread_id:m.string(),url:m.string().url(),start_block_id:m.string().nullable(),end_block_id:m.string().nullable(),matched:m.boolean()}),Qwt=m.object({}),Fwt=m.object({thread_id:m.string().min(1)}),Gwt=m.object({visibility:m.enum(["private","workspace","public"]).optional(),title:m.string().trim().min(1).max(200).optional()}).refine(e=>e.visibility!==void 0||e.title!==void 0,{message:"At least one of visibility or title must be provided"}),zwt=m.discriminatedUnion("visibility",[m.object({visibility:m.literal("private")}),m.object({visibility:m.literal("workspace")}),m.object({visibility:m.literal("public"),title:m.string().min(1),author_display_name:m.string().min(1),author_avatar_url:m.string().nullable(),first_user_message:m.string().nullable(),summary:m.string().nullable(),started_at:m.string().min(1),harness:Cf,cover_url:m.string().nullable()})]),jwt=m.object({id:m.string().min(1),author:fz,repo:m.string().min(1),title:m.string().min(1),started_at:m.string().min(1),blocks:Rre,user_message_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative(),files_touched:m.array(m.string()),skills_invoked:m.array(m.string()),harness:Cf,visibility:m.enum(["private","workspace","public"]),has_plan:m.boolean().optional(),is_favorited:m.boolean()}),IFe=m.object({type:m.literal("list"),list_type:m.literal("thread"),has_more:m.boolean(),objects:m.array(jwt)}),Hwt=m.enum(["recent","popular"]),$wt=m.enum(["everyone","following"]),qwt=xw,Vwt=m.object({type:m.literal("list"),list_type:m.literal("discover_thread"),has_more:m.boolean(),objects:m.array(qwt)}),Ywt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),sort:Hwt.optional(),scope:$wt.optional(),harness:Cf.optional(),search:m.string().max(200).optional()}),Kwt=m.object({thread_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),organization_count:m.number().int().nonnegative(),harness_breakdown:m.record(m.string(),m.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Cf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),Jwt=m.object({id:m.string(),status:m.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:m.string(),thread_count:m.number().int().nonnegative()}),Zwt=m.object({type:m.literal("list"),list_type:m.literal("upload_session"),objects:m.array(Jwt)}),Wwt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional()}),Xwt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),author_ids:m.string().min(1).optional(),created_at:m.string().min(1).optional(),filepath_prefixes:m.string().min(1).optional(),q:m.string().trim().min(1).max(200).optional()}),ekt=m.object({path:m.string().min(1),start_offset:m.number().int().nonnegative(),end_offset:m.number().int().positive()}),lz=m.object({id:m.string(),display_name:m.string(),avatar_url:m.string().nullable()}),tkt=m.object({before:m.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:m.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),nkt=m.object({id:m.string(),name:m.string(),description:m.string().nullable(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative().nullable(),content_hash:m.string().nullable(),has_content:m.boolean(),owner:lz.nullable(),usage_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),first_used_at:m.string().nullable(),last_used_at:m.string().nullable()}),rkt=m.object({type:m.literal("list"),list_type:m.literal("skill"),has_more:m.boolean(),objects:m.array(nkt)}),okt=m.object({id:m.string(),title:m.string(),visibility:m.enum(["private","workspace","public"]),started_at:m.string(),author:fz,skills_invoked:m.array(m.string())}),ikt=m.object({version:m.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:m.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:vre.describe("Review status for this skill version"),created_at:m.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:lz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:m.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:lz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:m.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),bFe=m.object({id:m.string(),name:m.string(),description:m.string().nullable(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative().nullable(),content_hash:m.string().nullable(),owner:lz.nullable(),usage_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),first_used_at:m.string().nullable(),last_used_at:m.string().nullable(),versions:m.array(ikt),threads:m.array(okt)}),skt=m.object({id:m.string(),name:m.string(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative(),content_hash:m.string()}),akt=m.object({installation_id:m.string(),already_registered:m.boolean(),body_md_url:m.string(),skill:skt}),CFe=m.object({id:m.string(),skill_id:m.string(),installed_version:m.number().int().nonnegative().nullable(),already_registered:m.boolean().optional()}),ukt=m.object({installed_version:m.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),vFe=m.object({id:m.string(),name:m.string(),version:m.number().int().positive(),latest_version:m.number().int().positive(),visibility:Dw,root_kind:iT,version_status:vre,content_hash:m.string()}),ckt=m.object({reason:m.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),lkt=m.object({id:m.string(),skill_id:m.string(),name:m.string(),description:m.string().nullable(),root_kind:iT,latest_version:m.number().int().nonnegative(),latest_content_hash:m.string(),installed_version:m.number().int().nonnegative().nullable()}),dkt=m.object({type:m.literal("list"),list_type:m.literal("skill_installation_sync"),has_more:m.boolean(),objects:m.array(lkt)}),pkt=m.object({path:m.string().min(1),text:m.string().max(64e3)}),fkt=m.enum(["text_edit","redact","delete_block"]),mkt=m.object({id:m.string(),thread_block_id:m.string(),editor:m.object({id:m.string(),display_name:m.string()}),kind:fkt,path:m.string().nullable(),previous_text:m.string().nullable(),new_text:m.string().nullable(),created_at:m.string()}),Akt=m.object({type:m.literal("list"),list_type:m.literal("thread_block_edit"),objects:m.array(mkt)}),gkt=m.object({organization_count:m.number().int().nonnegative(),user_count:m.number().int().nonnegative(),thread_count:m.number().int().nonnegative(),thread_count_last_24h:m.number().int().nonnegative(),user_count_last_24h:m.number().int().nonnegative()}),hkt=m.object({id:m.string(),name:m.string(),email_domains:m.array(m.string()),member_count:m.number().int().nonnegative(),thread_count:m.number().int().nonnegative(),default_thread_visibility:m.enum(["private","workspace","public"]),created_at:m.string()}),_kt=m.object({type:m.literal("list"),list_type:m.literal("admin_organization"),objects:m.array(hkt)}),$Fe=m.object({id:m.string(),name:m.string()}),Ekt=m.object({id:m.string(),display_name:m.string(),workos_id:m.string(),thread_count:m.number().int().nonnegative(),onboarded_at:m.string().nullable(),created_at:m.string(),organizations:m.array($Fe)}),ykt=m.object({q:m.string().trim().min(1).max(120).optional()}),Skt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1)}),Tkt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!0)}),Ikt=m.object({type:m.literal("list"),list_type:m.literal("admin_user"),objects:m.array(Ekt)}),qFe=m.object({id:m.string(),title:m.string(),started_at:m.string(),created_at:m.string(),deleted_at:m.string().nullable(),visibility:m.enum(["private","workspace","public"]),harness:Cf,harness_internal_id:m.string(),thread_file_id:m.string(),transcript_parsing_state:m.enum(["pending","parsed","too_large_to_parse","failed"]),author:fz,organization:$Fe.nullable()}),bkt=m.object({id:m.string(),content_type:m.enum(["transcript","plan"]),harness:Cf,harness_internal_id:m.string(),expected_md5:m.string(),size_in_bytes:m.number().int().nonnegative().nullable(),created_at:m.string()}),Ckt=m.object({thread:qFe,latest_transcript_file:bkt.nullable()}),vkt=m.object({type:m.literal("list"),list_type:m.literal("admin_thread"),has_more:m.boolean(),objects:m.array(qFe)}),Rkt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional()}),xkt=m.object({thread_id:m.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:m.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Cf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:m.string().min(1).optional().describe("Harness-native session id.")}),Dkt=m.object({thread_id:m.string().min(1),thread_file_id:m.string().min(1),event_name:m.literal("lore/thread-files.parse.requested")}),RFe=m.object({token:m.string().min(1),thread_id:m.string().min(1)}),Bkt=m.object({visitor:m.string().min(1).max(64).optional()}),Nkt=m.object({user_id:m.string(),display_name:m.string(),shares_sent:m.number().int().nonnegative(),unique_viewers:m.number().int().nonnegative(),attributed_signups:m.number().int().nonnegative()}),Okt=m.object({window_days:m.number().int().positive(),shares_sent:m.number().int().nonnegative(),unique_viewers:m.number().int().nonnegative(),attributed_signups:m.number().int().nonnegative(),active_sharers:m.number().int().nonnegative(),k_factor:m.number().nullable(),shares_sent_sparkline:m.array(m.number().int().nonnegative()),top_sharers:m.array(Nkt)}),wkt=m.object({windows:m.array(Okt)}),cz=m.object({period:m.string(),active:m.number().int().nonnegative()}),kkt=m.object({daily:m.array(cz),weekly:m.array(cz),monthly:m.array(cz),allTime:m.array(cz)}),Pkt=m.object({quoted_text:m.string().min(1),comment:m.string().nullable(),type:m.enum(["comment","highlight:trapdoor"])}),Mkt=FFe,Lkt=QFe.extend({comment_thread_id:m.string().min(1)}),Ukt=m.object({markdown:m.string().min(1)}),Qkt=m.object({storage_url:m.string().min(1),thread_file_id:m.string().min(1),parsed_plan_block:SFe,critiqued_plan_block:SFe,annotations:m.array(Pkt),comment_threads:m.array(Mkt),comments:m.array(Lkt)}),Fkt=m.object({key:m.string().min(1),label:m.string().min(1),description:m.string().optional(),type:m.enum(["text","textarea","url","email"]),required:m.boolean(),defaultValue:m.string()}),Gkt=m.object({id:m.string().min(1),name:m.string().min(1),description:m.string().min(1),deliveryTrigger:m.string().min(1),fields:m.array(Fkt),availableFormats:m.array(m.enum(["html","text"]))}),zkt=m.object({templates:m.array(Gkt)}),jkt=m.object({values:m.record(m.string(),m.string())}),Hkt=m.object({subject:m.string().min(1),html:m.string().optional(),text:m.string().optional()}),$kt=m.object({to:m.string().email().describe("Recipient email address."),values:m.record(m.string(),m.string())}),qkt=m.object({id:m.string().min(1)}),sx=m.enum(sre),VFe=m.object({workspace_scope:m.boolean(),review:m.boolean(),shared_thread_ttl_days:m.number().int().positive().nullable()}),bre=m.object({subject_type:m.enum(["user","organization"]),subject_id:m.string().min(1),effective_plan:sx,admin_override:sx.nullable(),stripe_subscription_status:m.string().nullable(),cancel_at_period_end:m.boolean(),current_period_end:m.string().nullable(),seat_quantity:m.number().int().positive(),member_count:m.number().int().nonnegative().nullable(),features:VFe}),Vkt=m.object({effective_plan:sx,features:VFe,user:bre,organization:bre.nullable()}),Ykt=m.object({plan:m.enum(["creator","team"]),seat_quantity:m.number().int().positive().optional()}),Kkt=m.object({checkout_url:m.string().min(1)}),Jkt=m.object({portal_url:m.string().min(1)}),Zkt=m.object({seat_quantity:m.number().int().positive()}),xFe=m.object({plan:sx.nullable()}),dz=m.object({subject_type:m.enum(["user","organization"]),subject_id:m.string().min(1),label:m.string().min(1),effective_plan:sx,admin_override:sx.nullable(),stripe_subscription_status:m.string().nullable(),seat_quantity:m.number().int().positive()}),Wkt=m.object({users:m.array(dz),organizations:m.array(dz)}),Xkt=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),avatar_url:m.string().nullable()}),ePt=m.object({thread_id:m.string().min(1),title:m.string().min(1),author:Xkt,last_active_at:m.string().datetime(),last_block_excerpt:m.string().nullable(),last_block_kind:m.string().min(1).nullable(),is_streaming:m.boolean()}),tPt=m.object({type:m.literal("list"),list_type:m.literal("live_thread"),objects:m.array(ePt)}),nPt=m.object({thread_id:m.string().min(1)}),rPt=m.object({thread_id:m.string().min(1),last_seen_at:m.string().datetime(),started_at:m.string().datetime()}),oPt=m.object({user_id:m.string().min(1),organization_id:m.string().min(1).nullable(),last_seen_at:m.string().datetime(),started_at:m.string().datetime()}),iPt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!0),follower_count:m.number().int().nonnegative()}),sPt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!1),follower_count:m.number().int().nonnegative()}),PE=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),avatar_url:m.string().nullable(),bio:m.string().max(280).nullable(),is_following:m.boolean(),is_self:m.boolean()}),DFe=m.object({type:m.literal("list"),list_type:m.literal("user_follow"),objects:m.array(PE)}),aPt=PE.extend({mutuals:m.array(PE),mutual_count:m.number().int().nonnegative()}),uPt=m.object({type:m.literal("list"),list_type:m.literal("follow_suggestion"),objects:m.array(aPt)}),cPt=PE.extend({referred_at:m.string().min(1)}),lPt=m.object({type:m.literal("list"),list_type:m.literal("referral"),count:m.number().int().nonnegative(),recent:m.array(cPt)}),dPt=m.object({date:m.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:m.number().int().nonnegative(),total:m.number().int().nonnegative()}),pPt=m.object({inviter:PE,organization_name:m.string().nullable(),referred_count:m.number().int().positive(),latest_referred_at:m.string().min(1)}),fPt=m.object({inviter:PE,referee:PE,attributed_at:m.string().min(1)}),mPt=m.object({total_referred_signups:m.number().int().nonnegative(),active_inviters:m.number().int().nonnegative(),referred_signups_last_30d:m.number().int().nonnegative(),total_signups_last_30d:m.number().int().nonnegative(),daily_counts:m.array(dPt),top_inviters:m.array(pPt),recent_attributions:m.array(fPt)}),APt=m.object({source:m.string().min(1),signups:m.number().int().nonnegative()}),gPt=m.object({sources:m.array(APt),total_with_source:m.number().int().nonnegative(),total_without_source:m.number().int().nonnegative()}),hPt=m.object({date:m.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:m.number().int().nonnegative()}),_Pt=m.object({window_start:m.string().datetime(),window_end:m.string().datetime(),total_contributions:m.number().int().nonnegative(),days_active:m.number().int().nonnegative(),daily_average:m.number().nonnegative(),current_streak_days:m.number().int().nonnegative(),days:m.array(hPt)}),EPt=m.object({type:m.literal("thread_created"),occurred_at:m.string().datetime(),id:m.string().min(1),thread:m.object({id:m.string().min(1),title:m.string(),visibility:m.enum(["private","workspace","public"])})}),yPt=m.object({type:m.literal("comment_posted"),occurred_at:m.string().datetime(),id:m.string().min(1),comment_excerpt:m.string(),thread:m.object({id:m.string().min(1),title:m.string(),visibility:m.enum(["private","workspace","public"])})}),SPt=m.object({type:m.literal("project_published"),occurred_at:m.string().datetime(),id:m.string().min(1),project:m.object({id:m.string().min(1),name:m.string().min(1)})}),TPt=m.object({type:m.literal("user_followed"),occurred_at:m.string().datetime(),id:m.string().min(1),followee:PE}),IPt=m.discriminatedUnion("type",[EPt,yPt,SPt,TPt]),bPt=m.object({type:m.literal("list"),list_type:m.literal("user_activity"),objects:m.array(IPt)}),CPt=m.object({id:m.string().min(1),name:m.string().min(1),excerpt:m.string(),published_at:m.string().datetime(),updated_at:m.string().datetime()}),vPt=m.object({type:m.literal("list"),list_type:m.literal("profile_published_project"),objects:m.array(CPt)}),BFe=m.object({id:m.string().min(1),published_at:m.string().datetime().nullable()}),RPt=m.enum(["avatar","banner"]),YFe=m.enum(["image/png","image/jpeg","image/webp","image/gif"]),xPt=m.object({kind:RPt,content_type:YFe,base64_data:m.string().min(1)}),DPt=m.object({substrate:m.enum(["s3","filesystem"]),storage_url:m.string().min(1)}),BPt=m.object({content_type:YFe,base64_data:m.string().min(1)}),NPt=m.object({cover_status:xre,cover_url:m.string().min(1),cover_url_expires_at:m.string().min(1),cover_generated_at:m.string().min(1)}),OPt=kFe,mz=eOt.router({health:{method:"GET",path:"/health",responses:{200:m.object({status:m.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:m.object({status:m.enum(["ok","degraded"]),environment:m.string(),checks:m.object({database:m.object({ok:m.boolean(),latencyMs:m.number().int().nonnegative().optional(),error:m.string().optional()}),migrations:m.object({ok:m.boolean(),appliedCount:m.number().int().nonnegative(),pendingCount:m.number().int().nonnegative(),latestApplied:m.string().optional(),pending:m.array(m.string())}),storage:m.object({ok:m.boolean(),bucket:m.string().optional(),error:m.string().optional()})})}),503:m.object({status:m.literal("down"),environment:m.string(),error:m.string()})},summary:"Diagnostic health check covering database connectivity, migration drift, and storage reachability. Used by smoke tests and operators; NOT wired into Railway healthcheckPath."},whoAmI:{method:"GET",path:"/whoami",headers:m.object({authorization:m.string().min(1).optional(),"x-lore-referral-token":m.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":m.string().min(1).max(40).optional(),"user-agent":m.string().min(1).max(1024).optional()}),responses:{200:aOt,401:H,500:H,502:H},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:yFe,503:H},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:yFe,503:H},summary:"Return public WorkOS configuration for the Lore desktop app (dedicated native client, separate from the web/CLI client)"},getCliStatus:{method:"GET",path:"/users/me/cli-status",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:JOt,401:H},summary:"Return whether the viewer has connected the Lore CLI (i.e., uploaded any thread under a non-unspecified harness), plus the latest upload timestamp."},recordHeartbeat:{method:"POST",path:"/heartbeat",headers:m.object({authorization:m.string().min(1).optional()}),body:nPt,responses:{200:rPt,401:H,403:H,404:H,422:H},summary:"Record (or refresh) a presence heartbeat for the authenticated user against one of their own threads. Idempotent; the daemon should call this every ~30s while a session is open."},recordProductPresence:{method:"POST",path:"/users/me/presence",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:oPt,401:H},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},listLiveThreads:{method:"GET",path:"/threads/live",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:tPt,401:H,403:H},summary:"List people with user-block activity in the last 10 minutes. Includes the viewer\u2019s workspace and followed authors, deduped per author, max 10."},listThreads:{method:"GET",path:"/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Xwt,responses:{200:IFe,401:H},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:m.object({authorization:m.string().min(1).optional()}),body:Qwt,responses:{201:Fwt,401:H},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:xw,404:H},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:IFe,404:H,409:H},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:m.object({id:m.string().min(1).describe("Thread id to share")}),headers:m.object({authorization:m.string().min(1).optional()}),body:Lwt,responses:{200:Uwt,401:H,404:H,409:H},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:m.object({authorization:m.string().min(1).optional()}),body:Cwt,responses:{200:Dwt,401:H},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:m.object({id:m.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:m.object({authorization:m.string().min(1).optional()}),body:Iwt,responses:{200:bwt,403:H,404:H},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),query:Wwt,responses:{200:Rre,401:H},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xOt,responses:{201:DOt,401:H,404:H},summary:"Create a new block-level comment thread on a visible thread block"},createThreadBlockComment:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId/comments",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1),commentThreadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:OOt,responses:{201:wOt,401:H,404:H,409:H},summary:"Reply to a block-level comment thread on a visible thread block"},updateThreadBlockCommentThread:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1),commentThreadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:MOt,responses:{200:LOt,401:H,404:H},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:m.object({authorization:m.string().min(1).optional()}),query:tkt,responses:{200:rkt,401:H},summary:"List visible workspace skills and the viewer's private captured skills"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:m.object({id:m.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:bFe,401:H,404:H},summary:"Get visible skill details by stable skill ID"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:m.object({id:m.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:m.object({version:m.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:m.string(),401:H,403:H,404:H},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID to install")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:akt,401:H,403:H,404:H},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID to uninstall")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:CFe,401:H},summary:"Unregister the current user installation for a skill (idempotent)"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:m.object({id:m.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ukt,responses:{200:CFe,401:H,404:H,422:H},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:dkt,401:H},summary:"List installed skills with latest accepted version metadata"},publishSkill:{method:"POST",path:"/skills/:id/publish",pathParams:m.object({id:m.string().min(1).describe("Private captured skill ID to publish")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:bFe,401:H,403:H,404:H},summary:"Promote a private captured skill to the caller workspace"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID"),version:m.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:vFe,400:H,401:H,403:H,404:H},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID"),version:m.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ckt.optional(),responses:{200:vFe,400:H,401:H,403:H,404:H},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:ekt,responses:{200:Rw,401:H,403:H,404:H,422:H},summary:"Permanently redact a character range within a text field of a thread block (author only)"},updateThreadBlockText:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/text",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:pkt,responses:{200:Rw,401:H,403:H,404:H,422:H},summary:"Replace a single text leaf in a thread block with new content (author only)"},critiqueThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/critique",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:Rw,401:H,403:H,404:H,409:H,422:H},summary:"Critique a plan block once and persist its annotations as nested comment threads (author only)"},listThreadBlockEdits:{method:"GET",path:"/threads/:threadId/blocks/:blockId/edits",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Akt,401:H,404:H},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Twt,401:H,404:H},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:Gwt,responses:{200:xw,401:H,403:H,404:H},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.null(),401:H,403:H,404:H},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:m.object({cover_status:xre,how_to_status:jFe}),401:H,403:H,404:H,429:H.extend({retry_after_seconds:m.number().int().nonnegative()})},summary:"Enqueue cover image + how-to recipe generation for the thread. Author-only. Idempotent \u2014 recently-fired statuses are not double-enqueued. Rate-limited: at most one cover generation per minute per thread (cooldown begins when the previous cover finishes). Used to populate cards on legacy threads (created before Lore Cards) and to retry after a 'failed' status or opt back in from 'disabled'."},uploadThreadCover:{method:"POST",path:"/threads/:id/card/cover/upload",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:BPt,responses:{200:NPt,401:H,403:H,404:H,413:H,422:H},summary:"Upload a custom cover image for a thread. Author or Tanagram admin only. Bytes go to the same storage substrate the AI cover uses (S3 in prod, filesystem in dev), and the threads row is updated atomically with the new cover_storage_url, cover_status='ready', cover_generated_at=now, cover_model='user-uploaded' so subsequent re-rolls / how-to fan-outs treat the upload like any other ready cover."},castThreadVote:{method:"PUT",path:"/threads/:id/vote",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:owt,responses:{200:TFe,401:H,403:H,404:H,422:H},summary:"Cast or change the caller's up/down vote on a public thread. Idempotent \u2014 re-casting the same value is a no-op."},clearThreadVote:{method:"DELETE",path:"/threads/:id/vote",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:TFe,401:H,404:H},summary:"Clear the caller's vote on a thread. No-op when the caller hasn't voted."},listThreadComments:{method:"GET",path:"/threads/:threadId/comments",pathParams:m.object({threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:swt,403:H,404:H},summary:"List all (live + soft-deleted as tombstones) comments on a public thread, flat with parent_comment_id pointers."},createThreadComment:{method:"POST",path:"/threads/:threadId/comments",pathParams:m.object({threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:awt,responses:{201:uwt,401:H,403:H,404:H,422:H},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:m.object({threadId:m.string().min(1),commentId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:cwt,responses:{200:lwt,401:H,403:H,404:H,422:H},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:m.object({threadId:m.string().min(1),commentId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:dwt,401:H,403:H,404:H},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:m.object({id:m.string().min(1)}),responses:{200:zwt,404:H},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:kFe,404:H},summary:"Public profile for a user. Optional auth \u2014 unauthenticated viewers see only public thread metadata; signed-in viewers see counts scoped to the threads they'd normally be able to access."},updateCurrentUser:{method:"PATCH",path:"/users/me",headers:m.object({authorization:m.string().min(1).optional()}),body:uOt,responses:{200:wFe,401:H,409:H,422:H},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:m.object({handle:NFe}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:OPt,404:H},summary:"Resolve a public profile by handle \u2014 same shape as GET /users/:id but keyed on the user's chosen handle."},listMyReferrals:{method:"GET",path:"/users/me/referrals",headers:m.object({authorization:m.string().min(1)}),responses:{200:lPt,401:H},summary:"Total count plus the most-recent referees the authenticated user has attributed via `/?invited_by=\u2026` invite links. Mirrors the inviter side of users.referred_by_user_id."},listUserActivity:{method:"GET",path:"/users/:id/activity",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({limit:m.coerce.number().int().positive().max(100).optional()}),responses:{200:bPt,404:H},summary:"Reverse-chronological activity feed for a user, scoped to what the viewer can see (same visibility rules as listThreads)."},getUserContributions:{method:"GET",path:"/users/:id/contributions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:_Pt,404:H},summary:"Daily contribution counts for the trailing 365 days \u2014 counts thread blocks the user authored on threads visible to the viewer."},listUserFollowers:{method:"GET",path:"/users/:id/followers",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:DFe,404:H},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:DFe,404:H},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:uPt,404:H},summary:"Mutual-follow suggestions for a viewer: walks the viewer's followees one hop further and ranks candidates by mutual count. Replaces a 1 \u2192 24 client-side fan-out across `/users/:seed/following`."},followUser:{method:"POST",path:"/users/:id/follow",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:iPt,401:H,404:H,409:H,422:H},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:sPt,401:H,404:H},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:vPt,404:H},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:BFe,401:H,403:H,404:H},summary:"Publish a project to the author's public profile. Stamps published_at with `now()`. Author-only."},unpublishProject:{method:"DELETE",path:"/projects/:id/publish",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:BFe,401:H,403:H,404:H},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:m.object({authorization:m.string().min(1).optional()}),body:xPt,responses:{200:DPt,401:H,413:H,422:H},summary:"Upload an avatar or banner image (base64-encoded JSON body). The API streams the bytes to its configured storage substrate using its own credentials and returns the canonical storage URL the client passes to PATCH /users/me."},listOrganizationMembers:{method:"GET",path:"/organization/members",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:lOt,401:H},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:m.object({authorization:m.string().min(1).optional()}),body:dOt,responses:{201:pOt,401:H,403:H,409:H,422:H},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:fOt,401:H,422:H,503:H},summary:"Create or reuse a WorkOS organization for the authenticated user\u2019s non-public email domain and add the user as a member."},listRepositories:{method:"GET",path:"/repositories",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:VOt,401:H,403:H},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:m.object({authorization:m.string().min(1).optional()}),body:SOt,responses:{201:zOt,401:H,403:H},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:QOt,401:H,403:H,404:H},summary:"Load a thread-backed plan container visible to the authenticated user, including all visible plan revisions in that thread (only the latest revision carries body + prosemirror_json; older revisions are metadata-only and load on demand via getPlanRevision)"},getPlanRevision:{method:"GET",path:"/plans/:id/revisions/:revisionId",pathParams:m.object({id:m.string().min(1),revisionId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:UOt,401:H,403:H,404:H},summary:"Load a single revision body + prosemirror_json + comment threads for a thread-backed plan container. Used to fetch non-latest revisions on demand without paying for every revision when the plan is first opened"},createPlanCommentThread:{method:"POST",path:"/plans/:id/comment-threads",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:vOt,responses:{201:ROt,401:H,403:H,404:H,422:H},summary:"Create a new inline comment thread on a specific revision inside a thread-backed plan container"},createPlanComment:{method:"POST",path:"/plans/:id/comment-threads/:threadId/comments",pathParams:m.object({id:m.string().min(1),threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:BOt,responses:{201:NOt,401:H,403:H,404:H,409:H},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:m.object({id:m.string().min(1),threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:kOt,responses:{200:POt,401:H,403:H,404:H},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:m.object({authorization:m.string().min(1).optional()}),query:GOt,responses:{200:FOt,401:H,403:H},summary:"List thread-backed plan containers visible to the authenticated user in their organization, ordered by latest visible revision and optionally filtered by author or repository"},listBuildingBlockSnapshots:{method:"GET",path:"/building_blocks",headers:m.object({authorization:m.string().min(1).optional()}),query:HOt,responses:{200:jOt,401:H,403:H},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Zwt,401:H},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({thread_files:m.array(ewt).optional(),skill_files:m.array(XOt).optional()}),responses:{201:Mwt,400:H,401:H},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({thread_files:m.array(Bwt).optional(),skill_files:m.array(Nwt).optional()}),responses:{200:wwt,400:H,401:H,404:H,409:H,422:H},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:gkt,401:H,403:H},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:_kt,401:H,403:H},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:ykt,headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Ikt,401:H,403:H},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Rkt,responses:{200:vkt,401:H,403:H},summary:"List live threads across every organization. Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:m.object({authorization:m.string().min(1).optional()}),query:xkt,responses:{200:Ckt,400:H,401:H,403:H,404:H},summary:"Look up a thread by thread id, thread file id, or harness session id. Tanagram admins only."},adminForceFollow:{method:"POST",path:"/admin/connections/follow",headers:m.object({authorization:m.string().min(1).optional()}),body:Skt,responses:{200:Tkt,401:H,403:H,404:H,422:H},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.null(),401:H,403:H,404:H},summary:"Permanently remove a thread. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:m.object({id:m.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:Dkt,401:H,403:H,404:H},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:m.object({limit:m.coerce.number().int().min(1).max(48).optional()}),responses:{200:ywt},summary:"Slim feed of public threads with a ready cover image, ordered by cover_generated_at descending. Powers the landing-page UGC card scroll. Returns presigned cover URLs inline so the grid renders without a follow-up round trip per card."},listDiscoverThreads:{method:"GET",path:"/discover/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Ywt,responses:{200:Vwt},summary:"Feed of public threads with sort, harness filter, search, and cursor pagination. Auth is optional and populates viewer_vote."},discoverStats:{method:"GET",path:"/discover/stats",responses:{200:Kwt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:mOt,responses:{201:hOt,409:H},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},createRecruitingInterest:{method:"POST",path:"/recruiting_interests",body:gOt,responses:{201:m.object({})},summary:"Record recruiting interest (target profile or demo request) and notify via Slack."},createFeedback:{method:"POST",path:"/feedback",headers:m.object({authorization:m.string().min(1).optional()}),body:_Ot,responses:{201:EOt,401:H,422:H,429:H},summary:"Submit in-app feedback. Persists to lore.feedback_entries and best-effort posts to the #lore-feedback Slack channel. Rate-limited to 30 submissions/hour per user."},createShareToken:{method:"POST",path:"/threads/:id/share-token",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:RFe,401:H,403:H,404:H,409:H},summary:"Mint a short share-link token for a public thread. Author only. The token powers `/s/:token` short URLs and enables k-factor attribution."},resolveShareToken:{method:"GET",path:"/referrals/resolve/:token",pathParams:m.object({token:m.string().min(1).max(16)}),headers:m.object({authorization:m.string().min(1).optional()}),query:Bkt,responses:{200:RFe,404:H},summary:"Resolve a share-link token to its thread and record the view. Works for signed-out viewers; if a bearer token is present we attribute the view to that Lore user for analytics."},adminGrowth:{method:"GET",path:"/admin/growth",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:wkt,401:H,403:H},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:kkt,401:H,403:H},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 union of oauth token issuance and thread-event spine. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:mPt,401:H,403:H},summary:"Cross-organization invite-link funnel: lifetime + 30-day counts, 60-day daily timeseries, top inviters, recent attributions. Tanagram admins only."},adminOnboardingSources:{method:"GET",path:"/admin/onboarding/sources",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:gPt,401:H,403:H},summary:"Signed-up persons grouped by PostHog `initial_source` first-touch attribution. Powers bucket 1 of /admin's Onboarding flow tab; sourced via HogQL."},adminRunCritiquePlayground:{method:"POST",path:"/admin/critique-playground/run",headers:m.object({authorization:m.string().min(1).optional()}),body:Ukt,responses:{200:Qkt,401:H,403:H,409:H},summary:"Admin-only critique playground that saves markdown to a file:// plan artifact and returns parsed + critiqued plan blocks."},adminListEmailTemplates:{method:"GET",path:"/admin/email-templates",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:zkt,401:H,403:H},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:m.object({id:m.string().min(1).describe("Email template id.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:jkt,responses:{200:Hkt,400:H,401:H,403:H,404:H},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:m.object({id:m.string().min(1).describe("Email template id.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:$kt,responses:{200:qkt,400:H,401:H,403:H,404:H,503:H},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Vkt,401:H},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:m.object({authorization:m.string().min(1).optional()}),body:Ykt,responses:{200:Kkt,400:H,401:H,403:H,503:H},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({subject_type:m.enum(["user","organization"]).default("user")}).optional(),responses:{200:Jkt,401:H,404:H,503:H},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:m.object({authorization:m.string().min(1).optional()}),body:Zkt,responses:{200:bre,400:H,401:H,403:H,404:H,503:H},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},adminListBilling:{method:"GET",path:"/admin/billing",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Wkt,401:H,403:H},summary:"List every user and org with current plan + override for the admin panel."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xFe,responses:{200:dz,401:H,403:H,404:H},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xFe,responses:{200:dz,401:H,403:H,404:H},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:rFe,regions:aFe,entities:dFe,docs:tFe,mentions:pFe,favorites:AFe,search:hFe,slack:_Fe},{pathPrefix:"/api"})});import{AsyncLocalStorage as wPt}from"node:async_hooks";import{createHash as kPt,randomBytes as JFe}from"node:crypto";import nc from"node:fs/promises";import Bw from"node:path";function e4e(e){return Bw.join(e,"discovery-cache.json")}function GPt(e){return Bw.join(e,"tokens-refresh.lock")}async function Ore(e,t,n={}){let r=KFe.getStore();if(r?.has(e))return t();let o=n.waitMs??MPt,i=n.staleMs??LPt,s=n.now??Date.now,c=n.sleep??(v=>new Promise(x=>setTimeout(x,v))),l=GPt(e),f=Bw.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,y=s(),S=!1;for(;!S;)try{await nc.mkdir(e,{recursive:!0,mode:448}),await nc.chmod(e,448).catch(()=>{}),await nc.mkdir(l,{mode:448});try{await nc.writeFile(f,h,{mode:384})}catch(v){throw await nc.rm(l,{recursive:!0,force:!0}),v}S=!0}catch(v){if(!$Pt(v))throw v;if(await qPt(l,i,s)){await nc.rm(l,{recursive:!0,force:!0});continue}if(s()-y>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await c(Math.min(UPt,o))}let b=new Set(r??[]);b.add(e);try{return await KFe.run(b,t)}finally{await VPt(l,f,h)}}function t4e(e){let t=new URL(e),n=t.pathname==="/"?"":t.pathname;return`${t.origin}/.well-known/oauth-protected-resource${n}`}async function Az(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await HPt(e.stateDir);if(r!==null&&r.resource===e.resource){if(n()-r.fetchedAt<PPt)return r.endpoints;let s=await zPt({cached:r,resource:e.resource,stateDir:e.stateDir,fetchFn:t,nowFn:n});if(s!==null)return s}let o=r!==null&&r.resource===e.resource?r:null;return jPt({cached:o,resource:e.resource,stateDir:e.stateDir,fetchFn:t,nowFn:n})}async function zPt(e){if(!e.cached.prmEtag)return null;let t=t4e(e.resource),n;try{n=await e.fetchFn(t,{headers:{"If-None-Match":e.cached.prmEtag}})}catch{return e.cached.endpoints}return n.status===304?(await a4e({...e.cached,fetchedAt:e.nowFn()},e.stateDir),e.cached.endpoints):n.ok?null:e.cached.endpoints}async function jPt(e){let t=t4e(e.resource),n;try{n=await e.fetchFn(t)}catch(y){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: could not reach ${t} and no cached endpoints exist. Check your network connection. (${y.message})`)}if(!n.ok){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: GET ${t} returned HTTP ${n.status}. Check that the server is reachable and the resource URL is correct.`)}let r=n.headers.get("etag")??void 0,o;try{o=await n.json()}catch{throw new Error(`Discovery failed: GET ${t} returned non-JSON body.`)}let i=QPt.safeParse(o);if(!i.success){let y=i.error.issues.map(S=>S.path.join(".")||S.message).join(", ");throw new Error(`Discovery failed: PRM at ${t} is missing required fields: ${y}.`)}if(i.data.authorization_servers.length===0)throw new Dre;let s=`${i.data.authorization_servers[0]}/.well-known/oauth-authorization-server`,c;try{c=await e.fetchFn(s)}catch(y){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: could not reach AS metadata at ${s} and no cached endpoints exist. (${y.message})`)}if(!c.ok){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: GET ${s} returned HTTP ${c.status}.`)}let l;try{l=await c.json()}catch{throw new Error(`Discovery failed: GET ${s} returned non-JSON body.`)}let f=FPt.safeParse(l);if(!f.success){let y=f.error.issues.map(S=>S.path.join(".")||S.message).join(", ");throw new Error(`Discovery failed: AS metadata at ${s} is missing required fields: ${y}.`)}let h={audience:i.data.resource,deviceAuthorizationEndpoint:`${f.data.issuer}/oauth2/device_authorization`,tokenEndpoint:f.data.token_endpoint,authorizationEndpoint:f.data.authorization_endpoint??`${f.data.issuer}/oauth2/authorize`};return await a4e({resource:e.resource,endpoints:h,fetchedAt:e.nowFn(),prmEtag:r},e.stateDir),h}async function n4e(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await t(e.tokenEndpoint,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e.current.refresh_token,client_id:e.clientId}).toString()});if(!r.ok){let s;try{s=await r.json()}catch{s=void 0}throw s?.error==="invalid_grant"?new Nw:new Error(`Cloud refresh failed with HTTP ${r.status}; tokens preserved for retry.`)}let o;try{o=await r.json()}catch{throw new Error(`Cloud refresh response was not valid JSON (HTTP ${r.status}).`)}let i=XFe.safeParse(o);if(!i.success)throw new Error(`Cloud refresh response failed schema validation: ${i.error.message}`);return{access_token:i.data.access_token,refresh_token:i.data.refresh_token,expires_at:n()+i.data.expires_in*1e3,scope:i.data.scope??e.current.scope}}function r4e(){let e=JFe(32).toString("base64url"),t=kPt("sha256").update(e).digest("base64url");return{codeVerifier:e,codeChallenge:t}}function o4e(){return JFe(16).toString("base64url")}function i4e(e){let t=new URL(e.authorizationEndpoint),n=t.searchParams;return n.set("response_type","code"),n.set("client_id",e.clientId),n.set("redirect_uri",e.redirectUri),n.set("code_challenge",e.codeChallenge),n.set("code_challenge_method","S256"),e.resource&&n.set("resource",e.resource),n.set("scope",e.scope),n.set("state",e.state),e.prompt&&n.set("prompt",e.prompt),t.toString()}async function s4e(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await t(e.tokenEndpoint,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e.code,code_verifier:e.codeVerifier,client_id:e.clientId,redirect_uri:e.redirectUri,...e.resource?{resource:e.resource}:{}}).toString()});if(!r.ok){let s;try{s=await r.json()}catch{s=void 0}let c=typeof s?.error=="string"?s.error:`http_${r.status}`;throw new Bre(c,`Token exchange failed (${c}).`)}let o;try{o=await r.json()}catch{throw new Error(`Token exchange response was not valid JSON (HTTP ${r.status}).`)}let i=XFe.safeParse(o);if(!i.success)throw new Error(`Token exchange response failed schema validation: ${i.error.message}`);return{access_token:i.data.access_token,refresh_token:i.data.refresh_token,expires_at:n()+i.data.expires_in*1e3,scope:i.data.scope??""}}async function HPt(e){let t=e4e(e),n;try{n=await nc.readFile(t,"utf8")}catch(r){if(wre(r))return null;throw r}try{let r=JSON.parse(n),o=WFe.safeParse(r);return o.success?o.data:null}catch{return null}}async function a4e(e,t){let n=e4e(t);await nc.mkdir(Bw.dirname(n),{recursive:!0,mode:448}),await nc.chmod(Bw.dirname(n),448);let r=`${n}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`;try{let o=await nc.open(r,"w",384);try{await o.writeFile(JSON.stringify(WFe.parse(e)),"utf8"),await o.chmod(384),await o.sync()}finally{await o.close()}await nc.rename(r,n)}catch(o){throw await nc.unlink(r).catch(()=>{}),o}}function wre(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function $Pt(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function qPt(e,t,n){try{let r=await nc.stat(e);return n()-r.mtimeMs>=t}catch(r){if(wre(r))return!1;throw r}}async function VPt(e,t,n){try{if(await nc.readFile(t,"utf8")!==n)return}catch(r){if(!wre(r))throw r}await nc.rm(e,{recursive:!0,force:!0})}var KFe,PPt,MPt,LPt,UPt,ZFe,ax,Nre,WFe,QPt,FPt,XFe,Nw,Dre,Bre,kre=O(()=>{"use strict";A();mu();KFe=new wPt,PPt=864e5,MPt=3e4,LPt=6e4,UPt=100,ZFe=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",ax=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",Nre="openid email profile offline_access",WFe=m.object({resource:m.string(),endpoints:m.object({audience:m.string(),deviceAuthorizationEndpoint:m.string(),tokenEndpoint:m.string(),authorizationEndpoint:m.string()}),fetchedAt:m.number(),prmEtag:m.string().optional()}),QPt=m.object({resource:m.string().min(1,"`resource` must be a non-empty string"),authorization_servers:m.array(m.string())}),FPt=m.object({issuer:m.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:m.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:m.string().optional()}),XFe=m.object({access_token:m.string().min(1),refresh_token:m.string().min(1),expires_in:m.number().int().positive(),token_type:m.string().min(1),scope:m.string().optional()}),Nw=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}},Dre=class extends Error{constructor(){super("OAuth discovery returned no authorization servers"),this.name="OAuthNoAuthorizationServerError"}};Bre=class extends Error{constructor(n,r){super(r??`OAuth authorization failed: ${n}`);this.oauthError=n;this.name="OAuthAuthorizationError"}oauthError}});import ip from"node:fs";import YPt from"node:path";function Pre(e){return YPt.join(e,"tokens.json")}function KPt(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function l4e(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function JPt(e,t){let n;try{n=JSON.parse(e)}catch(o){throw new Error(`tokens file at ${t} is not valid JSON: ${o.message}`)}if(typeof n=="object"&&n!==null&&"version"in n){let o=c4e.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=gz.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return XPt(r.data)}function ZPt(e){let t=e.split(".");if(t.length<2||!t[1])return null;try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));if(typeof n!="object"||n===null)return null;let r=n.iss;return typeof r=="string"&&r.length>0?r:null}catch{return null}}function WPt(e){let t=ZPt(e.access_token);if(!t)return!1;let n;try{n=new URL(t).host.toLowerCase()}catch{return!1}return n!=="workos.com"&&!n.endsWith(".workos.com")}function XPt(e){let t={};return WPt(e)&&(t.plugin=e),{version:2,clients:t}}function e2t(e){return JSON.stringify(c4e.parse(e))}function Mre(e){let t=Pre(e),n;try{n=ip.readFileSync(t,"utf8")}catch(r){if(l4e(r))return null;throw r}return JPt(n,t)}function d4e(e,t){let n=Pre(e);ip.mkdirSync(e,{recursive:!0,mode:448}),ip.chmodSync(e,448);let r=KPt(n),o=e2t(t),i;try{i=ip.openSync(r,"w",384),ip.writeSync(i,o),ip.fchmodSync(i,384),ip.fsyncSync(i),ip.closeSync(i),i=void 0,ip.renameSync(r,n)}catch(s){if(i!==void 0)try{ip.closeSync(i)}catch{}try{ip.unlinkSync(r)}catch{}throw s}}function p4e(e,t){return Mre(e)?.clients[t]??null}function t2t(e){try{return Mre(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function u4e(e){try{ip.rmSync(Pre(e))}catch(t){if(!l4e(t))throw t}}function hz(e,t,n){let r=t2t(e);r.clients[t]=gz.parse(n),d4e(e,r)}function Lre(e,t){let n;try{n=Mre(e)}catch{u4e(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){u4e(e);return}d4e(e,n)}}var gz,c4e,Ure=O(()=>{"use strict";A();mu();kre();gz=m.object({access_token:m.string(),refresh_token:m.string(),expires_at:m.number().int(),scope:m.string().default("")}),c4e=m.object({version:m.literal(2),clients:m.record(m.string(),gz).default({})})});import n2t from"node:fs";import m4e from"node:os";import A4e from"node:path";function r2t(e=m4e.homedir()){return A4e.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function g4e(e){let t=e.split(".");if(t.length<2||!t[1])return null;let n;try{n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}if(typeof n!="object"||n===null)return null;let r=n.exp;return typeof r=="number"?r*1e3:null}function f4e(e){try{n2t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function Ow(e,t=m4e.homedir()){for(let n of o2t)f4e(A4e.join(e,n));f4e(r2t(t))}var o2t,h4e=O(()=>{"use strict";A();Ure();o2t=["token","refresh_token"]});var _z=O(()=>{"use strict";A();Ure();h4e();kre()});import Ez from"node:os";import Zc from"node:path";function Mr(){if(Zr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return Zc.resolve(t.replace(/^~(?=$|\/)/,Ez.homedir()))}let e=Zr()==="dev"?".lore-dev":".lore";return Zc.join(Ez.homedir(),e)}function sp(){return Zc.join(Mr(),"log.txt")}function Qre(){return Zc.join(Mr(),"skill-sync.log.txt")}function Fre(){return Zc.join(Mr(),"sync_state.json")}function sT(){return Zc.join(Mr(),"upload_filters.json")}function yz(){return Zc.join(Mr(),"upload_dirs.json")}function Sz(){return Zc.join(Mr(),"status.json")}function ux(){return Zc.join(Mr(),"quarantine")}function aT(){return Zc.join(Mr(),"install_source.json")}function uT(){return Zc.join(Mr(),"skill_sync_state.json")}function ME(){return Zc.join(Mr(),"bin","lore")}function cT(){let e=Zr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function ww(){return`${cT()}.skill-sync`}function cx(){return Zc.join(Ez.homedir(),"Library","LaunchAgents",`${cT()}.plist`)}function Tz(){return Zc.join(Ez.homedir(),"Library","LaunchAgents",`${ww()}.plist`)}var yi=O(()=>{"use strict";A();$c()});import LE from"node:fs";import Iz from"node:path";function UE(){try{return p4e(Mr(),kw)}catch{return null}}function Gre(){return Iz.join(Mr(),"analytics_distinct_id")}function _4e(){let e;try{e=LE.readFileSync(Gre(),"utf8")}catch(n){if(n&&typeof n=="object"&&"code"in n&&n.code==="ENOENT")return null;throw n}let t=e.trim();return t.length>0?t:null}function E4e(e){let t=Gre();LE.mkdirSync(Iz.dirname(t),{recursive:!0,mode:448}),LE.writeFileSync(t,e,{mode:384})}function y4e(){try{LE.rmSync(Gre())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function zre(){return Iz.join(Mr(),"analytics_person_properties.json")}function S4e(){let e;try{e=LE.readFileSync(zre(),"utf8")}catch(t){if(t&&typeof t=="object"&&"code"in t&&t.code==="ENOENT")return null;throw t}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function T4e(e){let t=zre();LE.mkdirSync(Iz.dirname(t),{recursive:!0,mode:448}),LE.writeFileSync(t,JSON.stringify(e),{mode:384})}function I4e(){try{LE.rmSync(zre())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function jre(){let e=UE()?.access_token.trim()??"";return!e||a2t(e,new Date,s2t)?{token:"",source:"none"}:{token:e,source:"file"}}function b4e(){return!!UE()?.access_token}function Hre(e){let t=Mr();hz(t,kw,e),Ow(t)}function C4e(e){Hre(e)}function v4e(e,t){let n=Mr();hz(n,kw,e),hz(n,i2t,t),Ow(n)}function bz(e){let t=UE();Hre({access_token:e,refresh_token:t?.refresh_token??"",expires_at:g4e(e)??0,scope:t?.scope??""})}function R4e(e){let t=UE();Hre({access_token:t?.access_token??"",refresh_token:e,expires_at:t?.expires_at??0,scope:t?.scope??""})}function Kg(){Lre(Mr(),kw),Ow(Mr())}function x4e(){Lre(Mr(),kw),Ow(Mr())}function Pw(e){let t=e.split(".");if(t.length<2)throw new Error("invalid JWT format");return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}function a2t(e,t,n=0){let r;try{r=Pw(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var i2t,kw,s2t,lT=O(()=>{"use strict";A();_z();yi();i2t="plugin",kw="cli",s2t=10*1e3});import{AsyncLocalStorage as u2t}from"node:async_hooks";function B4e(e,t){return D4e.run(e,t)}function N4e(){return D4e.getStore()}var D4e,$re=O(()=>{"use strict";A();D4e=new u2t});import w4e from"node:fs";function c2t(){let e=Mr();O4e!==e&&(w4e.mkdirSync(e,{recursive:!0}),O4e=e)}function l2t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function d2t(e,t,n){let r=`${new Date().toISOString()} ${e} ${t}`;if(!n)return`${r}
104
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let c=s[1];if(t===s[0]){i(s);continue}if(e.external){let f=e.external.registry.get(s[0])?.id;if(t!==s[0]&&f){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(c.cycle){i(s);continue}if(c.count>1&&e.reused==="ref"){i(s);continue}}}function kE(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=c=>{let l=e.seen.get(c);if(l.ref===null)return;let f=l.def??l.schema,h={...f},y=l.ref;if(l.ref=null,y){r(y);let b=e.seen.get(y),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(v)):Object.assign(f,v),Object.assign(f,h),c._zod.parent===y)for(let D in f)D==="$ref"||D==="allOf"||D in h||delete f[D];if(v.$ref&&b.def)for(let D in f)D==="$ref"||D==="allOf"||D in b.def&&JSON.stringify(f[D])===JSON.stringify(b.def[D])&&delete f[D]}let S=c._zod.parent;if(S&&S!==y){r(S);let b=e.seen.get(S);if(b?.schema.$ref&&(f.$ref=b.schema.$ref,b.def))for(let v in f)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(f[v])===JSON.stringify(b.def[v])&&delete f[v]}e.override({zodSchema:c,jsonSchema:f,path:l.path??[]})};for(let c of[...e.seen.entries()].reverse())r(c[0]);let o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(c)}Object.assign(o,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&o.id===i&&delete o.id;let s=e.external?.defs??{};for(let c of e.seen.entries()){let l=c[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,s[l.defId]=l.def)}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?o.$defs=s:o.definitions=s);try{let c=JSON.parse(JSON.stringify(o));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:JR(t,"input",e.processors),output:JR(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function tc(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return tc(r.element,n);if(r.type==="set")return tc(r.valueType,n);if(r.type==="lazy")return tc(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return tc(r.innerType,n);if(r.type==="intersection")return tc(r.left,n)||tc(r.right,n);if(r.type==="record"||r.type==="map")return tc(r.keyType,n)||tc(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:tc(r.in,n)||tc(r.out,n);if(r.type==="object"){for(let o in r.shape)if(tc(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(let o of r.options)if(tc(o,n))return!0;return!1}if(r.type==="tuple"){for(let o of r.items)if(tc(o,n))return!0;return!!(r.rest&&tc(r.rest,n))}return!1}var cte,JR,cw=O(()=>{A();sw();cte=(e,t={})=>n=>{let r=OE({...n,processors:t});return Nr(e,r),wE(r,e),kE(r,e)},JR=(e,t,n={})=>r=>{let{libraryOptions:o,target:i}=r??{},s=OE({...o??{},target:i,io:t,processors:n});return Nr(e,s),wE(s,e),kE(s,e)}});function _G(e,t){if("_idmap"in e){let r=e,o=OE({...t,processors:AG}),i={};for(let l of r._idmap.entries()){let[f,h]=l;Nr(h,o)}let s={},c={registry:r,uri:t?.uri,defs:i};o.external=c;for(let l of r._idmap.entries()){let[f,h]=l;wE(o,h),s[f]=kE(o,h)}if(Object.keys(i).length>0){let l=o.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[l]:i}}return{schemas:s}}let n=OE({...t,processors:AG});return Nr(e,n),wE(n,e),kE(n,e)}var J1t,lte,dte,pte,fte,mte,Ate,gte,hte,_te,Ete,yte,Ste,Tte,Ite,bte,Cte,vte,Rte,xte,Dte,Bte,Nte,Ote,wte,kte,gG,Pte,Mte,Lte,Ute,Qte,Fte,Gte,zte,jte,Hte,$te,hG,qte,AG,lw=O(()=>{A();cw();Et();J1t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},lte=(e,t,n,r)=>{let o=n;o.type="string";let{minimum:i,maximum:s,format:c,patterns:l,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof s=="number"&&(o.maxLength=s),c&&(o.format=J1t[c]??c,o.format===""&&delete o.format,c==="time"&&delete o.format),f&&(o.contentEncoding=f),l&&l.size>0){let h=[...l];h.length===1?o.pattern=h[0].source:h.length>1&&(o.allOf=[...h.map(y=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:y.source}))])}},dte=(e,t,n,r)=>{let o=n,{minimum:i,maximum:s,format:c,multipleOf:l,exclusiveMaximum:f,exclusiveMinimum:h}=e._zod.bag;typeof c=="string"&&c.includes("int")?o.type="integer":o.type="number";let y=typeof h=="number"&&h>=(i??Number.NEGATIVE_INFINITY),S=typeof f=="number"&&f<=(s??Number.POSITIVE_INFINITY),b=t.target==="draft-04"||t.target==="openapi-3.0";y?b?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h:typeof i=="number"&&(o.minimum=i),S?b?(o.maximum=f,o.exclusiveMaximum=!0):o.exclusiveMaximum=f:typeof s=="number"&&(o.maximum=s),typeof l=="number"&&(o.multipleOf=l)},pte=(e,t,n,r)=>{n.type="boolean"},fte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},mte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ate=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},hte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},_te=(e,t,n,r)=>{n.not={}},Ete=(e,t,n,r)=>{},yte=(e,t,n,r)=>{},Ste=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Tte=(e,t,n,r)=>{let o=e._zod.def,i=HO(o.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i},Ite=(e,t,n,r)=>{let o=e._zod.def,i=[];for(let s of o.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s))}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i},bte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Cte=(e,t,n,r)=>{let o=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=i.source},vte=(e,t,n,r)=>{let o=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:c,mime:l}=e._zod.bag;s!==void 0&&(i.minLength=s),c!==void 0&&(i.maxLength=c),l?l.length===1?(i.contentMediaType=l[0],Object.assign(o,i)):(Object.assign(o,i),o.anyOf=l.map(f=>({contentMediaType:f}))):Object.assign(o,i)},Rte=(e,t,n,r)=>{n.type="boolean"},xte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Dte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Bte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Nte=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Ote=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},wte=(e,t,n,r)=>{let o=n,i=e._zod.def,{minimum:s,maximum:c}=e._zod.bag;typeof s=="number"&&(o.minItems=s),typeof c=="number"&&(o.maxItems=c),o.type="array",o.items=Nr(i.element,t,{...r,path:[...r.path,"items"]})},kte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object",o.properties={};let s=i.shape;for(let f in s)o.properties[f]=Nr(s[f],t,{...r,path:[...r.path,"properties",f]});let c=new Set(Object.keys(s)),l=new Set([...c].filter(f=>{let h=i.shape[f]._zod;return t.io==="input"?h.optin===void 0:h.optout===void 0}));l.size>0&&(o.required=Array.from(l)),i.catchall?._zod.def.type==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Nr(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(o.additionalProperties=!1)},gG=(e,t,n,r)=>{let o=e._zod.def,i=o.inclusive===!1,s=o.options.map((c,l)=>Nr(c,t,{...r,path:[...r.path,i?"oneOf":"anyOf",l]}));i?n.oneOf=s:n.anyOf=s},Pte=(e,t,n,r)=>{let o=e._zod.def,i=Nr(o.left,t,{...r,path:[...r.path,"allOf",0]}),s=Nr(o.right,t,{...r,path:[...r.path,"allOf",1]}),c=f=>"allOf"in f&&Object.keys(f).length===1,l=[...c(i)?i.allOf:[i],...c(s)?s.allOf:[s]];n.allOf=l},Mte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=i.items.map((S,b)=>Nr(S,t,{...r,path:[...r.path,s,b]})),f=i.rest?Nr(i.rest,t,{...r,path:[...r.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(o.prefixItems=l,f&&(o.items=f)):t.target==="openapi-3.0"?(o.items={anyOf:l},f&&o.items.anyOf.push(f),o.minItems=l.length,f||(o.maxItems=l.length)):(o.items=l,f&&(o.additionalItems=f));let{minimum:h,maximum:y}=e._zod.bag;typeof h=="number"&&(o.minItems=h),typeof y=="number"&&(o.maxItems=y)},Lte=(e,t,n,r)=>{let o=n,i=e._zod.def;o.type="object";let s=i.keyType,l=s._zod.bag?.patterns;if(i.mode==="loose"&&l&&l.size>0){let h=Nr(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(let y of l)o.patternProperties[y.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Nr(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),o.additionalProperties=Nr(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let f=s._zod.values;if(f){let h=[...f].filter(y=>typeof y=="string"||typeof y=="number");h.length>0&&(o.required=h)}},Ute=(e,t,n,r)=>{let o=e._zod.def,i=Nr(o.innerType,t,r),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},Qte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},Fte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},Gte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},zte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType;let s;try{s=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s},jte=(e,t,n,r)=>{let o=e._zod.def,i=o.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?o.out:o.in:o.out;Nr(s,t,r);let c=t.seen.get(e);c.ref=s},Hte=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},$te=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},hG=(e,t,n,r)=>{let o=e._zod.def;Nr(o.innerType,t,r);let i=t.seen.get(e);i.ref=o.innerType},qte=(e,t,n,r)=>{let o=e._zod.innerType;Nr(o,t,r);let i=t.seen.get(e);i.ref=o},AG={string:lte,number:dte,boolean:pte,bigint:fte,symbol:mte,null:Ate,undefined:gte,void:hte,never:_te,any:Ete,unknown:yte,date:Ste,enum:Tte,literal:Ite,nan:bte,template_literal:Cte,file:vte,success:Rte,custom:xte,function:Dte,transform:Bte,map:Nte,set:Ote,array:wte,object:kte,union:gG,intersection:Pte,tuple:Mte,record:Lte,nullable:Ute,nonoptional:Qte,default:Fte,prefault:Gte,catch:zte,pipe:jte,readonly:Hte,promise:$te,optional:hG,lazy:qte}});var EG,CUe=O(()=>{A();lw();cw();EG=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=OE({processors:AG,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Nr(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),wE(this.ctx,t);let r=kE(this.ctx,t),{"~standard":o,...i}=r;return i}}});var vUe={};var RUe=O(()=>{A()});var Yg={};$s(Yg,{$ZodAny:()=>QX,$ZodArray:()=>HX,$ZodAsyncError:()=>Tf,$ZodBase64:()=>DX,$ZodBase64URL:()=>BX,$ZodBigInt:()=>P6,$ZodBigIntFormat:()=>PX,$ZodBoolean:()=>tw,$ZodCIDRv4:()=>vX,$ZodCIDRv6:()=>RX,$ZodCUID:()=>mX,$ZodCUID2:()=>AX,$ZodCatch:()=>uee,$ZodCheck:()=>Wr,$ZodCheckBigIntFormat:()=>zW,$ZodCheckEndsWith:()=>eX,$ZodCheckGreaterThan:()=>x6,$ZodCheckIncludes:()=>WW,$ZodCheckLengthEquals:()=>YW,$ZodCheckLessThan:()=>R6,$ZodCheckLowerCase:()=>JW,$ZodCheckMaxLength:()=>qW,$ZodCheckMaxSize:()=>jW,$ZodCheckMimeType:()=>nX,$ZodCheckMinLength:()=>VW,$ZodCheckMinSize:()=>HW,$ZodCheckMultipleOf:()=>FW,$ZodCheckNumberFormat:()=>GW,$ZodCheckOverwrite:()=>rX,$ZodCheckProperty:()=>tX,$ZodCheckRegex:()=>KW,$ZodCheckSizeEquals:()=>$W,$ZodCheckStartsWith:()=>XW,$ZodCheckStringFormat:()=>PR,$ZodCheckUpperCase:()=>ZW,$ZodCodec:()=>rw,$ZodCustom:()=>gee,$ZodCustomStringFormat:()=>wX,$ZodDate:()=>jX,$ZodDefault:()=>oee,$ZodDiscriminatedUnion:()=>VX,$ZodE164:()=>NX,$ZodEmail:()=>lX,$ZodEmoji:()=>pX,$ZodEncodeError:()=>CE,$ZodEnum:()=>WX,$ZodError:()=>KO,$ZodExactOptional:()=>nee,$ZodFile:()=>eee,$ZodFunction:()=>fee,$ZodGUID:()=>uX,$ZodIPv4:()=>IX,$ZodIPv6:()=>bX,$ZodISODate:()=>yX,$ZodISODateTime:()=>EX,$ZodISODuration:()=>TX,$ZodISOTime:()=>SX,$ZodIntersection:()=>YX,$ZodJWT:()=>OX,$ZodKSUID:()=>_X,$ZodLazy:()=>Aee,$ZodLiteral:()=>XX,$ZodMAC:()=>CX,$ZodMap:()=>JX,$ZodNaN:()=>cee,$ZodNanoID:()=>fX,$ZodNever:()=>GX,$ZodNonOptional:()=>see,$ZodNull:()=>UX,$ZodNullable:()=>ree,$ZodNumber:()=>k6,$ZodNumberFormat:()=>kX,$ZodObject:()=>RMe,$ZodObjectJIT:()=>$X,$ZodOptional:()=>L6,$ZodPipe:()=>U6,$ZodPrefault:()=>iee,$ZodPreprocess:()=>lee,$ZodPromise:()=>mee,$ZodReadonly:()=>dee,$ZodRealError:()=>Yc,$ZodRecord:()=>KX,$ZodRegistry:()=>z6,$ZodSet:()=>ZX,$ZodString:()=>JS,$ZodStringFormat:()=>$r,$ZodSuccess:()=>aee,$ZodSymbol:()=>MX,$ZodTemplateLiteral:()=>pee,$ZodTransform:()=>tee,$ZodTuple:()=>M6,$ZodType:()=>sn,$ZodULID:()=>gX,$ZodURL:()=>dX,$ZodUUID:()=>cX,$ZodUndefined:()=>LX,$ZodUnion:()=>nw,$ZodUnknown:()=>FX,$ZodVoid:()=>zX,$ZodXID:()=>hX,$ZodXor:()=>qX,$brand:()=>VZ,$constructor:()=>re,$input:()=>Iee,$output:()=>Tee,Doc:()=>ew,JSONSchema:()=>vUe,JSONSchemaGenerator:()=>EG,NEVER:()=>qZ,TimePrecision:()=>Ree,_any:()=>Yee,_array:()=>tte,_base64:()=>sG,_base64url:()=>aG,_bigint:()=>Gee,_boolean:()=>Qee,_catch:()=>H1t,_check:()=>IUe,_cidrv4:()=>oG,_cidrv6:()=>iG,_coercedBigint:()=>zee,_coercedBoolean:()=>Fee,_coercedDate:()=>Xee,_coercedNumber:()=>wee,_coercedString:()=>Cee,_cuid:()=>Z6,_cuid2:()=>W6,_custom:()=>rte,_date:()=>Wee,_decode:()=>h6,_decodeAsync:()=>E6,_default:()=>G1t,_discriminatedUnion:()=>D1t,_e164:()=>uG,_email:()=>H6,_emoji:()=>K6,_encode:()=>g6,_encodeAsync:()=>_6,_endsWith:()=>zR,_enum:()=>P1t,_file:()=>nte,_float32:()=>Pee,_float64:()=>Mee,_gt:()=>Wm,_gte:()=>ec,_guid:()=>aw,_includes:()=>FR,_int:()=>kee,_int32:()=>Lee,_int64:()=>jee,_intersection:()=>B1t,_ipv4:()=>nG,_ipv6:()=>rG,_isoDate:()=>Dee,_isoDateTime:()=>xee,_isoDuration:()=>Nee,_isoTime:()=>Bee,_jwt:()=>cG,_ksuid:()=>tG,_lazy:()=>Y1t,_length:()=>XS,_literal:()=>L1t,_lowercase:()=>UR,_lt:()=>Zm,_lte:()=>Kl,_mac:()=>vee,_map:()=>w1t,_max:()=>Kl,_maxLength:()=>WS,_maxSize:()=>NE,_mime:()=>jR,_min:()=>ec,_minLength:()=>Vg,_minSize:()=>Xm,_multipleOf:()=>BE,_nan:()=>ete,_nanoid:()=>J6,_nativeEnum:()=>M1t,_negative:()=>dG,_never:()=>Jee,_nonnegative:()=>fG,_nonoptional:()=>z1t,_nonpositive:()=>pG,_normalize:()=>HR,_null:()=>Vee,_nullable:()=>F1t,_number:()=>Oee,_optional:()=>Q1t,_overwrite:()=>If,_parse:()=>NR,_parseAsync:()=>OR,_pipe:()=>$1t,_positive:()=>lG,_promise:()=>K1t,_property:()=>mG,_readonly:()=>q1t,_record:()=>O1t,_refine:()=>ote,_regex:()=>LR,_safeDecode:()=>S6,_safeDecodeAsync:()=>I6,_safeEncode:()=>y6,_safeEncodeAsync:()=>T6,_safeParse:()=>wR,_safeParseAsync:()=>kR,_set:()=>k1t,_size:()=>ZS,_slugify:()=>YR,_startsWith:()=>GR,_string:()=>bee,_stringFormat:()=>KR,_stringbool:()=>ute,_success:()=>j1t,_superRefine:()=>ite,_symbol:()=>$ee,_templateLiteral:()=>V1t,_toLowerCase:()=>qR,_toUpperCase:()=>VR,_transform:()=>U1t,_trim:()=>$R,_tuple:()=>N1t,_uint32:()=>Uee,_uint64:()=>Hee,_ulid:()=>X6,_undefined:()=>qee,_union:()=>R1t,_unknown:()=>Kee,_uppercase:()=>QR,_url:()=>uw,_uuid:()=>$6,_uuidv4:()=>q6,_uuidv6:()=>V6,_uuidv7:()=>Y6,_void:()=>Zee,_xid:()=>eG,_xor:()=>x1t,clone:()=>Wu,config:()=>Ei,createStandardJSONSchemaMethod:()=>JR,createToJSONSchemaMethod:()=>cte,decode:()=>Kxt,decodeAsync:()=>Zxt,describe:()=>ste,encode:()=>Yxt,encodeAsync:()=>Jxt,extractDefs:()=>wE,finalize:()=>kE,flattenError:()=>JO,formatError:()=>ZO,globalConfig:()=>qS,globalRegistry:()=>ka,initializeContext:()=>OE,isValidBase64:()=>xX,isValidBase64URL:()=>IMe,isValidJWT:()=>bMe,locales:()=>iw,meta:()=>ate,parse:()=>m6,parseAsync:()=>A6,prettifyError:()=>sW,process:()=>Nr,regexes:()=>Yl,registry:()=>j6,safeDecode:()=>Xxt,safeDecodeAsync:()=>tDt,safeEncode:()=>Wxt,safeEncodeAsync:()=>eDt,safeParse:()=>uW,safeParseAsync:()=>cW,toDotPath:()=>nMe,toJSONSchema:()=>_G,treeifyError:()=>iW,util:()=>Le,version:()=>iX});var Jl=O(()=>{A();VS();lW();aW();hee();D6();sX();Et();v6();See();sw();oX();bUe();cw();lw();CUe();RUe()});var yG={};$s(yG,{endsWith:()=>zR,gt:()=>Wm,gte:()=>ec,includes:()=>FR,length:()=>XS,lowercase:()=>UR,lt:()=>Zm,lte:()=>Kl,maxLength:()=>WS,maxSize:()=>NE,mime:()=>jR,minLength:()=>Vg,minSize:()=>Xm,multipleOf:()=>BE,negative:()=>dG,nonnegative:()=>fG,nonpositive:()=>pG,normalize:()=>HR,overwrite:()=>If,positive:()=>lG,property:()=>mG,regex:()=>LR,size:()=>ZS,slugify:()=>YR,startsWith:()=>GR,toLowerCase:()=>qR,toUpperCase:()=>VR,trim:()=>$R,uppercase:()=>QR});var SG=O(()=>{A();Jl()});var ZR={};$s(ZR,{ZodISODate:()=>IG,ZodISODateTime:()=>TG,ZodISODuration:()=>CG,ZodISOTime:()=>bG,date:()=>Yte,datetime:()=>Vte,duration:()=>Jte,time:()=>Kte});function Vte(e){return xee(TG,e)}function Yte(e){return Dee(IG,e)}function Kte(e){return Bee(bG,e)}function Jte(e){return Nee(CG,e)}var TG,IG,bG,CG,dw=O(()=>{A();Jl();fw();TG=re("ZodISODateTime",(e,t)=>{EX.init(e,t),qr.init(e,t)});IG=re("ZodISODate",(e,t)=>{yX.init(e,t),qr.init(e,t)});bG=re("ZodISOTime",(e,t)=>{SX.init(e,t),qr.init(e,t)});CG=re("ZodISODuration",(e,t)=>{TX.init(e,t),qr.init(e,t)})});var xUe,W1t,Kc,Zte=O(()=>{A();Jl();Jl();Et();xUe=(e,t)=>{KO.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ZO(e,n)},flatten:{value:n=>JO(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,xR,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,xR,2)}},isEmpty:{get(){return e.issues.length===0}}})},W1t=re("ZodError",xUe),Kc=re("ZodError",xUe,{Parent:Error})});var Wte,Xte,ene,tne,nne,rne,one,ine,sne,ane,une,cne,lne=O(()=>{A();Jl();Zte();Wte=NR(Kc),Xte=OR(Kc),ene=wR(Kc),tne=kR(Kc),nne=g6(Kc),rne=h6(Kc),one=_6(Kc),ine=E6(Kc),sne=y6(Kc),ane=S6(Kc),une=T6(Kc),cne=I6(Kc)});var pw={};$s(pw,{ZodAny:()=>_ne,ZodArray:()=>Tne,ZodBase64:()=>GG,ZodBase64URL:()=>zG,ZodBigInt:()=>ox,ZodBigIntFormat:()=>$G,ZodBoolean:()=>rx,ZodCIDRv4:()=>QG,ZodCIDRv6:()=>FG,ZodCUID:()=>OG,ZodCUID2:()=>wG,ZodCatch:()=>Hne,ZodCodec:()=>Cw,ZodCustom:()=>vw,ZodCustomStringFormat:()=>tx,ZodDate:()=>yw,ZodDefault:()=>Une,ZodDiscriminatedUnion:()=>bne,ZodE164:()=>jG,ZodEmail:()=>DG,ZodEmoji:()=>BG,ZodEnum:()=>XR,ZodExactOptional:()=>Pne,ZodFile:()=>wne,ZodFunction:()=>ere,ZodGUID:()=>Aw,ZodIPv4:()=>LG,ZodIPv6:()=>UG,ZodIntersection:()=>Cne,ZodJWT:()=>HG,ZodKSUID:()=>MG,ZodLazy:()=>Zne,ZodLiteral:()=>One,ZodMAC:()=>dne,ZodMap:()=>Bne,ZodNaN:()=>qne,ZodNanoID:()=>NG,ZodNever:()=>yne,ZodNonOptional:()=>ZG,ZodNull:()=>gne,ZodNullable:()=>Lne,ZodNumber:()=>nx,ZodNumberFormat:()=>tT,ZodObject:()=>Tw,ZodOptional:()=>JG,ZodPipe:()=>bw,ZodPrefault:()=>Fne,ZodPreprocess:()=>Vne,ZodPromise:()=>Xne,ZodReadonly:()=>Yne,ZodRecord:()=>WR,ZodSet:()=>Nne,ZodString:()=>ex,ZodStringFormat:()=>qr,ZodSuccess:()=>jne,ZodSymbol:()=>mne,ZodTemplateLiteral:()=>Jne,ZodTransform:()=>kne,ZodTuple:()=>Rne,ZodType:()=>Dn,ZodULID:()=>kG,ZodURL:()=>Ew,ZodUUID:()=>eA,ZodUndefined:()=>Ane,ZodUnion:()=>Iw,ZodUnknown:()=>Ene,ZodVoid:()=>Sne,ZodXID:()=>PG,ZodXor:()=>Ine,_ZodString:()=>xG,_default:()=>Qne,_function:()=>MQe,any:()=>fQe,array:()=>Sw,base64:()=>JUe,base64url:()=>ZUe,bigint:()=>uQe,boolean:()=>fne,catch:()=>$ne,check:()=>LQe,cidrv4:()=>YUe,cidrv6:()=>KUe,codec:()=>OQe,cuid:()=>FUe,cuid2:()=>GUe,custom:()=>UQe,date:()=>AQe,describe:()=>QQe,discriminatedUnion:()=>SQe,e164:()=>WUe,email:()=>BUe,emoji:()=>UUe,enum:()=>YG,exactOptional:()=>Mne,file:()=>xQe,float32:()=>oQe,float64:()=>iQe,function:()=>MQe,guid:()=>NUe,hash:()=>rQe,hex:()=>nQe,hostname:()=>tQe,httpUrl:()=>LUe,instanceof:()=>GQe,int:()=>vG,int32:()=>sQe,int64:()=>cQe,intersection:()=>vne,invertCodec:()=>wQe,ipv4:()=>$Ue,ipv6:()=>VUe,json:()=>jQe,jwt:()=>XUe,keyof:()=>gQe,ksuid:()=>HUe,lazy:()=>Wne,literal:()=>RQe,looseObject:()=>EQe,looseRecord:()=>IQe,mac:()=>qUe,map:()=>bQe,meta:()=>FQe,nan:()=>NQe,nanoid:()=>QUe,nativeEnum:()=>vQe,never:()=>qG,nonoptional:()=>zne,null:()=>hne,nullable:()=>hw,nullish:()=>DQe,number:()=>pne,object:()=>hQe,optional:()=>gw,partialRecord:()=>TQe,pipe:()=>RG,prefault:()=>Gne,preprocess:()=>HQe,promise:()=>PQe,readonly:()=>Kne,record:()=>Dne,refine:()=>tre,set:()=>CQe,strictObject:()=>_Qe,string:()=>mw,stringFormat:()=>eQe,stringbool:()=>zQe,success:()=>BQe,superRefine:()=>nre,symbol:()=>dQe,templateLiteral:()=>kQe,transform:()=>KG,tuple:()=>xne,uint32:()=>aQe,uint64:()=>lQe,ulid:()=>zUe,undefined:()=>pQe,union:()=>VG,unknown:()=>eT,url:()=>MUe,uuid:()=>OUe,uuidv4:()=>wUe,uuidv6:()=>kUe,uuidv7:()=>PUe,void:()=>mQe,xid:()=>jUe,xor:()=>yQe});function _w(e,t,n){let r=Object.getPrototypeOf(e),o=DUe.get(r);if(o||(o=new Set,DUe.set(r,o)),!o.has(t)){o.add(t);for(let i in n){let s=n[i];Object.defineProperty(r,i,{configurable:!0,enumerable:!1,get(){let c=s.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}function mw(e){return bee(ex,e)}function BUe(e){return H6(DG,e)}function NUe(e){return aw(Aw,e)}function OUe(e){return $6(eA,e)}function wUe(e){return q6(eA,e)}function kUe(e){return V6(eA,e)}function PUe(e){return Y6(eA,e)}function MUe(e){return uw(Ew,e)}function LUe(e){return uw(Ew,{protocol:Yl.httpProtocol,hostname:Yl.domain,...Le.normalizeParams(e)})}function UUe(e){return K6(BG,e)}function QUe(e){return J6(NG,e)}function FUe(e){return Z6(OG,e)}function GUe(e){return W6(wG,e)}function zUe(e){return X6(kG,e)}function jUe(e){return eG(PG,e)}function HUe(e){return tG(MG,e)}function $Ue(e){return nG(LG,e)}function qUe(e){return vee(dne,e)}function VUe(e){return rG(UG,e)}function YUe(e){return oG(QG,e)}function KUe(e){return iG(FG,e)}function JUe(e){return sG(GG,e)}function ZUe(e){return aG(zG,e)}function WUe(e){return uG(jG,e)}function XUe(e){return cG(HG,e)}function eQe(e,t,n={}){return KR(tx,e,t,n)}function tQe(e){return KR(tx,"hostname",Yl.hostname,e)}function nQe(e){return KR(tx,"hex",Yl.hex,e)}function rQe(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,o=Yl[r];if(!o)throw new Error(`Unrecognized hash format: ${r}`);return KR(tx,r,o,t)}function pne(e){return Oee(nx,e)}function vG(e){return kee(tT,e)}function oQe(e){return Pee(tT,e)}function iQe(e){return Mee(tT,e)}function sQe(e){return Lee(tT,e)}function aQe(e){return Uee(tT,e)}function fne(e){return Qee(rx,e)}function uQe(e){return Gee(ox,e)}function cQe(e){return jee($G,e)}function lQe(e){return Hee($G,e)}function dQe(e){return $ee(mne,e)}function pQe(e){return qee(Ane,e)}function hne(e){return Vee(gne,e)}function fQe(){return Yee(_ne)}function eT(){return Kee(Ene)}function qG(e){return Jee(yne,e)}function mQe(e){return Zee(Sne,e)}function AQe(e){return Wee(yw,e)}function Sw(e,t){return tte(Tne,e,t)}function gQe(e){let t=e._zod.def.shape;return YG(Object.keys(t))}function hQe(e,t){let n={type:"object",shape:e??{},...Le.normalizeParams(t)};return new Tw(n)}function _Qe(e,t){return new Tw({type:"object",shape:e,catchall:qG(),...Le.normalizeParams(t)})}function EQe(e,t){return new Tw({type:"object",shape:e,catchall:eT(),...Le.normalizeParams(t)})}function VG(e,t){return new Iw({type:"union",options:e,...Le.normalizeParams(t)})}function yQe(e,t){return new Ine({type:"union",options:e,inclusive:!1,...Le.normalizeParams(t)})}function SQe(e,t,n){return new bne({type:"union",options:t,discriminator:e,...Le.normalizeParams(n)})}function vne(e,t){return new Cne({type:"intersection",left:e,right:t})}function xne(e,t,n){let r=t instanceof sn,o=r?n:t,i=r?t:null;return new Rne({type:"tuple",items:e,rest:i,...Le.normalizeParams(o)})}function Dne(e,t,n){return!t||!t._zod?new WR({type:"record",keyType:mw(),valueType:e,...Le.normalizeParams(t)}):new WR({type:"record",keyType:e,valueType:t,...Le.normalizeParams(n)})}function TQe(e,t,n){let r=Wu(e);return r._zod.values=void 0,new WR({type:"record",keyType:r,valueType:t,...Le.normalizeParams(n)})}function IQe(e,t,n){return new WR({type:"record",keyType:e,valueType:t,mode:"loose",...Le.normalizeParams(n)})}function bQe(e,t,n){return new Bne({type:"map",keyType:e,valueType:t,...Le.normalizeParams(n)})}function CQe(e,t){return new Nne({type:"set",valueType:e,...Le.normalizeParams(t)})}function YG(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new XR({type:"enum",entries:n,...Le.normalizeParams(t)})}function vQe(e,t){return new XR({type:"enum",entries:e,...Le.normalizeParams(t)})}function RQe(e,t){return new One({type:"literal",values:Array.isArray(e)?e:[e],...Le.normalizeParams(t)})}function xQe(e){return nte(wne,e)}function KG(e){return new kne({type:"transform",transform:e})}function gw(e){return new JG({type:"optional",innerType:e})}function Mne(e){return new Pne({type:"optional",innerType:e})}function hw(e){return new Lne({type:"nullable",innerType:e})}function DQe(e){return gw(hw(e))}function Qne(e,t){return new Une({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function Gne(e,t){return new Fne({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Le.shallowClone(t)}})}function zne(e,t){return new ZG({type:"nonoptional",innerType:e,...Le.normalizeParams(t)})}function BQe(e){return new jne({type:"success",innerType:e})}function $ne(e,t){return new Hne({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}function NQe(e){return ete(qne,e)}function RG(e,t){return new bw({type:"pipe",in:e,out:t})}function OQe(e,t,n){return new Cw({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function wQe(e){let t=e._zod.def;return new Cw({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function Kne(e){return new Yne({type:"readonly",innerType:e})}function kQe(e,t){return new Jne({type:"template_literal",parts:e,...Le.normalizeParams(t)})}function Wne(e){return new Zne({type:"lazy",getter:e})}function PQe(e){return new Xne({type:"promise",innerType:e})}function MQe(e){return new ere({type:"function",input:Array.isArray(e?.input)?xne(e?.input):e?.input??Sw(eT()),output:e?.output??eT()})}function LQe(e){let t=new Wr({check:"custom"});return t._zod.check=e,t}function UQe(e,t){return rte(vw,e??(()=>!0),t)}function tre(e,t={}){return ote(vw,e,t)}function nre(e,t){return ite(e,t)}function GQe(e,t={}){let n=new vw({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function jQe(e){let t=Wne(()=>VG([mw(e),pne(),fne(),hne(),Sw(t),Dne(mw(),t)]));return t}function HQe(e,t){return new Vne({type:"pipe",in:KG(e),out:t})}var DUe,Dn,xG,ex,qr,DG,Aw,eA,Ew,BG,NG,OG,wG,kG,PG,MG,LG,dne,UG,QG,FG,GG,zG,jG,HG,tx,nx,tT,rx,ox,$G,mne,Ane,gne,_ne,Ene,yne,Sne,yw,Tne,Tw,Iw,Ine,bne,Cne,Rne,WR,Bne,Nne,XR,One,wne,kne,JG,Pne,Lne,Une,Fne,ZG,jne,Hne,qne,bw,Cw,Vne,Yne,Jne,Zne,Xne,ere,vw,QQe,FQe,zQe,fw=O(()=>{A();Jl();Jl();lw();cw();SG();dw();lne();DUe=new WeakMap;Dn=re("ZodType",(e,t)=>(sn.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:JR(e,"input"),output:JR(e,"output")}}),e.toJSONSchema=cte(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>Wte(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>ene(e,n,r),e.parseAsync=async(n,r)=>Xte(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>tne(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>nne(e,n,r),e.decode=(n,r)=>rne(e,n,r),e.encodeAsync=async(n,r)=>one(e,n,r),e.decodeAsync=async(n,r)=>ine(e,n,r),e.safeEncode=(n,r)=>sne(e,n,r),e.safeDecode=(n,r)=>ane(e,n,r),e.safeEncodeAsync=async(n,r)=>une(e,n,r),e.safeDecodeAsync=async(n,r)=>cne(e,n,r),_w(e,"ZodType",{check(...n){let r=this.def;return this.clone(Le.mergeDefs(r,{checks:[...r.checks??[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return Wu(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(tre(n,r))},superRefine(n,r){return this.check(nre(n,r))},overwrite(n){return this.check(If(n))},optional(){return gw(this)},exactOptional(){return Mne(this)},nullable(){return hw(this)},nullish(){return gw(hw(this))},nonoptional(n){return zne(this,n)},array(){return Sw(this)},or(n){return VG([this,n])},and(n){return vne(this,n)},transform(n){return RG(this,KG(n))},default(n){return Qne(this,n)},prefault(n){return Gne(this,n)},catch(n){return $ne(this,n)},pipe(n){return RG(this,n)},readonly(){return Kne(this)},describe(n){let r=this.clone();return ka.add(r,{description:n}),r},meta(...n){if(n.length===0)return ka.get(this);let r=this.clone();return ka.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return ka.get(e)?.description},configurable:!0}),e)),xG=re("_ZodString",(e,t)=>{JS.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>lte(e,r,o,i);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,_w(e,"_ZodString",{regex(...r){return this.check(LR(...r))},includes(...r){return this.check(FR(...r))},startsWith(...r){return this.check(GR(...r))},endsWith(...r){return this.check(zR(...r))},min(...r){return this.check(Vg(...r))},max(...r){return this.check(WS(...r))},length(...r){return this.check(XS(...r))},nonempty(...r){return this.check(Vg(1,...r))},lowercase(r){return this.check(UR(r))},uppercase(r){return this.check(QR(r))},trim(){return this.check($R())},normalize(...r){return this.check(HR(...r))},toLowerCase(){return this.check(qR())},toUpperCase(){return this.check(VR())},slugify(){return this.check(YR())}})}),ex=re("ZodString",(e,t)=>{JS.init(e,t),xG.init(e,t),e.email=n=>e.check(H6(DG,n)),e.url=n=>e.check(uw(Ew,n)),e.jwt=n=>e.check(cG(HG,n)),e.emoji=n=>e.check(K6(BG,n)),e.guid=n=>e.check(aw(Aw,n)),e.uuid=n=>e.check($6(eA,n)),e.uuidv4=n=>e.check(q6(eA,n)),e.uuidv6=n=>e.check(V6(eA,n)),e.uuidv7=n=>e.check(Y6(eA,n)),e.nanoid=n=>e.check(J6(NG,n)),e.guid=n=>e.check(aw(Aw,n)),e.cuid=n=>e.check(Z6(OG,n)),e.cuid2=n=>e.check(W6(wG,n)),e.ulid=n=>e.check(X6(kG,n)),e.base64=n=>e.check(sG(GG,n)),e.base64url=n=>e.check(aG(zG,n)),e.xid=n=>e.check(eG(PG,n)),e.ksuid=n=>e.check(tG(MG,n)),e.ipv4=n=>e.check(nG(LG,n)),e.ipv6=n=>e.check(rG(UG,n)),e.cidrv4=n=>e.check(oG(QG,n)),e.cidrv6=n=>e.check(iG(FG,n)),e.e164=n=>e.check(uG(jG,n)),e.datetime=n=>e.check(Vte(n)),e.date=n=>e.check(Yte(n)),e.time=n=>e.check(Kte(n)),e.duration=n=>e.check(Jte(n))});qr=re("ZodStringFormat",(e,t)=>{$r.init(e,t),xG.init(e,t)}),DG=re("ZodEmail",(e,t)=>{lX.init(e,t),qr.init(e,t)});Aw=re("ZodGUID",(e,t)=>{uX.init(e,t),qr.init(e,t)});eA=re("ZodUUID",(e,t)=>{cX.init(e,t),qr.init(e,t)});Ew=re("ZodURL",(e,t)=>{dX.init(e,t),qr.init(e,t)});BG=re("ZodEmoji",(e,t)=>{pX.init(e,t),qr.init(e,t)});NG=re("ZodNanoID",(e,t)=>{fX.init(e,t),qr.init(e,t)});OG=re("ZodCUID",(e,t)=>{mX.init(e,t),qr.init(e,t)});wG=re("ZodCUID2",(e,t)=>{AX.init(e,t),qr.init(e,t)});kG=re("ZodULID",(e,t)=>{gX.init(e,t),qr.init(e,t)});PG=re("ZodXID",(e,t)=>{hX.init(e,t),qr.init(e,t)});MG=re("ZodKSUID",(e,t)=>{_X.init(e,t),qr.init(e,t)});LG=re("ZodIPv4",(e,t)=>{IX.init(e,t),qr.init(e,t)});dne=re("ZodMAC",(e,t)=>{CX.init(e,t),qr.init(e,t)});UG=re("ZodIPv6",(e,t)=>{bX.init(e,t),qr.init(e,t)});QG=re("ZodCIDRv4",(e,t)=>{vX.init(e,t),qr.init(e,t)});FG=re("ZodCIDRv6",(e,t)=>{RX.init(e,t),qr.init(e,t)});GG=re("ZodBase64",(e,t)=>{DX.init(e,t),qr.init(e,t)});zG=re("ZodBase64URL",(e,t)=>{BX.init(e,t),qr.init(e,t)});jG=re("ZodE164",(e,t)=>{NX.init(e,t),qr.init(e,t)});HG=re("ZodJWT",(e,t)=>{OX.init(e,t),qr.init(e,t)});tx=re("ZodCustomStringFormat",(e,t)=>{wX.init(e,t),qr.init(e,t)});nx=re("ZodNumber",(e,t)=>{k6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>dte(e,r,o,i),_w(e,"ZodNumber",{gt(r,o){return this.check(Wm(r,o))},gte(r,o){return this.check(ec(r,o))},min(r,o){return this.check(ec(r,o))},lt(r,o){return this.check(Zm(r,o))},lte(r,o){return this.check(Kl(r,o))},max(r,o){return this.check(Kl(r,o))},int(r){return this.check(vG(r))},safe(r){return this.check(vG(r))},positive(r){return this.check(Wm(0,r))},nonnegative(r){return this.check(ec(0,r))},negative(r){return this.check(Zm(0,r))},nonpositive(r){return this.check(Kl(0,r))},multipleOf(r,o){return this.check(BE(r,o))},step(r,o){return this.check(BE(r,o))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});tT=re("ZodNumberFormat",(e,t)=>{kX.init(e,t),nx.init(e,t)});rx=re("ZodBoolean",(e,t)=>{tw.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>pte(e,n,r,o)});ox=re("ZodBigInt",(e,t)=>{P6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>fte(e,r,o,i),e.gte=(r,o)=>e.check(ec(r,o)),e.min=(r,o)=>e.check(ec(r,o)),e.gt=(r,o)=>e.check(Wm(r,o)),e.gte=(r,o)=>e.check(ec(r,o)),e.min=(r,o)=>e.check(ec(r,o)),e.lt=(r,o)=>e.check(Zm(r,o)),e.lte=(r,o)=>e.check(Kl(r,o)),e.max=(r,o)=>e.check(Kl(r,o)),e.positive=r=>e.check(Wm(BigInt(0),r)),e.negative=r=>e.check(Zm(BigInt(0),r)),e.nonpositive=r=>e.check(Kl(BigInt(0),r)),e.nonnegative=r=>e.check(ec(BigInt(0),r)),e.multipleOf=(r,o)=>e.check(BE(r,o));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});$G=re("ZodBigIntFormat",(e,t)=>{PX.init(e,t),ox.init(e,t)});mne=re("ZodSymbol",(e,t)=>{MX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>mte(e,n,r,o)});Ane=re("ZodUndefined",(e,t)=>{LX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gte(e,n,r,o)});gne=re("ZodNull",(e,t)=>{UX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ate(e,n,r,o)});_ne=re("ZodAny",(e,t)=>{QX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ete(e,n,r,o)});Ene=re("ZodUnknown",(e,t)=>{FX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>yte(e,n,r,o)});yne=re("ZodNever",(e,t)=>{GX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>_te(e,n,r,o)});Sne=re("ZodVoid",(e,t)=>{zX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hte(e,n,r,o)});yw=re("ZodDate",(e,t)=>{jX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Ste(e,r,o,i),e.min=(r,o)=>e.check(ec(r,o)),e.max=(r,o)=>e.check(Kl(r,o));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});Tne=re("ZodArray",(e,t)=>{HX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>wte(e,n,r,o),e.element=t.element,_w(e,"ZodArray",{min(n,r){return this.check(Vg(n,r))},nonempty(n){return this.check(Vg(1,n))},max(n,r){return this.check(WS(n,r))},length(n,r){return this.check(XS(n,r))},unwrap(){return this.element}})});Tw=re("ZodObject",(e,t)=>{$X.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>kte(e,n,r,o),Le.defineLazy(e,"shape",()=>t.shape),_w(e,"ZodObject",{keyof(){return YG(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:eT()})},loose(){return this.clone({...this._zod.def,catchall:eT()})},strict(){return this.clone({...this._zod.def,catchall:qG()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return Le.extend(this,n)},safeExtend(n){return Le.safeExtend(this,n)},merge(n){return Le.merge(this,n)},pick(n){return Le.pick(this,n)},omit(n){return Le.omit(this,n)},partial(...n){return Le.partial(JG,this,n[0])},required(...n){return Le.required(ZG,this,n[0])}})});Iw=re("ZodUnion",(e,t)=>{nw.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gG(e,n,r,o),e.options=t.options});Ine=re("ZodXor",(e,t)=>{Iw.init(e,t),qX.init(e,t),e._zod.processJSONSchema=(n,r,o)=>gG(e,n,r,o),e.options=t.options});bne=re("ZodDiscriminatedUnion",(e,t)=>{Iw.init(e,t),VX.init(e,t)});Cne=re("ZodIntersection",(e,t)=>{YX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Pte(e,n,r,o)});Rne=re("ZodTuple",(e,t)=>{M6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Mte(e,n,r,o),e.rest=n=>e.clone({...e._zod.def,rest:n})});WR=re("ZodRecord",(e,t)=>{KX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Lte(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});Bne=re("ZodMap",(e,t)=>{JX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Nte(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Xm(...n)),e.nonempty=n=>e.check(Xm(1,n)),e.max=(...n)=>e.check(NE(...n)),e.size=(...n)=>e.check(ZS(...n))});Nne=re("ZodSet",(e,t)=>{ZX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ote(e,n,r,o),e.min=(...n)=>e.check(Xm(...n)),e.nonempty=n=>e.check(Xm(1,n)),e.max=(...n)=>e.check(NE(...n)),e.size=(...n)=>e.check(ZS(...n))});XR=re("ZodEnum",(e,t)=>{WX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Tte(e,r,o,i),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{let i={};for(let s of r)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new XR({...t,checks:[],...Le.normalizeParams(o),entries:i})},e.exclude=(r,o)=>{let i={...t.entries};for(let s of r)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new XR({...t,checks:[],...Le.normalizeParams(o),entries:i})}});One=re("ZodLiteral",(e,t)=>{XX.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ite(e,n,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});wne=re("ZodFile",(e,t)=>{eee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>vte(e,n,r,o),e.min=(n,r)=>e.check(Xm(n,r)),e.max=(n,r)=>e.check(NE(n,r)),e.mime=(n,r)=>e.check(jR(Array.isArray(n)?n:[n],r))});kne=re("ZodTransform",(e,t)=>{tee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bte(e,n,r,o),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new CE(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(Le.issue(i,n.value,t));else{let s=i;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(Le.issue(s))}};let o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n.fallback=!0,n)):(n.value=o,n.fallback=!0,n)}});JG=re("ZodOptional",(e,t)=>{L6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hG(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Pne=re("ZodExactOptional",(e,t)=>{nee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>hG(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Lne=re("ZodNullable",(e,t)=>{ree.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ute(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Une=re("ZodDefault",(e,t)=>{oee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});Fne=re("ZodPrefault",(e,t)=>{iee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ZG=re("ZodNonOptional",(e,t)=>{see.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});jne=re("ZodSuccess",(e,t)=>{aee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Rte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Hne=re("ZodCatch",(e,t)=>{uee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>zte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});qne=re("ZodNaN",(e,t)=>{cee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>bte(e,n,r,o)});bw=re("ZodPipe",(e,t)=>{U6.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>jte(e,n,r,o),e.in=t.in,e.out=t.out});Cw=re("ZodCodec",(e,t)=>{bw.init(e,t),rw.init(e,t)});Vne=re("ZodPreprocess",(e,t)=>{bw.init(e,t),lee.init(e,t)}),Yne=re("ZodReadonly",(e,t)=>{dee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hte(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});Jne=re("ZodTemplateLiteral",(e,t)=>{pee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Cte(e,n,r,o)});Zne=re("ZodLazy",(e,t)=>{Aee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>qte(e,n,r,o),e.unwrap=()=>e._zod.def.getter()});Xne=re("ZodPromise",(e,t)=>{mee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>$te(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});ere=re("ZodFunction",(e,t)=>{fee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Dte(e,n,r,o)});vw=re("ZodCustom",(e,t)=>{gee.init(e,t),Dn.init(e,t),e._zod.processJSONSchema=(n,r,o)=>xte(e,n,r,o)});QQe=ste,FQe=ate;zQe=(...e)=>ute({Codec:Cw,Boolean:rx,String:ex},...e)});function tBt(e){Ei({customError:e})}function nBt(){return Ei().customError}var eBt,rre,$Qe=O(()=>{A();Jl();eBt={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};rre||(rre={})});function oBt(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function iBt(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let o=n[1];if(!o||!t.defs[o])throw new Error(`Reference not found: ${e}`);return t.defs[o]}throw new Error(`Reference not found: ${e}`)}function qQe(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return Je.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let o=e.$ref;if(t.refs.has(o))return t.refs.get(o);if(t.processing.has(o))return Je.lazy(()=>{if(!t.refs.has(o))throw new Error(`Circular reference not resolved: ${o}`);return t.refs.get(o)});t.processing.add(o);let i=iBt(o,t),s=fu(i,t);return t.refs.set(o,s),t.processing.delete(o),s}if(e.enum!==void 0){let o=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&o.length===1&&o[0]===null)return Je.null();if(o.length===0)return Je.never();if(o.length===1)return Je.literal(o[0]);if(o.every(s=>typeof s=="string"))return Je.enum(o);let i=o.map(s=>Je.literal(s));return i.length<2?i[0]:Je.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return Je.literal(e.const);let n=e.type;if(Array.isArray(n)){let o=n.map(i=>{let s={...e,type:i};return qQe(s,t)});return o.length===0?Je.never():o.length===1?o[0]:Je.union(o)}if(!n)return Je.any();let r;switch(n){case"string":{let o=Je.string();if(e.format){let i=e.format;i==="email"?o=o.check(Je.email()):i==="uri"||i==="uri-reference"?o=o.check(Je.url()):i==="uuid"||i==="guid"?o=o.check(Je.uuid()):i==="date-time"?o=o.check(Je.iso.datetime()):i==="date"?o=o.check(Je.iso.date()):i==="time"?o=o.check(Je.iso.time()):i==="duration"?o=o.check(Je.iso.duration()):i==="ipv4"?o=o.check(Je.ipv4()):i==="ipv6"?o=o.check(Je.ipv6()):i==="mac"?o=o.check(Je.mac()):i==="cidr"?o=o.check(Je.cidrv4()):i==="cidr-v6"?o=o.check(Je.cidrv6()):i==="base64"?o=o.check(Je.base64()):i==="base64url"?o=o.check(Je.base64url()):i==="e164"?o=o.check(Je.e164()):i==="jwt"?o=o.check(Je.jwt()):i==="emoji"?o=o.check(Je.emoji()):i==="nanoid"?o=o.check(Je.nanoid()):i==="cuid"?o=o.check(Je.cuid()):i==="cuid2"?o=o.check(Je.cuid2()):i==="ulid"?o=o.check(Je.ulid()):i==="xid"?o=o.check(Je.xid()):i==="ksuid"&&(o=o.check(Je.ksuid()))}typeof e.minLength=="number"&&(o=o.min(e.minLength)),typeof e.maxLength=="number"&&(o=o.max(e.maxLength)),e.pattern&&(o=o.regex(new RegExp(e.pattern))),r=o;break}case"number":case"integer":{let o=n==="integer"?Je.number().int():Je.number();typeof e.minimum=="number"&&(o=o.min(e.minimum)),typeof e.maximum=="number"&&(o=o.max(e.maximum)),typeof e.exclusiveMinimum=="number"?o=o.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(o=o.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?o=o.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(o=o.lt(e.maximum)),typeof e.multipleOf=="number"&&(o=o.multipleOf(e.multipleOf)),r=o;break}case"boolean":{r=Je.boolean();break}case"null":{r=Je.null();break}case"object":{let o={},i=e.properties||{},s=new Set(e.required||[]);for(let[l,f]of Object.entries(i)){let h=fu(f,t);o[l]=s.has(l)?h:h.optional()}if(e.propertyNames){let l=fu(e.propertyNames,t),f=e.additionalProperties&&typeof e.additionalProperties=="object"?fu(e.additionalProperties,t):Je.any();if(Object.keys(o).length===0){r=Je.record(l,f);break}let h=Je.object(o).passthrough(),y=Je.looseRecord(l,f);r=Je.intersection(h,y);break}if(e.patternProperties){let l=e.patternProperties,f=Object.keys(l),h=[];for(let S of f){let b=fu(l[S],t),v=Je.string().regex(new RegExp(S));h.push(Je.looseRecord(v,b))}let y=[];if(Object.keys(o).length>0&&y.push(Je.object(o).passthrough()),y.push(...h),y.length===0)r=Je.object({}).passthrough();else if(y.length===1)r=y[0];else{let S=Je.intersection(y[0],y[1]);for(let b=2;b<y.length;b++)S=Je.intersection(S,y[b]);r=S}break}let c=Je.object(o);e.additionalProperties===!1?r=c.strict():typeof e.additionalProperties=="object"?r=c.catchall(fu(e.additionalProperties,t)):r=c.passthrough();break}case"array":{let o=e.prefixItems,i=e.items;if(o&&Array.isArray(o)){let s=o.map(l=>fu(l,t)),c=i&&typeof i=="object"&&!Array.isArray(i)?fu(i,t):void 0;c?r=Je.tuple(s).rest(c):r=Je.tuple(s),typeof e.minItems=="number"&&(r=r.check(Je.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Je.maxLength(e.maxItems)))}else if(Array.isArray(i)){let s=i.map(l=>fu(l,t)),c=e.additionalItems&&typeof e.additionalItems=="object"?fu(e.additionalItems,t):void 0;c?r=Je.tuple(s).rest(c):r=Je.tuple(s),typeof e.minItems=="number"&&(r=r.check(Je.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(Je.maxLength(e.maxItems)))}else if(i!==void 0){let s=fu(i,t),c=Je.array(s);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),r=c}else r=Je.array(Je.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function fu(e,t){if(typeof e=="boolean")return e?Je.any():Je.never();let n=qQe(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(f=>fu(f,t)),l=Je.union(c);n=r?Je.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(f=>fu(f,t)),l=Je.xor(c);n=r?Je.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:Je.any();else{let c=r?n:fu(e.allOf[0],t),l=r?0:1;for(let f=l;f<e.allOf.length;f++)c=Je.intersection(c,fu(e.allOf[f],t));n=c}e.nullable===!0&&t.version==="openapi-3.0"&&(n=Je.nullable(n)),e.readOnly===!0&&(n=Je.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let o={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let c of i)c in e&&(o[c]=e[c]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let c of s)c in e&&(o[c]=e[c]);for(let c of Object.keys(e))rBt.has(c)||(o[c]=e[c]);return Object.keys(o).length>0&&t.registry.add(n,o),e.description&&(n=n.describe(e.description)),n}function VQe(e,t){if(typeof e=="boolean")return e?Je.any():Je.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=oBt(n,t?.defaultTarget),o=n.$defs||n.definitions||{},i={version:r,defs:o,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??ka};return fu(n,i)}var Je,rBt,YQe=O(()=>{A();sw();SG();dw();fw();Je={...pw,...yG,iso:ZR},rBt=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"])});var ore={};$s(ore,{bigint:()=>cBt,boolean:()=>uBt,date:()=>lBt,number:()=>aBt,string:()=>sBt});function sBt(e){return Cee(ex,e)}function aBt(e){return wee(nx,e)}function uBt(e){return Fee(rx,e)}function cBt(e){return zee(ox,e)}function lBt(e){return Xee(yw,e)}var KQe=O(()=>{A();Jl();fw()});var m={};$s(m,{$brand:()=>VZ,$input:()=>Iee,$output:()=>Tee,NEVER:()=>qZ,TimePrecision:()=>Ree,ZodAny:()=>_ne,ZodArray:()=>Tne,ZodBase64:()=>GG,ZodBase64URL:()=>zG,ZodBigInt:()=>ox,ZodBigIntFormat:()=>$G,ZodBoolean:()=>rx,ZodCIDRv4:()=>QG,ZodCIDRv6:()=>FG,ZodCUID:()=>OG,ZodCUID2:()=>wG,ZodCatch:()=>Hne,ZodCodec:()=>Cw,ZodCustom:()=>vw,ZodCustomStringFormat:()=>tx,ZodDate:()=>yw,ZodDefault:()=>Une,ZodDiscriminatedUnion:()=>bne,ZodE164:()=>jG,ZodEmail:()=>DG,ZodEmoji:()=>BG,ZodEnum:()=>XR,ZodError:()=>W1t,ZodExactOptional:()=>Pne,ZodFile:()=>wne,ZodFirstPartyTypeKind:()=>rre,ZodFunction:()=>ere,ZodGUID:()=>Aw,ZodIPv4:()=>LG,ZodIPv6:()=>UG,ZodISODate:()=>IG,ZodISODateTime:()=>TG,ZodISODuration:()=>CG,ZodISOTime:()=>bG,ZodIntersection:()=>Cne,ZodIssueCode:()=>eBt,ZodJWT:()=>HG,ZodKSUID:()=>MG,ZodLazy:()=>Zne,ZodLiteral:()=>One,ZodMAC:()=>dne,ZodMap:()=>Bne,ZodNaN:()=>qne,ZodNanoID:()=>NG,ZodNever:()=>yne,ZodNonOptional:()=>ZG,ZodNull:()=>gne,ZodNullable:()=>Lne,ZodNumber:()=>nx,ZodNumberFormat:()=>tT,ZodObject:()=>Tw,ZodOptional:()=>JG,ZodPipe:()=>bw,ZodPrefault:()=>Fne,ZodPreprocess:()=>Vne,ZodPromise:()=>Xne,ZodReadonly:()=>Yne,ZodRealError:()=>Kc,ZodRecord:()=>WR,ZodSet:()=>Nne,ZodString:()=>ex,ZodStringFormat:()=>qr,ZodSuccess:()=>jne,ZodSymbol:()=>mne,ZodTemplateLiteral:()=>Jne,ZodTransform:()=>kne,ZodTuple:()=>Rne,ZodType:()=>Dn,ZodULID:()=>kG,ZodURL:()=>Ew,ZodUUID:()=>eA,ZodUndefined:()=>Ane,ZodUnion:()=>Iw,ZodUnknown:()=>Ene,ZodVoid:()=>Sne,ZodXID:()=>PG,ZodXor:()=>Ine,_ZodString:()=>xG,_default:()=>Qne,_function:()=>MQe,any:()=>fQe,array:()=>Sw,base64:()=>JUe,base64url:()=>ZUe,bigint:()=>uQe,boolean:()=>fne,catch:()=>$ne,check:()=>LQe,cidrv4:()=>YUe,cidrv6:()=>KUe,clone:()=>Wu,codec:()=>OQe,coerce:()=>ore,config:()=>Ei,core:()=>Yg,cuid:()=>FUe,cuid2:()=>GUe,custom:()=>UQe,date:()=>AQe,decode:()=>rne,decodeAsync:()=>ine,describe:()=>QQe,discriminatedUnion:()=>SQe,e164:()=>WUe,email:()=>BUe,emoji:()=>UUe,encode:()=>nne,encodeAsync:()=>one,endsWith:()=>zR,enum:()=>YG,exactOptional:()=>Mne,file:()=>xQe,flattenError:()=>JO,float32:()=>oQe,float64:()=>iQe,formatError:()=>ZO,fromJSONSchema:()=>VQe,function:()=>MQe,getErrorMap:()=>nBt,globalRegistry:()=>ka,gt:()=>Wm,gte:()=>ec,guid:()=>NUe,hash:()=>rQe,hex:()=>nQe,hostname:()=>tQe,httpUrl:()=>LUe,includes:()=>FR,instanceof:()=>GQe,int:()=>vG,int32:()=>sQe,int64:()=>cQe,intersection:()=>vne,invertCodec:()=>wQe,ipv4:()=>$Ue,ipv6:()=>VUe,iso:()=>ZR,json:()=>jQe,jwt:()=>XUe,keyof:()=>gQe,ksuid:()=>HUe,lazy:()=>Wne,length:()=>XS,literal:()=>RQe,locales:()=>iw,looseObject:()=>EQe,looseRecord:()=>IQe,lowercase:()=>UR,lt:()=>Zm,lte:()=>Kl,mac:()=>qUe,map:()=>bQe,maxLength:()=>WS,maxSize:()=>NE,meta:()=>FQe,mime:()=>jR,minLength:()=>Vg,minSize:()=>Xm,multipleOf:()=>BE,nan:()=>NQe,nanoid:()=>QUe,nativeEnum:()=>vQe,negative:()=>dG,never:()=>qG,nonnegative:()=>fG,nonoptional:()=>zne,nonpositive:()=>pG,normalize:()=>HR,null:()=>hne,nullable:()=>hw,nullish:()=>DQe,number:()=>pne,object:()=>hQe,optional:()=>gw,overwrite:()=>If,parse:()=>Wte,parseAsync:()=>Xte,partialRecord:()=>TQe,pipe:()=>RG,positive:()=>lG,prefault:()=>Gne,preprocess:()=>HQe,prettifyError:()=>sW,promise:()=>PQe,property:()=>mG,readonly:()=>Kne,record:()=>Dne,refine:()=>tre,regex:()=>LR,regexes:()=>Yl,registry:()=>j6,safeDecode:()=>ane,safeDecodeAsync:()=>cne,safeEncode:()=>sne,safeEncodeAsync:()=>une,safeParse:()=>ene,safeParseAsync:()=>tne,set:()=>CQe,setErrorMap:()=>tBt,size:()=>ZS,slugify:()=>YR,startsWith:()=>GR,strictObject:()=>_Qe,string:()=>mw,stringFormat:()=>eQe,stringbool:()=>zQe,success:()=>BQe,superRefine:()=>nre,symbol:()=>dQe,templateLiteral:()=>kQe,toJSONSchema:()=>_G,toLowerCase:()=>qR,toUpperCase:()=>VR,transform:()=>KG,treeifyError:()=>iW,trim:()=>$R,tuple:()=>xne,uint32:()=>aQe,uint64:()=>lQe,ulid:()=>zUe,undefined:()=>pQe,union:()=>VG,unknown:()=>eT,uppercase:()=>QR,url:()=>MUe,util:()=>Le,uuid:()=>OUe,uuidv4:()=>wUe,uuidv6:()=>kUe,uuidv7:()=>PUe,void:()=>mQe,xid:()=>jUe,xor:()=>yQe});var ire=O(()=>{A();Jl();fw();SG();Zte();lne();$Qe();Jl();_ee();Jl();lw();YQe();See();dw();dw();KQe();Ei(Q6())});var mu=O(()=>{A();ire();ire()});var sre,JQe,dBt,ZQe,eNn,are=O(()=>{"use strict";A();sre=["free","creator","team"],JQe=typeof process<"u"&&process.env?.NODE_ENV!=="production",dBt={stripe:{plans:[{tier:"free",subjectType:"user",name:"Free",description:"Share any thread from Claude Code, Codex, or Cowork. Share with friends or keep private. Share skills with your team instantly.",price:0,priceId:null,features:[{name:"Share threads from Claude Code, Codex, and Cowork"},{name:"Share with friends or keep private"},{name:"Skills tab \u2014 tool usage across every thread"},{name:"Share skills with your team instantly"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:3}},{tier:"creator",subjectType:"user",name:"Creator",description:"For builders who share a lot. Permanent share links that never expire.",price:29,isFeatured:!0,priceId:JQe?"price_1TP9BSKwvRM43sh64waIrvjj":"price_1TPA2gKwvRM43sh6Kp4ZCpJZ",features:[{name:"Everything in Free"},{name:"Shared threads live forever"}],entitlements:{workspaceScope:!1,review:!1,sharedThreadTtlDays:null}},{tier:"team",subjectType:"organization",name:"Team",description:"GitHub for Prompts. Org-wide thread sharing plus the review surface.",price:19,minSeats:2,priceId:JQe?"price_1TP9MpKwvRM43sh6TBIFxVCd":"price_1TPA3CKwvRM43sh6k0bgPTsQ",features:[{name:"Everything in Creator"},{name:"Workspace-wide thread sharing"},{name:"Minimum 2 seats"},{name:"Review feature (beta)"}],entitlements:{workspaceScope:!0,review:!0,sharedThreadTtlDays:null}}]}},ZQe=dBt.stripe.plans,eNn=Object.freeze(Object.fromEntries(ZQe.map(e=>[e.tier,e])))});var WQe=O(()=>{"use strict";A();are();are()});var pBt,Au,ure,nT,WG,fBt,XG,XQe,eFe,cre,mBt,ABt,gBt,hBt,_Bt,EBt,yBt,tFe,ez=O(()=>{"use strict";A();Sf();mu();pBt=ia(),Au=m.object({message:m.string()}),ure=m.record(m.string(),m.unknown()),nT=m.string().regex(/^doc_[0-9A-Za-z]{22}$/),WG=m.string().regex(/^proj_[0-9A-Za-z]{22}$/),fBt=["active","archived"],XG=m.enum(fBt),XQe=m.object({id:m.string().min(1),display_name:m.string().min(1)}),eFe=m.object({id:WG,name:m.string().min(1)}),cre=m.object({id:nT,title:m.string().min(1),status:XG,author:XQe,project:eFe.nullable(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),mBt=m.object({type:m.literal("list"),list_type:m.literal("doc"),objects:m.array(cre)}),ABt=m.object({project_id:WG.optional(),status:XG.optional()}),gBt=m.object({title:m.string().trim().min(1).max(300).optional(),prosemirror_json:ure.optional(),project_id:WG.nullable().optional()}),hBt=m.object({id:nT,created_at:m.string().datetime()}),_Bt=m.object({title:m.string().trim().min(1).max(300).optional(),prosemirror_json:ure.optional(),project_id:WG.nullable().optional(),status:XG.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),EBt=m.object({id:nT,updated_at:m.string().datetime()}),yBt=m.object({id:nT,title:m.string().min(1),prosemirror_json:ure,status:XG,author:XQe,project:eFe.nullable(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),tFe=pBt.router({listDocs:{method:"GET",path:"/docs",headers:m.object({authorization:m.string().min(1).optional()}),query:ABt,responses:{200:mBt,401:Au,403:Au},summary:"List docs in the authenticated user\u2019s organization. Optional project_id filter scopes to a single project."},createDoc:{method:"POST",path:"/docs",headers:m.object({authorization:m.string().min(1).optional()}),body:gBt,responses:{201:hBt,401:Au,403:Au,404:Au,422:Au},summary:"Create a doc. If project_id is provided, the doc is scoped to that project; otherwise it lives at the workspace level."},getDoc:{method:"GET",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:yBt,401:Au,403:Au,404:Au},summary:"Get a doc by id with its rich-text body and parent project (if any)"},updateDoc:{method:"PATCH",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),body:_Bt,responses:{200:EBt,401:Au,403:Au,404:Au,422:Au},summary:"Update a doc. If prosemirror_json changes, the server re-syncs lore.mention_references from mention nodes."},deleteDoc:{method:"DELETE",path:"/docs/:docId",pathParams:m.object({docId:nT}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:Au,403:Au,404:Au},summary:"Hard-delete a doc and any mention references it owns"}})});var SBt,Li,lre,tA,TBt,tz,dre,nFe,IBt,bBt,CBt,vBt,RBt,xBt,DBt,BBt,NBt,OBt,wBt,kBt,rFe,pre=O(()=>{"use strict";A();Sf();mu();ez();SBt=ia(),Li=m.object({message:m.string()}),lre=m.record(m.string(),m.unknown()),tA=m.string().regex(/^proj_[0-9A-Za-z]{22}$/),TBt=["active","archived"],tz=m.enum(TBt),dre=m.object({id:m.string().min(1),display_name:m.string().min(1)}),nFe=m.object({thread_id:m.string().min(1),title:m.string().min(1),added_at:m.string().datetime(),added_by:dre}),IBt=m.object({id:tA,name:m.string().min(1),status:tz,author:dre,thread_count:m.number().int().nonnegative(),doc_count:m.number().int().nonnegative(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),bBt=m.object({type:m.literal("list"),list_type:m.literal("project"),objects:m.array(IBt)}),CBt=m.object({status:tz.optional()}),vBt=m.object({name:m.string().trim().min(1).max(200),prosemirror_json:lre.optional()}),RBt=m.object({id:tA,created_at:m.string().datetime()}),xBt=m.object({name:m.string().trim().min(1).max(200).optional(),prosemirror_json:lre.optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),DBt=m.object({id:tA,updated_at:m.string().datetime()}),BBt=m.object({archived:m.boolean()}),NBt=m.object({id:tA,status:tz,archived_at:m.string().datetime().nullable()}),OBt=m.object({id:tA,name:m.string().min(1),prosemirror_json:lre,status:tz,author:dre,created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable(),threads:m.array(nFe),docs:m.array(cre)}),wBt=m.object({thread_id:m.string().min(1).max(64)}),kBt=nFe,rFe=SBt.router({listProjects:{method:"GET",path:"/projects",headers:m.object({authorization:m.string().min(1).optional()}),query:CBt,responses:{200:bBt,401:Li},summary:"List projects in the authenticated user\u2019s organization"},createProject:{method:"POST",path:"/projects",headers:m.object({authorization:m.string().min(1).optional()}),body:vBt,responses:{201:RBt,401:Li,422:Li},summary:"Create a new project in the authenticated user\u2019s organization"},getProject:{method:"GET",path:"/projects/:projectId",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:OBt,401:Li,403:Li,404:Li},summary:"Get a project with its attached threads and child docs. The project description is the canonical mention source for project-scoped @-mentions."},updateProject:{method:"PATCH",path:"/projects/:projectId",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:xBt,responses:{200:DBt,401:Li,403:Li,404:Li,422:Li},summary:"Update a project\u2019s name or rich-text body. Body changes re-sync mention_references for source_kind=project."},archiveProject:{method:"POST",path:"/projects/:projectId/archive",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:BBt,responses:{200:NBt,401:Li,403:Li,404:Li},summary:"Archive (soft-delete) or unarchive a project"},addProjectThread:{method:"POST",path:"/projects/:projectId/threads",pathParams:m.object({projectId:tA}),headers:m.object({authorization:m.string().min(1).optional()}),body:wBt,responses:{201:kBt,401:Li,403:Li,404:Li,409:Li,422:Li},summary:"Pin an existing visible thread to this project. Idempotent \u2014 re-adding returns the existing membership."},removeProjectThread:{method:"DELETE",path:"/projects/:projectId/threads/:threadId",pathParams:m.object({projectId:tA,threadId:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:Li,403:Li,404:Li},summary:"Remove a thread membership from a project"}})});var PBt,jn,Jc,iFe,MBt,nz,rz,LBt,UBt,QBt,oFe,FBt,GBt,sFe,zBt,jBt,HBt,$Bt,qBt,VBt,YBt,KBt,JBt,ZBt,WBt,XBt,eNt,tNt,nNt,rNt,oNt,iNt,sNt,aNt,aFe,fre=O(()=>{"use strict";A();Sf();mu();PBt=ia(),jn=m.object({message:m.string()}),Jc=m.string().regex(/^reg_[0-9A-Za-z]{22}$/),iFe=m.string().min(1).max(64),MBt=["active","quiet","dormant","archived"],nz=m.enum(MBt),rz=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable().optional()}),LBt=m.object({id:m.string().min(1),display_name:m.string().min(1),thread_count:m.number().int().positive()}),UBt=["asked","requested","decided","corrected","shared","requirement"],QBt=m.enum(UBt),oFe=m.object({id:m.string().min(1),kind:QBt,summary:m.string(),thread_id:m.string().min(1),thread_title:m.string(),created_at:m.string().datetime()}),FBt=m.object({decided_14d:m.number().int().nonnegative(),asked_14d:m.number().int().nonnegative()}),GBt=m.object({id:Jc,name:m.string().min(1),overlap_score:m.number().min(0).max(1)}),sFe=m.object({thread_id:m.string().min(1),title:m.string().min(1),is_primary:m.boolean(),added_at:m.string().datetime(),added_by:rz}),zBt=m.object({id:Jc,name:m.string().min(1),blurb:m.string().nullable(),status:nz,thread_count:m.number().int().nonnegative(),contributor_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative(),contributors_preview:m.array(rz).max(3),top_filepath:m.string().nullable(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable()}),jBt=m.object({type:m.literal("list"),list_type:m.literal("region"),objects:m.array(zBt)}),HBt=m.object({status:nz.optional()}),$Bt=m.object({name:m.string().trim().min(1).max(200),blurb:m.string().trim().max(2e3).optional()}),qBt=m.object({id:Jc,created_at:m.string().datetime()}),VBt=m.object({name:m.string().trim().min(1).max(200).optional(),blurb:m.string().trim().max(2e3).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),YBt=m.object({id:Jc,updated_at:m.string().datetime()}),KBt=m.object({archived:m.boolean()}),JBt=m.object({id:Jc,status:nz,archived_at:m.string().datetime().nullable()}),ZBt=m.object({id:Jc,name:m.string().min(1),blurb:m.string().nullable(),status:nz,created_by:rz,thread_count:m.number().int().nonnegative(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime(),archived_at:m.string().datetime().nullable(),synthesized_status:m.string().nullable(),synthesized_status_at:m.string().datetime().nullable(),threads:m.array(sFe),contributors:m.array(LBt),decisions:m.object({decided:m.array(oFe),open:m.array(oFe)}),velocity:FBt,cited_by_active_regions:m.array(GBt)}),WBt=m.object({id:Jc,synthesized_status:m.string(),synthesized_status_at:m.string().datetime()}),XBt=m.object({regions_created:m.number().int().nonnegative(),llm_dispatched:m.boolean()}),eNt=m.object({promoted_to_active:m.number().int().nonnegative(),demoted_to_quiet:m.number().int().nonnegative(),demoted_to_dormant:m.number().int().nonnegative()}),tNt=m.object({thread_id:m.string().min(1),region_id:Jc,region_name:m.string().min(1),score:m.number().min(0).max(1),signal:m.enum(["file","embedding","combined"])}),nNt=m.object({thread_ids:m.array(m.string().min(1)).min(1).max(50)}),rNt=m.object({type:m.literal("list"),list_type:m.literal("region_suggestion"),objects:m.array(tNt)}),oNt=m.object({thread_id:m.string().min(1),title:m.string(),created_at:m.string().datetime(),author:rz,user_message_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative()}),iNt=m.object({type:m.literal("list"),list_type:m.literal("unfiled_thread"),objects:m.array(oNt)}),sNt=m.object({thread_id:iFe}),aNt=sFe,aFe=PBt.router({listRegions:{method:"GET",path:"/regions",headers:m.object({authorization:m.string().min(1).optional()}),query:HBt,responses:{200:jBt,401:jn,403:jn},summary:"List regions in the authenticated user\u2019s organization"},createRegion:{method:"POST",path:"/regions",headers:m.object({authorization:m.string().min(1).optional()}),body:$Bt,responses:{201:qBt,401:jn,403:jn,409:jn,422:jn},summary:"Create a new region in the authenticated user\u2019s organization"},getRegion:{method:"GET",path:"/regions/:regionId",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:ZBt,401:jn,403:jn,404:jn},summary:"Get a region with its attached threads and rolled-up contributors"},updateRegion:{method:"PATCH",path:"/regions/:regionId",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:VBt,responses:{200:YBt,401:jn,403:jn,404:jn,409:jn,422:jn},summary:"Rename a region or update its blurb"},archiveRegion:{method:"POST",path:"/regions/:regionId/archive",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:KBt,responses:{200:JBt,401:jn,403:jn,404:jn},summary:"Archive or unarchive a region"},addRegionThread:{method:"POST",path:"/regions/:regionId/threads",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:sNt,responses:{201:aNt,401:jn,403:jn,404:jn,409:jn,422:jn},summary:"Attach an existing visible thread to this region. Primary if the thread has no other primary, otherwise secondary (up to 2). Idempotent."},suggestRegionsForThreads:{method:"POST",path:"/regions/suggest-for-threads",headers:m.object({authorization:m.string().min(1).optional()}),body:nNt,responses:{200:rNt,401:jn,403:jn,422:jn},summary:'Batch lookup: for each thread id, return the highest-scoring active region in the viewer\u2019s workspace (or omit when no region clears the threshold). Used by the per-thread inline "Add to <region>" suggestion chip.'},listUnfiledThreads:{method:"GET",path:"/regions/unfiled",headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({days:m.coerce.number().int().positive().max(180).optional()}),responses:{200:iNt,401:jn,403:jn},summary:"List threads in the authenticated user\u2019s scope that are not yet attached to any region (default last 30 days)."},transitionRegionLifecycle:{method:"POST",path:"/regions/lifecycle/transition",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:eNt,401:jn,403:jn},summary:"Sweep regions and demote/promote between active/quiet/dormant based on last_active_at. Idempotent \u2014 safe to run on a cron or on-demand."},refreshRegions:{method:"POST",path:"/regions/refresh",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:XBt,401:jn,403:jn},summary:"Run the clustering pipeline against unfiled threads and create regions from the resulting clusters. Deterministic pass is synchronous; LLM pass is dispatched as an async Inngest event and lands more regions ~30s later."},synthesizeRegion:{method:"POST",path:"/regions/:regionId/synthesize",pathParams:m.object({regionId:Jc}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:WBt,401:jn,403:jn,404:jn,409:jn,503:jn},summary:"Generate (or refresh) the region\u2019s synthesized status using recent decisions and threads. Persists to regions.synthesized_status."},removeRegionThread:{method:"DELETE",path:"/regions/:regionId/threads/:threadId",pathParams:m.object({regionId:Jc,threadId:iFe}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.object({}),401:jn,403:jn,404:jn},summary:"Remove a thread membership from a region"}})});var uNt,bf,DNn,BNn,cNt,NNn,lNt,ix,oz=O(()=>{"use strict";A();mu();uNt=["person","foot_gun"],bf=m.enum(uNt),DNn=m.enum(["authored","commented","edited","mentioned"]),BNn=m.enum(["observed_in","reaffirmed_in"]),cNt=["primary"],NNn=m.enum(cNt),lNt=["supports","supersedes"],ix=m.enum(lNt)});var dNt,mre=O(()=>{"use strict";A();mu();dNt=m.object({user_id:m.string().nullable()})});var pNt,Are=O(()=>{"use strict";A();mu();pNt=m.object({typical_phrasings:m.array(m.string()).default([])})});var gre=O(()=>{"use strict";A();oz();mre();Are();oz();mre();Are()});var fNt,Ui,Zl,mNt,cFe,lFe,ANt,uFe,rT,gNt,hNt,_Nt,ENt,yNt,dFe,hre=O(()=>{"use strict";A();Sf();mu();gre();fNt=ia(),Ui=m.object({message:m.string()}),Zl=m.string().regex(/^ent_[0-9A-Za-z]{22}$/),mNt=["active","archived"],cFe=m.enum(mNt),lFe=m.object({id:Zl,kind:bf,slug:m.string(),name:m.string(),blurb:m.string().nullable(),status:cFe,lifecycle:m.string().nullable(),human_edited_at:m.string().datetime().nullable(),last_active_at:m.string().datetime(),created_at:m.string().datetime(),updated_at:m.string().datetime()}),ANt=m.object({thread_id:m.string(),thread_title:m.string(),role:m.string(),score:m.number().nullable(),added_at:m.string().datetime(),added_by:m.object({id:m.string(),display_name:m.string()})}),uFe=m.object({entity_id:Zl,name:m.string(),slug:m.string(),kind:bf,edge_kind:ix}),rT=lFe.extend({payload:m.record(m.string(),m.unknown()),attachments:m.array(ANt),edges:m.object({outgoing:m.array(uFe),incoming:m.array(uFe)})}),gNt=m.object({type:m.literal("list"),list_type:m.literal("entities"),has_more:m.boolean(),objects:m.array(lFe)}),hNt=m.object({kind:bf.optional().describe("Filter to a single entity kind"),status:cFe.optional().describe("Filter by entity status"),after:Zl.optional().describe("Cursor: return entities after this id"),before:Zl.optional().describe("Cursor: return entities before this id")}),_Nt=m.object({name:m.string().min(1).optional().describe("New display name for the entity"),blurb:m.string().nullable().optional().describe("New blurb; null clears it"),payload:m.record(m.string(),m.unknown()).optional().describe("Replacement payload for the entity")}),ENt=m.object({thread_id:m.string().min(1).describe("Id of the thread to attach"),role:m.string().min(1).describe("Role of the thread relative to the entity"),score:m.number().min(0).max(1).nullable().optional().describe("Optional relevance score in [0, 1]")}),yNt=m.object({to_id:Zl.describe("Id of the target entity for the edge"),kind:ix.describe("Kind of edge to create")}),dFe=fNt.router({listEntities:{method:"GET",path:"/entities",headers:m.object({authorization:m.string().min(1).optional()}),query:hNt,responses:{200:gNt,401:Ui},summary:"List entities in the authenticated user\u2019s organization"},getEntity:{method:"GET",path:"/entities/:entityId",pathParams:m.object({entityId:Zl.describe("Id of the entity to fetch")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:rT,401:Ui,404:Ui},summary:"Get an entity with its payload, attachments, and edges"},patchEntity:{method:"PATCH",path:"/entities/:entityId",pathParams:m.object({entityId:Zl.describe("Id of the entity to update")}),headers:m.object({authorization:m.string().min(1).optional()}),body:_Nt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Update an entity\u2019s name, blurb, or payload"},archiveEntity:{method:"POST",path:"/entities/:entityId/archive",pathParams:m.object({entityId:Zl.describe("Id of the entity to archive")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Archive an entity"},attachEntityThread:{method:"POST",path:"/entities/:entityId/threads",pathParams:m.object({entityId:Zl.describe("Id of the entity to attach a thread to")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ENt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Attach a thread to an entity"},detachEntityThread:{method:"DELETE",path:"/entities/:entityId/threads/:threadId",pathParams:m.object({entityId:Zl.describe("Id of the entity to detach a thread from"),threadId:m.string().min(1).describe("Id of the thread to detach")}),headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({role:m.string().min(1).describe("Role of the thread membership to remove")}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Detach a thread from an entity"},addEntityEdge:{method:"POST",path:"/entities/:entityId/edges",pathParams:m.object({entityId:Zl.describe("Id of the source entity for the edge")}),headers:m.object({authorization:m.string().min(1).optional()}),body:yNt,responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Add an edge from this entity to another entity"},removeEntityEdge:{method:"DELETE",path:"/entities/:entityId/edges/:toId/:kind",pathParams:m.object({entityId:Zl.describe("Id of the source entity for the edge"),toId:Zl.describe("Id of the target entity for the edge"),kind:ix.describe("Kind of edge to remove")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:rT,401:Ui,403:Ui,404:Ui},summary:"Remove an edge from this entity to another entity"}})});var SNt,iz,TNt,sz,INt,bNt,CNt,vNt,RNt,xNt,DNt,BNt,pFe,_re=O(()=>{"use strict";A();Sf();mu();SNt=ia(),iz=m.object({message:m.string()}),TNt=["thread","plan","doc","user"],sz=m.enum(TNt),INt=["doc","project"],bNt=m.enum(INt),CNt=m.object({kind:sz,id:m.string().min(1),title:m.string().min(1),href:m.string().min(1)}),vNt=m.object({type:m.literal("list"),list_type:m.literal("mention"),objects:m.array(CNt)}),RNt=m.object({q:m.string().trim().min(1).max(50),kinds:m.string().optional().transform(e=>{if(!e)return;let t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}).pipe(m.array(sz).optional())}),xNt=m.object({source_kind:bNt,source_id:m.string().min(1),source_title:m.string().min(1),source_href:m.string().min(1),target_kind:sz,target_id:m.string().min(1),created_at:m.string().datetime()}),DNt=m.object({type:m.literal("list"),list_type:m.literal("backlink"),objects:m.array(xNt)}),BNt=m.object({target_kind:sz,target_id:m.string().min(1).max(64)}),pFe=SNt.router({searchMentions:{method:"GET",path:"/mentions/search",headers:m.object({authorization:m.string().min(1).optional()}),query:RNt,responses:{200:vNt,401:iz,422:iz},summary:"Search threads, plans, files, and users by title/name for @-mention typeahead. Org-scoped, max 10 results across all kinds."},listBacklinks:{method:"GET",path:"/mentions/backlinks",headers:m.object({authorization:m.string().min(1).optional()}),query:BNt,responses:{200:DNt,401:iz,403:iz},summary:"List every doc/project body in the caller\u2019s organization that mentions the given target. Newest-first."}})});var NNt,ONt,sa,fFe,wNt,kNt,PNt,MNt,mFe,LNt,UNt,AFe,Ere=O(()=>{"use strict";A();Sf();mu();NNt=ia(),ONt=m.object({type:m.literal("list"),list_type:m.literal("thread"),has_more:m.boolean(),objects:m.array(m.unknown())}),sa=m.object({message:m.string()}),fFe=m.object({thread_id:m.string().min(1),is_favorited:m.boolean(),favorited_at:m.string().datetime().nullable()}),wNt=m.object({before:m.string().min(1).max(64).optional()}),kNt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),PNt=m.object({block_id:m.string().min(1),thread_id:m.string().min(1),thread_title:m.string(),thread_visibility:m.enum(["private","workspace","public"]),author:kNt,preview:m.string(),prompted_at:m.string().datetime().nullable(),favorited_at:m.string().datetime()}),MNt=m.object({type:m.literal("list"),list_type:m.literal("favorite_prompt"),has_more:m.boolean(),objects:m.array(PNt)}),mFe=m.object({block_id:m.string().min(1),thread_id:m.string().min(1).nullable(),is_favorited:m.boolean(),favorited_at:m.string().datetime().nullable()}),LNt=m.object({before:m.string().min(1).max(64).optional()}),UNt=m.object({block_ids:m.array(m.string().min(1))}),AFe=NNt.router({addThreadFavorite:{method:"POST",path:"/threads/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:fFe,401:sa,403:sa,404:sa},summary:"Bookmark a thread for the authenticated user. Idempotent \u2014 re-favoriting returns the existing membership."},removeThreadFavorite:{method:"DELETE",path:"/threads/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:fFe,401:sa,403:sa,404:sa},summary:"Remove a thread bookmark for the authenticated user (no-op if absent)."},listFavoriteThreads:{method:"GET",path:"/favorites/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:wNt,responses:{200:ONt,401:sa,403:sa},summary:"List threads the authenticated user has favorited, newest favorited first. Visibility filtering still applies \u2014 a thread the viewer can no longer see (e.g. visibility downgraded) is omitted from the list."},addPromptFavorite:{method:"POST",path:"/thread-blocks/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:mFe,401:sa,403:sa,404:sa,409:sa},summary:'Bookmark a single user prompt (a thread_blocks row with type="user") for the authenticated user. Idempotent.'},removePromptFavorite:{method:"DELETE",path:"/thread-blocks/:id/favorite",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:mFe,401:sa,404:sa},summary:"Remove a prompt bookmark for the authenticated user (no-op if absent)."},listFavoritePrompts:{method:"GET",path:"/favorites/prompts",headers:m.object({authorization:m.string().min(1).optional()}),query:LNt,responses:{200:MNt,401:sa},summary:"List the user's favorited prompts, newest first. Prompts whose parent thread the viewer can no longer see (visibility downgraded) are filtered out at read time."},listFavoritedBlockIdsInThread:{method:"GET",path:"/threads/:id/favorited-blocks",pathParams:m.object({id:m.string().min(1).max(64)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:UNt,401:sa,403:sa,404:sa},summary:"Returns the set of thread_block ids the authenticated viewer has favorited within a single thread, used to bootstrap per-prompt star state on the SessionView."}})});var QNt,gFe,FNt,GNt,zNt,jNt,HNt,hFe,yre=O(()=>{"use strict";A();Sf();mu();QNt=ia(),gFe=m.object({message:m.string()}),FNt=m.object({id:m.string().min(1),title:m.string(),href:m.string().min(1),author_display_name:m.string().nullable(),author_handle:m.string().nullable()}),GNt=m.object({name:m.string().min(1),usage_count:m.number().int().nonnegative(),href:m.string().min(1)}),zNt=m.object({id:m.string().min(1),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable(),href:m.string().min(1)}),jNt=m.object({type:m.literal("global_search"),threads:m.array(FNt),skills:m.array(GNt),people:m.array(zNt)}),HNt=m.object({q:m.string().trim().min(1).max(80)}),hFe=QNt.router({globalSearch:{method:"GET",path:"/search",headers:m.object({authorization:m.string().min(1).optional()}),query:HNt,responses:{200:jNt,401:gFe,422:gFe},summary:"Global navbar search. Threads and people are searched globally (subject to thread visibility); skills are scoped to the viewer workspace. Max 5 results per kind."}})});var $Nt,oT,qNt,VNt,YNt,KNt,_Fe,Sre=O(()=>{"use strict";A();Sf();mu();$Nt=ia(),oT=m.object({message:m.string()}),qNt=m.object({id:m.string().min(1),name:m.string().min(1),is_private:m.boolean()}),VNt=m.object({channels:m.array(qNt)}),YNt=m.object({channel_name:m.string().min(1),thread_id:m.string().min(1)}),KNt=m.object({ok:m.literal(!0),channel:m.string(),ts:m.string()}),_Fe=$Nt.router({listSlackChannels:{method:"GET",path:"/slack/channels",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:VNt,401:oT,404:oT,502:oT},summary:"List Slack channels visible to the bot for the caller's organization."},postToSlack:{method:"POST",path:"/slack/post",headers:m.object({authorization:m.string().min(1).optional()}),body:YNt,responses:{200:KNt,400:oT,401:oT,404:oT,502:oT},summary:"Post a Lore thread link to a Slack channel. The unfurl handler renders the preview."}})});var _On,EOn,yOn,ei,JNt,ZNt,WNt,XNt,Tre,SOn,EFe=O(()=>{"use strict";A();mu();oz();az();_On=m.enum(["thread","org","user","public"]),EOn=m.discriminatedUnion("kind",[m.object({kind:m.literal("thread"),id:m.string().min(1)}),m.object({kind:m.literal("org"),id:m.string().min(1)}),m.object({kind:m.literal("user"),id:m.string().min(1)}),m.object({kind:m.literal("public"),id:m.string().min(1)})]),yOn=m.enum(["thread.created","thread.completed","thread.block.appended","thread.comment.created","thread.comment.updated","thread.comment.deleted","thread.vote.cast","thread.vote.cleared","user.followed","user.joined","user.presence","entity.created","entity.updated","entity.archived","entity.thread_attached","entity.thread_detached","entity.linked","entity.superseded","skill.published","skill.version.accepted","skill.version.proposed","skill.version.rejected","skill.installation.deleted"]),ei=m.object({id:m.string().min(1),subjects:m.array(m.string().min(1)).min(1),actor_user_id:m.string().min(1).nullable(),created_at:m.string().datetime()}),JNt=m.object({thread_id:m.string().min(1),title:m.string(),author_id:m.string().min(1),created_at:m.string().datetime()}),ZNt=m.enum(["user","assistant","tool","progress","system"]),WNt=m.enum(["claude_global","agents_global","claude_project","agents_project"]),XNt=m.enum(["private","workspace"]),Tre=m.object({skill_id:m.string().min(1),name:m.string().min(1),root_kind:WNt,version:m.number().int().positive(),content_hash:m.string().startsWith("md5:")}),SOn=m.discriminatedUnion("type",[ei.extend({type:m.literal("thread.created"),payload:JNt}),ei.extend({type:m.literal("thread.completed"),payload:m.object({thread_id:m.string().min(1),completed_at:m.string().datetime()})}),ei.extend({type:m.literal("thread.block.appended"),payload:m.object({thread_id:m.string().min(1),block_id:m.string().min(1),block_type:ZNt,excerpt:m.string().nullable()})}),ei.extend({type:m.literal("thread.comment.created"),payload:m.object({comment:m.lazy(()=>nA)})}),ei.extend({type:m.literal("thread.comment.updated"),payload:m.object({comment:m.lazy(()=>nA)})}),ei.extend({type:m.literal("thread.comment.deleted"),payload:m.object({thread_id:m.string().min(1),comment_id:m.string().min(1)})}),ei.extend({type:m.literal("thread.vote.cast"),payload:m.object({thread_id:m.string().min(1),vote_count:m.number().int().nonnegative()})}),ei.extend({type:m.literal("thread.vote.cleared"),payload:m.object({thread_id:m.string().min(1),vote_count:m.number().int().nonnegative()})}),ei.extend({type:m.literal("user.followed"),payload:m.object({followee_id:m.string().min(1),followee_handle:m.string().nullable(),followee_display_name:m.string().nullable()})}),ei.extend({type:m.literal("user.joined"),payload:m.object({organization_id:m.string().min(1).nullable(),organization_name:m.string().nullable()})}),ei.extend({type:m.literal("user.presence"),payload:m.object({status:m.literal("online")})}),ei.extend({type:m.literal("entity.created"),payload:m.object({entity_id:m.string().min(1),kind:bf,slug:m.string().min(1),name:m.string().min(1)})}),ei.extend({type:m.literal("entity.updated"),payload:m.object({entity_id:m.string().min(1),kind:bf,changed_fields:m.array(m.string()).min(1),actor:m.enum(["agent","human"])})}),ei.extend({type:m.literal("entity.archived"),payload:m.object({entity_id:m.string().min(1),kind:bf})}),ei.extend({type:m.literal("entity.thread_attached"),payload:m.object({entity_id:m.string().min(1),kind:bf,thread_id:m.string().min(1),role:m.string().min(1),score:m.number().nullable()})}),ei.extend({type:m.literal("entity.thread_detached"),payload:m.object({entity_id:m.string().min(1),kind:bf,thread_id:m.string().min(1),role:m.string().min(1)})}),ei.extend({type:m.literal("entity.linked"),payload:m.object({from_id:m.string().min(1),to_id:m.string().min(1),edge_kind:ix})}),ei.extend({type:m.literal("entity.superseded"),payload:m.object({superseding_id:m.string().min(1),supersedes_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.published"),payload:Tre.extend({visibility:XNt})}),ei.extend({type:m.literal("skill.version.accepted"),payload:Tre}),ei.extend({type:m.literal("skill.version.proposed"),payload:Tre.extend({owner_user_id:m.string().min(1),proposer_user_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.version.rejected"),payload:m.object({skill_id:m.string().min(1),version:m.number().int().positive(),reviewer_user_id:m.string().min(1),proposer_user_id:m.string().min(1)})}),ei.extend({type:m.literal("skill.installation.deleted"),payload:m.object({skill_id:m.string().min(1),installation_id:m.string().min(1),user_id:m.string().min(1)})})])});var eOt,tOt,POn,nOt,rOt,MOn,H,oOt,NFe,OFe,wFe,iOt,sOt,aOt,yFe,uOt,cOt,kFe,lOt,dOt,pOt,fOt,mOt,AOt,gOt,hOt,PFe,_Ot,EOt,yOt,SOt,MFe,pz,TOt,IOt,bOt,COt,vOt,ROt,xOt,DOt,BOt,NOt,OOt,wOt,kOt,POt,MOt,LOt,Cre,LFe,UOt,QOt,FOt,GOt,UFe,zOt,jOt,HOt,$Ot,qOt,VOt,Cf,YOt,KOt,JOt,ZOt,WOt,Dw,iT,vre,LOn,uz,XOt,ewt,fz,twt,QFe,FFe,nwt,Rw,Rre,SFe,rwt,GFe,TFe,owt,iwt,nA,swt,awt,uwt,cwt,lwt,dwt,UOn,pwt,fwt,mwt,zFe,xre,jFe,Awt,gwt,hwt,_wt,Ewt,ywt,HFe,Swt,Twt,Iwt,bwt,Cwt,vwt,Ire,Rwt,xwt,Dwt,xw,Bwt,Nwt,Owt,wwt,kwt,Pwt,Mwt,Lwt,Uwt,Qwt,Fwt,Gwt,zwt,jwt,IFe,Hwt,$wt,qwt,Vwt,Ywt,Kwt,Jwt,Zwt,Wwt,Xwt,ekt,lz,tkt,nkt,rkt,okt,ikt,bFe,skt,akt,CFe,ukt,vFe,ckt,lkt,dkt,pkt,fkt,mkt,Akt,gkt,hkt,_kt,$Fe,Ekt,ykt,Skt,Tkt,Ikt,qFe,bkt,Ckt,vkt,Rkt,xkt,Dkt,RFe,Bkt,Nkt,Okt,wkt,cz,kkt,Pkt,Mkt,Lkt,Ukt,Qkt,Fkt,Gkt,zkt,jkt,Hkt,$kt,qkt,sx,VFe,bre,Vkt,Ykt,Kkt,Jkt,Zkt,xFe,dz,Wkt,Xkt,ePt,tPt,nPt,rPt,oPt,iPt,sPt,PE,DFe,aPt,uPt,cPt,lPt,dPt,pPt,fPt,mPt,APt,gPt,hPt,_Pt,EPt,yPt,SPt,TPt,IPt,bPt,CPt,vPt,BFe,RPt,YFe,xPt,DPt,BPt,NPt,OPt,mz,az=O(()=>{"use strict";A();Sf();mu();WQe();pre();fre();hre();ez();_re();Ere();yre();Sre();EFe();gre();pre();fre();hre();ez();_re();Ere();yre();Sre();eOt=ia(),tOt=["gmail.com","googlemail.com","hotmail.com","outlook.com","live.com","msn.com","yahoo.com","ymail.com","rocketmail.com","icloud.com","me.com","mac.com","aol.com","proton.me","protonmail.com","pm.me","tutanota.com","tuta.io","fastmail.com","hey.com","mail.com","gmx.com","gmx.net","zoho.com","zohomail.com","hushmail.com","lycos.com","inbox.com","yandex.com","yandex.ru","mail.ru","inbox.ru","bk.ru","list.ru","rambler.ru","qq.com","163.com","126.com","yeah.net","sina.com","naver.com","daum.net","hanmail.net","kakao.com","rediffmail.com","comcast.net","verizon.net","att.net","sbcglobal.net","bellsouth.net","earthlink.net","charter.net","cox.net","roadrunner.com","spectrum.net","btinternet.com","virginmedia.com","sky.com","orange.fr","wanadoo.fr","free.fr","laposte.net","web.de","t-online.de","gmx.de","libero.it","virgilio.it","alice.it","seznam.cz","centrum.cz","wp.pl","interia.pl","o2.pl","onet.pl"],POn=new Set(tOt),nOt=m.object({id:m.string().uuid(),role:m.enum(["user","assistant"]),content:m.string().min(1),timestamp:m.string().datetime()}),rOt=m.object({id:m.string().uuid(),title:m.string().min(1),author:m.string().min(1),authorAvatar:m.string().min(1).max(4),model:m.string().min(1),turnCount:m.number().int().nonnegative(),createdAt:m.string().datetime(),preview:m.string()}),MOn=rOt.extend({messages:m.array(nOt)}),H=m.object({message:m.string()}),oOt=/^[a-zA-Z0-9_-]{2,32}$/,NFe=m.string().regex(oOt,"Handle must be 2\u201332 characters: letters, numbers, dashes, or underscores."),OFe=m.enum(["friend","events","twitter","linkedin","hacker_news","reddit","discord","youtube","google","ai_search","other"]),wFe=m.object({id:m.string(),first_name:m.string().min(1),last_name:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),bio:m.string().max(280).nullable(),avatar_url:m.string().nullable(),banner_url:m.string().nullable(),share_new_threads_to_workspace:m.boolean(),experimental_features_enabled:m.boolean(),onboarded_at:m.string().nullable(),attribution_source:OFe.nullable(),attribution_source_detail:m.string().nullable()}),iOt=m.object({email:m.string().nullable(),name:m.string().nullable(),handle:m.string().nullable(),created_at:m.string(),onboarded_at:m.string().nullable(),is_admin:m.boolean(),referred_by_user_id:m.string().nullable(),plan_tier:m.enum(["free","creator","team"]),organization_id:m.string().nullable(),signup_source:m.enum(["referral","organic"]),first_upload_at:m.string().nullable(),first_share_at:m.string().nullable(),first_cli_auth_at:m.string().nullable(),first_plugin_activated_at:m.string().nullable(),first_plugin_agent:m.string().nullable()}),sOt=m.object({group_key:m.string().min(1),properties:m.object({name:m.string(),plan_tier:m.enum(["free","creator","team"]),seat_count:m.number().int().nonnegative(),created_at:m.string(),email_domains:m.array(m.string()),default_thread_visibility:m.string(),member_count:m.number().int().nonnegative().nullable()})}),aOt=m.object({authProviderUserId:m.string().min(1).optional(),organizationId:m.string().min(1).optional(),org_name:m.string().min(1).optional(),organizations:m.array(m.object({id:m.string().min(1),name:m.string().min(1)})),emailAddress:m.string().email(),name:m.string().nullable(),user:wFe,is_admin:m.boolean(),is_new_signup:m.boolean(),posthog:m.object({user_properties:iOt,organization:sOt.nullable()})}),yFe=m.object({workos_client_id:m.string().min(1),workos_api_origin:m.string().url()}),uOt=m.object({share_new_threads_to_workspace:m.boolean().optional(),experimental_features_enabled:m.boolean().optional(),onboarded_at:m.union([m.literal("now"),m.null()]).optional(),attribution_source:OFe.nullable().optional(),attribution_source_detail:m.string().max(280).nullable().optional(),display_name:m.string().min(1).max(120).optional(),handle:NFe.optional(),bio:m.string().max(280).nullable().optional(),avatar_storage_url:m.string().min(1).nullable().optional(),banner_storage_url:m.string().min(1).nullable().optional()}).refine(e=>Object.keys(e).length>0,{message:"At least one field must be provided"}),cOt=m.object({id:m.string(),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable(),visible_thread_count:m.number().int().nonnegative(),last_active_at:m.string().datetime().nullable(),product_last_seen_at:m.string().datetime().nullable()}),kFe=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),bio:m.string().max(280).nullable(),avatar_url:m.string().nullable(),banner_url:m.string().nullable(),organization_name:m.string().min(1).nullable(),created_at:m.string().min(1),visible_thread_count:m.number().int().nonnegative(),follower_count:m.number().int().nonnegative(),following_count:m.number().int().nonnegative(),published_project_count:m.number().int().nonnegative(),is_following:m.boolean(),is_self:m.boolean()}),lOt=m.object({type:m.literal("list"),list_type:m.literal("organization_member"),objects:m.array(cOt)}),dOt=m.object({email_address:m.string().email()}),pOt=m.object({email_address:m.string().email(),invitation_id:m.string().min(1)}),fOt=m.object({organization_id:m.string().min(1),organization_name:m.string().min(1),domain:m.string().min(1),created:m.boolean()}),mOt=m.object({location:m.string().trim().min(1),contact:m.string().trim().email()}),AOt=m.enum(["target_profile","demo","substrate_waitlist"]),gOt=m.object({type:AOt,email:m.string().trim().email(),name:m.string().trim().optional()}),hOt=m.object({location:m.string().min(1),contact:m.string().email(),created_at:m.string().datetime()}),PFe=m.enum(["general","bug","feature_request","question"]),_Ot=m.object({type:PFe,message:m.string().trim().min(1).max(5e3)}),EOt=m.object({id:m.string().min(1),type:PFe,message:m.string().min(1),created_at:m.string().datetime()}),yOt=m.object({path_glob:m.string().min(1),name:m.string().min(1),description:m.string().min(1)}),SOt=m.object({repo_origin_path:m.string().min(1),building_blocks:m.array(yOt)}),MFe=m.string().regex(/^th_[0-9A-Za-z]{22}$/),pz=m.string().regex(/^tb_[0-9A-Za-z]{22}$/),TOt=m.object({id:MFe,author:m.object({id:m.string().min(1),display_name:m.string().min(1)}),title:m.string().min(1),excerpt:m.string(),created_at:m.string().datetime(),repo_origin_path:m.string().min(1),latest_revision_id:pz,revision_count:m.number().int().positive()}),IOt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),bOt=m.object({id:m.string().min(1),author_id:m.string().min(1).nullable(),author:IOt.nullable(),created_at:m.string().datetime(),deleted_at:m.string().datetime().nullable(),content:m.string().min(1)}),COt=m.object({id:m.string().min(1),thread_block_id:m.string().min(1),created_at:m.string().datetime(),resolved_at:m.string().datetime().nullable(),comments:m.array(bOt)}),vOt=m.object({thread_block_id:pz,from_position:m.number().int().positive(),to_position:m.number().int().positive(),selected_text:m.string().min(1),content:m.string().trim().min(1)}),ROt=m.object({id:m.string().min(1)}),xOt=m.object({content:m.string().trim().min(1)}),DOt=m.object({id:m.string().min(1)}),BOt=m.object({content:m.string().trim().min(1)}),NOt=m.object({id:m.string().min(1)}),OOt=m.object({content:m.string().trim().min(1)}),wOt=m.object({id:m.string().min(1)}),kOt=m.object({resolved:m.boolean()}),POt=m.object({id:m.string().min(1),resolved_at:m.string().datetime().nullable()}),MOt=m.object({resolved:m.boolean()}),LOt=m.object({id:m.string().min(1),resolved_at:m.string().datetime().nullable()}),Cre=m.record(m.string(),m.unknown()),LFe=m.object({id:pz,body:m.string().nullable(),created_at:m.string().datetime(),prosemirror_json:Cre.nullable(),comment_threads:m.array(COt)}),UOt=LFe.extend({body:m.string(),prosemirror_json:Cre}),QOt=m.object({id:MFe,created_at:m.string().datetime(),repo_origin_path:m.string().min(1),author:m.object({id:m.string().min(1),display_name:m.string().min(1)}),latest_revision_id:pz,revision_count:m.number().int().positive(),revisions:m.array(LFe)}),FOt=m.object({type:m.literal("list"),list_type:m.literal("plan"),has_more:m.boolean(),objects:m.array(TOt)}),GOt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),author_id:m.string().min(1).optional(),repo_origin_path:m.string().min(1).optional()}),UFe=m.object({id:m.string().min(1),organization_id:m.string().min(1).nullable(),created_at:m.string().min(1),repo_origin_path:m.string().min(1),path_glob:m.string().min(1),name:m.string().min(1),description:m.string().min(1)}),zOt=m.array(UFe),jOt=m.object({type:m.literal("list"),list_type:m.literal("building_block"),has_more:m.boolean(),objects:m.array(UFe)}),HOt=m.object({repo_origin_path:m.string().min(1),before:m.string().min(1).optional(),after:m.string().min(1).optional()}),$Ot=m.enum(["thread","building_block"]),qOt=m.object({repo_origin_path:m.string().min(1),sources:m.array($Ot).nonempty()}),VOt=m.object({type:m.literal("list"),list_type:m.literal("repository"),has_more:m.boolean(),objects:m.array(qOt)}),Cf=m.enum(["claudeCode","codex","amp","lore","cursor","cowork","unspecified"]),YOt=m.enum(["claudeCode","codex","amp","cursor","cowork","unspecified"]),KOt=m.object({uploads:m.array(m.string()),outputs:m.array(m.string())}),JOt=m.object({connected:m.boolean(),last_upload_at:m.string().nullable(),harnesses:m.array(Cf)}),ZOt=["transcript","plan"],WOt=m.enum(ZOt),Dw=m.enum(["private","workspace"]),iT=m.enum(["claude_global","agents_global","claude_project","agents_project"]),vre=m.enum(["accepted","proposed","rejected","superseded"]),LOn=m.enum(["capture","capture_update","owner_update","subscriber_update"]),uz=m.object({md5:m.string().min(1).describe("Raw hex MD5 used to verify uploaded SKILL.md bytes"),name:m.string().min(1).describe("Skill directory/name, e.g. code-review"),filename:m.string().min(1).describe("Upload object filename, usually <name>/SKILL.md").optional(),description:m.string().nullable().describe("Optional skill description extracted from frontmatter").optional(),root_kind:iT.describe("Local root kind where this skill file came from"),base_version:m.number().int().positive().describe("Installed base version for local edits").optional()}),XOt=m.discriminatedUnion("sync_action",[uz.extend({sync_action:m.literal("capture").describe("Capture a local skill without an existing server skill ID"),skill_id:m.never().optional()}),uz.extend({sync_action:m.literal("owner_update").describe("Publish an accepted update to an owned skill"),skill_id:m.string().min(1).describe("Existing skill ID for owner updates")}),uz.extend({sync_action:m.literal("capture_update").describe("Update an existing private captured skill"),skill_id:m.string().min(1).describe("Existing skill ID for private capture updates")}),uz.extend({sync_action:m.literal("subscriber_update").describe("Propose an update to an installed workspace skill"),skill_id:m.string().min(1).describe("Existing skill ID for subscriber update proposals")})]),ewt=m.object({md5:m.string().min(1),harness:YOt,filename:m.string().min(1).optional(),repo_origin_path:m.string().min(1).optional(),harness_internal_id:m.string().min(1).optional(),file_type:WOt.optional(),artifact_metadata:KOt.optional()}).refine(e=>(e.filename?.trim().length??0)>0||(e.harness_internal_id?.trim().length??0)>0,{path:["harness_internal_id"],message:"filename or harness_internal_id is required"}),fz=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable()}),twt=m.object({id:m.string().min(1),display_name:m.string().min(1)}),QFe=m.object({id:m.string().min(1),author_id:m.string().min(1).nullable(),author:twt.nullable(),created_at:m.string().datetime(),deleted_at:m.string().datetime().nullable(),content:m.string().min(1)}),FFe=m.object({id:m.string().min(1),thread_block_id:m.string().min(1),created_at:m.string().datetime(),resolved_at:m.string().datetime().nullable()}),nwt=FFe.extend({comments:m.array(QFe)}),Rw=m.object({id:m.string().min(1),type:m.string().min(1),index_in_thread:m.number().int().nonnegative(),isCritiqued:m.boolean(),comment_threads:m.array(nwt).optional()}).passthrough(),Rre=m.object({type:m.literal("list"),list_type:m.literal("thread_block"),has_more:m.boolean(),objects:m.array(Rw)}),SFe=Rw.extend({type:m.literal("plan"),prosemirror_json:Cre,thread_file_id:m.string().min(1)}),rwt=m.union([m.literal(-1),m.literal(1)]),GFe=m.union([m.literal(-1),m.literal(0),m.literal(1)]),TFe=m.object({score:m.number().int(),up_count:m.number().int().nonnegative(),down_count:m.number().int().nonnegative(),viewer_vote:GFe}),owt=m.object({value:rwt}),iwt=m.object({id:m.string().min(1),display_name:m.string().min(1),avatar_url:m.string().nullable()}),nA=m.object({id:m.string().min(1),thread_id:m.string().min(1),author_id:m.string().min(1).nullable(),author:iwt.nullable(),parent_comment_id:m.string().min(1).nullable(),content:m.string(),created_at:m.string().datetime(),updated_at:m.string().datetime(),deleted_at:m.string().datetime().nullable()}),swt=m.object({type:m.literal("list"),list_type:m.literal("thread_comment"),objects:m.array(nA)}),awt=m.object({content:m.string().trim().min(1).max(4e3),parent_comment_id:m.string().min(1).optional()}),uwt=nA,cwt=m.object({content:m.string().trim().min(1).max(4e3)}),lwt=nA,dwt=nA,UOn=m.discriminatedUnion("kind",[m.object({kind:m.literal("created"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA}),m.object({kind:m.literal("updated"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA}),m.object({kind:m.literal("deleted"),thread_id:m.string().min(1),actor_user_id:m.string().min(1),version:m.number(),comment:nA})]),pwt=m.enum(["pending","generating","ready","failed"]),fwt=m.enum(["pending","generating","ready","failed"]),mwt=m.enum(["pending","placeholder","ai","user","command"]),zFe=m.enum(["pending","generating","ready","failed"]),xre=m.enum(["pending","generating","ready","failed","disabled"]),jFe=m.enum(["pending","generating","ready","failed"]),Awt=m.object({title:m.string().min(1),body:m.string().min(1),files:m.array(m.string()).optional()}),gwt=m.object({status:xre,url:m.string().nullable(),url_expires_at:m.string().nullable(),generated_at:m.string().nullable(),model:m.string().nullable()}),hwt=m.object({status:jFe,steps:m.array(Awt),generated_at:m.string().nullable()}),_wt=m.object({cover:gwt,how_to:hwt}),Ewt=m.object({id:m.string().min(1),title:m.string().min(1),author:m.object({id:m.string().min(1),display_name:m.string(),handle:m.string().nullable(),avatar_url:m.string().nullable()}),cover:m.object({url:m.string(),url_expires_at:m.string()}),started_at:m.string(),cover_generated_at:m.string()}),ywt=m.object({type:m.literal("list"),list_type:m.literal("card_feed_item"),has_more:m.boolean(),objects:m.array(Ewt)}),HFe=m.enum(["asked","requested","decided","corrected","shared","requirement"]),Swt=m.object({id:m.string().min(1),kind:HFe,summary:m.string().min(1),block_id:m.string().min(1)}),Twt=m.object({type:m.literal("list"),list_type:m.literal("thread_decision"),status:zFe,generated_at:m.string().nullable(),objects:m.array(Swt)}),Iwt=m.object({forker_intent:m.string().min(1).max(2e3).describe("What the forking user wants to do next with this session")}),bwt=m.object({source_thread_id:m.string().min(1),forker_intent:m.string(),source_distilled:m.string().min(1).describe("Intent-conditioned handoff summary of the source thread for a new agent")}),Cwt=m.object({question:m.string().trim().min(1).max(2e3).describe("Question to answer from visible Lore thread decisions and titles")}),vwt=m.object({id:m.string().min(1),kind:HFe,summary:m.string().min(1),block_id:m.string().min(1)}),Ire=m.object({thread_id:m.string().min(1),title:m.string().min(1),summary:m.string().nullable(),started_at:m.string().datetime(),score:m.number(),matched_by:m.enum(["summary","decision"]),decisions:m.array(vwt)}),Rwt=m.object({id:m.string().min(1),kind:m.enum(["agent","tool","retrieval","answer","sources"]),title:m.string().min(1),status:m.enum(["completed"]),summary:m.string().min(1),duration_ms:m.number().nonnegative().optional(),metadata:m.object({retrieved_decisions:m.number().int().nonnegative().optional(),returned_sources:m.number().int().nonnegative().optional(),cited_sources:m.number().int().nonnegative().optional(),matched_sources:m.array(Ire).optional(),searched_query:m.string().min(1).optional(),since:m.string().min(1).optional(),until:m.string().min(1).optional(),thread_id:m.string().min(1).optional(),thread_ids:m.array(m.string().min(1)).optional(),question:m.string().min(1).optional()}).optional()}),xwt=m.object({steps:m.array(Rwt)}),Dwt=m.object({answer:m.string(),sources:m.array(Ire),matched_sources:m.array(Ire).describe("Threads matched by the vector decision search before citation filtering"),searched_query:m.string().describe("String embedded for the vector decision search"),trace:xwt.optional()}),xw=m.object({id:m.string().min(1),thread_file_id:m.string().min(1),organization_id:m.string().min(1).nullable(),deleted_at:m.string().datetime().nullable(),author:fz,repo:m.string().min(1),title:m.string().min(1),started_at:m.string().min(1),blocks:Rre,user_message_count:m.number().int().nonnegative(),files_touched:m.array(m.string()),skills_invoked:m.array(m.string()),slash_commands_invoked:m.array(m.string()),harness:Cf,transcript_parsing_state:m.enum(["pending","parsed","too_large_to_parse","failed"]),visibility:m.enum(["private","workspace","public"]),has_plan:m.boolean().optional(),summary:m.string().nullable(),summary_status:pwt,summary_generated_at:m.string().nullable(),title_status:fwt,title_generated_at:m.string().nullable(),title_source:mwt,decisions_status:zFe,decisions_generated_at:m.string().nullable(),score:m.number().int(),up_count:m.number().int().nonnegative(),down_count:m.number().int().nonnegative(),viewer_vote:GFe,comment_count:m.number().int().nonnegative(),is_favorited:m.boolean(),card:_wt}),Bwt=m.object({storage_url:m.string().min(1)}),Nwt=m.object({storage_url:m.string().min(1)}),Owt=m.object({storage_url:m.string(),harness:Cf,thread:xw.nullable()}),wwt=m.object({status:m.literal("complete"),thread_files:m.array(Owt),skill_files:m.array(m.object({storage_url:m.string(),skill:m.object({id:m.string(),name:m.string(),version:m.number().int().positive(),latest_version:m.number().int().positive(),visibility:Dw,root_kind:iT,version_status:vre.optional(),content_hash:m.string()}).nullable()})).optional()}),kwt=m.object({id:m.string(),presigned_url:m.string().nullable(),presigned_url_expires_at:m.string().nullable(),storage_url:m.string(),harness:Cf,expected_md5:m.string(),error:m.string().nullable(),thread:xw.nullable()}),Pwt=m.object({id:m.string(),presigned_url:m.string().nullable(),presigned_url_expires_at:m.string().nullable(),storage_url:m.string(),expected_md5:m.string(),name:m.string(),error:m.string().nullable()}),Mwt=m.object({id:m.string(),substrate:m.enum(["s3","filesystem"]),status:m.enum(["incomplete","locked_for_parsing","complete","error"]),thread_files:m.array(kwt),skill_files:m.array(Pwt).optional()}),Lwt=m.object({query:m.string().min(1).describe("Natural-language description of the block or block range to highlight")}),Uwt=m.object({thread_id:m.string(),url:m.string().url(),start_block_id:m.string().nullable(),end_block_id:m.string().nullable(),matched:m.boolean()}),Qwt=m.object({}),Fwt=m.object({thread_id:m.string().min(1)}),Gwt=m.object({visibility:m.enum(["private","workspace","public"]).optional(),title:m.string().trim().min(1).max(200).optional()}).refine(e=>e.visibility!==void 0||e.title!==void 0,{message:"At least one of visibility or title must be provided"}),zwt=m.discriminatedUnion("visibility",[m.object({visibility:m.literal("private")}),m.object({visibility:m.literal("workspace")}),m.object({visibility:m.literal("public"),title:m.string().min(1),author_display_name:m.string().min(1),author_avatar_url:m.string().nullable(),first_user_message:m.string().nullable(),summary:m.string().nullable(),started_at:m.string().min(1),harness:Cf,cover_url:m.string().nullable()})]),jwt=m.object({id:m.string().min(1),author:fz,repo:m.string().min(1),title:m.string().min(1),started_at:m.string().min(1),blocks:Rre,user_message_count:m.number().int().nonnegative(),comment_count:m.number().int().nonnegative(),files_touched:m.array(m.string()),skills_invoked:m.array(m.string()),harness:Cf,visibility:m.enum(["private","workspace","public"]),has_plan:m.boolean().optional(),is_favorited:m.boolean()}),IFe=m.object({type:m.literal("list"),list_type:m.literal("thread"),has_more:m.boolean(),objects:m.array(jwt)}),Hwt=m.enum(["recent","popular"]),$wt=m.enum(["everyone","following"]),qwt=xw,Vwt=m.object({type:m.literal("list"),list_type:m.literal("discover_thread"),has_more:m.boolean(),objects:m.array(qwt)}),Ywt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),sort:Hwt.optional(),scope:$wt.optional(),harness:Cf.optional(),search:m.string().max(200).optional()}),Kwt=m.object({thread_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),organization_count:m.number().int().nonnegative(),harness_breakdown:m.record(m.string(),m.number().int().nonnegative()).refine(e=>Object.keys(e).every(t=>Cf.safeParse(t).success),"Harness breakdown keys must be known harness values")}),Jwt=m.object({id:m.string(),status:m.enum(["incomplete","locked_for_parsing","complete","error"]),created_at:m.string(),thread_count:m.number().int().nonnegative()}),Zwt=m.object({type:m.literal("list"),list_type:m.literal("upload_session"),objects:m.array(Jwt)}),Wwt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional()}),Xwt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional(),author_ids:m.string().min(1).optional(),created_at:m.string().min(1).optional(),filepath_prefixes:m.string().min(1).optional(),q:m.string().trim().min(1).max(200).optional()}),ekt=m.object({path:m.string().min(1),start_offset:m.number().int().nonnegative(),end_offset:m.number().int().positive()}),lz=m.object({id:m.string(),display_name:m.string(),avatar_url:m.string().nullable()}),tkt=m.object({before:m.string().min(1).optional().describe("Skill ID cursor. Returns skills newer than this cursor in descending created_at order."),after:m.string().min(1).optional().describe("Skill ID cursor. Returns skills older than this cursor in descending created_at order.")}),nkt=m.object({id:m.string(),name:m.string(),description:m.string().nullable(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative().nullable(),content_hash:m.string().nullable(),has_content:m.boolean(),owner:lz.nullable(),usage_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),first_used_at:m.string().nullable(),last_used_at:m.string().nullable()}),rkt=m.object({type:m.literal("list"),list_type:m.literal("skill"),has_more:m.boolean(),objects:m.array(nkt)}),okt=m.object({id:m.string(),title:m.string(),visibility:m.enum(["private","workspace","public"]),started_at:m.string(),author:fz,skills_invoked:m.array(m.string())}),ikt=m.object({version:m.number().int().positive().describe("Version timestamp for this SKILL.md body"),content_hash:m.string().describe("Content-addressed skill body hash, prefixed by hash type"),status:vre.describe("Review status for this skill version"),created_at:m.string().describe("ISO-8601 timestamp when this version was uploaded"),created_by:lz.nullable().describe("User who uploaded/proposed this version, when known"),reviewed_at:m.string().nullable().describe("ISO-8601 timestamp when the owner reviewed this version"),reviewed_by:lz.nullable().describe("Owner who approved or rejected this version"),rejection_reason:m.string().nullable().describe("Owner-provided rejection reason for rejected versions")}),bFe=m.object({id:m.string(),name:m.string(),description:m.string().nullable(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative().nullable(),content_hash:m.string().nullable(),owner:lz.nullable(),usage_count:m.number().int().nonnegative(),author_count:m.number().int().nonnegative(),first_used_at:m.string().nullable(),last_used_at:m.string().nullable(),versions:m.array(ikt),threads:m.array(okt)}),skt=m.object({id:m.string(),name:m.string(),visibility:Dw,root_kind:iT,latest_version:m.number().int().nonnegative(),content_hash:m.string()}),akt=m.object({installation_id:m.string(),already_registered:m.boolean(),body_md_url:m.string(),skill:skt}),CFe=m.object({id:m.string(),skill_id:m.string(),installed_version:m.number().int().nonnegative().nullable(),already_registered:m.boolean().optional()}),ukt=m.object({installed_version:m.number().int().nonnegative().describe("Accepted skill version that was successfully written locally")}),vFe=m.object({id:m.string(),name:m.string(),version:m.number().int().positive(),latest_version:m.number().int().positive(),visibility:Dw,root_kind:iT,version_status:vre,content_hash:m.string()}),ckt=m.object({reason:m.string().optional().describe("Optional owner-provided reason for rejecting the proposed version")}),lkt=m.object({id:m.string(),skill_id:m.string(),name:m.string(),description:m.string().nullable(),root_kind:iT,latest_version:m.number().int().nonnegative(),latest_content_hash:m.string(),installed_version:m.number().int().nonnegative().nullable()}),dkt=m.object({type:m.literal("list"),list_type:m.literal("skill_installation_sync"),has_more:m.boolean(),objects:m.array(lkt)}),pkt=m.object({path:m.string().min(1),text:m.string().max(64e3)}),fkt=m.enum(["text_edit","redact","delete_block"]),mkt=m.object({id:m.string(),thread_block_id:m.string(),editor:m.object({id:m.string(),display_name:m.string()}),kind:fkt,path:m.string().nullable(),previous_text:m.string().nullable(),new_text:m.string().nullable(),created_at:m.string()}),Akt=m.object({type:m.literal("list"),list_type:m.literal("thread_block_edit"),objects:m.array(mkt)}),gkt=m.object({organization_count:m.number().int().nonnegative(),user_count:m.number().int().nonnegative(),thread_count:m.number().int().nonnegative(),thread_count_last_24h:m.number().int().nonnegative(),user_count_last_24h:m.number().int().nonnegative()}),hkt=m.object({id:m.string(),name:m.string(),email_domains:m.array(m.string()),member_count:m.number().int().nonnegative(),thread_count:m.number().int().nonnegative(),default_thread_visibility:m.enum(["private","workspace","public"]),created_at:m.string()}),_kt=m.object({type:m.literal("list"),list_type:m.literal("admin_organization"),objects:m.array(hkt)}),$Fe=m.object({id:m.string(),name:m.string()}),Ekt=m.object({id:m.string(),display_name:m.string(),workos_id:m.string(),thread_count:m.number().int().nonnegative(),onboarded_at:m.string().nullable(),created_at:m.string(),organizations:m.array($Fe)}),ykt=m.object({q:m.string().trim().min(1).max(120).optional()}),Skt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1)}),Tkt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!0)}),Ikt=m.object({type:m.literal("list"),list_type:m.literal("admin_user"),objects:m.array(Ekt)}),qFe=m.object({id:m.string(),title:m.string(),started_at:m.string(),created_at:m.string(),deleted_at:m.string().nullable(),visibility:m.enum(["private","workspace","public"]),harness:Cf,harness_internal_id:m.string(),thread_file_id:m.string(),transcript_parsing_state:m.enum(["pending","parsed","too_large_to_parse","failed"]),author:fz,organization:$Fe.nullable()}),bkt=m.object({id:m.string(),content_type:m.enum(["transcript","plan"]),harness:Cf,harness_internal_id:m.string(),expected_md5:m.string(),size_in_bytes:m.number().int().nonnegative().nullable(),created_at:m.string()}),Ckt=m.object({thread:qFe,latest_transcript_file:bkt.nullable()}),vkt=m.object({type:m.literal("list"),list_type:m.literal("admin_thread"),has_more:m.boolean(),objects:m.array(qFe)}),Rkt=m.object({before:m.string().min(1).optional(),after:m.string().min(1).optional()}),xkt=m.object({thread_id:m.string().min(1).optional().describe("Lore thread id, e.g. th_xxx."),thread_file_id:m.string().min(1).optional().describe("Thread file id, e.g. tf_xxx."),harness:Cf.optional().describe("Harness name, e.g. claudeCode."),harness_internal_id:m.string().min(1).optional().describe("Harness-native session id.")}),Dkt=m.object({thread_id:m.string().min(1),thread_file_id:m.string().min(1),event_name:m.literal("lore/thread-files.parse.requested")}),RFe=m.object({token:m.string().min(1),thread_id:m.string().min(1)}),Bkt=m.object({visitor:m.string().min(1).max(64).optional()}),Nkt=m.object({user_id:m.string(),display_name:m.string(),shares_sent:m.number().int().nonnegative(),unique_viewers:m.number().int().nonnegative(),attributed_signups:m.number().int().nonnegative()}),Okt=m.object({window_days:m.number().int().positive(),shares_sent:m.number().int().nonnegative(),unique_viewers:m.number().int().nonnegative(),attributed_signups:m.number().int().nonnegative(),active_sharers:m.number().int().nonnegative(),k_factor:m.number().nullable(),shares_sent_sparkline:m.array(m.number().int().nonnegative()),top_sharers:m.array(Nkt)}),wkt=m.object({windows:m.array(Okt)}),cz=m.object({period:m.string(),active:m.number().int().nonnegative()}),kkt=m.object({daily:m.array(cz),weekly:m.array(cz),monthly:m.array(cz),allTime:m.array(cz)}),Pkt=m.object({quoted_text:m.string().min(1),comment:m.string().nullable(),type:m.enum(["comment","highlight:trapdoor"])}),Mkt=FFe,Lkt=QFe.extend({comment_thread_id:m.string().min(1)}),Ukt=m.object({markdown:m.string().min(1)}),Qkt=m.object({storage_url:m.string().min(1),thread_file_id:m.string().min(1),parsed_plan_block:SFe,critiqued_plan_block:SFe,annotations:m.array(Pkt),comment_threads:m.array(Mkt),comments:m.array(Lkt)}),Fkt=m.object({key:m.string().min(1),label:m.string().min(1),description:m.string().optional(),type:m.enum(["text","textarea","url","email"]),required:m.boolean(),defaultValue:m.string()}),Gkt=m.object({id:m.string().min(1),name:m.string().min(1),description:m.string().min(1),deliveryTrigger:m.string().min(1),fields:m.array(Fkt),availableFormats:m.array(m.enum(["html","text"]))}),zkt=m.object({templates:m.array(Gkt)}),jkt=m.object({values:m.record(m.string(),m.string())}),Hkt=m.object({subject:m.string().min(1),html:m.string().optional(),text:m.string().optional()}),$kt=m.object({to:m.string().email().describe("Recipient email address."),values:m.record(m.string(),m.string())}),qkt=m.object({id:m.string().min(1)}),sx=m.enum(sre),VFe=m.object({workspace_scope:m.boolean(),review:m.boolean(),shared_thread_ttl_days:m.number().int().positive().nullable()}),bre=m.object({subject_type:m.enum(["user","organization"]),subject_id:m.string().min(1),effective_plan:sx,admin_override:sx.nullable(),stripe_subscription_status:m.string().nullable(),cancel_at_period_end:m.boolean(),current_period_end:m.string().nullable(),seat_quantity:m.number().int().positive(),member_count:m.number().int().nonnegative().nullable(),features:VFe}),Vkt=m.object({effective_plan:sx,features:VFe,user:bre,organization:bre.nullable()}),Ykt=m.object({plan:m.enum(["creator","team"]),seat_quantity:m.number().int().positive().optional()}),Kkt=m.object({checkout_url:m.string().min(1)}),Jkt=m.object({portal_url:m.string().min(1)}),Zkt=m.object({seat_quantity:m.number().int().positive()}),xFe=m.object({plan:sx.nullable()}),dz=m.object({subject_type:m.enum(["user","organization"]),subject_id:m.string().min(1),label:m.string().min(1),effective_plan:sx,admin_override:sx.nullable(),stripe_subscription_status:m.string().nullable(),seat_quantity:m.number().int().positive()}),Wkt=m.object({users:m.array(dz),organizations:m.array(dz)}),Xkt=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),avatar_url:m.string().nullable()}),ePt=m.object({thread_id:m.string().min(1),title:m.string().min(1),author:Xkt,last_active_at:m.string().datetime(),last_block_excerpt:m.string().nullable(),last_block_kind:m.string().min(1).nullable(),is_streaming:m.boolean()}),tPt=m.object({type:m.literal("list"),list_type:m.literal("live_thread"),objects:m.array(ePt)}),nPt=m.object({thread_id:m.string().min(1)}),rPt=m.object({thread_id:m.string().min(1),last_seen_at:m.string().datetime(),started_at:m.string().datetime()}),oPt=m.object({user_id:m.string().min(1),organization_id:m.string().min(1).nullable(),last_seen_at:m.string().datetime(),started_at:m.string().datetime()}),iPt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!0),follower_count:m.number().int().nonnegative()}),sPt=m.object({follower_id:m.string().min(1),followee_id:m.string().min(1),is_following:m.literal(!1),follower_count:m.number().int().nonnegative()}),PE=m.object({id:m.string().min(1),display_name:m.string().min(1),handle:m.string().nullable(),avatar_url:m.string().nullable(),bio:m.string().max(280).nullable(),is_following:m.boolean(),is_self:m.boolean()}),DFe=m.object({type:m.literal("list"),list_type:m.literal("user_follow"),objects:m.array(PE)}),aPt=PE.extend({mutuals:m.array(PE),mutual_count:m.number().int().nonnegative()}),uPt=m.object({type:m.literal("list"),list_type:m.literal("follow_suggestion"),objects:m.array(aPt)}),cPt=PE.extend({referred_at:m.string().min(1)}),lPt=m.object({type:m.literal("list"),list_type:m.literal("referral"),count:m.number().int().nonnegative(),recent:m.array(cPt)}),dPt=m.object({date:m.string().regex(/^\d{4}-\d{2}-\d{2}$/),referred:m.number().int().nonnegative(),total:m.number().int().nonnegative()}),pPt=m.object({inviter:PE,organization_name:m.string().nullable(),referred_count:m.number().int().positive(),latest_referred_at:m.string().min(1)}),fPt=m.object({inviter:PE,referee:PE,attributed_at:m.string().min(1)}),mPt=m.object({total_referred_signups:m.number().int().nonnegative(),active_inviters:m.number().int().nonnegative(),referred_signups_last_30d:m.number().int().nonnegative(),total_signups_last_30d:m.number().int().nonnegative(),daily_counts:m.array(dPt),top_inviters:m.array(pPt),recent_attributions:m.array(fPt)}),APt=m.object({source:m.string().min(1),signups:m.number().int().nonnegative()}),gPt=m.object({sources:m.array(APt),total_with_source:m.number().int().nonnegative(),total_without_source:m.number().int().nonnegative()}),hPt=m.object({date:m.string().regex(/^\d{4}-\d{2}-\d{2}$/),count:m.number().int().nonnegative()}),_Pt=m.object({window_start:m.string().datetime(),window_end:m.string().datetime(),total_contributions:m.number().int().nonnegative(),days_active:m.number().int().nonnegative(),daily_average:m.number().nonnegative(),current_streak_days:m.number().int().nonnegative(),days:m.array(hPt)}),EPt=m.object({type:m.literal("thread_created"),occurred_at:m.string().datetime(),id:m.string().min(1),thread:m.object({id:m.string().min(1),title:m.string(),visibility:m.enum(["private","workspace","public"])})}),yPt=m.object({type:m.literal("comment_posted"),occurred_at:m.string().datetime(),id:m.string().min(1),comment_excerpt:m.string(),thread:m.object({id:m.string().min(1),title:m.string(),visibility:m.enum(["private","workspace","public"])})}),SPt=m.object({type:m.literal("project_published"),occurred_at:m.string().datetime(),id:m.string().min(1),project:m.object({id:m.string().min(1),name:m.string().min(1)})}),TPt=m.object({type:m.literal("user_followed"),occurred_at:m.string().datetime(),id:m.string().min(1),followee:PE}),IPt=m.discriminatedUnion("type",[EPt,yPt,SPt,TPt]),bPt=m.object({type:m.literal("list"),list_type:m.literal("user_activity"),objects:m.array(IPt)}),CPt=m.object({id:m.string().min(1),name:m.string().min(1),excerpt:m.string(),published_at:m.string().datetime(),updated_at:m.string().datetime()}),vPt=m.object({type:m.literal("list"),list_type:m.literal("profile_published_project"),objects:m.array(CPt)}),BFe=m.object({id:m.string().min(1),published_at:m.string().datetime().nullable()}),RPt=m.enum(["avatar","banner"]),YFe=m.enum(["image/png","image/jpeg","image/webp","image/gif"]),xPt=m.object({kind:RPt,content_type:YFe,base64_data:m.string().min(1)}),DPt=m.object({substrate:m.enum(["s3","filesystem"]),storage_url:m.string().min(1)}),BPt=m.object({content_type:YFe,base64_data:m.string().min(1)}),NPt=m.object({cover_status:xre,cover_url:m.string().min(1),cover_url_expires_at:m.string().min(1),cover_generated_at:m.string().min(1)}),OPt=kFe,mz=eOt.router({health:{method:"GET",path:"/health",responses:{200:m.object({status:m.literal("ok")})},summary:"Health check"},getDeepHealth:{method:"GET",path:"/health/deep",responses:{200:m.object({status:m.enum(["ok","degraded"]),environment:m.string(),checks:m.object({database:m.object({ok:m.boolean(),latencyMs:m.number().int().nonnegative().optional(),error:m.string().optional()}),migrations:m.object({ok:m.boolean(),appliedCount:m.number().int().nonnegative(),pendingCount:m.number().int().nonnegative(),latestApplied:m.string().optional(),pending:m.array(m.string())}),storage:m.object({ok:m.boolean(),bucket:m.string().optional(),error:m.string().optional()})})}),503:m.object({status:m.literal("down"),environment:m.string(),error:m.string()})},summary:"Diagnostic health check covering database connectivity, migration drift, and storage reachability. Used by smoke tests and operators; NOT wired into Railway healthcheckPath."},whoAmI:{method:"GET",path:"/whoami",headers:m.object({authorization:m.string().min(1).optional(),"x-lore-referral-token":m.string().min(1).max(16).optional(),"x-lore-invited-by-user-id":m.string().min(1).max(40).optional(),"user-agent":m.string().min(1).max(1024).optional()}),responses:{200:aOt,401:H,500:H,502:H},summary:"Validate a WorkOS Bearer token and return member plus user fields"},getCliAuthConfig:{method:"GET",path:"/cli-auth/config",responses:{200:yFe,503:H},summary:"Return public WorkOS CLI Auth configuration for the Lore CLI"},getDesktopAuthConfig:{method:"GET",path:"/desktop-auth/config",responses:{200:yFe,503:H},summary:"Return public WorkOS configuration for the Lore desktop app (dedicated native client, separate from the web/CLI client)"},getCliStatus:{method:"GET",path:"/users/me/cli-status",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:JOt,401:H},summary:"Return whether the viewer has connected the Lore CLI (i.e., uploaded any thread under a non-unspecified harness), plus the latest upload timestamp."},recordHeartbeat:{method:"POST",path:"/heartbeat",headers:m.object({authorization:m.string().min(1).optional()}),body:nPt,responses:{200:rPt,401:H,403:H,404:H,422:H},summary:"Record (or refresh) a presence heartbeat for the authenticated user against one of their own threads. Idempotent; the daemon should call this every ~30s while a session is open."},recordProductPresence:{method:"POST",path:"/users/me/presence",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:oPt,401:H},summary:"Record (or refresh) an authenticated Lore web-app presence heartbeat for the current user. Browser clients call this while the product is open."},listLiveThreads:{method:"GET",path:"/threads/live",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:tPt,401:H,403:H},summary:"List people with user-block activity in the last 10 minutes. Includes the viewer\u2019s workspace and followed authors, deduped per author, max 10."},listThreads:{method:"GET",path:"/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Xwt,responses:{200:IFe,401:H},summary:"List threads visible to the authenticated user"},createThread:{method:"POST",path:"/threads",headers:m.object({authorization:m.string().min(1).optional()}),body:Qwt,responses:{201:Fwt,401:H},summary:"Create an empty Lore-native thread for the authenticated user"},getThread:{method:"GET",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:xw,404:H},summary:"Load a visible thread by id"},getSimilarThreads:{method:"GET",path:"/threads/:id/similar",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:IFe,404:H,409:H},summary:"List the top 20 visible threads with the closest summary embedding"},resolveThreadShareHighlight:{method:"POST",path:"/threads/:id/share-highlight",pathParams:m.object({id:m.string().min(1).describe("Thread id to share")}),headers:m.object({authorization:m.string().min(1).optional()}),body:Lwt,responses:{200:Uwt,401:H,404:H,409:H},summary:"Resolve a natural-language share highlight to a canonical /thread URL with block anchors"},askThreads:{method:"POST",path:"/threads/ask",headers:m.object({authorization:m.string().min(1).optional()}),body:Cwt,responses:{200:Dwt,401:H},summary:"Answer a question from the top 20 visible decision matches, grouped back into threads"},forkThread:{method:"POST",path:"/threads/:id/fork",pathParams:m.object({id:m.string().min(1).describe("Thread id or stable harness lookup id to fork")}),headers:m.object({authorization:m.string().min(1).optional()}),body:Iwt,responses:{200:bwt,403:H,404:H},summary:"Generate a distilled source handoff for continuing a visible coding-assistant session"},listThreadBlocks:{method:"GET",path:"/threads/:id/blocks",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),query:Wwt,responses:{200:Rre,401:H},summary:"List blocks for a visible thread"},createThreadBlockCommentThread:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xOt,responses:{201:DOt,401:H,404:H},summary:"Create a new block-level comment thread on a visible thread block"},createThreadBlockComment:{method:"POST",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId/comments",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1),commentThreadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:OOt,responses:{201:wOt,401:H,404:H,409:H},summary:"Reply to a block-level comment thread on a visible thread block"},updateThreadBlockCommentThread:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/comment-threads/:commentThreadId",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1),commentThreadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:MOt,responses:{200:LOt,401:H,404:H},summary:"Resolve or reopen a block-level comment thread on a visible thread block"},listSkills:{method:"GET",path:"/skills",headers:m.object({authorization:m.string().min(1).optional()}),query:tkt,responses:{200:rkt,401:H},summary:"List visible workspace skills and the viewer's private captured skills"},getSkillDetail:{method:"GET",path:"/skills/:id",pathParams:m.object({id:m.string().min(1).describe("Stable skill ID, e.g. sk_...")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:bFe,401:H,404:H},summary:"Get visible skill details by stable skill ID"},getSkillRaw:{method:"GET",path:"/skills/:id/raw",pathParams:m.object({id:m.string().min(1).describe("Stable skill ID, e.g. sk_...")}),query:m.object({version:m.coerce.number().int().positive().optional().describe("Version timestamp to download. Defaults to latest accepted version.")}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:m.string(),401:H,403:H,404:H},summary:"Raw SKILL.md body for a skill (download / install path)"},installSkill:{method:"POST",path:"/skills/:id/installations",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID to install")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:akt,401:H,403:H,404:H},summary:"Register the current user as an installer of a visible skill"},uninstallSkill:{method:"DELETE",path:"/skills/:id/installation",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID to uninstall")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:CFe,401:H},summary:"Unregister the current user installation for a skill (idempotent)"},updateSkillInstallation:{method:"PATCH",path:"/skills/installations/:id",pathParams:m.object({id:m.string().min(1).describe("Stable skill installation ID, e.g. ski_...")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ukt,responses:{200:CFe,401:H,404:H,422:H},summary:"Record the accepted skill version installed by the current user"},listSkillInstallationSync:{method:"GET",path:"/skills/installations/sync",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:dkt,401:H},summary:"List installed skills with latest accepted version metadata"},publishSkill:{method:"POST",path:"/skills/:id/publish",pathParams:m.object({id:m.string().min(1).describe("Private captured skill ID to publish")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:bFe,401:H,403:H,404:H},summary:"Promote a private captured skill to the caller workspace"},approveSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/approve",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID"),version:m.coerce.number().int().positive().describe("Proposed version timestamp to approve")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:vFe,400:H,401:H,403:H,404:H},summary:"Approve a proposed skill version and make it latest accepted"},rejectSkillVersion:{method:"POST",path:"/skills/:id/versions/:version/reject",pathParams:m.object({id:m.string().min(1).describe("Workspace skill ID"),version:m.coerce.number().int().positive().describe("Proposed version timestamp to reject")}),headers:m.object({authorization:m.string().min(1).optional()}),body:ckt.optional(),responses:{200:vFe,400:H,401:H,403:H,404:H},summary:"Reject a proposed skill version with an optional owner reason"},redactThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/redactions",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:ekt,responses:{200:Rw,401:H,403:H,404:H,422:H},summary:"Permanently redact a character range within a text field of a thread block (author only)"},updateThreadBlockText:{method:"PATCH",path:"/threads/:threadId/blocks/:blockId/text",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:pkt,responses:{200:Rw,401:H,403:H,404:H,422:H},summary:"Replace a single text leaf in a thread block with new content (author only)"},critiqueThreadBlock:{method:"POST",path:"/threads/:threadId/blocks/:blockId/critique",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:Rw,401:H,403:H,404:H,409:H,422:H},summary:"Critique a plan block once and persist its annotations as nested comment threads (author only)"},listThreadBlockEdits:{method:"GET",path:"/threads/:threadId/blocks/:blockId/edits",pathParams:m.object({threadId:m.string().min(1),blockId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Akt,401:H,404:H},summary:"List edits made to a thread block (visible to anyone who can see the thread)"},listThreadDecisions:{method:"GET",path:"/threads/:id/decisions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Twt,401:H,404:H},summary:"List AI-extracted user decisions for a thread, in chronological order"},updateThread:{method:"PATCH",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:Gwt,responses:{200:xw,401:H,403:H,404:H},summary:"Update thread visibility (author only)"},deleteThread:{method:"DELETE",path:"/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.null(),401:H,403:H,404:H},summary:"Soft-delete a thread (author only)"},generateThreadCard:{method:"POST",path:"/threads/:id/card/generate",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:m.object({cover_status:xre,how_to_status:jFe}),401:H,403:H,404:H,429:H.extend({retry_after_seconds:m.number().int().nonnegative()})},summary:"Enqueue cover image + how-to recipe generation for the thread. Author-only. Idempotent \u2014 recently-fired statuses are not double-enqueued. Rate-limited: at most one cover generation per minute per thread (cooldown begins when the previous cover finishes). Used to populate cards on legacy threads (created before Lore Cards) and to retry after a 'failed' status or opt back in from 'disabled'."},uploadThreadCover:{method:"POST",path:"/threads/:id/card/cover/upload",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:BPt,responses:{200:NPt,401:H,403:H,404:H,413:H,422:H},summary:"Upload a custom cover image for a thread. Author or Tanagram admin only. Bytes go to the same storage substrate the AI cover uses (S3 in prod, filesystem in dev), and the threads row is updated atomically with the new cover_storage_url, cover_status='ready', cover_generated_at=now, cover_model='user-uploaded' so subsequent re-rolls / how-to fan-outs treat the upload like any other ready cover."},castThreadVote:{method:"PUT",path:"/threads/:id/vote",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:owt,responses:{200:TFe,401:H,403:H,404:H,422:H},summary:"Cast or change the caller's up/down vote on a public thread. Idempotent \u2014 re-casting the same value is a no-op."},clearThreadVote:{method:"DELETE",path:"/threads/:id/vote",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:TFe,401:H,404:H},summary:"Clear the caller's vote on a thread. No-op when the caller hasn't voted."},listThreadComments:{method:"GET",path:"/threads/:threadId/comments",pathParams:m.object({threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:swt,403:H,404:H},summary:"List all (live + soft-deleted as tombstones) comments on a public thread, flat with parent_comment_id pointers."},createThreadComment:{method:"POST",path:"/threads/:threadId/comments",pathParams:m.object({threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:awt,responses:{201:uwt,401:H,403:H,404:H,422:H},summary:"Post a top-level or reply comment on a public thread."},updateThreadComment:{method:"PATCH",path:"/threads/:threadId/comments/:commentId",pathParams:m.object({threadId:m.string().min(1),commentId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:cwt,responses:{200:lwt,401:H,403:H,404:H,422:H},summary:"Edit your own thread comment (author only; rejects edits to soft-deleted rows)."},deleteThreadComment:{method:"DELETE",path:"/threads/:threadId/comments/:commentId",pathParams:m.object({threadId:m.string().min(1),commentId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:dwt,401:H,403:H,404:H},summary:"Soft-delete your own thread comment (author only). Idempotent."},getThreadPreview:{method:"GET",path:"/threads/:id/preview",pathParams:m.object({id:m.string().min(1)}),responses:{200:zwt,404:H},summary:"Unauthenticated, visibility-redacted metadata for OG / social preview consumers"},getUser:{method:"GET",path:"/users/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:kFe,404:H},summary:"Public profile for a user. Optional auth \u2014 unauthenticated viewers see only public thread metadata; signed-in viewers see counts scoped to the threads they'd normally be able to access."},updateCurrentUser:{method:"PATCH",path:"/users/me",headers:m.object({authorization:m.string().min(1).optional()}),body:uOt,responses:{200:wFe,401:H,409:H,422:H},summary:"Update the authenticated user profile"},getUserByHandle:{method:"GET",path:"/users/by-handle/:handle",pathParams:m.object({handle:NFe}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:OPt,404:H},summary:"Resolve a public profile by handle \u2014 same shape as GET /users/:id but keyed on the user's chosen handle."},listMyReferrals:{method:"GET",path:"/users/me/referrals",headers:m.object({authorization:m.string().min(1)}),responses:{200:lPt,401:H},summary:"Total count plus the most-recent referees the authenticated user has attributed via `/?invited_by=\u2026` invite links. Mirrors the inviter side of users.referred_by_user_id."},listUserActivity:{method:"GET",path:"/users/:id/activity",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),query:m.object({limit:m.coerce.number().int().positive().max(100).optional()}),responses:{200:bPt,404:H},summary:"Reverse-chronological activity feed for a user, scoped to what the viewer can see (same visibility rules as listThreads)."},getUserContributions:{method:"GET",path:"/users/:id/contributions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:_Pt,404:H},summary:"Daily contribution counts for the trailing 365 days \u2014 counts thread blocks the user authored on threads visible to the viewer."},listUserFollowers:{method:"GET",path:"/users/:id/followers",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:DFe,404:H},summary:"List the users following a given user."},listUserFollowing:{method:"GET",path:"/users/:id/following",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:DFe,404:H},summary:"List the users a given user is following."},listFollowSuggestions:{method:"GET",path:"/users/:id/follow-suggestions",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:uPt,404:H},summary:"Mutual-follow suggestions for a viewer: walks the viewer's followees one hop further and ranks candidates by mutual count. Replaces a 1 \u2192 24 client-side fan-out across `/users/:seed/following`."},followUser:{method:"POST",path:"/users/:id/follow",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:iPt,401:H,404:H,409:H,422:H},summary:"Follow another user. Idempotent \u2014 repeating the call is a no-op."},unfollowUser:{method:"DELETE",path:"/users/:id/follow",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:sPt,401:H,404:H},summary:"Unfollow a user. Idempotent \u2014 repeating the call is a no-op."},listProfilePublishedProjects:{method:"GET",path:"/users/:id/projects",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:vPt,404:H},summary:"Projects the user has published to their public profile."},publishProject:{method:"POST",path:"/projects/:id/publish",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:BFe,401:H,403:H,404:H},summary:"Publish a project to the author's public profile. Stamps published_at with `now()`. Author-only."},unpublishProject:{method:"DELETE",path:"/projects/:id/publish",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:BFe,401:H,403:H,404:H},summary:"Remove a project from the author's public profile."},uploadProfileImage:{method:"POST",path:"/users/me/profile-image",headers:m.object({authorization:m.string().min(1).optional()}),body:xPt,responses:{200:DPt,401:H,413:H,422:H},summary:"Upload an avatar or banner image (base64-encoded JSON body). The API streams the bytes to its configured storage substrate using its own credentials and returns the canonical storage URL the client passes to PATCH /users/me."},listOrganizationMembers:{method:"GET",path:"/organization/members",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:lOt,401:H},summary:"List members of the authenticated user\u2019s organization"},createOrganizationInvite:{method:"POST",path:"/organization/invites",headers:m.object({authorization:m.string().min(1).optional()}),body:dOt,responses:{201:pOt,401:H,403:H,409:H,422:H},summary:"Invite a teammate to the authenticated user\u2019s workspace via WorkOS AuthKit"},ensureWorkOSOrganization:{method:"POST",path:"/organization/workos/ensure",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:fOt,401:H,422:H,503:H},summary:"Create or reuse a WorkOS organization for the authenticated user\u2019s non-public email domain and add the user as a member."},listRepositories:{method:"GET",path:"/repositories",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:VOt,401:H,403:H},summary:"List repositories known to the authenticated user\u2019s organization across threads and building blocks"},createBuildingBlockSnapshots:{method:"POST",path:"/building_blocks",headers:m.object({authorization:m.string().min(1).optional()}),body:SOt,responses:{201:zOt,401:H,403:H},summary:"Create building block snapshots for the authenticated user\u2019s organization"},getPlan:{method:"GET",path:"/plans/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:QOt,401:H,403:H,404:H},summary:"Load a thread-backed plan container visible to the authenticated user, including all visible plan revisions in that thread (only the latest revision carries body + prosemirror_json; older revisions are metadata-only and load on demand via getPlanRevision)"},getPlanRevision:{method:"GET",path:"/plans/:id/revisions/:revisionId",pathParams:m.object({id:m.string().min(1),revisionId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:UOt,401:H,403:H,404:H},summary:"Load a single revision body + prosemirror_json + comment threads for a thread-backed plan container. Used to fetch non-latest revisions on demand without paying for every revision when the plan is first opened"},createPlanCommentThread:{method:"POST",path:"/plans/:id/comment-threads",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:vOt,responses:{201:ROt,401:H,403:H,404:H,422:H},summary:"Create a new inline comment thread on a specific revision inside a thread-backed plan container"},createPlanComment:{method:"POST",path:"/plans/:id/comment-threads/:threadId/comments",pathParams:m.object({id:m.string().min(1),threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:BOt,responses:{201:NOt,401:H,403:H,404:H,409:H},summary:"Reply to an inline comment thread on a thread-backed plan container"},updatePlanCommentThread:{method:"PATCH",path:"/plans/:id/comment-threads/:threadId",pathParams:m.object({id:m.string().min(1),threadId:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:kOt,responses:{200:POt,401:H,403:H,404:H},summary:"Resolve or reopen an inline comment thread on a thread-backed plan container"},listPlans:{method:"GET",path:"/plans",headers:m.object({authorization:m.string().min(1).optional()}),query:GOt,responses:{200:FOt,401:H,403:H},summary:"List thread-backed plan containers visible to the authenticated user in their organization, ordered by latest visible revision and optionally filtered by author or repository"},listBuildingBlockSnapshots:{method:"GET",path:"/building_blocks",headers:m.object({authorization:m.string().min(1).optional()}),query:HOt,responses:{200:jOt,401:H,403:H},summary:"List building block snapshots for the authenticated user\u2019s organization and repo origin path"},listUploadSessions:{method:"GET",path:"/upload_sessions",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Zwt,401:H},summary:"List recent upload sessions for the authenticated user"},createUploadSession:{method:"POST",path:"/upload_sessions",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({thread_files:m.array(ewt).optional(),skill_files:m.array(XOt).optional()}),responses:{201:Mwt,400:H,401:H},summary:"Create an upload session with presigned URLs for file uploads"},completeUploadSession:{method:"POST",path:"/upload_sessions/:id/complete",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({thread_files:m.array(Bwt).optional(),skill_files:m.array(Nwt).optional()}),responses:{200:wwt,400:H,401:H,404:H,409:H,422:H},summary:"Complete an upload session after files have been uploaded to storage"},adminStats:{method:"GET",path:"/admin/stats",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:gkt,401:H,403:H},summary:"Cross-org operational counts. Tanagram admins only."},adminListOrganizations:{method:"GET",path:"/admin/organizations",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:_kt,401:H,403:H},summary:"List every organization with member and thread counts. Tanagram admins only."},adminListUsers:{method:"GET",path:"/admin/users",query:ykt,headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Ikt,401:H,403:H},summary:"List every user with their org memberships and thread count. Tanagram admins only."},adminListThreads:{method:"GET",path:"/admin/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Rkt,responses:{200:vkt,401:H,403:H},summary:"List live threads across every organization. Tanagram admins only."},adminLookupThread:{method:"GET",path:"/admin/threads/lookup",headers:m.object({authorization:m.string().min(1).optional()}),query:xkt,responses:{200:Ckt,400:H,401:H,403:H,404:H},summary:"Look up a thread by thread id, thread file id, or harness session id. Tanagram admins only."},adminForceFollow:{method:"POST",path:"/admin/connections/follow",headers:m.object({authorization:m.string().min(1).optional()}),body:Skt,responses:{200:Tkt,401:H,403:H,404:H,422:H},summary:"Force follower->followee edge. Admin-only and non-destructive."},adminHardDeleteThread:{method:"DELETE",path:"/admin/threads/:id",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{204:m.null(),401:H,403:H,404:H},summary:"Permanently remove a thread. Tanagram admins only."},adminReparseThreadFile:{method:"POST",path:"/admin/thread-files/:id/reparse",pathParams:m.object({id:m.string().min(1).describe("Thread file id, e.g. tf_xxx.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{200:Dkt,401:H,403:H,404:H},summary:"Re-enqueue parsing for a thread file. Tanagram admins only."},listCardFeed:{method:"GET",path:"/cards/feed",query:m.object({limit:m.coerce.number().int().min(1).max(48).optional()}),responses:{200:ywt},summary:"Slim feed of public threads with a ready cover image, ordered by cover_generated_at descending. Powers the landing-page UGC card scroll. Returns presigned cover URLs inline so the grid renders without a follow-up round trip per card."},listDiscoverThreads:{method:"GET",path:"/discover/threads",headers:m.object({authorization:m.string().min(1).optional()}),query:Ywt,responses:{200:Vwt},summary:"Feed of public threads with sort, harness filter, search, and cursor pagination. Auth is optional and populates viewer_vote."},discoverStats:{method:"GET",path:"/discover/stats",responses:{200:Kwt},summary:"Unauthenticated rollup of public-thread counts for the Discover header."},createWaitlistEntry:{method:"POST",path:"/waitlist_entries",body:mOt,responses:{201:hOt,409:H},summary:"Create an unauthenticated waitlist entry keyed by (location, contact)."},createRecruitingInterest:{method:"POST",path:"/recruiting_interests",body:gOt,responses:{201:m.object({})},summary:"Record recruiting interest (target profile or demo request) and notify via Slack."},createFeedback:{method:"POST",path:"/feedback",headers:m.object({authorization:m.string().min(1).optional()}),body:_Ot,responses:{201:EOt,401:H,422:H,429:H},summary:"Submit in-app feedback. Persists to lore.feedback_entries and best-effort posts to the #lore-feedback Slack channel. Rate-limited to 30 submissions/hour per user."},createShareToken:{method:"POST",path:"/threads/:id/share-token",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({}).optional(),responses:{201:RFe,401:H,403:H,404:H,409:H},summary:"Mint a short share-link token for a public thread. Author only. The token powers `/s/:token` short URLs and enables k-factor attribution."},resolveShareToken:{method:"GET",path:"/referrals/resolve/:token",pathParams:m.object({token:m.string().min(1).max(16)}),headers:m.object({authorization:m.string().min(1).optional()}),query:Bkt,responses:{200:RFe,404:H},summary:"Resolve a share-link token to its thread and record the view. Works for signed-out viewers; if a bearer token is present we attribute the view to that Lore user for analytics."},adminGrowth:{method:"GET",path:"/admin/growth",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:wkt,401:H,403:H},summary:"Share-link k-factor, funnel, sparkline, and top sharers by window. Tanagram admins only."},adminActiveUsers:{method:"GET",path:"/admin/active-users",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:kkt,401:H,403:H},summary:"DAU/WAU/MAU/all-time active-user buckets \u2014 union of oauth token issuance and thread-event spine. Tanagram admins only."},adminReferrals:{method:"GET",path:"/admin/referrals",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:mPt,401:H,403:H},summary:"Cross-organization invite-link funnel: lifetime + 30-day counts, 60-day daily timeseries, top inviters, recent attributions. Tanagram admins only."},adminOnboardingSources:{method:"GET",path:"/admin/onboarding/sources",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:gPt,401:H,403:H},summary:"Signed-up persons grouped by PostHog `initial_source` first-touch attribution. Powers bucket 1 of /admin's Onboarding flow tab; sourced via HogQL."},adminRunCritiquePlayground:{method:"POST",path:"/admin/critique-playground/run",headers:m.object({authorization:m.string().min(1).optional()}),body:Ukt,responses:{200:Qkt,401:H,403:H,409:H},summary:"Admin-only critique playground that saves markdown to a file:// plan artifact and returns parsed + critiqued plan blocks."},adminListEmailTemplates:{method:"GET",path:"/admin/email-templates",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:zkt,401:H,403:H},summary:"List transactional email templates and their editable preview fields. Tanagram admins only."},adminPreviewEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/preview",pathParams:m.object({id:m.string().min(1).describe("Email template id.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:jkt,responses:{200:Hkt,400:H,401:H,403:H,404:H},summary:"Render a transactional email template with supplied values. Tanagram admins only."},adminSendEmailTemplate:{method:"POST",path:"/admin/email-templates/:id/send",pathParams:m.object({id:m.string().min(1).describe("Email template id.")}),headers:m.object({authorization:m.string().min(1).optional()}),body:$kt,responses:{200:qkt,400:H,401:H,403:H,404:H,503:H},summary:"Send a transactional email template through Resend. Tanagram admins only."},getBillingState:{method:"GET",path:"/billing/state",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Vkt,401:H},summary:"Resolve the caller's plan, features, seat count, and any admin override."},createBillingCheckout:{method:"POST",path:"/billing/checkout",headers:m.object({authorization:m.string().min(1).optional()}),body:Ykt,responses:{200:Kkt,400:H,401:H,403:H,503:H},summary:"Start a Stripe Checkout session for Creator ($29/mo) or Team ($19/seat/mo, min 2)."},createBillingPortal:{method:"POST",path:"/billing/portal",headers:m.object({authorization:m.string().min(1).optional()}),body:m.object({subject_type:m.enum(["user","organization"]).default("user")}).optional(),responses:{200:Jkt,401:H,404:H,503:H},summary:"Open the Stripe customer portal so the subject can manage their subscription."},updateTeamSeats:{method:"PATCH",path:"/billing/team-seats",headers:m.object({authorization:m.string().min(1).optional()}),body:Zkt,responses:{200:bre,400:H,401:H,403:H,404:H,503:H},summary:"Adjust the caller-organization's Team seat quantity (admin of that org only)."},adminListBilling:{method:"GET",path:"/admin/billing",headers:m.object({authorization:m.string().min(1).optional()}),responses:{200:Wkt,401:H,403:H},summary:"List every user and org with current plan + override for the admin panel."},adminSetUserPlanOverride:{method:"PUT",path:"/admin/billing/users/:id/override",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xFe,responses:{200:dz,401:H,403:H,404:H},summary:"Admin override for a user's plan tier. Null clears the override."},adminSetOrganizationPlanOverride:{method:"PUT",path:"/admin/billing/organizations/:id/override",pathParams:m.object({id:m.string().min(1)}),headers:m.object({authorization:m.string().min(1).optional()}),body:xFe,responses:{200:dz,401:H,403:H,404:H},summary:"Admin override for an organization's plan tier. Null clears the override."},projects:rFe,regions:aFe,entities:dFe,docs:tFe,mentions:pFe,favorites:AFe,search:hFe,slack:_Fe},{pathPrefix:"/api"})});import{AsyncLocalStorage as wPt}from"node:async_hooks";import{createHash as kPt,randomBytes as JFe}from"node:crypto";import nc from"node:fs/promises";import Bw from"node:path";function e4e(e){return Bw.join(e,"discovery-cache.json")}function GPt(e){return Bw.join(e,"tokens-refresh.lock")}async function Ore(e,t,n={}){let r=KFe.getStore();if(r?.has(e))return t();let o=n.waitMs??MPt,i=n.staleMs??LPt,s=n.now??Date.now,c=n.sleep??(v=>new Promise(x=>setTimeout(x,v))),l=GPt(e),f=Bw.join(l,"owner"),h=`${process.pid}:${Date.now()}:${Math.random().toString(36).slice(2)}`,y=s(),S=!1;for(;!S;)try{await nc.mkdir(e,{recursive:!0,mode:448}),await nc.chmod(e,448).catch(()=>{}),await nc.mkdir(l,{mode:448});try{await nc.writeFile(f,h,{mode:384})}catch(v){throw await nc.rm(l,{recursive:!0,force:!0}),v}S=!0}catch(v){if(!$Pt(v))throw v;if(await qPt(l,i,s)){await nc.rm(l,{recursive:!0,force:!0});continue}if(s()-y>=o)throw new Error(`Timed out waiting for OAuth token refresh lock at ${l}`);await c(Math.min(UPt,o))}let b=new Set(r??[]);b.add(e);try{return await KFe.run(b,t)}finally{await VPt(l,f,h)}}function t4e(e){let t=new URL(e),n=t.pathname==="/"?"":t.pathname;return`${t.origin}/.well-known/oauth-protected-resource${n}`}async function Az(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await HPt(e.stateDir);if(r!==null&&r.resource===e.resource){if(n()-r.fetchedAt<PPt)return r.endpoints;let s=await zPt({cached:r,resource:e.resource,stateDir:e.stateDir,fetchFn:t,nowFn:n});if(s!==null)return s}let o=r!==null&&r.resource===e.resource?r:null;return jPt({cached:o,resource:e.resource,stateDir:e.stateDir,fetchFn:t,nowFn:n})}async function zPt(e){if(!e.cached.prmEtag)return null;let t=t4e(e.resource),n;try{n=await e.fetchFn(t,{headers:{"If-None-Match":e.cached.prmEtag}})}catch{return e.cached.endpoints}return n.status===304?(await a4e({...e.cached,fetchedAt:e.nowFn()},e.stateDir),e.cached.endpoints):n.ok?null:e.cached.endpoints}async function jPt(e){let t=t4e(e.resource),n;try{n=await e.fetchFn(t)}catch(y){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: could not reach ${t} and no cached endpoints exist. Check your network connection. (${y.message})`)}if(!n.ok){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: GET ${t} returned HTTP ${n.status}. Check that the server is reachable and the resource URL is correct.`)}let r=n.headers.get("etag")??void 0,o;try{o=await n.json()}catch{throw new Error(`Discovery failed: GET ${t} returned non-JSON body.`)}let i=QPt.safeParse(o);if(!i.success){let y=i.error.issues.map(S=>S.path.join(".")||S.message).join(", ");throw new Error(`Discovery failed: PRM at ${t} is missing required fields: ${y}.`)}if(i.data.authorization_servers.length===0)throw new Dre;let s=`${i.data.authorization_servers[0]}/.well-known/oauth-authorization-server`,c;try{c=await e.fetchFn(s)}catch(y){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: could not reach AS metadata at ${s} and no cached endpoints exist. (${y.message})`)}if(!c.ok){if(e.cached!==null)return e.cached.endpoints;throw new Error(`Discovery failed: GET ${s} returned HTTP ${c.status}.`)}let l;try{l=await c.json()}catch{throw new Error(`Discovery failed: GET ${s} returned non-JSON body.`)}let f=FPt.safeParse(l);if(!f.success){let y=f.error.issues.map(S=>S.path.join(".")||S.message).join(", ");throw new Error(`Discovery failed: AS metadata at ${s} is missing required fields: ${y}.`)}let h={audience:i.data.resource,deviceAuthorizationEndpoint:`${f.data.issuer}/oauth2/device_authorization`,tokenEndpoint:f.data.token_endpoint,authorizationEndpoint:f.data.authorization_endpoint??`${f.data.issuer}/oauth2/authorize`};return await a4e({resource:e.resource,endpoints:h,fetchedAt:e.nowFn(),prmEtag:r},e.stateDir),h}async function n4e(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await t(e.tokenEndpoint,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"refresh_token",refresh_token:e.current.refresh_token,client_id:e.clientId}).toString()});if(!r.ok){let s;try{s=await r.json()}catch{s=void 0}throw s?.error==="invalid_grant"?new Nw:new Error(`Cloud refresh failed with HTTP ${r.status}; tokens preserved for retry.`)}let o;try{o=await r.json()}catch{throw new Error(`Cloud refresh response was not valid JSON (HTTP ${r.status}).`)}let i=XFe.safeParse(o);if(!i.success)throw new Error(`Cloud refresh response failed schema validation: ${i.error.message}`);return{access_token:i.data.access_token,refresh_token:i.data.refresh_token,expires_at:n()+i.data.expires_in*1e3,scope:i.data.scope??e.current.scope}}function r4e(){let e=JFe(32).toString("base64url"),t=kPt("sha256").update(e).digest("base64url");return{codeVerifier:e,codeChallenge:t}}function o4e(){return JFe(16).toString("base64url")}function i4e(e){let t=new URL(e.authorizationEndpoint),n=t.searchParams;return n.set("response_type","code"),n.set("client_id",e.clientId),n.set("redirect_uri",e.redirectUri),n.set("code_challenge",e.codeChallenge),n.set("code_challenge_method","S256"),e.resource&&n.set("resource",e.resource),n.set("scope",e.scope),n.set("state",e.state),e.prompt&&n.set("prompt",e.prompt),t.toString()}async function s4e(e){let t=e.fetchImpl??fetch,n=e.now??Date.now,r=await t(e.tokenEndpoint,{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:"authorization_code",code:e.code,code_verifier:e.codeVerifier,client_id:e.clientId,redirect_uri:e.redirectUri,...e.resource?{resource:e.resource}:{}}).toString()});if(!r.ok){let s;try{s=await r.json()}catch{s=void 0}let c=typeof s?.error=="string"?s.error:`http_${r.status}`;throw new Bre(c,`Token exchange failed (${c}).`)}let o;try{o=await r.json()}catch{throw new Error(`Token exchange response was not valid JSON (HTTP ${r.status}).`)}let i=XFe.safeParse(o);if(!i.success)throw new Error(`Token exchange response failed schema validation: ${i.error.message}`);return{access_token:i.data.access_token,refresh_token:i.data.refresh_token,expires_at:n()+i.data.expires_in*1e3,scope:i.data.scope??""}}async function HPt(e){let t=e4e(e),n;try{n=await nc.readFile(t,"utf8")}catch(r){if(wre(r))return null;throw r}try{let r=JSON.parse(n),o=WFe.safeParse(r);return o.success?o.data:null}catch{return null}}async function a4e(e,t){let n=e4e(t);await nc.mkdir(Bw.dirname(n),{recursive:!0,mode:448}),await nc.chmod(Bw.dirname(n),448);let r=`${n}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`;try{let o=await nc.open(r,"w",384);try{await o.writeFile(JSON.stringify(WFe.parse(e)),"utf8"),await o.chmod(384),await o.sync()}finally{await o.close()}await nc.rename(r,n)}catch(o){throw await nc.unlink(r).catch(()=>{}),o}}function wre(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function $Pt(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="EEXIST"}async function qPt(e,t,n){try{let r=await nc.stat(e);return n()-r.mtimeMs>=t}catch(r){if(wre(r))return!1;throw r}}async function VPt(e,t,n){try{if(await nc.readFile(t,"utf8")!==n)return}catch(r){if(!wre(r))throw r}await nc.rm(e,{recursive:!0,force:!0})}var KFe,PPt,MPt,LPt,UPt,ZFe,ax,Nre,WFe,QPt,FPt,XFe,Nw,Dre,Bre,kre=O(()=>{"use strict";A();mu();KFe=new wPt,PPt=864e5,MPt=3e4,LPt=6e4,UPt=100,ZFe=process.env.LORE_PLUGIN_AUTHKIT_CLIENT_ID?.trim()||process.env.PLUGIN_AUTHKIT_CLIENT_ID?.trim()||"client_01KRSDB9SR20N7MB0D9MPS05Q6",ax=process.env.LORE_CLI_AUTHKIT_CLIENT_ID?.trim()||process.env.CLI_AUTHKIT_CLIENT_ID?.trim()||"client_01KV6K8BBANC2J3998K4DG9840",Nre="openid email profile offline_access",WFe=m.object({resource:m.string(),endpoints:m.object({audience:m.string(),deviceAuthorizationEndpoint:m.string(),tokenEndpoint:m.string(),authorizationEndpoint:m.string()}),fetchedAt:m.number(),prmEtag:m.string().optional()}),QPt=m.object({resource:m.string().min(1,"`resource` must be a non-empty string"),authorization_servers:m.array(m.string())}),FPt=m.object({issuer:m.string().min(1,"`issuer` must be a non-empty string"),token_endpoint:m.string().min(1,"`token_endpoint` must be a non-empty string"),authorization_endpoint:m.string().optional()}),XFe=m.object({access_token:m.string().min(1),refresh_token:m.string().min(1),expires_in:m.number().int().positive(),token_type:m.string().min(1),scope:m.string().optional()}),Nw=class extends Error{constructor(){super("OAuth refresh token is invalid or expired"),this.name="OAuthInvalidGrantError"}},Dre=class extends Error{constructor(){super("OAuth discovery returned no authorization servers"),this.name="OAuthNoAuthorizationServerError"}};Bre=class extends Error{constructor(n,r){super(r??`OAuth authorization failed: ${n}`);this.oauthError=n;this.name="OAuthAuthorizationError"}oauthError}});import ip from"node:fs";import YPt from"node:path";function Pre(e){return YPt.join(e,"tokens.json")}function KPt(e){return`${e}.tmp.${process.pid}.${Date.now()}.${Math.random().toString(36).slice(2)}`}function l4e(e){return typeof e=="object"&&e!==null&&"code"in e&&e.code==="ENOENT"}function JPt(e,t){let n;try{n=JSON.parse(e)}catch(o){throw new Error(`tokens file at ${t} is not valid JSON: ${o.message}`)}if(typeof n=="object"&&n!==null&&"version"in n){let o=c4e.safeParse(n);if(!o.success)throw new Error(`tokens file at ${t} failed schema validation: ${o.error.message}`);return o.data}let r=gz.safeParse(n);if(!r.success)throw new Error(`tokens file at ${t} failed schema validation: ${r.error.message}`);return XPt(r.data)}function ZPt(e){let t=e.split(".");if(t.length<2||!t[1])return null;try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));if(typeof n!="object"||n===null)return null;let r=n.iss;return typeof r=="string"&&r.length>0?r:null}catch{return null}}function WPt(e){let t=ZPt(e.access_token);if(!t)return!1;let n;try{n=new URL(t).host.toLowerCase()}catch{return!1}return n!=="workos.com"&&!n.endsWith(".workos.com")}function XPt(e){let t={};return WPt(e)&&(t.plugin=e),{version:2,clients:t}}function e2t(e){return JSON.stringify(c4e.parse(e))}function Mre(e){let t=Pre(e),n;try{n=ip.readFileSync(t,"utf8")}catch(r){if(l4e(r))return null;throw r}return JPt(n,t)}function d4e(e,t){let n=Pre(e);ip.mkdirSync(e,{recursive:!0,mode:448}),ip.chmodSync(e,448);let r=KPt(n),o=e2t(t),i;try{i=ip.openSync(r,"w",384),ip.writeSync(i,o),ip.fchmodSync(i,384),ip.fsyncSync(i),ip.closeSync(i),i=void 0,ip.renameSync(r,n)}catch(s){if(i!==void 0)try{ip.closeSync(i)}catch{}try{ip.unlinkSync(r)}catch{}throw s}}function p4e(e,t){return Mre(e)?.clients[t]??null}function t2t(e){try{return Mre(e)??{version:2,clients:{}}}catch{return{version:2,clients:{}}}}function u4e(e){try{ip.rmSync(Pre(e))}catch(t){if(!l4e(t))throw t}}function hz(e,t,n){let r=t2t(e);r.clients[t]=gz.parse(n),d4e(e,r)}function Lre(e,t){let n;try{n=Mre(e)}catch{u4e(e);return}if(!(!n||!(t in n.clients))){if(delete n.clients[t],Object.keys(n.clients).length===0){u4e(e);return}d4e(e,n)}}var gz,c4e,Ure=O(()=>{"use strict";A();mu();kre();gz=m.object({access_token:m.string(),refresh_token:m.string(),expires_at:m.number().int(),scope:m.string().default("")}),c4e=m.object({version:m.literal(2),clients:m.record(m.string(),gz).default({})})});import n2t from"node:fs";import m4e from"node:os";import A4e from"node:path";function r2t(e=m4e.homedir()){return A4e.join(e,"Library","Application Support","tanagram","lore","tokens.json")}function g4e(e){let t=e.split(".");if(t.length<2||!t[1])return null;let n;try{n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}catch{return null}if(typeof n!="object"||n===null)return null;let r=n.exp;return typeof r=="number"?r*1e3:null}function f4e(e){try{n2t.rmSync(e)}catch(t){if(!(typeof t=="object"&&t!==null&&"code"in t&&t.code==="ENOENT"))throw t}}function Ow(e,t=m4e.homedir()){for(let n of o2t)f4e(A4e.join(e,n));f4e(r2t(t))}var o2t,h4e=O(()=>{"use strict";A();Ure();o2t=["token","refresh_token"]});var _z=O(()=>{"use strict";A();Ure();h4e();kre()});import Ez from"node:os";import Zc from"node:path";function Mr(){if(Zr()==="dev"){let t=process.env.LORE_DEV_STATE_DIR?.trim();if(t)return Zc.resolve(t.replace(/^~(?=$|\/)/,Ez.homedir()))}let e=Zr()==="dev"?".lore-dev":".lore";return Zc.join(Ez.homedir(),e)}function sp(){return Zc.join(Mr(),"log.txt")}function Qre(){return Zc.join(Mr(),"skill-sync.log.txt")}function Fre(){return Zc.join(Mr(),"sync_state.json")}function sT(){return Zc.join(Mr(),"upload_filters.json")}function yz(){return Zc.join(Mr(),"upload_dirs.json")}function Sz(){return Zc.join(Mr(),"status.json")}function ux(){return Zc.join(Mr(),"quarantine")}function aT(){return Zc.join(Mr(),"install_source.json")}function uT(){return Zc.join(Mr(),"skill_sync_state.json")}function ME(){return Zc.join(Mr(),"bin","lore")}function cT(){let e=Zr();return e==="prod"?"ai.tanagram.lore":`ai.tanagram.lore.${e}`}function ww(){return`${cT()}.skill-sync`}function cx(){return Zc.join(Ez.homedir(),"Library","LaunchAgents",`${cT()}.plist`)}function Tz(){return Zc.join(Ez.homedir(),"Library","LaunchAgents",`${ww()}.plist`)}var yi=O(()=>{"use strict";A();$c()});import LE from"node:fs";import Iz from"node:path";function UE(){try{return p4e(Mr(),kw)}catch{return null}}function Gre(){return Iz.join(Mr(),"analytics_distinct_id")}function _4e(){let e;try{e=LE.readFileSync(Gre(),"utf8")}catch(n){if(n&&typeof n=="object"&&"code"in n&&n.code==="ENOENT")return null;throw n}let t=e.trim();return t.length>0?t:null}function E4e(e){let t=Gre();LE.mkdirSync(Iz.dirname(t),{recursive:!0,mode:448}),LE.writeFileSync(t,e,{mode:384})}function y4e(){try{LE.rmSync(Gre())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function zre(){return Iz.join(Mr(),"analytics_person_properties.json")}function S4e(){let e;try{e=LE.readFileSync(zre(),"utf8")}catch(t){if(t&&typeof t=="object"&&"code"in t&&t.code==="ENOENT")return null;throw t}try{let t=JSON.parse(e);return t&&typeof t=="object"?t:null}catch{return null}}function T4e(e){let t=zre();LE.mkdirSync(Iz.dirname(t),{recursive:!0,mode:448}),LE.writeFileSync(t,JSON.stringify(e),{mode:384})}function I4e(){try{LE.rmSync(zre())}catch(e){if(e&&typeof e=="object"&&"code"in e&&e.code==="ENOENT")return;throw e}}function jre(){let e=UE()?.access_token.trim()??"";return!e||a2t(e,new Date,s2t)?{token:"",source:"none"}:{token:e,source:"file"}}function b4e(){return!!UE()?.access_token}function Hre(e){let t=Mr();hz(t,kw,e),Ow(t)}function C4e(e){Hre(e)}function v4e(e,t){let n=Mr();hz(n,kw,e),hz(n,i2t,t),Ow(n)}function bz(e){let t=UE();Hre({access_token:e,refresh_token:t?.refresh_token??"",expires_at:g4e(e)??0,scope:t?.scope??""})}function R4e(e){let t=UE();Hre({access_token:t?.access_token??"",refresh_token:e,expires_at:t?.expires_at??0,scope:t?.scope??""})}function Kg(){Lre(Mr(),kw),Ow(Mr())}function x4e(){Lre(Mr(),kw),Ow(Mr())}function Pw(e){let t=e.split(".");if(t.length<2)throw new Error("invalid JWT format");return JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"))}function a2t(e,t,n=0){let r;try{r=Pw(e)}catch{return!1}return typeof r.exp!="number"?!1:t.getTime()+n>=r.exp*1e3}var i2t,kw,s2t,lT=O(()=>{"use strict";A();_z();yi();i2t="plugin",kw="cli",s2t=10*1e3});import{AsyncLocalStorage as u2t}from"node:async_hooks";function B4e(e,t){return D4e.run(e,t)}function N4e(){return D4e.getStore()}var D4e,$re=O(()=>{"use strict";A();D4e=new u2t});import w4e from"node:fs";function c2t(){let e=Mr();O4e!==e&&(w4e.mkdirSync(e,{recursive:!0}),O4e=e)}function l2t(e){let t=typeof e=="string"?e:JSON.stringify(e);return/[\s"=]/.test(t)?JSON.stringify(t):t}function d2t(e,t,n){let r=`${new Date().toISOString()} ${e} ${t}`;if(!n)return`${r}
105
105
  `;let o=Object.entries(n).map(([i,s])=>`${i}=${l2t(s)}`).join(" ");return o?`${r} ${o}
106
106
  `:`${r}
107
107
  `}function qre(e,t,n){try{let r=d2t(e,t,n);c2t(),w4e.appendFileSync(sp(),r),Zr()==="dev"&&process.stderr.write(r)}catch{}p2t(e,t,n)}function p2t(e,t,n){try{LN[e](t,f2t(n))}catch{}}function f2t(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e))if(r!=null){if(typeof r=="string"||typeof r=="number"||typeof r=="boolean"){t[n]=r;continue}try{t[n]=JSON.stringify(r)}catch{t[n]=String(r)}}return t}var O4e,X,hr=O(()=>{"use strict";A();ER();$c();yi();O4e=null;X={info(e,t){qre("info",e,t)},warn(e,t){qre("warn",e,t)},error(e,t){qre("error",e,t)}}});import{setTimeout as m2t}from"node:timers/promises";async function Mw(e,t){let n=t.limit??A2t,r=t.baseMs??k4e,o=t.maxMs??P4e,i=t.sleep??m2t,s=t.logEvent??"fetch_retry";for(let c=0;c<=n;c+=1){let l=c===n;try{return await e()}catch(f){if(!t.isRetryableError(f)||l)throw f;X.warn(s,{attempt:c+1,reason:t.describeRetryReason?.(f)??"retryable_error",...t.logFields})}await i(g2t(c,{baseMs:r,maxMs:o}))}throw new Error("fetchWithRetry: unreachable")}function g2t(e,{baseMs:t=k4e,maxMs:n=P4e}={}){let r=Math.min(t*2**e,n),o=Math.floor(r/2);return o+Math.floor(Math.random()*o)}function lx(e){return e instanceof TypeError?e.message==="fetch failed"||e.message==="terminated":!1}function Lw(e){return M4e(e,h2t)}function Uw(e){return M4e(e,_2t)}function M4e(e,t){if(!lx(e))return!1;let n=e.cause;if(!(n instanceof Error))return!1;let r=n.code;return typeof r=="string"&&t.has(r)}function Qw(e){if(!lx(e))return"unknown";let t=e.cause;if(!(t instanceof Error))return"unknown";let n=t.code;return typeof n=="string"?`${t.name}:${n}`:t.name}function L4e(e){let t=e instanceof Error?e.message:String(e),n=[],r=[],o=e instanceof Error?e.cause:void 0,i=0,s=5;for(;o&&i<s;){if(o instanceof Error){let c=o,l=c.code;l&&r.push(l),n.push(`${c.name}${l?`[${l}]`:""}: ${c.message}`),o=c.cause}else if(typeof o=="string"){n.push(o);break}else{n.push(String(o));break}i+=1}return{message:t,causeChain:n,codes:r}}var A2t,k4e,P4e,h2t,_2t,Cz=O(()=>{"use strict";A();hr();A2t=5,k4e=1e3,P4e=16e3;h2t=new Set(["UND_ERR_CONNECT_TIMEOUT","ENOTFOUND","EAI_AGAIN","ECONNREFUSED"]),_2t=new Set(["ECONNRESET","ETIMEDOUT","EPIPE"])});import{execFileSync as F4e}from"node:child_process";import{createHash as E2t}from"node:crypto";import{resolve as y2t}from"node:path";function G4e(e){if(process.env.LORE_DISABLE_PORTLESS_DISCOVERY!=="1"&&process.env.npm_lifecycle_event!=="test")try{return F4e("portless",["get",e],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim().replace(/\/$/,"")}catch{return}}function U4e(e){return e.toLowerCase().replace(/[^a-z0-9-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,63)}function I2t(){try{return F4e("git",["rev-parse","--show-toplevel"],{encoding:"utf8",stdio:["ignore","pipe","ignore"]}).trim()}catch{return y2t(process.cwd(),"../..")}}function b2t(e){return E2t("sha1").update(e).digest("hex").slice(0,8)}function C2t(){let e=U4e(process.env.LORE_DEV_STACK_NAME??"");if(e)return e;let t=I2t();return[U4e(t.split(/[\\/]/).pop()||"lore"),b2t(t)].filter(Boolean).join("-").slice(0,63)}function z4e(){let e=C2t();return e?`api.${e}.lore`:"api.lore"}function j4e(e){let t=process.env.LORE_TARGET?.trim();return t&&T2t.has(t)?t:e}function rA(e=Zr(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();if(n)return n.replace(/\/$/,"");let r=j4e(e);return r==="dev"?G4e(z4e())??Fw.dev:Fw[r]}function H4e(e=Zr(),t=process.env.LORE_API_ORIGIN){let n=t?.trim();if(n)return`${n.replace(/\/$/,"")}/mcp`;let r=j4e(e);return r==="dev"?`${G4e(z4e())??Fw.dev}/mcp`:S2t[r]}function Yre(e=Zr(),t=process.env.LORE_API_ORIGIN){return rA(e,t)}function $4e(e){let t=N4e()??Pc();if(!t||t.spanContext().traceFlags!==1)return e;let n=P_({span:t,propagateTraceparent:!0});return!n["sentry-trace"]&&!n.baggage&&!n.traceparent?e:{...e,...!e["sentry-trace"]&&n["sentry-trace"]?{"sentry-trace":n["sentry-trace"]}:{},...!e.baggage&&n.baggage?{baggage:n.baggage}:{},...!e.traceparent&&n.traceparent?{traceparent:n.traceparent}:{}}}async function v2t(){if(!UE()?.refresh_token.trim())return"";vz||(vz=Ore(Mr(),async()=>{let t=jre().token;if(t)return t;let n=UE();if(!n?.refresh_token.trim())return"";let{tokenEndpoint:r}=await Az({resource:Yre(),stateDir:Mr(),fetchImpl:Q4e}),o=await n4e({current:n,tokenEndpoint:r,clientId:ax,fetchImpl:Q4e});return bz(o.access_token),R4e(o.refresh_token),o.access_token}).finally(()=>{vz=void 0}));try{return await vz}catch(t){return t instanceof Nw&&Kg(),""}}function Vre(e){try{let t=Pw(e);typeof t.sub=="string"&&gU({id:t.sub,...typeof t.email=="string"?{email:t.email}:{}})}catch{}}function x2t(){let e=process.env.LORE_EXTERNAL_TOKEN_MANAGER;return typeof e=="string"&&R2t.has(e.trim().toLowerCase())}async function Qt(){let e=jre().token;if(e)return Vre(e),e;if(x2t()){let n=UE()?.access_token.trim()??"";return n&&Vre(n),n}let t=await v2t();return t&&Vre(t),t}function Pt(e={}){let t=e.token;return $Z(mz,{baseUrl:rA(),baseHeaders:{"User-Agent":B2e(),...t?{authorization:`Bearer ${t}`}:{}},api:async n=>{let r=$4e(n.headers);if(t===void 0){let i=await Qt();i&&!r.authorization&&(r={...r,authorization:`Bearer ${i}`})}let o=n.method.toUpperCase()==="GET";try{return await Mw(()=>HZ({...n,headers:r}),{isRetryableError:o?i=>Lw(i)||Uw(i):Lw,describeRetryReason:i=>`network:${Qw(i)}`,logEvent:"api_request_retry",logFields:{method:n.method,path:n.path}})}catch(i){if(lx(i)){let s=L4e(i);X.error("api_request_failed",{method:n.method,path:n.path,error:s.message,causeChain:s.causeChain.join(" \u2192 "),codes:s.codes.join(",")})}throw i}}})}var Fw,S2t,T2t,vz,Q4e,R2t,Or=O(()=>{"use strict";A();az();_z();Sf();ER();lT();$re();$c();Cz();hr();yi();Fw={dev:"http://localhost:4000","dev-shared":"https://lore-api.dev.tanagram.ai",prod:"https://lore-api.tanagram.ai"},S2t={dev:`${Fw.dev}/mcp`,"dev-shared":`${Fw["dev-shared"]}/mcp`,prod:"https://mcp.lore.link/mcp"},T2t=new Set(["dev","dev-shared","prod"]);Q4e=(async(e,t)=>{let n=$4e(Object.fromEntries(new Headers(t?.headers).entries()));return fetch(e,{...t,headers:n})});R2t=new Set(["1","true","yes","on"])});function Xn(e){return e instanceof Error?e.message:String(e)}function Xr(e,t){return e!==null&&typeof e=="object"&&"code"in e&&e.code===t}function Rz(){return Zr()==="dev"?"pnpm dev login":"lore login"}function D2t(e){return Zr()!=="dev"?e:e.replaceAll("'lore login'","'pnpm dev login'").replaceAll("`lore login`","`pnpm dev login`")}function Gw(){throw new be("")}var be,dx,dn=O(()=>{"use strict";A();$c();be=class extends Error{constructor(t){super(D2t(t)),this.name="CLIError"}};dx=class extends be{billingUrl;serverMessage;constructor(t){let n=t.serverMessage.trim(),r=n.replace(/\.+$/,""),o=r?`: ${r}`:"";super(`${t.action} blocked by your billing plan${o}. Manage or upgrade your plan: ${t.billingUrl}`),this.name="BillingBlockedError",this.billingUrl=t.billingUrl,this.serverMessage=n}}});function Z4e(e){return typeof e!="string"?!1:Q2t.has(e.trim().toLowerCase())}function gu(e={}){let t=e.stdout??process.stdout,n=e.stdin??process.stdin,r=e.env??process.env;return!((e.rawArgs??process.argv.slice(2)).includes(W4e)||Z4e(r.LORE_NO_TUI)||Z4e(r.CI)||r.TERM==="dumb"||!t?.isTTY||!n?.isTTY)}function X4e(e){return e.filter(t=>t!==W4e)}var W4e,Q2t,QE=O(()=>{"use strict";A();W4e="--no-tui",Q2t=new Set(["1","true","yes","on"])});var l3e=F(yn=>{"use strict";A();var noe=Symbol.for("react.transitional.element"),F2t=Symbol.for("react.portal"),G2t=Symbol.for("react.fragment"),z2t=Symbol.for("react.strict_mode"),j2t=Symbol.for("react.profiler"),H2t=Symbol.for("react.consumer"),$2t=Symbol.for("react.context"),q2t=Symbol.for("react.forward_ref"),V2t=Symbol.for("react.suspense"),Y2t=Symbol.for("react.memo"),o3e=Symbol.for("react.lazy"),K2t=Symbol.for("react.activity"),e3e=Symbol.iterator;function J2t(e){return e===null||typeof e!="object"?null:(e=e3e&&e[e3e]||e["@@iterator"],typeof e=="function"?e:null)}var i3e={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},s3e=Object.assign,a3e={};function fx(e,t,n){this.props=e,this.context=t,this.refs=a3e,this.updater=n||i3e}fx.prototype.isReactComponent={};fx.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};fx.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function u3e(){}u3e.prototype=fx.prototype;function roe(e,t,n){this.props=e,this.context=t,this.refs=a3e,this.updater=n||i3e}var ooe=roe.prototype=new u3e;ooe.constructor=roe;s3e(ooe,fx.prototype);ooe.isPureReactComponent=!0;var t3e=Array.isArray;function toe(){}var bo={H:null,A:null,T:null,S:null},c3e=Object.prototype.hasOwnProperty;function ioe(e,t,n){var r=n.ref;return{$$typeof:noe,type:e,key:t,ref:r!==void 0?r:null,props:n}}function Z2t(e,t){return ioe(e.type,t,e.props)}function soe(e){return typeof e=="object"&&e!==null&&e.$$typeof===noe}function W2t(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var n3e=/\/+/g;function eoe(e,t){return typeof e=="object"&&e!==null&&e.key!=null?W2t(""+e.key):t.toString(36)}function X2t(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(toe,toe):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function px(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case noe:case F2t:s=!0;break;case o3e:return s=e._init,px(s(e._payload),t,n,r,o)}}if(s)return o=o(e),s=r===""?"."+eoe(e,0):r,t3e(o)?(n="",s!=null&&(n=s.replace(n3e,"$&/")+"/"),px(o,t,n,"",function(f){return f})):o!=null&&(soe(o)&&(o=Z2t(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(n3e,"$&/")+"/")+s)),t.push(o)),1;s=0;var c=r===""?".":r+":";if(t3e(e))for(var l=0;l<e.length;l++)r=e[l],i=c+eoe(r,l),s+=px(r,t,n,i,o);else if(l=J2t(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=c+eoe(r,l++),s+=px(r,t,n,i,o);else if(i==="object"){if(typeof e.then=="function")return px(X2t(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function xz(e,t,n){if(e==null)return e;var r=[],o=0;return px(e,r,"","",function(i){return t.call(n,i,o++)}),r}function eMt(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var r3e=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tMt={map:xz,forEach:function(e,t,n){xz(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return xz(e,function(){t++}),t},toArray:function(e){return xz(e,function(t){return t})||[]},only:function(e){if(!soe(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};yn.Activity=K2t;yn.Children=tMt;yn.Component=fx;yn.Fragment=G2t;yn.Profiler=j2t;yn.PureComponent=roe;yn.StrictMode=z2t;yn.Suspense=V2t;yn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=bo;yn.__COMPILER_RUNTIME={__proto__:null,c:function(e){return bo.H.useMemoCache(e)}};yn.cache=function(e){return function(){return e.apply(null,arguments)}};yn.cacheSignal=function(){return null};yn.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=s3e({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!c3e.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var s=Array(i),c=0;c<i;c++)s[c]=arguments[c+2];r.children=s}return ioe(e.type,o,r)};yn.createContext=function(e){return e={$$typeof:$2t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:H2t,_context:e},e};yn.createElement=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)c3e.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var c=Array(s),l=0;l<s;l++)c[l]=arguments[l+2];o.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return ioe(e,i,o)};yn.createRef=function(){return{current:null}};yn.forwardRef=function(e){return{$$typeof:q2t,render:e}};yn.isValidElement=soe;yn.lazy=function(e){return{$$typeof:o3e,_payload:{_status:-1,_result:e},_init:eMt}};yn.memo=function(e,t){return{$$typeof:Y2t,type:e,compare:t===void 0?null:t}};yn.startTransition=function(e){var t=bo.T,n={};bo.T=n;try{var r=e(),o=bo.S;o!==null&&o(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(toe,r3e)}catch(i){r3e(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),bo.T=t}};yn.unstable_useCacheRefresh=function(){return bo.H.useCacheRefresh()};yn.use=function(e){return bo.H.use(e)};yn.useActionState=function(e,t,n){return bo.H.useActionState(e,t,n)};yn.useCallback=function(e,t){return bo.H.useCallback(e,t)};yn.useContext=function(e){return bo.H.useContext(e)};yn.useDebugValue=function(){};yn.useDeferredValue=function(e,t){return bo.H.useDeferredValue(e,t)};yn.useEffect=function(e,t){return bo.H.useEffect(e,t)};yn.useEffectEvent=function(e){return bo.H.useEffectEvent(e)};yn.useId=function(){return bo.H.useId()};yn.useImperativeHandle=function(e,t,n){return bo.H.useImperativeHandle(e,t,n)};yn.useInsertionEffect=function(e,t){return bo.H.useInsertionEffect(e,t)};yn.useLayoutEffect=function(e,t){return bo.H.useLayoutEffect(e,t)};yn.useMemo=function(e,t){return bo.H.useMemo(e,t)};yn.useOptimistic=function(e,t){return bo.H.useOptimistic(e,t)};yn.useReducer=function(e,t,n){return bo.H.useReducer(e,t,n)};yn.useRef=function(e){return bo.H.useRef(e)};yn.useState=function(e){return bo.H.useState(e)};yn.useSyncExternalStore=function(e,t,n){return bo.H.useSyncExternalStore(e,t,n)};yn.useTransition=function(){return bo.H.useTransition()};yn.version="19.2.4"});var d3e=F((pn,Dz)=>{"use strict";A();process.env.NODE_ENV!=="production"&&(function(){function e(P,te){Object.defineProperty(r.prototype,P,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",te[0],te[1])}})}function t(P){return P===null||typeof P!="object"?null:(P=kn&&P[kn]||P["@@iterator"],typeof P=="function"?P:null)}function n(P,te){P=(P=P.constructor)&&(P.displayName||P.name)||"ReactClass";var Ie=P+"."+te;lt[Ie]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",te,P),lt[Ie]=!0)}function r(P,te,Ie){this.props=P,this.context=te,this.refs=Ct,this.updater=Ie||en}function o(){}function i(P,te,Ie){this.props=P,this.context=te,this.refs=Ct,this.updater=Ie||en}function s(){}function c(P){return""+P}function l(P){try{c(P);var te=!1}catch{te=!0}if(te){te=console;var Ie=te.error,je=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return Ie.call(te,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",je),c(P)}}function f(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===ri?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case Jt:return"Fragment";case Se:return"Profiler";case mo:return"StrictMode";case _r:return"Suspense";case Os:return"SuspenseList";case Gt:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case _t:return"Portal";case un:return P.displayName||"Context";case yt:return(P._context.displayName||"Context")+".Consumer";case Sn:var te=P.render;return P=P.displayName,P||(P=te.displayName||te.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case $n:return te=P.displayName||null,te!==null?te:f(P.type)||"Memo";case sr:te=P._payload,P=P._init;try{return f(P(te))}catch{}}return null}function h(P){if(P===Jt)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===sr)return"<...>";try{var te=f(P);return te?"<"+te+">":"<...>"}catch{return"<...>"}}function y(){var P=bt.A;return P===null?null:P.getOwner()}function S(){return Error("react-stack-top-frame")}function b(P){if(zi.call(P,"key")){var te=Object.getOwnPropertyDescriptor(P,"key").get;if(te&&te.isReactWarning)return!1}return P.key!==void 0}function v(P,te){function Ie(){vo||(vo=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",te))}Ie.isReactWarning=!0,Object.defineProperty(P,"key",{get:Ie,configurable:!0})}function x(){var P=f(this.type);return Su[P]||(Su[P]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),P=this.props.ref,P!==void 0?P:null}function D(P,te,Ie,je,Ze,zt){var vt=Ie.ref;return P={$$typeof:pt,type:P,key:te,props:Ie,_owner:je},(vt!==void 0?vt:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:x}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:Ze}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:zt}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function k(P,te){return te=D(P.type,te,P.props,P._owner,P._debugStack,P._debugTask),P._store&&(te._store.validated=P._store.validated),te}function Q(P){z(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===sr&&(P._payload.status==="fulfilled"?z(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function z(P){return typeof P=="object"&&P!==null&&P.$$typeof===pt}function G(P){var te={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(Ie){return te[Ie]})}function $(P,te){return typeof P=="object"&&P!==null&&P.key!=null?(l(P.key),G(""+P.key)):te.toString(36)}function ie(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(s,s):(P.status="pending",P.then(function(te){P.status==="pending"&&(P.status="fulfilled",P.value=te)},function(te){P.status==="pending"&&(P.status="rejected",P.reason=te)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function ge(P,te,Ie,je,Ze){var zt=typeof P;(zt==="undefined"||zt==="boolean")&&(P=null);var vt=!1;if(P===null)vt=!0;else switch(zt){case"bigint":case"string":case"number":vt=!0;break;case"object":switch(P.$$typeof){case pt:case _t:vt=!0;break;case sr:return vt=P._init,ge(vt(P._payload),te,Ie,je,Ze)}}if(vt){vt=P,Ze=Ze(vt);var Un=je===""?"."+$(vt,0):je;return to(Ze)?(Ie="",Un!=null&&(Ie=Un.replace(rd,"$&/")+"/"),ge(Ze,te,Ie,"",function(oi){return oi})):Ze!=null&&(z(Ze)&&(Ze.key!=null&&(vt&&vt.key===Ze.key||l(Ze.key)),Ie=k(Ze,Ie+(Ze.key==null||vt&&vt.key===Ze.key?"":(""+Ze.key).replace(rd,"$&/")+"/")+Un),je!==""&&vt!=null&&z(vt)&&vt.key==null&&vt._store&&!vt._store.validated&&(Ie._store.validated=2),Ze=Ie),te.push(Ze)),1}if(vt=0,Un=je===""?".":je+":",to(P))for(var cn=0;cn<P.length;cn++)je=P[cn],zt=Un+$(je,cn),vt+=ge(je,te,Ie,zt,Ze);else if(cn=t(P),typeof cn=="function")for(cn===P.entries&&(Tu||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Tu=!0),P=cn.call(P),cn=0;!(je=P.next()).done;)je=je.value,zt=Un+$(je,cn++),vt+=ge(je,te,Ie,zt,Ze);else if(zt==="object"){if(typeof P.then=="function")return ge(ie(P),te,Ie,je,Ze);throw te=String(P),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return vt}function Ce(P,te,Ie){if(P==null)return P;var je=[],Ze=0;return ge(P,je,"","",function(zt){return te.call(Ie,zt,Ze++)}),je}function ve(P){if(P._status===-1){var te=P._ioInfo;te!=null&&(te.start=te.end=performance.now()),te=P._result;var Ie=te();if(Ie.then(function(Ze){if(P._status===0||P._status===-1){P._status=1,P._result=Ze;var zt=P._ioInfo;zt!=null&&(zt.end=performance.now()),Ie.status===void 0&&(Ie.status="fulfilled",Ie.value=Ze)}},function(Ze){if(P._status===0||P._status===-1){P._status=2,P._result=Ze;var zt=P._ioInfo;zt!=null&&(zt.end=performance.now()),Ie.status===void 0&&(Ie.status="rejected",Ie.reason=Ze)}}),te=P._ioInfo,te!=null){te.value=Ie;var je=Ie.displayName;typeof je=="string"&&(te.name=je)}P._status===-1&&(P._status=0,P._result=Ie)}if(P._status===1)return te=P._result,te===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
@@ -526,7 +526,7 @@ exec ${jue(n)} ${jue(e)} "$@"
526
526
  Authorization expired. Please try again.
527
527
  `);return;case"login_failed":console.log(`
528
528
  Login failed: ${e.message}
529
- `);return}}});import XHt from"node:http";var nVe,e8t,rVe,oVe=O(()=>{"use strict";A();nVe="/callback",e8t='<!doctype html><meta charset="utf-8"><title>Lore</title><body style="font-family:system-ui;padding:3rem;text-align:center"><h1>Signed in to Lore</h1><p>You can close this tab and return to your terminal.</p></body>',rVe=async()=>{let e,t,n=XHt.createServer((c,l)=>{let f=new URL(c.url??"/","http://127.0.0.1");if(f.pathname!==nVe){l.statusCode=404,l.end("not found");return}let h=f.searchParams.get("error"),y=f.searchParams.get("code"),S=f.searchParams.get("state");l.statusCode=h||!y?400:200,l.setHeader("content-type","text/html; charset=utf-8"),l.end(h||!y?`<p>Login failed: ${h??"no code"}. Return to your terminal.</p>`:e8t),r={error:h,code:y,state:S},i()}),r=null,o,i=()=>{};await new Promise((c,l)=>{n.once("error",l),n.listen(0,"127.0.0.1",()=>{n.removeListener("error",l),c()})});let{port:s}=n.address();return{redirectUri:`http://127.0.0.1:${s}${nVe}`,waitForCallback:(c,l)=>new Promise((f,h)=>{o={state:c},e=f,t=h;let y=setTimeout(()=>{t=void 0,h(new Error("authorization timed out"))},l);y.unref&&y.unref(),i=()=>{if(!r||!e&&!t)return;let S=r;r=null,clearTimeout(y);let b={resolve:e,reject:t};e=void 0,t=void 0,S.error?b.reject?.(new Error(`authorization failed: ${S.error}`)):S.code?o&&S.state!==o.state?b.reject?.(new Error("authorization state mismatch")):b.resolve?.({code:S.code}):b.reject?.(new Error("authorization callback missing code"))},i()}),close:()=>{n.close()}}}});var N5e={};$s(N5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>uVe,getOpenBrowserCommand:()=>mVe,loginCommand:()=>Kue,openBrowser:()=>fVe,pollForTokens:()=>pVe,requestDeviceAuthorization:()=>dVe,runLogin:()=>AVe});import{spawn as t8t}from"node:child_process";function uVe(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function o8t(e){let n=await Pt({token:e}).whoAmI({headers:{}});n.status===200&&(E4e(`lore_${n.body.user.id}`),T4e(uVe(n.body)))}async function cVe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function lVe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}async function i8t(e){return Az({resource:e,stateDir:Mr()})}function s8t(e){return process.env.LORE_DEVICE_AUTH&&process.env.LORE_DEVICE_AUTH!=="0"?!1:e==="linux"?!!(process.env.DISPLAY||process.env.WAYLAND_DISPLAY):!0}async function dVe(e){let t=await fetch(e.deviceAuthorizationEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e.clientId,scope:Nre})}),n=await cVe(t);if(!t.ok)throw new Error(lVe(n));return n}async function pVe(e){let t=AbortSignal.timeout(Math.min(e.timeoutMs,e.expiresIn*1e3)),n=e.interval;for(;;){let r;try{r=await fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:r8t,device_code:e.deviceCode,client_id:e.clientId}),signal:t})}catch(s){throw s instanceof Error&&s.name==="TimeoutError"?new Error("authorization timed out"):s}let o=await cVe(r);if(r.ok){let s=o.access_token,c=o.refresh_token,l=o.expires_in;if(typeof s!="string")throw new Error("device token response missing access_token");return{access_token:s,refresh_token:typeof c=="string"?c:"",expires_at:Date.now()+(typeof l=="number"?l:0)*1e3,scope:typeof o.scope=="string"?o.scope:""}}let i=o;switch(i.error){case"authorization_pending":await iVe(n*1e3);break;case"slow_down":n+=1,await iVe(n*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(lVe(i))}}}async function fVe(e){let{command:t,args:n}=mVe(process.platform,e);await new Promise((r,o)=>{let i=t8t(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function mVe(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 a8t(e){if(!await Qt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function u8t(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:sp()})}catch(r){X.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function c8t(e){if(lx(e))return`Could not reach the Lore API at ${rA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`}function sVe(){let e=process.env.LORE_AUTHKIT_RESOURCE_INDICATORS?.trim();return e==="1"||e==="true"}async function aVe(e){let t=await e.deps.createLoopbackReceiver();try{let n=e.deps.generatePkce(),r=e.deps.generateState(),o=i4e({authorizationEndpoint:e.endpoints.authorizationEndpoint,clientId:e.clientId,redirectUri:t.redirectUri,codeChallenge:n.codeChallenge,resource:e.resource,scope:Nre,state:r,...e.silent?{prompt:"none"}:{}});e.emitProgress&&e.progress({kind:"browser_url",url:o});try{await e.deps.openBrowser(o),e.emitProgress&&e.progress({kind:"browser_opened"})}catch(s){X.warn("open_browser_failed",{error:s instanceof Error?s.message:String(s)}),e.emitProgress&&e.progress({kind:"browser_open_failed"})}e.emitProgress&&e.progress({kind:"waiting_for_authorization"});let{code:i}=await t.waitForCallback(r,e.timeoutMs);return await e.deps.exchangeCode({tokenEndpoint:e.endpoints.tokenEndpoint,clientId:e.clientId,code:i,codeVerifier:n.codeVerifier,redirectUri:t.redirectUri,resource:e.resource})}finally{t.close()}}async function AVe({client:e=Pt(),enableLaunchAgent:t=s8,openBrowser:n=fVe,platform:r=process.platform,discoverEndpoints:o=i8t,createLoopbackReceiver:i=rVe,generatePkce:s=r4e,generateState:c=o4e,exchangeCode:l=s4e,requestDeviceAuthorization:f=dVe,pollForTokens:h=pVe,isBrowserAvailable:y=()=>s8t(r),writeBootstrappedTokens:S=v4e,setTokens:b=C4e,cacheAnalyticsDistinctId:v=o8t,timeoutMs:x=n8t,progress:D=eVe}={}){if(await a8t(e)){D({kind:"already_logged_in"});return}try{let k=Yre(),Q=await o(k),z;if(y()){let G={createLoopbackReceiver:i,openBrowser:n,generatePkce:s,generateState:c,exchangeCode:l},$=await aVe({endpoints:Q,clientId:ax,resource:sVe()?k:void 0,silent:!1,deps:G,progress:D,emitProgress:!0,timeoutMs:x}),ie=await aVe({endpoints:Q,clientId:ZFe,resource:sVe()?H4e():void 0,silent:!0,deps:G,progress:D,emitProgress:!1,timeoutMs:x});S($,ie),z=$.access_token}else{let G=await f({deviceAuthorizationEndpoint:Q.deviceAuthorizationEndpoint,clientId:ax});D({kind:"device_authorized",userCode:G.user_code,verificationUri:G.verification_uri,verificationUriComplete:G.verification_uri_complete}),D({kind:"browser_url",url:G.verification_uri_complete}),D({kind:"waiting_for_authorization"});let $=await h({tokenEndpoint:Q.tokenEndpoint,clientId:ax,deviceCode:G.device_code,expiresIn:G.expires_in,interval:G.interval,timeoutMs:x});b($),z=$.access_token}v(z).catch(G=>{X.warn("cache_analytics_distinct_id_failed",{error:G instanceof Error?G.message:String(G)})}),D({kind:"logged_in"}),await u8t(t,r,D)}catch(k){k instanceof Error&&k.message==="authorization timed out"?(D({kind:"authorization_timed_out"}),Gw()):k instanceof Error&&k.message==="Authorization denied"?(D({kind:"authorization_denied"}),Gw()):k instanceof Error&&k.message==="Authorization expired"&&(D({kind:"authorization_expired"}),Gw());let Q=c8t(k);throw Q&&(D({kind:"login_failed",message:Q}),Gw()),k}}var n8t,r8t,iVe,Kue,Tue=O(async()=>{"use strict";A();_z();Or();dn();Cz();hr();yi();QE();await Eue();await B5e();nP();lT();tVe();oVe();n8t=300*1e3,r8t="urn:ietf:params:oauth:grant-type:device_code";iVe=e=>new Promise(t=>setTimeout(t,e));Kue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){X.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,discoverEndpoints:e?.discoverEndpoints,createLoopbackReceiver:e?.createLoopbackReceiver,generatePkce:e?.generatePkce,generateState:e?.generateState,exchangeCode:e?.exchangeCode,requestDeviceAuthorization:e?.requestDeviceAuthorization,pollForTokens:e?.pollForTokens,isBrowserAvailable:e?.isBrowserAvailable,writeBootstrappedTokens:e?.writeBootstrappedTokens,setTokens:e?.setTokens,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(gu()&&!e?.progress){await D5e(t),await zH({skipIfAlreadyConfigured:!0});return}await AVe({...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]="446c44fd-e558-49e2-9c7e-b8e3e3b71937",e._sentryDebugIdIdentifier="sentry-dbid-446c44fd-e558-49e2-9c7e-b8e3e3b71937")}catch{}})();A();A();A();function sde(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var ade=sde();ade.ok||(process.stderr.write(`lore: ${ade.message}.
529
+ `);return}}});import XHt from"node:http";var nVe,e8t,rVe,oVe=O(()=>{"use strict";A();nVe="/callback",e8t='<!doctype html><meta charset="utf-8"><title>Lore</title><body style="font-family:system-ui;padding:3rem;text-align:center"><h1>Signed in to Lore</h1><p>You can close this tab and return to your terminal.</p></body>',rVe=async()=>{let e,t,n=XHt.createServer((c,l)=>{let f=new URL(c.url??"/","http://127.0.0.1");if(f.pathname!==nVe){l.statusCode=404,l.end("not found");return}let h=f.searchParams.get("error"),y=f.searchParams.get("code"),S=f.searchParams.get("state");l.statusCode=h||!y?400:200,l.setHeader("content-type","text/html; charset=utf-8"),l.end(h||!y?`<p>Login failed: ${h??"no code"}. Return to your terminal.</p>`:e8t),r={error:h,code:y,state:S},i()}),r=null,o,i=()=>{};await new Promise((c,l)=>{n.once("error",l),n.listen(0,"127.0.0.1",()=>{n.removeListener("error",l),c()})});let{port:s}=n.address();return{redirectUri:`http://127.0.0.1:${s}${nVe}`,waitForCallback:(c,l)=>new Promise((f,h)=>{o={state:c},e=f,t=h;let y=setTimeout(()=>{t=void 0,h(new Error("authorization timed out"))},l);y.unref&&y.unref(),i=()=>{if(!r||!e&&!t)return;let S=r;r=null,clearTimeout(y);let b={resolve:e,reject:t};e=void 0,t=void 0,S.error?b.reject?.(new Error(`authorization failed: ${S.error}`)):S.code?o&&S.state!==o.state?b.reject?.(new Error("authorization state mismatch")):b.resolve?.({code:S.code}):b.reject?.(new Error("authorization callback missing code"))},i()}),close:()=>{n.close()}}}});var N5e={};$s(N5e,{buildStoredAnalyticsPersonPropertiesFromWhoAmI:()=>uVe,getOpenBrowserCommand:()=>mVe,loginCommand:()=>Kue,openBrowser:()=>fVe,pollForTokens:()=>pVe,requestDeviceAuthorization:()=>dVe,runLogin:()=>AVe});import{spawn as t8t}from"node:child_process";function uVe(e){return{email:e.emailAddress,name:e.name??e.user.display_name,display_name:e.user.display_name,handle:e.user.handle}}async function o8t(e){let n=await Pt({token:e}).whoAmI({headers:{}});n.status===200&&(E4e(`lore_${n.body.user.id}`),T4e(uVe(n.body)))}async function cVe(e){try{return await e.json()}catch{throw new Error(`WorkOS returned an invalid JSON response: HTTP ${e.status}`)}}function lVe(e){return[e.error_description,e.error].find(t=>typeof t=="string"&&t.length>0)??"Authorization failed"}async function i8t(e){return Az({resource:e,stateDir:Mr()})}function s8t(e){return process.env.LORE_DEVICE_AUTH&&process.env.LORE_DEVICE_AUTH!=="0"?!1:e==="linux"?!!(process.env.DISPLAY||process.env.WAYLAND_DISPLAY):!0}async function dVe(e){let t=await fetch(e.deviceAuthorizationEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({client_id:e.clientId,scope:Nre})}),n=await cVe(t);if(!t.ok)throw new Error(lVe(n));return n}async function pVe(e){let t=AbortSignal.timeout(Math.min(e.timeoutMs,e.expiresIn*1e3)),n=e.interval;for(;;){let r;try{r=await fetch(e.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({grant_type:r8t,device_code:e.deviceCode,client_id:e.clientId}),signal:t})}catch(s){throw s instanceof Error&&s.name==="TimeoutError"?new Error("authorization timed out"):s}let o=await cVe(r);if(r.ok){let s=o.access_token,c=o.refresh_token,l=o.expires_in;if(typeof s!="string")throw new Error("device token response missing access_token");return{access_token:s,refresh_token:typeof c=="string"?c:"",expires_at:Date.now()+(typeof l=="number"?l:0)*1e3,scope:typeof o.scope=="string"?o.scope:""}}let i=o;switch(i.error){case"authorization_pending":await iVe(n*1e3);break;case"slow_down":n+=1,await iVe(n*1e3);break;case"access_denied":throw new Error("Authorization denied");case"expired_token":throw new Error("Authorization expired");default:throw new Error(lVe(i))}}}async function fVe(e){let{command:t,args:n}=mVe(process.platform,e);await new Promise((r,o)=>{let i=t8t(t,n,{detached:!0,stdio:"ignore"});i.once("error",o),i.once("spawn",()=>{i.unref(),r()})})}function mVe(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 a8t(e){if(!await Qt())return!1;try{return(await e.whoAmI({headers:{}})).status===200}catch{return!1}}async function u8t(e,t,n){if(t==="darwin")try{n({kind:"auto_enable_started"});let{plistPath:r,binaryPath:o}=await e();n({kind:"auto_enable_succeeded",plistPath:r,binaryPath:o,logFile:sp()})}catch(r){X.warn("auto_enable_failed",{error:r instanceof Error?r.message:String(r)}),n({kind:"auto_enable_failed"})}}function c8t(e){if(lx(e))return`Could not reach the Lore API at ${rA()}. If you're running pnpm dev, start the local API server or set LORE_TARGET=dev-shared.`}function sVe(){let e=process.env.LORE_AUTHKIT_RESOURCE_INDICATORS?.trim();return e==="1"||e==="true"}async function aVe(e){let t=await e.deps.createLoopbackReceiver();try{let n=e.deps.generatePkce(),r=e.deps.generateState(),o=i4e({authorizationEndpoint:e.endpoints.authorizationEndpoint,clientId:e.clientId,redirectUri:t.redirectUri,codeChallenge:n.codeChallenge,resource:e.resource,scope:Nre,state:r,...e.silent?{prompt:"none"}:{}});e.emitProgress&&e.progress({kind:"browser_url",url:o});try{await e.deps.openBrowser(o),e.emitProgress&&e.progress({kind:"browser_opened"})}catch(s){X.warn("open_browser_failed",{error:s instanceof Error?s.message:String(s)}),e.emitProgress&&e.progress({kind:"browser_open_failed"})}e.emitProgress&&e.progress({kind:"waiting_for_authorization"});let{code:i}=await t.waitForCallback(r,e.timeoutMs);return await e.deps.exchangeCode({tokenEndpoint:e.endpoints.tokenEndpoint,clientId:e.clientId,code:i,codeVerifier:n.codeVerifier,redirectUri:t.redirectUri,resource:e.resource})}finally{t.close()}}async function AVe({client:e=Pt(),enableLaunchAgent:t=s8,openBrowser:n=fVe,platform:r=process.platform,discoverEndpoints:o=i8t,createLoopbackReceiver:i=rVe,generatePkce:s=r4e,generateState:c=o4e,exchangeCode:l=s4e,requestDeviceAuthorization:f=dVe,pollForTokens:h=pVe,isBrowserAvailable:y=()=>s8t(r),writeBootstrappedTokens:S=v4e,setTokens:b=C4e,cacheAnalyticsDistinctId:v=o8t,timeoutMs:x=n8t,progress:D=eVe}={}){if(await a8t(e)){D({kind:"already_logged_in"});return}try{let k=Yre(),Q=await o(k),z;if(y()){let G={createLoopbackReceiver:i,openBrowser:n,generatePkce:s,generateState:c,exchangeCode:l},$=await aVe({endpoints:Q,clientId:ax,resource:sVe()?k:void 0,silent:!1,deps:G,progress:D,emitProgress:!0,timeoutMs:x}),ie=await aVe({endpoints:Q,clientId:ZFe,resource:sVe()?H4e():void 0,silent:!0,deps:G,progress:D,emitProgress:!1,timeoutMs:x});S($,ie),z=$.access_token}else{let G=await f({deviceAuthorizationEndpoint:Q.deviceAuthorizationEndpoint,clientId:ax});D({kind:"device_authorized",userCode:G.user_code,verificationUri:G.verification_uri,verificationUriComplete:G.verification_uri_complete}),D({kind:"browser_url",url:G.verification_uri_complete}),D({kind:"waiting_for_authorization"});let $=await h({tokenEndpoint:Q.tokenEndpoint,clientId:ax,deviceCode:G.device_code,expiresIn:G.expires_in,interval:G.interval,timeoutMs:x});b($),z=$.access_token}v(z).catch(G=>{X.warn("cache_analytics_distinct_id_failed",{error:G instanceof Error?G.message:String(G)})}),D({kind:"logged_in"}),await u8t(t,r,D)}catch(k){k instanceof Error&&k.message==="authorization timed out"?(D({kind:"authorization_timed_out"}),Gw()):k instanceof Error&&k.message==="Authorization denied"?(D({kind:"authorization_denied"}),Gw()):k instanceof Error&&k.message==="Authorization expired"&&(D({kind:"authorization_expired"}),Gw());let Q=c8t(k);throw Q&&(D({kind:"login_failed",message:Q}),Gw()),k}}var n8t,r8t,iVe,Kue,Tue=O(async()=>{"use strict";A();_z();Or();dn();Cz();hr();yi();QE();await Eue();await B5e();nP();lT();tVe();oVe();n8t=300*1e3,r8t="urn:ietf:params:oauth:grant-type:device_code";iVe=e=>new Promise(t=>setTimeout(t,e));Kue={meta:{name:"login",description:"Authorize this CLI against your Lore workspace"},async run({data:e}){X.info("command_start",{command:"login"});let t={client:e?.client,enableLaunchAgent:e?.enableLaunchAgent,openBrowser:e?.openBrowser,platform:e?.platform,discoverEndpoints:e?.discoverEndpoints,createLoopbackReceiver:e?.createLoopbackReceiver,generatePkce:e?.generatePkce,generateState:e?.generateState,exchangeCode:e?.exchangeCode,requestDeviceAuthorization:e?.requestDeviceAuthorization,pollForTokens:e?.pollForTokens,isBrowserAvailable:e?.isBrowserAvailable,writeBootstrappedTokens:e?.writeBootstrappedTokens,setTokens:e?.setTokens,cacheAnalyticsDistinctId:e?.cacheAnalyticsDistinctId,timeoutMs:e?.timeoutMs};if(gu()&&!e?.progress){await D5e(t),await zH({skipIfAlreadyConfigured:!0});return}await AVe({...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]="bb573630-e51c-4ced-b73c-e4a655f71367",e._sentryDebugIdIdentifier="sentry-dbid-bb573630-e51c-4ced-b73c-e4a655f71367")}catch{}})();A();A();A();function sde(e=process.versions.node){let t=Number.parseInt(e.split(".")[0]??"",10);return!Number.isFinite(t)||t<=0?{ok:!0,currentVersion:e,message:null}:t<20?{ok:!1,currentVersion:e,message:`requires Node.js >= 20.0.0 (found ${e})`}:{ok:!0,currentVersion:e,message:null}}var ade=sde();ade.ok||(process.stderr.write(`lore: ${ade.message}.
530
530
  Upgrade Node (e.g. \`nvm install 20\`) and re-run.
531
531
  `),process.exit(1));A();ER();$c();function Vvt(){let e=process.env.SENTRY_SPOTLIGHT?.trim();return!e||e==="0"||e==="false"?!1:e==="1"||e==="true"?!0:e}var Yvt=Vvt();BZ({dsn:"https://583674b382128b1b30b9fa1f0581daab@o4509017064472576.ingest.us.sentry.io/4511344717529088",environment:Zr(),release:cu(),sendDefaultPii:!0,enableLogs:!0,spotlight:Yvt,tracesSampleRate:1});AU("service_name","lore-cli");ER();kZ();import{realpathSync as d5t}from"node:fs";import{fileURLToPath as p5t,pathToFileURL as IYe}from"node:url";A();A();az();Or();dn();hr();A();function zw(e){let t=e;return t._def??t.def??{}}function B2t(e){let t=zw(e);return typeof t.typeName=="string"?t.typeName:typeof t.type=="string"?t.type:void 0}function Wc(e,t,n){let r=B2t(e);return r===t||r===n}function q4e(e){let t=zw(e);if(t.element)return t.element;if(typeof t.type=="object"&&t.type!==null)return t.type}function N2t(e){let t=e.options;if(Array.isArray(t))return[...t];let n=zw(e);return Array.isArray(n.values)?[...n.values]:n.entries&&typeof n.entries=="object"?Object.values(n.entries):[]}function Kre(e){if(!e||!Wc(e,"ZodObject","object"))return;let t=e.shape;if(typeof t=="function")return t();if(t&&typeof t=="object")return t;let n=zw(e).shape;if(typeof n=="function")return n();if(n&&typeof n=="object")return n}function V4e(e){let t=e,n=!1,r,o=e.description;for(;;){o=t.description??o;let i=zw(t);if(Wc(t,"ZodOptional","optional"))n=!0,t=i.innerType;else if(Wc(t,"ZodNullable","nullable"))n=!0,t=i.innerType;else if(Wc(t,"ZodDefault","default"))r=typeof i.defaultValue=="function"?i.defaultValue():i.defaultValue,t=i.innerType;else if(Wc(t,"ZodEffects","effects"))t=i.schema;else if(Wc(t,"ZodPipeline","pipe"))t=i.in;else break}return{inner:t,optional:n,defaultValue:r,description:o}}function O2t(e,t={}){let{inner:n,optional:r,defaultValue:o,description:i}=V4e(e),s=!1,c=n;Wc(c,"ZodArray","array")&&(s=!0,c=q4e(c)??c);let l=!r&&o===void 0;return t.positional?{arg:{type:"positional",description:i,required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:Wc(c,"ZodEnum","enum")?{arg:{type:"enum",description:i,options:N2t(c),required:l,...o!==void 0?{default:String(o)}:{}},optional:r,isArray:s}:Wc(c,"ZodBoolean","boolean")?{arg:{type:"boolean",description:i,required:l,...typeof o=="boolean"?{default:o}:{}},optional:r,isArray:s}:{arg:{type:"string",description:s?`${i??""}${i?" ":""}(comma-separated)`.trim()||void 0:i,required:l,...o!==void 0?{default:String(o)}:{},...s?{valueHint:"a,b,c"}:{}},optional:r,isArray:s}}function Jre(e,t={}){let n={},r={};for(let[o,i]of Object.entries(e)){let{arg:s,isArray:c}=O2t(i,t);n[o]=s,r[o]={isArray:c,leafKind:w2t(i)}}return{args:n,fields:r}}function Zre(e,t={}){let n=Kre(e);return n?Jre(n,t):{args:{},fields:{}}}function w2t(e){let{inner:t}=V4e(e),n=t;return Wc(n,"ZodArray","array")&&(n=q4e(n)??n),Wc(n,"ZodNumber","number")?"number":Wc(n,"ZodBoolean","boolean")?"boolean":Wc(n,"ZodEnum","enum")?"enum":Wc(n,"ZodString","string")?"string":"other"}function k2t(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 P2t(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 Wre(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 M2t(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 L2t(e,t){let n=t.path.map(o=>String(o)).join(".");return` ${n?`${e}.${n}`:e}: ${t.message}`}function Xre(e,t,n){if(!e)return[];let r=t??{},o=e.safeParse(r);return o.success?[]:(o.error.issues??[]).map(s=>L2t(n,s))}function U2t(e,t,n){return e.resource==="threads"&&t==="id"?M2t(n):n}function Y4e(e){let t=k2t(mz,e.path),n=Kre(t.pathParams),r=e.positional??(n?Object.keys(n):[]),o=new Set(r),i=Jre(n?Object.fromEntries(r.map(h=>[h,n[h]])):{},{positional:!0}),s=Zre(t.query),c=t.method==="GET"||t.method==="DELETE"?{args:{},fields:{}}:Zre(t.body);for(let h of Object.keys(c.args))if(s.args[h]!==void 0||o.has(h))throw new Error(`route [${e.path.join(".")}] has overlapping field "${h}" across path/query/body`);let l={...i.args,...s.args,...c.args},f=e.description??t.summary??`${t.method} ${t.path}`;return{meta:{name:e.op,description:f},args:l,async run({args:h,data:y}){X.info("command_start",{command:`${e.resource} ${e.op}`,route:e.path.join(".")});let S=y;if(!await(S?.getAccessToken??Qt)())throw new be("not logged in \u2014 run 'lore login' first");let v={};for(let ge of r){let Ce=h[ge],ve=Wre(Ce,i.fields[ge])??Ce;v[ge]=U2t(e,ge,ve)}let x={};for(let[ge,Ce]of Object.entries(s.fields)){let ve=Wre(h[ge],Ce);ve!==void 0&&(x[ge]=ve)}let D={};for(let[ge,Ce]of Object.entries(c.fields)){let ve=Wre(h[ge],Ce);ve!==void 0&&(D[ge]=ve)}let k=[...Xre(t.pathParams,v,"path"),...Xre(t.query,x,"query"),...t.method==="GET"||t.method==="DELETE"?[]:Xre(t.body,D,"body")];if(k.length>0)throw new be(`Invalid request for \`lore ${e.resource} ${e.op}\`:
532
532
  ${k.join(`